@undp/data-viz 2.1.3 → 2.1.5
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/AreaChart.cjs +1 -1
- package/dist/AreaChart.cjs.map +1 -1
- package/dist/AreaChart.js +279 -272
- package/dist/AreaChart.js.map +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +2 -0
- package/dist/BarGraph.js +1795 -1724
- package/dist/BarGraph.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.js +312 -305
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.js +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.js +298 -287
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.js +224 -217
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.js +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +2 -2
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.js +404 -397
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.js +116 -113
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.js +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.js +320 -313
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.js +298 -291
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/{EmptyState-BZo1BbAn.js → EmptyState-C7ZXkZWd.js} +4 -4
- package/dist/EmptyState-C7ZXkZWd.js.map +1 -0
- package/dist/EmptyState-gLDRXBHm.cjs +2 -0
- package/dist/EmptyState-gLDRXBHm.cjs.map +1 -0
- package/dist/GraphEl-BixTEyKW.cjs +2 -0
- package/dist/GraphEl-BixTEyKW.cjs.map +1 -0
- package/dist/{GraphEl-CRrAlbcr.js → GraphEl-Dyu_EIQb.js} +3 -2
- package/dist/GraphEl-Dyu_EIQb.js.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.js +2 -2
- package/dist/GriddedGraphsFromConfig.cjs +1 -1
- package/dist/GriddedGraphsFromConfig.js +1 -1
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.js +179 -172
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +2 -2
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.js +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.js +368 -361
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardFromConfig.js +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.js +327 -320
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.js +374 -367
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.js +385 -378
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +1 -1
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.js +34 -33
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.js +176 -169
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.js +366 -359
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.js +285 -278
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.js +2 -2
- package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardFromConfig.js +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +1 -1
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.js +243 -236
- package/dist/SlopeChart.js.map +1 -1
- package/dist/Spinner-CQZcjzwd.cjs +2 -0
- package/dist/Spinner-CQZcjzwd.cjs.map +1 -0
- package/dist/{Spinner-D7rnnwnA.js → Spinner-DVBnY6Vg.js} +5 -5
- package/dist/Spinner-DVBnY6Vg.js.map +1 -0
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.js +293 -286
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.js +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.js +222 -215
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/index-R1gTfap5.js +337 -0
- package/dist/index-R1gTfap5.js.map +1 -0
- package/dist/index-WML2dCZ0.cjs +2 -0
- package/dist/{index-CF5hnGvG.cjs.map → index-WML2dCZ0.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/EmptyState-BZo1BbAn.js.map +0 -1
- package/dist/EmptyState-sAEZ_5rU.cjs +0 -2
- package/dist/EmptyState-sAEZ_5rU.cjs.map +0 -1
- package/dist/GraphEl-BLMih7RN.cjs +0 -2
- package/dist/GraphEl-BLMih7RN.cjs.map +0 -1
- package/dist/GraphEl-CRrAlbcr.js.map +0 -1
- package/dist/Spinner-D7rnnwnA.js.map +0 -1
- package/dist/Spinner-DRMBUsX7.cjs +0 -2
- package/dist/Spinner-DRMBUsX7.cjs.map +0 -1
- package/dist/index-CF5hnGvG.cjs +0 -2
- package/dist/index-DPGq3eIL.js +0 -330
- package/dist/index-DPGq3eIL.js.map +0 -1
package/dist/TreeMapGraph.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./index-CHPV5EwG-CTPQjnHt.cjs"),N=require("react"),Tt=require("./Typography-DX7PlgQU.cjs"),Kt=require("./Tooltip-uUdw6wJL.cjs"),Ut=require("./numberFormattingFunction-02t-wJta.cjs"),kt=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),et=require("./Colors.cjs"),Zt=require("./DetailsModal-BN0HDFlV.cjs"),Jt=require("./use-in-view-QcfiW0w3.cjs"),bt=require("./proxy-BxvUI_9l.cjs"),Qt=require("./index-DG2bgAva.cjs"),_t=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),te=require("./GraphFooter.cjs"),ee=require("./GraphHeader.cjs"),ne=require("./ColorLegendWithMouseOver.cjs"),ie=require("./EmptyState-sAEZ_5rU.cjs"),At=require("./uniqBy-O05lp2S5.cjs"),Lt=require("./GraphContainer-d8A46BK2.cjs");function oe(e){var t=0,n=e.children,i=n&&n.length;if(!i)t=1;else for(;--i>=0;)t+=n[i].value;e.value=t}function re(){return this.eachAfter(oe)}function ae(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this}function le(e,t){for(var n=this,i=[n],r,l,a=-1;n=i.pop();)if(e.call(t,n,++a,this),r=n.children)for(l=r.length-1;l>=0;--l)i.push(r[l]);return this}function se(e,t){for(var n=this,i=[n],r=[],l,a,d,g=-1;n=i.pop();)if(r.push(n),l=n.children)for(a=0,d=l.length;a<d;++a)i.push(l[a]);for(;n=r.pop();)e.call(t,n,++g,this);return this}function ue(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i}function ce(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].value;t.value=n})}function de(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function he(e){for(var t=this,n=fe(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i}function fe(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}function pe(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function ge(){return Array.from(this)}function me(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function ve(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*xe(){var e=this,t,n=[e],i,r,l;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(r=0,l=i.length;r<l;++r)n.push(i[r]);while(n.length)}function Gt(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=je)):t===void 0&&(t=we);for(var n=new vt(e),i,r=[n],l,a,d,g;i=r.pop();)if((a=t(i.data))&&(g=(a=Array.from(a)).length))for(i.children=a,d=g-1;d>=0;--d)r.push(l=a[d]=new vt(a[d])),l.parent=i,l.depth=i.depth+1;return n.eachBefore(Ht)}function ye(){return Gt(this).eachBefore(Ce)}function we(e){return e.children}function je(e){return Array.isArray(e)?e[1]:null}function Ce(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ht(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function vt(e){this.data=e,this.depth=this.height=0,this.parent=null}vt.prototype=Gt.prototype={constructor:vt,count:re,each:ae,eachAfter:se,eachBefore:le,find:ue,sum:ce,sort:de,path:he,ancestors:pe,descendants:ge,leaves:me,links:ve,copy:ye,[Symbol.iterator]:xe};function Bt(e){return e==null?null:Ft(e)}function Ft(e){if(typeof e!="function")throw new Error;return e}function gt(){return 0}function mt(e){return function(){return e}}function be(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Oe(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,y=e.value&&(i-t)/e.value;++d<g;)a=l[d],a.y0=n,a.y1=r,a.x0=t,a.x1=t+=a.value*y}var Me={depth:-1},Pt={},qt={};function Ee(e){return e.id}function Re(e){return e.parentId}function De(){var e=Ee,t=Re,n;function i(r){var l=Array.from(r),a=e,d=t,g,y,u,v,o,h,c,m,f=new Map;if(n!=null){const p=l.map((b,j)=>Se(n(b,j,r))),O=p.map(zt),R=new Set(p).add("");for(const b of O)R.has(b)||(R.add(b),p.push(b),O.push(zt(b)),l.push(qt));a=(b,j)=>p[j],d=(b,j)=>O[j]}for(u=0,g=l.length;u<g;++u)y=l[u],h=l[u]=new vt(y),(c=a(y,u,r))!=null&&(c+="")&&(m=h.id=c,f.set(m,f.has(m)?Pt:h)),(c=d(y,u,r))!=null&&(c+="")&&(h.parent=c);for(u=0;u<g;++u)if(h=l[u],c=h.parent){if(o=f.get(c),!o)throw new Error("missing: "+c);if(o===Pt)throw new Error("ambiguous: "+c);o.children?o.children.push(h):o.children=[h],h.parent=o}else{if(v)throw new Error("multiple roots");v=h}if(!v)throw new Error("no root");if(n!=null){for(;v.data===qt&&v.children.length===1;)v=v.children[0],--g;for(let p=l.length-1;p>=0&&(h=l[p],h.data===qt);--p)h.data=null}if(v.parent=Me,v.eachBefore(function(p){p.depth=p.parent.depth+1,--g}).eachBefore(Ht),v.parent=null,g>0)throw new Error("cycle");return v}return i.id=function(r){return arguments.length?(e=Bt(r),i):e},i.parentId=function(r){return arguments.length?(t=Bt(r),i):t},i.path=function(r){return arguments.length?(n=Bt(r),i):n},i}function Se(e){e=`${e}`;let t=e.length;return It(e,t-1)&&!It(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function zt(e){let t=e.length;if(t<2)return"";for(;--t>1&&!It(e,t););return e.slice(0,t)}function It(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if((n&1)===0)return!0}return!1}function ke(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,y=e.value&&(r-n)/e.value;++d<g;)a=l[d],a.x0=t,a.x1=i,a.y0=n,a.y1=n+=a.value*y}var Be=(1+Math.sqrt(5))/2;function qe(e,t,n,i,r,l){for(var a=[],d=t.children,g,y,u=0,v=0,o=d.length,h,c,m=t.value,f,p,O,R,b,j,M;u<o;){h=r-n,c=l-i;do f=d[v++].value;while(!f&&v<o);for(p=O=f,j=Math.max(c/h,h/c)/(m*e),M=f*f*j,b=Math.max(O/M,M/p);v<o;++v){if(f+=y=d[v].value,y<p&&(p=y),y>O&&(O=y),M=f*f*j,R=Math.max(O/M,M/p),R>b){f-=y;break}b=R}a.push(g={value:f,dice:h<c,children:d.slice(u,v)}),g.dice?Oe(g,n,i,r,m?i+=c*f/m:l):ke(g,n,i,m?n+=h*f/m:r,l),m-=f,u=v}return a}const Ie=(function e(t){function n(i,r,l,a,d){qe(t,i,r,l,a,d)}return n.ratio=function(i){return e((i=+i)>1?i:1)},n})(Be);function Ve(){var e=Ie,t=!1,n=1,i=1,r=[0],l=gt,a=gt,d=gt,g=gt,y=gt;function u(o){return o.x0=o.y0=0,o.x1=n,o.y1=i,o.eachBefore(v),r=[0],t&&o.eachBefore(be),o}function v(o){var h=r[o.depth],c=o.x0+h,m=o.y0+h,f=o.x1-h,p=o.y1-h;f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),o.x0=c,o.y0=m,o.x1=f,o.y1=p,o.children&&(h=r[o.depth+1]=l(o)/2,c+=y(o)-h,m+=a(o)-h,f-=d(o)-h,p-=g(o)-h,f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),e(o,c,m,f,p))}return u.round=function(o){return arguments.length?(t=!!o,u):t},u.size=function(o){return arguments.length?(n=+o[0],i=+o[1],u):[n,i]},u.tile=function(o){return arguments.length?(e=Ft(o),u):e},u.padding=function(o){return arguments.length?u.paddingInner(o).paddingOuter(o):u.paddingInner()},u.paddingInner=function(o){return arguments.length?(l=typeof o=="function"?o:mt(+o),u):l},u.paddingOuter=function(o){return arguments.length?u.paddingTop(o).paddingRight(o).paddingBottom(o).paddingLeft(o):u.paddingTop()},u.paddingTop=function(o){return arguments.length?(a=typeof o=="function"?o:mt(+o),u):a},u.paddingRight=function(o){return arguments.length?(d=typeof o=="function"?o:mt(+o),u):d},u.paddingBottom=function(o){return arguments.length?(g=typeof o=="function"?o:mt(+o),u):g},u.paddingLeft=function(o){return arguments.length?(y=typeof o=="function"?o:mt(+o),u):y},u}function Ne(e){const t=x.compilerRuntimeExports.c(73),{data:n,colors:i,leftMargin:r,width:l,height:a,colorDomain:d,rightMargin:g,topMargin:y,bottomMargin:u,showLabels:v,tooltip:o,onSeriesMouseOver:h,selectedColor:c,showValues:m,suffix:f,prefix:p,highlightedDataPoints:O,onSeriesMouseClick:R,resetSelectionOnDoubleClick:b,detailsOnClick:j,language:M,styles:k,classNames:D,animate:E,dimmedOpacity:U,precision:J}=e,ot=N.useRef(null);let nt;t[0]!==E.amount||t[1]!==E.once?(nt={once:E.once,amount:E.amount},t[0]=E.amount,t[1]=E.once,t[2]=nt):nt=t[2];const Q=Jt.useInView(ot,nt),[it,rt]=N.useState(void 0),[$,at]=N.useState(void 0),[_,lt]=N.useState(void 0),[tt,C]=N.useState(void 0);let w;t[3]!==u||t[4]!==r||t[5]!==g||t[6]!==y?(w={top:y,bottom:u,left:r,right:g},t[3]=u,t[4]=r,t[5]=g,t[6]=y,t[7]=w):w=t[7];const S=w,st=l-S.left-S.right,ut=a-S.top-S.bottom;let T,A,L,P,z,G,H,F,W;if(t[8]!==E.duration||t[9]!==D?.graphObjectValues||t[10]!==d||t[11]!==i||t[12]!==n||t[13]!==j||t[14]!==U||t[15]!==ut||t[16]!==st||t[17]!==a||t[18]!==O||t[19]!==Q||t[20]!==M||t[21]!==S.left||t[22]!==S.top||t[23]!==$||t[24]!==R||t[25]!==h||t[26]!==J||t[27]!==p||t[28]!==b||t[29]!==c||t[30]!==v||t[31]!==m||t[32]!==k?.graphObjectValues||t[33]!==f||t[34]!==l){const pt=[{id:"root",parent:void 0,value:void 0,data:void 0},...n.map(Fe)],ct=De().id(He).parentId(Ge)(pt);ct.sum(ze);const Z=Ve().size([st,ut]).padding(2)(ct);A=bt.motion.svg,z=`${l}px`,G=`${a}px`,H=`0 0 ${l} ${a}`,F="ltr",W=ot,P=`translate(${S.left},${S.top})`,T=Qt.AnimatePresence,L=Z.children?.map(s=>x.jsxRuntimeExports.jsxs(bt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:s.x0,y:s.y0},whileInView:{opacity:c?s.data.data.color&&i[d.indexOf(s.data.data.color)]===c?1:U:O.length!==0?O.indexOf(s.data.id)!==-1?.85:U:.85,x:s.x0,y:s.y0,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:K=>{rt(s.data.data),C(K.clientY),lt(K.clientX),h?.(s.data.data)},onClick:()=>{(R||j)&&($===s.data.id&&b?(at(void 0),R?.(void 0)):(at(s.data.id),R?.(s.data.data)))},onMouseMove:K=>{rt(s.data.data),C(K.clientY),lt(K.clientX)},onMouseLeave:()=>{rt(void 0),lt(void 0),C(void 0),h?.(void 0)},children:[x.jsxRuntimeExports.jsx(bt.motion.rect,{x:0,y:0,exit:{width:0,height:0,opacity:0,transition:{duration:E.duration}},variants:{initial:{width:0,height:0,fill:n.filter(Pe).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray},whileInView:{width:s.x1-s.x0,height:s.y1-s.y0,fill:n.filter(Le).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial"}),s.x1-s.x0>50&&s.y1-s.y0>25&&(v||m)?x.jsxRuntimeExports.jsx(bt.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:1,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},children:x.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:s.x1-s.x0,height:s.y1-s.y0,children:x.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 p-2 w-full",style:{color:kt.getTextColorBasedOnBgColor(n.filter(Ae).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray)},children:[v?x.jsxRuntimeExports.jsx(Tt.j,{marginBottom:"none",size:"sm",leading:"none",className:x.mo("w-full treemap-label",M==="ar"||M==="he"?"text-right":"text-left",D?.graphObjectValues),style:{WebkitLineClamp:s.y1-s.y0>50?s.y1-s.y0>100?s.y1-s.y0>150?void 0:3:2:1,display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",color:kt.getTextColorBasedOnBgColor(n.filter(Te).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray),...k?.graphObjectValues||{}},children:s.data.id}):null,m?x.jsxRuntimeExports.jsx(Tt.j,{marginBottom:"none",size:"sm",leading:"none",className:x.mo("w-full font-bold treemap-value",M==="ar"||M==="he"?"text-right":"text-left",D?.graphObjectValues),style:{color:kt.getTextColorBasedOnBgColor(n.filter($e).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray),...k?.graphObjectValues||{}},children:Ut.numberFormattingFunction(s.data.value,"NA",J,p,f)}):null]})})}):null]},s.data.id)),t[8]=E.duration,t[9]=D?.graphObjectValues,t[10]=d,t[11]=i,t[12]=n,t[13]=j,t[14]=U,t[15]=ut,t[16]=st,t[17]=a,t[18]=O,t[19]=Q,t[20]=M,t[21]=S.left,t[22]=S.top,t[23]=$,t[24]=R,t[25]=h,t[26]=J,t[27]=p,t[28]=b,t[29]=c,t[30]=v,t[31]=m,t[32]=k?.graphObjectValues,t[33]=f,t[34]=l,t[35]=T,t[36]=A,t[37]=L,t[38]=P,t[39]=z,t[40]=G,t[41]=H,t[42]=F,t[43]=W}else T=t[35],A=t[36],L=t[37],P=t[38],z=t[39],G=t[40],H=t[41],F=t[42],W=t[43];let X;t[44]!==T||t[45]!==L?(X=x.jsxRuntimeExports.jsx(T,{children:L}),t[44]=T,t[45]=L,t[46]=X):X=t[46];let B;t[47]!==P||t[48]!==X?(B=x.jsxRuntimeExports.jsx("g",{transform:P,children:X}),t[47]=P,t[48]=X,t[49]=B):B=t[49];let Y;t[50]!==A||t[51]!==B||t[52]!==z||t[53]!==G||t[54]!==H||t[55]!==F||t[56]!==W?(Y=x.jsxRuntimeExports.jsx(A,{width:z,height:G,viewBox:H,direction:F,ref:W,children:B}),t[50]=A,t[51]=B,t[52]=z,t[53]=G,t[54]=H,t[55]=F,t[56]=W,t[57]=Y):Y=t[57];let q;t[58]!==D?.tooltip||t[59]!==_||t[60]!==tt||t[61]!==it||t[62]!==k?.tooltip||t[63]!==o?(q=it&&o&&_&&tt?x.jsxRuntimeExports.jsx(Kt.Tooltip,{data:it,body:o,xPos:_,yPos:tt,backgroundStyle:k?.tooltip,className:D?.tooltip}):null,t[58]=D?.tooltip,t[59]=_,t[60]=tt,t[61]=it,t[62]=k?.tooltip,t[63]=o,t[64]=q):q=t[64];let I;t[65]!==D?.modal||t[66]!==j||t[67]!==$?(I=j&&$!==void 0?x.jsxRuntimeExports.jsx(Zt.DetailsModal,{body:j,data:$,setData:at,className:D?.modal}):null,t[65]=D?.modal,t[66]=j,t[67]=$,t[68]=I):I=t[68];let V;return t[69]!==Y||t[70]!==q||t[71]!==I?(V=x.jsxRuntimeExports.jsxs(x.jsxRuntimeExports.Fragment,{children:[Y,q,I]}),t[69]=Y,t[70]=q,t[71]=I,t[72]=V):V=t[72],V}function $e(e){return e.color}function Te(e){return e.color}function Ae(e){return e.color}function Le(e){return e.color}function Pe(e){return e.color}function ze(e){return e.value}function Ge(e){return e.parent}function He(e){return e.id}function Fe(e){return{id:e.label,value:e.size,parent:"root",data:e}}function We(e){const t=x.compilerRuntimeExports.c(71),{data:n,graphTitle:i,colors:r,suffix:l,sources:a,prefix:d,graphDescription:g,leftMargin:y,rightMargin:u,topMargin:v,bottomMargin:o,height:h,width:c,footNote:m,colorDomain:f,colorLegendTitle:p,padding:O,backgroundColor:R,showLabels:b,relativeHeight:j,tooltip:M,onSeriesMouseOver:k,showColorScale:D,showValues:E,graphID:U,highlightedDataPoints:J,onSeriesMouseClick:ot,graphDownload:nt,dataDownload:Q,language:it,showNAColor:rt,minHeight:$,theme:at,ariaLabel:_,resetSelectionOnDoubleClick:lt,detailsOnClick:tt,styles:C,classNames:w,animate:S,dimmedOpacity:st,precision:ut}=e,T=l===void 0?"":l,A=d===void 0?"":d,L=y===void 0?0:y,P=u===void 0?0:u,z=v===void 0?0:v,G=o===void 0?0:o,H=R===void 0?!1:R,F=b===void 0?!0:b,W=D===void 0?!0:D,X=E===void 0?!0:E;let B;t[0]!==J?(B=J===void 0?[]:J,t[0]=J,t[1]=B):B=t[1];const Y=B,q=nt===void 0?!1:nt,I=Q===void 0?!1:Q,V=it===void 0?"en":it,pt=rt===void 0?!0:rt,ct=$===void 0?0:$,Z=at===void 0?"light":at,s=lt===void 0?!0:lt,K=S===void 0?!1:S,Ot=st===void 0?.3:st,Mt=ut===void 0?2:ut,[xt,Wt]=N.useState(0),[yt,Xt]=N.useState(0),[Et,Yt]=N.useState(void 0),Rt=N.useRef(null),Vt=N.useRef(null);let wt,jt;t[2]===Symbol.for("react.memo_cache_sentinel")?(wt=()=>{const Nt=new ResizeObserver($t=>{Wt($t[0].target.clientWidth||620),Xt($t[0].target.clientHeight||480)});return Rt.current&&Nt.observe(Rt.current),()=>Nt.disconnect()},jt=[],t[2]=wt,t[3]=jt):(wt=t[2],jt=t[3]),N.useEffect(wt,jt);const Dt=w?.graphContainer,St=C?.graphContainer;let dt;t[4]!==w?.description||t[5]!==w?.title||t[6]!==n||t[7]!==I||t[8]!==g||t[9]!==q||t[10]!==i||t[11]!==C?.description||t[12]!==C?.title||t[13]!==c?(dt=i||g||q||I?x.jsxRuntimeExports.jsx(ee.GraphHeader,{styles:{title:C?.title,description:C?.description},classNames:{title:w?.title,description:w?.description},graphTitle:i,graphDescription:g,width:c,graphDownload:q?Vt:void 0,dataDownload:I?n.map(tn).filter(_e).length>0?n.map(Qe).filter(Je):n.filter(Ze):null}):null,t[4]=w?.description,t[5]=w?.title,t[6]=n,t[7]=I,t[8]=g,t[9]=q,t[10]=i,t[11]=C?.description,t[12]=C?.title,t[13]=c,t[14]=dt):dt=t[14];let ht;t[15]!==K||t[16]!==G||t[17]!==w||t[18]!==f||t[19]!==p||t[20]!==r||t[21]!==n||t[22]!==tt||t[23]!==Ot||t[24]!==Y||t[25]!==V||t[26]!==L||t[27]!==ot||t[28]!==k||t[29]!==Mt||t[30]!==A||t[31]!==s||t[32]!==P||t[33]!==Et||t[34]!==W||t[35]!==F||t[36]!==pt||t[37]!==X||t[38]!==C||t[39]!==T||t[40]!==yt||t[41]!==xt||t[42]!==Z||t[43]!==M||t[44]!==z||t[45]!==c?(ht=n.length===0?x.jsxRuntimeExports.jsx(ie.EmptyState,{}):x.jsxRuntimeExports.jsxs(x.jsxRuntimeExports.Fragment,{children:[W&&n.filter(Ue).length!==0?x.jsxRuntimeExports.jsx(ne.ColorLegendWithMouseOver,{width:c,colorLegendTitle:p,colors:r||et.Colors[Z].categoricalColors.colors,colorDomain:f||At.uniqBy(n,"color",!0),setSelectedColor:Yt,showNAColor:pt,className:w?.colorLegend}):null,x.jsxRuntimeExports.jsx(Lt.GraphArea,{ref:Rt,children:xt&&yt?x.jsxRuntimeExports.jsx(Ne,{data:n.filter(Ke),colors:n.filter(Ye).length===0?r?[r]:[et.Colors.primaryColors["blue-600"]]:r||et.Colors[Z].categoricalColors.colors,colorDomain:n.filter(Xe).length===0?[]:f||At.uniqBy(n,"color",!0),width:xt,height:yt,leftMargin:L,rightMargin:P,topMargin:z,bottomMargin:G,showLabels:F,showValues:X,suffix:T,prefix:A,selectedColor:Et,tooltip:M,onSeriesMouseOver:k,onSeriesMouseClick:ot,highlightedDataPoints:Y,resetSelectionOnDoubleClick:s,detailsOnClick:tt,styles:C,classNames:w,language:V,animate:K===!0?{duration:.5,once:!0,amount:.5}:K||{duration:0,once:!0,amount:0},dimmedOpacity:Ot,precision:Mt}):null})]}),t[15]=K,t[16]=G,t[17]=w,t[18]=f,t[19]=p,t[20]=r,t[21]=n,t[22]=tt,t[23]=Ot,t[24]=Y,t[25]=V,t[26]=L,t[27]=ot,t[28]=k,t[29]=Mt,t[30]=A,t[31]=s,t[32]=P,t[33]=Et,t[34]=W,t[35]=F,t[36]=pt,t[37]=X,t[38]=C,t[39]=T,t[40]=yt,t[41]=xt,t[42]=Z,t[43]=M,t[44]=z,t[45]=c,t[46]=ht):ht=t[46];let ft;t[47]!==w?.footnote||t[48]!==w?.source||t[49]!==m||t[50]!==a||t[51]!==C?.footnote||t[52]!==C?.source||t[53]!==c?(ft=a||m?x.jsxRuntimeExports.jsx(te.GraphFooter,{styles:{footnote:C?.footnote,source:C?.source},classNames:{footnote:w?.footnote,source:w?.source},sources:a,footNote:m,width:c}):null,t[47]=w?.footnote,t[48]=w?.source,t[49]=m,t[50]=a,t[51]=C?.footnote,t[52]=C?.source,t[53]=c,t[54]=ft):ft=t[54];let Ct;return t[55]!==_||t[56]!==H||t[57]!==U||t[58]!==h||t[59]!==V||t[60]!==ct||t[61]!==O||t[62]!==j||t[63]!==Dt||t[64]!==St||t[65]!==dt||t[66]!==ht||t[67]!==ft||t[68]!==Z||t[69]!==c?(Ct=x.jsxRuntimeExports.jsxs(Lt.GraphContainer,{className:Dt,style:St,id:U,ref:Vt,"aria-label":_,backgroundColor:H,theme:Z,language:V,minHeight:ct,width:c,height:h,relativeHeight:j,padding:O,children:[dt,ht,ft]}),t[55]=_,t[56]=H,t[57]=U,t[58]=h,t[59]=V,t[60]=ct,t[61]=O,t[62]=j,t[63]=Dt,t[64]=St,t[65]=dt,t[66]=ht,t[67]=ft,t[68]=Z,t[69]=c,t[70]=Ct):Ct=t[70],Ct}function Xe(e){return e.color}function Ye(e){return e.color}function Ke(e){return!_t.checkIfNullOrUndefined(e.size)}function Ue(e){return e.color}function Ze(e){return e!==void 0}function Je(e){return e!==void 0}function Qe(e){return e.data}function _e(e){return e!==void 0}function tn(e){return e.data}exports.TreeMapGraph=We;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index-CHPV5EwG-CTPQjnHt.cjs"),$=require("react"),Pt=require("./Typography-DX7PlgQU.cjs"),Jt=require("./Tooltip-uUdw6wJL.cjs"),Qt=require("./numberFormattingFunction-02t-wJta.cjs"),It=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),et=require("./Colors.cjs"),_t=require("./DetailsModal-BN0HDFlV.cjs"),te=require("./use-in-view-QcfiW0w3.cjs"),Et=require("./proxy-BxvUI_9l.cjs"),ee=require("./index-DG2bgAva.cjs"),ne=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ie=require("./GraphFooter.cjs"),oe=require("./GraphHeader.cjs"),re=require("./ColorLegendWithMouseOver.cjs"),ae=require("./EmptyState-gLDRXBHm.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),Gt=require("./GraphContainer-d8A46BK2.cjs");function le(e){var t=0,n=e.children,i=n&&n.length;if(!i)t=1;else for(;--i>=0;)t+=n[i].value;e.value=t}function se(){return this.eachAfter(le)}function ue(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this}function ce(e,t){for(var n=this,i=[n],r,l,a=-1;n=i.pop();)if(e.call(t,n,++a,this),r=n.children)for(l=r.length-1;l>=0;--l)i.push(r[l]);return this}function de(e,t){for(var n=this,i=[n],r=[],l,a,d,g=-1;n=i.pop();)if(r.push(n),l=n.children)for(a=0,d=l.length;a<d;++a)i.push(l[a]);for(;n=r.pop();)e.call(t,n,++g,this);return this}function he(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i}function fe(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].value;t.value=n})}function pe(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function ge(e){for(var t=this,n=me(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i}function me(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}function ve(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function xe(){return Array.from(this)}function ye(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function we(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*je(){var e=this,t,n=[e],i,r,l;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(r=0,l=i.length;r<l;++r)n.push(i[r]);while(n.length)}function Ft(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Oe)):t===void 0&&(t=be);for(var n=new wt(e),i,r=[n],l,a,d,g;i=r.pop();)if((a=t(i.data))&&(g=(a=Array.from(a)).length))for(i.children=a,d=g-1;d>=0;--d)r.push(l=a[d]=new wt(a[d])),l.parent=i,l.depth=i.depth+1;return n.eachBefore(Xt)}function Ce(){return Ft(this).eachBefore(Me)}function be(e){return e.children}function Oe(e){return Array.isArray(e)?e[1]:null}function Me(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Xt(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function wt(e){this.data=e,this.depth=this.height=0,this.parent=null}wt.prototype=Ft.prototype={constructor:wt,count:se,each:ue,eachAfter:de,eachBefore:ce,find:he,sum:fe,sort:pe,path:ge,ancestors:ve,descendants:xe,leaves:ye,links:we,copy:Ce,[Symbol.iterator]:je};function Vt(e){return e==null?null:Yt(e)}function Yt(e){if(typeof e!="function")throw new Error;return e}function xt(){return 0}function yt(e){return function(){return e}}function Ee(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Re(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,x=e.value&&(i-t)/e.value;++d<g;)a=l[d],a.y0=n,a.y1=r,a.x0=t,a.x1=t+=a.value*x}var De={depth:-1},Ht={},Nt={};function Se(e){return e.id}function ke(e){return e.parentId}function Be(){var e=Se,t=ke,n;function i(r){var l=Array.from(r),a=e,d=t,g,x,u,v,o,h,c,m,f=new Map;if(n!=null){const p=l.map((b,j)=>qe(n(b,j,r))),O=p.map(Wt),R=new Set(p).add("");for(const b of O)R.has(b)||(R.add(b),p.push(b),O.push(Wt(b)),l.push(Nt));a=(b,j)=>p[j],d=(b,j)=>O[j]}for(u=0,g=l.length;u<g;++u)x=l[u],h=l[u]=new wt(x),(c=a(x,u,r))!=null&&(c+="")&&(m=h.id=c,f.set(m,f.has(m)?Ht:h)),(c=d(x,u,r))!=null&&(c+="")&&(h.parent=c);for(u=0;u<g;++u)if(h=l[u],c=h.parent){if(o=f.get(c),!o)throw new Error("missing: "+c);if(o===Ht)throw new Error("ambiguous: "+c);o.children?o.children.push(h):o.children=[h],h.parent=o}else{if(v)throw new Error("multiple roots");v=h}if(!v)throw new Error("no root");if(n!=null){for(;v.data===Nt&&v.children.length===1;)v=v.children[0],--g;for(let p=l.length-1;p>=0&&(h=l[p],h.data===Nt);--p)h.data=null}if(v.parent=De,v.eachBefore(function(p){p.depth=p.parent.depth+1,--g}).eachBefore(Xt),v.parent=null,g>0)throw new Error("cycle");return v}return i.id=function(r){return arguments.length?(e=Vt(r),i):e},i.parentId=function(r){return arguments.length?(t=Vt(r),i):t},i.path=function(r){return arguments.length?(n=Vt(r),i):n},i}function qe(e){e=`${e}`;let t=e.length;return $t(e,t-1)&&!$t(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function Wt(e){let t=e.length;if(t<2)return"";for(;--t>1&&!$t(e,t););return e.slice(0,t)}function $t(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if((n&1)===0)return!0}return!1}function Ie(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,x=e.value&&(r-n)/e.value;++d<g;)a=l[d],a.x0=t,a.x1=i,a.y0=n,a.y1=n+=a.value*x}var Ve=(1+Math.sqrt(5))/2;function Ne(e,t,n,i,r,l){for(var a=[],d=t.children,g,x,u=0,v=0,o=d.length,h,c,m=t.value,f,p,O,R,b,j,M;u<o;){h=r-n,c=l-i;do f=d[v++].value;while(!f&&v<o);for(p=O=f,j=Math.max(c/h,h/c)/(m*e),M=f*f*j,b=Math.max(O/M,M/p);v<o;++v){if(f+=x=d[v].value,x<p&&(p=x),x>O&&(O=x),M=f*f*j,R=Math.max(O/M,M/p),R>b){f-=x;break}b=R}a.push(g={value:f,dice:h<c,children:d.slice(u,v)}),g.dice?Re(g,n,i,r,m?i+=c*f/m:l):Ie(g,n,i,m?n+=h*f/m:r,l),m-=f,u=v}return a}const $e=(function e(t){function n(i,r,l,a,d){Ne(t,i,r,l,a,d)}return n.ratio=function(i){return e((i=+i)>1?i:1)},n})(Ve);function Te(){var e=$e,t=!1,n=1,i=1,r=[0],l=xt,a=xt,d=xt,g=xt,x=xt;function u(o){return o.x0=o.y0=0,o.x1=n,o.y1=i,o.eachBefore(v),r=[0],t&&o.eachBefore(Ee),o}function v(o){var h=r[o.depth],c=o.x0+h,m=o.y0+h,f=o.x1-h,p=o.y1-h;f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),o.x0=c,o.y0=m,o.x1=f,o.y1=p,o.children&&(h=r[o.depth+1]=l(o)/2,c+=x(o)-h,m+=a(o)-h,f-=d(o)-h,p-=g(o)-h,f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),e(o,c,m,f,p))}return u.round=function(o){return arguments.length?(t=!!o,u):t},u.size=function(o){return arguments.length?(n=+o[0],i=+o[1],u):[n,i]},u.tile=function(o){return arguments.length?(e=Yt(o),u):e},u.padding=function(o){return arguments.length?u.paddingInner(o).paddingOuter(o):u.paddingInner()},u.paddingInner=function(o){return arguments.length?(l=typeof o=="function"?o:yt(+o),u):l},u.paddingOuter=function(o){return arguments.length?u.paddingTop(o).paddingRight(o).paddingBottom(o).paddingLeft(o):u.paddingTop()},u.paddingTop=function(o){return arguments.length?(a=typeof o=="function"?o:yt(+o),u):a},u.paddingRight=function(o){return arguments.length?(d=typeof o=="function"?o:yt(+o),u):d},u.paddingBottom=function(o){return arguments.length?(g=typeof o=="function"?o:yt(+o),u):g},u.paddingLeft=function(o){return arguments.length?(x=typeof o=="function"?o:yt(+o),u):x},u}function Ae(e){const t=y.compilerRuntimeExports.c(73),{data:n,colors:i,leftMargin:r,width:l,height:a,colorDomain:d,rightMargin:g,topMargin:x,bottomMargin:u,showLabels:v,tooltip:o,onSeriesMouseOver:h,selectedColor:c,showValues:m,suffix:f,prefix:p,highlightedDataPoints:O,onSeriesMouseClick:R,resetSelectionOnDoubleClick:b,detailsOnClick:j,language:M,styles:k,classNames:D,animate:E,dimmedOpacity:Z,precision:J}=e,ot=$.useRef(null);let nt;t[0]!==E.amount||t[1]!==E.once?(nt={once:E.once,amount:E.amount},t[0]=E.amount,t[1]=E.once,t[2]=nt):nt=t[2];const Q=te.useInView(ot,nt),[it,rt]=$.useState(void 0),[T,at]=$.useState(void 0),[_,lt]=$.useState(void 0),[tt,C]=$.useState(void 0);let w;t[3]!==u||t[4]!==r||t[5]!==g||t[6]!==x?(w={top:x,bottom:u,left:r,right:g},t[3]=u,t[4]=r,t[5]=g,t[6]=x,t[7]=w):w=t[7];const S=w,st=l-S.left-S.right,ut=a-S.top-S.bottom;let A,L,P,z,G,H,W,F,X;if(t[8]!==E.duration||t[9]!==D?.graphObjectValues||t[10]!==d||t[11]!==i||t[12]!==n||t[13]!==j||t[14]!==Z||t[15]!==ut||t[16]!==st||t[17]!==a||t[18]!==O||t[19]!==Q||t[20]!==M||t[21]!==S.left||t[22]!==S.top||t[23]!==T||t[24]!==R||t[25]!==h||t[26]!==J||t[27]!==p||t[28]!==b||t[29]!==c||t[30]!==v||t[31]!==m||t[32]!==k?.graphObjectValues||t[33]!==f||t[34]!==l){const vt=[{id:"root",parent:void 0,value:void 0,data:void 0},...n.map(Ye)],ct=Be().id(Xe).parentId(Fe)(vt);ct.sum(We);const N=Te().size([st,ut]).padding(2)(ct);L=Et.motion.svg,G=`${l}px`,H=`${a}px`,W=`0 0 ${l} ${a}`,F="ltr",X=ot,z=`translate(${S.left},${S.top})`,A=ee.AnimatePresence,P=N.children?.map(s=>y.jsxRuntimeExports.jsxs(Et.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:s.x0,y:s.y0},whileInView:{opacity:c?s.data.data.color&&i[d.indexOf(s.data.data.color)]===c?1:Z:O.length!==0?O.indexOf(s.data.id)!==-1?.85:Z:.85,x:s.x0,y:s.y0,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:U=>{rt(s.data.data),C(U.clientY),lt(U.clientX),h?.(s.data.data)},onClick:()=>{(R||j)&&(T===s.data.id&&b?(at(void 0),R?.(void 0)):(at(s.data.id),R?.(s.data.data)))},onMouseMove:U=>{rt(s.data.data),C(U.clientY),lt(U.clientX)},onMouseLeave:()=>{rt(void 0),lt(void 0),C(void 0),h?.(void 0)},children:[y.jsxRuntimeExports.jsx(Et.motion.rect,{x:0,y:0,exit:{width:0,height:0,opacity:0,transition:{duration:E.duration}},variants:{initial:{width:0,height:0,fill:n.filter(He).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray},whileInView:{width:s.x1-s.x0,height:s.y1-s.y0,fill:n.filter(Ge).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial"}),s.x1-s.x0>50&&s.y1-s.y0>25&&(v||m)?y.jsxRuntimeExports.jsx(Et.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:1,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},children:y.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:s.x1-s.x0,height:s.y1-s.y0,children:y.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 p-2 w-full",style:{color:It.getTextColorBasedOnBgColor(n.filter(ze).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray)},children:[v?y.jsxRuntimeExports.jsx(Pt.j,{marginBottom:"none",size:"sm",leading:"none",className:y.mo("w-full treemap-label",M==="ar"||M==="he"?"text-right":"text-left",D?.graphObjectValues),style:{WebkitLineClamp:s.y1-s.y0>50?s.y1-s.y0>100?s.y1-s.y0>150?void 0:3:2:1,display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",color:It.getTextColorBasedOnBgColor(n.filter(Pe).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray),...k?.graphObjectValues||{}},children:s.data.id}):null,m?y.jsxRuntimeExports.jsx(Pt.j,{marginBottom:"none",size:"sm",leading:"none",className:y.mo("w-full font-bold treemap-value",M==="ar"||M==="he"?"text-right":"text-left",D?.graphObjectValues),style:{color:It.getTextColorBasedOnBgColor(n.filter(Le).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray),...k?.graphObjectValues||{}},children:Qt.numberFormattingFunction(s.data.value,"NA",J,p,f)}):null]})})}):null]},s.data.id)),t[8]=E.duration,t[9]=D?.graphObjectValues,t[10]=d,t[11]=i,t[12]=n,t[13]=j,t[14]=Z,t[15]=ut,t[16]=st,t[17]=a,t[18]=O,t[19]=Q,t[20]=M,t[21]=S.left,t[22]=S.top,t[23]=T,t[24]=R,t[25]=h,t[26]=J,t[27]=p,t[28]=b,t[29]=c,t[30]=v,t[31]=m,t[32]=k?.graphObjectValues,t[33]=f,t[34]=l,t[35]=A,t[36]=L,t[37]=P,t[38]=z,t[39]=G,t[40]=H,t[41]=W,t[42]=F,t[43]=X}else A=t[35],L=t[36],P=t[37],z=t[38],G=t[39],H=t[40],W=t[41],F=t[42],X=t[43];let Y;t[44]!==A||t[45]!==P?(Y=y.jsxRuntimeExports.jsx(A,{children:P}),t[44]=A,t[45]=P,t[46]=Y):Y=t[46];let B;t[47]!==z||t[48]!==Y?(B=y.jsxRuntimeExports.jsx("g",{transform:z,children:Y}),t[47]=z,t[48]=Y,t[49]=B):B=t[49];let K;t[50]!==L||t[51]!==B||t[52]!==G||t[53]!==H||t[54]!==W||t[55]!==F||t[56]!==X?(K=y.jsxRuntimeExports.jsx(L,{width:G,height:H,viewBox:W,direction:F,ref:X,children:B}),t[50]=L,t[51]=B,t[52]=G,t[53]=H,t[54]=W,t[55]=F,t[56]=X,t[57]=K):K=t[57];let q;t[58]!==D?.tooltip||t[59]!==_||t[60]!==tt||t[61]!==it||t[62]!==k?.tooltip||t[63]!==o?(q=it&&o&&_&&tt?y.jsxRuntimeExports.jsx(Jt.Tooltip,{data:it,body:o,xPos:_,yPos:tt,backgroundStyle:k?.tooltip,className:D?.tooltip}):null,t[58]=D?.tooltip,t[59]=_,t[60]=tt,t[61]=it,t[62]=k?.tooltip,t[63]=o,t[64]=q):q=t[64];let I;t[65]!==D?.modal||t[66]!==j||t[67]!==T?(I=j&&T!==void 0?y.jsxRuntimeExports.jsx(_t.DetailsModal,{body:j,data:T,setData:at,className:D?.modal}):null,t[65]=D?.modal,t[66]=j,t[67]=T,t[68]=I):I=t[68];let V;return t[69]!==K||t[70]!==q||t[71]!==I?(V=y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[K,q,I]}),t[69]=K,t[70]=q,t[71]=I,t[72]=V):V=t[72],V}function Le(e){return e.color}function Pe(e){return e.color}function ze(e){return e.color}function Ge(e){return e.color}function He(e){return e.color}function We(e){return e.value}function Fe(e){return e.parent}function Xe(e){return e.id}function Ye(e){return{id:e.label,value:e.size,parent:"root",data:e}}function Ke(e){const t=y.compilerRuntimeExports.c(83),{data:n,graphTitle:i,colors:r,suffix:l,sources:a,prefix:d,graphDescription:g,leftMargin:x,rightMargin:u,topMargin:v,bottomMargin:o,height:h,width:c,footNote:m,colorDomain:f,colorLegendTitle:p,padding:O,backgroundColor:R,showLabels:b,relativeHeight:j,tooltip:M,onSeriesMouseOver:k,showColorScale:D,showValues:E,graphID:Z,highlightedDataPoints:J,onSeriesMouseClick:ot,graphDownload:nt,dataDownload:Q,language:it,showNAColor:rt,minHeight:T,theme:at,ariaLabel:_,resetSelectionOnDoubleClick:lt,detailsOnClick:tt,styles:C,classNames:w,animate:S,dimmedOpacity:st,precision:ut}=e,A=l===void 0?"":l,L=d===void 0?"":d,P=x===void 0?0:x,z=u===void 0?0:u,G=v===void 0?0:v,H=o===void 0?0:o,W=R===void 0?!1:R,F=b===void 0?!0:b,X=D===void 0?!0:D,Y=E===void 0?!0:E;let B;t[0]!==J?(B=J===void 0?[]:J,t[0]=J,t[1]=B):B=t[1];const K=B,q=nt===void 0?!1:nt,I=Q===void 0?!1:Q,V=it===void 0?"en":it,vt=rt===void 0?!0:rt,ct=T===void 0?0:T,N=at===void 0?"light":at,s=lt===void 0?!0:lt,U=S===void 0?!1:S,Rt=st===void 0?.3:st,Dt=ut===void 0?2:ut,[jt,Kt]=$.useState(0),[Ct,Ut]=$.useState(0),[St,Zt]=$.useState(void 0),kt=$.useRef(null),Tt=$.useRef(null);let bt,Ot;t[2]===Symbol.for("react.memo_cache_sentinel")?(bt=()=>{const At=new ResizeObserver(Lt=>{Kt(Lt[0].target.clientWidth||620),Ut(Lt[0].target.clientHeight||480)});return kt.current&&At.observe(kt.current),()=>At.disconnect()},Ot=[],t[2]=bt,t[3]=Ot):(bt=t[2],Ot=t[3]),$.useEffect(bt,Ot);const Bt=w?.graphContainer,qt=C?.graphContainer;let dt;t[4]!==w?.description||t[5]!==w?.title||t[6]!==n||t[7]!==I||t[8]!==g||t[9]!==q||t[10]!==i||t[11]!==C?.description||t[12]!==C?.title||t[13]!==c?(dt=i||g||q||I?y.jsxRuntimeExports.jsx(oe.GraphHeader,{styles:{title:C?.title,description:C?.description},classNames:{title:w?.title,description:w?.description},graphTitle:i,graphDescription:g,width:c,graphDownload:q?Tt:void 0,dataDownload:I?n.map(on).filter(nn).length>0?n.map(en).filter(tn):n.filter(_e):null}):null,t[4]=w?.description,t[5]=w?.title,t[6]=n,t[7]=I,t[8]=g,t[9]=q,t[10]=i,t[11]=C?.description,t[12]=C?.title,t[13]=c,t[14]=dt):dt=t[14];let ht;t[15]!==w?.colorLegend||t[16]!==f||t[17]!==p||t[18]!==r||t[19]!==n||t[20]!==X||t[21]!==vt||t[22]!==N||t[23]!==c?(ht=X&&n.filter(Qe).length!==0&&n.length>0?y.jsxRuntimeExports.jsx(re.ColorLegendWithMouseOver,{width:c,colorLegendTitle:p,colors:r||et.Colors[N].categoricalColors.colors,colorDomain:f||zt.uniqBy(n,"color",!0),setSelectedColor:Zt,showNAColor:vt,className:w?.colorLegend}):null,t[15]=w?.colorLegend,t[16]=f,t[17]=p,t[18]=r,t[19]=n,t[20]=X,t[21]=vt,t[22]=N,t[23]=c,t[24]=ht):ht=t[24];let ft;t[25]!==n.length?(ft=n.length===0&&y.jsxRuntimeExports.jsx(ae.EmptyState,{}),t[25]=n.length,t[26]=ft):ft=t[26];let pt;t[27]!==U||t[28]!==H||t[29]!==w||t[30]!==f||t[31]!==r||t[32]!==n||t[33]!==tt||t[34]!==Rt||t[35]!==K||t[36]!==V||t[37]!==P||t[38]!==ot||t[39]!==k||t[40]!==Dt||t[41]!==L||t[42]!==s||t[43]!==z||t[44]!==St||t[45]!==F||t[46]!==Y||t[47]!==C||t[48]!==A||t[49]!==Ct||t[50]!==jt||t[51]!==N||t[52]!==M||t[53]!==G?(pt=jt&&Ct&&n.length>0?y.jsxRuntimeExports.jsx(Ae,{data:n.filter(Je),colors:n.filter(Ze).length===0?r?[r]:[et.Colors.primaryColors["blue-600"]]:r||et.Colors[N].categoricalColors.colors,colorDomain:n.filter(Ue).length===0?[]:f||zt.uniqBy(n,"color",!0),width:jt,height:Ct,leftMargin:P,rightMargin:z,topMargin:G,bottomMargin:H,showLabels:F,showValues:Y,suffix:A,prefix:L,selectedColor:St,tooltip:M,onSeriesMouseOver:k,onSeriesMouseClick:ot,highlightedDataPoints:K,resetSelectionOnDoubleClick:s,detailsOnClick:tt,styles:C,classNames:w,language:V,animate:U===!0?{duration:.5,once:!0,amount:.5}:U||{duration:0,once:!0,amount:0},dimmedOpacity:Rt,precision:Dt}):null,t[27]=U,t[28]=H,t[29]=w,t[30]=f,t[31]=r,t[32]=n,t[33]=tt,t[34]=Rt,t[35]=K,t[36]=V,t[37]=P,t[38]=ot,t[39]=k,t[40]=Dt,t[41]=L,t[42]=s,t[43]=z,t[44]=St,t[45]=F,t[46]=Y,t[47]=C,t[48]=A,t[49]=Ct,t[50]=jt,t[51]=N,t[52]=M,t[53]=G,t[54]=pt):pt=t[54];let gt;t[55]!==ft||t[56]!==pt?(gt=y.jsxRuntimeExports.jsxs(Gt.GraphArea,{ref:kt,children:[ft,pt]}),t[55]=ft,t[56]=pt,t[57]=gt):gt=t[57];let mt;t[58]!==w?.footnote||t[59]!==w?.source||t[60]!==m||t[61]!==a||t[62]!==C?.footnote||t[63]!==C?.source||t[64]!==c?(mt=a||m?y.jsxRuntimeExports.jsx(ie.GraphFooter,{styles:{footnote:C?.footnote,source:C?.source},classNames:{footnote:w?.footnote,source:w?.source},sources:a,footNote:m,width:c}):null,t[58]=w?.footnote,t[59]=w?.source,t[60]=m,t[61]=a,t[62]=C?.footnote,t[63]=C?.source,t[64]=c,t[65]=mt):mt=t[65];let Mt;return t[66]!==_||t[67]!==W||t[68]!==Z||t[69]!==h||t[70]!==V||t[71]!==ct||t[72]!==O||t[73]!==j||t[74]!==Bt||t[75]!==qt||t[76]!==dt||t[77]!==ht||t[78]!==gt||t[79]!==mt||t[80]!==N||t[81]!==c?(Mt=y.jsxRuntimeExports.jsxs(Gt.GraphContainer,{className:Bt,style:qt,id:Z,ref:Tt,"aria-label":_,backgroundColor:W,theme:N,language:V,minHeight:ct,width:c,height:h,relativeHeight:j,padding:O,children:[dt,ht,gt,mt]}),t[66]=_,t[67]=W,t[68]=Z,t[69]=h,t[70]=V,t[71]=ct,t[72]=O,t[73]=j,t[74]=Bt,t[75]=qt,t[76]=dt,t[77]=ht,t[78]=gt,t[79]=mt,t[80]=N,t[81]=c,t[82]=Mt):Mt=t[82],Mt}function Ue(e){return e.color}function Ze(e){return e.color}function Je(e){return!ne.checkIfNullOrUndefined(e.size)}function Qe(e){return e.color}function _e(e){return e!==void 0}function tn(e){return e!==void 0}function en(e){return e.data}function nn(e){return e!==void 0}function on(e){return e.data}exports.TreeMapGraph=Ke;
|
|
2
2
|
//# sourceMappingURL=TreeMapGraph.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeMapGraph.cjs","sources":["../node_modules/d3-hierarchy/src/hierarchy/count.js","../node_modules/d3-hierarchy/src/hierarchy/each.js","../node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","../node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","../node_modules/d3-hierarchy/src/hierarchy/find.js","../node_modules/d3-hierarchy/src/hierarchy/sum.js","../node_modules/d3-hierarchy/src/hierarchy/sort.js","../node_modules/d3-hierarchy/src/hierarchy/path.js","../node_modules/d3-hierarchy/src/hierarchy/ancestors.js","../node_modules/d3-hierarchy/src/hierarchy/descendants.js","../node_modules/d3-hierarchy/src/hierarchy/leaves.js","../node_modules/d3-hierarchy/src/hierarchy/links.js","../node_modules/d3-hierarchy/src/hierarchy/iterator.js","../node_modules/d3-hierarchy/src/hierarchy/index.js","../node_modules/d3-hierarchy/src/accessors.js","../node_modules/d3-hierarchy/src/constant.js","../node_modules/d3-hierarchy/src/treemap/round.js","../node_modules/d3-hierarchy/src/treemap/dice.js","../node_modules/d3-hierarchy/src/stratify.js","../node_modules/d3-hierarchy/src/treemap/slice.js","../node_modules/d3-hierarchy/src/treemap/squarify.js","../node_modules/d3-hierarchy/src/treemap/index.js","../src/Components/Graphs/TreeMapGraph/Graph.tsx","../src/Components/Graphs/TreeMapGraph/index.tsx"],"sourcesContent":["function count(node) {\n var sum = 0,\n children = node.children,\n i = children && children.length;\n if (!i) sum = 1;\n else while (--i >= 0) sum += children[i].value;\n node.value = sum;\n}\n\nexport default function() {\n return this.eachAfter(count);\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], children, i, index = -1;\n while (node = nodes.pop()) {\n callback.call(that, node, ++index, this);\n if (children = node.children) {\n for (i = children.length - 1; i >= 0; --i) {\n nodes.push(children[i]);\n }\n }\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], next = [], children, i, n, index = -1;\n while (node = nodes.pop()) {\n next.push(node);\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n }\n while (node = next.pop()) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n if (callback.call(that, node, ++index, this)) {\n return node;\n }\n }\n}\n","export default function(value) {\n return this.eachAfter(function(node) {\n var sum = +value(node.data) || 0,\n children = node.children,\n i = children && children.length;\n while (--i >= 0) sum += children[i].value;\n node.value = sum;\n });\n}\n","export default function(compare) {\n return this.eachBefore(function(node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n}\n","export default function(end) {\n var start = this,\n ancestor = leastCommonAncestor(start, end),\n nodes = [start];\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n var k = nodes.length;\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = a.ancestors(),\n bNodes = b.ancestors(),\n c = null;\n a = aNodes.pop();\n b = bNodes.pop();\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n return c;\n}\n","export default function() {\n var node = this, nodes = [node];\n while (node = node.parent) {\n nodes.push(node);\n }\n return nodes;\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function() {\n var leaves = [];\n this.eachBefore(function(node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n}\n","export default function() {\n var root = this, links = [];\n root.each(function(node) {\n if (node !== root) { // Don’t include the root’s parent, if any.\n links.push({source: node.parent, target: node});\n }\n });\n return links;\n}\n","export default function*() {\n var node = this, current, next = [node], children, i, n;\n do {\n current = next.reverse(), next = [];\n while (node = current.pop()) {\n yield node;\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n }\n } while (next.length);\n}\n","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_find from \"./find.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nimport node_iterator from \"./iterator.js\";\n\nexport default function hierarchy(data, children) {\n if (data instanceof Map) {\n data = [undefined, data];\n if (children === undefined) children = mapChildren;\n } else if (children === undefined) {\n children = objectChildren;\n }\n\n var root = new Node(data),\n node,\n nodes = [root],\n child,\n childs,\n i,\n n;\n\n while (node = nodes.pop()) {\n if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {\n node.children = childs;\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = childs[i] = new Node(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n\n return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n return hierarchy(this).eachBefore(copyData);\n}\n\nfunction objectChildren(d) {\n return d.children;\n}\n\nfunction mapChildren(d) {\n return Array.isArray(d) ? d[1] : null;\n}\n\nfunction copyData(node) {\n if (node.data.value !== undefined) node.value = node.data.value;\n node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n var height = 0;\n do node.height = height;\n while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n this.data = data;\n this.depth =\n this.height = 0;\n this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n constructor: Node,\n count: node_count,\n each: node_each,\n eachAfter: node_eachAfter,\n eachBefore: node_eachBefore,\n find: node_find,\n sum: node_sum,\n sort: node_sort,\n path: node_path,\n ancestors: node_ancestors,\n descendants: node_descendants,\n leaves: node_leaves,\n links: node_links,\n copy: node_copy,\n [Symbol.iterator]: node_iterator\n};\n","export function optional(f) {\n return f == null ? null : required(f);\n}\n\nexport function required(f) {\n if (typeof f !== \"function\") throw new Error;\n return f;\n}\n","export function constantZero() {\n return 0;\n}\n\nexport default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(node) {\n node.x0 = Math.round(node.x0);\n node.y0 = Math.round(node.y0);\n node.x1 = Math.round(node.x1);\n node.y1 = Math.round(node.y1);\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (x1 - x0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.y0 = y0, node.y1 = y1;\n node.x0 = x0, node.x1 = x0 += node.value * k;\n }\n}\n","import {optional} from \"./accessors.js\";\nimport {Node, computeHeight} from \"./hierarchy/index.js\";\n\nvar preroot = {depth: -1},\n ambiguous = {},\n imputed = {};\n\nfunction defaultId(d) {\n return d.id;\n}\n\nfunction defaultParentId(d) {\n return d.parentId;\n}\n\nexport default function() {\n var id = defaultId,\n parentId = defaultParentId,\n path;\n\n function stratify(data) {\n var nodes = Array.from(data),\n currentId = id,\n currentParentId = parentId,\n n,\n d,\n i,\n root,\n parent,\n node,\n nodeId,\n nodeKey,\n nodeByKey = new Map;\n\n if (path != null) {\n const I = nodes.map((d, i) => normalize(path(d, i, data)));\n const P = I.map(parentof);\n const S = new Set(I).add(\"\");\n for (const i of P) {\n if (!S.has(i)) {\n S.add(i);\n I.push(i);\n P.push(parentof(i));\n nodes.push(imputed);\n }\n }\n currentId = (_, i) => I[i];\n currentParentId = (_, i) => P[i];\n }\n\n for (i = 0, n = nodes.length; i < n; ++i) {\n d = nodes[i], node = nodes[i] = new Node(d);\n if ((nodeId = currentId(d, i, data)) != null && (nodeId += \"\")) {\n nodeKey = node.id = nodeId;\n nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node);\n }\n if ((nodeId = currentParentId(d, i, data)) != null && (nodeId += \"\")) {\n node.parent = nodeId;\n }\n }\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (nodeId = node.parent) {\n parent = nodeByKey.get(nodeId);\n if (!parent) throw new Error(\"missing: \" + nodeId);\n if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n if (parent.children) parent.children.push(node);\n else parent.children = [node];\n node.parent = parent;\n } else {\n if (root) throw new Error(\"multiple roots\");\n root = node;\n }\n }\n\n if (!root) throw new Error(\"no root\");\n\n // When imputing internal nodes, only introduce roots if needed.\n // Then replace the imputed marker data with null.\n if (path != null) {\n while (root.data === imputed && root.children.length === 1) {\n root = root.children[0], --n;\n }\n for (let i = nodes.length - 1; i >= 0; --i) {\n node = nodes[i];\n if (node.data !== imputed) break;\n node.data = null;\n }\n }\n\n root.parent = preroot;\n root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight);\n root.parent = null;\n if (n > 0) throw new Error(\"cycle\");\n\n return root;\n }\n\n stratify.id = function(x) {\n return arguments.length ? (id = optional(x), stratify) : id;\n };\n\n stratify.parentId = function(x) {\n return arguments.length ? (parentId = optional(x), stratify) : parentId;\n };\n\n stratify.path = function(x) {\n return arguments.length ? (path = optional(x), stratify) : path;\n };\n\n return stratify;\n}\n\n// To normalize a path, we coerce to a string, strip the trailing slash if any\n// (as long as the trailing slash is not immediately preceded by another slash),\n// and add leading slash if missing.\nfunction normalize(path) {\n path = `${path}`;\n let i = path.length;\n if (slash(path, i - 1) && !slash(path, i - 2)) path = path.slice(0, -1);\n return path[0] === \"/\" ? path : `/${path}`;\n}\n\n// Walk backwards to find the first slash that is not the leading slash, e.g.:\n// \"/foo/bar\" ⇥ \"/foo\", \"/foo\" ⇥ \"/\", \"/\" ↦ \"\". (The root is special-cased\n// because the id of the root must be a truthy value.)\nfunction parentof(path) {\n let i = path.length;\n if (i < 2) return \"\";\n while (--i > 1) if (slash(path, i)) break;\n return path.slice(0, i);\n}\n\n// Slashes can be escaped; to determine whether a slash is a path delimiter, we\n// count the number of preceding backslashes escaping the forward slash: an odd\n// number indicates an escaped forward slash.\nfunction slash(path, i) {\n if (path[i] === \"/\") {\n let k = 0;\n while (i > 0 && path[--i] === \"\\\\\") ++k;\n if ((k & 1) === 0) return true;\n }\n return false;\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (y1 - y0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.x0 = x0, node.x1 = x1;\n node.y0 = y0, node.y1 = y0 += node.value * k;\n }\n}\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\n\nexport var phi = (1 + Math.sqrt(5)) / 2;\n\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n var rows = [],\n nodes = parent.children,\n row,\n nodeValue,\n i0 = 0,\n i1 = 0,\n n = nodes.length,\n dx, dy,\n value = parent.value,\n sumValue,\n minValue,\n maxValue,\n newRatio,\n minRatio,\n alpha,\n beta;\n\n while (i0 < n) {\n dx = x1 - x0, dy = y1 - y0;\n\n // Find the next non-empty node.\n do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue);\n\n // Keep adding nodes while the aspect ratio maintains or improves.\n for (; i1 < n; ++i1) {\n sumValue += nodeValue = nodes[i1].value;\n if (nodeValue < minValue) minValue = nodeValue;\n if (nodeValue > maxValue) maxValue = nodeValue;\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n minRatio = newRatio;\n }\n\n // Position and record the row orientation.\n rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n value -= sumValue, i0 = i1;\n }\n\n return rows;\n}\n\nexport default (function custom(ratio) {\n\n function squarify(parent, x0, y0, x1, y1) {\n squarifyRatio(ratio, parent, x0, y0, x1, y1);\n }\n\n squarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return squarify;\n})(phi);\n","import roundNode from \"./round.js\";\nimport squarify from \"./squarify.js\";\nimport {required} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\n\nexport default function() {\n var tile = squarify,\n round = false,\n dx = 1,\n dy = 1,\n paddingStack = [0],\n paddingInner = constantZero,\n paddingTop = constantZero,\n paddingRight = constantZero,\n paddingBottom = constantZero,\n paddingLeft = constantZero;\n\n function treemap(root) {\n root.x0 =\n root.y0 = 0;\n root.x1 = dx;\n root.y1 = dy;\n root.eachBefore(positionNode);\n paddingStack = [0];\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(node) {\n var p = paddingStack[node.depth],\n x0 = node.x0 + p,\n y0 = node.y0 + p,\n x1 = node.x1 - p,\n y1 = node.y1 - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n if (node.children) {\n p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n x0 += paddingLeft(node) - p;\n y0 += paddingTop(node) - p;\n x1 -= paddingRight(node) - p;\n y1 -= paddingBottom(node) - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n tile(node, x0, y0, x1, y1);\n }\n }\n\n treemap.round = function(x) {\n return arguments.length ? (round = !!x, treemap) : round;\n };\n\n treemap.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n };\n\n treemap.tile = function(x) {\n return arguments.length ? (tile = required(x), treemap) : tile;\n };\n\n treemap.padding = function(x) {\n return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n };\n\n treemap.paddingInner = function(x) {\n return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n };\n\n treemap.paddingOuter = function(x) {\n return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n };\n\n treemap.paddingTop = function(x) {\n return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n };\n\n treemap.paddingRight = function(x) {\n return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n };\n\n treemap.paddingBottom = function(x) {\n return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n };\n\n treemap.paddingLeft = function(x) {\n return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n };\n\n return treemap;\n}\n","import { stratify, treemap } from 'd3-hierarchy';\r\nimport { useRef, useState } from 'react';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { AnimateDataType, ClassNameObject, Languages, StyleObject, TreeMapDataType } from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: TreeMapDataType[];\r\n colors: string[];\r\n colorDomain: string[];\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n showLabels: boolean;\r\n showValues: boolean;\r\n width: number;\r\n height: number;\r\n suffix: string;\r\n prefix: string;\r\n selectedColor?: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n highlightedDataPoints: (string | number)[];\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n language?: Languages;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n precision: number;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n leftMargin,\r\n width,\r\n height,\r\n colorDomain,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n showLabels,\r\n tooltip,\r\n onSeriesMouseOver,\r\n selectedColor,\r\n showValues,\r\n suffix,\r\n prefix,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n language,\r\n styles,\r\n classNames,\r\n animate,\r\n dimmedOpacity,\r\n precision,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n\r\n const treeMapData = [\r\n {\r\n id: 'root',\r\n parent: undefined,\r\n value: undefined,\r\n data: undefined,\r\n },\r\n ...data.map((d: TreeMapDataType) => ({\r\n id: d.label,\r\n value: d.size,\r\n parent: 'root',\r\n data: d,\r\n })),\r\n ];\r\n const treeData = stratify()\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .id((d: any) => d.id)\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .parentId((d: any) => d.parent)(treeMapData);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n treeData.sum((d: any) => d.value);\r\n const treeMapVizData = treemap().size([graphWidth, graphHeight]).padding(2)(treeData);\r\n\r\n return (\r\n <>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n <AnimatePresence>\r\n {treeMapVizData.children?.map(d => {\r\n return (\r\n <motion.g\r\n className='undp-viz-g-with-hover'\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n key={(d.data as any).id}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: d.x0,\r\n y: d.y0,\r\n },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color\r\n ? colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ] === selectedColor\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n highlightedDataPoints.indexOf((d.data as any).id) !== -1\r\n ? 0.85\r\n : dimmedOpacity\r\n : 0.85,\r\n x: d.x0,\r\n y: d.y0,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseOverData((d.data as any).data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?.((d.data as any).data);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mouseClickData === (d.data as any).id &&\r\n resetSelectionOnDoubleClick\r\n ) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseClickData((d.data as any).id);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?.((d.data as any).data);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseOverData((d.data as any).data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n <motion.rect\r\n x={0}\r\n y={0}\r\n exit={{\r\n width: 0,\r\n height: 0,\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n variants={{\r\n initial: {\r\n width: 0,\r\n height: 0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n },\r\n whileInView: {\r\n width: d.x1 - d.x0,\r\n height: d.y1 - d.y0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n />\r\n {d.x1 - d.x0 > 50 && d.y1 - d.y0 > 25 && (showLabels || showValues) ? (\r\n <motion.g\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject y={0} x={0} width={d.x1 - d.x0} height={d.y1 - d.y0}>\r\n <div\r\n className='flex flex-col gap-0.5 p-2 w-full'\r\n style={{\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n ),\r\n }}\r\n >\r\n {showLabels ? (\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n leading='none'\r\n className={cn(\r\n 'w-full treemap-label',\r\n language === 'ar' || language === 'he' ? 'text-right' : 'text-left',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n WebkitLineClamp:\r\n d.y1 - d.y0 > 50\r\n ? d.y1 - d.y0 > 100\r\n ? d.y1 - d.y0 > 150\r\n ? undefined\r\n : 3\r\n : 2\r\n : 1,\r\n display: '-webkit-box',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n colorDomain.indexOf(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color,\r\n )\r\n ],\r\n ),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).id\r\n }\r\n </P>\r\n ) : null}\r\n {showValues ? (\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n leading='none'\r\n className={cn(\r\n 'w-full font-bold treemap-value',\r\n language === 'ar' || language === 'he' ? 'text-right' : 'text-left',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n colorDomain.indexOf(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color,\r\n )\r\n ],\r\n ),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {numberFormattingFunction(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).value,\r\n 'NA',\r\n precision,\r\n prefix,\r\n suffix,\r\n )}\r\n </P>\r\n ) : null}\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n </g>\r\n </motion.svg>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect } from 'react';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport {\r\n TreeMapDataType,\r\n SourcesDataType,\r\n Languages,\r\n StyleObject,\r\n ClassNameObject,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: TreeMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for circle */\r\n colors?: string | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n /** Maximum radius of the circle */\r\n\r\n // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function TreeMapGraph(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n graphDescription,\r\n leftMargin = 0,\r\n rightMargin = 0,\r\n topMargin = 0,\r\n bottomMargin = 0,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n padding,\r\n backgroundColor = false,\r\n showLabels = true,\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n showColorScale = true,\r\n showValues = true,\r\n graphID,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n language = 'en',\r\n showNAColor = true,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n precision = 2,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {showColorScale && data.filter(el => el.color).length !== 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={(colors as string[] | undefined) || Colors[theme].categoricalColors.colors}\r\n colorDomain={colorDomain || (uniqBy(data, 'color', true) as string[])}\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n className={classNames?.colorLegend}\r\n />\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight ? (\r\n <Graph\r\n data={data.filter(d => !checkIfNullOrUndefined(d.size))}\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain || (uniqBy(data, 'color', true) as string[])\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n showLabels={showLabels}\r\n showValues={showValues}\r\n suffix={suffix}\r\n prefix={prefix}\r\n selectedColor={selectedColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n language={language}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n />\r\n ) : null}\r\n </GraphArea>\r\n </>\r\n )}\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["count","node","sum","children","node_count","node_each","callback","that","index","node_eachBefore","nodes","i","node_eachAfter","next","n","node_find","node_sum","value","node_sort","compare","node_path","end","start","ancestor","leastCommonAncestor","k","a","b","aNodes","bNodes","c","node_ancestors","node_descendants","node_leaves","leaves","node_links","root","links","node_iterator","current","hierarchy","data","mapChildren","objectChildren","Node","child","childs","computeHeight","node_copy","copyData","d","height","optional","f","required","constantZero","constant","x","roundNode","treemapDice","parent","x0","y0","x1","y1","preroot","ambiguous","imputed","defaultId","defaultParentId","stratify","id","parentId","path","currentId","currentParentId","nodeId","nodeKey","nodeByKey","I","normalize","P","parentof","S","_","slash","treemapSlice","phi","squarifyRatio","ratio","rows","row","nodeValue","i0","i1","dx","dy","sumValue","minValue","maxValue","newRatio","minRatio","alpha","beta","squarify","custom","treemap","tile","round","paddingStack","paddingInner","paddingTop","paddingRight","paddingBottom","paddingLeft","positionNode","p","Graph","props","$","_c","colors","leftMargin","width","colorDomain","rightMargin","topMargin","bottomMargin","showLabels","tooltip","onSeriesMouseOver","selectedColor","showValues","suffix","prefix","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","language","styles","classNames","animate","dimmedOpacity","precision","svgRef","useRef","t0","amount","once","isInView","useInView","mouseOverData","setMouseOverData","useState","undefined","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","t1","top","bottom","left","right","margin","graphWidth","graphHeight","T0","T1","t2","t3","t4","t5","t6","t7","t8","duration","graphObjectValues","treeMapData","map","_temp","treeData","_temp2","_temp3","_temp4","treeMapVizData","size","padding","motion","svg","AnimatePresence","d_3","jsxs","initial","opacity","y","whileInView","color","indexOf","length","transition","event","clientY","clientX","event_0","jsx","fill","filter","_temp5","Colors","gray","_temp6","getTextColorBasedOnBgColor","_temp7","cn","WebkitLineClamp","display","WebkitBoxOrient","overflow","_temp8","_temp9","numberFormattingFunction","t9","t10","t11","t12","Tooltip","t13","modal","DetailsModal","t14","Fragment","el_3","el","el_2","el_1","el_0","d_2","d_1","d_0","label","TreeMapGraph","graphTitle","sources","graphDescription","footNote","colorLegendTitle","backgroundColor","relativeHeight","showColorScale","graphID","graphDownload","dataDownload","showNAColor","minHeight","t15","theme","t16","ariaLabel","t17","t18","t19","t20","t21","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","t22","t23","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","useEffect","t24","graphContainer","t25","t26","description","title","GraphHeader","t27","EmptyState","ColorLegendWithMouseOver","categoricalColors","uniqBy","colorLegend","GraphArea","primaryColors","t28","footnote","source","GraphFooter","t29","GraphContainer","d_4","checkIfNullOrUndefined"],"mappings":"4xBAAA,SAASA,GAAMC,EAAM,CACnB,IAAIC,EAAM,EACNC,EAAWF,EAAK,SAChB,EAAIE,GAAYA,EAAS,OAC7B,GAAI,CAAC,EAAGD,EAAM,MACT,MAAO,EAAE,GAAK,GAAGA,GAAOC,EAAS,CAAC,EAAE,MACzCF,EAAK,MAAQC,CACf,CAEe,SAAAE,IAAW,CACxB,OAAO,KAAK,UAAUJ,EAAK,CAC7B,CCXe,SAAAK,GAASC,EAAUC,EAAM,CACtC,IAAIC,EAAQ,GACZ,UAAWP,KAAQ,KACjBK,EAAS,KAAKC,EAAMN,EAAM,EAAEO,EAAO,IAAI,EAEzC,OAAO,IACT,CCNe,SAAAC,GAASH,EAAUC,EAAM,CAEtC,QADIN,EAAO,KAAMS,EAAQ,CAACT,CAAI,EAAGE,EAAUQ,EAAGH,EAAQ,GAC/CP,EAAOS,EAAM,OAElB,GADAJ,EAAS,KAAKC,EAAMN,EAAM,EAAEO,EAAO,IAAI,EACnCL,EAAWF,EAAK,SAClB,IAAKU,EAAIR,EAAS,OAAS,EAAGQ,GAAK,EAAG,EAAEA,EACtCD,EAAM,KAAKP,EAASQ,CAAC,CAAC,EAI5B,OAAO,IACT,CCXe,SAAAC,GAASN,EAAUC,EAAM,CAEtC,QADIN,EAAO,KAAMS,EAAQ,CAACT,CAAI,EAAGY,EAAO,CAAA,EAAIV,EAAUQ,EAAGG,EAAGN,EAAQ,GAC7DP,EAAOS,EAAM,OAElB,GADAG,EAAK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MAAA2K,GAAA3K,MAAA+K,GAAA/K,MAAAuL,GAAAvL,MAAA4I,EAAA5I,MAAAI,EAAAJ,MAAA2L,IAAAA,GAAA3L,EAAA,EAAA,EAjHjB2L,EAiHiB,CA9Kd,SAAAnF,GAAAe,EAAA,CAAA,OA8H6BF,EAAEpC,KAAM,CA9HrC,SAAAsB,GAAAiB,EAAA,CAAA,OAuH6BH,EAAEpC,KAAM,CAvHrC,SAAAgB,GAAA4F,EAAA,CAAA,MAqHgC,CAACC,GAAAA,uBAAuBnQ,EAAC2I,IAAK,CAAC,CArH/D,SAAAyB,GAAAsB,EAAA,CAAA,OAuGwCA,EAAEpC,KAAM,CAvGhD,SAAAW,GAAA8B,EAAA,CAAA,OA8F4B/L,IAAMyG,MAAS,CA9F3C,SAAAgC,GAAAuD,EAAA,CAAA,OA6F6ChM,IAAMyG,MAAS,CA7F5D,SAAA+B,GAAAxI,EAAA,CAAA,OA6FyBA,EAACT,IAAK,CA7F/B,SAAAgJ,GAAAS,EAAA,CAAA,OA4F2ChJ,IAAMyG,MAAS,CA5F1D,SAAA4B,GAAAyD,EAAA,CAAA,OA4FuB9L,EAACT,IAAK","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]}
|
|
1
|
+
{"version":3,"file":"TreeMapGraph.cjs","sources":["../node_modules/d3-hierarchy/src/hierarchy/count.js","../node_modules/d3-hierarchy/src/hierarchy/each.js","../node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","../node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","../node_modules/d3-hierarchy/src/hierarchy/find.js","../node_modules/d3-hierarchy/src/hierarchy/sum.js","../node_modules/d3-hierarchy/src/hierarchy/sort.js","../node_modules/d3-hierarchy/src/hierarchy/path.js","../node_modules/d3-hierarchy/src/hierarchy/ancestors.js","../node_modules/d3-hierarchy/src/hierarchy/descendants.js","../node_modules/d3-hierarchy/src/hierarchy/leaves.js","../node_modules/d3-hierarchy/src/hierarchy/links.js","../node_modules/d3-hierarchy/src/hierarchy/iterator.js","../node_modules/d3-hierarchy/src/hierarchy/index.js","../node_modules/d3-hierarchy/src/accessors.js","../node_modules/d3-hierarchy/src/constant.js","../node_modules/d3-hierarchy/src/treemap/round.js","../node_modules/d3-hierarchy/src/treemap/dice.js","../node_modules/d3-hierarchy/src/stratify.js","../node_modules/d3-hierarchy/src/treemap/slice.js","../node_modules/d3-hierarchy/src/treemap/squarify.js","../node_modules/d3-hierarchy/src/treemap/index.js","../src/Components/Graphs/TreeMapGraph/Graph.tsx","../src/Components/Graphs/TreeMapGraph/index.tsx"],"sourcesContent":["function count(node) {\n var sum = 0,\n children = node.children,\n i = children && children.length;\n if (!i) sum = 1;\n else while (--i >= 0) sum += children[i].value;\n node.value = sum;\n}\n\nexport default function() {\n return this.eachAfter(count);\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], children, i, index = -1;\n while (node = nodes.pop()) {\n callback.call(that, node, ++index, this);\n if (children = node.children) {\n for (i = children.length - 1; i >= 0; --i) {\n nodes.push(children[i]);\n }\n }\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], next = [], children, i, n, index = -1;\n while (node = nodes.pop()) {\n next.push(node);\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n }\n while (node = next.pop()) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n if (callback.call(that, node, ++index, this)) {\n return node;\n }\n }\n}\n","export default function(value) {\n return this.eachAfter(function(node) {\n var sum = +value(node.data) || 0,\n children = node.children,\n i = children && children.length;\n while (--i >= 0) sum += children[i].value;\n node.value = sum;\n });\n}\n","export default function(compare) {\n return this.eachBefore(function(node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n}\n","export default function(end) {\n var start = this,\n ancestor = leastCommonAncestor(start, end),\n nodes = [start];\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n var k = nodes.length;\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = a.ancestors(),\n bNodes = b.ancestors(),\n c = null;\n a = aNodes.pop();\n b = bNodes.pop();\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n return c;\n}\n","export default function() {\n var node = this, nodes = [node];\n while (node = node.parent) {\n nodes.push(node);\n }\n return nodes;\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function() {\n var leaves = [];\n this.eachBefore(function(node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n}\n","export default function() {\n var root = this, links = [];\n root.each(function(node) {\n if (node !== root) { // Don’t include the root’s parent, if any.\n links.push({source: node.parent, target: node});\n }\n });\n return links;\n}\n","export default function*() {\n var node = this, current, next = [node], children, i, n;\n do {\n current = next.reverse(), next = [];\n while (node = current.pop()) {\n yield node;\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n }\n } while (next.length);\n}\n","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_find from \"./find.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nimport node_iterator from \"./iterator.js\";\n\nexport default function hierarchy(data, children) {\n if (data instanceof Map) {\n data = [undefined, data];\n if (children === undefined) children = mapChildren;\n } else if (children === undefined) {\n children = objectChildren;\n }\n\n var root = new Node(data),\n node,\n nodes = [root],\n child,\n childs,\n i,\n n;\n\n while (node = nodes.pop()) {\n if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {\n node.children = childs;\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = childs[i] = new Node(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n\n return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n return hierarchy(this).eachBefore(copyData);\n}\n\nfunction objectChildren(d) {\n return d.children;\n}\n\nfunction mapChildren(d) {\n return Array.isArray(d) ? d[1] : null;\n}\n\nfunction copyData(node) {\n if (node.data.value !== undefined) node.value = node.data.value;\n node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n var height = 0;\n do node.height = height;\n while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n this.data = data;\n this.depth =\n this.height = 0;\n this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n constructor: Node,\n count: node_count,\n each: node_each,\n eachAfter: node_eachAfter,\n eachBefore: node_eachBefore,\n find: node_find,\n sum: node_sum,\n sort: node_sort,\n path: node_path,\n ancestors: node_ancestors,\n descendants: node_descendants,\n leaves: node_leaves,\n links: node_links,\n copy: node_copy,\n [Symbol.iterator]: node_iterator\n};\n","export function optional(f) {\n return f == null ? null : required(f);\n}\n\nexport function required(f) {\n if (typeof f !== \"function\") throw new Error;\n return f;\n}\n","export function constantZero() {\n return 0;\n}\n\nexport default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(node) {\n node.x0 = Math.round(node.x0);\n node.y0 = Math.round(node.y0);\n node.x1 = Math.round(node.x1);\n node.y1 = Math.round(node.y1);\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (x1 - x0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.y0 = y0, node.y1 = y1;\n node.x0 = x0, node.x1 = x0 += node.value * k;\n }\n}\n","import {optional} from \"./accessors.js\";\nimport {Node, computeHeight} from \"./hierarchy/index.js\";\n\nvar preroot = {depth: -1},\n ambiguous = {},\n imputed = {};\n\nfunction defaultId(d) {\n return d.id;\n}\n\nfunction defaultParentId(d) {\n return d.parentId;\n}\n\nexport default function() {\n var id = defaultId,\n parentId = defaultParentId,\n path;\n\n function stratify(data) {\n var nodes = Array.from(data),\n currentId = id,\n currentParentId = parentId,\n n,\n d,\n i,\n root,\n parent,\n node,\n nodeId,\n nodeKey,\n nodeByKey = new Map;\n\n if (path != null) {\n const I = nodes.map((d, i) => normalize(path(d, i, data)));\n const P = I.map(parentof);\n const S = new Set(I).add(\"\");\n for (const i of P) {\n if (!S.has(i)) {\n S.add(i);\n I.push(i);\n P.push(parentof(i));\n nodes.push(imputed);\n }\n }\n currentId = (_, i) => I[i];\n currentParentId = (_, i) => P[i];\n }\n\n for (i = 0, n = nodes.length; i < n; ++i) {\n d = nodes[i], node = nodes[i] = new Node(d);\n if ((nodeId = currentId(d, i, data)) != null && (nodeId += \"\")) {\n nodeKey = node.id = nodeId;\n nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node);\n }\n if ((nodeId = currentParentId(d, i, data)) != null && (nodeId += \"\")) {\n node.parent = nodeId;\n }\n }\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (nodeId = node.parent) {\n parent = nodeByKey.get(nodeId);\n if (!parent) throw new Error(\"missing: \" + nodeId);\n if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n if (parent.children) parent.children.push(node);\n else parent.children = [node];\n node.parent = parent;\n } else {\n if (root) throw new Error(\"multiple roots\");\n root = node;\n }\n }\n\n if (!root) throw new Error(\"no root\");\n\n // When imputing internal nodes, only introduce roots if needed.\n // Then replace the imputed marker data with null.\n if (path != null) {\n while (root.data === imputed && root.children.length === 1) {\n root = root.children[0], --n;\n }\n for (let i = nodes.length - 1; i >= 0; --i) {\n node = nodes[i];\n if (node.data !== imputed) break;\n node.data = null;\n }\n }\n\n root.parent = preroot;\n root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight);\n root.parent = null;\n if (n > 0) throw new Error(\"cycle\");\n\n return root;\n }\n\n stratify.id = function(x) {\n return arguments.length ? (id = optional(x), stratify) : id;\n };\n\n stratify.parentId = function(x) {\n return arguments.length ? (parentId = optional(x), stratify) : parentId;\n };\n\n stratify.path = function(x) {\n return arguments.length ? (path = optional(x), stratify) : path;\n };\n\n return stratify;\n}\n\n// To normalize a path, we coerce to a string, strip the trailing slash if any\n// (as long as the trailing slash is not immediately preceded by another slash),\n// and add leading slash if missing.\nfunction normalize(path) {\n path = `${path}`;\n let i = path.length;\n if (slash(path, i - 1) && !slash(path, i - 2)) path = path.slice(0, -1);\n return path[0] === \"/\" ? path : `/${path}`;\n}\n\n// Walk backwards to find the first slash that is not the leading slash, e.g.:\n// \"/foo/bar\" ⇥ \"/foo\", \"/foo\" ⇥ \"/\", \"/\" ↦ \"\". (The root is special-cased\n// because the id of the root must be a truthy value.)\nfunction parentof(path) {\n let i = path.length;\n if (i < 2) return \"\";\n while (--i > 1) if (slash(path, i)) break;\n return path.slice(0, i);\n}\n\n// Slashes can be escaped; to determine whether a slash is a path delimiter, we\n// count the number of preceding backslashes escaping the forward slash: an odd\n// number indicates an escaped forward slash.\nfunction slash(path, i) {\n if (path[i] === \"/\") {\n let k = 0;\n while (i > 0 && path[--i] === \"\\\\\") ++k;\n if ((k & 1) === 0) return true;\n }\n return false;\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (y1 - y0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.x0 = x0, node.x1 = x1;\n node.y0 = y0, node.y1 = y0 += node.value * k;\n }\n}\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\n\nexport var phi = (1 + Math.sqrt(5)) / 2;\n\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n var rows = [],\n nodes = parent.children,\n row,\n nodeValue,\n i0 = 0,\n i1 = 0,\n n = nodes.length,\n dx, dy,\n value = parent.value,\n sumValue,\n minValue,\n maxValue,\n newRatio,\n minRatio,\n alpha,\n beta;\n\n while (i0 < n) {\n dx = x1 - x0, dy = y1 - y0;\n\n // Find the next non-empty node.\n do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue);\n\n // Keep adding nodes while the aspect ratio maintains or improves.\n for (; i1 < n; ++i1) {\n sumValue += nodeValue = nodes[i1].value;\n if (nodeValue < minValue) minValue = nodeValue;\n if (nodeValue > maxValue) maxValue = nodeValue;\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n minRatio = newRatio;\n }\n\n // Position and record the row orientation.\n rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n value -= sumValue, i0 = i1;\n }\n\n return rows;\n}\n\nexport default (function custom(ratio) {\n\n function squarify(parent, x0, y0, x1, y1) {\n squarifyRatio(ratio, parent, x0, y0, x1, y1);\n }\n\n squarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return squarify;\n})(phi);\n","import roundNode from \"./round.js\";\nimport squarify from \"./squarify.js\";\nimport {required} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\n\nexport default function() {\n var tile = squarify,\n round = false,\n dx = 1,\n dy = 1,\n paddingStack = [0],\n paddingInner = constantZero,\n paddingTop = constantZero,\n paddingRight = constantZero,\n paddingBottom = constantZero,\n paddingLeft = constantZero;\n\n function treemap(root) {\n root.x0 =\n root.y0 = 0;\n root.x1 = dx;\n root.y1 = dy;\n root.eachBefore(positionNode);\n paddingStack = [0];\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(node) {\n var p = paddingStack[node.depth],\n x0 = node.x0 + p,\n y0 = node.y0 + p,\n x1 = node.x1 - p,\n y1 = node.y1 - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n if (node.children) {\n p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n x0 += paddingLeft(node) - p;\n y0 += paddingTop(node) - p;\n x1 -= paddingRight(node) - p;\n y1 -= paddingBottom(node) - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n tile(node, x0, y0, x1, y1);\n }\n }\n\n treemap.round = function(x) {\n return arguments.length ? (round = !!x, treemap) : round;\n };\n\n treemap.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n };\n\n treemap.tile = function(x) {\n return arguments.length ? (tile = required(x), treemap) : tile;\n };\n\n treemap.padding = function(x) {\n return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n };\n\n treemap.paddingInner = function(x) {\n return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n };\n\n treemap.paddingOuter = function(x) {\n return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n };\n\n treemap.paddingTop = function(x) {\n return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n };\n\n treemap.paddingRight = function(x) {\n return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n };\n\n treemap.paddingBottom = function(x) {\n return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n };\n\n treemap.paddingLeft = function(x) {\n return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n };\n\n return treemap;\n}\n","import { stratify, treemap } from 'd3-hierarchy';\r\nimport { useRef, useState } from 'react';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { AnimateDataType, ClassNameObject, Languages, StyleObject, TreeMapDataType } from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: TreeMapDataType[];\r\n colors: string[];\r\n colorDomain: string[];\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n showLabels: boolean;\r\n showValues: boolean;\r\n width: number;\r\n height: number;\r\n suffix: string;\r\n prefix: string;\r\n selectedColor?: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n highlightedDataPoints: (string | number)[];\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n language?: Languages;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n precision: number;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n leftMargin,\r\n width,\r\n height,\r\n colorDomain,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n showLabels,\r\n tooltip,\r\n onSeriesMouseOver,\r\n selectedColor,\r\n showValues,\r\n suffix,\r\n prefix,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n language,\r\n styles,\r\n classNames,\r\n animate,\r\n dimmedOpacity,\r\n precision,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n\r\n const treeMapData = [\r\n {\r\n id: 'root',\r\n parent: undefined,\r\n value: undefined,\r\n data: undefined,\r\n },\r\n ...data.map((d: TreeMapDataType) => ({\r\n id: d.label,\r\n value: d.size,\r\n parent: 'root',\r\n data: d,\r\n })),\r\n ];\r\n const treeData = stratify()\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .id((d: any) => d.id)\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .parentId((d: any) => d.parent)(treeMapData);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n treeData.sum((d: any) => d.value);\r\n const treeMapVizData = treemap().size([graphWidth, graphHeight]).padding(2)(treeData);\r\n\r\n return (\r\n <>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n <AnimatePresence>\r\n {treeMapVizData.children?.map(d => {\r\n return (\r\n <motion.g\r\n className='undp-viz-g-with-hover'\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n key={(d.data as any).id}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: d.x0,\r\n y: d.y0,\r\n },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color\r\n ? colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ] === selectedColor\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n highlightedDataPoints.indexOf((d.data as any).id) !== -1\r\n ? 0.85\r\n : dimmedOpacity\r\n : 0.85,\r\n x: d.x0,\r\n y: d.y0,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseOverData((d.data as any).data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?.((d.data as any).data);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mouseClickData === (d.data as any).id &&\r\n resetSelectionOnDoubleClick\r\n ) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseClickData((d.data as any).id);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?.((d.data as any).data);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseOverData((d.data as any).data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n <motion.rect\r\n x={0}\r\n y={0}\r\n exit={{\r\n width: 0,\r\n height: 0,\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n variants={{\r\n initial: {\r\n width: 0,\r\n height: 0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n },\r\n whileInView: {\r\n width: d.x1 - d.x0,\r\n height: d.y1 - d.y0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n />\r\n {d.x1 - d.x0 > 50 && d.y1 - d.y0 > 25 && (showLabels || showValues) ? (\r\n <motion.g\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject y={0} x={0} width={d.x1 - d.x0} height={d.y1 - d.y0}>\r\n <div\r\n className='flex flex-col gap-0.5 p-2 w-full'\r\n style={{\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n ),\r\n }}\r\n >\r\n {showLabels ? (\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n leading='none'\r\n className={cn(\r\n 'w-full treemap-label',\r\n language === 'ar' || language === 'he' ? 'text-right' : 'text-left',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n WebkitLineClamp:\r\n d.y1 - d.y0 > 50\r\n ? d.y1 - d.y0 > 100\r\n ? d.y1 - d.y0 > 150\r\n ? undefined\r\n : 3\r\n : 2\r\n : 1,\r\n display: '-webkit-box',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n colorDomain.indexOf(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color,\r\n )\r\n ],\r\n ),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).id\r\n }\r\n </P>\r\n ) : null}\r\n {showValues ? (\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n leading='none'\r\n className={cn(\r\n 'w-full font-bold treemap-value',\r\n language === 'ar' || language === 'he' ? 'text-right' : 'text-left',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n colorDomain.indexOf(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color,\r\n )\r\n ],\r\n ),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {numberFormattingFunction(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).value,\r\n 'NA',\r\n precision,\r\n prefix,\r\n suffix,\r\n )}\r\n </P>\r\n ) : null}\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n </g>\r\n </motion.svg>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect } from 'react';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport {\r\n TreeMapDataType,\r\n SourcesDataType,\r\n Languages,\r\n StyleObject,\r\n ClassNameObject,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: TreeMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for circle */\r\n colors?: string | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n /** Maximum radius of the circle */\r\n\r\n // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function TreeMapGraph(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n graphDescription,\r\n leftMargin = 0,\r\n rightMargin = 0,\r\n topMargin = 0,\r\n bottomMargin = 0,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n padding,\r\n backgroundColor = false,\r\n showLabels = true,\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n showColorScale = true,\r\n showValues = true,\r\n graphID,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n language = 'en',\r\n showNAColor = true,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n precision = 2,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {showColorScale && data.filter(el => el.color).length !== 0 && data.length > 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={(colors as string[] | undefined) || Colors[theme].categoricalColors.colors}\r\n colorDomain={colorDomain || (uniqBy(data, 'color', true) as string[])}\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n className={classNames?.colorLegend}\r\n />\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {data.length === 0 && <EmptyState />}\r\n {svgWidth && svgHeight && data.length > 0 ? (\r\n <Graph\r\n data={data.filter(d => !checkIfNullOrUndefined(d.size))}\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain || (uniqBy(data, 'color', true) as string[])\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n showLabels={showLabels}\r\n showValues={showValues}\r\n suffix={suffix}\r\n prefix={prefix}\r\n selectedColor={selectedColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n language={language}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n />\r\n ) : null}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["count","node","sum","children","node_count","node_each","callback","that","index","node_eachBefore","nodes","i","node_eachAfter","next","n","node_find","node_sum","value","node_sort","compare","node_path","end","start","ancestor","leastCommonAncestor","k","a","b","aNodes","bNodes","c","node_ancestors","node_descendants","node_leaves","leaves","node_links","root","links","node_iterator","current","hierarchy","data","mapChildren","objectChildren","Node","child","childs","computeHeight","node_copy","copyData","d","height","optional","f","required","constantZero","constant","x","roundNode","treemapDice","parent","x0","y0","x1","y1","preroot","ambiguous","imputed","defaultId","defaultParentId","stratify","id","parentId","path","currentId","currentParentId","nodeId","nodeKey","nodeByKey","I","normalize","P","parentof","S","_","slash","treemapSlice","phi","squarifyRatio","ratio","rows","row","nodeValue","i0","i1","dx","dy","sumValue","minValue","maxValue","newRatio","minRatio","alpha","beta","squarify","custom","treemap","tile","round","paddingStack","paddingInner","paddingTop","paddingRight","paddingBottom","paddingLeft","positionNode","p","Graph","props","$","_c","colors","leftMargin","width","colorDomain","rightMargin","topMargin","bottomMargin","showLabels","tooltip","onSeriesMouseOver","selectedColor","showValues","suffix","prefix","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","language","styles","classNames","animate","dimmedOpacity","precision","svgRef","useRef","t0","amount","once","isInView","useInView","mouseOverData","setMouseOverData","useState","undefined","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","t1","top","bottom","left","right","margin","graphWidth","graphHeight","T0","T1","t2","t3","t4","t5","t6","t7","t8","duration","graphObjectValues","treeMapData","map","_temp","treeData","_temp2","_temp3","_temp4","treeMapVizData","size","padding","motion","svg","AnimatePresence","d_3","jsxs","initial","opacity","y","whileInView","color","indexOf","length","transition","event","clientY","clientX","event_0","jsx","fill","filter","_temp5","Colors","gray","_temp6","getTextColorBasedOnBgColor","_temp7","cn","WebkitLineClamp","display","WebkitBoxOrient","overflow","_temp8","_temp9","numberFormattingFunction","t9","t10","t11","t12","Tooltip","t13","modal","DetailsModal","t14","Fragment","el_3","el","el_2","el_1","el_0","d_2","d_1","d_0","label","TreeMapGraph","graphTitle","sources","graphDescription","footNote","colorLegendTitle","backgroundColor","relativeHeight","showColorScale","graphID","graphDownload","dataDownload","showNAColor","minHeight","t15","theme","t16","ariaLabel","t17","t18","t19","t20","t21","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","t22","t23","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","useEffect","t24","graphContainer","t25","t26","description","title","GraphHeader","t27","colorLegend","ColorLegendWithMouseOver","categoricalColors","uniqBy","t28","EmptyState","t29","primaryColors","t30","GraphArea","t31","footnote","source","GraphFooter","t32","GraphContainer","d_4","checkIfNullOrUndefined"],"mappings":"4xBAAA,SAASA,GAAMC,EAAM,CACnB,IAAIC,EAAM,EACNC,EAAWF,EAAK,SAChB,EAAIE,GAAYA,EAAS,OAC7B,GAAI,CAAC,EAAGD,EAAM,MACT,MAAO,EAAE,GAAK,GAAGA,GAAOC,EAAS,CAAC,EAAE,MACzCF,EAAK,MAAQC,CACf,CAEe,SAAAE,IAAW,CACxB,OAAO,KAAK,UAAUJ,EAAK,CAC7B,CCXe,SAAAK,GAASC,EAAUC,EAAM,CACtC,IAAIC,EAAQ,GACZ,UAAWP,KAAQ,KACjBK,EAAS,KAAKC,EAAMN,EAAM,EAAEO,EAAO,IAAI,EAEzC,OAAO,IACT,CCNe,SAAAC,GAASH,EAAUC,EAAM,CAEtC,QADIN,EAAO,KAAMS,EAAQ,CAACT,CAAI,EAAGE,EAAUQ,EAAGH,EAAQ,GAC/CP,EAAOS,EAAM,OA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