@progress/kendo-react-chart-wizard 13.3.0 → 13.4.0-develop.1
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.d.ts +15 -0
- package/ChartWizard.mjs +10 -10
- package/components/ChartComponent.d.ts +18 -0
- package/components/FormField.d.ts +19 -0
- package/components/FormFieldSet.d.ts +17 -0
- package/components/SeriesGrid.d.ts +18 -0
- package/components/SeriesGrid.mjs +3 -3
- package/components/SeriesGridCells.d.ts +54 -0
- package/components/SeriesTypeButton.d.ts +21 -0
- package/components/SeriesTypesWrap.d.ts +14 -0
- package/components/panels/BarChartPanel.d.ts +16 -0
- package/components/panels/CategoryAxisPanel.d.ts +16 -0
- package/components/panels/CategoryAxisPanel.mjs +13 -13
- package/components/panels/ChartAreaPanel.d.ts +16 -0
- package/components/panels/ColumnChartPanel.d.ts +16 -0
- package/components/panels/ConfigurationPanel.d.ts +16 -0
- package/components/panels/LegendPanel.d.ts +16 -0
- package/components/panels/LegendPanel.mjs +1 -1
- package/components/panels/LineChartPanel.d.ts +16 -0
- package/components/panels/PieChartPanel.d.ts +16 -0
- package/components/panels/ScatterChartPanel.d.ts +16 -0
- package/components/panels/SeriesPanel.d.ts +16 -0
- package/components/panels/SeriesPanel.mjs +3 -3
- package/components/panels/TitlePanel.d.ts +16 -0
- package/components/panels/TitlePanel.mjs +6 -6
- package/components/panels/ValueAxisPanel.d.ts +16 -0
- package/components/panels/ValueAxisPanel.mjs +1 -1
- package/dist/cdn/js/kendo-react-chart-wizard.js +1 -1
- package/grid-integration/get-grid-selected-rows.d.ts +36 -0
- package/grid-integration/get-wizard-data-from-grid-selection.d.ts +36 -0
- package/grid-integration/index.d.ts +9 -0
- package/index.d.mts +7 -237
- package/index.d.ts +7 -237
- package/messages.d.ts +551 -0
- package/package.json +14 -14
- package/types/ChartWizardHandle.d.ts +24 -0
- package/types/ChartWizardPanelProps.d.ts +15 -0
- package/types/ChartWizardProps.d.ts +47 -0
- package/types/export.d.ts +65 -0
- package/utils.d.ts +147 -0
|
@@ -11,7 +11,7 @@ import { FormElement as Q } from "@progress/kendo-react-form";
|
|
|
11
11
|
import { FormFieldSet as N } from "../FormFieldSet.mjs";
|
|
12
12
|
import { FormField as u } from "../FormField.mjs";
|
|
13
13
|
import { Input as U, ColorPicker as y, NumericTextBox as X } from "@progress/kendo-react-inputs";
|
|
14
|
-
import { stopPropagation as Z,
|
|
14
|
+
import { stopPropagation as Z, dropdownlistCommonProps as A, fontNames as d, nullItem as g, itemRender as k, parseFont as c, fontSizes as f, updateState as m, ActionTypes as x, ensureValue as R } from "../../utils.mjs";
|
|
15
15
|
import { formatValueAxisLabelsFormatText as $, messages as o, formatValueAxisLabelsFormatNumber as ee, formatValueAxisLabelsFormatCurrency as ae, formatValueAxisLabelsFormatPercent as te, formatYAxis as le, formatValueAxis as oe, formatValueAxisTitle as ie, formatValueAxisTitlePlaceholder as ne, formatValueAxisTitleFont as re, formatValueAxisTitleFontPlaceholder as se, formatValueAxisTitleSize as ue, formatValueAxisTitleSizePlaceholder as me, formatValueAxisTitleColor as xe, formatValueAxisLabels as ge, formatValueAxisLabelsFormat as Ae, formatValueAxisLabelsFont as de, formatValueAxisLabelsFontPlaceholder as ce, formatValueAxisLabelsSize as fe, formatValueAxisLabelsSizePlaceholder as ve, formatValueAxisLabelsColor as Le, formatValueAxisLabelsRotation as be, formatValueAxisLabelsRotationAuto as Ve } from "../../messages.mjs";
|
|
16
16
|
import { useLocalization as Se } from "@progress/kendo-react-intl";
|
|
17
17
|
import { Reveal as Fe } from "@progress/kendo-react-animation";
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-layout"),require("@progress/kendo-react-buttons"),require("@progress/kendo-svg-icons"),require("@progress/kendo-charts"),require("@progress/kendo-react-charts"),require("@progress/kendo-drawing"),require("@progress/kendo-file-saver"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-form"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-react-grid"),require("@progress/kendo-react-common"),require("@progress/kendo-react-animation"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-inputs")):"function"==typeof define&&define.amd?define(["exports","react","@progress/kendo-react-dialogs","@progress/kendo-react-layout","@progress/kendo-react-buttons","@progress/kendo-svg-icons","@progress/kendo-charts","@progress/kendo-react-charts","@progress/kendo-drawing","@progress/kendo-file-saver","@progress/kendo-react-intl","@progress/kendo-react-form","@progress/kendo-react-dropdowns","@progress/kendo-react-grid","@progress/kendo-react-common","@progress/kendo-react-animation","@progress/kendo-react-labels","@progress/kendo-react-inputs"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactChartWizard={},e.React,e.KendoReactDialogs,e.KendoReactLayout,e.KendoReactButtons,e.KendoSvgIcons,e.KendoCharts,e.KendoReactCharts,e.KendoDrawing,e.KendoFileSaver,e.KendoReactIntl,e.KendoReactForm,e.KendoReactDropdowns,e.KendoReactGrid,e.KendoReactCommon,e.KendoReactAnimation,e.KendoReactLabels,e.KendoReactInputs)}(this,(function(e,t,a,r,l,n,o,i,c,s,d,u,g,m,h,x,v,f){"use strict";function p(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var C=p(t);const b=e=>{e.stopPropagation()},S="chart",E={paperSize:"A4",margin:"1cm"},k={width:800,height:600},L=(e={})=>({fileName:e.fileName||S,pdf:{...E,...e.pdf},image:{...k,...e.image}}),A=e=>{const t=i.exportVisual(e.chart),a=e.exportOptions;t&&c.exportPDF(t,a.pdf).then((e=>s.saveAs(e,a.fileName+".pdf")))},z=e=>{const t=i.exportVisual(e.chart),a=e.exportOptions;t&&c.exportSVG(t).then((e=>s.saveAs(e,a.fileName+".svg")))},y=e=>{const t=e.exportOptions,a=i.exportVisual(e.chart,t.image);a&&c.exportImage(a,t.image).then((e=>s.saveAs(e,t.fileName+".png")))},T={value:null,text:""},W=(e,t)=>t.dataItem.style?C.cloneElement(e,e.props,C.createElement("span",{style:t.dataItem.style},e.props.children)):e,I=/^\d+$/,F=e=>{if(""===e.text)return!0;if(void 0===e.value){if(!I.test(e.text))return!1;e.value=e.text+"px"}return D.find((t=>t.value===e.value))||(D.push(e),D.sort(((e,t)=>parseInt(e.text,10)-parseInt(t.text,10)))),!0},P={fillMode:"outline",popupSettings:{animate:!1}},N={type:"normal"},w={type:"100%"},R=e=>{var t,a;const r="object"==typeof(null==(t=e.series[0])?void 0:t.stack)&&(null==(a=e.series[0])?void 0:a.stack);return{isStackFalse:!1===r,isStackNormal:r&&"normal"===r.type,isStack100:r&&"100%"===r.type}},D=o.ChartWizardCommon.fontSizes,K=o.ChartWizardCommon.fontNames,B=o.ChartWizardCommon.createInitialState,M=(e,t)=>o.ChartWizardCommon.createState(e,t),V=o.ChartWizardCommon.updateState,q=o.ChartWizardCommon.mergeStates,O=o.ChartWizardCommon.isCategorical,G=o.ChartWizardCommon.parseFont,j=o.ChartWizardCommon.ActionTypes,{getWizardDataFromDataRows:H}=o.ChartWizardCommon,X=o.ChartWizardCommon.messages,Y="chartWizard.format.chartArea.margins.auto";class U{constructor(){this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}}class $ extends U{constructor(e,t){super(),this.chart=e,this.exportOptions=t}}const J=e=>t.createElement("fieldset",{className:"k-form-fieldset"},e.legend&&t.createElement("legend",{className:"k-form-legend"},e.legend),e.children),Q=C.createContext({onRemove:e=>{},count:0}),Z=e=>{const{onRemove:t,count:a}=C.useContext(Q);return C.createElement("td",{...e.tdProps},C.createElement(l.Button,{type:"button",onClick:()=>{t.call(void 0,e.dataItem.id)},icon:"trash",svgIcon:n.trashIcon,fillMode:"flat",disabled:a<2}))},_=C.createContext({reorder:()=>{},dragStart:()=>{}}),ee=e=>{const t=C.useContext(_);return C.createElement("td",{...e.tdProps,onDragOver:a=>{t.reorder.call(void 0,e.dataItem),a.preventDefault(),a.dataTransfer.dropEffect="copy"}},C.createElement("span",{draggable:!0,style:{cursor:"move"},onDragStart:a=>{t.dragStart.call(void 0,e.dataItem),a.dataTransfer.setData("dragging","")}},C.createElement(h.IconWrap,{icon:n.reorderIcon,name:"reorder"})))},te=C.createContext({enterEdit:(e,t)=>{},exitEdit:(e,t)=>{}}),ae=e=>{const{enterEdit:t}=C.useContext(te);return C.createElement("td",{...e.tdProps,onClick:()=>{t(e.dataItem,e.field)}},e.children)},re=e=>"delete"===e.field?C.createElement(Z,{...e}):"reorder"===e.field?C.createElement(ee,{...e}):"name"===e.field?C.createElement(ae,{...e}):null,le=e=>{const t=C.useRef(null),{exitEdit:a}=C.useContext(te);return C.useEffect((()=>{var e;const a=null==(e=t.current)?void 0:e.querySelector("input");null==a||a.focus()}),[]),C.createElement("td",{...e.tdProps,ref:t,onBlur:()=>{a(e.dataItem,e.field)},onKeyDown:t=>{"Enter"===t.key||"Escape"===t.key?(t.stopPropagation(),a(e.dataItem,e.field)):" "===t.key&&t.stopPropagation()}},e.children)},ne=()=>null,{messages:oe}=o.ChartWizardCommon,ie=e=>{const[a,r]=t.useState({}),[o,i]=t.useState(null);return t.createElement(Q.Provider,{value:{onRemove:t=>{const a=e.data.filter((e=>e.id!==t));e.onChange.call(void 0,a)},count:e.data.length}},t.createElement(_.Provider,{value:{reorder:t=>{if(o===t)return;const a=e.data.slice(),r=a.findIndex((e=>e===o)),l=a.findIndex((e=>e===t));a.splice(r,1),a.splice(l,0,o||a[0]),e.onChange.call(void 0,a)},dragStart:e=>{i(e)}}},t.createElement(te.Provider,{value:{enterEdit:e=>{r((t=>({...t,[e.id]:!0})))},exitEdit:e=>{r((t=>Object.keys(t).reduce(((a,r)=>{if(r===e.id){const e={...t};return delete e[r],e}return a}),{})))}}},t.createElement(m.Grid,{className:"k-series-grid",style:{width:"100%"},size:"medium",data:e.data,dataItemKey:"id",onItemChange:t=>{const a=t.field||"",r=e.data.map((e=>e.id===t.dataItem.id?{...e,[a]:t.value}:e));e.onChange.call(void 0,r)},scrollable:"none",editable:!0,cells:{headerCell:ne,data:re,edit:{text:le,boolean:le,numeric:le,date:le}},edit:a,onEditChange:e=>{r(e.edit)}},t.createElement(m.GridToolbar,null,t.createElement(l.Button,{type:"button",className:"k-toolbar-button",fillMode:"flat",onClick:()=>{const t=e.initialData.find((t=>!e.data.find((e=>e.id===t.id))));t&&e.onChange.call(void 0,[...e.data,t])},disabled:e.data.length===e.initialData.length,svgIcon:n.plusIcon,icon:"plus"},d.useLocalization().toLanguageString("chartWizard.data.configuration.series.add",oe.configurationSeriesAdd))),t.createElement(m.GridColumn,{field:"reorder",width:"40px",editable:!1}),t.createElement(m.GridColumn,{field:"name",title:"Name"}),t.createElement(m.GridColumn,{field:"delete",width:"40px",editable:!1})))))},ce=e=>{const a=d.useLocalization(),l=e.state,n=l.seriesType,[o,i]=t.useState(!0),c=t.useCallback((e=>{i(!e.expanded)}),[]),s=t.useCallback((t=>{e.onStateChange(V(l,j.categoryAxisX,t.target.value))}),[l]),m=t.useCallback((t=>{e.onStateChange(V(l,j.seriesChange,t))}),[l]),h=t.useCallback((t=>{e.onStateChange(V(l,j.valueAxisY,t.target.value))}),[l]);return t.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:a.toLanguageString("chartWizard.data.configuration.expandText",X.configuration),expanded:o,tabIndex:0,onAction:c},t.createElement(x.Reveal,null,o&&t.createElement(r.ExpansionPanelContent,null,t.createElement(u.FormElement,{onKeyDown:b},t.createElement(J,{legend:"scatter"===n?a.toLanguageString("chartWizard.data.configuration.xAxis",X.configurationXAxis):a.toLanguageString("chartWizard.data.configuration.categoryAxis",X.configurationCategoryAxis)},t.createElement(g.DropDownList,{data:l.columns||[],value:l.categoryField,onChange:s,...P})),O(n)&&t.createElement(J,{legend:a.toLanguageString("chartWizard.data.configuration.series.title",X.configurationSeries)},t.createElement(ie,{data:l.series,initialData:l.initialSeries,onChange:m})),"pie"===n&&t.createElement(J,{legend:a.toLanguageString("chartWizard.data.configuration.valueAxis",X.configurationValueAxis)},t.createElement(g.DropDownList,{data:l.columns||[],value:l.valueField||"",...P,onChange:h}))))))},se=e=>t.createElement(u.FieldWrapper,{className:e.className},e.labelText&&e.editorId&&t.createElement(v.Label,{className:"k-form-label",editorId:e.editorId},e.labelText),t.createElement("div",{className:"k-form-field-wrap",onKeyDown:b},e.children)),de=e=>{var a;const l=d.useLocalization(),n=e.state,[o,i]=t.useState(!1),c=t.useCallback((e=>{i(!e.expanded)}),[]),s=t.useCallback((t=>{e.onStateChange(V(n,j.areaMarginLeft,t.target.value))}),[n]),g=t.useCallback((t=>{e.onStateChange(V(n,j.areaMarginRight,t.target.value))}),[n]),m=t.useCallback((t=>{e.onStateChange(V(n,j.areaMarginTop,t.target.value))}),[n]),h=t.useCallback((t=>{e.onStateChange(V(n,j.areaMarginBottom,t.target.value))}),[n]),v=n.area.margin,p=t.useCallback((t=>{e.onStateChange(V(n,j.areaBackground,t.value))}),[n]);return t.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:l.toLanguageString("chartWizard.format.chartArea.expandText",X.formatChartArea),expanded:o,tabIndex:0,onAction:c},t.createElement(x.Reveal,null,o&&t.createElement(r.ExpansionPanelContent,null,t.createElement(u.FormElement,{onKeyDown:b},t.createElement(J,{legend:l.toLanguageString("chartWizard.format.chartArea.margins",X.formatChartAreaMargins)},t.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},t.createElement(se,{labelText:l.toLanguageString("chartWizard.format.chartArea.margins.left",X.formatChartAreaMarginsLeft),editorId:"left"},t.createElement(f.NumericTextBox,{id:"left",value:void 0!==v.left?v.left:null,onChange:s,placeholder:l.toLanguageString(Y,X.formatChartAreaMarginsAuto),min:0,max:1e3,step:1,fillMode:"outline"})),t.createElement(se,{labelText:l.toLanguageString("chartWizard.format.chartArea.margins.right",X.formatChartAreaMarginsRight),editorId:"right"},t.createElement(f.NumericTextBox,{id:"right",value:void 0!==v.right?v.right:null,onChange:g,placeholder:l.toLanguageString(Y,X.formatChartAreaMarginsAuto),min:0,max:1e3,step:1,fillMode:"outline"})),t.createElement(se,{labelText:l.toLanguageString("chartWizard.format.chartArea.margins.top",X.formatChartAreaMarginsTop),editorId:"top"},t.createElement(f.NumericTextBox,{id:"top",value:void 0!==v.top?v.top:null,onChange:m,placeholder:l.toLanguageString(Y,X.formatChartAreaMarginsAuto),min:0,max:1e3,step:1,fillMode:"outline"})),t.createElement(se,{labelText:l.toLanguageString("chartWizard.format.chartArea.margins.bottom",X.formatChartAreaMarginsBottom),editorId:"bottom"},t.createElement(f.NumericTextBox,{id:"bottom",value:void 0!==v.bottom?v.bottom:null,onChange:h,placeholder:l.toLanguageString(Y,X.formatChartAreaMarginsAuto),min:0,max:1e3,step:1,fillMode:"outline"})))),t.createElement(J,{legend:l.toLanguageString("chartWizard.format.chartArea.background",X.formatChartAreaBackground)},t.createElement(se,{labelText:l.toLanguageString("chartWizard.format.chartArea.background.color",X.formatChartAreaBackgroundColor),editorId:"background"},t.createElement(f.ColorPicker,{id:"background",value:(null==(a=n.area)?void 0:a.background)||"",onChange:p,view:"gradient",fillMode:"outline"})))))))},ue=e=>{const t=d.useLocalization(),a=e.state,[l,n]=C.useState(!1),o=C.useCallback((e=>{n(!e.expanded)}),[]),i=[{value:"chartTitle",text:t.toLanguageString("chartWizard.format.title.chartTitle",X.formatTitleChartTitle)},{value:"chartSubtitle",text:t.toLanguageString("chartWizard.format.title.chartSubtitle",X.formatTitleChartSubtitle)}],[c,s]=C.useState(i[0]),m=C.useCallback((e=>{s(e.target.value)}),[]),h=(c.value===i[0].value?a.title:a.subtitle)||{text:"",font:"",color:""};return C.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:t.toLanguageString("chartWizard.format.title.expandText",X.formatTitle),expanded:l,tabIndex:0,onAction:o},C.createElement(x.Reveal,null,l&&C.createElement(r.ExpansionPanelContent,null,C.createElement(u.FormElement,{onKeyDown:b},C.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},C.createElement(se,{className:"k-col-span-2",editorId:"apply-to-title",labelText:t.toLanguageString("chartWizard.format.title.applyTo",X.formatTitleApplyTo)},C.createElement(g.DropDownList,{id:"apply-to-title",data:i,textField:"text",dataItemKey:"value",value:i.find((e=>e.value===c.value)),onChange:m,...P})),C.createElement(se,{className:"k-col-span-2",editorId:"titleText",labelText:t.toLanguageString("chartWizard.format.title.label",X.formatTitleLabel)},C.createElement(f.Input,{id:"titleText",placeholder:c.value===i[0].value?i[0].text:i[1].text,value:h.text,onChange:t=>{const r=c.value===i[0].value?j.titleText:j.subtitleText;e.onStateChange(V(a,r,t.target.value))}})),C.createElement(se,{className:"k-col-span-2",editorId:"titleFont",labelText:t.toLanguageString("chartWizard.format.title.font",X.formatTitleFont)},C.createElement(g.ComboBox,{id:"titleFont",data:K,textField:"text",dataItemKey:"value",placeholder:t.toLanguageString("chartWizard.format.title.fontPlaceholder",X.formatTitleFontPlaceholder),value:K.find((e=>e.value===G(h.font).name))||T,onChange:t=>{const r=c.value===i[0].value?j.titleFontName:j.subtitleFontName,l=t.target.value||T;e.onStateChange(V(a,r,l.value))},itemRender:W,...P})),C.createElement(se,{editorId:"titleFontSize",labelText:t.toLanguageString("chartWizard.format.title.size",X.formatTitleSize)},C.createElement(g.ComboBox,{id:"titleFontSize",data:D,textField:"text",dataItemKey:"value",placeholder:t.toLanguageString("chartWizard.format.title.sizePlaceholder",X.formatTitleSizePlaceholder),value:D.find((e=>e.value===G(h.font).size))||T,onChange:t=>{const r=c.value===i[0].value?j.titleFontSize:j.subtitleFontSize,l=t.target.value||T;F(l)&&e.onStateChange(V(a,r,l.value))},itemRender:W,allowCustom:!0,...P})),C.createElement(se,{editorId:"titleColor",labelText:t.toLanguageString("chartWizard.format.title.color",X.formatTitleColor)},C.createElement(f.ColorPicker,{id:"titleColor",value:h.color||"",onChange:t=>{const r=c.value===i[0].value?j.titleColor:j.subtitleColor;e.onStateChange(V(a,r,t.value))},view:"gradient",fillMode:"outline"})))))))},ge=e=>{var a,l,n,o,i;const[c,s]=t.useState(""),m=d.useLocalization(),h=e.state,v=h.seriesType,p="object"==typeof(null==(a=h.series[0])?void 0:a.stack)&&(null==(l=h.series[0])?void 0:l.stack.type),[C,S]=t.useState(!1),E=t.useCallback((e=>{S(!e.expanded)}),[]),k={name:m.toLanguageString("chartWizard.format.series.allSeries",X.formatSeriesAllSeries)};return t.useEffect((()=>{s("")}),[v,p]),t.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:m.toLanguageString("chartWizard.format.series.expandText",X.formatSeries),expanded:C,tabIndex:0,onAction:E},t.createElement(x.Reveal,null,C&&t.createElement(r.ExpansionPanelContent,null,t.createElement(u.FormElement,{onKeyDown:b},t.createElement(se,{editorId:"apply-to-series",labelText:m.toLanguageString("chartWizard.format.series.applyTo",X.formatSeriesApplyTo)},t.createElement(g.DropDownList,{id:"apply-to-series",data:h.series,textField:"name",dataItemKey:"name",defaultItem:k,disabled:!O(v),value:h.series.find((e=>e.name===c))||k,onChange:e=>{const t=e.target.value.name;s(t===k.name?"":t)},...P})),t.createElement(se,{editorId:"seriesColor",labelText:m.toLanguageString("chartWizard.format.series.color",X.formatSeriesColor)},t.createElement(f.ColorPicker,{id:"seriesColor",value:c?null==(n=h.series.find((e=>e.name===c)))?void 0:n.color:"",onChange:t=>{c&&e.onStateChange(V(h,j.seriesColor,{seriesName:c,color:t.value}))},disabled:!c,view:"gradient",fillMode:"outline"})),t.createElement(se,null,t.createElement(f.Checkbox,{label:m.toLanguageString("chartWizard.format.series.showLabels",X.formatSeriesShowLabels),checked:c?null==(i=null==(o=h.series.find((e=>e.name===c)))?void 0:o.labels)?void 0:i.visible:h.series.every((e=>{var t;return null==(t=e.labels)?void 0:t.visible})),onChange:t=>{e.onStateChange(V(h,j.seriesLabel,{seriesName:c,all:!c,visible:t.value}))}}))))))},me=e=>{var a,l,n,o,i,c,s;const m=d.useLocalization(),h=e.state,[p,C]=t.useState(!1),S=t.useCallback((e=>{C(!e.expanded)}),[]),E=[{value:"top",text:m.toLanguageString("chartWizard.format.legend.position.top",X.formatLegendPositionTop)},{value:"bottom",text:m.toLanguageString("chartWizard.format.legend.position.bottom",X.formatLegendPositionBottom)},{value:"left",text:m.toLanguageString("chartWizard.format.legend.position.left",X.formatLegendPositionLeft)},{value:"right",text:m.toLanguageString("chartWizard.format.legend.position.right",X.formatLegendPositionRight)}];return t.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:m.toLanguageString("chartWizard.format.legend.expandText",X.formatLegend),expanded:p,tabIndex:0,onAction:S},t.createElement(x.Reveal,null,p&&t.createElement(r.ExpansionPanelContent,null,t.createElement(u.FormElement,{onKeyDown:b},t.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},t.createElement(v.Label,{editorId:"show-legend"},m.toLanguageString("chartWizard.format.legend.showLegend",X.formatLegendShowLegend)),t.createElement(f.Switch,{id:"show-legend",checked:null==(a=h.legend)?void 0:a.visible,onChange:t=>{e.onStateChange(V(h,j.legendVisible,t.value))}}),t.createElement(se,{className:"k-col-span-2",editorId:"legendLabelsFont",labelText:m.toLanguageString("chartWizard.format.legend.font",X.formatLegendFont)},t.createElement(g.ComboBox,{id:"legendLabelsFont",data:K,textField:"text",dataItemKey:"value",placeholder:m.toLanguageString("chartWizard.format.legend.fontPlaceholder",X.formatLegendFontPlaceholder),value:K.find((e=>{var t,a,r;return e.value===(null==(r=G((null==(a=null==(t=h.legend)?void 0:t.labels)?void 0:a.font)||""))?void 0:r.name)}))||T,onChange:t=>{const a=t.target.value||T;e.onStateChange(V(h,j.legendFontName,a.value))},itemRender:W,disabled:!1===(null==(l=h.legend)?void 0:l.visible),...P})),t.createElement(se,{editorId:"legendLabelsSize",labelText:m.toLanguageString("chartWizard.format.legend.size",X.formatLegendSize)},t.createElement(g.ComboBox,{id:"legendLabelsSize",data:D,textField:"text",dataItemKey:"value",placeholder:m.toLanguageString("chartWizard.format.legend.sizePlaceholder",X.formatLegendSizePlaceholder),value:D.find((e=>{var t,a,r;return e.value===(null==(r=G((null==(a=null==(t=h.legend)?void 0:t.labels)?void 0:a.font)||""))?void 0:r.size)}))||T,onChange:t=>{const a=t.target.value||T;F(a)&&e.onStateChange(V(h,j.legendFontSize,a.value))},disabled:!1===(null==(n=h.legend)?void 0:n.visible),allowCustom:!0,...P})),t.createElement(se,{editorId:"legendLabelsColor",labelText:m.toLanguageString("chartWizard.format.legend.color",X.formatLegendColor)},t.createElement(f.ColorPicker,{id:"legendLabelsColor",value:(null==(i=null==(o=h.legend)?void 0:o.labels)?void 0:i.color)||"",onChange:t=>{e.onStateChange(V(h,j.legendColor,t.value))},disabled:!1===(null==(c=h.legend)?void 0:c.visible),view:"gradient",fillMode:"outline"})),t.createElement(se,{className:"k-col-span-2",editorId:"legendPosition",labelText:m.toLanguageString("chartWizard.format.legend.position",X.formatLegendPosition)},t.createElement(g.DropDownList,{id:"legendPosition",data:E,textField:"text",dataItemKey:"value",value:E.find((e=>{var t;return e.value===(null==(t=h.legend)?void 0:t.position)})),onChange:t=>{const a=t.target.value;e.onStateChange(V(h,j.legendPosition,a.value))},disabled:!1===(null==(s=h.legend)?void 0:s.visible),...P})))))))},he=e=>{var a,l,n,o,i;const c=d.useLocalization(),s=e.state,m=s.seriesType,[h,v]=t.useState(!1),p=t.useCallback((e=>{v(!e.expanded)}),[]),C=t.useCallback((t=>{e.onStateChange(V(s,j.categoryAxisTitleText,t.target.value))}),[s]),S=t.useCallback((t=>{const a=t.target.value||T;F(a)&&e.onStateChange(V(s,j.categoryAxisTitleFontSize,a.value))}),[s]),E=t.useCallback((t=>{const a=t.target.value||T;e.onStateChange(V(s,j.categoryAxisTitleFontName,a.value))}),[s]),k=t.useCallback((t=>{e.onStateChange(V(s,j.categoryAxisTitleColor,t.value))}),[s]),L=t.useCallback((t=>{const a=t.target.value||T;F(a)&&e.onStateChange(V(s,j.categoryAxisLabelsFontSize,a.value))}),[s]),A=t.useCallback((t=>{const a=t.target.value||T;e.onStateChange(V(s,j.categoryAxisLabelsFontName,a.value))}),[s]),z=t.useCallback((t=>{e.onStateChange(V(s,j.categoryAxisLabelsColor,t.value))}),[s]),y=t.useCallback((t=>{e.onStateChange(V(s,j.categoryAxisLabelsRotation,t.target.value))}),[s]),I=t.useCallback((t=>{e.onStateChange(V(s,j.categoryAxisReverseOrder,t.value))}),[s]);return t.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:"scatter"===m?c.toLanguageString("chartWizard.format.xAxis.expandText",X.formatXAxis):c.toLanguageString("chartWizard.format.categoryAxis.expandText",X.formatCategoryAxis),expanded:h,tabIndex:0,onAction:p},t.createElement(x.Reveal,null,h&&t.createElement(r.ExpansionPanelContent,null,t.createElement(u.FormElement,{onKeyDown:b},t.createElement(J,{legend:c.toLanguageString("chartWizard.format.categoryAxis.title.expandText",X.formatCategoryAxisTitle)},t.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},t.createElement(se,{className:"k-col-span-2"},t.createElement(f.Input,{placeholder:c.toLanguageString("chartWizard.format.categoryAxis.title.placeholder",X.formatCategoryAxisTitlePlaceholder),value:(null==(a=s.categoryAxis[0].title)?void 0:a.text)||"",onChange:C})),t.createElement(se,{className:"k-col-span-2",editorId:"categoryAxisTitleFont",labelText:c.toLanguageString("chartWizard.format.categoryAxis.title.font",X.formatCategoryAxisTitleFont)},t.createElement(g.ComboBox,{id:"categoryAxisTitleFont",data:K,textField:"text",dataItemKey:"value",itemRender:W,placeholder:c.toLanguageString("chartWizard.format.categoryAxis.title.fontPlaceholder",X.formatCategoryAxisTitleFontPlaceholder),value:K.find((e=>{var t,a;return e.value===(null==(a=G((null==(t=s.categoryAxis[0].title)?void 0:t.font)||""))?void 0:a.name)}))||T,onChange:E,...P})),t.createElement(se,{editorId:"categoryAxisTitleFontSize",labelText:c.toLanguageString("chartWizard.format.categoryAxis.title.size",X.formatCategoryAxisTitleSize)},t.createElement(g.ComboBox,{id:"categoryAxisTitleFontSize",data:D,textField:"text",dataItemKey:"value",placeholder:c.toLanguageString("chartWizard.format.categoryAxis.title.sizePlaceholder",X.formatCategoryAxisTitleSizePlaceholder),value:D.find((e=>{var t,a;return e.value===(null==(a=G((null==(t=s.categoryAxis[0].title)?void 0:t.font)||""))?void 0:a.size)}))||T,onChange:S,allowCustom:!0,...P})),t.createElement(se,{editorId:"categoryAxisTitleColor",labelText:c.toLanguageString("chartWizard.format.categoryAxis.title.color",X.formatCategoryAxisTitleColor)},t.createElement(f.ColorPicker,{id:"categoryAxisTitleColor",view:"gradient",value:(null==(l=s.categoryAxis[0].title)?void 0:l.color)||"",onChange:k,fillMode:"outline"})))),t.createElement(J,{legend:c.toLanguageString("chartWizard.format.categoryAxis.labels.text",X.formatCategoryAxisLabels)},t.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},t.createElement(se,{className:"k-col-span-2",editorId:"categoryAxisLabelsFont",labelText:c.toLanguageString("chartWizard.format.categoryAxis.labels.font",X.formatCategoryAxisLabelsFont)},t.createElement(g.ComboBox,{id:"categoryAxisLabelsFont",data:K,textField:"text",dataItemKey:"value",placeholder:c.toLanguageString("chartWizard.format.categoryAxis.labels.fontPlaceholder",X.formatCategoryAxisLabelsFontPlaceholder),value:K.find((e=>{var t,a;return e.value===(null==(a=G((null==(t=s.categoryAxis[0].labels)?void 0:t.font)||""))?void 0:a.name)}))||T,onChange:A,itemRender:W,...P})),t.createElement(se,{editorId:"categoryAxisLabelsFontSize",labelText:c.toLanguageString("chartWizard.format.categoryAxis.labels.size",X.formatCategoryAxisLabelsSize)},t.createElement(g.ComboBox,{id:"categoryAxisLabelsFontSize",data:D,textField:"text",dataItemKey:"value",placeholder:c.toLanguageString("chartWizard.format.categoryAxis.labels.sizePlaceholder",X.formatCategoryAxisLabelsSizePlaceholder),value:D.find((e=>{var t,a;return e.value===(null==(a=G((null==(t=s.categoryAxis[0].labels)?void 0:t.font)||""))?void 0:a.size)}))||T,onChange:L,allowCustom:!0,...P})),t.createElement(se,{editorId:"categoryAxisLabelsColor",labelText:c.toLanguageString("chartWizard.format.categoryAxis.labels.color",X.formatCategoryAxisLabelsColor)},t.createElement(f.ColorPicker,{id:"categoryAxisLabelsColor",view:"gradient",value:(null==(n=s.categoryAxis[0].labels)?void 0:n.color)||"",onChange:z,fillMode:"outline"})),t.createElement(se,{editorId:"categoryAxisLabelsRotation",labelText:c.toLanguageString("chartWizard.format.categoryAxis.labels.rotation.text",X.formatCategoryAxisLabelsRotation)},t.createElement(f.NumericTextBox,{id:"categoryAxisLabelsRotation",value:"number"==typeof(null==(o=s.categoryAxis[0].labels)?void 0:o.rotation)?null==(i=s.categoryAxis[0].labels)?void 0:i.rotation:null,placeholder:c.toLanguageString("chartWizard.format.categoryAxis.labels.rotation.auto",X.formatCategoryAxisLabelsRotationAuto),onChange:y,fillMode:"outline",min:-360,max:360,step:1})),t.createElement(se,{className:"k-col-span-2"},t.createElement(f.Checkbox,{label:c.toLanguageString("chartWizard.format.categoryAxis.labels.reverseOrder",X.formatCategoryAxisLabelsReverseOrder),checked:s.categoryAxis[0].reverse||!1,onChange:I}))))))))},xe=e=>{var a,l,n,o,i,c,s,m,h,v;const p=d.useLocalization(),C=e.state,S=C.seriesType,E={text:p.toLanguageString("chartWizard.format.valueAxis.labelFormat.text",X.formatValueAxisLabelsFormatText),value:""},k=[{value:"n0",text:p.toLanguageString("chartWizard.format.valueAxis.labelFormat.number",X.formatValueAxisLabelsFormatNumber)},{value:"c0",text:p.toLanguageString("chartWizard.format.valueAxis.labelFormat.currency",X.formatValueAxisLabelsFormatCurrency)},{value:"p0",text:p.toLanguageString("chartWizard.format.valueAxis.labelFormat.percent",X.formatValueAxisLabelsFormatPercent)}],[L,A]=t.useState(!1),z=t.useCallback((e=>{A(!e.expanded)}),[]);return t.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:"scatter"===S?p.toLanguageString("chartWizard.format.yAxis.expandText",X.formatYAxis):p.toLanguageString("chartWizard.format.valueAxis.expandText",X.formatValueAxis),expanded:L,tabIndex:0,onAction:z},t.createElement(x.Reveal,null,L&&t.createElement(r.ExpansionPanelContent,null,t.createElement(u.FormElement,{onKeyDown:b},t.createElement(J,{legend:p.toLanguageString("chartWizard.format.valueAxis.title.text",X.formatValueAxisTitle)},t.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},t.createElement(se,{className:"k-col-span-2"},t.createElement(f.Input,{placeholder:p.toLanguageString("chartWizard.format.valueAxis.title.placeholder",X.formatValueAxisTitlePlaceholder),value:(null==(l=null==(a=C.valueAxis[0])?void 0:a.title)?void 0:l.text)||"",onChange:t=>{e.onStateChange(V(C,j.valueAxisTitleText,t.target.value))}})),t.createElement(se,{className:"k-col-span-2",editorId:"valueAxisTitleFont",labelText:p.toLanguageString("chartWizard.format.valueAxis.title.font",X.formatValueAxisTitleFont)},t.createElement(g.ComboBox,{id:"valueAxisTitleFont",data:K,textField:"text",dataItemKey:"value",itemRender:W,placeholder:p.toLanguageString("chartWizard.format.valueAxis.title.fontPlaceholder",X.formatValueAxisTitleFontPlaceholder),value:K.find((e=>{var t,a,r;return e.value===(null==(r=G((null==(a=null==(t=C.valueAxis[0])?void 0:t.title)?void 0:a.font)||""))?void 0:r.name)}))||T,onChange:t=>{const a=t.target.value||T;e.onStateChange(V(C,j.valueAxisTitleFontName,a.value))},...P})),t.createElement(se,{editorId:"valueAxisTitleFontSize",labelText:p.toLanguageString("chartWizard.format.valueAxis.title.size",X.formatValueAxisTitleSize)},t.createElement(g.ComboBox,{id:"valueAxisTitleFontSize",data:D,textField:"text",dataItemKey:"value",placeholder:p.toLanguageString("chartWizard.format.valueAxis.title.sizePlaceholder",X.formatValueAxisTitleSizePlaceholder),value:D.find((e=>{var t,a,r;return e.value===(null==(r=G((null==(a=null==(t=C.valueAxis[0])?void 0:t.title)?void 0:a.font)||""))?void 0:r.size)}))||T,onChange:t=>{const a=t.target.value||T;F(a)&&e.onStateChange(V(C,j.valueAxisTitleFontSize,a.value))},allowCustom:!0,...P})),t.createElement(se,{editorId:"valueAxisTitleColor",labelText:p.toLanguageString("chartWizard.format.valueAxis.title.color",X.formatValueAxisTitleColor)},t.createElement(f.ColorPicker,{id:"valueAxisTitleColor",view:"gradient",value:(null==(o=null==(n=C.valueAxis[0])?void 0:n.title)?void 0:o.color)||"",onChange:t=>{e.onStateChange(V(C,j.valueAxisTitleColor,t.value))},fillMode:"outline"})))),t.createElement(J,{legend:p.toLanguageString("chartWizard.format.valueAxis.labels.text",X.formatValueAxisLabels)},t.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},t.createElement(se,{className:"k-col-span-2",editorId:"valueAxisLabelsFormat",labelText:p.toLanguageString("chartWizard.format.valueAxis.labelFormat",X.formatValueAxisLabelsFormat)},t.createElement(g.DropDownList,{id:"valueAxisLabelsFormat",data:k,textField:"text",dataItemKey:"value",defaultItem:E,value:k.find((e=>{var t,a;return e.value===(null==(a=null==(t=C.valueAxis[0])?void 0:t.labels)?void 0:a.format)}))||E,onChange:t=>{const a=t.target.value;e.onStateChange(V(C,j.valueAxisLabelsFormat,a.value))},...P})),t.createElement(se,{className:"k-col-span-2",editorId:"valueAxisLabelsFont",labelText:p.toLanguageString("chartWizard.format.valueAxis.labels.font",X.formatValueAxisLabelsFont)},t.createElement(g.ComboBox,{id:"valueAxisLabelsFont",data:K,textField:"text",dataItemKey:"value",placeholder:p.toLanguageString("chartWizard.format.valueAxis.labels.fontPlaceholder",X.formatValueAxisLabelsFontPlaceholder),value:K.find((e=>{var t,a,r;return e.value===(null==(r=G((null==(a=null==(t=C.valueAxis[0])?void 0:t.labels)?void 0:a.font)||""))?void 0:r.name)}))||T,onChange:t=>{const a=t.target.value||T;e.onStateChange(V(C,j.valueAxisLabelsFontName,a.value))},itemRender:W,...P})),t.createElement(se,{editorId:"valueAxisLabelsFontSize",labelText:p.toLanguageString("chartWizard.format.valueAxis.labels.size",X.formatValueAxisLabelsSize)},t.createElement(g.ComboBox,{id:"valueAxisLabelsFontSize",data:D,textField:"text",dataItemKey:"value",placeholder:p.toLanguageString("chartWizard.format.valueAxis.labels.sizePlaceholder",X.formatValueAxisLabelsSizePlaceholder),value:D.find((e=>{var t,a,r;return e.value===(null==(r=G((null==(a=null==(t=C.valueAxis[0])?void 0:t.labels)?void 0:a.font)||""))?void 0:r.size)}))||T,onChange:t=>{const a=t.target.value||T;F(a)&&e.onStateChange(V(C,j.valueAxisLabelsFontSize,a.value))},allowCustom:!0,...P})),t.createElement(se,{editorId:"valueAxisLabelsColor",labelText:p.toLanguageString("chartWizard.format.valueAxis.labels.color",X.formatValueAxisLabelsColor)},t.createElement(f.ColorPicker,{id:"valueAxisLabelsColor",view:"gradient",value:(null==(c=null==(i=C.valueAxis[0])?void 0:i.labels)?void 0:c.color)||"",onChange:t=>{e.onStateChange(V(C,j.valueAxisLabelsColor,t.value))},fillMode:"outline"})),t.createElement(se,{editorId:"valueAxisLabelsRotation",labelText:p.toLanguageString("chartWizard.format.valueAxis.labels.rotation.text",X.formatValueAxisLabelsRotation)},t.createElement(f.NumericTextBox,{id:"valueAxisLabelsRotation",value:"number"==typeof(null==(m=null==(s=C.valueAxis[0])?void 0:s.labels)?void 0:m.rotation)?null==(v=null==(h=C.valueAxis[0])?void 0:h.labels)?void 0:v.rotation:null,placeholder:p.toLanguageString("chartWizard.format.valueAxis.labels.rotation.auto",X.formatValueAxisLabelsRotationAuto),onChange:t=>{e.onStateChange(V(C,j.valueAxisLabelsRotation,t.target.value))},fillMode:"outline",min:-360,max:360,step:1}))))))))},ve=e=>t.createElement("div",{className:"k-chart-types-wrapper",onKeyDown:b},e.children),fe=e=>{const a=t.useCallback((t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),e.onClick.call(void 0))}),[e.onClick]);return t.createElement("div",{className:h.classNames("k-icon-text-wrapper",{"k-selected":e.selected}),onClick:e.onClick},t.createElement("div",{className:"k-icon-background-area",tabIndex:0,onKeyDown:a},t.createElement(h.IconWrap,{name:e.iconName,icon:e.icon,size:"xlarge",className:"k-svg-i-chart-bar-clustered"})),e.children)},pe=e=>{const t=d.useLocalization(),a=e.state,l=a.seriesType,{isStackFalse:o,isStackNormal:i,isStack100:c}=R(a),[s,u]=C.useState(!0),g=C.useCallback((e=>{u(!e.expanded)}),[]);return C.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:t.toLanguageString("chartWizard.chart.barChart.expandText",X.barChart),expanded:s,tabIndex:0,onAction:g},C.createElement(x.Reveal,null,s&&C.createElement(r.ExpansionPanelContent,null,C.createElement(ve,null,C.createElement(fe,{selected:"bar"===l&&o,onClick:()=>{e.onStateChange(q(a,M(a.data,"bar")))},icon:n.chartBarClusteredIcon,iconName:"chart-bar-clustered"},t.toLanguageString("chartWizard.chart.barChart.bar",X.barChartBar)),C.createElement(fe,{selected:"bar"===l&&i,onClick:()=>{const t=q(a,M(a.data,"bar"));e.onStateChange(V(t,j.stacked,N))},icon:n.chartBarStackedIcon,iconName:"chart-bar-stacked"},t.toLanguageString("chartWizard.chart.barChart.stackedBar",X.barChartStackedBar)),C.createElement(fe,{selected:"bar"===l&&c,onClick:()=>{const t=q(a,M(a.data,"bar"));e.onStateChange(V(t,j.stacked,w))},icon:n.chartBarStacked100Icon,iconName:"chart-bar-stacked100"},t.toLanguageString("chartWizard.chart.barChart.100%stackedBar",X.barChart100StackedBar))))))},Ce=e=>{const t=d.useLocalization(),a=e.state,l=a.seriesType,{isStackFalse:o,isStackNormal:i,isStack100:c}=R(a),[s,u]=C.useState(!0),g=C.useCallback((e=>{u(!e.expanded)}),[]);return C.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:t.toLanguageString("chartWizard.chart.columnChart.expandText",X.columnChart),expanded:s,tabIndex:0,onAction:g},C.createElement(x.Reveal,null,s&&C.createElement(r.ExpansionPanelContent,null,C.createElement(ve,null,C.createElement(fe,{selected:"column"===l&&o,onClick:()=>{e.onStateChange(q(a,M(a.data,"column")))},icon:n.chartColumnClusteredIcon,iconName:"chart-column-clustered"},t.toLanguageString("chartWizard.chart.columnChart.column",X.columnChartColumn)),C.createElement(fe,{selected:"column"===l&&i,onClick:()=>{const t=q(a,M(a.data,"column"));e.onStateChange(V(t,j.stacked,N))},icon:n.chartColumnStackedIcon,iconName:"chart-column-stacked"},t.toLanguageString("chartWizard.chart.columnChart.stackedColumn",X.columnChartStackedColumn)),C.createElement(fe,{selected:"column"===l&&c,onClick:()=>{const t=q(a,M(a.data,"column"));e.onStateChange(V(t,j.stacked,w))},icon:n.chartColumnStacked100Icon,iconName:"chart-column-stacked100"},t.toLanguageString("chartWizard.chart.columnChart.100%stackedColumn",X.columnChart100StackedColumn))))))},be=e=>{const t=d.useLocalization(),a=e.state,l=a.seriesType,{isStackFalse:o,isStackNormal:i,isStack100:c}=R(a),[s,u]=C.useState(!0),g=C.useCallback((e=>{u(!e.expanded)}),[]);return C.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:t.toLanguageString("chartWizard.chart.lineChart.expandText",X.lineChart),expanded:s,tabIndex:0,onAction:g},C.createElement(x.Reveal,null,s&&C.createElement(r.ExpansionPanelContent,null,C.createElement(ve,null,C.createElement(fe,{selected:"line"===l&&o,onClick:()=>{e.onStateChange(q(a,M(a.data,"line")))},icon:n.chartLineIcon,iconName:"chart-line"},t.toLanguageString("chartWizard.chart.lineChart.line",X.lineChartLine)),C.createElement(fe,{selected:"line"===l&&i,onClick:()=>{const t=q(a,M(a.data,"line"));e.onStateChange(V(t,j.stacked,N))},icon:n.chartLineStackedIcon,iconName:"chart-line-stacked"},t.toLanguageString("chartWizard.chart.lineChart.stackedLine",X.lineChartStackedLine)),C.createElement(fe,{selected:"line"===l&&c,onClick:()=>{const t=q(a,M(a.data,"line"));e.onStateChange(V(t,j.stacked,w))},icon:n.chartLineStacked100Icon,iconName:"chart-line-stacked100"},t.toLanguageString("chartWizard.chart.lineChart.100%stackedLine",X.lineChart100StackedLine))))))},Se=e=>{const t=d.useLocalization(),a=e.state,l=a.seriesType,[o,i]=C.useState(!0),c=C.useCallback((e=>{i(!e.expanded)}),[]);return C.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:t.toLanguageString("chartWizard.chart.scatterChart.expandText",X.scatterChart),expanded:o,tabIndex:0,onAction:c},C.createElement(x.Reveal,null,o&&C.createElement(r.ExpansionPanelContent,null,C.createElement(ve,null,C.createElement(fe,{selected:"scatter"===l,onClick:()=>{e.onStateChange(q(a,M(a.data,"scatter")))},icon:n.chartScatterIcon,iconName:"chart-scatter"},t.toLanguageString("chartWizard.chart.scatterChart.scatter",X.scatterChartScatter))))))},Ee=e=>{const t=d.useLocalization(),a=e.state,l=a.seriesType,[o,i]=C.useState(!0),c=C.useCallback((e=>{i(!e.expanded)}),[]);return C.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:t.toLanguageString("chartWizard.chart.pieChart.expandText",X.pieChart),expanded:o,tabIndex:0,onAction:c},C.createElement(x.Reveal,null,o&&C.createElement(r.ExpansionPanelContent,null,C.createElement(ve,null,C.createElement(fe,{selected:"pie"===l,onClick:()=>{e.onStateChange(q(a,M(a.data,"pie")))},icon:n.chartPieIcon,iconName:"chart-pie"},t.toLanguageString("chartWizard.chart.pieChart.pie",X.pieChartPie))))))},ke=t.forwardRef(((e,a)=>{var r,l,n,o,c,s,d,u,g,m,h,x,v;const f=e.state;return t.createElement(i.Chart,{style:{width:"100%",height:"100%"},transitions:!1,ref:a},t.createElement(i.ChartTitle,{text:null==(r=f.title)?void 0:r.text,font:null==(l=f.title)?void 0:l.font,color:(null==(n=f.title)?void 0:n.color)||"#000"}),t.createElement(i.ChartSubtitle,{text:null==(o=f.subtitle)?void 0:o.text,font:null==(c=f.subtitle)?void 0:c.font,color:(null==(s=f.subtitle)?void 0:s.color)||"#000"}),t.createElement(i.ChartArea,{background:null==(d=f.area)?void 0:d.background,margin:f.area.margin}),f.categoryAxis&&t.createElement(i.ChartCategoryAxis,null,f.categoryAxis.map(((e,a)=>t.createElement(i.ChartCategoryAxisItem,{key:a,categories:e.categories,title:e.title&&{text:e.title.text,font:e.title.font,color:e.title.color},labels:e.labels&&{font:e.labels.font,color:e.labels.color,rotation:e.labels.rotation},reverse:e.reverse})))),f.valueAxis&&t.createElement(i.ChartValueAxis,null,f.valueAxis.map(((e,a)=>t.createElement(i.ChartValueAxisItem,{key:a,title:e.title&&{text:e.title.text,font:e.title.font,color:e.title.color},labels:e.labels&&{format:e.labels.format,font:e.labels.font,color:e.labels.color,rotation:e.labels.rotation}})))),t.createElement(i.ChartSeries,null,f.series.map(((e,a)=>t.createElement(i.ChartSeriesItem,{key:String(e.name)+a,...e})))),t.createElement(i.ChartLegend,{visible:null==(u=f.legend)?void 0:u.visible,position:null==(g=f.legend)?void 0:g.position,labels:{color:(null==(h=null==(m=f.legend)?void 0:m.labels)?void 0:h.color)||void 0,font:(null==(v=null==(x=f.legend)?void 0:x.labels)?void 0:v.font)||void 0}}))}));ke.displayName="ChartComponent";const Le=C.forwardRef(((e,t)=>{const o=d.useLocalization(),i=C.useRef(null),c=C.useRef(null),s=C.useCallback((t=>{var a;if(c.current){const r=new $(c.current,L(e.exportOptions));null==(a=e.onExport)||a.call(void 0,r),r.isDefaultPrevented()||t.item.exportHandler.call(void 0,r)}}),[e.onExport,e.exportOptions]),u=e.window||a.Window,[g,m]=C.useState({width:700,height:550}),[h,x]=C.useState("DEFAULT"),v=C.useCallback((e=>{m({width:e.width,height:e.height})}),[]),f=C.useCallback((e=>{x(e.state)}),[]),[p,b]=C.useState([{collapsible:!1},{size:"300px",collapsible:!1}]),S=C.useCallback((e=>{b(e.newState)}),[]),[E,k]=C.useState(0),T=C.useCallback((e=>{k(e.selected)}),[]),[W,I]=C.useState(B(e.data||[],"bar",e.defaultState)),F=t=>{var a;null==(a=e.onStateChange)||a.call(void 0,t),e.state||I(t)},P=e.state||W,N=C.useRef(P);N.current=P;const w=C.useRef(e);w.current=e;const R=C.useCallback((()=>({get chart(){return c.current},get state(){return N.current}})),[]);C.useImperativeHandle(t,R),C.useEffect((()=>{var t;if(N.current.seriesType&&e.data){const a=q(N.current,M(e.data,N.current.seriesType));null==(t=w.current.onStateChange)||t.call(void 0,a),w.current.state||I(a)}}),[e.data]),C.useEffect((()=>{var e,t;null==(t=null==(e=i.current)?void 0:e.element)||t.focus()}),[]);const D=P.seriesType;return C.createElement(u,{title:o.toLanguageString("chartWizard.window.title",X.windowTitle),className:"k-chart-wizard",modal:!0,resizable:!0,minimizeButton:()=>null,onClose:e.onClose,onResize:v,stage:h,onStageChange:f,...g},C.createElement(r.Splitter,{panes:p,onChange:S,className:"k-chart-wizard-splitter"},C.createElement("div",{className:"k-chart-wizard-preview-pane k-pane"},C.createElement("div",{className:"k-preview-pane-header"},C.createElement(l.DropDownButton,{ref:i,text:o.toLanguageString("chartWizard.export.button",X.exportButton),fillMode:"flat",svgIcon:n.exportIcon,icon:"export",onItemClick:s,items:[{svgIcon:n.filePdfIcon,icon:"file-pdf",exportHandler:A,text:o.toLanguageString("chartWizard.exportPDF.button",X.exportPDFButton)},{svgIcon:n.fileIcon,icon:"file",exportHandler:z,text:o.toLanguageString("chartWizard.exportSVG.button",X.exportSVGButton)},{svgIcon:n.fileImageIcon,icon:"file-image",exportHandler:y,text:o.toLanguageString("chartWizard.exportPNG.button",X.exportPNGButton)}]})),C.createElement("div",{className:"k-preview-pane-content",style:{height:"calc(100% - 50px)"}},C.createElement(ke,{ref:c,state:P}))),C.createElement("div",{className:"k-chart-wizard-property-pane k-pane k-pane-static"},C.createElement(r.TabStrip,{selected:E,onSelect:T,animation:!1},C.createElement(r.TabStripTab,{title:o.toLanguageString("chartWizard.tab.chart",X.tabChart)},C.createElement("div",null,C.createElement(pe,{state:P,onStateChange:F}),C.createElement(Ee,{state:P,onStateChange:F}),C.createElement(Ce,{state:P,onStateChange:F}),C.createElement(be,{state:P,onStateChange:F}),C.createElement(Se,{state:P,onStateChange:F}))),C.createElement(r.TabStripTab,{title:o.toLanguageString("chartWizard.tab.data",X.tabData)},C.createElement(ce,{state:P,onStateChange:F})),C.createElement(r.TabStripTab,{title:o.toLanguageString("chartWizard.tab.format",X.tabFormat)},C.createElement("div",null,C.createElement(de,{state:P,onStateChange:F}),C.createElement(ue,{state:P,onStateChange:F}),C.createElement(ge,{state:P,onStateChange:F}),C.createElement(me,{state:P,onStateChange:F}),"pie"!==D&&C.createElement(he,{state:P,onStateChange:F}),"pie"!==D&&C.createElement(xe,{state:P,onStateChange:F})))))))}));function Ae(e){const{grid:t,data:a,selectedState:r,dataItemKey:l}=e;if(!t)return[];const n=m.leafColumns(t.columns||[]),o=h.getter(l),i=h.getter("field"),c=h.getter("title"),s=new Map(a.map((e=>[String(o(e)),e]))),d=new Map(Array.from(s.keys()).map(((e,t)=>[e,t]))),u=Object.keys(r).sort(((e,t)=>(d.get(e)||0)-(d.get(t)||0))),g=[];return u.forEach((e=>{let t=r[e];if(t){!0===t&&(t=Array.from({length:n.length},((e,t)=>t)));const a=t.slice();a.sort(((e,t)=>e-t));const r=a.map((e=>({title:c(n[e]),field:i(n[e])})));g.push({dataItem:s.get(e),dataColumns:r})}})),g}Le.displayName="ChartWizard";const{getWizardDataFromDataRows:ze}=o.ChartWizardCommon;e.ChartWizard=Le,e.createState=M,e.getGridSelectedRows=Ae,e.getWizardDataFromDataRows=H,e.getWizardDataFromGridSelection=e=>ze(Ae(e))}));
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-layout"),require("@progress/kendo-react-buttons"),require("@progress/kendo-svg-icons"),require("@progress/kendo-charts"),require("@progress/kendo-react-charts"),require("@progress/kendo-drawing"),require("@progress/kendo-file-saver"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-form"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-react-grid"),require("@progress/kendo-react-common"),require("@progress/kendo-react-animation"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-inputs")):"function"==typeof define&&define.amd?define(["exports","react","@progress/kendo-react-dialogs","@progress/kendo-react-layout","@progress/kendo-react-buttons","@progress/kendo-svg-icons","@progress/kendo-charts","@progress/kendo-react-charts","@progress/kendo-drawing","@progress/kendo-file-saver","@progress/kendo-react-intl","@progress/kendo-react-form","@progress/kendo-react-dropdowns","@progress/kendo-react-grid","@progress/kendo-react-common","@progress/kendo-react-animation","@progress/kendo-react-labels","@progress/kendo-react-inputs"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactChartWizard={},e.React,e.KendoReactDialogs,e.KendoReactLayout,e.KendoReactButtons,e.KendoSvgIcons,e.KendoCharts,e.KendoReactCharts,e.KendoDrawing,e.KendoFileSaver,e.KendoReactIntl,e.KendoReactForm,e.KendoReactDropdowns,e.KendoReactGrid,e.KendoReactCommon,e.KendoReactAnimation,e.KendoReactLabels,e.KendoReactInputs)}(this,function(e,t,a,r,l,n,o,i,c,s,d,u,g,m,h,x,v,f){"use strict";function p(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(a){if("default"!==a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}}),t.default=e,Object.freeze(t)}var C=p(t);const b=e=>{e.stopPropagation()},S="chart",E={paperSize:"A4",margin:"1cm"},k={width:800,height:600},L=(e={})=>({fileName:e.fileName||S,pdf:{...E,...e.pdf},image:{...k,...e.image}}),A=e=>{const t=i.exportVisual(e.chart),a=e.exportOptions;t&&c.exportPDF(t,a.pdf).then(e=>s.saveAs(e,a.fileName+".pdf"))},z=e=>{const t=i.exportVisual(e.chart),a=e.exportOptions;t&&c.exportSVG(t).then(e=>s.saveAs(e,a.fileName+".svg"))},y=e=>{const t=e.exportOptions,a=i.exportVisual(e.chart,t.image);a&&c.exportImage(a,t.image).then(e=>s.saveAs(e,t.fileName+".png"))},T={value:null,text:""},W=(e,t)=>t.dataItem.style?C.cloneElement(e,e.props,C.createElement("span",{style:t.dataItem.style},e.props.children)):e,I=/^\d+$/,F=e=>{if(""===e.text)return!0;if(void 0===e.value){if(!I.test(e.text))return!1;e.value=e.text+"px"}return D.find(t=>t.value===e.value)||(D.push(e),D.sort((e,t)=>parseInt(e.text,10)-parseInt(t.text,10))),!0},P={fillMode:"outline",popupSettings:{animate:!1}},N={type:"normal"},w={type:"100%"},R=e=>{var t,a;const r="object"==typeof(null==(t=e.series[0])?void 0:t.stack)&&(null==(a=e.series[0])?void 0:a.stack);return{isStackFalse:!1===r,isStackNormal:r&&"normal"===r.type,isStack100:r&&"100%"===r.type}},D=o.ChartWizardCommon.fontSizes,K=o.ChartWizardCommon.fontNames,B=o.ChartWizardCommon.createInitialState,M=(e,t)=>o.ChartWizardCommon.createState(e,t),V=o.ChartWizardCommon.updateState,q=o.ChartWizardCommon.mergeStates,O=o.ChartWizardCommon.isCategorical,G=o.ChartWizardCommon.parseFont,j=o.ChartWizardCommon.ActionTypes,{getWizardDataFromDataRows:H}=o.ChartWizardCommon,X=o.ChartWizardCommon.messages,Y="chartWizard.format.chartArea.margins.auto";class U{constructor(){this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}}class $ extends U{constructor(e,t){super(),this.chart=e,this.exportOptions=t}}const J=e=>t.createElement("fieldset",{className:"k-form-fieldset"},e.legend&&t.createElement("legend",{className:"k-form-legend"},e.legend),e.children),Q=C.createContext({onRemove:e=>{},count:0}),Z=e=>{const{onRemove:t,count:a}=C.useContext(Q);return C.createElement("td",{...e.tdProps},C.createElement(l.Button,{type:"button",onClick:()=>{t.call(void 0,e.dataItem.id)},icon:"trash",svgIcon:n.trashIcon,fillMode:"flat",disabled:a<2}))},_=C.createContext({reorder:()=>{},dragStart:()=>{}}),ee=e=>{const t=C.useContext(_);return C.createElement("td",{...e.tdProps,onDragOver:a=>{t.reorder.call(void 0,e.dataItem),a.preventDefault(),a.dataTransfer.dropEffect="copy"}},C.createElement("span",{draggable:!0,style:{cursor:"move"},onDragStart:a=>{t.dragStart.call(void 0,e.dataItem),a.dataTransfer.setData("dragging","")}},C.createElement(h.IconWrap,{icon:n.reorderIcon,name:"reorder"})))},te=C.createContext({enterEdit:(e,t)=>{},exitEdit:(e,t)=>{}}),ae=e=>{const{enterEdit:t}=C.useContext(te);return C.createElement("td",{...e.tdProps,onClick:()=>{t(e.dataItem,e.field)}},e.children)},re=e=>"delete"===e.field?C.createElement(Z,{...e}):"reorder"===e.field?C.createElement(ee,{...e}):"name"===e.field?C.createElement(ae,{...e}):null,le=e=>{const t=C.useRef(null),{exitEdit:a}=C.useContext(te);return C.useEffect(()=>{var e;const a=null==(e=t.current)?void 0:e.querySelector("input");null==a||a.focus()},[]),C.createElement("td",{...e.tdProps,ref:t,onBlur:()=>{a(e.dataItem,e.field)},onKeyDown:t=>{"Enter"===t.key||"Escape"===t.key?(t.stopPropagation(),a(e.dataItem,e.field)):" "===t.key&&t.stopPropagation()}},e.children)},ne=()=>null,{messages:oe}=o.ChartWizardCommon,ie=e=>{const[a,r]=t.useState({}),[o,i]=t.useState(null);return t.createElement(Q.Provider,{value:{onRemove:t=>{const a=e.data.filter(e=>e.id!==t);e.onChange.call(void 0,a)},count:e.data.length}},t.createElement(_.Provider,{value:{reorder:t=>{if(o===t)return;const a=e.data.slice(),r=a.findIndex(e=>e===o),l=a.findIndex(e=>e===t);a.splice(r,1),a.splice(l,0,o||a[0]),e.onChange.call(void 0,a)},dragStart:e=>{i(e)}}},t.createElement(te.Provider,{value:{enterEdit:e=>{r(t=>({...t,[e.id]:!0}))},exitEdit:e=>{r(t=>Object.keys(t).reduce((a,r)=>{if(r===e.id){const e={...t};return delete e[r],e}return a},{}))}}},t.createElement(m.Grid,{className:"k-series-grid",style:{width:"100%"},size:"medium",data:e.data,dataItemKey:"id",onItemChange:t=>{const a=t.field||"",r=e.data.map(e=>e.id===t.dataItem.id?{...e,[a]:t.value}:e);e.onChange.call(void 0,r)},scrollable:"none",editable:!0,cells:{headerCell:ne,data:re,edit:{text:le,boolean:le,numeric:le,date:le}},edit:a,onEditChange:e=>{r(e.edit)}},t.createElement(m.GridToolbar,null,t.createElement(l.Button,{type:"button",className:"k-toolbar-button",fillMode:"flat",onClick:()=>{const t=e.initialData.find(t=>!e.data.find(e=>e.id===t.id));t&&e.onChange.call(void 0,[...e.data,t])},disabled:e.data.length===e.initialData.length,svgIcon:n.plusIcon,icon:"plus"},d.useLocalization().toLanguageString("chartWizard.data.configuration.series.add",oe.configurationSeriesAdd))),t.createElement(m.GridColumn,{field:"reorder",width:"40px",editable:!1}),t.createElement(m.GridColumn,{field:"name",title:"Name"}),t.createElement(m.GridColumn,{field:"delete",width:"40px",editable:!1})))))},ce=e=>{const a=d.useLocalization(),l=e.state,n=l.seriesType,[o,i]=t.useState(!0),c=t.useCallback(e=>{i(!e.expanded)},[]),s=t.useCallback(t=>{e.onStateChange(V(l,j.categoryAxisX,t.target.value))},[l]),m=t.useCallback(t=>{e.onStateChange(V(l,j.seriesChange,t))},[l]),h=t.useCallback(t=>{e.onStateChange(V(l,j.valueAxisY,t.target.value))},[l]);return t.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:a.toLanguageString("chartWizard.data.configuration.expandText",X.configuration),expanded:o,tabIndex:0,onAction:c},t.createElement(x.Reveal,null,o&&t.createElement(r.ExpansionPanelContent,null,t.createElement(u.FormElement,{onKeyDown:b},t.createElement(J,{legend:"scatter"===n?a.toLanguageString("chartWizard.data.configuration.xAxis",X.configurationXAxis):a.toLanguageString("chartWizard.data.configuration.categoryAxis",X.configurationCategoryAxis)},t.createElement(g.DropDownList,{data:l.columns||[],value:l.categoryField,onChange:s,...P})),O(n)&&t.createElement(J,{legend:a.toLanguageString("chartWizard.data.configuration.series.title",X.configurationSeries)},t.createElement(ie,{data:l.series,initialData:l.initialSeries,onChange:m})),"pie"===n&&t.createElement(J,{legend:a.toLanguageString("chartWizard.data.configuration.valueAxis",X.configurationValueAxis)},t.createElement(g.DropDownList,{data:l.columns||[],value:l.valueField||"",...P,onChange:h}))))))},se=e=>t.createElement(u.FieldWrapper,{className:e.className},e.labelText&&e.editorId&&t.createElement(v.Label,{className:"k-form-label",editorId:e.editorId},e.labelText),t.createElement("div",{className:"k-form-field-wrap",onKeyDown:b},e.children)),de=e=>{var a;const l=d.useLocalization(),n=e.state,[o,i]=t.useState(!1),c=t.useCallback(e=>{i(!e.expanded)},[]),s=t.useCallback(t=>{e.onStateChange(V(n,j.areaMarginLeft,t.target.value))},[n]),g=t.useCallback(t=>{e.onStateChange(V(n,j.areaMarginRight,t.target.value))},[n]),m=t.useCallback(t=>{e.onStateChange(V(n,j.areaMarginTop,t.target.value))},[n]),h=t.useCallback(t=>{e.onStateChange(V(n,j.areaMarginBottom,t.target.value))},[n]),v=n.area.margin,p=t.useCallback(t=>{e.onStateChange(V(n,j.areaBackground,t.value))},[n]);return t.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:l.toLanguageString("chartWizard.format.chartArea.expandText",X.formatChartArea),expanded:o,tabIndex:0,onAction:c},t.createElement(x.Reveal,null,o&&t.createElement(r.ExpansionPanelContent,null,t.createElement(u.FormElement,{onKeyDown:b},t.createElement(J,{legend:l.toLanguageString("chartWizard.format.chartArea.margins",X.formatChartAreaMargins)},t.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},t.createElement(se,{labelText:l.toLanguageString("chartWizard.format.chartArea.margins.left",X.formatChartAreaMarginsLeft),editorId:"left"},t.createElement(f.NumericTextBox,{id:"left",value:void 0!==v.left?v.left:null,onChange:s,placeholder:l.toLanguageString(Y,X.formatChartAreaMarginsAuto),min:0,max:1e3,step:1,fillMode:"outline"})),t.createElement(se,{labelText:l.toLanguageString("chartWizard.format.chartArea.margins.right",X.formatChartAreaMarginsRight),editorId:"right"},t.createElement(f.NumericTextBox,{id:"right",value:void 0!==v.right?v.right:null,onChange:g,placeholder:l.toLanguageString(Y,X.formatChartAreaMarginsAuto),min:0,max:1e3,step:1,fillMode:"outline"})),t.createElement(se,{labelText:l.toLanguageString("chartWizard.format.chartArea.margins.top",X.formatChartAreaMarginsTop),editorId:"top"},t.createElement(f.NumericTextBox,{id:"top",value:void 0!==v.top?v.top:null,onChange:m,placeholder:l.toLanguageString(Y,X.formatChartAreaMarginsAuto),min:0,max:1e3,step:1,fillMode:"outline"})),t.createElement(se,{labelText:l.toLanguageString("chartWizard.format.chartArea.margins.bottom",X.formatChartAreaMarginsBottom),editorId:"bottom"},t.createElement(f.NumericTextBox,{id:"bottom",value:void 0!==v.bottom?v.bottom:null,onChange:h,placeholder:l.toLanguageString(Y,X.formatChartAreaMarginsAuto),min:0,max:1e3,step:1,fillMode:"outline"})))),t.createElement(J,{legend:l.toLanguageString("chartWizard.format.chartArea.background",X.formatChartAreaBackground)},t.createElement(se,{labelText:l.toLanguageString("chartWizard.format.chartArea.background.color",X.formatChartAreaBackgroundColor),editorId:"background"},t.createElement(f.ColorPicker,{id:"background",value:(null==(a=n.area)?void 0:a.background)||"",onChange:p,view:"gradient",fillMode:"outline"})))))))},ue=e=>{const t=d.useLocalization(),a=e.state,[l,n]=C.useState(!1),o=C.useCallback(e=>{n(!e.expanded)},[]),i=[{value:"chartTitle",text:t.toLanguageString("chartWizard.format.title.chartTitle",X.formatTitleChartTitle)},{value:"chartSubtitle",text:t.toLanguageString("chartWizard.format.title.chartSubtitle",X.formatTitleChartSubtitle)}],[c,s]=C.useState(i[0]),m=C.useCallback(e=>{s(e.target.value)},[]),h=(c.value===i[0].value?a.title:a.subtitle)||{text:"",font:"",color:""};return C.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:t.toLanguageString("chartWizard.format.title.expandText",X.formatTitle),expanded:l,tabIndex:0,onAction:o},C.createElement(x.Reveal,null,l&&C.createElement(r.ExpansionPanelContent,null,C.createElement(u.FormElement,{onKeyDown:b},C.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},C.createElement(se,{className:"k-col-span-2",editorId:"apply-to-title",labelText:t.toLanguageString("chartWizard.format.title.applyTo",X.formatTitleApplyTo)},C.createElement(g.DropDownList,{id:"apply-to-title",data:i,textField:"text",dataItemKey:"value",value:i.find(e=>e.value===c.value),onChange:m,...P})),C.createElement(se,{className:"k-col-span-2",editorId:"titleText",labelText:t.toLanguageString("chartWizard.format.title.label",X.formatTitleLabel)},C.createElement(f.Input,{id:"titleText",placeholder:c.value===i[0].value?i[0].text:i[1].text,value:h.text,onChange:t=>{const r=c.value===i[0].value?j.titleText:j.subtitleText;e.onStateChange(V(a,r,t.target.value))}})),C.createElement(se,{className:"k-col-span-2",editorId:"titleFont",labelText:t.toLanguageString("chartWizard.format.title.font",X.formatTitleFont)},C.createElement(g.ComboBox,{id:"titleFont",data:K,textField:"text",dataItemKey:"value",placeholder:t.toLanguageString("chartWizard.format.title.fontPlaceholder",X.formatTitleFontPlaceholder),value:K.find(e=>e.value===G(h.font).name)||T,onChange:t=>{const r=c.value===i[0].value?j.titleFontName:j.subtitleFontName,l=t.target.value||T;e.onStateChange(V(a,r,l.value))},itemRender:W,...P})),C.createElement(se,{editorId:"titleFontSize",labelText:t.toLanguageString("chartWizard.format.title.size",X.formatTitleSize)},C.createElement(g.ComboBox,{id:"titleFontSize",data:D,textField:"text",dataItemKey:"value",placeholder:t.toLanguageString("chartWizard.format.title.sizePlaceholder",X.formatTitleSizePlaceholder),value:D.find(e=>e.value===G(h.font).size)||T,onChange:t=>{const r=c.value===i[0].value?j.titleFontSize:j.subtitleFontSize,l=t.target.value||T;F(l)&&e.onStateChange(V(a,r,l.value))},itemRender:W,allowCustom:!0,...P})),C.createElement(se,{editorId:"titleColor",labelText:t.toLanguageString("chartWizard.format.title.color",X.formatTitleColor)},C.createElement(f.ColorPicker,{id:"titleColor",value:h.color||"",onChange:t=>{const r=c.value===i[0].value?j.titleColor:j.subtitleColor;e.onStateChange(V(a,r,t.value))},view:"gradient",fillMode:"outline"})))))))},ge=e=>{var a,l,n,o,i;const[c,s]=t.useState(""),m=d.useLocalization(),h=e.state,v=h.seriesType,p="object"==typeof(null==(a=h.series[0])?void 0:a.stack)&&(null==(l=h.series[0])?void 0:l.stack.type),[C,S]=t.useState(!1),E=t.useCallback(e=>{S(!e.expanded)},[]),k={name:m.toLanguageString("chartWizard.format.series.allSeries",X.formatSeriesAllSeries)};return t.useEffect(()=>{s("")},[v,p]),t.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:m.toLanguageString("chartWizard.format.series.expandText",X.formatSeries),expanded:C,tabIndex:0,onAction:E},t.createElement(x.Reveal,null,C&&t.createElement(r.ExpansionPanelContent,null,t.createElement(u.FormElement,{onKeyDown:b},t.createElement(se,{editorId:"apply-to-series",labelText:m.toLanguageString("chartWizard.format.series.applyTo",X.formatSeriesApplyTo)},t.createElement(g.DropDownList,{id:"apply-to-series",data:h.series,textField:"name",dataItemKey:"name",defaultItem:k,disabled:!O(v),value:h.series.find(e=>e.name===c)||k,onChange:e=>{const t=e.target.value.name;s(t===k.name?"":t)},...P})),t.createElement(se,{editorId:"seriesColor",labelText:m.toLanguageString("chartWizard.format.series.color",X.formatSeriesColor)},t.createElement(f.ColorPicker,{id:"seriesColor",value:c?null==(n=h.series.find(e=>e.name===c))?void 0:n.color:"",onChange:t=>{c&&e.onStateChange(V(h,j.seriesColor,{seriesName:c,color:t.value}))},disabled:!c,view:"gradient",fillMode:"outline"})),t.createElement(se,null,t.createElement(f.Checkbox,{label:m.toLanguageString("chartWizard.format.series.showLabels",X.formatSeriesShowLabels),checked:c?null==(i=null==(o=h.series.find(e=>e.name===c))?void 0:o.labels)?void 0:i.visible:h.series.every(e=>{var t;return null==(t=e.labels)?void 0:t.visible}),onChange:t=>{e.onStateChange(V(h,j.seriesLabel,{seriesName:c,all:!c,visible:t.value}))}}))))))},me=e=>{var a,l,n,o,i,c,s;const m=d.useLocalization(),h=e.state,[p,C]=t.useState(!1),S=t.useCallback(e=>{C(!e.expanded)},[]),E=[{value:"top",text:m.toLanguageString("chartWizard.format.legend.position.top",X.formatLegendPositionTop)},{value:"bottom",text:m.toLanguageString("chartWizard.format.legend.position.bottom",X.formatLegendPositionBottom)},{value:"left",text:m.toLanguageString("chartWizard.format.legend.position.left",X.formatLegendPositionLeft)},{value:"right",text:m.toLanguageString("chartWizard.format.legend.position.right",X.formatLegendPositionRight)}];return t.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:m.toLanguageString("chartWizard.format.legend.expandText",X.formatLegend),expanded:p,tabIndex:0,onAction:S},t.createElement(x.Reveal,null,p&&t.createElement(r.ExpansionPanelContent,null,t.createElement(u.FormElement,{onKeyDown:b},t.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},t.createElement(v.Label,{editorId:"show-legend"},m.toLanguageString("chartWizard.format.legend.showLegend",X.formatLegendShowLegend)),t.createElement(f.Switch,{id:"show-legend",checked:null==(a=h.legend)?void 0:a.visible,onChange:t=>{e.onStateChange(V(h,j.legendVisible,t.value))}}),t.createElement(se,{className:"k-col-span-2",editorId:"legendLabelsFont",labelText:m.toLanguageString("chartWizard.format.legend.font",X.formatLegendFont)},t.createElement(g.ComboBox,{id:"legendLabelsFont",data:K,textField:"text",dataItemKey:"value",placeholder:m.toLanguageString("chartWizard.format.legend.fontPlaceholder",X.formatLegendFontPlaceholder),value:K.find(e=>{var t,a,r;return e.value===(null==(r=G((null==(a=null==(t=h.legend)?void 0:t.labels)?void 0:a.font)||""))?void 0:r.name)})||T,onChange:t=>{const a=t.target.value||T;e.onStateChange(V(h,j.legendFontName,a.value))},itemRender:W,disabled:!1===(null==(l=h.legend)?void 0:l.visible),...P})),t.createElement(se,{editorId:"legendLabelsSize",labelText:m.toLanguageString("chartWizard.format.legend.size",X.formatLegendSize)},t.createElement(g.ComboBox,{id:"legendLabelsSize",data:D,textField:"text",dataItemKey:"value",placeholder:m.toLanguageString("chartWizard.format.legend.sizePlaceholder",X.formatLegendSizePlaceholder),value:D.find(e=>{var t,a,r;return e.value===(null==(r=G((null==(a=null==(t=h.legend)?void 0:t.labels)?void 0:a.font)||""))?void 0:r.size)})||T,onChange:t=>{const a=t.target.value||T;F(a)&&e.onStateChange(V(h,j.legendFontSize,a.value))},disabled:!1===(null==(n=h.legend)?void 0:n.visible),allowCustom:!0,...P})),t.createElement(se,{editorId:"legendLabelsColor",labelText:m.toLanguageString("chartWizard.format.legend.color",X.formatLegendColor)},t.createElement(f.ColorPicker,{id:"legendLabelsColor",value:(null==(i=null==(o=h.legend)?void 0:o.labels)?void 0:i.color)||"",onChange:t=>{e.onStateChange(V(h,j.legendColor,t.value))},disabled:!1===(null==(c=h.legend)?void 0:c.visible),view:"gradient",fillMode:"outline"})),t.createElement(se,{className:"k-col-span-2",editorId:"legendPosition",labelText:m.toLanguageString("chartWizard.format.legend.position",X.formatLegendPosition)},t.createElement(g.DropDownList,{id:"legendPosition",data:E,textField:"text",dataItemKey:"value",value:E.find(e=>{var t;return e.value===(null==(t=h.legend)?void 0:t.position)}),onChange:t=>{const a=t.target.value;e.onStateChange(V(h,j.legendPosition,a.value))},disabled:!1===(null==(s=h.legend)?void 0:s.visible),...P})))))))},he=e=>{var a,l,n,o,i;const c=d.useLocalization(),s=e.state,m=s.seriesType,[h,v]=t.useState(!1),p=t.useCallback(e=>{v(!e.expanded)},[]),C=t.useCallback(t=>{e.onStateChange(V(s,j.categoryAxisTitleText,t.target.value))},[s]),S=t.useCallback(t=>{const a=t.target.value||T;F(a)&&e.onStateChange(V(s,j.categoryAxisTitleFontSize,a.value))},[s]),E=t.useCallback(t=>{const a=t.target.value||T;e.onStateChange(V(s,j.categoryAxisTitleFontName,a.value))},[s]),k=t.useCallback(t=>{e.onStateChange(V(s,j.categoryAxisTitleColor,t.value))},[s]),L=t.useCallback(t=>{const a=t.target.value||T;F(a)&&e.onStateChange(V(s,j.categoryAxisLabelsFontSize,a.value))},[s]),A=t.useCallback(t=>{const a=t.target.value||T;e.onStateChange(V(s,j.categoryAxisLabelsFontName,a.value))},[s]),z=t.useCallback(t=>{e.onStateChange(V(s,j.categoryAxisLabelsColor,t.value))},[s]),y=t.useCallback(t=>{e.onStateChange(V(s,j.categoryAxisLabelsRotation,t.target.value))},[s]),I=t.useCallback(t=>{e.onStateChange(V(s,j.categoryAxisReverseOrder,t.value))},[s]);return t.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:"scatter"===m?c.toLanguageString("chartWizard.format.xAxis.expandText",X.formatXAxis):c.toLanguageString("chartWizard.format.categoryAxis.expandText",X.formatCategoryAxis),expanded:h,tabIndex:0,onAction:p},t.createElement(x.Reveal,null,h&&t.createElement(r.ExpansionPanelContent,null,t.createElement(u.FormElement,{onKeyDown:b},t.createElement(J,{legend:c.toLanguageString("chartWizard.format.categoryAxis.title.expandText",X.formatCategoryAxisTitle)},t.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},t.createElement(se,{className:"k-col-span-2"},t.createElement(f.Input,{placeholder:c.toLanguageString("chartWizard.format.categoryAxis.title.placeholder",X.formatCategoryAxisTitlePlaceholder),value:(null==(a=s.categoryAxis[0].title)?void 0:a.text)||"",onChange:C})),t.createElement(se,{className:"k-col-span-2",editorId:"categoryAxisTitleFont",labelText:c.toLanguageString("chartWizard.format.categoryAxis.title.font",X.formatCategoryAxisTitleFont)},t.createElement(g.ComboBox,{id:"categoryAxisTitleFont",data:K,textField:"text",dataItemKey:"value",itemRender:W,placeholder:c.toLanguageString("chartWizard.format.categoryAxis.title.fontPlaceholder",X.formatCategoryAxisTitleFontPlaceholder),value:K.find(e=>{var t,a;return e.value===(null==(a=G((null==(t=s.categoryAxis[0].title)?void 0:t.font)||""))?void 0:a.name)})||T,onChange:E,...P})),t.createElement(se,{editorId:"categoryAxisTitleFontSize",labelText:c.toLanguageString("chartWizard.format.categoryAxis.title.size",X.formatCategoryAxisTitleSize)},t.createElement(g.ComboBox,{id:"categoryAxisTitleFontSize",data:D,textField:"text",dataItemKey:"value",placeholder:c.toLanguageString("chartWizard.format.categoryAxis.title.sizePlaceholder",X.formatCategoryAxisTitleSizePlaceholder),value:D.find(e=>{var t,a;return e.value===(null==(a=G((null==(t=s.categoryAxis[0].title)?void 0:t.font)||""))?void 0:a.size)})||T,onChange:S,allowCustom:!0,...P})),t.createElement(se,{editorId:"categoryAxisTitleColor",labelText:c.toLanguageString("chartWizard.format.categoryAxis.title.color",X.formatCategoryAxisTitleColor)},t.createElement(f.ColorPicker,{id:"categoryAxisTitleColor",view:"gradient",value:(null==(l=s.categoryAxis[0].title)?void 0:l.color)||"",onChange:k,fillMode:"outline"})))),t.createElement(J,{legend:c.toLanguageString("chartWizard.format.categoryAxis.labels.text",X.formatCategoryAxisLabels)},t.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},t.createElement(se,{className:"k-col-span-2",editorId:"categoryAxisLabelsFont",labelText:c.toLanguageString("chartWizard.format.categoryAxis.labels.font",X.formatCategoryAxisLabelsFont)},t.createElement(g.ComboBox,{id:"categoryAxisLabelsFont",data:K,textField:"text",dataItemKey:"value",placeholder:c.toLanguageString("chartWizard.format.categoryAxis.labels.fontPlaceholder",X.formatCategoryAxisLabelsFontPlaceholder),value:K.find(e=>{var t,a;return e.value===(null==(a=G((null==(t=s.categoryAxis[0].labels)?void 0:t.font)||""))?void 0:a.name)})||T,onChange:A,itemRender:W,...P})),t.createElement(se,{editorId:"categoryAxisLabelsFontSize",labelText:c.toLanguageString("chartWizard.format.categoryAxis.labels.size",X.formatCategoryAxisLabelsSize)},t.createElement(g.ComboBox,{id:"categoryAxisLabelsFontSize",data:D,textField:"text",dataItemKey:"value",placeholder:c.toLanguageString("chartWizard.format.categoryAxis.labels.sizePlaceholder",X.formatCategoryAxisLabelsSizePlaceholder),value:D.find(e=>{var t,a;return e.value===(null==(a=G((null==(t=s.categoryAxis[0].labels)?void 0:t.font)||""))?void 0:a.size)})||T,onChange:L,allowCustom:!0,...P})),t.createElement(se,{editorId:"categoryAxisLabelsColor",labelText:c.toLanguageString("chartWizard.format.categoryAxis.labels.color",X.formatCategoryAxisLabelsColor)},t.createElement(f.ColorPicker,{id:"categoryAxisLabelsColor",view:"gradient",value:(null==(n=s.categoryAxis[0].labels)?void 0:n.color)||"",onChange:z,fillMode:"outline"})),t.createElement(se,{editorId:"categoryAxisLabelsRotation",labelText:c.toLanguageString("chartWizard.format.categoryAxis.labels.rotation.text",X.formatCategoryAxisLabelsRotation)},t.createElement(f.NumericTextBox,{id:"categoryAxisLabelsRotation",value:"number"==typeof(null==(o=s.categoryAxis[0].labels)?void 0:o.rotation)?null==(i=s.categoryAxis[0].labels)?void 0:i.rotation:null,placeholder:c.toLanguageString("chartWizard.format.categoryAxis.labels.rotation.auto",X.formatCategoryAxisLabelsRotationAuto),onChange:y,fillMode:"outline",min:-360,max:360,step:1})),t.createElement(se,{className:"k-col-span-2"},t.createElement(f.Checkbox,{label:c.toLanguageString("chartWizard.format.categoryAxis.labels.reverseOrder",X.formatCategoryAxisLabelsReverseOrder),checked:s.categoryAxis[0].reverse||!1,onChange:I}))))))))},xe=e=>{var a,l,n,o,i,c,s,m,h,v;const p=d.useLocalization(),C=e.state,S=C.seriesType,E={text:p.toLanguageString("chartWizard.format.valueAxis.labelFormat.text",X.formatValueAxisLabelsFormatText),value:""},k=[{value:"n0",text:p.toLanguageString("chartWizard.format.valueAxis.labelFormat.number",X.formatValueAxisLabelsFormatNumber)},{value:"c0",text:p.toLanguageString("chartWizard.format.valueAxis.labelFormat.currency",X.formatValueAxisLabelsFormatCurrency)},{value:"p0",text:p.toLanguageString("chartWizard.format.valueAxis.labelFormat.percent",X.formatValueAxisLabelsFormatPercent)}],[L,A]=t.useState(!1),z=t.useCallback(e=>{A(!e.expanded)},[]);return t.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:"scatter"===S?p.toLanguageString("chartWizard.format.yAxis.expandText",X.formatYAxis):p.toLanguageString("chartWizard.format.valueAxis.expandText",X.formatValueAxis),expanded:L,tabIndex:0,onAction:z},t.createElement(x.Reveal,null,L&&t.createElement(r.ExpansionPanelContent,null,t.createElement(u.FormElement,{onKeyDown:b},t.createElement(J,{legend:p.toLanguageString("chartWizard.format.valueAxis.title.text",X.formatValueAxisTitle)},t.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},t.createElement(se,{className:"k-col-span-2"},t.createElement(f.Input,{placeholder:p.toLanguageString("chartWizard.format.valueAxis.title.placeholder",X.formatValueAxisTitlePlaceholder),value:(null==(l=null==(a=C.valueAxis[0])?void 0:a.title)?void 0:l.text)||"",onChange:t=>{e.onStateChange(V(C,j.valueAxisTitleText,t.target.value))}})),t.createElement(se,{className:"k-col-span-2",editorId:"valueAxisTitleFont",labelText:p.toLanguageString("chartWizard.format.valueAxis.title.font",X.formatValueAxisTitleFont)},t.createElement(g.ComboBox,{id:"valueAxisTitleFont",data:K,textField:"text",dataItemKey:"value",itemRender:W,placeholder:p.toLanguageString("chartWizard.format.valueAxis.title.fontPlaceholder",X.formatValueAxisTitleFontPlaceholder),value:K.find(e=>{var t,a,r;return e.value===(null==(r=G((null==(a=null==(t=C.valueAxis[0])?void 0:t.title)?void 0:a.font)||""))?void 0:r.name)})||T,onChange:t=>{const a=t.target.value||T;e.onStateChange(V(C,j.valueAxisTitleFontName,a.value))},...P})),t.createElement(se,{editorId:"valueAxisTitleFontSize",labelText:p.toLanguageString("chartWizard.format.valueAxis.title.size",X.formatValueAxisTitleSize)},t.createElement(g.ComboBox,{id:"valueAxisTitleFontSize",data:D,textField:"text",dataItemKey:"value",placeholder:p.toLanguageString("chartWizard.format.valueAxis.title.sizePlaceholder",X.formatValueAxisTitleSizePlaceholder),value:D.find(e=>{var t,a,r;return e.value===(null==(r=G((null==(a=null==(t=C.valueAxis[0])?void 0:t.title)?void 0:a.font)||""))?void 0:r.size)})||T,onChange:t=>{const a=t.target.value||T;F(a)&&e.onStateChange(V(C,j.valueAxisTitleFontSize,a.value))},allowCustom:!0,...P})),t.createElement(se,{editorId:"valueAxisTitleColor",labelText:p.toLanguageString("chartWizard.format.valueAxis.title.color",X.formatValueAxisTitleColor)},t.createElement(f.ColorPicker,{id:"valueAxisTitleColor",view:"gradient",value:(null==(o=null==(n=C.valueAxis[0])?void 0:n.title)?void 0:o.color)||"",onChange:t=>{e.onStateChange(V(C,j.valueAxisTitleColor,t.value))},fillMode:"outline"})))),t.createElement(J,{legend:p.toLanguageString("chartWizard.format.valueAxis.labels.text",X.formatValueAxisLabels)},t.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},t.createElement(se,{className:"k-col-span-2",editorId:"valueAxisLabelsFormat",labelText:p.toLanguageString("chartWizard.format.valueAxis.labelFormat",X.formatValueAxisLabelsFormat)},t.createElement(g.DropDownList,{id:"valueAxisLabelsFormat",data:k,textField:"text",dataItemKey:"value",defaultItem:E,value:k.find(e=>{var t,a;return e.value===(null==(a=null==(t=C.valueAxis[0])?void 0:t.labels)?void 0:a.format)})||E,onChange:t=>{const a=t.target.value;e.onStateChange(V(C,j.valueAxisLabelsFormat,a.value))},...P})),t.createElement(se,{className:"k-col-span-2",editorId:"valueAxisLabelsFont",labelText:p.toLanguageString("chartWizard.format.valueAxis.labels.font",X.formatValueAxisLabelsFont)},t.createElement(g.ComboBox,{id:"valueAxisLabelsFont",data:K,textField:"text",dataItemKey:"value",placeholder:p.toLanguageString("chartWizard.format.valueAxis.labels.fontPlaceholder",X.formatValueAxisLabelsFontPlaceholder),value:K.find(e=>{var t,a,r;return e.value===(null==(r=G((null==(a=null==(t=C.valueAxis[0])?void 0:t.labels)?void 0:a.font)||""))?void 0:r.name)})||T,onChange:t=>{const a=t.target.value||T;e.onStateChange(V(C,j.valueAxisLabelsFontName,a.value))},itemRender:W,...P})),t.createElement(se,{editorId:"valueAxisLabelsFontSize",labelText:p.toLanguageString("chartWizard.format.valueAxis.labels.size",X.formatValueAxisLabelsSize)},t.createElement(g.ComboBox,{id:"valueAxisLabelsFontSize",data:D,textField:"text",dataItemKey:"value",placeholder:p.toLanguageString("chartWizard.format.valueAxis.labels.sizePlaceholder",X.formatValueAxisLabelsSizePlaceholder),value:D.find(e=>{var t,a,r;return e.value===(null==(r=G((null==(a=null==(t=C.valueAxis[0])?void 0:t.labels)?void 0:a.font)||""))?void 0:r.size)})||T,onChange:t=>{const a=t.target.value||T;F(a)&&e.onStateChange(V(C,j.valueAxisLabelsFontSize,a.value))},allowCustom:!0,...P})),t.createElement(se,{editorId:"valueAxisLabelsColor",labelText:p.toLanguageString("chartWizard.format.valueAxis.labels.color",X.formatValueAxisLabelsColor)},t.createElement(f.ColorPicker,{id:"valueAxisLabelsColor",view:"gradient",value:(null==(c=null==(i=C.valueAxis[0])?void 0:i.labels)?void 0:c.color)||"",onChange:t=>{e.onStateChange(V(C,j.valueAxisLabelsColor,t.value))},fillMode:"outline"})),t.createElement(se,{editorId:"valueAxisLabelsRotation",labelText:p.toLanguageString("chartWizard.format.valueAxis.labels.rotation.text",X.formatValueAxisLabelsRotation)},t.createElement(f.NumericTextBox,{id:"valueAxisLabelsRotation",value:"number"==typeof(null==(m=null==(s=C.valueAxis[0])?void 0:s.labels)?void 0:m.rotation)?null==(v=null==(h=C.valueAxis[0])?void 0:h.labels)?void 0:v.rotation:null,placeholder:p.toLanguageString("chartWizard.format.valueAxis.labels.rotation.auto",X.formatValueAxisLabelsRotationAuto),onChange:t=>{e.onStateChange(V(C,j.valueAxisLabelsRotation,t.target.value))},fillMode:"outline",min:-360,max:360,step:1}))))))))},ve=e=>t.createElement("div",{className:"k-chart-types-wrapper",onKeyDown:b},e.children),fe=e=>{const a=t.useCallback(t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),e.onClick.call(void 0))},[e.onClick]);return t.createElement("div",{className:h.classNames("k-icon-text-wrapper",{"k-selected":e.selected}),onClick:e.onClick},t.createElement("div",{className:"k-icon-background-area",tabIndex:0,onKeyDown:a},t.createElement(h.IconWrap,{name:e.iconName,icon:e.icon,size:"xlarge",className:"k-svg-i-chart-bar-clustered"})),e.children)},pe=e=>{const t=d.useLocalization(),a=e.state,l=a.seriesType,{isStackFalse:o,isStackNormal:i,isStack100:c}=R(a),[s,u]=C.useState(!0),g=C.useCallback(e=>{u(!e.expanded)},[]);return C.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:t.toLanguageString("chartWizard.chart.barChart.expandText",X.barChart),expanded:s,tabIndex:0,onAction:g},C.createElement(x.Reveal,null,s&&C.createElement(r.ExpansionPanelContent,null,C.createElement(ve,null,C.createElement(fe,{selected:"bar"===l&&o,onClick:()=>{e.onStateChange(q(a,M(a.data,"bar")))},icon:n.chartBarClusteredIcon,iconName:"chart-bar-clustered"},t.toLanguageString("chartWizard.chart.barChart.bar",X.barChartBar)),C.createElement(fe,{selected:"bar"===l&&i,onClick:()=>{const t=q(a,M(a.data,"bar"));e.onStateChange(V(t,j.stacked,N))},icon:n.chartBarStackedIcon,iconName:"chart-bar-stacked"},t.toLanguageString("chartWizard.chart.barChart.stackedBar",X.barChartStackedBar)),C.createElement(fe,{selected:"bar"===l&&c,onClick:()=>{const t=q(a,M(a.data,"bar"));e.onStateChange(V(t,j.stacked,w))},icon:n.chartBarStacked100Icon,iconName:"chart-bar-stacked100"},t.toLanguageString("chartWizard.chart.barChart.100%stackedBar",X.barChart100StackedBar))))))},Ce=e=>{const t=d.useLocalization(),a=e.state,l=a.seriesType,{isStackFalse:o,isStackNormal:i,isStack100:c}=R(a),[s,u]=C.useState(!0),g=C.useCallback(e=>{u(!e.expanded)},[]);return C.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:t.toLanguageString("chartWizard.chart.columnChart.expandText",X.columnChart),expanded:s,tabIndex:0,onAction:g},C.createElement(x.Reveal,null,s&&C.createElement(r.ExpansionPanelContent,null,C.createElement(ve,null,C.createElement(fe,{selected:"column"===l&&o,onClick:()=>{e.onStateChange(q(a,M(a.data,"column")))},icon:n.chartColumnClusteredIcon,iconName:"chart-column-clustered"},t.toLanguageString("chartWizard.chart.columnChart.column",X.columnChartColumn)),C.createElement(fe,{selected:"column"===l&&i,onClick:()=>{const t=q(a,M(a.data,"column"));e.onStateChange(V(t,j.stacked,N))},icon:n.chartColumnStackedIcon,iconName:"chart-column-stacked"},t.toLanguageString("chartWizard.chart.columnChart.stackedColumn",X.columnChartStackedColumn)),C.createElement(fe,{selected:"column"===l&&c,onClick:()=>{const t=q(a,M(a.data,"column"));e.onStateChange(V(t,j.stacked,w))},icon:n.chartColumnStacked100Icon,iconName:"chart-column-stacked100"},t.toLanguageString("chartWizard.chart.columnChart.100%stackedColumn",X.columnChart100StackedColumn))))))},be=e=>{const t=d.useLocalization(),a=e.state,l=a.seriesType,{isStackFalse:o,isStackNormal:i,isStack100:c}=R(a),[s,u]=C.useState(!0),g=C.useCallback(e=>{u(!e.expanded)},[]);return C.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:t.toLanguageString("chartWizard.chart.lineChart.expandText",X.lineChart),expanded:s,tabIndex:0,onAction:g},C.createElement(x.Reveal,null,s&&C.createElement(r.ExpansionPanelContent,null,C.createElement(ve,null,C.createElement(fe,{selected:"line"===l&&o,onClick:()=>{e.onStateChange(q(a,M(a.data,"line")))},icon:n.chartLineIcon,iconName:"chart-line"},t.toLanguageString("chartWizard.chart.lineChart.line",X.lineChartLine)),C.createElement(fe,{selected:"line"===l&&i,onClick:()=>{const t=q(a,M(a.data,"line"));e.onStateChange(V(t,j.stacked,N))},icon:n.chartLineStackedIcon,iconName:"chart-line-stacked"},t.toLanguageString("chartWizard.chart.lineChart.stackedLine",X.lineChartStackedLine)),C.createElement(fe,{selected:"line"===l&&c,onClick:()=>{const t=q(a,M(a.data,"line"));e.onStateChange(V(t,j.stacked,w))},icon:n.chartLineStacked100Icon,iconName:"chart-line-stacked100"},t.toLanguageString("chartWizard.chart.lineChart.100%stackedLine",X.lineChart100StackedLine))))))},Se=e=>{const t=d.useLocalization(),a=e.state,l=a.seriesType,[o,i]=C.useState(!0),c=C.useCallback(e=>{i(!e.expanded)},[]);return C.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:t.toLanguageString("chartWizard.chart.scatterChart.expandText",X.scatterChart),expanded:o,tabIndex:0,onAction:c},C.createElement(x.Reveal,null,o&&C.createElement(r.ExpansionPanelContent,null,C.createElement(ve,null,C.createElement(fe,{selected:"scatter"===l,onClick:()=>{e.onStateChange(q(a,M(a.data,"scatter")))},icon:n.chartScatterIcon,iconName:"chart-scatter"},t.toLanguageString("chartWizard.chart.scatterChart.scatter",X.scatterChartScatter))))))},Ee=e=>{const t=d.useLocalization(),a=e.state,l=a.seriesType,[o,i]=C.useState(!0),c=C.useCallback(e=>{i(!e.expanded)},[]);return C.createElement(r.ExpansionPanel,{style:{maxWidth:"576px"},title:t.toLanguageString("chartWizard.chart.pieChart.expandText",X.pieChart),expanded:o,tabIndex:0,onAction:c},C.createElement(x.Reveal,null,o&&C.createElement(r.ExpansionPanelContent,null,C.createElement(ve,null,C.createElement(fe,{selected:"pie"===l,onClick:()=>{e.onStateChange(q(a,M(a.data,"pie")))},icon:n.chartPieIcon,iconName:"chart-pie"},t.toLanguageString("chartWizard.chart.pieChart.pie",X.pieChartPie))))))},ke=t.forwardRef((e,a)=>{var r,l,n,o,c,s,d,u,g,m,h,x,v;const f=e.state;return t.createElement(i.Chart,{style:{width:"100%",height:"100%"},transitions:!1,ref:a},t.createElement(i.ChartTitle,{text:null==(r=f.title)?void 0:r.text,font:null==(l=f.title)?void 0:l.font,color:(null==(n=f.title)?void 0:n.color)||"#000"}),t.createElement(i.ChartSubtitle,{text:null==(o=f.subtitle)?void 0:o.text,font:null==(c=f.subtitle)?void 0:c.font,color:(null==(s=f.subtitle)?void 0:s.color)||"#000"}),t.createElement(i.ChartArea,{background:null==(d=f.area)?void 0:d.background,margin:f.area.margin}),f.categoryAxis&&t.createElement(i.ChartCategoryAxis,null,f.categoryAxis.map((e,a)=>t.createElement(i.ChartCategoryAxisItem,{key:a,categories:e.categories,title:e.title&&{text:e.title.text,font:e.title.font,color:e.title.color},labels:e.labels&&{font:e.labels.font,color:e.labels.color,rotation:e.labels.rotation},reverse:e.reverse}))),f.valueAxis&&t.createElement(i.ChartValueAxis,null,f.valueAxis.map((e,a)=>t.createElement(i.ChartValueAxisItem,{key:a,title:e.title&&{text:e.title.text,font:e.title.font,color:e.title.color},labels:e.labels&&{format:e.labels.format,font:e.labels.font,color:e.labels.color,rotation:e.labels.rotation}}))),t.createElement(i.ChartSeries,null,f.series.map((e,a)=>t.createElement(i.ChartSeriesItem,{key:String(e.name)+a,...e}))),t.createElement(i.ChartLegend,{visible:null==(u=f.legend)?void 0:u.visible,position:null==(g=f.legend)?void 0:g.position,labels:{color:(null==(h=null==(m=f.legend)?void 0:m.labels)?void 0:h.color)||void 0,font:(null==(v=null==(x=f.legend)?void 0:x.labels)?void 0:v.font)||void 0}}))});ke.displayName="ChartComponent";const Le=C.forwardRef((e,t)=>{const o=d.useLocalization(),i=C.useRef(null),c=C.useRef(null),s=C.useCallback(t=>{var a;if(c.current){const r=new $(c.current,L(e.exportOptions));null==(a=e.onExport)||a.call(void 0,r),r.isDefaultPrevented()||t.item.exportHandler.call(void 0,r)}},[e.onExport,e.exportOptions]),u=e.window||a.Window,[g,m]=C.useState({width:700,height:550}),[h,x]=C.useState("DEFAULT"),v=C.useCallback(e=>{m({width:e.width,height:e.height})},[]),f=C.useCallback(e=>{x(e.state)},[]),[p,b]=C.useState([{collapsible:!1},{size:"300px",collapsible:!1}]),S=C.useCallback(e=>{b(e.newState)},[]),[E,k]=C.useState(0),T=C.useCallback(e=>{k(e.selected)},[]),[W,I]=C.useState(B(e.data||[],"bar",e.defaultState)),F=t=>{var a;null==(a=e.onStateChange)||a.call(void 0,t),e.state||I(t)},P=e.state||W,N=C.useRef(P);N.current=P;const w=C.useRef(e);w.current=e;const R=C.useCallback(()=>({get chart(){return c.current},get state(){return N.current}}),[]);C.useImperativeHandle(t,R),C.useEffect(()=>{var t;if(N.current.seriesType&&e.data){const a=q(N.current,M(e.data,N.current.seriesType));null==(t=w.current.onStateChange)||t.call(void 0,a),w.current.state||I(a)}},[e.data]),C.useEffect(()=>{var e,t;null==(t=null==(e=i.current)?void 0:e.element)||t.focus()},[]);const D=P.seriesType;return C.createElement(u,{title:o.toLanguageString("chartWizard.window.title",X.windowTitle),className:"k-chart-wizard",modal:!0,resizable:!0,minimizeButton:()=>null,onClose:e.onClose,onResize:v,stage:h,onStageChange:f,...g},C.createElement(r.Splitter,{panes:p,onChange:S,className:"k-chart-wizard-splitter"},C.createElement("div",{className:"k-chart-wizard-preview-pane k-pane"},C.createElement("div",{className:"k-preview-pane-header"},C.createElement(l.DropDownButton,{ref:i,text:o.toLanguageString("chartWizard.export.button",X.exportButton),fillMode:"flat",svgIcon:n.exportIcon,icon:"export",onItemClick:s,items:[{svgIcon:n.filePdfIcon,icon:"file-pdf",exportHandler:A,text:o.toLanguageString("chartWizard.exportPDF.button",X.exportPDFButton)},{svgIcon:n.fileIcon,icon:"file",exportHandler:z,text:o.toLanguageString("chartWizard.exportSVG.button",X.exportSVGButton)},{svgIcon:n.fileImageIcon,icon:"file-image",exportHandler:y,text:o.toLanguageString("chartWizard.exportPNG.button",X.exportPNGButton)}]})),C.createElement("div",{className:"k-preview-pane-content",style:{height:"calc(100% - 50px)"}},C.createElement(ke,{ref:c,state:P}))),C.createElement("div",{className:"k-chart-wizard-property-pane k-pane k-pane-static"},C.createElement(r.TabStrip,{selected:E,onSelect:T,animation:!1},C.createElement(r.TabStripTab,{title:o.toLanguageString("chartWizard.tab.chart",X.tabChart)},C.createElement("div",null,C.createElement(pe,{state:P,onStateChange:F}),C.createElement(Ee,{state:P,onStateChange:F}),C.createElement(Ce,{state:P,onStateChange:F}),C.createElement(be,{state:P,onStateChange:F}),C.createElement(Se,{state:P,onStateChange:F}))),C.createElement(r.TabStripTab,{title:o.toLanguageString("chartWizard.tab.data",X.tabData)},C.createElement(ce,{state:P,onStateChange:F})),C.createElement(r.TabStripTab,{title:o.toLanguageString("chartWizard.tab.format",X.tabFormat)},C.createElement("div",null,C.createElement(de,{state:P,onStateChange:F}),C.createElement(ue,{state:P,onStateChange:F}),C.createElement(ge,{state:P,onStateChange:F}),C.createElement(me,{state:P,onStateChange:F}),"pie"!==D&&C.createElement(he,{state:P,onStateChange:F}),"pie"!==D&&C.createElement(xe,{state:P,onStateChange:F})))))))});function Ae(e){const{grid:t,data:a,selectedState:r,dataItemKey:l}=e;if(!t)return[];const n=m.leafColumns(t.columns||[]),o=h.getter(l),i=h.getter("field"),c=h.getter("title"),s=new Map(a.map(e=>[String(o(e)),e])),d=new Map(Array.from(s.keys()).map((e,t)=>[e,t])),u=Object.keys(r).sort((e,t)=>(d.get(e)||0)-(d.get(t)||0)),g=[];return u.forEach(e=>{let t=r[e];if(t){!0===t&&(t=Array.from({length:n.length},(e,t)=>t));const a=t.slice();a.sort((e,t)=>e-t);const r=a.map(e=>({title:c(n[e]),field:i(n[e])}));g.push({dataItem:s.get(e),dataColumns:r})}}),g}Le.displayName="ChartWizard";const{getWizardDataFromDataRows:ze}=o.ChartWizardCommon;e.ChartWizard=Le,e.createState=M,e.getGridSelectedRows=Ae,e.getWizardDataFromDataRows=H,e.getWizardDataFromGridSelection=e=>ze(Ae(e))});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { GridHandle } from '@progress/kendo-react-grid';
|
|
9
|
+
import { DataRow } from '@progress/kendo-charts';
|
|
10
|
+
/**
|
|
11
|
+
* Maps the Grid selectedState to a more general DataRows type you can display in the Chart Wizard.
|
|
12
|
+
*
|
|
13
|
+
* The selectedKeys can be either row keys or cell keys.
|
|
14
|
+
*
|
|
15
|
+
* @returns DataRow array that you can pass to `getWizardDataFromDataRows` to bind the Chart Wizard.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getGridSelectedRows(args: {
|
|
18
|
+
/**
|
|
19
|
+
* Specifies the Grid handle instance.
|
|
20
|
+
*/
|
|
21
|
+
grid: GridHandle | null;
|
|
22
|
+
/**
|
|
23
|
+
* Sets the data array from the Grid.
|
|
24
|
+
*/
|
|
25
|
+
data: any[];
|
|
26
|
+
/**
|
|
27
|
+
* Configures the current selection state.
|
|
28
|
+
*/
|
|
29
|
+
selectedState: {
|
|
30
|
+
[id: string]: boolean | number[];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Sets the key property for identifying data items.
|
|
34
|
+
*/
|
|
35
|
+
dataItemKey: string;
|
|
36
|
+
}): DataRow[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { GridHandle } from '@progress/kendo-react-grid';
|
|
9
|
+
import { ChartWizardDataRow } from '@progress/kendo-charts';
|
|
10
|
+
/**
|
|
11
|
+
* Maps the Grid selectedState to data you can display in the Chart Wizard.
|
|
12
|
+
*
|
|
13
|
+
* Supports both row and cell selection.
|
|
14
|
+
*
|
|
15
|
+
* @returns A collection that you can use as Chart Wizard data.
|
|
16
|
+
*/
|
|
17
|
+
export declare const getWizardDataFromGridSelection: (args: {
|
|
18
|
+
/**
|
|
19
|
+
* Specifies the Grid handle instance.
|
|
20
|
+
*/
|
|
21
|
+
grid: GridHandle | null;
|
|
22
|
+
/**
|
|
23
|
+
* Sets the data array from the Grid.
|
|
24
|
+
*/
|
|
25
|
+
data: any[];
|
|
26
|
+
/**
|
|
27
|
+
* Configures the current selection state.
|
|
28
|
+
*/
|
|
29
|
+
selectedState: {
|
|
30
|
+
[id: string]: boolean | number[];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Sets the key property for identifying data items.
|
|
34
|
+
*/
|
|
35
|
+
dataItemKey: string;
|
|
36
|
+
}) => ChartWizardDataRow[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
export { getGridSelectedRows } from './get-grid-selected-rows.js';
|
|
9
|
+
export { getWizardDataFromGridSelection } from './get-wizard-data-from-grid-selection.js';
|
package/index.d.mts
CHANGED
|
@@ -5,240 +5,10 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import { ChartWizardSeriesItem } from '@progress/kendo-charts';
|
|
16
|
-
import { ChartWizardSeriesItemLabel } from '@progress/kendo-charts';
|
|
17
|
-
import { ChartWizardSeriesStack } from '@progress/kendo-charts';
|
|
18
|
-
import { ChartWizardSeriesType } from '@progress/kendo-charts';
|
|
19
|
-
import { ChartWizardState } from '@progress/kendo-charts';
|
|
20
|
-
import { ChartWizardTitle } from '@progress/kendo-charts';
|
|
21
|
-
import { ChartWizardValueAxisItem } from '@progress/kendo-charts';
|
|
22
|
-
import { DataColumn } from '@progress/kendo-charts';
|
|
23
|
-
import { DataRow } from '@progress/kendo-charts';
|
|
24
|
-
import { GridHandle } from '@progress/kendo-react-grid';
|
|
25
|
-
import { ImageExportOptions } from '@progress/kendo-drawing';
|
|
26
|
-
import { PDFOptions } from '@progress/kendo-drawing/pdf';
|
|
27
|
-
import * as React_2 from 'react';
|
|
28
|
-
import { WindowProps } from '@progress/kendo-react-dialogs';
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* The KendoReact ChartWizard component.
|
|
32
|
-
*/
|
|
33
|
-
export declare const ChartWizard: React_2.ForwardRefExoticComponent<ChartWizardProps & React_2.RefAttributes<ChartWizardHandle | null>>;
|
|
34
|
-
|
|
35
|
-
export { ChartWizardArea }
|
|
36
|
-
|
|
37
|
-
export { ChartWizardCategoryAxisItem }
|
|
38
|
-
|
|
39
|
-
export { ChartWizardDataCell }
|
|
40
|
-
|
|
41
|
-
export { ChartWizardDataRow }
|
|
42
|
-
|
|
43
|
-
export { ChartWizardDefaultState }
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Represents the `ref` object of the ChartWizard component.
|
|
47
|
-
**/
|
|
48
|
-
export declare interface ChartWizardHandle {
|
|
49
|
-
/**
|
|
50
|
-
* Gets the Chart instance.
|
|
51
|
-
*/
|
|
52
|
-
chart: Chart | null;
|
|
53
|
-
/**
|
|
54
|
-
* @hidden
|
|
55
|
-
*
|
|
56
|
-
* The current state of the ChartWizard.
|
|
57
|
-
*/
|
|
58
|
-
state: ChartWizardState;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export { ChartWizardLegend }
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* The props of the KendoReact ChartWizard component.
|
|
65
|
-
*/
|
|
66
|
-
export declare interface ChartWizardProps {
|
|
67
|
-
/**
|
|
68
|
-
* Specifies the data you want to display in the ChartWizard component.
|
|
69
|
-
*/
|
|
70
|
-
data?: ChartWizardDataRow[];
|
|
71
|
-
/**
|
|
72
|
-
* Fires when you close the ChartWizard component.
|
|
73
|
-
*/
|
|
74
|
-
onClose?: () => void;
|
|
75
|
-
/**
|
|
76
|
-
* Fires when the Chart exports. You can prevent this action.
|
|
77
|
-
*/
|
|
78
|
-
onExport?: (event: ExportEvent) => void;
|
|
79
|
-
/**
|
|
80
|
-
* Sets the export options for the ChartWizard component.
|
|
81
|
-
*/
|
|
82
|
-
exportOptions?: ExportOptions;
|
|
83
|
-
/**
|
|
84
|
-
* Sets the default state of the ChartWizard component.
|
|
85
|
-
*/
|
|
86
|
-
defaultState?: ChartWizardDefaultState;
|
|
87
|
-
/**
|
|
88
|
-
* Sets the component that renders the ChartWizard window.
|
|
89
|
-
*/
|
|
90
|
-
window?: React.ComponentType<WindowProps>;
|
|
91
|
-
/**
|
|
92
|
-
* Fires when the ChartWizard component state changes.
|
|
93
|
-
*/
|
|
94
|
-
onStateChange?: (state: ChartWizardState) => void;
|
|
95
|
-
/**
|
|
96
|
-
* Controls the state of the ChartWizard component.
|
|
97
|
-
*/
|
|
98
|
-
state?: ChartWizardState;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export { ChartWizardSeriesItem }
|
|
102
|
-
|
|
103
|
-
export { ChartWizardSeriesItemLabel }
|
|
104
|
-
|
|
105
|
-
export { ChartWizardSeriesStack }
|
|
106
|
-
|
|
107
|
-
export { ChartWizardSeriesType }
|
|
108
|
-
|
|
109
|
-
export { ChartWizardState }
|
|
110
|
-
|
|
111
|
-
export { ChartWizardTitle }
|
|
112
|
-
|
|
113
|
-
export { ChartWizardValueAxisItem }
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Creates a state object from the provided data and series type.
|
|
117
|
-
*
|
|
118
|
-
* @param data - Specifies the data you want to display in the ChartWizard component.
|
|
119
|
-
* @param seriesType - Sets the series type of the ChartWizard component.
|
|
120
|
-
* @returns The state object.
|
|
121
|
-
*/
|
|
122
|
-
export declare const createState: (data: ChartWizardDataRow[], seriesType: ChartWizardSeriesType) => ChartWizardState;
|
|
123
|
-
|
|
124
|
-
export { DataColumn }
|
|
125
|
-
|
|
126
|
-
export { DataRow }
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Provides arguments for the `export` event on the Chart Wizard.
|
|
130
|
-
*/
|
|
131
|
-
export declare class ExportEvent extends PreventableEvent {
|
|
132
|
-
/**
|
|
133
|
-
* Gets the export options on the Chart Wizard.
|
|
134
|
-
*/
|
|
135
|
-
exportOptions: ExportOptions;
|
|
136
|
-
/**
|
|
137
|
-
* Gets the current Chart chart instance you want to export.
|
|
138
|
-
*/
|
|
139
|
-
chart: Chart;
|
|
140
|
-
constructor(chart: Chart, exportOptions: ExportOptions);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Sets the export options for the Chart Wizard.
|
|
145
|
-
*/
|
|
146
|
-
export declare interface ExportOptions {
|
|
147
|
-
/**
|
|
148
|
-
* Sets the filename for exported files.
|
|
149
|
-
*
|
|
150
|
-
* @default 'chart'
|
|
151
|
-
*/
|
|
152
|
-
fileName?: string;
|
|
153
|
-
/**
|
|
154
|
-
* Configures PDF export options.
|
|
155
|
-
*
|
|
156
|
-
* @default { paperSize: 'A4', margin: '1cm' }
|
|
157
|
-
*/
|
|
158
|
-
pdf?: PDFOptions;
|
|
159
|
-
/**
|
|
160
|
-
* Configures image export options.
|
|
161
|
-
*
|
|
162
|
-
* @default { width: 800, height: 600 }
|
|
163
|
-
*/
|
|
164
|
-
image?: ImageExportOptions;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Maps the Grid selectedState to a more general DataRows type you can display in the Chart Wizard.
|
|
169
|
-
*
|
|
170
|
-
* The selectedKeys can be either row keys or cell keys.
|
|
171
|
-
*
|
|
172
|
-
* @returns DataRow array that you can pass to `getWizardDataFromDataRows` to bind the Chart Wizard.
|
|
173
|
-
*/
|
|
174
|
-
export declare function getGridSelectedRows(args: {
|
|
175
|
-
/**
|
|
176
|
-
* Specifies the Grid handle instance.
|
|
177
|
-
*/
|
|
178
|
-
grid: GridHandle | null;
|
|
179
|
-
/**
|
|
180
|
-
* Sets the data array from the Grid.
|
|
181
|
-
*/
|
|
182
|
-
data: any[];
|
|
183
|
-
/**
|
|
184
|
-
* Configures the current selection state.
|
|
185
|
-
*/
|
|
186
|
-
selectedState: {
|
|
187
|
-
[id: string]: boolean | number[];
|
|
188
|
-
};
|
|
189
|
-
/**
|
|
190
|
-
* Sets the key property for identifying data items.
|
|
191
|
-
*/
|
|
192
|
-
dataItemKey: string;
|
|
193
|
-
}): DataRow[];
|
|
194
|
-
|
|
195
|
-
export declare const getWizardDataFromDataRows: (dataRows: DataRow[]) => ChartWizardDataRow[];
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Maps the Grid selectedState to data you can display in the Chart Wizard.
|
|
199
|
-
*
|
|
200
|
-
* Supports both row and cell selection.
|
|
201
|
-
*
|
|
202
|
-
* @returns A collection that you can use as Chart Wizard data.
|
|
203
|
-
*/
|
|
204
|
-
export declare const getWizardDataFromGridSelection: (args: {
|
|
205
|
-
/**
|
|
206
|
-
* Specifies the Grid handle instance.
|
|
207
|
-
*/
|
|
208
|
-
grid: GridHandle | null;
|
|
209
|
-
/**
|
|
210
|
-
* Sets the data array from the Grid.
|
|
211
|
-
*/
|
|
212
|
-
data: any[];
|
|
213
|
-
/**
|
|
214
|
-
* Configures the current selection state.
|
|
215
|
-
*/
|
|
216
|
-
selectedState: {
|
|
217
|
-
[id: string]: boolean | number[];
|
|
218
|
-
};
|
|
219
|
-
/**
|
|
220
|
-
* Sets the key property for identifying data items.
|
|
221
|
-
*/
|
|
222
|
-
dataItemKey: string;
|
|
223
|
-
}) => ChartWizardDataRow[];
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* @hidden
|
|
227
|
-
*/
|
|
228
|
-
declare abstract class PreventableEvent {
|
|
229
|
-
private prevented;
|
|
230
|
-
/**
|
|
231
|
-
* Prevents the default action for a specific event.
|
|
232
|
-
* This action stops the source component from executing its built-in behavior that follows the event.
|
|
233
|
-
*/
|
|
234
|
-
preventDefault(): void;
|
|
235
|
-
/**
|
|
236
|
-
* Returns `true` if any of the event subscribers prevented the event.
|
|
237
|
-
*
|
|
238
|
-
* @returns - Returns `true` if you prevented the default action.
|
|
239
|
-
* Otherwise, returns `false`.
|
|
240
|
-
*/
|
|
241
|
-
isDefaultPrevented(): boolean;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
export { }
|
|
8
|
+
export { ChartWizard } from './ChartWizard.js';
|
|
9
|
+
export { type ChartWizardProps } from './types/ChartWizardProps.js';
|
|
10
|
+
export { type ChartWizardHandle } from './types/ChartWizardHandle.js';
|
|
11
|
+
export { type ExportEvent, type ExportOptions } from './types/export.js';
|
|
12
|
+
export * from './grid-integration/index.js';
|
|
13
|
+
export { getWizardDataFromDataRows, createState } from './utils.js';
|
|
14
|
+
export { type ChartWizardState, type ChartWizardDefaultState, type ChartWizardSeriesType, type ChartWizardSeriesStack, type ChartWizardDataCell, type ChartWizardDataRow, type DataColumn, type DataRow, type ChartWizardArea, type ChartWizardCategoryAxisItem, type ChartWizardValueAxisItem, type ChartWizardSeriesItem, type ChartWizardSeriesItemLabel, type ChartWizardLegend, type ChartWizardTitle } from '@progress/kendo-charts';
|