@kashifd/jwero-components 0.5.60 → 0.5.61
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/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1046,5 +1046,5 @@ rect.legend-mouseover-inactive,
|
|
|
1046
1046
|
|
|
1047
1047
|
.apexcharts-rangebar-goals-markers {
|
|
1048
1048
|
pointer-events: none
|
|
1049
|
-
}`;var A=((x=t.opts.chart)===null||x===void 0?void 0:x.nonce)||t.w.config.chart.nonce;A&&f.setAttribute("nonce",A),u?c.prepend(f):h.head.appendChild(f)}var w=t.create(t.w.config.series,{});if(!w)return n(t);t.mount(w).then(function(){typeof t.w.config.chart.events.mounted=="function"&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),n(w)}).catch(function(C){i(C)})}else i(new Error("Element not found"))})}},{key:"create",value:function(t,n){var i=this.w;new He(this).initModules();var l=this.w.globals;if(l.noData=!1,l.animationEnded=!1,this.responsive.checkResponsiveConfig(n),i.config.xaxis.convertedCatToNumeric&&new me(i.config).convertCatToNumericXaxis(i.config,this.ctx),this.el===null||(this.core.setupElements(),i.config.chart.type==="treemap"&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),l.svgWidth===0))return l.animationEnded=!0,null;var c=_.checkComboSeries(t,i.config.chart.type);l.comboCharts=c.comboCharts,l.comboBarCount=c.comboBarCount;var u=t.every(function(A){return A.data&&A.data.length===0});(t.length===0||u&&l.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(t),this.theme.init(),new Ae(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),l.noData&&l.collapsedSeries.length!==l.series.length&&!i.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),l.axisCharts&&(this.core.coreCalculations(),i.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX),this.formatters.heatmapLabelFormatters(),new _(this).getLargestMarkerSize(),this.dimensions.plotCoords();var h=this.core.xySettings();this.grid.createGridMask();var f=this.core.plotChartType(t,h),x=new ue(this);return x.bringForward(),i.config.dataLabels.background.enabled&&x.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:f,xyRatios:h,dimensions:{plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}}}}},{key:"mount",value:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=this,l=i.w;return new Promise(function(c,u){if(i.el===null)return u(new Error("Not enough data to display or target element not found"));(n===null||l.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new je(i);var h,f,x=i.grid.drawGrid();if(i.annotations=new re(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),l.config.grid.position==="back"&&(x&&l.globals.dom.elGraphical.add(x.el),x!=null&&(h=x.elGridBorders)!==null&&h!==void 0&&h.node&&l.globals.dom.elGraphical.add(x.elGridBorders)),Array.isArray(n.elGraph))for(var A=0;A<n.elGraph.length;A++)l.globals.dom.elGraphical.add(n.elGraph[A]);else l.globals.dom.elGraphical.add(n.elGraph);l.config.grid.position==="front"&&(x&&l.globals.dom.elGraphical.add(x.el),x!=null&&(f=x.elGridBorders)!==null&&f!==void 0&&f.node&&l.globals.dom.elGraphical.add(x.elGridBorders)),l.config.xaxis.crosshairs.position==="front"&&i.crosshairs.drawXCrosshairs(),l.config.yaxis[0].crosshairs.position==="front"&&i.crosshairs.drawYCrosshairs(),l.config.chart.type!=="treemap"&&i.axes.drawAxis(l.config.chart.type,x);var w=new Ee(t.ctx,x),C=new ve(t.ctx,x);if(x!==null&&(w.xAxisLabelCorrections(x.xAxisTickWidth),C.setYAxisTextAlignments(),l.config.yaxis.map(function(D,I){l.globals.ignoreYAxisIndexes.indexOf(I)===-1&&C.yAxisTitleRotate(I,D.opposite)})),i.annotations.drawAxesAnnotations(),!l.globals.noData){if(l.config.tooltip.enabled&&!l.globals.noData&&i.w.globals.tooltip.drawTooltip(n.xyRatios),l.globals.axisCharts&&(l.globals.isXNumeric||l.config.xaxis.convertedCatToNumeric||l.globals.isRangeBar))(l.config.chart.zoom.enabled||l.config.chart.selection&&l.config.chart.selection.enabled||l.config.chart.pan&&l.config.chart.pan.enabled)&&i.zoomPanSelection.init({xyRatios:n.xyRatios});else{var O=l.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(function(D){O[D]=!1})}l.config.chart.toolbar.show&&!l.globals.allSeriesCollapsed&&i.toolbar.createToolbar()}l.globals.memory.methodsToExec.length>0&&l.globals.memory.methodsToExec.forEach(function(D){D.method(D.params,!1,D.context)}),l.globals.axisCharts||l.globals.noData||i.core.resizeNonAxisCharts(),c(i)})}},{key:"destroy",value:function(){var t,n;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,t=this.parentResizeHandler,(n=Ge.get(t))&&(n.disconnect(),Ge.delete(t));var i=this.w.config.chart.id;i&&Apex._chartInstances.forEach(function(l,c){l.id===E.escapeString(i)&&Apex._chartInstances.splice(c,1)}),new Je(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var n=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],l=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],c=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],u=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],h=this.w;return h.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map(function(f,x){return n.updateHelpers._extendSeries(f,x)})),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),h.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,l,c,u)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,n,i)}},{key:"appendSeries",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],l=this.w.config.series.slice();return l.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(l,n,i)}},{key:"appendData",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var l=i.w.config.series.slice(),c=0;c<l.length;c++)if(t[c]!==null&&t[c]!==void 0)for(var u=0;u<t[c].data.length;u++)l[c].data.push(t[c].data[u]);return i.w.config.series=l,n&&(i.w.globals.initialSeries=E.clone(i.w.config.series)),this.update()}},{key:"update",value:function(t){var n=this;return new Promise(function(i,l){new Je(n.ctx).clear({isUpdating:!0});var c=n.create(n.w.config.series,t);if(!c)return i(n);n.mount(c).then(function(){typeof n.w.config.chart.events.updated=="function"&&n.w.config.chart.events.updated(n,n.w),n.events.fireEvent("updated",[n,n.w]),n.w.globals.isDirty=!0,i(n)}).catch(function(u){l(u)})})}},{key:"getSyncedCharts",value:function(){var t=this.getGroupedCharts(),n=[this];return t.length&&(n=[],t.forEach(function(i){n.push(i)})),n}},{key:"getGroupedCharts",value:function(){var t=this;return Apex._chartInstances.filter(function(n){if(n.group)return!0}).map(function(n){return t.w.config.chart.group===n.group?n.chart:t})}},{key:"toggleSeries",value:function(t){return this.series.toggleSeries(t)}},{key:"highlightSeriesOnLegendHover",value:function(t,n){return this.series.toggleSeriesOnHover(t,n)}},{key:"showSeries",value:function(t){this.series.showSeries(t)}},{key:"hideSeries",value:function(t){this.series.hideSeries(t)}},{key:"isSeriesHidden",value:function(t){this.series.isSeriesHidden(t)}},{key:"resetSeries",value:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.series.resetSeries(t,n)}},{key:"addEventListener",value:function(t,n){this.events.addEventListener(t,n)}},{key:"removeEventListener",value:function(t,n){this.events.removeEventListener(t,n)}},{key:"addXaxisAnnotation",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,l=this;i&&(l=i),l.annotations.addXaxisAnnotationExternal(t,n,l)}},{key:"addYaxisAnnotation",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,l=this;i&&(l=i),l.annotations.addYaxisAnnotationExternal(t,n,l)}},{key:"addPointAnnotation",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,l=this;i&&(l=i),l.annotations.addPointAnnotationExternal(t,n,l)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,n=this;t&&(n=t),n.annotations.clearAnnotations(n)}},{key:"removeAnnotation",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=this;n&&(i=n),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,n){return this.coreUtils.getSeriesTotalsXRange(t,n)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new we(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new we(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,n){return this.updateHelpers.toggleDataPointSelection(t,n)}},{key:"zoomX",value:function(t,n){this.ctx.toolbar.zoomUpdateOptions(t,n)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Me(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Me(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;typeof t=="function"&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var n=E.escapeString(t);if(Apex._chartInstances){var i=Apex._chartInstances.filter(function(l){return l.id===n})[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var t=document.querySelectorAll("[data-apexcharts]"),n=0;n<t.length;n++)new Y(t[n],JSON.parse(t[n].getAttribute("data-options"))).render()}},{key:"exec",value:function(t,n){var i=this.getChartByID(t);if(i){i.w.globals.isExecCalled=!0;var l=null;if(i.publicMethods.indexOf(n)!==-1){for(var c=arguments.length,u=new Array(c>2?c-2:0),h=2;h<c;h++)u[h-2]=arguments[h];l=i[n].apply(i,u)}return l}}},{key:"merge",value:function(t,n){return E.extend(t,n)}}]),Y}();e.exports=pt})(Ad,Ad.exports);var h5=Ad.exports,Vo;Object.defineProperty(Mm,"__esModule",{value:!0});var f5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g5=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var a,s=arguments[o];for(a in s)Object.prototype.hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},m5=function(){function e(o,a){for(var s=0;s<a.length;s++){var d=a[s];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(o,d.key,d)}}return function(o,a,s){return a&&e(o.prototype,a),s&&e(o,s),o}}(),b5=h5,Dm=wd(b5),Rm=yt,da=wd(Rm),x5=Fd,Ho=wd(x5);function wd(e){return e&&e.__esModule?e:{default:e}}function v5(e,o,a){return o in e?Object.defineProperty(e,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[o]=a,e}function y5(e,o){var a,s={};for(a in e)0<=o.indexOf(a)||Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=e[a]);return s}function A5(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function w5(e,o){if(e)return!o||typeof o!="object"&&typeof o!="function"?e:o;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function C5(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(e,o):e.__proto__=o)}window.ApexCharts=Dm.default;var Im=function(){function e(o){A5(this,e);var a=w5(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,o));return da.default.createRef?a.chartRef=da.default.createRef():a.setRef=function(s){return a.chartRef=s},a.chart=null,a}return C5(e,Rm.Component),m5(e,[{key:"render",value:function(){var o=y5(this.props,[]);return da.default.createElement("div",g5({ref:da.default.createRef?this.chartRef:this.setRef},o))}},{key:"componentDidMount",value:function(){var o=da.default.createRef?this.chartRef.current:this.chartRef;this.chart=new Dm.default(o,this.getConfig()),this.chart.render()}},{key:"getConfig",value:function(){var p=this.props,o=p.type,a=p.height,s=p.width,d=p.series,p=p.options;return this.extend(p,{chart:{type:o,height:a,width:s},series:d})}},{key:"isObject",value:function(o){return o&&(o===void 0?"undefined":f5(o))==="object"&&!Array.isArray(o)&&o!=null}},{key:"extend",value:function(o,a){var s=this,d=(typeof Object.assign!="function"&&(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var g=Object(p),m=1;m<arguments.length;m++){var v=arguments[m];if(v!=null)for(var y in v)v.hasOwnProperty(y)&&(g[y]=v[y])}return g}),Object.assign({},o));return this.isObject(o)&&this.isObject(a)&&Object.keys(a).forEach(function(p){s.isObject(a[p])&&p in o?d[p]=s.extend(o[p],a[p]):Object.assign(d,v5({},p,a[p]))}),d}},{key:"componentDidUpdate",value:function(o){if(!this.chart)return null;var d=this.props,m=d.options,a=d.series,s=d.height,d=d.width,p=JSON.stringify(o.options),g=JSON.stringify(o.series),m=JSON.stringify(m),v=JSON.stringify(a);p===m&&g===v&&s===o.height&&d===o.width||(g!==v&&p===m&&s===o.height&&d===o.width?this.chart.updateSeries(a):this.chart.updateOptions(this.getConfig()))}},{key:"componentWillUnmount",value:function(){this.chart&&typeof this.chart.destroy=="function"&&this.chart.destroy()}}]),e}();(Vo=Mm.default=Im).propTypes={type:Ho.default.string.isRequired,width:Ho.default.oneOfType([Ho.default.string,Ho.default.number]),height:Ho.default.oneOfType([Ho.default.string,Ho.default.number]),series:Ho.default.array.isRequired,options:Ho.default.object.isRequired},Im.defaultProps={type:"line",width:"100%",height:"auto"};const k5=({name:e,labels:o,data:a})=>{const s={chart:{type:"line",toolbar:{show:!1}},xaxis:{categories:o},stroke:{curve:"smooth"},grid:{padding:{left:0,right:0}},colors:["#2E93FA"],dataLabels:{enabled:!1},tooltip:{enabled:!0}},d=[{name:e||"",data:a}];return k.jsx(Vo,{options:s,series:d,type:"line",height:"100%",width:"100%"})},S5=({name:e,data:o,barColor:a})=>{const d={chart:{type:"bar",toolbar:{show:!1}},plotOptions:{bar:{borderRadius:10,dataLabels:{position:"top"}}},xaxis:{categories:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],position:"top",axisBorder:{show:!1},axisTicks:{show:!1},crosshairs:{fill:{type:"gradient",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}}},tooltip:{enabled:!0}},colors:[a||"#2E93FA"],dataLabels:{enabled:!0,formatter:g=>`${g}%`,style:{colors:[lt.colors.text_secondary]},offsetY:-20},tooltip:{enabled:!0},yaxis:{axisBorder:{show:!1},axisTicks:{show:!1},labels:{show:!1,formatter:function(g){return g+"%"}}}},p=[{name:e||"",data:o}];return k.jsx(Vo,{options:d,series:p,type:"bar",height:"100%",width:"100%"})},T5=({name:e,data:o,labels:a})=>{const s={series:[{data:o}],chart:{type:"bar",height:350,toolbar:{show:!1}},plotOptions:{bar:{borderRadius:0,horizontal:!0,distributed:!0,barHeight:"80%",isFunnel:!0}},dataLabels:{enabled:!0,formatter:function(p,g){return`${g.w.globals.labels[g.dataPointIndex]}: ${p}`},style:{colors:[lt.colors.text_tertiary,lt.colors.medium_slate_blue,lt.colors.persian_green,lt.colors.rose,lt.colors.selective_yellow]}},xaxis:{categories:a,labels:{style:{fontSize:"0.875rem",fontWeight:"600"}}},yaxis:{labels:{show:!1}},colors:[lt.colors.light_grey,lt.colors.light_blue,lt.colors.light_green,lt.colors.light_orange,lt.colors.light_yellow],legend:{show:!1,position:"right",labels:{colors:lt.colors.burning_pink}}},d=[{name:e||"",data:o}];return k.jsx(Vo,{options:s,series:d,type:"bar",height:"100%",width:"100%"})},O5=({name:e,data:o,labels:a})=>{const s={chart:{type:"area",toolbar:{show:!1}},dataLabels:{enabled:!1},stroke:{curve:"smooth"},xaxis:{categories:a},yaxis:{labels:{formatter:function(d){return d.toFixed(2)}}},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.3,opacityTo:.9,stops:[0,90,100]}}};return k.jsx(Vo,{options:s,series:[{name:e||"",data:o}],type:"area",height:"100%",width:"100%"})},P5=({labels:e=[],data:o=[],name:a})=>{const s={chart:{type:"bar",toolbar:{show:!1}},plotOptions:{bar:{horizontal:!0}},xaxis:{categories:e},colors:[lt.colors.tertiary]},d=[{name:a||"",data:o}];return k.jsx(Vo,{options:s,series:d,type:"bar",height:"100%",width:"100%"})},E5=({data:e,labels:o})=>{const a={chart:{type:"donut"},labels:o,colors:[lt.colors.neutral,lt.colors.tertiary,lt.colors.secondary,lt.colors.rose],legend:{show:!0,position:"right",fontFamily:"Inter,sans-serif",labels:{colors:"#000000",useSeriesColors:!1}},dataLabels:{enabled:!1},responsive:[{breakpoint:480,options:{chart:{width:300},legend:{position:"bottom"}}}]};return k.jsx(Vo,{options:a,series:e,type:"donut",width:"100%",height:"100%"})},Nm=e=>{if(!e)return{};let o={};return Array.isArray(e)?e.forEach(a=>{typeof a=="object"&&!Array.isArray(a)&&a!==null&&(o={...o,...a})}):typeof e=="object"&&!Array.isArray(e)&&e!==null&&(o={...e}),{fontSize:o.fontSize,fontWeight:o.fontWeight,fontFamily:o.fontFamily,color:o.color}},M5=({completionRate:e,size:o,labelOptions:a})=>{const s=typeof e=="number"&&e>=0&&e<=100?e:0,p={...{name:"Completion Rate",nameSx:{fontSize:"1rem",fontWeight:500,fontFamily:"Inter, sans-serif",color:lt.colors.text_tertiary},valueSx:{fontSize:"2rem",fontWeight:600,fontFamily:"Inter, sans-serif",color:lt.colors.positive}},...a},g=Nm(p.nameSx),m=Nm(p.valueSx),v={chart:{type:"radialBar",offsetY:0},plotOptions:{radialBar:{startAngle:0,endAngle:360,hollow:{size:`${o}%`||"70%"},dataLabels:{name:{offsetY:20,show:!0,...g},value:{offsetY:-18,formatter:function(S){return`${S}%`},...m}}}},fill:{colors:[lt.colors.positive]},stroke:{lineCap:"round"},labels:[p.name]},y=[s];return k.jsx(Vo,{options:v,series:y,type:"radialBar"})},D5=({series:e,label:o})=>{const a={chart:{type:"line",toolbar:{show:!1}},stroke:{width:2,curve:"smooth"},xaxis:{categories:o,labels:{style:{colors:o.map(()=>lt.colors.text_tertiary)}}},yaxis:{labels:{style:{colors:[lt.colors.text_tertiary]}}},colors:[lt.colors.medium_slate_blue,lt.colors.selective_yellow,lt.colors.rose],legend:{position:"top",horizontalAlign:"left",labels:{colors:[lt.colors.text_primary]}},tooltip:{enabled:!0,theme:"dark"}};return k.jsx(Vo,{options:a,series:e,type:"line",height:"100%",width:"100%"})},R5=({type:e="radial",NumericChartData:o,completionRate:a,data:s,series:d,size:p,chartSx:g,barColor:m,label:v,labelName:y,labelOptions:S})=>{const P={justifyContent:"center",flex:1,alignItems:"center",...g};return k.jsxs(Ze,{sx:P,children:[e==="radial"&&k.jsx(M5,{size:p,completionRate:a,labelOptions:S}),e==="pie"&&k.jsx(E5,{data:s,labels:v}),e==="racing_bar"&&k.jsx(P5,{name:y,data:s,labels:v}),e==="area"&&k.jsx(O5,{name:y,data:s,labels:v}),e==="funnel"&&k.jsx(T5,{name:y,data:s,labels:v}),e==="bar"&&k.jsx(S5,{name:y,data:s,barColor:m}),e==="line"&&k.jsx(k5,{name:y,labels:v,data:s}),e==="numeric"&&k.jsx(p5,{data:o}),e==="multiple_line"&&k.jsx(D5,{series:d,label:v})]})};Ot.JweroAccordion=Em,Ot.JweroActionsButton=XI,Ot.JweroAlerts=e5,Ot.JweroBadge=Ya,Ot.JweroBreadcrumbs=kI,Ot.JweroButtonMenu=jI,Ot.JweroCharts=R5,Ot.JweroCheckbox=ca,Ot.JweroChip=wm,Ot.JweroConfirmationDialog=jR,Ot.JweroCustomField=rm,Ot.JweroDataCard=BI,Ot.JweroDataTable=TI,Ot.JweroDateFilter=ZR,Ot.JweroDialogFooter=wI,Ot.JweroDialogHeader=AI,Ot.JweroDrawer=FI,Ot.JweroEmptyState=$I,Ot.JweroMenu=gd,Ot.JweroOrderCard=u5,Ot.JweroPopper=Hs,Ot.JweroPrimaryButton=Zr,Ot.JweroRadio=Ws,Ot.JweroSearchBox=eI,Ot.JweroSidebar=CI,Ot.JweroSnackbar=tI,Ot.JweroStatusChip=la,Ot.JweroTable=hm,Ot.JweroTabs=xI,Ot.JweroTaskCard=KI,Ot.JweroTooltip=vI,Ot.JweroTypography=gt,Ot.JweroUserAvatar=fd,Ot.JweroVerticalTabs=VI,Ot.JweroViewOptions=yI,Object.defineProperty(Ot,Symbol.toStringTag,{value:"Module"})});
|
|
1049
|
+
}`;var A=((x=t.opts.chart)===null||x===void 0?void 0:x.nonce)||t.w.config.chart.nonce;A&&f.setAttribute("nonce",A),u?c.prepend(f):h.head.appendChild(f)}var w=t.create(t.w.config.series,{});if(!w)return n(t);t.mount(w).then(function(){typeof t.w.config.chart.events.mounted=="function"&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),n(w)}).catch(function(C){i(C)})}else i(new Error("Element not found"))})}},{key:"create",value:function(t,n){var i=this.w;new He(this).initModules();var l=this.w.globals;if(l.noData=!1,l.animationEnded=!1,this.responsive.checkResponsiveConfig(n),i.config.xaxis.convertedCatToNumeric&&new me(i.config).convertCatToNumericXaxis(i.config,this.ctx),this.el===null||(this.core.setupElements(),i.config.chart.type==="treemap"&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),l.svgWidth===0))return l.animationEnded=!0,null;var c=_.checkComboSeries(t,i.config.chart.type);l.comboCharts=c.comboCharts,l.comboBarCount=c.comboBarCount;var u=t.every(function(A){return A.data&&A.data.length===0});(t.length===0||u&&l.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(t),this.theme.init(),new Ae(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),l.noData&&l.collapsedSeries.length!==l.series.length&&!i.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),l.axisCharts&&(this.core.coreCalculations(),i.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX),this.formatters.heatmapLabelFormatters(),new _(this).getLargestMarkerSize(),this.dimensions.plotCoords();var h=this.core.xySettings();this.grid.createGridMask();var f=this.core.plotChartType(t,h),x=new ue(this);return x.bringForward(),i.config.dataLabels.background.enabled&&x.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:f,xyRatios:h,dimensions:{plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}}}}},{key:"mount",value:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=this,l=i.w;return new Promise(function(c,u){if(i.el===null)return u(new Error("Not enough data to display or target element not found"));(n===null||l.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new je(i);var h,f,x=i.grid.drawGrid();if(i.annotations=new re(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),l.config.grid.position==="back"&&(x&&l.globals.dom.elGraphical.add(x.el),x!=null&&(h=x.elGridBorders)!==null&&h!==void 0&&h.node&&l.globals.dom.elGraphical.add(x.elGridBorders)),Array.isArray(n.elGraph))for(var A=0;A<n.elGraph.length;A++)l.globals.dom.elGraphical.add(n.elGraph[A]);else l.globals.dom.elGraphical.add(n.elGraph);l.config.grid.position==="front"&&(x&&l.globals.dom.elGraphical.add(x.el),x!=null&&(f=x.elGridBorders)!==null&&f!==void 0&&f.node&&l.globals.dom.elGraphical.add(x.elGridBorders)),l.config.xaxis.crosshairs.position==="front"&&i.crosshairs.drawXCrosshairs(),l.config.yaxis[0].crosshairs.position==="front"&&i.crosshairs.drawYCrosshairs(),l.config.chart.type!=="treemap"&&i.axes.drawAxis(l.config.chart.type,x);var w=new Ee(t.ctx,x),C=new ve(t.ctx,x);if(x!==null&&(w.xAxisLabelCorrections(x.xAxisTickWidth),C.setYAxisTextAlignments(),l.config.yaxis.map(function(D,I){l.globals.ignoreYAxisIndexes.indexOf(I)===-1&&C.yAxisTitleRotate(I,D.opposite)})),i.annotations.drawAxesAnnotations(),!l.globals.noData){if(l.config.tooltip.enabled&&!l.globals.noData&&i.w.globals.tooltip.drawTooltip(n.xyRatios),l.globals.axisCharts&&(l.globals.isXNumeric||l.config.xaxis.convertedCatToNumeric||l.globals.isRangeBar))(l.config.chart.zoom.enabled||l.config.chart.selection&&l.config.chart.selection.enabled||l.config.chart.pan&&l.config.chart.pan.enabled)&&i.zoomPanSelection.init({xyRatios:n.xyRatios});else{var O=l.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(function(D){O[D]=!1})}l.config.chart.toolbar.show&&!l.globals.allSeriesCollapsed&&i.toolbar.createToolbar()}l.globals.memory.methodsToExec.length>0&&l.globals.memory.methodsToExec.forEach(function(D){D.method(D.params,!1,D.context)}),l.globals.axisCharts||l.globals.noData||i.core.resizeNonAxisCharts(),c(i)})}},{key:"destroy",value:function(){var t,n;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,t=this.parentResizeHandler,(n=Ge.get(t))&&(n.disconnect(),Ge.delete(t));var i=this.w.config.chart.id;i&&Apex._chartInstances.forEach(function(l,c){l.id===E.escapeString(i)&&Apex._chartInstances.splice(c,1)}),new Je(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var n=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],l=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],c=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],u=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],h=this.w;return h.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map(function(f,x){return n.updateHelpers._extendSeries(f,x)})),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),h.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,l,c,u)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,n,i)}},{key:"appendSeries",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],l=this.w.config.series.slice();return l.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(l,n,i)}},{key:"appendData",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var l=i.w.config.series.slice(),c=0;c<l.length;c++)if(t[c]!==null&&t[c]!==void 0)for(var u=0;u<t[c].data.length;u++)l[c].data.push(t[c].data[u]);return i.w.config.series=l,n&&(i.w.globals.initialSeries=E.clone(i.w.config.series)),this.update()}},{key:"update",value:function(t){var n=this;return new Promise(function(i,l){new Je(n.ctx).clear({isUpdating:!0});var c=n.create(n.w.config.series,t);if(!c)return i(n);n.mount(c).then(function(){typeof n.w.config.chart.events.updated=="function"&&n.w.config.chart.events.updated(n,n.w),n.events.fireEvent("updated",[n,n.w]),n.w.globals.isDirty=!0,i(n)}).catch(function(u){l(u)})})}},{key:"getSyncedCharts",value:function(){var t=this.getGroupedCharts(),n=[this];return t.length&&(n=[],t.forEach(function(i){n.push(i)})),n}},{key:"getGroupedCharts",value:function(){var t=this;return Apex._chartInstances.filter(function(n){if(n.group)return!0}).map(function(n){return t.w.config.chart.group===n.group?n.chart:t})}},{key:"toggleSeries",value:function(t){return this.series.toggleSeries(t)}},{key:"highlightSeriesOnLegendHover",value:function(t,n){return this.series.toggleSeriesOnHover(t,n)}},{key:"showSeries",value:function(t){this.series.showSeries(t)}},{key:"hideSeries",value:function(t){this.series.hideSeries(t)}},{key:"isSeriesHidden",value:function(t){this.series.isSeriesHidden(t)}},{key:"resetSeries",value:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.series.resetSeries(t,n)}},{key:"addEventListener",value:function(t,n){this.events.addEventListener(t,n)}},{key:"removeEventListener",value:function(t,n){this.events.removeEventListener(t,n)}},{key:"addXaxisAnnotation",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,l=this;i&&(l=i),l.annotations.addXaxisAnnotationExternal(t,n,l)}},{key:"addYaxisAnnotation",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,l=this;i&&(l=i),l.annotations.addYaxisAnnotationExternal(t,n,l)}},{key:"addPointAnnotation",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,l=this;i&&(l=i),l.annotations.addPointAnnotationExternal(t,n,l)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,n=this;t&&(n=t),n.annotations.clearAnnotations(n)}},{key:"removeAnnotation",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=this;n&&(i=n),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,n){return this.coreUtils.getSeriesTotalsXRange(t,n)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new we(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new we(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,n){return this.updateHelpers.toggleDataPointSelection(t,n)}},{key:"zoomX",value:function(t,n){this.ctx.toolbar.zoomUpdateOptions(t,n)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Me(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Me(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;typeof t=="function"&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var n=E.escapeString(t);if(Apex._chartInstances){var i=Apex._chartInstances.filter(function(l){return l.id===n})[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var t=document.querySelectorAll("[data-apexcharts]"),n=0;n<t.length;n++)new Y(t[n],JSON.parse(t[n].getAttribute("data-options"))).render()}},{key:"exec",value:function(t,n){var i=this.getChartByID(t);if(i){i.w.globals.isExecCalled=!0;var l=null;if(i.publicMethods.indexOf(n)!==-1){for(var c=arguments.length,u=new Array(c>2?c-2:0),h=2;h<c;h++)u[h-2]=arguments[h];l=i[n].apply(i,u)}return l}}},{key:"merge",value:function(t,n){return E.extend(t,n)}}]),Y}();e.exports=pt})(Ad,Ad.exports);var h5=Ad.exports,Vo;Object.defineProperty(Mm,"__esModule",{value:!0});var f5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g5=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var a,s=arguments[o];for(a in s)Object.prototype.hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},m5=function(){function e(o,a){for(var s=0;s<a.length;s++){var d=a[s];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(o,d.key,d)}}return function(o,a,s){return a&&e(o.prototype,a),s&&e(o,s),o}}(),b5=h5,Dm=wd(b5),Rm=yt,da=wd(Rm),x5=Fd,Ho=wd(x5);function wd(e){return e&&e.__esModule?e:{default:e}}function v5(e,o,a){return o in e?Object.defineProperty(e,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[o]=a,e}function y5(e,o){var a,s={};for(a in e)0<=o.indexOf(a)||Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=e[a]);return s}function A5(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function w5(e,o){if(e)return!o||typeof o!="object"&&typeof o!="function"?e:o;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function C5(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(e,o):e.__proto__=o)}window.ApexCharts=Dm.default;var Im=function(){function e(o){A5(this,e);var a=w5(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,o));return da.default.createRef?a.chartRef=da.default.createRef():a.setRef=function(s){return a.chartRef=s},a.chart=null,a}return C5(e,Rm.Component),m5(e,[{key:"render",value:function(){var o=y5(this.props,[]);return da.default.createElement("div",g5({ref:da.default.createRef?this.chartRef:this.setRef},o))}},{key:"componentDidMount",value:function(){var o=da.default.createRef?this.chartRef.current:this.chartRef;this.chart=new Dm.default(o,this.getConfig()),this.chart.render()}},{key:"getConfig",value:function(){var p=this.props,o=p.type,a=p.height,s=p.width,d=p.series,p=p.options;return this.extend(p,{chart:{type:o,height:a,width:s},series:d})}},{key:"isObject",value:function(o){return o&&(o===void 0?"undefined":f5(o))==="object"&&!Array.isArray(o)&&o!=null}},{key:"extend",value:function(o,a){var s=this,d=(typeof Object.assign!="function"&&(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var g=Object(p),m=1;m<arguments.length;m++){var v=arguments[m];if(v!=null)for(var y in v)v.hasOwnProperty(y)&&(g[y]=v[y])}return g}),Object.assign({},o));return this.isObject(o)&&this.isObject(a)&&Object.keys(a).forEach(function(p){s.isObject(a[p])&&p in o?d[p]=s.extend(o[p],a[p]):Object.assign(d,v5({},p,a[p]))}),d}},{key:"componentDidUpdate",value:function(o){if(!this.chart)return null;var d=this.props,m=d.options,a=d.series,s=d.height,d=d.width,p=JSON.stringify(o.options),g=JSON.stringify(o.series),m=JSON.stringify(m),v=JSON.stringify(a);p===m&&g===v&&s===o.height&&d===o.width||(g!==v&&p===m&&s===o.height&&d===o.width?this.chart.updateSeries(a):this.chart.updateOptions(this.getConfig()))}},{key:"componentWillUnmount",value:function(){this.chart&&typeof this.chart.destroy=="function"&&this.chart.destroy()}}]),e}();(Vo=Mm.default=Im).propTypes={type:Ho.default.string.isRequired,width:Ho.default.oneOfType([Ho.default.string,Ho.default.number]),height:Ho.default.oneOfType([Ho.default.string,Ho.default.number]),series:Ho.default.array.isRequired,options:Ho.default.object.isRequired},Im.defaultProps={type:"line",width:"100%",height:"auto"};const k5=({name:e,labels:o,data:a})=>{const s={chart:{type:"line",toolbar:{show:!1}},xaxis:{categories:o},stroke:{curve:"smooth"},grid:{padding:{left:0,right:0}},colors:["#2E93FA"],dataLabels:{enabled:!1},tooltip:{enabled:!0}},d=[{name:e||"",data:a}];return k.jsx(Vo,{options:s,series:d,type:"line",height:"100%",width:"100%"})},S5=({name:e,data:o,barColor:a})=>{const d={chart:{type:"bar",toolbar:{show:!1}},plotOptions:{bar:{borderRadius:10,dataLabels:{position:"top"}}},xaxis:{categories:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],position:"top",axisBorder:{show:!1},axisTicks:{show:!1},crosshairs:{fill:{type:"gradient",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}}},tooltip:{enabled:!0}},colors:[a||"#2E93FA"],dataLabels:{enabled:!0,formatter:g=>`${g}%`,style:{colors:[lt.colors.text_secondary]},offsetY:-20},tooltip:{enabled:!0},yaxis:{axisBorder:{show:!1},axisTicks:{show:!1},labels:{show:!1,formatter:function(g){return g+"%"}}}},p=[{name:e||"",data:o}];return k.jsx(Vo,{options:d,series:p,type:"bar",height:"100%",width:"100%"})},T5=({name:e,data:o,labels:a})=>{const s={series:[{data:o}],chart:{type:"bar",height:350,toolbar:{show:!1}},plotOptions:{bar:{borderRadius:0,horizontal:!0,distributed:!0,barHeight:"80%",isFunnel:!0}},dataLabels:{enabled:!0,formatter:function(p,g){return`${g.w.globals.labels[g.dataPointIndex]}: ${p}`},style:{colors:[lt.colors.text_tertiary,lt.colors.medium_slate_blue,lt.colors.persian_green,lt.colors.rose,lt.colors.selective_yellow]}},xaxis:{categories:a,labels:{style:{fontSize:"0.875rem",fontWeight:"600"}}},yaxis:{labels:{show:!1}},colors:[lt.colors.light_grey,lt.colors.light_blue,lt.colors.light_green,lt.colors.light_orange,lt.colors.light_yellow],legend:{show:!1,position:"right",labels:{colors:lt.colors.burning_pink}}},d=[{name:e||"",data:o}];return k.jsx(Vo,{options:s,series:d,type:"bar",height:"100%",width:"100%"})},O5=({name:e,data:o,labels:a})=>{const s={chart:{type:"area",toolbar:{show:!1}},dataLabels:{enabled:!1},stroke:{curve:"smooth"},xaxis:{categories:a},yaxis:{labels:{formatter:function(d){return d.toFixed(2)}}},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.3,opacityTo:.9,stops:[0,90,100]}}};return k.jsx(Vo,{options:s,series:[{name:e||"",data:o}],type:"area",height:"100%",width:"100%"})},P5=({labels:e=[],data:o=[],name:a})=>{const s={chart:{type:"bar",toolbar:{show:!1}},plotOptions:{bar:{horizontal:!0}},xaxis:{categories:e},colors:[lt.colors.tertiary]},d=[{name:a||"",data:o}];return k.jsx(Vo,{options:s,series:d,type:"bar",height:"100%",width:"100%"})},E5=({data:e,labels:o})=>{const a={chart:{type:"donut"},labels:o,colors:[lt.colors.neutral,lt.colors.tertiary,lt.colors.secondary,lt.colors.rose],legend:{show:!0,position:"right",fontFamily:"Inter,sans-serif",labels:{colors:"#000000",useSeriesColors:!1}},dataLabels:{enabled:!1},responsive:[{breakpoint:480,options:{chart:{width:300},legend:{position:"bottom"}}}]};return k.jsx(Vo,{options:a,series:e,type:"donut",width:"100%",height:"100%"})},Nm=e=>{if(!e)return{};let o={};return Array.isArray(e)?e.forEach(a=>{typeof a=="object"&&!Array.isArray(a)&&a!==null&&(o={...o,...a})}):typeof e=="object"&&!Array.isArray(e)&&e!==null&&(o={...e}),{fontSize:o.fontSize,fontWeight:o.fontWeight,fontFamily:o.fontFamily,color:o.color}},M5=({completionRate:e,size:o,labelOptions:a})=>{const s=typeof e=="number"&&e>=0&&e<=100?e:0,p={...{name:"Completion Rate",nameSx:{fontSize:"1rem",fontWeight:500,fontFamily:"Inter, sans-serif",color:lt.colors.text_tertiary},valueSx:{fontSize:"2rem",fontWeight:600,fontFamily:"Inter, sans-serif",color:lt.colors.positive}},...a},g=Nm(p.nameSx),m=Nm(p.valueSx),v={chart:{type:"radialBar",offsetY:0},plotOptions:{radialBar:{startAngle:0,endAngle:360,hollow:{size:`${o}%`||"70%"},dataLabels:{name:{offsetY:20,show:!0,...g},value:{offsetY:-18,formatter:function(S){return`${S}%`},...m}}}},fill:{colors:[lt.colors.positive]},stroke:{lineCap:"round"},labels:[p.name]},y=[s];return k.jsx(Vo,{options:v,series:y,type:"radialBar"})},D5=({series:e,label:o})=>{const a={chart:{type:"line",toolbar:{show:!1}},stroke:{width:2,curve:"smooth"},xaxis:{categories:o,labels:{style:{colors:o.map(()=>lt.colors.text_tertiary)}}},yaxis:{labels:{style:{colors:[lt.colors.text_tertiary]}}},colors:[lt.colors.medium_slate_blue,lt.colors.selective_yellow,lt.colors.rose],legend:{position:"top",horizontalAlign:"left",labels:{colors:[lt.colors.text_primary]}},tooltip:{enabled:!0,theme:"dark"}};return k.jsx(Vo,{options:a,series:e,type:"line",height:"100%",width:"100%"})},R5=({type:e="radial",NumericChartData:o,completionRate:a,data:s,series:d,size:p,chartSx:g,barColor:m,label:v,labelName:y,labelOptions:S})=>{const P={height:"100%",flex:1,width:"100%",...g};return k.jsxs(Ze,{sx:P,children:[e==="radial"&&k.jsx(M5,{size:p,completionRate:a,labelOptions:S}),e==="pie"&&k.jsx(E5,{data:s,labels:v}),e==="racing_bar"&&k.jsx(P5,{name:y,data:s,labels:v}),e==="area"&&k.jsx(O5,{name:y,data:s,labels:v}),e==="funnel"&&k.jsx(T5,{name:y,data:s,labels:v}),e==="bar"&&k.jsx(S5,{name:y,data:s,barColor:m}),e==="line"&&k.jsx(k5,{name:y,labels:v,data:s}),e==="numeric"&&k.jsx(p5,{data:o}),e==="multiple_line"&&k.jsx(D5,{series:d,label:v})]})};Ot.JweroAccordion=Em,Ot.JweroActionsButton=XI,Ot.JweroAlerts=e5,Ot.JweroBadge=Ya,Ot.JweroBreadcrumbs=kI,Ot.JweroButtonMenu=jI,Ot.JweroCharts=R5,Ot.JweroCheckbox=ca,Ot.JweroChip=wm,Ot.JweroConfirmationDialog=jR,Ot.JweroCustomField=rm,Ot.JweroDataCard=BI,Ot.JweroDataTable=TI,Ot.JweroDateFilter=ZR,Ot.JweroDialogFooter=wI,Ot.JweroDialogHeader=AI,Ot.JweroDrawer=FI,Ot.JweroEmptyState=$I,Ot.JweroMenu=gd,Ot.JweroOrderCard=u5,Ot.JweroPopper=Hs,Ot.JweroPrimaryButton=Zr,Ot.JweroRadio=Ws,Ot.JweroSearchBox=eI,Ot.JweroSidebar=CI,Ot.JweroSnackbar=tI,Ot.JweroStatusChip=la,Ot.JweroTable=hm,Ot.JweroTabs=xI,Ot.JweroTaskCard=KI,Ot.JweroTooltip=vI,Ot.JweroTypography=gt,Ot.JweroUserAvatar=fd,Ot.JweroVerticalTabs=VI,Ot.JweroViewOptions=yI,Object.defineProperty(Ot,Symbol.toStringTag,{value:"Module"})});
|
|
1050
1050
|
//# sourceMappingURL=index.umd.js.map
|