dash_mantine_components 2.3.0 → 2.4.0
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/dash_mantine_components/async-AreaChart.js +1 -1
- package/dash_mantine_components/async-BarChart.js +1 -1
- package/dash_mantine_components/async-BubbleChart.js +1 -1
- package/dash_mantine_components/async-CodeHighlight.js +1 -1
- package/dash_mantine_components/async-CodeHighlightTabs.js +1 -1
- package/dash_mantine_components/async-CompositeChart.js +1 -1
- package/dash_mantine_components/async-InlineCodeHighlight.js +1 -1
- package/dash_mantine_components/async-LineChart.js +1 -1
- package/dash_mantine_components/async-RichTextEditor.js +1 -1
- package/dash_mantine_components/async-ScatterChart.js +1 -1
- package/dash_mantine_components/dash_mantine_components.js +1 -1
- package/dash_mantine_components/proptypes.js +104 -12
- package/package.json +13 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[172],{3343:(e,t,a)=>{a.r(t),a.d(t,{default:()=>
|
|
1
|
+
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[172],{3343:(e,t,a)=>{a.r(t),a.d(t,{default:()=>F});var r=a(1635),s=a(4848),i=a(295),o=a.n(i),n=a(7158),l=a(1915),c=a(5614),d=a(4653),m=a(9853),h=a(9107),p=a(7984),u=a(1706),x=a(3495),y=a(8687),v=a(7018),f=a(9396),k=a(6344),g=a(2412),A=a(6100),C=a(1101),b=a(9274),S=a(2837),L=a(4791),D=a(6585),j=a(5849),N=a(9133);function P(e,t){return e===t.x?"x":"y"}const w={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x"},z=(0,f.V)((e,{textColor:t,gridColor:a})=>({root:{"--chart-text-color":t?(0,k.r)(t,e):void 0,"--chart-grid-color":a?(0,k.r)(a,e):void 0}})),K=(0,g.P9)((e,t)=>{const a=(0,A.Y)("ScatterChart",w,e),{classNames:r,className:o,style:f,styles:g,unstyled:K,vars:_,referenceLines:T,dir:Y,withLegend:F,withTooltip:M,withXAxis:W,withYAxis:X,xAxisProps:B,yAxisProps:E,orientation:I,scatterChartProps:J,legendProps:O,data:Q,gridAxis:$,tickLine:G,strokeDasharray:H,gridProps:R,tooltipAnimationDuration:V,tooltipProps:Z,children:q,onMouseLeave:U,dataKey:ee,textColor:te,gridColor:ae,xAxisLabel:re,yAxisLabel:se,unit:ie,labels:oe,valueFormatter:ne,scatterProps:le,pointLabels:ce,attributes:de,...me}=a,he=e=>"function"==typeof ne?ne:ne?.[e],pe=he("x"),ue=he("y"),xe=(0,C.xd)(),ye=Q.map(e=>({...e,data:e.data.map(t=>({...t,name:e.name}))})),{resolvedClassNames:ve,resolvedStyles:fe}=(0,b.Y)({classNames:r,styles:g,props:a}),ke=(0,S.I)({name:"ScatterChart",classes:N.A,props:a,className:o,style:f,classNames:r,styles:g,unstyled:K,attributes:de,vars:_,varsResolver:z}),ge="none"!==$&&("x"===G||"xy"===G),Ae="none"!==$&&("y"===G||"xy"===G),[Ce,be]=(0,i.useState)(null),Se=null!==Ce,Le=T?.map((e,t)=>{const a=(0,k.r)(e.color,xe);return(0,s.jsx)(n.e,{stroke:e.color?a:"var(--chart-grid-color)",strokeWidth:1,...e,label:{value:e.label,fill:e.color?a:"currentColor",fontSize:12,position:e.labelPosition??"insideBottomLeft"},...ke("referenceLine")},t)}),De=ye.map((e,t)=>{const a=Se&&Ce!==e.name;return(0,s.jsxs)(l.X,{data:e.data,fill:(0,k.r)(e.color,xe),isAnimationActive:!1,fillOpacity:a?.1:1,...le,children:[ce&&(0,s.jsx)(c.Z,{dataKey:ee[ce],fontSize:8,dy:10}),le?.children]},t)});return(0,s.jsx)(L.a,{ref:t,...ke("root"),onMouseLeave:e=>{be(null),U?.(e)},dir:Y||"ltr",...me,children:(0,s.jsx)(d.u,{...ke("container"),children:(0,s.jsxs)(m.t,{margin:{bottom:re?30:void 0,left:se?10:void 0,right:se?5:void 0},...J,children:[(0,s.jsx)(h.d,{strokeDasharray:H,vertical:"y"===$||"xy"===$,horizontal:"x"===$||"xy"===$,...ke("grid"),...R}),(0,s.jsxs)(p.W,{type:"number",hide:!W,dataKey:ee.x,tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:!!ge&&{stroke:"currentColor"},minTickGap:5,unit:ie?.x,tickFormatter:pe,...ke("axis"),...B,children:[re&&(0,s.jsx)(u.J,{position:"insideBottom",offset:-20,fontSize:12,...ke("axisLabel"),children:re}),B?.children]}),(0,s.jsxs)(x.h,{type:"number",hide:!X,axisLine:!1,dataKey:ee.y,tickLine:!!Ae&&{stroke:"currentColor"},tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},allowDecimals:!0,unit:ie?.y,tickFormatter:ue,...ke("axis"),...E,children:[se&&(0,s.jsx)(u.J,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...ke("axisLabel"),children:se}),E?.children]}),M&&(0,s.jsx)(y.m,{animationDuration:V,isAnimationActive:0!==V,position:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:H},content:({label:e,payload:t})=>(0,s.jsx)(j.I,{type:"scatter",label:e,payload:oe?t?.map(e=>({...e,name:oe[P(e.name,ee)]||e.name,value:he(P(e.name,ee))?.(e.value)??e.value})):t?.map(e=>({...e,value:he(P(e.name,ee))?.(e.value)??e.value})),classNames:ve,styles:fe,series:Q,attributes:de}),...Z}),F&&(0,s.jsx)(v.s,{verticalAlign:"top",content:e=>(0,s.jsx)(D._,{payload:e.payload?.map((e,t)=>({...e,dataKey:Q[t].name})),onHighlight:be,legendPosition:O?.verticalAlign||"top",classNames:ve,styles:fe,series:Q,attributes:de}),height:44,...O}),Le,De]})})})});K.displayName="@mantine/charts/ScatterChart",K.classes=N.A,a(9319);var _=a(3837),T=a(7479),Y=a(8734);const F=function(e){var t=e.setProps,a=e.loading_state,s=(e.clickData,e.hoverData,e.clickSeriesName,e.hoverSeriesName,e.scatterProps),i=e.data,n=e.dataKey,l=(0,r.Tt)(e,["setProps","loading_state","clickData","hoverData","clickSeriesName","hoverSeriesName","scatterProps","data","dataKey"]),c=(0,r.Cl)((0,r.Cl)({},s),{onClick:function(e){if((0,_.$Q)(e)){var a=(0,_.zD)(e);t({clickData:a,clickSeriesName:a.name})}},onMouseOver:function(e){if((0,_.$Q)(e)){var a=(0,_.zD)(e);t({hoverData:a,hoverSeriesName:a.name})}}});return o().createElement(K,(0,r.Cl)({"data-dash-is-loading":(0,T.A_)(a)||void 0},(0,Y.s)("ScatterChart",l),{data:i,dataKey:n,scatterProps:c}))}}}]);
|