@undp/data-viz 2.0.2 → 2.0.4

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.
Files changed (74) hide show
  1. package/dist/BarGraph.cjs +1 -1
  2. package/dist/BarGraph.js +2 -2
  3. package/dist/BeeSwarmChart.cjs +1 -1
  4. package/dist/BeeSwarmChart.cjs.map +1 -1
  5. package/dist/BeeSwarmChart.js +107 -106
  6. package/dist/BeeSwarmChart.js.map +1 -1
  7. package/dist/BulletChart.cjs +1 -1
  8. package/dist/BulletChart.js +2 -2
  9. package/dist/ButterflyChart.cjs +1 -1
  10. package/dist/ButterflyChart.js +1 -1
  11. package/dist/CirclePackingGraph.cjs +1 -1
  12. package/dist/CirclePackingGraph.js +1 -1
  13. package/dist/DonutChart.cjs +1 -1
  14. package/dist/DonutChart.cjs.map +1 -1
  15. package/dist/DonutChart.js +24 -32
  16. package/dist/DonutChart.js.map +1 -1
  17. package/dist/DumbbellChart.cjs +1 -1
  18. package/dist/DumbbellChart.js +2 -2
  19. package/dist/{GraphEl-D5MUfp45.cjs → GraphEl-D5RBCD7p.cjs} +2 -2
  20. package/dist/{GraphEl-D5MUfp45.cjs.map → GraphEl-D5RBCD7p.cjs.map} +1 -1
  21. package/dist/{GraphEl-BZne2JIx.js → GraphEl-VtiYqELy.js} +2 -2
  22. package/dist/{GraphEl-BZne2JIx.js.map → GraphEl-VtiYqELy.js.map} +1 -1
  23. package/dist/GriddedGraphs.cjs +1 -1
  24. package/dist/GriddedGraphs.js +1 -1
  25. package/dist/HeatMap.cjs +1 -1
  26. package/dist/HeatMap.js +2 -2
  27. package/dist/Histogram.cjs +1 -1
  28. package/dist/Histogram.js +1 -1
  29. package/dist/ImageDownloadButton.cjs +1 -1
  30. package/dist/ImageDownloadButton.js +1 -1
  31. package/dist/ParetoChart.cjs +1 -1
  32. package/dist/ParetoChart.js +1 -1
  33. package/dist/SingleGraphDashboard.cjs +1 -1
  34. package/dist/SingleGraphDashboard.js +1 -1
  35. package/dist/XAxesLabels-Bt5NZBmX.cjs +2 -0
  36. package/dist/XAxesLabels-Bt5NZBmX.cjs.map +1 -0
  37. package/dist/XAxesLabels-Dy8E1SEo.js +63 -0
  38. package/dist/XAxesLabels-Dy8E1SEo.js.map +1 -0
  39. package/dist/YAxesLabels-DesLesUP.cjs +2 -0
  40. package/dist/YAxesLabels-DesLesUP.cjs.map +1 -0
  41. package/dist/YAxesLabels-a57ZRv-0.js +61 -0
  42. package/dist/YAxesLabels-a57ZRv-0.js.map +1 -0
  43. package/dist/imageDownload-BU4qnxJP.js +991 -0
  44. package/dist/imageDownload-BU4qnxJP.js.map +1 -0
  45. package/dist/imageDownload-NYXbvKob.cjs +15 -0
  46. package/dist/imageDownload-NYXbvKob.cjs.map +1 -0
  47. package/dist/{index-Ceppbd8C.js → index-B2LQV7Tk.js} +109 -116
  48. package/dist/index-B2LQV7Tk.js.map +1 -0
  49. package/dist/index-xRHRLDIp.cjs +2 -0
  50. package/dist/index-xRHRLDIp.cjs.map +1 -0
  51. package/dist/index.cjs +1 -1
  52. package/dist/index.d.ts +1 -1
  53. package/dist/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/utils.cjs +1 -1
  56. package/dist/utils.d.ts +1 -1
  57. package/dist/utils.js +1 -1
  58. package/package.json +3 -3
  59. package/readme.md +1 -1
  60. package/dist/XAxesLabels-C1XSXoWG.cjs +0 -2
  61. package/dist/XAxesLabels-C1XSXoWG.cjs.map +0 -1
  62. package/dist/XAxesLabels-Dmbk50u4.js +0 -75
  63. package/dist/XAxesLabels-Dmbk50u4.js.map +0 -1
  64. package/dist/YAxesLabels-1XTb-D0_.js +0 -72
  65. package/dist/YAxesLabels-1XTb-D0_.js.map +0 -1
  66. package/dist/YAxesLabels-pjdsVwIM.cjs +0 -2
  67. package/dist/YAxesLabels-pjdsVwIM.cjs.map +0 -1
  68. package/dist/imageDownload-BX6SILNZ.js +0 -497
  69. package/dist/imageDownload-BX6SILNZ.js.map +0 -1
  70. package/dist/imageDownload-CgDcm1Sj.cjs +0 -3
  71. package/dist/imageDownload-CgDcm1Sj.cjs.map +0 -1
  72. package/dist/index-C6LorfZ-.cjs +0 -2
  73. package/dist/index-C6LorfZ-.cjs.map +0 -1
  74. package/dist/index-Ceppbd8C.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-CTPQjnHt.cjs"),c=require("react"),ee=require("./index-CyZ1lmi_.cjs"),G=require("./index-BS2TADPj.cjs"),h=require("./checkIfMultiple-wg6hJLXy.cjs"),ae=require("./Spinner-DRMBUsX7.cjs"),f=require("./DropdownSelect-Doz3mCrM.cjs"),te=require("./GraphContainer-d8A46BK2.cjs"),le=require("./GraphEl-D5MUfp45.cjs"),I=require("./fetchAndParseData-l5HGMAEs.cjs"),oe=require("./Colors.cjs"),P=require("./transformDataForAggregation-KXGm6flX.cjs"),W=require("./getUniqValue-RViz8tTw.cjs"),re=require("./GraphHeader.cjs"),ne=require("./GraphFooter.cjs"),z=require("./filterData-T5DQBE9b.cjs"),se=require("./ColorLegend.cjs"),ie=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),B=require("./transformDataForSelect-YmStusCI.cjs");function ue(J){const{graphSettings:t,dataSettings:n,filters:T,graphType:q,dataTransform:y,graphDataConfiguration:i,noOfColumns:V,columnGridBy:v,dataFilters:A,showCommonColorScale:F,minGraphHeight:K,minGraphWidth:$,debugMode:b,dataSelectionOptions:k,advancedDataSelectionOptions:O,readableHeader:Q,noOfFiltersPerRow:p=4,uiMode:g="normal",theme:X="light"}=J,[C,Y]=c.useState(void 0),[S,Z]=c.useState(void 0),[w,_]=c.useState([]),M=c.useRef(null),[m,x]=c.useState(i),[j,H]=c.useState([]),[d,D]=c.useState({}),E=c.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]),L=c.useMemo(()=>!S||j.length===0?S:S.filter(u=>j.every(a=>a.value&&G.flattenDeep([a.value]).length>0?ee.intersection(G.flattenDeep([u[a.filter]]),G.flattenDeep([a.value]).map(l=>l.value)).length>0:!0)),[j,S]);c.useEffect(()=>{Y(L)},[L]);const U=c.useCallback(async()=>{if(n)try{const u=await(n.dataURL?typeof n.dataURL=="string"?n.fileType==="json"?I.fetchAndParseJSON(n.dataURL,n.columnsToArray,n.dataTransformation,b):n.fileType==="api"?I.fetchAndTransformDataFromAPI(n.dataURL,n.apiHeaders,n.columnsToArray,n.dataTransformation,b):I.fetchAndParseCSV(n.dataURL,n.dataTransformation,n.columnsToArray,b,n.delimiter,!0):I.fetchAndParseMultipleDataSources(n.dataURL,n.idColumnTitle):I.transformColumnsToArray(n.data,n.columnsToArray));Z(u);const a=W.getUniqValue(u,v);_(a);const l=(T||[]).map(r=>({filter:r.column,label:r.label||`Filter by ${r.column}`,singleSelect:r.singleSelect,clearable:r.clearable,defaultValue:B.transformDefaultValue(r.defaultValue),value:B.transformDefaultValue(r.defaultValue),availableValues:W.getUniqValue(u,r.column).filter(s=>!r.excludeValues?.includes(`${s}`)).map(s=>({value:s,label:s})),allowSelectAll:r.allowSelectAll,width:r.width}));H(l)}catch(e){console.error("Data fetching error:",e)}},[n,b,v,T]);c.useEffect(()=>{U()},[U]),c.useEffect(()=>{x(i)},[i]);const N=c.useCallback((e,u)=>{H(a=>a.map(l=>l.filter===e?{...l,value:u}:l))},[]);return o.jsxRuntimeExports.jsxs(te.GraphContainer,{className:t?.classNames?.graphContainer,style:t?.styles?.graphContainer,id:t?.graphID,ref:M,"aria-label":t?.ariaLabel||"This is a gridded graph",backgroundColor:t?.backgroundColor??!1,theme:t?.theme||"light",language:t?.language||"en",width:t?.width,height:t?.height,padding:t?.padding,children:[d?.graphTitle||d?.graphDescription||t?.graphTitle||t?.graphDescription||t?.graphDownload||t?.dataDownload?o.jsxRuntimeExports.jsx(re.GraphHeader,{styles:{title:d?.styles?.title||t?.styles?.title,description:d?.styles?.description||t?.styles?.description},classNames:{title:d?.classNames?.title||t?.classNames?.title,description:d?.classNames?.description||t?.classNames?.description},graphTitle:d?.graphTitle||t?.graphTitle,graphDescription:d?.graphDescription||t?.graphDescription,width:d?.width||t?.width,graphDownload:t?.graphDownload?M:void 0,dataDownload:t?.dataDownload&&C&&C.length>0?C:null}):null,C&&w.length>0?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[j.length!==0||(k||[]).length!==0||(O||[]).length!==0?o.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-0 w-full",children:[O?.map((e,u)=>o.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},className:"pb-4",children:[o.jsxRuntimeExports.jsx(h.b,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?o.jsxRuntimeExports.jsx(f.ja,{options:e.options.map(a=>({...a,value:a.label})),isClearable:!1,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:a=>{D(a?.graphSettings||{}),x(a?.dataConfiguration)}}):o.jsxRuntimeExports.jsx(h.ye,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:g,onValueChange:a=>{const l=e.options[e.options.findIndex(r=>r.label===a)];D(l.graphSettings||{}),x(l.dataConfiguration)},children:e.options.map((a,l)=>o.jsxRuntimeExports.jsx(h.he,{label:a.label,value:a.label},l))})]},u)),k?.map((e,u)=>o.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},className:"pb-4",children:[o.jsxRuntimeExports.jsx(h.b,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),h.checkIfMultiple(e.chartConfigId,m||[])?e.ui!=="radio"?o.jsxRuntimeExports.jsx(f.ja,{options:e.allowedColumnIds,isMulti:!0,variant:g,isSearchable:!0,controlShouldRenderValue:!0,defaultValue:i?i[i.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===a)]):void 0,filterOption:f.Du(E),onChange:a=>{const l={columnId:a.map(s=>s.value),chartConfigId:e.chartConfigId},r=m?.map(s=>s.chartConfigId===l.chartConfigId?l:s);x(r)},isRtl:t?.language==="ar"||t?.language==="he"}):o.jsxRuntimeExports.jsx(h.$,{variant:g,defaultValue:i?i[i.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===a)]).map(a=>a.value):[],onValueChange:a=>{const l={columnId:a||[],chartConfigId:e.chartConfigId},r=m?.map(s=>s.chartConfigId===l.chartConfigId?l:s);x(r)},children:e.allowedColumnIds.map((a,l)=>o.jsxRuntimeExports.jsx(h.P,{label:a.label,value:a.label},l))}):e.ui!=="radio"?o.jsxRuntimeExports.jsx(f.ja,{options:e.allowedColumnIds,isClearable:!1,isSearchable:!0,variant:g,defaultValue:i?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===i[i.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId)]:void 0,controlShouldRenderValue:!0,onChange:a=>{const l={columnId:a?.value,chartConfigId:e.chartConfigId},r=m?.map(s=>s.chartConfigId===l.chartConfigId?l:s);D(a?.graphSettings||{}),x(r)}}):o.jsxRuntimeExports.jsx(h.ye,{variant:g,defaultValue:i?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===i[i.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:a=>{const l=e.allowedColumnIds[e.allowedColumnIds.findIndex(R=>R.label===a)],r={columnId:l.value,chartConfigId:e.chartConfigId},s=m?.map(R=>R.chartConfigId===r.chartConfigId?r:R);D(l.graphSettings||{}),x(s)},children:e.allowedColumnIds.map((a,l)=>o.jsxRuntimeExports.jsx(h.he,{label:a.label,value:a.label},l))})]},u)),j?.map((e,u)=>o.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:1,flexShrink:0,flexWrap:"wrap"},className:"pb-4",children:[o.jsxRuntimeExports.jsx(h.b,{className:"mb-2",children:e.label}),e.singleSelect?o.jsxRuntimeExports.jsx(f.ja,{variant:g,options:e.availableValues,isClearable:e.clearable===void 0?!0:e.clearable,isRtl:t?.language==="ar"||t?.language==="he",isSearchable:!0,controlShouldRenderValue:!0,filterOption:f.Du(E),onChange:a=>{N(e.filter,a)},defaultValue:e.defaultValue}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(f.ja,{variant:g,options:e.availableValues,isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:f.Du(E),onChange:a=>{N(e.filter,a)},defaultValue:e.defaultValue,isRtl:t?.language==="ar"||t?.language==="he"}),e.allowSelectAll?o.jsxRuntimeExports.jsx("button",{className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",type:"button",onClick:()=>{N(e.filter,e.availableValues)},children:"Select all options"}):null]})]},u))]}):null,F!==!1&&t?.showColorScale!==!1?o.jsxRuntimeExports.jsx(se.ColorLegend,{width:t?.width,colorLegendTitle:t?.colorLegendTitle,colors:t?.colors||t?.lineColors||oe.Colors[t?.theme||"light"].categoricalColors.colors,colorDomain:t?.colorDomain||t?.labels||[],showNAColor:t?.showNAColor===void 0||t?.showNAColor===null?!0:t?.showNAColor}):null,o.jsxRuntimeExports.jsx("div",{className:`flex flex-wrap gap-4 justify-center ${t?.language==="ar"||t?.language==="he"?"flex-row-reverse":"flex-row"}`,children:w.map((e,u)=>o.jsxRuntimeExports.jsx("div",{style:{width:`calc(${100/(V||Math.min(4,w.length||0))}% - ${((V||Math.min(4,w.length||0))-1)/(V||Math.min(4,w.length||0))}rem)`,minWidth:ie.checkIfNullOrUndefined($)?"280px":`${$}px`},children:o.jsxRuntimeExports.jsx(le.GraphEl,{graph:q,graphDataConfiguration:m,graphData:P.transformDataForGraph(y?P.transformDataForAggregation(z.filterData(C,A||[]).filter(a=>a[v]===e),y.keyColumn,y.aggregationColumnsSetting):z.filterData(C,A||[]).filter(a=>a[v]===e),q,m)||[],debugMode:b,settings:{...t||{},...d,theme:t?.theme||X,width:void 0,height:void 0,relativeHeight:t?.relativeHeight||.67,minHeight:K,graphTitle:`${e}`,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,padding:"0",footNote:void 0,sources:void 0,showColorScale:t?.showColorScale===!1?!1:F===!1},readableHeader:Q||[]})},u))})]}):o.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:o.jsxRuntimeExports.jsx(ae.w,{})}),t?.sources||t?.footNote?o.jsxRuntimeExports.jsx(ne.GraphFooter,{styles:{footnote:t?.styles?.footnote,source:t?.styles?.source},classNames:{footnote:t?.classNames?.footnote,source:t?.classNames?.source},sources:t?.sources,footNote:t?.footNote,width:t?.width}):null]})}exports.GriddedGraphs=ue;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-CTPQjnHt.cjs"),c=require("react"),ee=require("./index-CyZ1lmi_.cjs"),G=require("./index-BS2TADPj.cjs"),h=require("./checkIfMultiple-wg6hJLXy.cjs"),ae=require("./Spinner-DRMBUsX7.cjs"),f=require("./DropdownSelect-Doz3mCrM.cjs"),te=require("./GraphContainer-d8A46BK2.cjs"),le=require("./GraphEl-D5RBCD7p.cjs"),I=require("./fetchAndParseData-l5HGMAEs.cjs"),oe=require("./Colors.cjs"),P=require("./transformDataForAggregation-KXGm6flX.cjs"),W=require("./getUniqValue-RViz8tTw.cjs"),re=require("./GraphHeader.cjs"),ne=require("./GraphFooter.cjs"),z=require("./filterData-T5DQBE9b.cjs"),se=require("./ColorLegend.cjs"),ie=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),B=require("./transformDataForSelect-YmStusCI.cjs");function ue(J){const{graphSettings:t,dataSettings:n,filters:T,graphType:q,dataTransform:y,graphDataConfiguration:i,noOfColumns:V,columnGridBy:v,dataFilters:A,showCommonColorScale:F,minGraphHeight:K,minGraphWidth:$,debugMode:b,dataSelectionOptions:k,advancedDataSelectionOptions:O,readableHeader:Q,noOfFiltersPerRow:p=4,uiMode:g="normal",theme:X="light"}=J,[C,Y]=c.useState(void 0),[S,Z]=c.useState(void 0),[w,_]=c.useState([]),M=c.useRef(null),[m,x]=c.useState(i),[j,H]=c.useState([]),[d,D]=c.useState({}),E=c.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]),L=c.useMemo(()=>!S||j.length===0?S:S.filter(u=>j.every(a=>a.value&&G.flattenDeep([a.value]).length>0?ee.intersection(G.flattenDeep([u[a.filter]]),G.flattenDeep([a.value]).map(l=>l.value)).length>0:!0)),[j,S]);c.useEffect(()=>{Y(L)},[L]);const U=c.useCallback(async()=>{if(n)try{const u=await(n.dataURL?typeof n.dataURL=="string"?n.fileType==="json"?I.fetchAndParseJSON(n.dataURL,n.columnsToArray,n.dataTransformation,b):n.fileType==="api"?I.fetchAndTransformDataFromAPI(n.dataURL,n.apiHeaders,n.columnsToArray,n.dataTransformation,b):I.fetchAndParseCSV(n.dataURL,n.dataTransformation,n.columnsToArray,b,n.delimiter,!0):I.fetchAndParseMultipleDataSources(n.dataURL,n.idColumnTitle):I.transformColumnsToArray(n.data,n.columnsToArray));Z(u);const a=W.getUniqValue(u,v);_(a);const l=(T||[]).map(r=>({filter:r.column,label:r.label||`Filter by ${r.column}`,singleSelect:r.singleSelect,clearable:r.clearable,defaultValue:B.transformDefaultValue(r.defaultValue),value:B.transformDefaultValue(r.defaultValue),availableValues:W.getUniqValue(u,r.column).filter(s=>!r.excludeValues?.includes(`${s}`)).map(s=>({value:s,label:s})),allowSelectAll:r.allowSelectAll,width:r.width}));H(l)}catch(e){console.error("Data fetching error:",e)}},[n,b,v,T]);c.useEffect(()=>{U()},[U]),c.useEffect(()=>{x(i)},[i]);const N=c.useCallback((e,u)=>{H(a=>a.map(l=>l.filter===e?{...l,value:u}:l))},[]);return o.jsxRuntimeExports.jsxs(te.GraphContainer,{className:t?.classNames?.graphContainer,style:t?.styles?.graphContainer,id:t?.graphID,ref:M,"aria-label":t?.ariaLabel||"This is a gridded graph",backgroundColor:t?.backgroundColor??!1,theme:t?.theme||"light",language:t?.language||"en",width:t?.width,height:t?.height,padding:t?.padding,children:[d?.graphTitle||d?.graphDescription||t?.graphTitle||t?.graphDescription||t?.graphDownload||t?.dataDownload?o.jsxRuntimeExports.jsx(re.GraphHeader,{styles:{title:d?.styles?.title||t?.styles?.title,description:d?.styles?.description||t?.styles?.description},classNames:{title:d?.classNames?.title||t?.classNames?.title,description:d?.classNames?.description||t?.classNames?.description},graphTitle:d?.graphTitle||t?.graphTitle,graphDescription:d?.graphDescription||t?.graphDescription,width:d?.width||t?.width,graphDownload:t?.graphDownload?M:void 0,dataDownload:t?.dataDownload&&C&&C.length>0?C:null}):null,C&&w.length>0?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[j.length!==0||(k||[]).length!==0||(O||[]).length!==0?o.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-0 w-full",children:[O?.map((e,u)=>o.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},className:"pb-4",children:[o.jsxRuntimeExports.jsx(h.b,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?o.jsxRuntimeExports.jsx(f.ja,{options:e.options.map(a=>({...a,value:a.label})),isClearable:!1,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:a=>{D(a?.graphSettings||{}),x(a?.dataConfiguration)}}):o.jsxRuntimeExports.jsx(h.ye,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:g,onValueChange:a=>{const l=e.options[e.options.findIndex(r=>r.label===a)];D(l.graphSettings||{}),x(l.dataConfiguration)},children:e.options.map((a,l)=>o.jsxRuntimeExports.jsx(h.he,{label:a.label,value:a.label},l))})]},u)),k?.map((e,u)=>o.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},className:"pb-4",children:[o.jsxRuntimeExports.jsx(h.b,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),h.checkIfMultiple(e.chartConfigId,m||[])?e.ui!=="radio"?o.jsxRuntimeExports.jsx(f.ja,{options:e.allowedColumnIds,isMulti:!0,variant:g,isSearchable:!0,controlShouldRenderValue:!0,defaultValue:i?i[i.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===a)]):void 0,filterOption:f.Du(E),onChange:a=>{const l={columnId:a.map(s=>s.value),chartConfigId:e.chartConfigId},r=m?.map(s=>s.chartConfigId===l.chartConfigId?l:s);x(r)},isRtl:t?.language==="ar"||t?.language==="he"}):o.jsxRuntimeExports.jsx(h.$,{variant:g,defaultValue:i?i[i.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===a)]).map(a=>a.value):[],onValueChange:a=>{const l={columnId:a||[],chartConfigId:e.chartConfigId},r=m?.map(s=>s.chartConfigId===l.chartConfigId?l:s);x(r)},children:e.allowedColumnIds.map((a,l)=>o.jsxRuntimeExports.jsx(h.P,{label:a.label,value:a.label},l))}):e.ui!=="radio"?o.jsxRuntimeExports.jsx(f.ja,{options:e.allowedColumnIds,isClearable:!1,isSearchable:!0,variant:g,defaultValue:i?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===i[i.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId)]:void 0,controlShouldRenderValue:!0,onChange:a=>{const l={columnId:a?.value,chartConfigId:e.chartConfigId},r=m?.map(s=>s.chartConfigId===l.chartConfigId?l:s);D(a?.graphSettings||{}),x(r)}}):o.jsxRuntimeExports.jsx(h.ye,{variant:g,defaultValue:i?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===i[i.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:a=>{const l=e.allowedColumnIds[e.allowedColumnIds.findIndex(R=>R.label===a)],r={columnId:l.value,chartConfigId:e.chartConfigId},s=m?.map(R=>R.chartConfigId===r.chartConfigId?r:R);D(l.graphSettings||{}),x(s)},children:e.allowedColumnIds.map((a,l)=>o.jsxRuntimeExports.jsx(h.he,{label:a.label,value:a.label},l))})]},u)),j?.map((e,u)=>o.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:1,flexShrink:0,flexWrap:"wrap"},className:"pb-4",children:[o.jsxRuntimeExports.jsx(h.b,{className:"mb-2",children:e.label}),e.singleSelect?o.jsxRuntimeExports.jsx(f.ja,{variant:g,options:e.availableValues,isClearable:e.clearable===void 0?!0:e.clearable,isRtl:t?.language==="ar"||t?.language==="he",isSearchable:!0,controlShouldRenderValue:!0,filterOption:f.Du(E),onChange:a=>{N(e.filter,a)},defaultValue:e.defaultValue}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(f.ja,{variant:g,options:e.availableValues,isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:f.Du(E),onChange:a=>{N(e.filter,a)},defaultValue:e.defaultValue,isRtl:t?.language==="ar"||t?.language==="he"}),e.allowSelectAll?o.jsxRuntimeExports.jsx("button",{className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",type:"button",onClick:()=>{N(e.filter,e.availableValues)},children:"Select all options"}):null]})]},u))]}):null,F!==!1&&t?.showColorScale!==!1?o.jsxRuntimeExports.jsx(se.ColorLegend,{width:t?.width,colorLegendTitle:t?.colorLegendTitle,colors:t?.colors||t?.lineColors||oe.Colors[t?.theme||"light"].categoricalColors.colors,colorDomain:t?.colorDomain||t?.labels||[],showNAColor:t?.showNAColor===void 0||t?.showNAColor===null?!0:t?.showNAColor}):null,o.jsxRuntimeExports.jsx("div",{className:`flex flex-wrap gap-4 justify-center ${t?.language==="ar"||t?.language==="he"?"flex-row-reverse":"flex-row"}`,children:w.map((e,u)=>o.jsxRuntimeExports.jsx("div",{style:{width:`calc(${100/(V||Math.min(4,w.length||0))}% - ${((V||Math.min(4,w.length||0))-1)/(V||Math.min(4,w.length||0))}rem)`,minWidth:ie.checkIfNullOrUndefined($)?"280px":`${$}px`},children:o.jsxRuntimeExports.jsx(le.GraphEl,{graph:q,graphDataConfiguration:m,graphData:P.transformDataForGraph(y?P.transformDataForAggregation(z.filterData(C,A||[]).filter(a=>a[v]===e),y.keyColumn,y.aggregationColumnsSetting):z.filterData(C,A||[]).filter(a=>a[v]===e),q,m)||[],debugMode:b,settings:{...t||{},...d,theme:t?.theme||X,width:void 0,height:void 0,relativeHeight:t?.relativeHeight||.67,minHeight:K,graphTitle:`${e}`,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,padding:"0",footNote:void 0,sources:void 0,showColorScale:t?.showColorScale===!1?!1:F===!1},readableHeader:Q||[]})},u))})]}):o.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:o.jsxRuntimeExports.jsx(ae.w,{})}),t?.sources||t?.footNote?o.jsxRuntimeExports.jsx(ne.GraphFooter,{styles:{footnote:t?.styles?.footnote,source:t?.styles?.source},classNames:{footnote:t?.classNames?.footnote,source:t?.classNames?.source},sources:t?.sources,footNote:t?.footNote,width:t?.width}):null]})}exports.GriddedGraphs=ue;
2
2
  //# sourceMappingURL=GriddedGraphs.cjs.map
@@ -6,7 +6,7 @@ import { b as A, y as B, h as J, c as na, $ as ia, P as sa } from "./checkIfMult
6
6
  import { w as da } from "./Spinner-D7rnnwnA.js";
7
7
  import { j as x, D as R } from "./DropdownSelect-BbdPQa2k.js";
8
8
  import { G as ca } from "./GraphContainer-CRqzdKu2.js";
9
- import { G as ua } from "./GraphEl-BZne2JIx.js";
9
+ import { G as ua } from "./GraphEl-VtiYqELy.js";
10
10
  import { f as ha, a as fa, b as ga, c as pa, t as ma } from "./fetchAndParseData-BpqkBPQL.js";
11
11
  import { Colors as Ca } from "./Colors.js";
12
12
  import { a as wa, t as ba } from "./transformDataForAggregation-CE3bAlHU.js";
package/dist/HeatMap.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CHPV5EwG-CTPQjnHt.cjs"),q=require("react"),Gt=require("./index-DQA8q5sC.cjs"),Ft=require("./Modal-JW_IExO3.cjs"),Xt=require("./numberFormattingFunction-02t-wJta.cjs"),Yt=require("./Tooltip-4dJo4_AF.cjs"),Pt=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),Dt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ut=require("./string2HTML-CPGr_I5E.cjs"),zt=require("./XAxesLabels-C1XSXoWG.cjs"),Jt=require("./YAxesLabels-pjdsVwIM.cjs"),It=require("./uniqBy-O05lp2S5.cjs"),Bt=require("./band-VYfcZeJ2.cjs"),Kt=require("./ordinal-CrsysVE-.cjs"),Qt=require("./threshold-DNsSUf8Q.cjs"),Zt=require("./linear-BwPAspcq.cjs"),_t=require("./use-in-view-QcfiW0w3.cjs"),Nt=require("./proxy-BxvUI_9l.cjs"),te=require("./GraphHeader.cjs"),ee=require("./GraphFooter.cjs"),oe=require("./ColorLegendWithMouseOver.cjs"),se=require("./LinearColorLegend.cjs"),re=require("./ThresholdColorLegendWithMouseOver.cjs"),m=require("./Colors.cjs"),ie=require("./EmptyState-sAEZ_5rU.cjs"),Wt=require("./GraphContainer-d8A46BK2.cjs");function ne(a){const t=e.compilerRuntimeExports.c(85),{data:h,showColumnLabels:z,leftMargin:E,rightMargin:J,truncateBy:j,width:K,height:Q,topMargin:mt,bottomMargin:pt,tooltip:Z,onSeriesMouseOver:n,suffix:wt,prefix:i,showValues:_,colorDomain:b,colors:B,noDataColor:rt,scaleType:it,showRowLabels:gt,selectedColor:tt,onSeriesMouseClick:W,resetSelectionOnDoubleClick:ft,detailsOnClick:g,styles:x,classNames:u,animate:d,precision:nt}=a,Rt=q.useRef(null);let lt;t[0]!==d.amount||t[1]!==d.once?(lt={once:d.once,amount:d.amount},t[0]=d.amount,t[1]=d.once,t[2]=lt):lt=t[2];const M=_t.useInView(Rt,lt);let at;t[3]!==pt||t[4]!==E||t[5]!==J||t[6]!==mt?(at={top:mt,bottom:pt,left:E,right:J},t[3]=pt,t[4]=E,t[5]=J,t[6]=mt,t[7]=at):at=t[7];const c=at,[C,Ct]=q.useState(void 0),[v,vt]=q.useState(void 0),[ct,ut]=q.useState(void 0),[dt,ht]=q.useState(void 0),l=K-c.left-c.right,r=Q-c.top-c.bottom;let G,F,$,O,k,S,L,N,D,A,H,T,f;if(t[8]!==d.duration||t[9]!==u?.graphObjectValues||t[10]!==u?.xAxis?.labels||t[11]!==u?.yAxis?.labels||t[12]!==b||t[13]!==B||t[14]!==h||t[15]!==g||t[16]!==r||t[17]!==l||t[18]!==Q||t[19]!==M||t[20]!==c.left||t[21]!==c.top||t[22]!==C||t[23]!==v||t[24]!==rt||t[25]!==W||t[26]!==n||t[27]!==nt||t[28]!==i||t[29]!==ft||t[30]!==it||t[31]!==tt||t[32]!==z||t[33]!==gt||t[34]!==_||t[35]!==x?.graphObjectValues||t[36]!==x?.xAxis?.labels||t[37]!==x?.yAxis?.labels||t[38]!==wt||t[39]!==j||t[40]!==K){const ot=It.uniqBy(h,"column",!0),xt=It.uniqBy(h,"row",!0),s=Bt.band().domain(xt).range([0,r]),X=s.bandwidth(),I=Bt.band().domain(ot).range([0,l]),Y=I.bandwidth(),st=it==="categorical"?Kt.ordinal().domain(b).range(B):it==="threshold"?Qt.threshold().domain(b).range(B):Zt.linear().domain(b).range(B);G=Nt.motion.svg,A=`${K}px`,H=`${Q}px`,T=`0 0 ${K} ${Q}`,t[54]===Symbol.for("react.memo_cache_sentinel")?(f={marginLeft:"auto",marginRight:"auto"},t[54]=f):f=t[54],F="ltr",$=Rt,O=e.jsxRuntimeExports.jsx("g",{transform:`translate(${c.left},0)`,children:z?ot.map((o,y)=>e.jsxRuntimeExports.jsx(zt.XAxesLabels,{y:0,x:I(o),width:Y,height:c.top-5,value:`${o}`.length<j?`${o}`:`${`${o}`.substring(0,j)}...`,style:x?.xAxis?.labels,className:u?.xAxis?.labels,alignment:"bottom",animate:{duration:0,once:!0,amount:0},isInView:M},y)):null}),k=e.jsxRuntimeExports.jsx("g",{transform:`translate(0,${c.top})`,children:gt?xt.map((o,y)=>e.jsxRuntimeExports.jsx(Jt.YAxesLabels,{value:`${o}`.length<j?`${o}`:`${`${o}`.substring(0,j)}...`,y:s(o),x:0,width:c.left,height:X,alignment:"right",style:x?.yAxis?.labels,className:u?.yAxis?.labels,animate:{duration:0,once:!0,amount:0},isInView:M},y)):null}),S=`translate(${c.left},${c.top})`,L=xt.map((o,y)=>e.jsxRuntimeExports.jsx("g",{transform:`translate(0,${s(o)})`,children:ot.map(P=>e.jsxRuntimeExports.jsx("rect",{x:I(P),y:0,width:Y,height:X,style:{fill:rt},className:"stroke-1 stroke-primary-white dark:stroke-primary-gray-700"},`${o}-${P}`))},y)),N=h.filter(le).map((o,y)=>{const P=Dt.checkIfNullOrUndefined(o.value)?rt:st(o.value);return e.jsxRuntimeExports.jsxs("g",{transform:`translate(${I(o.column)},${s(o.row)})`,onMouseEnter:U=>{vt(o),ht(U.clientY),ut(U.clientX),n?.(o)},onClick:()=>{(W||g)&&(Gt.isEqual(C,o)&&ft?(Ct(void 0),W?.(void 0)):(Ct(o),W?.(o)))},onMouseMove:U=>{vt(o),ht(U.clientY),ut(U.clientX)},onMouseLeave:()=>{vt(void 0),ut(void 0),ht(void 0),n?.(void 0)},opacity:tt?tt===P?1:.3:1,children:[e.jsxRuntimeExports.jsx(Nt.motion.rect,{x:0,y:0,width:Y,height:X,className:"stroke-1 stroke-primary-white dark:stroke-primary-gray-700",exit:{opacity:0,transition:{duration:d.duration}},variants:{initial:{fill:P,opacity:0},whileInView:{fill:P,opacity:1,transition:{duration:d.duration}}},initial:"initial",animate:M?"whileInView":"initial"}),_&&!Dt.checkIfNullOrUndefined(o.value)?e.jsxRuntimeExports.jsx(Nt.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:1,transition:{duration:d.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:d.duration}},children:e.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:Y,height:X,children:e.jsxRuntimeExports.jsx("div",{className:"flex flex-col justify-center items-center h-inherit p-1",children:e.jsxRuntimeExports.jsx("p",{className:e.mo("text-xs text-center m-0 leading-[1.25] graph-value",u?.graphObjectValues),style:{color:Pt.getTextColorBasedOnBgColor(P),...x?.graphObjectValues||{}},children:Xt.numberFormattingFunction(o.value,"NA",nt,i,wt)})})},y)}):null]},`${o.column}-${o.row}`)}),D=v?e.jsxRuntimeExports.jsx("rect",{x:I(v.column),y:s(v.row),width:Y,height:X,style:{fill:"none",fillOpacity:0,strokeWidth:1.5},className:"stroke-primary-gray-700 dark:stroke-primary-gray-300"}):null,t[8]=d.duration,t[9]=u?.graphObjectValues,t[10]=u?.xAxis?.labels,t[11]=u?.yAxis?.labels,t[12]=b,t[13]=B,t[14]=h,t[15]=g,t[16]=r,t[17]=l,t[18]=Q,t[19]=M,t[20]=c.left,t[21]=c.top,t[22]=C,t[23]=v,t[24]=rt,t[25]=W,t[26]=n,t[27]=nt,t[28]=i,t[29]=ft,t[30]=it,t[31]=tt,t[32]=z,t[33]=gt,t[34]=_,t[35]=x?.graphObjectValues,t[36]=x?.xAxis?.labels,t[37]=x?.yAxis?.labels,t[38]=wt,t[39]=j,t[40]=K,t[41]=G,t[42]=F,t[43]=$,t[44]=O,t[45]=k,t[46]=S,t[47]=L,t[48]=N,t[49]=D,t[50]=A,t[51]=H,t[52]=T,t[53]=f}else G=t[41],F=t[42],$=t[43],O=t[44],k=t[45],S=t[46],L=t[47],N=t[48],D=t[49],A=t[50],H=t[51],T=t[52],f=t[53];let V;t[55]!==S||t[56]!==L||t[57]!==N||t[58]!==D?(V=e.jsxRuntimeExports.jsxs("g",{transform:S,children:[L,N,D]}),t[55]=S,t[56]=L,t[57]=N,t[58]=D,t[59]=V):V=t[59];let w;t[60]!==G||t[61]!==F||t[62]!==$||t[63]!==O||t[64]!==k||t[65]!==V||t[66]!==A||t[67]!==H||t[68]!==T||t[69]!==f?(w=e.jsxRuntimeExports.jsxs(G,{width:A,height:H,viewBox:T,style:f,direction:F,ref:$,children:[O,k,V]}),t[60]=G,t[61]=F,t[62]=$,t[63]=O,t[64]=k,t[65]=V,t[66]=A,t[67]=H,t[68]=T,t[69]=f,t[70]=w):w=t[70];let R;t[71]!==u?.tooltip||t[72]!==ct||t[73]!==dt||t[74]!==v||t[75]!==x?.tooltip||t[76]!==Z?(R=v&&Z&&ct&&dt?e.jsxRuntimeExports.jsx(Yt.Tooltip,{data:v,body:Z,xPos:ct,yPos:dt,backgroundStyle:x?.tooltip,className:u?.tooltip}):null,t[71]=u?.tooltip,t[72]=ct,t[73]=dt,t[74]=v,t[75]=x?.tooltip,t[76]=Z,t[77]=R):R=t[77];let p;t[78]!==g||t[79]!==C?(p=g&&C!==void 0?e.jsxRuntimeExports.jsx(Ft.le,{open:C!==void 0,onClose:()=>{Ct(void 0)},children:e.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof g=="string"?{__html:Ut.string2HTML(g,C)}:void 0,children:typeof g=="function"?g(C):null})}):null,t[78]=g,t[79]=C,t[80]=p):p=t[80];let et;return t[81]!==w||t[82]!==R||t[83]!==p?(et=e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[w,R,p]}),t[81]=w,t[82]=R,t[83]=p,t[84]=et):et=t[84],et}function le(a){return!Dt.checkIfNullOrUndefined(a.value)}function ae(a){const t=e.compilerRuntimeExports.c(71),{data:h,graphTitle:z,colors:E,sources:J,graphDescription:j,showColumnLabels:K,leftMargin:Q,rightMargin:mt,truncateBy:pt,height:Z,width:n,scaleType:wt,colorDomain:i,footNote:_,colorLegendTitle:b,padding:B,backgroundColor:rt,topMargin:it,bottomMargin:gt,tooltip:tt,onSeriesMouseOver:W,suffix:ft,prefix:g,showRowLabels:x,relativeHeight:u,showValues:d,graphID:nt,noDataColor:Rt,showColorScale:lt,onSeriesMouseClick:M,graphDownload:at,dataDownload:c,fillContainer:C,language:Ct,showNAColor:v,minHeight:vt,theme:ct,ariaLabel:ut,resetSelectionOnDoubleClick:dt,detailsOnClick:ht,styles:l,classNames:r,animate:G,precision:F}=a,$=K===void 0?!0:K,O=Q===void 0?100:Q,k=mt===void 0?10:mt,S=pt===void 0?999:pt,L=rt===void 0?!1:rt,N=it===void 0?30:it,D=gt===void 0?10:gt,A=ft===void 0?"":ft,H=g===void 0?"":g,T=x===void 0?!0:x,f=Rt===void 0?m.Colors.gray:Rt,V=lt===void 0?!0:lt,w=at===void 0?!1:at,R=c===void 0?!1:c,p=C===void 0?!0:C,et=Ct===void 0?"en":Ct,ot=v===void 0?!0:v,xt=vt===void 0?0:vt,s=ct===void 0?"light":ct,X=dt===void 0?!0:dt,I=G===void 0?!1:G,Y=F===void 0?2:F,[st,o]=q.useState(0),[y,P]=q.useState(0),[U,At]=q.useState(void 0),Ot=q.useRef(null),Ht=q.useRef(null);let Et,Mt;t[0]===Symbol.for("react.memo_cache_sentinel")?(Et=()=>{const Tt=new ResizeObserver(Vt=>{o(Vt[0].target.clientWidth||620),P(Vt[0].target.clientHeight||480)});return Ot.current&&Tt.observe(Ot.current),()=>Tt.disconnect()},Mt=[],t[0]=Et,t[1]=Mt):(Et=t[0],Mt=t[1]),q.useEffect(Et,Mt);const qt=wt||(typeof i[0]=="string"?"categorical":i.length===2?"linear":"threshold"),kt=r?.graphContainer,St=l?.graphContainer,Lt=p?void 0:n;let yt;t[2]!==r?.description||t[3]!==r?.title||t[4]!==h||t[5]!==R||t[6]!==j||t[7]!==w||t[8]!==z||t[9]!==l?.description||t[10]!==l?.title||t[11]!==n?(yt=z||j||w||R?e.jsxRuntimeExports.jsx(te.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:r?.title,description:r?.description},graphTitle:z,graphDescription:j,width:n,graphDownload:w?Ht:void 0,dataDownload:R?h.map(me).filter(xe).length>0?h.map(he).filter(de):h.filter(ue):null}):null,t[2]=r?.description,t[3]=r?.title,t[4]=h,t[5]=R,t[6]=j,t[7]=w,t[8]=z,t[9]=l?.description,t[10]=l?.title,t[11]=n,t[12]=yt):yt=t[12];let jt;t[13]!==I||t[14]!==D||t[15]!==r||t[16]!==i||t[17]!==b||t[18]!==E||t[19]!==h||t[20]!==ht||t[21]!==p||t[22]!==O||t[23]!==f||t[24]!==M||t[25]!==W||t[26]!==Y||t[27]!==H||t[28]!==X||t[29]!==k||t[30]!==qt||t[31]!==U||t[32]!==V||t[33]!==$||t[34]!==ot||t[35]!==T||t[36]!==d||t[37]!==l||t[38]!==A||t[39]!==y||t[40]!==st||t[41]!==s||t[42]!==tt||t[43]!==N||t[44]!==S||t[45]!==n?(jt=h.length===0?e.jsxRuntimeExports.jsx(ie.EmptyState,{}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[V?qt==="categorical"?e.jsxRuntimeExports.jsx(oe.ColorLegendWithMouseOver,{width:p?void 0:n,colorLegendTitle:b,colors:E||(typeof i[0]=="string"?m.Colors[s].categoricalColors.colors:i.length===2?[m.Colors[s].sequentialColors.neutralColorsx09[0],m.Colors[s].sequentialColors.neutralColorsx09[8]]:m.Colors[s].sequentialColors[`neutralColorsx0${i.length+1}`]),colorDomain:i.map(ce),setSelectedColor:At,showNAColor:ot,className:r?.colorLegend}):qt==="threshold"?e.jsxRuntimeExports.jsx(re.ThresholdColorLegendWithMouseOver,{width:p?void 0:n,colorLegendTitle:b,colors:E||(typeof i[0]=="string"?m.Colors[s].categoricalColors.colors:i.length===2?[m.Colors[s].sequentialColors.neutralColorsx09[0],m.Colors[s].sequentialColors.neutralColorsx09[8]]:m.Colors[s].sequentialColors[`neutralColorsx0${i.length+1}`]),colorDomain:i,setSelectedColor:At,naColor:f,showNAColor:ot}):e.jsxRuntimeExports.jsx(se.LinearColorLegend,{width:p?void 0:n,colorLegendTitle:b,colors:E||[m.Colors[s].sequentialColors.neutralColorsx09[0],m.Colors[s].sequentialColors.neutralColorsx09[8]],colorDomain:i,className:r?.colorLegend}):null,e.jsxRuntimeExports.jsx(Wt.GraphArea,{ref:Ot,children:st&&y?e.jsxRuntimeExports.jsx(ne,{data:h,colorDomain:i,width:p||!n||st<n?st:n,height:y,colors:E||(typeof i[0]=="string"?m.Colors[s].categoricalColors.colors:i.length===2?[m.Colors[s].sequentialColors.neutralColorsx09[0],m.Colors[s].sequentialColors.neutralColorsx09[8]]:m.Colors[s].sequentialColors[`neutralColorsx0${i.length+1}`]),noDataColor:f,scaleType:qt,showColumnLabels:$,leftMargin:O,rightMargin:k,topMargin:N,bottomMargin:D,selectedColor:U,truncateBy:S,showRowLabels:T,tooltip:tt,onSeriesMouseOver:W,showValues:d,suffix:A,prefix:H,onSeriesMouseClick:M,resetSelectionOnDoubleClick:X,detailsOnClick:ht,styles:l,classNames:r,animate:I===!0?{duration:.5,once:!0,amount:.5}:I||{duration:0,once:!0,amount:0},precision:Y}):null})]}),t[13]=I,t[14]=D,t[15]=r,t[16]=i,t[17]=b,t[18]=E,t[19]=h,t[20]=ht,t[21]=p,t[22]=O,t[23]=f,t[24]=M,t[25]=W,t[26]=Y,t[27]=H,t[28]=X,t[29]=k,t[30]=qt,t[31]=U,t[32]=V,t[33]=$,t[34]=ot,t[35]=T,t[36]=d,t[37]=l,t[38]=A,t[39]=y,t[40]=st,t[41]=s,t[42]=tt,t[43]=N,t[44]=S,t[45]=n,t[46]=jt):jt=t[46];let bt;t[47]!==r?.footnote||t[48]!==r?.source||t[49]!==_||t[50]!==J||t[51]!==l?.footnote||t[52]!==l?.source||t[53]!==n?(bt=J||_?e.jsxRuntimeExports.jsx(ee.GraphFooter,{styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:r?.footnote,source:r?.source},sources:J,footNote:_,width:n}):null,t[47]=r?.footnote,t[48]=r?.source,t[49]=_,t[50]=J,t[51]=l?.footnote,t[52]=l?.source,t[53]=n,t[54]=bt):bt=t[54];let $t;return t[55]!==ut||t[56]!==L||t[57]!==nt||t[58]!==Z||t[59]!==et||t[60]!==xt||t[61]!==B||t[62]!==u||t[63]!==kt||t[64]!==St||t[65]!==Lt||t[66]!==yt||t[67]!==jt||t[68]!==bt||t[69]!==s?($t=e.jsxRuntimeExports.jsxs(Wt.GraphContainer,{className:kt,style:St,id:nt,ref:Ht,"aria-label":ut,backgroundColor:L,theme:s,language:et,minHeight:xt,width:Lt,height:Z,relativeHeight:u,padding:B,children:[yt,jt,bt]}),t[55]=ut,t[56]=L,t[57]=nt,t[58]=Z,t[59]=et,t[60]=xt,t[61]=B,t[62]=u,t[63]=kt,t[64]=St,t[65]=Lt,t[66]=yt,t[67]=jt,t[68]=bt,t[69]=s,t[70]=$t):$t=t[70],$t}function ce(a){return`${a}`}function ue(a){return a!==void 0}function de(a){return a!==void 0}function he(a){return a.data}function xe(a){return a!==void 0}function me(a){return a.data}exports.HeatMap=ae;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CHPV5EwG-CTPQjnHt.cjs"),q=require("react"),Gt=require("./index-DQA8q5sC.cjs"),Ft=require("./Modal-JW_IExO3.cjs"),Xt=require("./numberFormattingFunction-02t-wJta.cjs"),Yt=require("./Tooltip-4dJo4_AF.cjs"),Pt=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),Dt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ut=require("./string2HTML-CPGr_I5E.cjs"),zt=require("./XAxesLabels-Bt5NZBmX.cjs"),Jt=require("./YAxesLabels-DesLesUP.cjs"),It=require("./uniqBy-O05lp2S5.cjs"),Bt=require("./band-VYfcZeJ2.cjs"),Kt=require("./ordinal-CrsysVE-.cjs"),Qt=require("./threshold-DNsSUf8Q.cjs"),Zt=require("./linear-BwPAspcq.cjs"),_t=require("./use-in-view-QcfiW0w3.cjs"),Nt=require("./proxy-BxvUI_9l.cjs"),te=require("./GraphHeader.cjs"),ee=require("./GraphFooter.cjs"),oe=require("./ColorLegendWithMouseOver.cjs"),se=require("./LinearColorLegend.cjs"),re=require("./ThresholdColorLegendWithMouseOver.cjs"),m=require("./Colors.cjs"),ie=require("./EmptyState-sAEZ_5rU.cjs"),Wt=require("./GraphContainer-d8A46BK2.cjs");function ne(a){const t=e.compilerRuntimeExports.c(85),{data:h,showColumnLabels:z,leftMargin:E,rightMargin:J,truncateBy:j,width:K,height:Q,topMargin:mt,bottomMargin:pt,tooltip:Z,onSeriesMouseOver:n,suffix:wt,prefix:i,showValues:_,colorDomain:b,colors:B,noDataColor:rt,scaleType:it,showRowLabels:gt,selectedColor:tt,onSeriesMouseClick:W,resetSelectionOnDoubleClick:ft,detailsOnClick:g,styles:x,classNames:u,animate:d,precision:nt}=a,Rt=q.useRef(null);let lt;t[0]!==d.amount||t[1]!==d.once?(lt={once:d.once,amount:d.amount},t[0]=d.amount,t[1]=d.once,t[2]=lt):lt=t[2];const M=_t.useInView(Rt,lt);let at;t[3]!==pt||t[4]!==E||t[5]!==J||t[6]!==mt?(at={top:mt,bottom:pt,left:E,right:J},t[3]=pt,t[4]=E,t[5]=J,t[6]=mt,t[7]=at):at=t[7];const c=at,[C,Ct]=q.useState(void 0),[v,vt]=q.useState(void 0),[ct,ut]=q.useState(void 0),[dt,ht]=q.useState(void 0),l=K-c.left-c.right,r=Q-c.top-c.bottom;let G,F,$,O,k,S,L,N,D,A,H,T,f;if(t[8]!==d.duration||t[9]!==u?.graphObjectValues||t[10]!==u?.xAxis?.labels||t[11]!==u?.yAxis?.labels||t[12]!==b||t[13]!==B||t[14]!==h||t[15]!==g||t[16]!==r||t[17]!==l||t[18]!==Q||t[19]!==M||t[20]!==c.left||t[21]!==c.top||t[22]!==C||t[23]!==v||t[24]!==rt||t[25]!==W||t[26]!==n||t[27]!==nt||t[28]!==i||t[29]!==ft||t[30]!==it||t[31]!==tt||t[32]!==z||t[33]!==gt||t[34]!==_||t[35]!==x?.graphObjectValues||t[36]!==x?.xAxis?.labels||t[37]!==x?.yAxis?.labels||t[38]!==wt||t[39]!==j||t[40]!==K){const ot=It.uniqBy(h,"column",!0),xt=It.uniqBy(h,"row",!0),s=Bt.band().domain(xt).range([0,r]),X=s.bandwidth(),I=Bt.band().domain(ot).range([0,l]),Y=I.bandwidth(),st=it==="categorical"?Kt.ordinal().domain(b).range(B):it==="threshold"?Qt.threshold().domain(b).range(B):Zt.linear().domain(b).range(B);G=Nt.motion.svg,A=`${K}px`,H=`${Q}px`,T=`0 0 ${K} ${Q}`,t[54]===Symbol.for("react.memo_cache_sentinel")?(f={marginLeft:"auto",marginRight:"auto"},t[54]=f):f=t[54],F="ltr",$=Rt,O=e.jsxRuntimeExports.jsx("g",{transform:`translate(${c.left},0)`,children:z?ot.map((o,y)=>e.jsxRuntimeExports.jsx(zt.XAxesLabels,{y:0,x:I(o),width:Y,height:c.top-5,value:`${o}`.length<j?`${o}`:`${`${o}`.substring(0,j)}...`,style:x?.xAxis?.labels,className:u?.xAxis?.labels,alignment:"bottom",animate:{duration:0,once:!0,amount:0},isInView:M},y)):null}),k=e.jsxRuntimeExports.jsx("g",{transform:`translate(0,${c.top})`,children:gt?xt.map((o,y)=>e.jsxRuntimeExports.jsx(Jt.YAxesLabels,{value:`${o}`.length<j?`${o}`:`${`${o}`.substring(0,j)}...`,y:s(o),x:0,width:c.left,height:X,alignment:"right",style:x?.yAxis?.labels,className:u?.yAxis?.labels,animate:{duration:0,once:!0,amount:0},isInView:M},y)):null}),S=`translate(${c.left},${c.top})`,L=xt.map((o,y)=>e.jsxRuntimeExports.jsx("g",{transform:`translate(0,${s(o)})`,children:ot.map(P=>e.jsxRuntimeExports.jsx("rect",{x:I(P),y:0,width:Y,height:X,style:{fill:rt},className:"stroke-1 stroke-primary-white dark:stroke-primary-gray-700"},`${o}-${P}`))},y)),N=h.filter(le).map((o,y)=>{const P=Dt.checkIfNullOrUndefined(o.value)?rt:st(o.value);return e.jsxRuntimeExports.jsxs("g",{transform:`translate(${I(o.column)},${s(o.row)})`,onMouseEnter:U=>{vt(o),ht(U.clientY),ut(U.clientX),n?.(o)},onClick:()=>{(W||g)&&(Gt.isEqual(C,o)&&ft?(Ct(void 0),W?.(void 0)):(Ct(o),W?.(o)))},onMouseMove:U=>{vt(o),ht(U.clientY),ut(U.clientX)},onMouseLeave:()=>{vt(void 0),ut(void 0),ht(void 0),n?.(void 0)},opacity:tt?tt===P?1:.3:1,children:[e.jsxRuntimeExports.jsx(Nt.motion.rect,{x:0,y:0,width:Y,height:X,className:"stroke-1 stroke-primary-white dark:stroke-primary-gray-700",exit:{opacity:0,transition:{duration:d.duration}},variants:{initial:{fill:P,opacity:0},whileInView:{fill:P,opacity:1,transition:{duration:d.duration}}},initial:"initial",animate:M?"whileInView":"initial"}),_&&!Dt.checkIfNullOrUndefined(o.value)?e.jsxRuntimeExports.jsx(Nt.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:1,transition:{duration:d.duration}}},initial:"initial",animate:M?"whileInView":"initial",exit:{opacity:0,transition:{duration:d.duration}},children:e.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:Y,height:X,children:e.jsxRuntimeExports.jsx("div",{className:"flex flex-col justify-center items-center h-inherit p-1",children:e.jsxRuntimeExports.jsx("p",{className:e.mo("text-xs text-center m-0 leading-[1.25] graph-value",u?.graphObjectValues),style:{color:Pt.getTextColorBasedOnBgColor(P),...x?.graphObjectValues||{}},children:Xt.numberFormattingFunction(o.value,"NA",nt,i,wt)})})},y)}):null]},`${o.column}-${o.row}`)}),D=v?e.jsxRuntimeExports.jsx("rect",{x:I(v.column),y:s(v.row),width:Y,height:X,style:{fill:"none",fillOpacity:0,strokeWidth:1.5},className:"stroke-primary-gray-700 dark:stroke-primary-gray-300"}):null,t[8]=d.duration,t[9]=u?.graphObjectValues,t[10]=u?.xAxis?.labels,t[11]=u?.yAxis?.labels,t[12]=b,t[13]=B,t[14]=h,t[15]=g,t[16]=r,t[17]=l,t[18]=Q,t[19]=M,t[20]=c.left,t[21]=c.top,t[22]=C,t[23]=v,t[24]=rt,t[25]=W,t[26]=n,t[27]=nt,t[28]=i,t[29]=ft,t[30]=it,t[31]=tt,t[32]=z,t[33]=gt,t[34]=_,t[35]=x?.graphObjectValues,t[36]=x?.xAxis?.labels,t[37]=x?.yAxis?.labels,t[38]=wt,t[39]=j,t[40]=K,t[41]=G,t[42]=F,t[43]=$,t[44]=O,t[45]=k,t[46]=S,t[47]=L,t[48]=N,t[49]=D,t[50]=A,t[51]=H,t[52]=T,t[53]=f}else G=t[41],F=t[42],$=t[43],O=t[44],k=t[45],S=t[46],L=t[47],N=t[48],D=t[49],A=t[50],H=t[51],T=t[52],f=t[53];let V;t[55]!==S||t[56]!==L||t[57]!==N||t[58]!==D?(V=e.jsxRuntimeExports.jsxs("g",{transform:S,children:[L,N,D]}),t[55]=S,t[56]=L,t[57]=N,t[58]=D,t[59]=V):V=t[59];let w;t[60]!==G||t[61]!==F||t[62]!==$||t[63]!==O||t[64]!==k||t[65]!==V||t[66]!==A||t[67]!==H||t[68]!==T||t[69]!==f?(w=e.jsxRuntimeExports.jsxs(G,{width:A,height:H,viewBox:T,style:f,direction:F,ref:$,children:[O,k,V]}),t[60]=G,t[61]=F,t[62]=$,t[63]=O,t[64]=k,t[65]=V,t[66]=A,t[67]=H,t[68]=T,t[69]=f,t[70]=w):w=t[70];let R;t[71]!==u?.tooltip||t[72]!==ct||t[73]!==dt||t[74]!==v||t[75]!==x?.tooltip||t[76]!==Z?(R=v&&Z&&ct&&dt?e.jsxRuntimeExports.jsx(Yt.Tooltip,{data:v,body:Z,xPos:ct,yPos:dt,backgroundStyle:x?.tooltip,className:u?.tooltip}):null,t[71]=u?.tooltip,t[72]=ct,t[73]=dt,t[74]=v,t[75]=x?.tooltip,t[76]=Z,t[77]=R):R=t[77];let p;t[78]!==g||t[79]!==C?(p=g&&C!==void 0?e.jsxRuntimeExports.jsx(Ft.le,{open:C!==void 0,onClose:()=>{Ct(void 0)},children:e.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof g=="string"?{__html:Ut.string2HTML(g,C)}:void 0,children:typeof g=="function"?g(C):null})}):null,t[78]=g,t[79]=C,t[80]=p):p=t[80];let et;return t[81]!==w||t[82]!==R||t[83]!==p?(et=e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[w,R,p]}),t[81]=w,t[82]=R,t[83]=p,t[84]=et):et=t[84],et}function le(a){return!Dt.checkIfNullOrUndefined(a.value)}function ae(a){const t=e.compilerRuntimeExports.c(71),{data:h,graphTitle:z,colors:E,sources:J,graphDescription:j,showColumnLabels:K,leftMargin:Q,rightMargin:mt,truncateBy:pt,height:Z,width:n,scaleType:wt,colorDomain:i,footNote:_,colorLegendTitle:b,padding:B,backgroundColor:rt,topMargin:it,bottomMargin:gt,tooltip:tt,onSeriesMouseOver:W,suffix:ft,prefix:g,showRowLabels:x,relativeHeight:u,showValues:d,graphID:nt,noDataColor:Rt,showColorScale:lt,onSeriesMouseClick:M,graphDownload:at,dataDownload:c,fillContainer:C,language:Ct,showNAColor:v,minHeight:vt,theme:ct,ariaLabel:ut,resetSelectionOnDoubleClick:dt,detailsOnClick:ht,styles:l,classNames:r,animate:G,precision:F}=a,$=K===void 0?!0:K,O=Q===void 0?100:Q,k=mt===void 0?10:mt,S=pt===void 0?999:pt,L=rt===void 0?!1:rt,N=it===void 0?30:it,D=gt===void 0?10:gt,A=ft===void 0?"":ft,H=g===void 0?"":g,T=x===void 0?!0:x,f=Rt===void 0?m.Colors.gray:Rt,V=lt===void 0?!0:lt,w=at===void 0?!1:at,R=c===void 0?!1:c,p=C===void 0?!0:C,et=Ct===void 0?"en":Ct,ot=v===void 0?!0:v,xt=vt===void 0?0:vt,s=ct===void 0?"light":ct,X=dt===void 0?!0:dt,I=G===void 0?!1:G,Y=F===void 0?2:F,[st,o]=q.useState(0),[y,P]=q.useState(0),[U,At]=q.useState(void 0),Ot=q.useRef(null),Ht=q.useRef(null);let Et,Mt;t[0]===Symbol.for("react.memo_cache_sentinel")?(Et=()=>{const Tt=new ResizeObserver(Vt=>{o(Vt[0].target.clientWidth||620),P(Vt[0].target.clientHeight||480)});return Ot.current&&Tt.observe(Ot.current),()=>Tt.disconnect()},Mt=[],t[0]=Et,t[1]=Mt):(Et=t[0],Mt=t[1]),q.useEffect(Et,Mt);const qt=wt||(typeof i[0]=="string"?"categorical":i.length===2?"linear":"threshold"),kt=r?.graphContainer,St=l?.graphContainer,Lt=p?void 0:n;let yt;t[2]!==r?.description||t[3]!==r?.title||t[4]!==h||t[5]!==R||t[6]!==j||t[7]!==w||t[8]!==z||t[9]!==l?.description||t[10]!==l?.title||t[11]!==n?(yt=z||j||w||R?e.jsxRuntimeExports.jsx(te.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:r?.title,description:r?.description},graphTitle:z,graphDescription:j,width:n,graphDownload:w?Ht:void 0,dataDownload:R?h.map(me).filter(xe).length>0?h.map(he).filter(de):h.filter(ue):null}):null,t[2]=r?.description,t[3]=r?.title,t[4]=h,t[5]=R,t[6]=j,t[7]=w,t[8]=z,t[9]=l?.description,t[10]=l?.title,t[11]=n,t[12]=yt):yt=t[12];let jt;t[13]!==I||t[14]!==D||t[15]!==r||t[16]!==i||t[17]!==b||t[18]!==E||t[19]!==h||t[20]!==ht||t[21]!==p||t[22]!==O||t[23]!==f||t[24]!==M||t[25]!==W||t[26]!==Y||t[27]!==H||t[28]!==X||t[29]!==k||t[30]!==qt||t[31]!==U||t[32]!==V||t[33]!==$||t[34]!==ot||t[35]!==T||t[36]!==d||t[37]!==l||t[38]!==A||t[39]!==y||t[40]!==st||t[41]!==s||t[42]!==tt||t[43]!==N||t[44]!==S||t[45]!==n?(jt=h.length===0?e.jsxRuntimeExports.jsx(ie.EmptyState,{}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[V?qt==="categorical"?e.jsxRuntimeExports.jsx(oe.ColorLegendWithMouseOver,{width:p?void 0:n,colorLegendTitle:b,colors:E||(typeof i[0]=="string"?m.Colors[s].categoricalColors.colors:i.length===2?[m.Colors[s].sequentialColors.neutralColorsx09[0],m.Colors[s].sequentialColors.neutralColorsx09[8]]:m.Colors[s].sequentialColors[`neutralColorsx0${i.length+1}`]),colorDomain:i.map(ce),setSelectedColor:At,showNAColor:ot,className:r?.colorLegend}):qt==="threshold"?e.jsxRuntimeExports.jsx(re.ThresholdColorLegendWithMouseOver,{width:p?void 0:n,colorLegendTitle:b,colors:E||(typeof i[0]=="string"?m.Colors[s].categoricalColors.colors:i.length===2?[m.Colors[s].sequentialColors.neutralColorsx09[0],m.Colors[s].sequentialColors.neutralColorsx09[8]]:m.Colors[s].sequentialColors[`neutralColorsx0${i.length+1}`]),colorDomain:i,setSelectedColor:At,naColor:f,showNAColor:ot}):e.jsxRuntimeExports.jsx(se.LinearColorLegend,{width:p?void 0:n,colorLegendTitle:b,colors:E||[m.Colors[s].sequentialColors.neutralColorsx09[0],m.Colors[s].sequentialColors.neutralColorsx09[8]],colorDomain:i,className:r?.colorLegend}):null,e.jsxRuntimeExports.jsx(Wt.GraphArea,{ref:Ot,children:st&&y?e.jsxRuntimeExports.jsx(ne,{data:h,colorDomain:i,width:p||!n||st<n?st:n,height:y,colors:E||(typeof i[0]=="string"?m.Colors[s].categoricalColors.colors:i.length===2?[m.Colors[s].sequentialColors.neutralColorsx09[0],m.Colors[s].sequentialColors.neutralColorsx09[8]]:m.Colors[s].sequentialColors[`neutralColorsx0${i.length+1}`]),noDataColor:f,scaleType:qt,showColumnLabels:$,leftMargin:O,rightMargin:k,topMargin:N,bottomMargin:D,selectedColor:U,truncateBy:S,showRowLabels:T,tooltip:tt,onSeriesMouseOver:W,showValues:d,suffix:A,prefix:H,onSeriesMouseClick:M,resetSelectionOnDoubleClick:X,detailsOnClick:ht,styles:l,classNames:r,animate:I===!0?{duration:.5,once:!0,amount:.5}:I||{duration:0,once:!0,amount:0},precision:Y}):null})]}),t[13]=I,t[14]=D,t[15]=r,t[16]=i,t[17]=b,t[18]=E,t[19]=h,t[20]=ht,t[21]=p,t[22]=O,t[23]=f,t[24]=M,t[25]=W,t[26]=Y,t[27]=H,t[28]=X,t[29]=k,t[30]=qt,t[31]=U,t[32]=V,t[33]=$,t[34]=ot,t[35]=T,t[36]=d,t[37]=l,t[38]=A,t[39]=y,t[40]=st,t[41]=s,t[42]=tt,t[43]=N,t[44]=S,t[45]=n,t[46]=jt):jt=t[46];let bt;t[47]!==r?.footnote||t[48]!==r?.source||t[49]!==_||t[50]!==J||t[51]!==l?.footnote||t[52]!==l?.source||t[53]!==n?(bt=J||_?e.jsxRuntimeExports.jsx(ee.GraphFooter,{styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:r?.footnote,source:r?.source},sources:J,footNote:_,width:n}):null,t[47]=r?.footnote,t[48]=r?.source,t[49]=_,t[50]=J,t[51]=l?.footnote,t[52]=l?.source,t[53]=n,t[54]=bt):bt=t[54];let $t;return t[55]!==ut||t[56]!==L||t[57]!==nt||t[58]!==Z||t[59]!==et||t[60]!==xt||t[61]!==B||t[62]!==u||t[63]!==kt||t[64]!==St||t[65]!==Lt||t[66]!==yt||t[67]!==jt||t[68]!==bt||t[69]!==s?($t=e.jsxRuntimeExports.jsxs(Wt.GraphContainer,{className:kt,style:St,id:nt,ref:Ht,"aria-label":ut,backgroundColor:L,theme:s,language:et,minHeight:xt,width:Lt,height:Z,relativeHeight:u,padding:B,children:[yt,jt,bt]}),t[55]=ut,t[56]=L,t[57]=nt,t[58]=Z,t[59]=et,t[60]=xt,t[61]=B,t[62]=u,t[63]=kt,t[64]=St,t[65]=Lt,t[66]=yt,t[67]=jt,t[68]=bt,t[69]=s,t[70]=$t):$t=t[70],$t}function ce(a){return`${a}`}function ue(a){return a!==void 0}function de(a){return a!==void 0}function he(a){return a.data}function xe(a){return a!==void 0}function me(a){return a.data}exports.HeatMap=ae;
2
2
  //# sourceMappingURL=HeatMap.cjs.map
package/dist/HeatMap.js CHANGED
@@ -7,8 +7,8 @@ import { T as Ut } from "./Tooltip-CwWUegPB.js";
7
7
  import { g as Jt } from "./getTextColorBasedOnBgColor-CDY808zi.js";
8
8
  import { c as Ht } from "./checkIfNullOrUndefined-DmfiKkNw.js";
9
9
  import { s as Kt } from "./string2HTML-DhG75NqA.js";
10
- import { X as Qt } from "./XAxesLabels-Dmbk50u4.js";
11
- import { Y as Zt } from "./YAxesLabels-1XTb-D0_.js";
10
+ import { X as Qt } from "./XAxesLabels-Dy8E1SEo.js";
11
+ import { Y as Zt } from "./YAxesLabels-a57ZRv-0.js";
12
12
  import { u as Wt } from "./uniqBy-BHy4I8PK.js";
13
13
  import { b as Bt } from "./band-CyHaVft5.js";
14
14
  import { o as _t } from "./ordinal-P77xw8aL.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index-CHPV5EwG-CTPQjnHt.cjs"),oe=require("./Spinner-DRMBUsX7.cjs"),J=require("./index-C6LorfZ-.cjs"),se=require("./TreeMapGraph.cjs"),le=require("./DonutChart.cjs"),ae=require("./BarGraph.cjs"),W=require("./Colors.cjs"),ce=require("./init-DU0ybBc_.cjs"),K=require("./linear-BwPAspcq.cjs");function ue(i,e){let v=0;for(let l of i)l!=null&&(l=+l)>=l&&++v;return v}function he(i){return i}var fe=Array.prototype,pe=fe.slice;function ne(i){return()=>i}function ge(i,e,v){let l;for(;;){const t=K.tickIncrement(i,e,v);if(t===l||t===0||!isFinite(t))return[i,e];t>0?(i=Math.floor(i/t)*t,e=Math.ceil(e/t)*t):t<0&&(i=Math.ceil(i*t)/t,e=Math.floor(e*t)/t),l=t}}function me(i){return Math.max(1,Math.ceil(Math.log(ue(i))/Math.LN2)+1)}function xe(){var i=he,e=J.extent,v=me;function l(t){Array.isArray(t)||(t=Array.from(t));var r,H=t.length,a,P,p=new Array(H);for(r=0;r<H;++r)p[r]=i(t[r],r,t);var b=e(p),o=b[0],n=b[1],s=v(p,o,n);if(!Array.isArray(s)){const d=n,M=+s;if(e===J.extent&&([o,n]=ge(o,n,M)),s=K.ticks(o,n,M),s[0]<=o&&(P=K.tickIncrement(o,n,M)),s[s.length-1]>=n)if(d>=n&&e===J.extent){const c=K.tickIncrement(o,n,M);isFinite(c)&&(c>0?n=(Math.floor(n/c)+1)*c:c<0&&(n=(Math.ceil(n*-c)+1)/-c))}else s.pop()}for(var x=s.length,u=0,h=x;s[u]<=o;)++u;for(;s[h-1]>n;)--h;(u||h<x)&&(s=s.slice(u,h),x=h-u);var m=new Array(x+1),y;for(r=0;r<=x;++r)y=m[r]=[],y.x0=r>0?s[r-1]:o,y.x1=r<x?s[r]:n;if(isFinite(P)){if(P>0)for(r=0;r<H;++r)(a=p[r])!=null&&o<=a&&a<=n&&m[Math.min(x,Math.floor((a-o)/P))].push(t[r]);else if(P<0){for(r=0;r<H;++r)if((a=p[r])!=null&&o<=a&&a<=n){const d=Math.floor((o-a)*P);m[Math.min(x,d+(s[d]<=a))].push(t[r])}}}else for(r=0;r<H;++r)(a=p[r])!=null&&o<=a&&a<=n&&m[ce.bisectRight(s,a,0,x)].push(t[r]);return m}return l.value=function(t){return arguments.length?(i=typeof t=="function"?t:ne(t),l):i},l.domain=function(t){return arguments.length?(e=typeof t=="function"?t:ne([t[0],t[1]]),l):e},l.thresholds=function(t){return arguments.length?(v=typeof t=="function"?t:ne(Array.isArray(t)?pe.call(t):t),l):v},l}function de(i){const e=L.compilerRuntimeExports.c(138),{data:v,graphTitle:l,sources:t,graphDescription:r,barPadding:H,showValues:a,showTicks:P,leftMargin:p,rightMargin:b,height:o,width:n,footNote:s,colors:x,padding:u,backgroundColor:h,topMargin:m,bottomMargin:y,showLabels:d,relativeHeight:M,tooltip:c,onSeriesMouseOver:w,refValues:Q,graphID:j,maxValue:U,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,numberOfBins:X,truncateBy:Y,graphType:Z,barGraphLayout:_,donutStrokeWidth:ee,sortData:N,language:A,minHeight:F,theme:ie,maxBarThickness:te,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}=i,C=ie===void 0?"light":ie;let O;e[0]!==v||e[1]!==X?(O=xe().thresholds(X||10).value(ye)(v).map(Me),e[0]=v,e[1]=X,e[2]=O):O=e[2];const $=O;if($.length===0){const g=`${n}px`,f=`${o}px`;let B;e[3]!==g||e[4]!==f?(B={width:g,height:f,margin:"auto"},e[3]=g,e[4]=f,e[5]=B):B=e[5];let I;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=L.jsxRuntimeExports.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:L.jsxRuntimeExports.jsx(oe.w,{})}),e[6]=I):I=e[6];let z;return e[7]!==B?(z=L.jsxRuntimeExports.jsx("div",{style:B,children:I}),e[7]=B,e[8]=z):z=e[8],z}if(Z==="circlePacking"){const g=x||W.Colors.graphMainColor;let f;return e[9]!==E||e[10]!==h||e[11]!==y||e[12]!==D||e[13]!==q||e[14]!==$||e[15]!==R||e[16]!==s||e[17]!==r||e[18]!==S||e[19]!==j||e[20]!==l||e[21]!==o||e[22]!==A||e[23]!==p||e[24]!==F||e[25]!==k||e[26]!==w||e[27]!==u||e[28]!==T||e[29]!==M||e[30]!==b||e[31]!==d||e[32]!==a||e[33]!==t||e[34]!==G||e[35]!==g||e[36]!==C||e[37]!==c||e[38]!==m||e[39]!==n?(f=L.jsxRuntimeExports.jsx(J.CirclePackingGraph,{colors:g,graphTitle:l,graphDescription:r,footNote:s,width:n,height:o,sources:t,leftMargin:p,rightMargin:b,backgroundColor:h,padding:u,topMargin:m,bottomMargin:y,relativeHeight:M,showLabels:d,tooltip:c,onSeriesMouseOver:w,showColorScale:!1,showValues:a,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:$,language:A,minHeight:F,theme:C,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[9]=E,e[10]=h,e[11]=y,e[12]=D,e[13]=q,e[14]=$,e[15]=R,e[16]=s,e[17]=r,e[18]=S,e[19]=j,e[20]=l,e[21]=o,e[22]=A,e[23]=p,e[24]=F,e[25]=k,e[26]=w,e[27]=u,e[28]=T,e[29]=M,e[30]=b,e[31]=d,e[32]=a,e[33]=t,e[34]=G,e[35]=g,e[36]=C,e[37]=c,e[38]=m,e[39]=n,e[40]=f):f=e[40],f}if(Z==="treeMap"){const g=x||W.Colors.graphMainColor;let f;return e[41]!==E||e[42]!==h||e[43]!==y||e[44]!==D||e[45]!==q||e[46]!==$||e[47]!==R||e[48]!==s||e[49]!==r||e[50]!==S||e[51]!==j||e[52]!==l||e[53]!==o||e[54]!==A||e[55]!==p||e[56]!==F||e[57]!==k||e[58]!==w||e[59]!==u||e[60]!==T||e[61]!==M||e[62]!==b||e[63]!==d||e[64]!==a||e[65]!==t||e[66]!==G||e[67]!==g||e[68]!==C||e[69]!==c||e[70]!==m||e[71]!==n?(f=L.jsxRuntimeExports.jsx(se.TreeMapGraph,{colors:g,graphTitle:l,graphDescription:r,footNote:s,width:n,height:o,sources:t,leftMargin:p,rightMargin:b,backgroundColor:h,padding:u,topMargin:m,bottomMargin:y,relativeHeight:M,showLabels:d,tooltip:c,onSeriesMouseOver:w,showColorScale:!1,showValues:a,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:$,language:A,minHeight:F,theme:C,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[41]=E,e[42]=h,e[43]=y,e[44]=D,e[45]=q,e[46]=$,e[47]=R,e[48]=s,e[49]=r,e[50]=S,e[51]=j,e[52]=l,e[53]=o,e[54]=A,e[55]=p,e[56]=F,e[57]=k,e[58]=w,e[59]=u,e[60]=T,e[61]=M,e[62]=b,e[63]=d,e[64]=a,e[65]=t,e[66]=G,e[67]=g,e[68]=C,e[69]=c,e[70]=m,e[71]=n,e[72]=f):f=e[72],f}if(Z==="donutChart"){const g=x||W.Colors[C].categoricalColors.colors,f=n&&o?n<o?n:o:n||o||void 0,B=$;let I;return e[73]!==E||e[74]!==h||e[75]!==D||e[76]!==q||e[77]!==R||e[78]!==ee||e[79]!==s||e[80]!==r||e[81]!==S||e[82]!==j||e[83]!==l||e[84]!==A||e[85]!==k||e[86]!==w||e[87]!==u||e[88]!==T||e[89]!==N||e[90]!==t||e[91]!==G||e[92]!==g||e[93]!==f||e[94]!==B||e[95]!==C||e[96]!==c?(I=L.jsxRuntimeExports.jsx(le.DonutChart,{colors:g,graphTitle:l,graphDescription:r,footNote:s,radius:f,sources:t,backgroundColor:h,padding:u,tooltip:c,onSeriesMouseOver:w,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:B,strokeWidth:ee,showColorScale:!0,sortData:N,language:A,theme:C,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[73]=E,e[74]=h,e[75]=D,e[76]=q,e[77]=R,e[78]=ee,e[79]=s,e[80]=r,e[81]=S,e[82]=j,e[83]=l,e[84]=A,e[85]=k,e[86]=w,e[87]=u,e[88]=T,e[89]=N,e[90]=t,e[91]=G,e[92]=g,e[93]=f,e[94]=B,e[95]=C,e[96]=c,e[97]=I):I=e[97],I}const re=x||W.Colors.graphMainColor;let V;return e[98]!==E||e[99]!==h||e[100]!==_||e[101]!==H||e[102]!==y||e[103]!==D||e[104]!==q||e[105]!==$||e[106]!==R||e[107]!==s||e[108]!==r||e[109]!==S||e[110]!==j||e[111]!==l||e[112]!==o||e[113]!==A||e[114]!==p||e[115]!==te||e[116]!==U||e[117]!==F||e[118]!==k||e[119]!==w||e[120]!==u||e[121]!==T||e[122]!==Q||e[123]!==M||e[124]!==b||e[125]!==d||e[126]!==P||e[127]!==a||e[128]!==N||e[129]!==t||e[130]!==G||e[131]!==re||e[132]!==C||e[133]!==c||e[134]!==m||e[135]!==Y||e[136]!==n?(V=L.jsxRuntimeExports.jsx(ae.SimpleBarGraph,{colors:re,graphTitle:l,graphDescription:r,footNote:s,width:n,height:o,sources:t,leftMargin:p,rightMargin:b,backgroundColor:h,padding:u,topMargin:m,bottomMargin:y,relativeHeight:M,showLabels:d,tooltip:c,onSeriesMouseOver:w,showColorScale:!1,showValues:a,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:$,barPadding:H,refValues:Q,truncateBy:Y,maxValue:U,showTicks:P,sortData:N,language:A,minHeight:F,theme:C,maxBarThickness:te,ariaLabel:E,orientation:_,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[98]=E,e[99]=h,e[100]=_,e[101]=H,e[102]=y,e[103]=D,e[104]=q,e[105]=$,e[106]=R,e[107]=s,e[108]=r,e[109]=S,e[110]=j,e[111]=l,e[112]=o,e[113]=A,e[114]=p,e[115]=te,e[116]=U,e[117]=F,e[118]=k,e[119]=w,e[120]=u,e[121]=T,e[122]=Q,e[123]=M,e[124]=b,e[125]=d,e[126]=P,e[127]=a,e[128]=N,e[129]=t,e[130]=G,e[131]=re,e[132]=C,e[133]=c,e[134]=m,e[135]=Y,e[136]=n,e[137]=V):V=e[137],V}function Me(i){return{label:`${i.x0}-${i.x1}`,size:i.length,data:{options:`${i.x0}-${i.x1}`,frequency:i.length}}}function ye(i){return i.value}exports.Histogram=de;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index-CHPV5EwG-CTPQjnHt.cjs"),oe=require("./Spinner-DRMBUsX7.cjs"),J=require("./index-xRHRLDIp.cjs"),se=require("./TreeMapGraph.cjs"),le=require("./DonutChart.cjs"),ae=require("./BarGraph.cjs"),W=require("./Colors.cjs"),ce=require("./init-DU0ybBc_.cjs"),K=require("./linear-BwPAspcq.cjs");function ue(i,e){let v=0;for(let l of i)l!=null&&(l=+l)>=l&&++v;return v}function he(i){return i}var fe=Array.prototype,pe=fe.slice;function ne(i){return()=>i}function ge(i,e,v){let l;for(;;){const t=K.tickIncrement(i,e,v);if(t===l||t===0||!isFinite(t))return[i,e];t>0?(i=Math.floor(i/t)*t,e=Math.ceil(e/t)*t):t<0&&(i=Math.ceil(i*t)/t,e=Math.floor(e*t)/t),l=t}}function me(i){return Math.max(1,Math.ceil(Math.log(ue(i))/Math.LN2)+1)}function xe(){var i=he,e=J.extent,v=me;function l(t){Array.isArray(t)||(t=Array.from(t));var r,H=t.length,a,P,p=new Array(H);for(r=0;r<H;++r)p[r]=i(t[r],r,t);var b=e(p),o=b[0],n=b[1],s=v(p,o,n);if(!Array.isArray(s)){const d=n,M=+s;if(e===J.extent&&([o,n]=ge(o,n,M)),s=K.ticks(o,n,M),s[0]<=o&&(P=K.tickIncrement(o,n,M)),s[s.length-1]>=n)if(d>=n&&e===J.extent){const c=K.tickIncrement(o,n,M);isFinite(c)&&(c>0?n=(Math.floor(n/c)+1)*c:c<0&&(n=(Math.ceil(n*-c)+1)/-c))}else s.pop()}for(var x=s.length,u=0,h=x;s[u]<=o;)++u;for(;s[h-1]>n;)--h;(u||h<x)&&(s=s.slice(u,h),x=h-u);var m=new Array(x+1),y;for(r=0;r<=x;++r)y=m[r]=[],y.x0=r>0?s[r-1]:o,y.x1=r<x?s[r]:n;if(isFinite(P)){if(P>0)for(r=0;r<H;++r)(a=p[r])!=null&&o<=a&&a<=n&&m[Math.min(x,Math.floor((a-o)/P))].push(t[r]);else if(P<0){for(r=0;r<H;++r)if((a=p[r])!=null&&o<=a&&a<=n){const d=Math.floor((o-a)*P);m[Math.min(x,d+(s[d]<=a))].push(t[r])}}}else for(r=0;r<H;++r)(a=p[r])!=null&&o<=a&&a<=n&&m[ce.bisectRight(s,a,0,x)].push(t[r]);return m}return l.value=function(t){return arguments.length?(i=typeof t=="function"?t:ne(t),l):i},l.domain=function(t){return arguments.length?(e=typeof t=="function"?t:ne([t[0],t[1]]),l):e},l.thresholds=function(t){return arguments.length?(v=typeof t=="function"?t:ne(Array.isArray(t)?pe.call(t):t),l):v},l}function de(i){const e=L.compilerRuntimeExports.c(138),{data:v,graphTitle:l,sources:t,graphDescription:r,barPadding:H,showValues:a,showTicks:P,leftMargin:p,rightMargin:b,height:o,width:n,footNote:s,colors:x,padding:u,backgroundColor:h,topMargin:m,bottomMargin:y,showLabels:d,relativeHeight:M,tooltip:c,onSeriesMouseOver:w,refValues:Q,graphID:j,maxValue:U,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,numberOfBins:X,truncateBy:Y,graphType:Z,barGraphLayout:_,donutStrokeWidth:ee,sortData:N,language:A,minHeight:F,theme:ie,maxBarThickness:te,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}=i,C=ie===void 0?"light":ie;let O;e[0]!==v||e[1]!==X?(O=xe().thresholds(X||10).value(ye)(v).map(Me),e[0]=v,e[1]=X,e[2]=O):O=e[2];const $=O;if($.length===0){const g=`${n}px`,f=`${o}px`;let B;e[3]!==g||e[4]!==f?(B={width:g,height:f,margin:"auto"},e[3]=g,e[4]=f,e[5]=B):B=e[5];let I;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=L.jsxRuntimeExports.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:L.jsxRuntimeExports.jsx(oe.w,{})}),e[6]=I):I=e[6];let z;return e[7]!==B?(z=L.jsxRuntimeExports.jsx("div",{style:B,children:I}),e[7]=B,e[8]=z):z=e[8],z}if(Z==="circlePacking"){const g=x||W.Colors.graphMainColor;let f;return e[9]!==E||e[10]!==h||e[11]!==y||e[12]!==D||e[13]!==q||e[14]!==$||e[15]!==R||e[16]!==s||e[17]!==r||e[18]!==S||e[19]!==j||e[20]!==l||e[21]!==o||e[22]!==A||e[23]!==p||e[24]!==F||e[25]!==k||e[26]!==w||e[27]!==u||e[28]!==T||e[29]!==M||e[30]!==b||e[31]!==d||e[32]!==a||e[33]!==t||e[34]!==G||e[35]!==g||e[36]!==C||e[37]!==c||e[38]!==m||e[39]!==n?(f=L.jsxRuntimeExports.jsx(J.CirclePackingGraph,{colors:g,graphTitle:l,graphDescription:r,footNote:s,width:n,height:o,sources:t,leftMargin:p,rightMargin:b,backgroundColor:h,padding:u,topMargin:m,bottomMargin:y,relativeHeight:M,showLabels:d,tooltip:c,onSeriesMouseOver:w,showColorScale:!1,showValues:a,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:$,language:A,minHeight:F,theme:C,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[9]=E,e[10]=h,e[11]=y,e[12]=D,e[13]=q,e[14]=$,e[15]=R,e[16]=s,e[17]=r,e[18]=S,e[19]=j,e[20]=l,e[21]=o,e[22]=A,e[23]=p,e[24]=F,e[25]=k,e[26]=w,e[27]=u,e[28]=T,e[29]=M,e[30]=b,e[31]=d,e[32]=a,e[33]=t,e[34]=G,e[35]=g,e[36]=C,e[37]=c,e[38]=m,e[39]=n,e[40]=f):f=e[40],f}if(Z==="treeMap"){const g=x||W.Colors.graphMainColor;let f;return e[41]!==E||e[42]!==h||e[43]!==y||e[44]!==D||e[45]!==q||e[46]!==$||e[47]!==R||e[48]!==s||e[49]!==r||e[50]!==S||e[51]!==j||e[52]!==l||e[53]!==o||e[54]!==A||e[55]!==p||e[56]!==F||e[57]!==k||e[58]!==w||e[59]!==u||e[60]!==T||e[61]!==M||e[62]!==b||e[63]!==d||e[64]!==a||e[65]!==t||e[66]!==G||e[67]!==g||e[68]!==C||e[69]!==c||e[70]!==m||e[71]!==n?(f=L.jsxRuntimeExports.jsx(se.TreeMapGraph,{colors:g,graphTitle:l,graphDescription:r,footNote:s,width:n,height:o,sources:t,leftMargin:p,rightMargin:b,backgroundColor:h,padding:u,topMargin:m,bottomMargin:y,relativeHeight:M,showLabels:d,tooltip:c,onSeriesMouseOver:w,showColorScale:!1,showValues:a,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:$,language:A,minHeight:F,theme:C,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[41]=E,e[42]=h,e[43]=y,e[44]=D,e[45]=q,e[46]=$,e[47]=R,e[48]=s,e[49]=r,e[50]=S,e[51]=j,e[52]=l,e[53]=o,e[54]=A,e[55]=p,e[56]=F,e[57]=k,e[58]=w,e[59]=u,e[60]=T,e[61]=M,e[62]=b,e[63]=d,e[64]=a,e[65]=t,e[66]=G,e[67]=g,e[68]=C,e[69]=c,e[70]=m,e[71]=n,e[72]=f):f=e[72],f}if(Z==="donutChart"){const g=x||W.Colors[C].categoricalColors.colors,f=n&&o?n<o?n:o:n||o||void 0,B=$;let I;return e[73]!==E||e[74]!==h||e[75]!==D||e[76]!==q||e[77]!==R||e[78]!==ee||e[79]!==s||e[80]!==r||e[81]!==S||e[82]!==j||e[83]!==l||e[84]!==A||e[85]!==k||e[86]!==w||e[87]!==u||e[88]!==T||e[89]!==N||e[90]!==t||e[91]!==G||e[92]!==g||e[93]!==f||e[94]!==B||e[95]!==C||e[96]!==c?(I=L.jsxRuntimeExports.jsx(le.DonutChart,{colors:g,graphTitle:l,graphDescription:r,footNote:s,radius:f,sources:t,backgroundColor:h,padding:u,tooltip:c,onSeriesMouseOver:w,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:B,strokeWidth:ee,showColorScale:!0,sortData:N,language:A,theme:C,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[73]=E,e[74]=h,e[75]=D,e[76]=q,e[77]=R,e[78]=ee,e[79]=s,e[80]=r,e[81]=S,e[82]=j,e[83]=l,e[84]=A,e[85]=k,e[86]=w,e[87]=u,e[88]=T,e[89]=N,e[90]=t,e[91]=G,e[92]=g,e[93]=f,e[94]=B,e[95]=C,e[96]=c,e[97]=I):I=e[97],I}const re=x||W.Colors.graphMainColor;let V;return e[98]!==E||e[99]!==h||e[100]!==_||e[101]!==H||e[102]!==y||e[103]!==D||e[104]!==q||e[105]!==$||e[106]!==R||e[107]!==s||e[108]!==r||e[109]!==S||e[110]!==j||e[111]!==l||e[112]!==o||e[113]!==A||e[114]!==p||e[115]!==te||e[116]!==U||e[117]!==F||e[118]!==k||e[119]!==w||e[120]!==u||e[121]!==T||e[122]!==Q||e[123]!==M||e[124]!==b||e[125]!==d||e[126]!==P||e[127]!==a||e[128]!==N||e[129]!==t||e[130]!==G||e[131]!==re||e[132]!==C||e[133]!==c||e[134]!==m||e[135]!==Y||e[136]!==n?(V=L.jsxRuntimeExports.jsx(ae.SimpleBarGraph,{colors:re,graphTitle:l,graphDescription:r,footNote:s,width:n,height:o,sources:t,leftMargin:p,rightMargin:b,backgroundColor:h,padding:u,topMargin:m,bottomMargin:y,relativeHeight:M,showLabels:d,tooltip:c,onSeriesMouseOver:w,showColorScale:!1,showValues:a,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:$,barPadding:H,refValues:Q,truncateBy:Y,maxValue:U,showTicks:P,sortData:N,language:A,minHeight:F,theme:C,maxBarThickness:te,ariaLabel:E,orientation:_,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[98]=E,e[99]=h,e[100]=_,e[101]=H,e[102]=y,e[103]=D,e[104]=q,e[105]=$,e[106]=R,e[107]=s,e[108]=r,e[109]=S,e[110]=j,e[111]=l,e[112]=o,e[113]=A,e[114]=p,e[115]=te,e[116]=U,e[117]=F,e[118]=k,e[119]=w,e[120]=u,e[121]=T,e[122]=Q,e[123]=M,e[124]=b,e[125]=d,e[126]=P,e[127]=a,e[128]=N,e[129]=t,e[130]=G,e[131]=re,e[132]=C,e[133]=c,e[134]=m,e[135]=Y,e[136]=n,e[137]=V):V=e[137],V}function Me(i){return{label:`${i.x0}-${i.x1}`,size:i.length,data:{options:`${i.x0}-${i.x1}`,frequency:i.length}}}function ye(i){return i.value}exports.Histogram=de;
2
2
  //# sourceMappingURL=Histogram.cjs.map
package/dist/Histogram.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { c as ne, j as R } from "./index-CHPV5EwG-Curnpaqc.js";
2
2
  import { w as ae } from "./Spinner-D7rnnwnA.js";
3
- import { e as te, C as le } from "./index-Ceppbd8C.js";
3
+ import { e as te, C as le } from "./index-B2LQV7Tk.js";
4
4
  import { TreeMapGraph as se } from "./TreeMapGraph.js";
5
5
  import { DonutChart as ce } from "./DonutChart.js";
6
6
  import { SimpleBarGraph as fe } from "./BarGraph.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-CHPV5EwG-CTPQjnHt.cjs"),g=require("./index-DRXx7m-C.cjs"),p=require("./imageDownload-CgDcm1Sj.cjs");function f(y){const e=d.compilerRuntimeExports.c(10),{nodeID:t,filename:m,buttonContent:i,buttonType:c,buttonSmall:b,className:u}=y,a=m===void 0?"image":m,l=c===void 0?"tertiary":c,s=`undp-viz-download-button ${b?"p-2":"py-4 px-6"} ${u===void 0?"":u} border border-primary-gray-400 dark:border-primary-gray-550`;let o;e[0]!==a||e[1]!==t?(o=()=>{typeof t=="string"?document.getElementById(t)?p.imageDownload(document.getElementById(t),a):console.error("Cannot find the html element"):p.imageDownload(t.current,a)},e[0]=a,e[1]=t,e[2]=o):o=e[2];let n;e[3]!==i?(n=i||d.jsxRuntimeExports.jsx(g.ImageDown,{}),e[3]=i,e[4]=n):n=e[4];let r;return e[5]!==l||e[6]!==s||e[7]!==o||e[8]!==n?(r=d.jsxRuntimeExports.jsx(g.x,{variant:l,className:s,onClick:o,"aria-label":"Click to download the graph as image",children:n}),e[5]=l,e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}exports.ImageDownloadButton=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-CHPV5EwG-CTPQjnHt.cjs"),g=require("./index-DRXx7m-C.cjs"),p=require("./imageDownload-NYXbvKob.cjs");function f(y){const e=d.compilerRuntimeExports.c(10),{nodeID:t,filename:m,buttonContent:i,buttonType:c,buttonSmall:b,className:u}=y,a=m===void 0?"image":m,l=c===void 0?"tertiary":c,s=`undp-viz-download-button ${b?"p-2":"py-4 px-6"} ${u===void 0?"":u} border border-primary-gray-400 dark:border-primary-gray-550`;let o;e[0]!==a||e[1]!==t?(o=()=>{typeof t=="string"?document.getElementById(t)?p.imageDownload(document.getElementById(t),a):console.error("Cannot find the html element"):p.imageDownload(t.current,a)},e[0]=a,e[1]=t,e[2]=o):o=e[2];let n;e[3]!==i?(n=i||d.jsxRuntimeExports.jsx(g.ImageDown,{}),e[3]=i,e[4]=n):n=e[4];let r;return e[5]!==l||e[6]!==s||e[7]!==o||e[8]!==n?(r=d.jsxRuntimeExports.jsx(g.x,{variant:l,className:s,onClick:o,"aria-label":"Click to download the graph as image",children:n}),e[5]=l,e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}exports.ImageDownloadButton=f;
2
2
  //# sourceMappingURL=ImageDownloadButton.cjs.map
@@ -1,6 +1,6 @@
1
1
  import { c as y, j as p } from "./index-CHPV5EwG-Curnpaqc.js";
2
2
  import { I as b, x } from "./index-D491FEn1.js";
3
- import { i as u } from "./imageDownload-BX6SILNZ.js";
3
+ import { i as u } from "./imageDownload-BU4qnxJP.js";
4
4
  function j(f) {
5
5
  const e = y.c(10), {
6
6
  nodeID: t,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-CTPQjnHt.cjs"),st=require("react"),xe=require("./index-DQA8q5sC.cjs"),he=require("./Modal-JW_IExO3.cjs"),ne=require("./numberFormattingFunction-02t-wJta.cjs"),ge=require("./Tooltip-4dJo4_AF.cjs"),ye=require("./string2HTML-CPGr_I5E.cjs"),ue=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ce=require("./Axis-DxRV2yMi.cjs"),me=require("./AxisTitle-sS5bLLR7.cjs"),be=require("./XAxesLabels-C1XSXoWG.cjs"),ve=require("./band-VYfcZeJ2.cjs"),pe=require("./linear-BwPAspcq.cjs"),de=require("./line-DHV4JwCR.cjs"),se=require("./step-BZ3C8QFW.cjs"),je=require("./use-in-view-QcfiW0w3.cjs"),Dt=require("./proxy-BxvUI_9l.cjs"),Ae=require("./index-DG2bgAva.cjs"),we=require("./GraphFooter.cjs"),Ee=require("./GraphHeader.cjs"),Re=require("./ColorLegend.cjs"),oe=require("./Colors.cjs"),Me=require("./EmptyState-sAEZ_5rU.cjs"),fe=require("./GraphContainer-d8A46BK2.cjs");function Ce(e){const t=n.compilerRuntimeExports.c(156),{data:j,width:P,height:D,barColor:d,lineColor:p,axisTitles:u,sameAxes:A,rightMargin:zt,leftMargin:Qt,topMargin:Ft,bottomMargin:Ht,tooltip:Et,showValues:Rt,onSeriesMouseOver:ot,barPadding:Yt,truncateBy:Mt,showLabels:Gt,onSeriesMouseClick:C,resetSelectionOnDoubleClick:pt,detailsOnClick:y,noOfTicks:dt,lineSuffix:ft,barSuffix:Ct,linePrefix:kt,barPrefix:Lt,curveType:St,styles:s,classNames:o,animate:r,precision:F,customLayers:k,naLabel:rt,showAxisLabels:R}=e,Jt=st.useRef(null);let ht;t[0]!==r.amount||t[1]!==r.once?(ht={once:r.once,amount:r.amount},t[0]=r.amount,t[1]=r.once,t[2]=ht):ht=t[2];const L=je.useInView(Jt,ht),Xt=St==="linear"?de.curveLinear:St==="step"?se.curveStep:St==="stepAfter"?se.stepAfter:St==="stepBefore"?se.stepBefore:se.monotoneX,[Nt,lt]=st.useState(void 0),[w,gt]=st.useState(void 0),[Ot,c]=st.useState(void 0),[x,at]=st.useState(void 0),Wt=Qt+50,yt=zt+65;let Tt;t[3]!==Ht||t[4]!==Wt||t[5]!==yt||t[6]!==Ft?(Tt={top:Ft,bottom:Ht,left:Wt,right:yt},t[3]=Ht,t[4]=Wt,t[5]=yt,t[6]=Ft,t[7]=Tt):Tt=t[7];const l=Tt,h=P-l.left-l.right,a=D-l.top-l.bottom;let S,H,Y,M,G,X,W,N,O,T,$,B,U,z,J;if(t[8]!==r||t[9]!==u||t[10]!==d||t[11]!==Yt||t[12]!==Lt||t[13]!==Ct||t[14]!==o?.graphObjectValues||t[15]!==o?.xAxis?.axis||t[16]!==o?.xAxis?.labels||t[17]!==o?.yAxis?.gridLines||t[18]!==o?.yAxis?.labels||t[19]!==o?.yAxis?.title||t[20]!==Xt||t[21]!==k||t[22]!==j||t[23]!==y||t[24]!==a||t[25]!==h||t[26]!==D||t[27]!==L||t[28]!==p||t[29]!==kt||t[30]!==ft||t[31]!==l.bottom||t[32]!==l.left||t[33]!==l.right||t[34]!==l.top||t[35]!==w||t[36]!==rt||t[37]!==dt||t[38]!==C||t[39]!==ot||t[40]!==F||t[41]!==pt||t[42]!==A||t[43]!==R||t[44]!==Gt||t[45]!==Rt||t[46]!==s?.graphObjectValues||t[47]!==s?.xAxis?.axis||t[48]!==s?.xAxis?.labels||t[49]!==s?.yAxis?.gridLines||t[50]!==s?.yAxis?.labels||t[51]!==s?.yAxis?.title||t[52]!==Mt||t[53]!==P){const m=j.map(ei),g=ve.band().domain(m.map(ti)).range([0,h]).paddingInner(Yt),$t=Math.min(...m.map(_e).filter(Ze))!==1/0?Math.min(...m.map(Qe).filter(Ke))>0?0:Math.min(...m.map(Je).filter(ze)):0,vt=Math.min(...m.map(Ue).filter(Be))!==1/0?Math.min(...m.map(We).filter(Xe))>0?0:Math.min(...m.map(Ge).filter(Ye)):0,jt=Math.max(...m.map(He).filter(Fe))!==1/0?Math.max(...m.map(De).filter(Pe)):0,ct=Math.max(...m.map(Ve).filter(Ie))!==1/0?Math.max(...m.map(qe).filter($e)):0,Bt=$t<vt?$t:vt,At=jt>ct?jt:ct,f=pe.linear().domain([A?Bt:$t,A?At>0?At:0:jt>0?jt:0]).range([a,0]).nice(),b=pe.linear().domain([A?Bt:vt,A?At>0?At:0:ct>0?ct:0]).range([a,0]).nice(),qt=de.line().defined(Te).x(i=>g(`${i.id}`)+g.bandwidth()/2).y(i=>b(i.line)).curve(Xt),re=f.ticks(dt),Ut=b.ticks(dt);H=Dt.motion.svg,G=`${P}px`,X=`${D}px`,W=`0 0 ${P} ${D}`,N="ltr",O=Jt,U=`translate(${l.left},${l.top})`;const Kt=o?.xAxis?.axis;let et;t[69]!==Kt?(et={axis:Kt},t[69]=Kt,t[70]=et):et=t[70];let ut;t[71]!==s?.xAxis?.axis?(ut=s?.xAxis?.axis||{},t[71]=s?.xAxis?.axis,t[72]=ut):ut=t[72];let q;t[73]!==d||t[74]!==ut?(q={axis:{stroke:d,...ut}},t[73]=d,t[74]=ut,t[75]=q):q=t[75];let xt;t[76]!==a||t[77]!==et||t[78]!==q?(xt=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:a,x1:-15,x2:-15,classNames:et,styles:q}),t[76]=a,t[77]=et,t[78]=q,t[79]=xt):xt=t[79];let wt;t[80]!==u||t[81]!==d||t[82]!==o?.yAxis?.title||t[83]!==a||t[84]!==l.left||t[85]!==R||t[86]!==s?.yAxis?.title?(wt=R?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:10-l.left,y:a/2,style:{fill:d,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:u[0].length>100?`${u[0].substring(0,100)}...`:u[0],rotate90:!0}):null,t[80]=u,t[81]=d,t[82]=o?.yAxis?.title,t[83]=a,t[84]=l.left,t[85]=R,t[86]=s?.yAxis?.title,t[87]=wt):wt=t[87],z=n.jsxRuntimeExports.jsxs("g",{children:[re.map((i,Pt)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:f(i),y2:f(i),x1:-15,x2:-20,style:{stroke:d,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:f(i),dy:"0.33em",className:n.mo("text-xs",o?.yAxis?.labels),style:{textAnchor:"end",fill:d,...s?.yAxis?.labels||{}},children:ne.numberFormattingFunction(i,rt,F,Lt,Ct)})]},Pt)),xt,wt]});const It=h+15,it=h+15,nt=o?.xAxis?.axis;let E;t[88]!==nt?(E={axis:nt},t[88]=nt,t[89]=E):E=t[89];let I;t[90]!==s?.xAxis?.axis?(I=s?.xAxis?.axis||{},t[90]=s?.xAxis?.axis,t[91]=I):I=t[91];let mt;t[92]!==p||t[93]!==I?(mt={axis:{stroke:p,...I}},t[92]=p,t[93]=I,t[94]=mt):mt=t[94];let Vt;t[95]!==a||t[96]!==It||t[97]!==it||t[98]!==E||t[99]!==mt?(Vt=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:a,x1:It,x2:it,classNames:E,styles:mt}),t[95]=a,t[96]=It,t[97]=it,t[98]=E,t[99]=mt,t[100]=Vt):Vt=t[100];let Zt;t[101]!==u||t[102]!==o?.yAxis?.title||t[103]!==a||t[104]!==h||t[105]!==p||t[106]!==l.right||t[107]!==R||t[108]!==s?.yAxis?.title?(Zt=R?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:h+l.right-15,y:a/2,style:{fill:p,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:u[1].length>100?`${u[1].substring(0,100)}...`:u[1],rotate90:!0}):null,t[101]=u,t[102]=o?.yAxis?.title,t[103]=a,t[104]=h,t[105]=p,t[106]=l.right,t[107]=R,t[108]=s?.yAxis?.title,t[109]=Zt):Zt=t[109],J=n.jsxRuntimeExports.jsxs("g",{children:[Ut.map((i,Pt)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:b(i),y2:b(i),x1:h+15,x2:h+20,style:{stroke:p,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:h+25,y:b(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:p,...s?.yAxis?.labels||{}},className:n.mo("text-xs",o?.yAxis?.labels),children:ne.numberFormattingFunction(i,rt,F,kt,ft)})]},Pt)),Vt,Zt]});const le=o?.xAxis?.axis;let _t;t[110]!==le?(_t={axis:le},t[110]=le,t[111]=_t):_t=t[111];const ae=s?.xAxis?.axis;let te;t[112]!==ae?(te={axis:ae},t[112]=ae,t[113]=te):te=t[113],Y=n.jsxRuntimeExports.jsx(ce.Axis,{y1:A?f(0):a,y2:A?f(0):a,x1:-15,x2:h+15,classNames:_t,styles:te}),t[114]!==k?(M=k.filter(Oe).map(Ne),t[114]=k,t[115]=M):M=t[115],S=Ae.AnimatePresence,T=m.map((i,Pt)=>n.jsxRuntimeExports.jsxs(Dt.motion.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:V=>{lt(i),at(V.clientY),c(V.clientX),ot?.(i)},onClick:()=>{(C||y)&&(xe.isEqual(w,i)&&pt?(gt(void 0),C?.(void 0)):(gt(i),C?.(i)))},onMouseMove:V=>{lt(i),at(V.clientY),c(V.clientX)},onMouseLeave:()=>{lt(void 0),c(void 0),at(void 0),ot?.(void 0)},children:[n.jsxRuntimeExports.jsx(Dt.motion.rect,{variants:{initial:{attrY:f(0),height:0,opacity:1,fill:d},whileInView:{attrY:i.bar?i.bar>0?f(i.bar):f(0):0,height:i.bar?Math.abs(f(i.bar)-f(0)):0,opacity:1,fill:d,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",exit:{attrY:f(0),height:0,opacity:0,transition:{duration:r.duration}},x:g(`${Pt}`),width:g.bandwidth()}),Rt&&!ue.checkIfNullOrUndefined(i.bar)?n.jsxRuntimeExports.jsx(Dt.motion.text,{x:g(`${i.id}`)+g.bandwidth()/2,exit:{attrY:f(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{attrY:f(0),opacity:0,fill:d},whileInView:{attrY:f(i.bar||0),opacity:1,fill:d,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",style:{textAnchor:"middle",...s?.graphObjectValues||{}},className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:i.bar?i.bar>=0?"-5px":"1em":"-5px",children:ne.numberFormattingFunction(i.bar,rt,F,Lt,Ct)}):null,Gt?n.jsxRuntimeExports.jsx(be.XAxesLabels,{value:`${i.label}`.length<Mt?`${i.label}`:`${`${i.label}`.substring(0,Mt)}...`,y:a+5,x:g(`${i.id}`),width:g.bandwidth(),height:l.bottom,style:s?.xAxis?.labels,className:o?.xAxis?.labels,alignment:"top",animate:r,isInView:L}):null]},i.label));let ee;t[116]!==r.duration?(ee={opacity:0,transition:{duration:r.duration}},t[116]=r.duration,t[117]=ee):ee=t[117];let ie;t[118]===Symbol.for("react.memo_cache_sentinel")?(ie={fill:"none",strokeWidth:2},t[118]=ie):ie=t[118],$=n.jsxRuntimeExports.jsx(Dt.motion.path,{exit:ee,variants:{initial:{d:qt(m.map(Se)),opacity:0,stroke:p},whileInView:{d:qt(m),opacity:1,stroke:p,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",style:ie}),B=m.map((i,Pt)=>n.jsxRuntimeExports.jsx("g",{children:ue.checkIfNullOrUndefined(i.line)?null:n.jsxRuntimeExports.jsxs("g",{onMouseEnter:V=>{lt(i),at(V.clientY),c(V.clientX),ot?.(i)},onClick:()=>{(C||y)&&(xe.isEqual(w,i)&&pt?(gt(void 0),C?.(void 0)):(gt(i),C?.(i)))},onMouseMove:V=>{lt(i),at(V.clientY),c(V.clientX)},onMouseLeave:()=>{lt(void 0),c(void 0),at(void 0),ot?.(void 0)},children:[n.jsxRuntimeExports.jsx(Dt.motion.circle,{exit:{cy:b(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{cy:b(0),opacity:0,fill:p},whileInView:{cy:b(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",cx:g(i.id)+g.bandwidth()/2,r:h/m.length<5?0:h/m.length<20?2:4}),Rt?n.jsxRuntimeExports.jsx(Dt.motion.text,{x:g(`${i.id}`)+g.bandwidth()/2,exit:{y:b(0),opacity:0,transition:{duration:r.duration}},style:{textAnchor:"middle",...s?.graphObjectValues||{}},variants:{initial:{y:b(0),opacity:0,fill:p},whileInView:{y:b(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:"-5px",children:ne.numberFormattingFunction(i.line,rt,F,kt,ft)}):null]})},Pt)),t[8]=r,t[9]=u,t[10]=d,t[11]=Yt,t[12]=Lt,t[13]=Ct,t[14]=o?.graphObjectValues,t[15]=o?.xAxis?.axis,t[16]=o?.xAxis?.labels,t[17]=o?.yAxis?.gridLines,t[18]=o?.yAxis?.labels,t[19]=o?.yAxis?.title,t[20]=Xt,t[21]=k,t[22]=j,t[23]=y,t[24]=a,t[25]=h,t[26]=D,t[27]=L,t[28]=p,t[29]=kt,t[30]=ft,t[31]=l.bottom,t[32]=l.left,t[33]=l.right,t[34]=l.top,t[35]=w,t[36]=rt,t[37]=dt,t[38]=C,t[39]=ot,t[40]=F,t[41]=pt,t[42]=A,t[43]=R,t[44]=Gt,t[45]=Rt,t[46]=s?.graphObjectValues,t[47]=s?.xAxis?.axis,t[48]=s?.xAxis?.labels,t[49]=s?.yAxis?.gridLines,t[50]=s?.yAxis?.labels,t[51]=s?.yAxis?.title,t[52]=Mt,t[53]=P,t[54]=S,t[55]=H,t[56]=Y,t[57]=M,t[58]=G,t[59]=X,t[60]=W,t[61]=N,t[62]=O,t[63]=T,t[64]=$,t[65]=B,t[66]=U,t[67]=z,t[68]=J}else S=t[54],H=t[55],Y=t[56],M=t[57],G=t[58],X=t[59],W=t[60],N=t[61],O=t[62],T=t[63],$=t[64],B=t[65],U=t[66],z=t[67],J=t[68];let K;t[119]!==S||t[120]!==T||t[121]!==$||t[122]!==B?(K=n.jsxRuntimeExports.jsxs(S,{children:[T,$,B]}),t[119]=S,t[120]=T,t[121]=$,t[122]=B,t[123]=K):K=t[123];let v;t[124]!==k?(v=k.filter(Le).map(ke),t[124]=k,t[125]=v):v=t[125];let Q;t[126]!==Y||t[127]!==M||t[128]!==K||t[129]!==v||t[130]!==U||t[131]!==z||t[132]!==J?(Q=n.jsxRuntimeExports.jsxs("g",{transform:U,children:[z,J,Y,M,K,v]}),t[126]=Y,t[127]=M,t[128]=K,t[129]=v,t[130]=U,t[131]=z,t[132]=J,t[133]=Q):Q=t[133];let Z;t[134]!==H||t[135]!==G||t[136]!==X||t[137]!==W||t[138]!==N||t[139]!==O||t[140]!==Q?(Z=n.jsxRuntimeExports.jsx(H,{width:G,height:X,viewBox:W,direction:N,ref:O,children:Q}),t[134]=H,t[135]=G,t[136]=X,t[137]=W,t[138]=N,t[139]=O,t[140]=Q,t[141]=Z):Z=t[141];let _;t[142]!==o?.tooltip||t[143]!==Ot||t[144]!==x||t[145]!==Nt||t[146]!==s?.tooltip||t[147]!==Et?(_=Nt&&Et&&Ot&&x?n.jsxRuntimeExports.jsx(ge.Tooltip,{data:Nt,body:Et,xPos:Ot,yPos:x,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[142]=o?.tooltip,t[143]=Ot,t[144]=x,t[145]=Nt,t[146]=s?.tooltip,t[147]=Et,t[148]=_):_=t[148];let tt;t[149]!==y||t[150]!==w?(tt=y&&w!==void 0?n.jsxRuntimeExports.jsx(he.le,{open:w!==void 0,onClose:()=>{gt(void 0)},children:n.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof y=="string"?{__html:ye.string2HTML(y,w)}:void 0,children:typeof y=="function"?y(w):null})}):null,t[149]=y,t[150]=w,t[151]=tt):tt=t[151];let bt;return t[152]!==Z||t[153]!==_||t[154]!==tt?(bt=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[Z,_,tt]}),t[152]=Z,t[153]=_,t[154]=tt,t[155]=bt):bt=t[155],bt}function ke(e){return e.layer}function Le(e){return e.position==="after"}function Se(e){return{...e,line:0}}function Ne(e){return e.layer}function Oe(e){return e.position==="before"}function Te(e){return!ue.checkIfNullOrUndefined(e.line)}function $e(e){return e!=null}function qe(e){return e.line}function Ie(e){return e!=null}function Ve(e){return e.line}function Pe(e){return e!=null}function De(e){return e.bar}function Fe(e){return e!=null}function He(e){return e.bar}function Ye(e){return e!=null}function Ge(e){return e.line}function Xe(e){return e!=null}function We(e){return e.line}function Be(e){return e!=null}function Ue(e){return e.line}function ze(e){return e!=null}function Je(e){return e.bar}function Ke(e){return e!=null}function Qe(e){return e.bar}function Ze(e){return e!=null}function _e(e){return e.bar}function ti(e){return`${e.id}`}function ei(e,t){return{...e,id:`${t}`}}function ii(e){const t=n.compilerRuntimeExports.c(77),{data:j,graphTitle:P,sources:D,graphDescription:d,height:p,width:u,footNote:A,padding:zt,lineColor:Qt,barColor:Ft,sameAxes:Ht,backgroundColor:Et,leftMargin:Rt,rightMargin:ot,topMargin:Yt,bottomMargin:Mt,lineAxisTitle:Gt,barAxisTitle:C,tooltip:pt,relativeHeight:y,onSeriesMouseOver:dt,graphID:ft,graphDownload:Ct,dataDownload:kt,barPadding:Lt,truncateBy:St,showLabels:s,onSeriesMouseClick:o,language:r,colorLegendTitle:F,minHeight:k,theme:rt,ariaLabel:R,resetSelectionOnDoubleClick:Jt,detailsOnClick:ht,showValues:L,noOfTicks:Xt,lineSuffix:Nt,barSuffix:lt,linePrefix:w,barPrefix:gt,curveType:Ot,styles:c,classNames:x,animate:at,precision:Wt,customLayers:yt,naLabel:Tt,showColorScale:l,showAxisLabels:h}=e,a=Qt===void 0?oe.Colors.light.categoricalColors.colors[1]:Qt,S=Ft===void 0?oe.Colors.light.categoricalColors.colors[0]:Ft,H=Ht===void 0?!1:Ht,Y=Et===void 0?!1:Et,M=Rt===void 0?80:Rt,G=ot===void 0?80:ot,X=Yt===void 0?20:Yt,W=Mt===void 0?25:Mt,N=Gt===void 0?"Line chart":Gt,O=C===void 0?"Bar graph":C,T=Ct===void 0?!1:Ct,$=kt===void 0?!1:kt,B=Lt===void 0?.25:Lt,U=St===void 0?999:St,z=s===void 0?!0:s,J=r===void 0?"en":r,K=k===void 0?0:k,v=rt===void 0?"light":rt,Q=Jt===void 0?!0:Jt,Z=L===void 0?!0:L,_=Xt===void 0?5:Xt,tt=Nt===void 0?"":Nt,bt=lt===void 0?"":lt,m=w===void 0?"":w,g=gt===void 0?"":gt,$t=Ot===void 0?"curve":Ot,vt=at===void 0?!1:at,jt=Wt===void 0?2:Wt;let ct;t[0]!==yt?(ct=yt===void 0?[]:yt,t[0]=yt,t[1]=ct):ct=t[1];const Bt=ct,At=Tt===void 0?"NA":Tt,f=l===void 0?!0:l,b=h===void 0?!0:h,[qt,re]=st.useState(0),[Ut,Kt]=st.useState(0),et=st.useRef(null),ut=st.useRef(null);let q,xt;t[2]===Symbol.for("react.memo_cache_sentinel")?(q=()=>{const mt=new ResizeObserver(Vt=>{re(Vt[0].target.clientWidth||620),Kt(Vt[0].target.clientHeight||480)});return et.current&&mt.observe(et.current),()=>mt.disconnect()},xt=[],t[2]=q,t[3]=xt):(q=t[2],xt=t[3]),st.useEffect(q,xt);const wt=x?.graphContainer,It=c?.graphContainer;let it;t[4]!==x?.description||t[5]!==x?.title||t[6]!==j||t[7]!==$||t[8]!==d||t[9]!==T||t[10]!==P||t[11]!==c?.description||t[12]!==c?.title||t[13]!==u?(it=P||d||T||$?n.jsxRuntimeExports.jsx(Ee.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:x?.title,description:x?.description},graphTitle:P,graphDescription:d,width:u,graphDownload:T?ut:void 0,dataDownload:$?j.map(li).filter(ri).length>0?j.map(oi).filter(si):j.filter(ni):null}):null,t[4]=x?.description,t[5]=x?.title,t[6]=j,t[7]=$,t[8]=d,t[9]=T,t[10]=P,t[11]=c?.description,t[12]=c?.title,t[13]=u,t[14]=it):it=t[14];let nt;t[15]!==vt||t[16]!==O||t[17]!==S||t[18]!==B||t[19]!==g||t[20]!==bt||t[21]!==W||t[22]!==x||t[23]!==F||t[24]!==$t||t[25]!==Bt||t[26]!==j||t[27]!==ht||t[28]!==M||t[29]!==N||t[30]!==a||t[31]!==m||t[32]!==tt||t[33]!==At||t[34]!==_||t[35]!==o||t[36]!==dt||t[37]!==jt||t[38]!==Q||t[39]!==G||t[40]!==H||t[41]!==b||t[42]!==f||t[43]!==z||t[44]!==Z||t[45]!==c||t[46]!==Ut||t[47]!==qt||t[48]!==v||t[49]!==pt||t[50]!==X||t[51]!==U?(nt=j.length===0?n.jsxRuntimeExports.jsx(Me.EmptyState,{}):n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[f?n.jsxRuntimeExports.jsx(Re.ColorLegend,{colorDomain:[O,N],colors:[S||oe.Colors[v].categoricalColors.colors[0],a||oe.Colors[v].categoricalColors.colors[1]],colorLegendTitle:F,showNAColor:!1,className:x?.colorLegend}):null,n.jsxRuntimeExports.jsx(fe.GraphArea,{ref:et,children:qt&&Ut?n.jsxRuntimeExports.jsx(Ce,{data:j,sameAxes:H,lineColor:a,barColor:S,width:qt,height:Ut,truncateBy:U,leftMargin:M,rightMargin:G,topMargin:X,bottomMargin:W,axisTitles:[O,N],tooltip:pt,onSeriesMouseOver:dt,barPadding:B,showLabels:z,onSeriesMouseClick:o,resetSelectionOnDoubleClick:Q,detailsOnClick:ht,noOfTicks:_,lineSuffix:tt,barSuffix:bt,linePrefix:m,barPrefix:g,curveType:$t,showValues:Z,styles:c,classNames:x,animate:vt===!0?{duration:.5,once:!0,amount:.5}:vt||{duration:0,once:!0,amount:0},precision:jt,customLayers:Bt,naLabel:At,showAxisLabels:b}):null})]}),t[15]=vt,t[16]=O,t[17]=S,t[18]=B,t[19]=g,t[20]=bt,t[21]=W,t[22]=x,t[23]=F,t[24]=$t,t[25]=Bt,t[26]=j,t[27]=ht,t[28]=M,t[29]=N,t[30]=a,t[31]=m,t[32]=tt,t[33]=At,t[34]=_,t[35]=o,t[36]=dt,t[37]=jt,t[38]=Q,t[39]=G,t[40]=H,t[41]=b,t[42]=f,t[43]=z,t[44]=Z,t[45]=c,t[46]=Ut,t[47]=qt,t[48]=v,t[49]=pt,t[50]=X,t[51]=U,t[52]=nt):nt=t[52];let E;t[53]!==x?.footnote||t[54]!==x?.source||t[55]!==A||t[56]!==D||t[57]!==c?.footnote||t[58]!==c?.source||t[59]!==u?(E=D||A?n.jsxRuntimeExports.jsx(we.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:D,footNote:A,width:u}):null,t[53]=x?.footnote,t[54]=x?.source,t[55]=A,t[56]=D,t[57]=c?.footnote,t[58]=c?.source,t[59]=u,t[60]=E):E=t[60];let I;return t[61]!==R||t[62]!==Y||t[63]!==ft||t[64]!==p||t[65]!==J||t[66]!==K||t[67]!==zt||t[68]!==y||t[69]!==wt||t[70]!==It||t[71]!==it||t[72]!==nt||t[73]!==E||t[74]!==v||t[75]!==u?(I=n.jsxRuntimeExports.jsxs(fe.GraphContainer,{className:wt,style:It,id:ft,ref:ut,"aria-label":R,backgroundColor:Y,theme:v,language:J,minHeight:K,width:u,height:p,relativeHeight:y,padding:zt,children:[it,nt,E]}),t[61]=R,t[62]=Y,t[63]=ft,t[64]=p,t[65]=J,t[66]=K,t[67]=zt,t[68]=y,t[69]=wt,t[70]=It,t[71]=it,t[72]=nt,t[73]=E,t[74]=v,t[75]=u,t[76]=I):I=t[76],I}function ni(e){return e!==void 0}function si(e){return e!==void 0}function oi(e){return e.data}function ri(e){return e!==void 0}function li(e){return e.data}exports.ParetoChart=ii;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-CTPQjnHt.cjs"),st=require("react"),xe=require("./index-DQA8q5sC.cjs"),he=require("./Modal-JW_IExO3.cjs"),ne=require("./numberFormattingFunction-02t-wJta.cjs"),ge=require("./Tooltip-4dJo4_AF.cjs"),ye=require("./string2HTML-CPGr_I5E.cjs"),ue=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ce=require("./Axis-DxRV2yMi.cjs"),me=require("./AxisTitle-sS5bLLR7.cjs"),be=require("./XAxesLabels-Bt5NZBmX.cjs"),ve=require("./band-VYfcZeJ2.cjs"),pe=require("./linear-BwPAspcq.cjs"),de=require("./line-DHV4JwCR.cjs"),se=require("./step-BZ3C8QFW.cjs"),je=require("./use-in-view-QcfiW0w3.cjs"),Dt=require("./proxy-BxvUI_9l.cjs"),Ae=require("./index-DG2bgAva.cjs"),we=require("./GraphFooter.cjs"),Ee=require("./GraphHeader.cjs"),Re=require("./ColorLegend.cjs"),oe=require("./Colors.cjs"),Me=require("./EmptyState-sAEZ_5rU.cjs"),fe=require("./GraphContainer-d8A46BK2.cjs");function Ce(e){const t=n.compilerRuntimeExports.c(156),{data:j,width:P,height:D,barColor:d,lineColor:p,axisTitles:u,sameAxes:A,rightMargin:zt,leftMargin:Qt,topMargin:Ft,bottomMargin:Ht,tooltip:Et,showValues:Rt,onSeriesMouseOver:ot,barPadding:Yt,truncateBy:Mt,showLabels:Gt,onSeriesMouseClick:C,resetSelectionOnDoubleClick:pt,detailsOnClick:y,noOfTicks:dt,lineSuffix:ft,barSuffix:Ct,linePrefix:kt,barPrefix:Lt,curveType:St,styles:s,classNames:o,animate:r,precision:F,customLayers:k,naLabel:rt,showAxisLabels:R}=e,Jt=st.useRef(null);let ht;t[0]!==r.amount||t[1]!==r.once?(ht={once:r.once,amount:r.amount},t[0]=r.amount,t[1]=r.once,t[2]=ht):ht=t[2];const L=je.useInView(Jt,ht),Xt=St==="linear"?de.curveLinear:St==="step"?se.curveStep:St==="stepAfter"?se.stepAfter:St==="stepBefore"?se.stepBefore:se.monotoneX,[Nt,lt]=st.useState(void 0),[w,gt]=st.useState(void 0),[Ot,c]=st.useState(void 0),[x,at]=st.useState(void 0),Wt=Qt+50,yt=zt+65;let Tt;t[3]!==Ht||t[4]!==Wt||t[5]!==yt||t[6]!==Ft?(Tt={top:Ft,bottom:Ht,left:Wt,right:yt},t[3]=Ht,t[4]=Wt,t[5]=yt,t[6]=Ft,t[7]=Tt):Tt=t[7];const l=Tt,h=P-l.left-l.right,a=D-l.top-l.bottom;let S,H,Y,M,G,X,W,N,O,T,$,B,U,z,J;if(t[8]!==r||t[9]!==u||t[10]!==d||t[11]!==Yt||t[12]!==Lt||t[13]!==Ct||t[14]!==o?.graphObjectValues||t[15]!==o?.xAxis?.axis||t[16]!==o?.xAxis?.labels||t[17]!==o?.yAxis?.gridLines||t[18]!==o?.yAxis?.labels||t[19]!==o?.yAxis?.title||t[20]!==Xt||t[21]!==k||t[22]!==j||t[23]!==y||t[24]!==a||t[25]!==h||t[26]!==D||t[27]!==L||t[28]!==p||t[29]!==kt||t[30]!==ft||t[31]!==l.bottom||t[32]!==l.left||t[33]!==l.right||t[34]!==l.top||t[35]!==w||t[36]!==rt||t[37]!==dt||t[38]!==C||t[39]!==ot||t[40]!==F||t[41]!==pt||t[42]!==A||t[43]!==R||t[44]!==Gt||t[45]!==Rt||t[46]!==s?.graphObjectValues||t[47]!==s?.xAxis?.axis||t[48]!==s?.xAxis?.labels||t[49]!==s?.yAxis?.gridLines||t[50]!==s?.yAxis?.labels||t[51]!==s?.yAxis?.title||t[52]!==Mt||t[53]!==P){const m=j.map(ei),g=ve.band().domain(m.map(ti)).range([0,h]).paddingInner(Yt),$t=Math.min(...m.map(_e).filter(Ze))!==1/0?Math.min(...m.map(Qe).filter(Ke))>0?0:Math.min(...m.map(Je).filter(ze)):0,vt=Math.min(...m.map(Ue).filter(Be))!==1/0?Math.min(...m.map(We).filter(Xe))>0?0:Math.min(...m.map(Ge).filter(Ye)):0,jt=Math.max(...m.map(He).filter(Fe))!==1/0?Math.max(...m.map(De).filter(Pe)):0,ct=Math.max(...m.map(Ve).filter(Ie))!==1/0?Math.max(...m.map(qe).filter($e)):0,Bt=$t<vt?$t:vt,At=jt>ct?jt:ct,f=pe.linear().domain([A?Bt:$t,A?At>0?At:0:jt>0?jt:0]).range([a,0]).nice(),b=pe.linear().domain([A?Bt:vt,A?At>0?At:0:ct>0?ct:0]).range([a,0]).nice(),qt=de.line().defined(Te).x(i=>g(`${i.id}`)+g.bandwidth()/2).y(i=>b(i.line)).curve(Xt),re=f.ticks(dt),Ut=b.ticks(dt);H=Dt.motion.svg,G=`${P}px`,X=`${D}px`,W=`0 0 ${P} ${D}`,N="ltr",O=Jt,U=`translate(${l.left},${l.top})`;const Kt=o?.xAxis?.axis;let et;t[69]!==Kt?(et={axis:Kt},t[69]=Kt,t[70]=et):et=t[70];let ut;t[71]!==s?.xAxis?.axis?(ut=s?.xAxis?.axis||{},t[71]=s?.xAxis?.axis,t[72]=ut):ut=t[72];let q;t[73]!==d||t[74]!==ut?(q={axis:{stroke:d,...ut}},t[73]=d,t[74]=ut,t[75]=q):q=t[75];let xt;t[76]!==a||t[77]!==et||t[78]!==q?(xt=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:a,x1:-15,x2:-15,classNames:et,styles:q}),t[76]=a,t[77]=et,t[78]=q,t[79]=xt):xt=t[79];let wt;t[80]!==u||t[81]!==d||t[82]!==o?.yAxis?.title||t[83]!==a||t[84]!==l.left||t[85]!==R||t[86]!==s?.yAxis?.title?(wt=R?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:10-l.left,y:a/2,style:{fill:d,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:u[0].length>100?`${u[0].substring(0,100)}...`:u[0],rotate90:!0}):null,t[80]=u,t[81]=d,t[82]=o?.yAxis?.title,t[83]=a,t[84]=l.left,t[85]=R,t[86]=s?.yAxis?.title,t[87]=wt):wt=t[87],z=n.jsxRuntimeExports.jsxs("g",{children:[re.map((i,Pt)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:f(i),y2:f(i),x1:-15,x2:-20,style:{stroke:d,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:f(i),dy:"0.33em",className:n.mo("text-xs",o?.yAxis?.labels),style:{textAnchor:"end",fill:d,...s?.yAxis?.labels||{}},children:ne.numberFormattingFunction(i,rt,F,Lt,Ct)})]},Pt)),xt,wt]});const It=h+15,it=h+15,nt=o?.xAxis?.axis;let E;t[88]!==nt?(E={axis:nt},t[88]=nt,t[89]=E):E=t[89];let I;t[90]!==s?.xAxis?.axis?(I=s?.xAxis?.axis||{},t[90]=s?.xAxis?.axis,t[91]=I):I=t[91];let mt;t[92]!==p||t[93]!==I?(mt={axis:{stroke:p,...I}},t[92]=p,t[93]=I,t[94]=mt):mt=t[94];let Vt;t[95]!==a||t[96]!==It||t[97]!==it||t[98]!==E||t[99]!==mt?(Vt=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:a,x1:It,x2:it,classNames:E,styles:mt}),t[95]=a,t[96]=It,t[97]=it,t[98]=E,t[99]=mt,t[100]=Vt):Vt=t[100];let Zt;t[101]!==u||t[102]!==o?.yAxis?.title||t[103]!==a||t[104]!==h||t[105]!==p||t[106]!==l.right||t[107]!==R||t[108]!==s?.yAxis?.title?(Zt=R?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:h+l.right-15,y:a/2,style:{fill:p,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:u[1].length>100?`${u[1].substring(0,100)}...`:u[1],rotate90:!0}):null,t[101]=u,t[102]=o?.yAxis?.title,t[103]=a,t[104]=h,t[105]=p,t[106]=l.right,t[107]=R,t[108]=s?.yAxis?.title,t[109]=Zt):Zt=t[109],J=n.jsxRuntimeExports.jsxs("g",{children:[Ut.map((i,Pt)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:b(i),y2:b(i),x1:h+15,x2:h+20,style:{stroke:p,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:h+25,y:b(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:p,...s?.yAxis?.labels||{}},className:n.mo("text-xs",o?.yAxis?.labels),children:ne.numberFormattingFunction(i,rt,F,kt,ft)})]},Pt)),Vt,Zt]});const le=o?.xAxis?.axis;let _t;t[110]!==le?(_t={axis:le},t[110]=le,t[111]=_t):_t=t[111];const ae=s?.xAxis?.axis;let te;t[112]!==ae?(te={axis:ae},t[112]=ae,t[113]=te):te=t[113],Y=n.jsxRuntimeExports.jsx(ce.Axis,{y1:A?f(0):a,y2:A?f(0):a,x1:-15,x2:h+15,classNames:_t,styles:te}),t[114]!==k?(M=k.filter(Oe).map(Ne),t[114]=k,t[115]=M):M=t[115],S=Ae.AnimatePresence,T=m.map((i,Pt)=>n.jsxRuntimeExports.jsxs(Dt.motion.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:V=>{lt(i),at(V.clientY),c(V.clientX),ot?.(i)},onClick:()=>{(C||y)&&(xe.isEqual(w,i)&&pt?(gt(void 0),C?.(void 0)):(gt(i),C?.(i)))},onMouseMove:V=>{lt(i),at(V.clientY),c(V.clientX)},onMouseLeave:()=>{lt(void 0),c(void 0),at(void 0),ot?.(void 0)},children:[n.jsxRuntimeExports.jsx(Dt.motion.rect,{variants:{initial:{attrY:f(0),height:0,opacity:1,fill:d},whileInView:{attrY:i.bar?i.bar>0?f(i.bar):f(0):0,height:i.bar?Math.abs(f(i.bar)-f(0)):0,opacity:1,fill:d,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",exit:{attrY:f(0),height:0,opacity:0,transition:{duration:r.duration}},x:g(`${Pt}`),width:g.bandwidth()}),Rt&&!ue.checkIfNullOrUndefined(i.bar)?n.jsxRuntimeExports.jsx(Dt.motion.text,{x:g(`${i.id}`)+g.bandwidth()/2,exit:{attrY:f(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{attrY:f(0),opacity:0,fill:d},whileInView:{attrY:f(i.bar||0),opacity:1,fill:d,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",style:{textAnchor:"middle",...s?.graphObjectValues||{}},className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:i.bar?i.bar>=0?"-5px":"1em":"-5px",children:ne.numberFormattingFunction(i.bar,rt,F,Lt,Ct)}):null,Gt?n.jsxRuntimeExports.jsx(be.XAxesLabels,{value:`${i.label}`.length<Mt?`${i.label}`:`${`${i.label}`.substring(0,Mt)}...`,y:a+5,x:g(`${i.id}`),width:g.bandwidth(),height:l.bottom,style:s?.xAxis?.labels,className:o?.xAxis?.labels,alignment:"top",animate:r,isInView:L}):null]},i.label));let ee;t[116]!==r.duration?(ee={opacity:0,transition:{duration:r.duration}},t[116]=r.duration,t[117]=ee):ee=t[117];let ie;t[118]===Symbol.for("react.memo_cache_sentinel")?(ie={fill:"none",strokeWidth:2},t[118]=ie):ie=t[118],$=n.jsxRuntimeExports.jsx(Dt.motion.path,{exit:ee,variants:{initial:{d:qt(m.map(Se)),opacity:0,stroke:p},whileInView:{d:qt(m),opacity:1,stroke:p,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",style:ie}),B=m.map((i,Pt)=>n.jsxRuntimeExports.jsx("g",{children:ue.checkIfNullOrUndefined(i.line)?null:n.jsxRuntimeExports.jsxs("g",{onMouseEnter:V=>{lt(i),at(V.clientY),c(V.clientX),ot?.(i)},onClick:()=>{(C||y)&&(xe.isEqual(w,i)&&pt?(gt(void 0),C?.(void 0)):(gt(i),C?.(i)))},onMouseMove:V=>{lt(i),at(V.clientY),c(V.clientX)},onMouseLeave:()=>{lt(void 0),c(void 0),at(void 0),ot?.(void 0)},children:[n.jsxRuntimeExports.jsx(Dt.motion.circle,{exit:{cy:b(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{cy:b(0),opacity:0,fill:p},whileInView:{cy:b(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",cx:g(i.id)+g.bandwidth()/2,r:h/m.length<5?0:h/m.length<20?2:4}),Rt?n.jsxRuntimeExports.jsx(Dt.motion.text,{x:g(`${i.id}`)+g.bandwidth()/2,exit:{y:b(0),opacity:0,transition:{duration:r.duration}},style:{textAnchor:"middle",...s?.graphObjectValues||{}},variants:{initial:{y:b(0),opacity:0,fill:p},whileInView:{y:b(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:"-5px",children:ne.numberFormattingFunction(i.line,rt,F,kt,ft)}):null]})},Pt)),t[8]=r,t[9]=u,t[10]=d,t[11]=Yt,t[12]=Lt,t[13]=Ct,t[14]=o?.graphObjectValues,t[15]=o?.xAxis?.axis,t[16]=o?.xAxis?.labels,t[17]=o?.yAxis?.gridLines,t[18]=o?.yAxis?.labels,t[19]=o?.yAxis?.title,t[20]=Xt,t[21]=k,t[22]=j,t[23]=y,t[24]=a,t[25]=h,t[26]=D,t[27]=L,t[28]=p,t[29]=kt,t[30]=ft,t[31]=l.bottom,t[32]=l.left,t[33]=l.right,t[34]=l.top,t[35]=w,t[36]=rt,t[37]=dt,t[38]=C,t[39]=ot,t[40]=F,t[41]=pt,t[42]=A,t[43]=R,t[44]=Gt,t[45]=Rt,t[46]=s?.graphObjectValues,t[47]=s?.xAxis?.axis,t[48]=s?.xAxis?.labels,t[49]=s?.yAxis?.gridLines,t[50]=s?.yAxis?.labels,t[51]=s?.yAxis?.title,t[52]=Mt,t[53]=P,t[54]=S,t[55]=H,t[56]=Y,t[57]=M,t[58]=G,t[59]=X,t[60]=W,t[61]=N,t[62]=O,t[63]=T,t[64]=$,t[65]=B,t[66]=U,t[67]=z,t[68]=J}else S=t[54],H=t[55],Y=t[56],M=t[57],G=t[58],X=t[59],W=t[60],N=t[61],O=t[62],T=t[63],$=t[64],B=t[65],U=t[66],z=t[67],J=t[68];let K;t[119]!==S||t[120]!==T||t[121]!==$||t[122]!==B?(K=n.jsxRuntimeExports.jsxs(S,{children:[T,$,B]}),t[119]=S,t[120]=T,t[121]=$,t[122]=B,t[123]=K):K=t[123];let v;t[124]!==k?(v=k.filter(Le).map(ke),t[124]=k,t[125]=v):v=t[125];let Q;t[126]!==Y||t[127]!==M||t[128]!==K||t[129]!==v||t[130]!==U||t[131]!==z||t[132]!==J?(Q=n.jsxRuntimeExports.jsxs("g",{transform:U,children:[z,J,Y,M,K,v]}),t[126]=Y,t[127]=M,t[128]=K,t[129]=v,t[130]=U,t[131]=z,t[132]=J,t[133]=Q):Q=t[133];let Z;t[134]!==H||t[135]!==G||t[136]!==X||t[137]!==W||t[138]!==N||t[139]!==O||t[140]!==Q?(Z=n.jsxRuntimeExports.jsx(H,{width:G,height:X,viewBox:W,direction:N,ref:O,children:Q}),t[134]=H,t[135]=G,t[136]=X,t[137]=W,t[138]=N,t[139]=O,t[140]=Q,t[141]=Z):Z=t[141];let _;t[142]!==o?.tooltip||t[143]!==Ot||t[144]!==x||t[145]!==Nt||t[146]!==s?.tooltip||t[147]!==Et?(_=Nt&&Et&&Ot&&x?n.jsxRuntimeExports.jsx(ge.Tooltip,{data:Nt,body:Et,xPos:Ot,yPos:x,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[142]=o?.tooltip,t[143]=Ot,t[144]=x,t[145]=Nt,t[146]=s?.tooltip,t[147]=Et,t[148]=_):_=t[148];let tt;t[149]!==y||t[150]!==w?(tt=y&&w!==void 0?n.jsxRuntimeExports.jsx(he.le,{open:w!==void 0,onClose:()=>{gt(void 0)},children:n.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof y=="string"?{__html:ye.string2HTML(y,w)}:void 0,children:typeof y=="function"?y(w):null})}):null,t[149]=y,t[150]=w,t[151]=tt):tt=t[151];let bt;return t[152]!==Z||t[153]!==_||t[154]!==tt?(bt=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[Z,_,tt]}),t[152]=Z,t[153]=_,t[154]=tt,t[155]=bt):bt=t[155],bt}function ke(e){return e.layer}function Le(e){return e.position==="after"}function Se(e){return{...e,line:0}}function Ne(e){return e.layer}function Oe(e){return e.position==="before"}function Te(e){return!ue.checkIfNullOrUndefined(e.line)}function $e(e){return e!=null}function qe(e){return e.line}function Ie(e){return e!=null}function Ve(e){return e.line}function Pe(e){return e!=null}function De(e){return e.bar}function Fe(e){return e!=null}function He(e){return e.bar}function Ye(e){return e!=null}function Ge(e){return e.line}function Xe(e){return e!=null}function We(e){return e.line}function Be(e){return e!=null}function Ue(e){return e.line}function ze(e){return e!=null}function Je(e){return e.bar}function Ke(e){return e!=null}function Qe(e){return e.bar}function Ze(e){return e!=null}function _e(e){return e.bar}function ti(e){return`${e.id}`}function ei(e,t){return{...e,id:`${t}`}}function ii(e){const t=n.compilerRuntimeExports.c(77),{data:j,graphTitle:P,sources:D,graphDescription:d,height:p,width:u,footNote:A,padding:zt,lineColor:Qt,barColor:Ft,sameAxes:Ht,backgroundColor:Et,leftMargin:Rt,rightMargin:ot,topMargin:Yt,bottomMargin:Mt,lineAxisTitle:Gt,barAxisTitle:C,tooltip:pt,relativeHeight:y,onSeriesMouseOver:dt,graphID:ft,graphDownload:Ct,dataDownload:kt,barPadding:Lt,truncateBy:St,showLabels:s,onSeriesMouseClick:o,language:r,colorLegendTitle:F,minHeight:k,theme:rt,ariaLabel:R,resetSelectionOnDoubleClick:Jt,detailsOnClick:ht,showValues:L,noOfTicks:Xt,lineSuffix:Nt,barSuffix:lt,linePrefix:w,barPrefix:gt,curveType:Ot,styles:c,classNames:x,animate:at,precision:Wt,customLayers:yt,naLabel:Tt,showColorScale:l,showAxisLabels:h}=e,a=Qt===void 0?oe.Colors.light.categoricalColors.colors[1]:Qt,S=Ft===void 0?oe.Colors.light.categoricalColors.colors[0]:Ft,H=Ht===void 0?!1:Ht,Y=Et===void 0?!1:Et,M=Rt===void 0?80:Rt,G=ot===void 0?80:ot,X=Yt===void 0?20:Yt,W=Mt===void 0?25:Mt,N=Gt===void 0?"Line chart":Gt,O=C===void 0?"Bar graph":C,T=Ct===void 0?!1:Ct,$=kt===void 0?!1:kt,B=Lt===void 0?.25:Lt,U=St===void 0?999:St,z=s===void 0?!0:s,J=r===void 0?"en":r,K=k===void 0?0:k,v=rt===void 0?"light":rt,Q=Jt===void 0?!0:Jt,Z=L===void 0?!0:L,_=Xt===void 0?5:Xt,tt=Nt===void 0?"":Nt,bt=lt===void 0?"":lt,m=w===void 0?"":w,g=gt===void 0?"":gt,$t=Ot===void 0?"curve":Ot,vt=at===void 0?!1:at,jt=Wt===void 0?2:Wt;let ct;t[0]!==yt?(ct=yt===void 0?[]:yt,t[0]=yt,t[1]=ct):ct=t[1];const Bt=ct,At=Tt===void 0?"NA":Tt,f=l===void 0?!0:l,b=h===void 0?!0:h,[qt,re]=st.useState(0),[Ut,Kt]=st.useState(0),et=st.useRef(null),ut=st.useRef(null);let q,xt;t[2]===Symbol.for("react.memo_cache_sentinel")?(q=()=>{const mt=new ResizeObserver(Vt=>{re(Vt[0].target.clientWidth||620),Kt(Vt[0].target.clientHeight||480)});return et.current&&mt.observe(et.current),()=>mt.disconnect()},xt=[],t[2]=q,t[3]=xt):(q=t[2],xt=t[3]),st.useEffect(q,xt);const wt=x?.graphContainer,It=c?.graphContainer;let it;t[4]!==x?.description||t[5]!==x?.title||t[6]!==j||t[7]!==$||t[8]!==d||t[9]!==T||t[10]!==P||t[11]!==c?.description||t[12]!==c?.title||t[13]!==u?(it=P||d||T||$?n.jsxRuntimeExports.jsx(Ee.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:x?.title,description:x?.description},graphTitle:P,graphDescription:d,width:u,graphDownload:T?ut:void 0,dataDownload:$?j.map(li).filter(ri).length>0?j.map(oi).filter(si):j.filter(ni):null}):null,t[4]=x?.description,t[5]=x?.title,t[6]=j,t[7]=$,t[8]=d,t[9]=T,t[10]=P,t[11]=c?.description,t[12]=c?.title,t[13]=u,t[14]=it):it=t[14];let nt;t[15]!==vt||t[16]!==O||t[17]!==S||t[18]!==B||t[19]!==g||t[20]!==bt||t[21]!==W||t[22]!==x||t[23]!==F||t[24]!==$t||t[25]!==Bt||t[26]!==j||t[27]!==ht||t[28]!==M||t[29]!==N||t[30]!==a||t[31]!==m||t[32]!==tt||t[33]!==At||t[34]!==_||t[35]!==o||t[36]!==dt||t[37]!==jt||t[38]!==Q||t[39]!==G||t[40]!==H||t[41]!==b||t[42]!==f||t[43]!==z||t[44]!==Z||t[45]!==c||t[46]!==Ut||t[47]!==qt||t[48]!==v||t[49]!==pt||t[50]!==X||t[51]!==U?(nt=j.length===0?n.jsxRuntimeExports.jsx(Me.EmptyState,{}):n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[f?n.jsxRuntimeExports.jsx(Re.ColorLegend,{colorDomain:[O,N],colors:[S||oe.Colors[v].categoricalColors.colors[0],a||oe.Colors[v].categoricalColors.colors[1]],colorLegendTitle:F,showNAColor:!1,className:x?.colorLegend}):null,n.jsxRuntimeExports.jsx(fe.GraphArea,{ref:et,children:qt&&Ut?n.jsxRuntimeExports.jsx(Ce,{data:j,sameAxes:H,lineColor:a,barColor:S,width:qt,height:Ut,truncateBy:U,leftMargin:M,rightMargin:G,topMargin:X,bottomMargin:W,axisTitles:[O,N],tooltip:pt,onSeriesMouseOver:dt,barPadding:B,showLabels:z,onSeriesMouseClick:o,resetSelectionOnDoubleClick:Q,detailsOnClick:ht,noOfTicks:_,lineSuffix:tt,barSuffix:bt,linePrefix:m,barPrefix:g,curveType:$t,showValues:Z,styles:c,classNames:x,animate:vt===!0?{duration:.5,once:!0,amount:.5}:vt||{duration:0,once:!0,amount:0},precision:jt,customLayers:Bt,naLabel:At,showAxisLabels:b}):null})]}),t[15]=vt,t[16]=O,t[17]=S,t[18]=B,t[19]=g,t[20]=bt,t[21]=W,t[22]=x,t[23]=F,t[24]=$t,t[25]=Bt,t[26]=j,t[27]=ht,t[28]=M,t[29]=N,t[30]=a,t[31]=m,t[32]=tt,t[33]=At,t[34]=_,t[35]=o,t[36]=dt,t[37]=jt,t[38]=Q,t[39]=G,t[40]=H,t[41]=b,t[42]=f,t[43]=z,t[44]=Z,t[45]=c,t[46]=Ut,t[47]=qt,t[48]=v,t[49]=pt,t[50]=X,t[51]=U,t[52]=nt):nt=t[52];let E;t[53]!==x?.footnote||t[54]!==x?.source||t[55]!==A||t[56]!==D||t[57]!==c?.footnote||t[58]!==c?.source||t[59]!==u?(E=D||A?n.jsxRuntimeExports.jsx(we.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:D,footNote:A,width:u}):null,t[53]=x?.footnote,t[54]=x?.source,t[55]=A,t[56]=D,t[57]=c?.footnote,t[58]=c?.source,t[59]=u,t[60]=E):E=t[60];let I;return t[61]!==R||t[62]!==Y||t[63]!==ft||t[64]!==p||t[65]!==J||t[66]!==K||t[67]!==zt||t[68]!==y||t[69]!==wt||t[70]!==It||t[71]!==it||t[72]!==nt||t[73]!==E||t[74]!==v||t[75]!==u?(I=n.jsxRuntimeExports.jsxs(fe.GraphContainer,{className:wt,style:It,id:ft,ref:ut,"aria-label":R,backgroundColor:Y,theme:v,language:J,minHeight:K,width:u,height:p,relativeHeight:y,padding:zt,children:[it,nt,E]}),t[61]=R,t[62]=Y,t[63]=ft,t[64]=p,t[65]=J,t[66]=K,t[67]=zt,t[68]=y,t[69]=wt,t[70]=It,t[71]=it,t[72]=nt,t[73]=E,t[74]=v,t[75]=u,t[76]=I):I=t[76],I}function ni(e){return e!==void 0}function si(e){return e!==void 0}function oi(e){return e.data}function ri(e){return e!==void 0}function li(e){return e.data}exports.ParetoChart=ii;
2
2
  //# sourceMappingURL=ParetoChart.cjs.map
@@ -8,7 +8,7 @@ import { s as vi } from "./string2HTML-DhG75NqA.js";
8
8
  import { c as mi } from "./checkIfNullOrUndefined-DmfiKkNw.js";
9
9
  import { A as ci } from "./Axis-CRyfcLjc.js";
10
10
  import { A as fi } from "./AxisTitle-jeI7am8o.js";
11
- import { X as bi } from "./XAxesLabels-Dmbk50u4.js";
11
+ import { X as bi } from "./XAxesLabels-Dy8E1SEo.js";
12
12
  import { b as Ai } from "./band-CyHaVft5.js";
13
13
  import { a as pi } from "./linear-BwnDd9KF.js";
14
14
  import { l as wi, c as ji } from "./line-CPfhohvF.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),o=require("react"),te=require("./index-CyZ1lmi_.cjs"),q=require("./index-BS2TADPj.cjs"),le=require("./index-DQA8q5sC.cjs"),x=require("./DropdownSelect-Doz3mCrM.cjs"),c=require("./checkIfMultiple-wg6hJLXy.cjs"),ne=require("./Spinner-DRMBUsX7.cjs"),ie=require("./GraphContainer-d8A46BK2.cjs"),re=require("./GraphEl-D5MUfp45.cjs"),y=require("./fetchAndParseData-l5HGMAEs.cjs"),U=require("./transformDataForAggregation-KXGm6flX.cjs"),z=require("./getUniqValue-RViz8tTw.cjs"),se=require("./GraphHeader.cjs"),W=require("./filterData-T5DQBE9b.cjs"),oe=require("./getGraphList-gf02xgT2.cjs"),J=require("./transformDataForSelect-YmStusCI.cjs"),ue=u=>{if(u.findIndex(l=>l.chartConfigId==="yMin")!==-1&&u.findIndex(l=>l.chartConfigId==="yMax")!==-1)return u;const n=[...u];return u.findIndex(l=>l.chartConfigId==="yMin")===-1&&n.push({chartConfigId:"yMin",columnId:`${u[u.findIndex(l=>l.chartConfigId==="y")].columnId}Min`}),u.findIndex(l=>l.chartConfigId==="yMax")===-1&&n.push({chartConfigId:"yMax",columnId:`${u[u.findIndex(l=>l.chartConfigId==="y")].columnId}Max`}),n},M=(u,n)=>{const l=n?.map(D=>{const I=u?.findIndex(s=>s.chartConfigId===D.chartConfigId);if(I===-1)return{};const w=u[I]?.allowedColumnIds?.findIndex(s=>s.value===D.columnId);return w===-1?{}:u[I].allowedColumnIds[w].graphSettings||{}})||[];return Object.assign({},...l)};function de(u){const{graphSettings:n,dataSettings:l,filters:D,graphType:I,dataTransform:w,graphDataConfiguration:s,dataFilters:A,debugMode:S,dataSelectionOptions:b,advancedDataSelectionOptions:N,readableHeader:B,noOfFiltersPerRow:h=4,updateFilters:K,uiMode:g="normal",highlightDataPointSettings:C}=u,[P,F]=o.useState(void 0),[p,Q]=o.useState(void 0),[v,j]=o.useState(s),[m,E]=o.useState({}),[R,X]=o.useState(void 0),[Y,Z]=o.useState([]),H=o.useRef(null),O=o.useRef(s),[V,k]=o.useState([]),G={ignoreCase:!0,ignoreAccents:!0,trim:!0},L=o.useEffectEvent(()=>{const e=(D||[]).map(r=>({filter:r.column,label:r.label||`Filter by ${r.column}`,singleSelect:r.singleSelect,clearable:r.clearable,defaultValue:J.transformDefaultValue(r.defaultValue),value:J.transformDefaultValue(r.defaultValue),availableValues:z.getUniqValue(p,r.column).filter(a=>!r.excludeValues?.includes(`${a}`)).map(a=>({value:a,label:a})),allowSelectAll:r.allowSelectAll,width:r.width}));k(e)});o.useEffect(()=>{(async()=>{try{const r=l.dataURL?typeof l.dataURL=="string"?l.fileType==="json"?await y.fetchAndParseJSON(l.dataURL,l.columnsToArray,l.dataTransformation,S):l.fileType==="api"?await y.fetchAndTransformDataFromAPI(l.dataURL,l.apiHeaders,l.columnsToArray,l.dataTransformation,S):await y.fetchAndParseCSV(l.dataURL,l.dataTransformation,l.columnsToArray,S,l.delimiter,!0):await y.fetchAndParseMultipleDataSources(l.dataURL,l.idColumnTitle):await y.transformColumnsToArray(l.data,l.columnsToArray);Q(r)}catch(r){console.error("Data fetching error:",r)}})(),L()},[l,S]),o.useEffect(()=>{L()},[D]);const _=o.useEffectEvent(()=>{if(!p||V.length===0)F(p);else{const e=p.filter(r=>V.every(a=>a.value&&q.flattenDeep([a.value]).length>0?te.intersection(q.flattenDeep([r[a.filter]]),q.flattenDeep([a.value]).map(t=>t.value)).length>0:!0));F(e)}});o.useEffect(()=>{_()},[V,p]),o.useEffect(()=>{b&&E(M(b,s))},[b,s]);const ee=o.useEffectEvent(()=>{C?.column&&P&&Z(z.getUniqValue(P,C.column).filter(e=>!C?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))});o.useEffect(()=>{ee()},[C]),o.useEffect(()=>{le.isEqual(O.current,s)||(j(s),O.current=s)},[s]);const $=(e,r)=>{k(a=>a.map(t=>t.filter===e?{...t,value:r}:t))},ae=p?U.transformDataForGraph(w?U.transformDataForAggregation(W.filterData(p,A||[]),w.keyColumn,w.aggregationColumnsSetting):W.filterData(p,A||[]),I,I==="lineChartWithConfidenceInterval"&&v?ue(v):v):void 0;return i.jsxRuntimeExports.jsx(ie.GraphContainer,{className:n?.classNames?.graphContainer,style:n?.styles?.graphContainer,id:n?.graphID,ref:H,"aria-label":n?.ariaLabel,backgroundColor:n?.backgroundColor??!1,theme:n?.theme||"light",language:n?.language||"en",width:n?.width,height:n?.height,padding:n?.padding,minHeight:n?.minHeight,relativeHeight:n?.relativeHeight,children:p||oe.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(I)!==-1?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[m?.graphTitle||m?.graphDescription||n?.graphTitle||n?.graphDescription||n?.graphDownload||n?.dataDownload?i.jsxRuntimeExports.jsx(se.GraphHeader,{styles:{title:m?.styles?.title||n?.styles?.title,description:m?.styles?.description||n?.styles?.description},classNames:{title:m?.classNames?.title||n?.classNames?.title,description:m?.classNames?.description||n?.classNames?.description},graphTitle:m?.graphTitle||n?.graphTitle,graphDescription:m?.graphDescription||n?.graphDescription,width:m?.width||n?.width,graphDownload:n?.graphDownload?H:void 0,dataDownload:n?.dataDownload&&p&&p.length>0?p:null}):null,V.length!==0||(b||[]).length!==0||(N||[]).length!==0||C?i.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-0 w-full",children:[N?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(c.b,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?i.jsxRuntimeExports.jsx(x.ja,{options:e.options.map(a=>({...a,value:a.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:a=>{E(a?.graphSettings||{}),j(a?.dataConfiguration)}}):i.jsxRuntimeExports.jsx(c.ye,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:g,onValueChange:a=>{const t=e.options[e.options.findIndex(f=>f.label===a)];E(t.graphSettings||{}),j(t.dataConfiguration)},children:e.options.map((a,t)=>i.jsxRuntimeExports.jsx(c.he,{label:a.label,value:a.label},t))})]},r)),b?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(c.b,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),c.checkIfMultiple(e.chartConfigId,v||[])?e.ui!=="radio"?i.jsxRuntimeExports.jsx(x.ja,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]):void 0,filterOption:x.Du(G),onChange:a=>{const t={columnId:(a||[]).map(d=>d.value),chartConfigId:e.chartConfigId},f=v?.map(d=>d.chartConfigId===t.chartConfigId?t:d);j(f)}}):i.jsxRuntimeExports.jsx(c.$,{variant:g,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]).map(a=>a.value):[],onValueChange:a=>{const t={columnId:a||[],chartConfigId:e.chartConfigId},f=v?.map(d=>d.chartConfigId===t.chartConfigId?t:d);j(f)},children:e.allowedColumnIds.map((a,t)=>i.jsxRuntimeExports.jsx(c.P,{label:a.label,value:a.label},t))}):e.ui!=="radio"?i.jsxRuntimeExports.jsx(x.ja,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:a=>{const t={columnId:a?.value,chartConfigId:e.chartConfigId},f=v?.map(d=>d.chartConfigId===t.chartConfigId?t:d);E(M(b,f)),j(f)}}):i.jsxRuntimeExports.jsx(c.ye,{variant:g,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:a=>{const f={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(T=>T.label===a)].value,chartConfigId:e.chartConfigId},d=v?.map(T=>T.chartConfigId===f.chartConfigId?f:T);E(M(b,d)),j(d)},children:e.allowedColumnIds.map((a,t)=>i.jsxRuntimeExports.jsx(c.he,{label:a.label,value:a.label},t))})]},r)),V?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(c.b,{className:"mb-2",children:e.label}),e.singleSelect?i.jsxRuntimeExports.jsx(x.ja,{options:e.availableValues,variant:g,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:x.Du(G),onChange:a=>{$(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?i.jsxRuntimeExports.jsx(x.ja,{options:e.availableValues,variant:g,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:x.Du(G),onChange:a=>{$(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):i.jsxRuntimeExports.jsx(c.$,{variant:g,defaultValue:e.defaultValue?e.defaultValue.map(a=>`${a.value}`):[],value:e.value?e.value.map(a=>`${a.value}`):void 0,onValueChange:a=>{$(e.filter,e.availableValues.filter(t=>a.indexOf(`${t.value}`)!==-1))},children:e.availableValues.map((a,t)=>i.jsxRuntimeExports.jsx(c.P,{label:`${a.label}`,value:`${a.value}`},t))}),e.allowSelectAll?i.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{$(e.filter,e.availableValues)},children:"Select all options"}):null]})]},r)),C?i.jsxRuntimeExports.jsxs("div",{style:{width:C.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(c.b,{className:"mb-2",children:C.label||"Highlight data"}),i.jsxRuntimeExports.jsx(x.ja,{options:Y,variant:g,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:x.Du(G),onChange:e=>{X(e?.map(r=>r.value))},value:R?.map(e=>({label:e,value:e})),defaultValue:C.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,i.jsxRuntimeExports.jsx(re.GraphEl,{graph:I,graphData:ae,graphDataConfiguration:v,debugMode:S,readableHeader:B||[],updateFilters:K,settings:{...n||{},...m,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,width:void 0,height:void 0,relativeHeight:void 0,minHeight:void 0,padding:"0",theme:n?.theme,...R?{highlightedDataPoints:R,highlightedIds:R?.map(e=>`${e}`),highlightedLines:R?.map(e=>e)}:{}}})]}):i.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:i.jsxRuntimeExports.jsx(ne.w,{})})})}exports.SingleGraphDashboard=de;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),o=require("react"),te=require("./index-CyZ1lmi_.cjs"),q=require("./index-BS2TADPj.cjs"),le=require("./index-DQA8q5sC.cjs"),x=require("./DropdownSelect-Doz3mCrM.cjs"),c=require("./checkIfMultiple-wg6hJLXy.cjs"),ne=require("./Spinner-DRMBUsX7.cjs"),ie=require("./GraphContainer-d8A46BK2.cjs"),re=require("./GraphEl-D5RBCD7p.cjs"),y=require("./fetchAndParseData-l5HGMAEs.cjs"),U=require("./transformDataForAggregation-KXGm6flX.cjs"),z=require("./getUniqValue-RViz8tTw.cjs"),se=require("./GraphHeader.cjs"),W=require("./filterData-T5DQBE9b.cjs"),oe=require("./getGraphList-gf02xgT2.cjs"),J=require("./transformDataForSelect-YmStusCI.cjs"),ue=u=>{if(u.findIndex(l=>l.chartConfigId==="yMin")!==-1&&u.findIndex(l=>l.chartConfigId==="yMax")!==-1)return u;const n=[...u];return u.findIndex(l=>l.chartConfigId==="yMin")===-1&&n.push({chartConfigId:"yMin",columnId:`${u[u.findIndex(l=>l.chartConfigId==="y")].columnId}Min`}),u.findIndex(l=>l.chartConfigId==="yMax")===-1&&n.push({chartConfigId:"yMax",columnId:`${u[u.findIndex(l=>l.chartConfigId==="y")].columnId}Max`}),n},M=(u,n)=>{const l=n?.map(D=>{const I=u?.findIndex(s=>s.chartConfigId===D.chartConfigId);if(I===-1)return{};const w=u[I]?.allowedColumnIds?.findIndex(s=>s.value===D.columnId);return w===-1?{}:u[I].allowedColumnIds[w].graphSettings||{}})||[];return Object.assign({},...l)};function de(u){const{graphSettings:n,dataSettings:l,filters:D,graphType:I,dataTransform:w,graphDataConfiguration:s,dataFilters:A,debugMode:S,dataSelectionOptions:b,advancedDataSelectionOptions:N,readableHeader:B,noOfFiltersPerRow:h=4,updateFilters:K,uiMode:g="normal",highlightDataPointSettings:C}=u,[P,F]=o.useState(void 0),[p,Q]=o.useState(void 0),[v,j]=o.useState(s),[m,E]=o.useState({}),[R,X]=o.useState(void 0),[Y,Z]=o.useState([]),H=o.useRef(null),O=o.useRef(s),[V,k]=o.useState([]),G={ignoreCase:!0,ignoreAccents:!0,trim:!0},L=o.useEffectEvent(()=>{const e=(D||[]).map(r=>({filter:r.column,label:r.label||`Filter by ${r.column}`,singleSelect:r.singleSelect,clearable:r.clearable,defaultValue:J.transformDefaultValue(r.defaultValue),value:J.transformDefaultValue(r.defaultValue),availableValues:z.getUniqValue(p,r.column).filter(a=>!r.excludeValues?.includes(`${a}`)).map(a=>({value:a,label:a})),allowSelectAll:r.allowSelectAll,width:r.width}));k(e)});o.useEffect(()=>{(async()=>{try{const r=l.dataURL?typeof l.dataURL=="string"?l.fileType==="json"?await y.fetchAndParseJSON(l.dataURL,l.columnsToArray,l.dataTransformation,S):l.fileType==="api"?await y.fetchAndTransformDataFromAPI(l.dataURL,l.apiHeaders,l.columnsToArray,l.dataTransformation,S):await y.fetchAndParseCSV(l.dataURL,l.dataTransformation,l.columnsToArray,S,l.delimiter,!0):await y.fetchAndParseMultipleDataSources(l.dataURL,l.idColumnTitle):await y.transformColumnsToArray(l.data,l.columnsToArray);Q(r)}catch(r){console.error("Data fetching error:",r)}})(),L()},[l,S]),o.useEffect(()=>{L()},[D]);const _=o.useEffectEvent(()=>{if(!p||V.length===0)F(p);else{const e=p.filter(r=>V.every(a=>a.value&&q.flattenDeep([a.value]).length>0?te.intersection(q.flattenDeep([r[a.filter]]),q.flattenDeep([a.value]).map(t=>t.value)).length>0:!0));F(e)}});o.useEffect(()=>{_()},[V,p]),o.useEffect(()=>{b&&E(M(b,s))},[b,s]);const ee=o.useEffectEvent(()=>{C?.column&&P&&Z(z.getUniqValue(P,C.column).filter(e=>!C?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))});o.useEffect(()=>{ee()},[C]),o.useEffect(()=>{le.isEqual(O.current,s)||(j(s),O.current=s)},[s]);const $=(e,r)=>{k(a=>a.map(t=>t.filter===e?{...t,value:r}:t))},ae=p?U.transformDataForGraph(w?U.transformDataForAggregation(W.filterData(p,A||[]),w.keyColumn,w.aggregationColumnsSetting):W.filterData(p,A||[]),I,I==="lineChartWithConfidenceInterval"&&v?ue(v):v):void 0;return i.jsxRuntimeExports.jsx(ie.GraphContainer,{className:n?.classNames?.graphContainer,style:n?.styles?.graphContainer,id:n?.graphID,ref:H,"aria-label":n?.ariaLabel,backgroundColor:n?.backgroundColor??!1,theme:n?.theme||"light",language:n?.language||"en",width:n?.width,height:n?.height,padding:n?.padding,minHeight:n?.minHeight,relativeHeight:n?.relativeHeight,children:p||oe.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(I)!==-1?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[m?.graphTitle||m?.graphDescription||n?.graphTitle||n?.graphDescription||n?.graphDownload||n?.dataDownload?i.jsxRuntimeExports.jsx(se.GraphHeader,{styles:{title:m?.styles?.title||n?.styles?.title,description:m?.styles?.description||n?.styles?.description},classNames:{title:m?.classNames?.title||n?.classNames?.title,description:m?.classNames?.description||n?.classNames?.description},graphTitle:m?.graphTitle||n?.graphTitle,graphDescription:m?.graphDescription||n?.graphDescription,width:m?.width||n?.width,graphDownload:n?.graphDownload?H:void 0,dataDownload:n?.dataDownload&&p&&p.length>0?p:null}):null,V.length!==0||(b||[]).length!==0||(N||[]).length!==0||C?i.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-0 w-full",children:[N?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(c.b,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?i.jsxRuntimeExports.jsx(x.ja,{options:e.options.map(a=>({...a,value:a.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:a=>{E(a?.graphSettings||{}),j(a?.dataConfiguration)}}):i.jsxRuntimeExports.jsx(c.ye,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:g,onValueChange:a=>{const t=e.options[e.options.findIndex(f=>f.label===a)];E(t.graphSettings||{}),j(t.dataConfiguration)},children:e.options.map((a,t)=>i.jsxRuntimeExports.jsx(c.he,{label:a.label,value:a.label},t))})]},r)),b?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(c.b,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),c.checkIfMultiple(e.chartConfigId,v||[])?e.ui!=="radio"?i.jsxRuntimeExports.jsx(x.ja,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]):void 0,filterOption:x.Du(G),onChange:a=>{const t={columnId:(a||[]).map(d=>d.value),chartConfigId:e.chartConfigId},f=v?.map(d=>d.chartConfigId===t.chartConfigId?t:d);j(f)}}):i.jsxRuntimeExports.jsx(c.$,{variant:g,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]).map(a=>a.value):[],onValueChange:a=>{const t={columnId:a||[],chartConfigId:e.chartConfigId},f=v?.map(d=>d.chartConfigId===t.chartConfigId?t:d);j(f)},children:e.allowedColumnIds.map((a,t)=>i.jsxRuntimeExports.jsx(c.P,{label:a.label,value:a.label},t))}):e.ui!=="radio"?i.jsxRuntimeExports.jsx(x.ja,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:a=>{const t={columnId:a?.value,chartConfigId:e.chartConfigId},f=v?.map(d=>d.chartConfigId===t.chartConfigId?t:d);E(M(b,f)),j(f)}}):i.jsxRuntimeExports.jsx(c.ye,{variant:g,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:a=>{const f={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(T=>T.label===a)].value,chartConfigId:e.chartConfigId},d=v?.map(T=>T.chartConfigId===f.chartConfigId?f:T);E(M(b,d)),j(d)},children:e.allowedColumnIds.map((a,t)=>i.jsxRuntimeExports.jsx(c.he,{label:a.label,value:a.label},t))})]},r)),V?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(c.b,{className:"mb-2",children:e.label}),e.singleSelect?i.jsxRuntimeExports.jsx(x.ja,{options:e.availableValues,variant:g,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:x.Du(G),onChange:a=>{$(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?i.jsxRuntimeExports.jsx(x.ja,{options:e.availableValues,variant:g,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:x.Du(G),onChange:a=>{$(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):i.jsxRuntimeExports.jsx(c.$,{variant:g,defaultValue:e.defaultValue?e.defaultValue.map(a=>`${a.value}`):[],value:e.value?e.value.map(a=>`${a.value}`):void 0,onValueChange:a=>{$(e.filter,e.availableValues.filter(t=>a.indexOf(`${t.value}`)!==-1))},children:e.availableValues.map((a,t)=>i.jsxRuntimeExports.jsx(c.P,{label:`${a.label}`,value:`${a.value}`},t))}),e.allowSelectAll?i.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{$(e.filter,e.availableValues)},children:"Select all options"}):null]})]},r)),C?i.jsxRuntimeExports.jsxs("div",{style:{width:C.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(c.b,{className:"mb-2",children:C.label||"Highlight data"}),i.jsxRuntimeExports.jsx(x.ja,{options:Y,variant:g,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:x.Du(G),onChange:e=>{X(e?.map(r=>r.value))},value:R?.map(e=>({label:e,value:e})),defaultValue:C.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,i.jsxRuntimeExports.jsx(re.GraphEl,{graph:I,graphData:ae,graphDataConfiguration:v,debugMode:S,readableHeader:B||[],updateFilters:K,settings:{...n||{},...m,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,width:void 0,height:void 0,relativeHeight:void 0,minHeight:void 0,padding:"0",theme:n?.theme,...R?{highlightedDataPoints:R,highlightedIds:R?.map(e=>`${e}`),highlightedLines:R?.map(e=>e)}:{}}})]}):i.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:i.jsxRuntimeExports.jsx(ne.w,{})})})}exports.SingleGraphDashboard=de;
2
2
  //# sourceMappingURL=SingleGraphDashboard.cjs.map
@@ -7,7 +7,7 @@ import { j as D, D as M } from "./DropdownSelect-BbdPQa2k.js";
7
7
  import { b as A, y as J, h as B, c as ua, $ as K, P as Q } from "./checkIfMultiple-Y9iKaV_u.js";
8
8
  import { w as ha } from "./Spinner-D7rnnwnA.js";
9
9
  import { G as ca } from "./GraphContainer-CRqzdKu2.js";
10
- import { G as fa } from "./GraphEl-BZne2JIx.js";
10
+ import { G as fa } from "./GraphEl-VtiYqELy.js";
11
11
  import { f as ga, a as pa, b as ma, c as Ca, t as va } from "./fetchAndParseData-BpqkBPQL.js";
12
12
  import { a as Ia, t as ba } from "./transformDataForAggregation-CE3bAlHU.js";
13
13
  import { g as X } from "./getUniqValue-BKHCm3zE.js";
@@ -0,0 +1,2 @@
1
+ "use strict";const m=require("./index-CHPV5EwG-CTPQjnHt.cjs"),N=require("./proxy-BxvUI_9l.cjs");function q(V){const t=m.compilerRuntimeExports.c(35),{value:y,y:e,x:i,style:j,className:h,width:g,height:w,alignment:v,animate:n,isInView:b}=V,I=v===void 0?"top":v;let s;t[0]!==i||t[1]!==e?(s={x:i,y:e},t[0]=i,t[1]=e,t[2]=s):s=t[2];let l;t[3]!==n.duration?(l={duration:n.duration},t[3]=n.duration,t[4]=l):l=t[4];let r;t[5]!==l||t[6]!==i||t[7]!==e?(r={x:i,y:e,transition:l},t[5]=l,t[6]=i,t[7]=e,t[8]=r):r=t[8];let a;t[9]!==s||t[10]!==r?(a={initial:s,whileInView:r},t[9]=s,t[10]=r,t[11]=a):a=t[11];const E=b?"whileInView":"initial";let o;t[12]!==n.duration?(o={opacity:0,transition:{duration:n.duration}},t[12]=n.duration,t[13]=o):o=t[13];const R=`flex flex-col items-center h-full ${I==="top"?"justify-start":"justify-end"}`;let x;t[14]!==h?(x=m.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 text-center leading-none",h),t[14]=h,t[15]=x):x=t[15];let c;t[16]!==j?(c={...j},t[16]=j,t[17]=c):c=t[17];let u;t[18]!==x||t[19]!==c||t[20]!==y?(u=m.jsxRuntimeExports.jsx("p",{className:x,style:c,children:y}),t[18]=x,t[19]=c,t[20]=y,t[21]=u):u=t[21];let f;t[22]!==u||t[23]!==R?(f=m.jsxRuntimeExports.jsx("div",{className:R,children:u}),t[22]=u,t[23]=R,t[24]=f):f=t[24];let d;t[25]!==w||t[26]!==f||t[27]!==g?(d=m.jsxRuntimeExports.jsx("foreignObject",{width:g,height:w,y:0,x:0,children:f}),t[25]=w,t[26]=f,t[27]=g,t[28]=d):d=t[28];let p;return t[29]!==d||t[30]!==a||t[31]!==E||t[32]!==o||t[33]!==e?(p=m.jsxRuntimeExports.jsx(N.motion.g,{variants:a,initial:"initial",animate:E,exit:o,children:d},e),t[29]=d,t[30]=a,t[31]=E,t[32]=o,t[33]=e,t[34]=p):p=t[34],p}exports.XAxesLabels=q;
2
+ //# sourceMappingURL=XAxesLabels-Bt5NZBmX.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XAxesLabels-Bt5NZBmX.cjs","sources":["../src/Components/Elements/Axes/XAxesLabels.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { motion } from 'motion/react';\r\n\r\nimport { AnimateDataType } from '@/Types';\r\n\r\ninterface Props {\r\n value: number | string;\r\n y: number;\r\n x: number;\r\n width: number;\r\n height: number;\r\n style?: React.CSSProperties;\r\n className?: string;\r\n alignment?: 'top' | 'bottom';\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function XAxesLabels(props: Props) {\r\n const {\r\n value,\r\n y,\r\n x,\r\n style,\r\n className,\r\n width,\r\n height,\r\n alignment = 'top',\r\n animate,\r\n isInView,\r\n } = props;\r\n return (\r\n <motion.g\r\n key={y}\r\n variants={{\r\n initial: {\r\n x,\r\n y,\r\n },\r\n whileInView: {\r\n x,\r\n y,\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 width={width} height={height} y={0} x={0}>\r\n <div\r\n className={`flex flex-col items-center h-full ${\r\n alignment === 'top' ? 'justify-start' : 'justify-end'\r\n }`}\r\n >\r\n <p\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 text-center leading-none',\r\n className,\r\n )}\r\n style={{\r\n ...style,\r\n }}\r\n >\r\n {value}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n );\r\n}\r\n"],"names":["XAxesLabels","props","$","_c","value","y","x","style","className","width","height","alignment","t0","animate","isInView","undefined","t1","t2","duration","t3","transition","t4","initial","whileInView","t5","t6","opacity","t7","t8","cn","t9","t10","t11","jsx","t12","t13","motion"],"mappings":"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"}
@@ -0,0 +1,63 @@
1
+ import { c as R, m as X, j as p } from "./index-CHPV5EwG-Curnpaqc.js";
2
+ import { m as $ } from "./proxy-BxkFHwUw.js";
3
+ function L(V) {
4
+ const t = R.c(35), {
5
+ value: y,
6
+ y: e,
7
+ x: i,
8
+ style: h,
9
+ className: j,
10
+ width: g,
11
+ height: w,
12
+ alignment: N,
13
+ animate: l,
14
+ isInView: b
15
+ } = V, E = N === void 0 ? "top" : N;
16
+ let n;
17
+ t[0] !== i || t[1] !== e ? (n = {
18
+ x: i,
19
+ y: e
20
+ }, t[0] = i, t[1] = e, t[2] = n) : n = t[2];
21
+ let s;
22
+ t[3] !== l.duration ? (s = {
23
+ duration: l.duration
24
+ }, t[3] = l.duration, t[4] = s) : s = t[4];
25
+ let a;
26
+ t[5] !== s || t[6] !== i || t[7] !== e ? (a = {
27
+ x: i,
28
+ y: e,
29
+ transition: s
30
+ }, t[5] = s, t[6] = i, t[7] = e, t[8] = a) : a = t[8];
31
+ let r;
32
+ t[9] !== n || t[10] !== a ? (r = {
33
+ initial: n,
34
+ whileInView: a
35
+ }, t[9] = n, t[10] = a, t[11] = r) : r = t[11];
36
+ const v = b ? "whileInView" : "initial";
37
+ let o;
38
+ t[12] !== l.duration ? (o = {
39
+ opacity: 0,
40
+ transition: {
41
+ duration: l.duration
42
+ }
43
+ }, t[12] = l.duration, t[13] = o) : o = t[13];
44
+ const I = `flex flex-col items-center h-full ${E === "top" ? "justify-start" : "justify-end"}`;
45
+ let f;
46
+ t[14] !== j ? (f = X("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 text-center leading-none", j), t[14] = j, t[15] = f) : f = t[15];
47
+ let m;
48
+ t[16] !== h ? (m = {
49
+ ...h
50
+ }, t[16] = h, t[17] = m) : m = t[17];
51
+ let c;
52
+ t[18] !== f || t[19] !== m || t[20] !== y ? (c = /* @__PURE__ */ p.jsx("p", { className: f, style: m, children: y }), t[18] = f, t[19] = m, t[20] = y, t[21] = c) : c = t[21];
53
+ let d;
54
+ t[22] !== c || t[23] !== I ? (d = /* @__PURE__ */ p.jsx("div", { className: I, children: c }), t[22] = c, t[23] = I, t[24] = d) : d = t[24];
55
+ let x;
56
+ t[25] !== w || t[26] !== d || t[27] !== g ? (x = /* @__PURE__ */ p.jsx("foreignObject", { width: g, height: w, y: 0, x: 0, children: d }), t[25] = w, t[26] = d, t[27] = g, t[28] = x) : x = t[28];
57
+ let u;
58
+ return t[29] !== x || t[30] !== r || t[31] !== v || t[32] !== o || t[33] !== e ? (u = /* @__PURE__ */ p.jsx($.g, { variants: r, initial: "initial", animate: v, exit: o, children: x }, e), t[29] = x, t[30] = r, t[31] = v, t[32] = o, t[33] = e, t[34] = u) : u = t[34], u;
59
+ }
60
+ export {
61
+ L as X
62
+ };
63
+ //# sourceMappingURL=XAxesLabels-Dy8E1SEo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XAxesLabels-Dy8E1SEo.js","sources":["../src/Components/Elements/Axes/XAxesLabels.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { motion } from 'motion/react';\r\n\r\nimport { AnimateDataType } from '@/Types';\r\n\r\ninterface Props {\r\n value: number | string;\r\n y: number;\r\n x: number;\r\n width: number;\r\n height: number;\r\n style?: React.CSSProperties;\r\n className?: string;\r\n alignment?: 'top' | 'bottom';\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function XAxesLabels(props: Props) {\r\n const {\r\n value,\r\n y,\r\n x,\r\n style,\r\n className,\r\n width,\r\n height,\r\n alignment = 'top',\r\n animate,\r\n isInView,\r\n } = props;\r\n return (\r\n <motion.g\r\n key={y}\r\n variants={{\r\n initial: {\r\n x,\r\n y,\r\n },\r\n whileInView: {\r\n x,\r\n y,\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 width={width} height={height} y={0} x={0}>\r\n <div\r\n className={`flex flex-col items-center h-full ${\r\n alignment === 'top' ? 'justify-start' : 'justify-end'\r\n }`}\r\n >\r\n <p\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 text-center leading-none',\r\n className,\r\n )}\r\n style={{\r\n ...style,\r\n }}\r\n >\r\n {value}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n );\r\n}\r\n"],"names":["XAxesLabels","props","$","_c","value","y","x","style","className","width","height","alignment","t0","animate","isInView","undefined","t1","t2","duration","t3","transition","t4","initial","whileInView","t5","t6","opacity","t7","t8","cn","t9","t10","t11","jsx","t12","t13","motion"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ "use strict";const f=require("./index-CHPV5EwG-CTPQjnHt.cjs"),I=require("./proxy-BxvUI_9l.cjs");function N(v){const t=f.compilerRuntimeExports.c(33),{value:p,y:i,x:e,style:y,className:h,width:j,height:g,alignment:R,animate:n,isInView:V}=v,b=R===void 0?"right":R;let l;t[0]!==e||t[1]!==i?(l={y:i,x:e},t[0]=e,t[1]=i,t[2]=l):l=t[2];let s;t[3]!==n.duration?(s={duration:n.duration},t[3]=n.duration,t[4]=s):s=t[4];let r;t[5]!==s||t[6]!==e||t[7]!==i?(r={y:i,x:e,transition:s},t[5]=s,t[6]=e,t[7]=i,t[8]=r):r=t[8];let a;t[9]!==l||t[10]!==r?(a={initial:l,whileInView:r},t[9]=l,t[10]=r,t[11]=a):a=t[11];const w=V?"whileInView":"initial";let o;t[12]!==n.duration?(o={opacity:0,transition:{duration:n.duration}},t[12]=n.duration,t[13]=o):o=t[13];const E=`text-${b}`;let x;t[14]!==h||t[15]!==E?(x=f.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 leading-none",E,h),t[14]=h,t[15]=E,t[16]=x):x=t[16];let c;t[17]!==y?(c={...y},t[17]=y,t[18]=c):c=t[18];let u;t[19]!==x||t[20]!==c||t[21]!==p?(u=f.jsxRuntimeExports.jsx("div",{className:"flex flex-col justify-center h-full",children:f.jsxRuntimeExports.jsx("p",{className:x,style:c,children:p})}),t[19]=x,t[20]=c,t[21]=p,t[22]=u):u=t[22];let d;t[23]!==g||t[24]!==u||t[25]!==j?(d=f.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:j,height:g,children:u}),t[23]=g,t[24]=u,t[25]=j,t[26]=d):d=t[26];let m;return t[27]!==d||t[28]!==a||t[29]!==w||t[30]!==o||t[31]!==e?(m=f.jsxRuntimeExports.jsx(I.motion.g,{variants:a,initial:"initial",animate:w,exit:o,children:d},e),t[27]=d,t[28]=a,t[29]=w,t[30]=o,t[31]=e,t[32]=m):m=t[32],m}exports.YAxesLabels=N;
2
+ //# sourceMappingURL=YAxesLabels-DesLesUP.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"YAxesLabels-DesLesUP.cjs","sources":["../src/Components/Elements/Axes/YAxesLabels.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { motion } from 'motion/react';\r\n\r\nimport { AnimateDataType } from '@/Types';\r\n\r\ninterface Props {\r\n value: number | string;\r\n y: number;\r\n x: number;\r\n width: number;\r\n height: number;\r\n style?: React.CSSProperties;\r\n className?: string;\r\n alignment?: 'left' | 'right' | 'center';\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function YAxesLabels(props: Props) {\r\n const {\r\n value,\r\n y,\r\n x,\r\n style,\r\n className,\r\n width,\r\n height,\r\n alignment = 'right',\r\n animate,\r\n isInView,\r\n } = props;\r\n return (\r\n <motion.g\r\n key={x}\r\n variants={{\r\n initial: {\r\n y,\r\n x,\r\n },\r\n whileInView: {\r\n y,\r\n x,\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={width} height={height}>\r\n <div className='flex flex-col justify-center h-full'>\r\n <p\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 leading-none',\r\n `text-${alignment}`,\r\n className,\r\n )}\r\n style={{\r\n ...style,\r\n }}\r\n >\r\n {value}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n );\r\n}\r\n"],"names":["YAxesLabels","props","$","_c","value","y","x","style","className","width","height","alignment","t0","animate","isInView","undefined","t1","t2","duration","t3","transition","t4","initial","whileInView","t5","t6","opacity","t7","t8","cn","t9","t10","jsx","t11","t12","motion"],"mappings":"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"}
@@ -0,0 +1,61 @@
1
+ import { c as E, m as R, j as u } from "./index-CHPV5EwG-Curnpaqc.js";
2
+ import { m as Y } from "./proxy-BxkFHwUw.js";
3
+ function A(N) {
4
+ const t = E.c(33), {
5
+ value: p,
6
+ y: e,
7
+ x: i,
8
+ style: h,
9
+ className: y,
10
+ width: g,
11
+ height: j,
12
+ alignment: I,
13
+ animate: l,
14
+ isInView: V
15
+ } = N, b = I === void 0 ? "right" : I;
16
+ let n;
17
+ t[0] !== i || t[1] !== e ? (n = {
18
+ y: e,
19
+ x: i
20
+ }, t[0] = i, t[1] = e, t[2] = n) : n = t[2];
21
+ let s;
22
+ t[3] !== l.duration ? (s = {
23
+ duration: l.duration
24
+ }, t[3] = l.duration, t[4] = s) : s = t[4];
25
+ let a;
26
+ t[5] !== s || t[6] !== i || t[7] !== e ? (a = {
27
+ y: e,
28
+ x: i,
29
+ transition: s
30
+ }, t[5] = s, t[6] = i, t[7] = e, t[8] = a) : a = t[8];
31
+ let r;
32
+ t[9] !== n || t[10] !== a ? (r = {
33
+ initial: n,
34
+ whileInView: a
35
+ }, t[9] = n, t[10] = a, t[11] = r) : r = t[11];
36
+ const w = V ? "whileInView" : "initial";
37
+ let o;
38
+ t[12] !== l.duration ? (o = {
39
+ opacity: 0,
40
+ transition: {
41
+ duration: l.duration
42
+ }
43
+ }, t[12] = l.duration, t[13] = o) : o = t[13];
44
+ const v = `text-${b}`;
45
+ let m;
46
+ t[14] !== y || t[15] !== v ? (m = R("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 leading-none", v, y), t[14] = y, t[15] = v, t[16] = m) : m = t[16];
47
+ let c;
48
+ t[17] !== h ? (c = {
49
+ ...h
50
+ }, t[17] = h, t[18] = c) : c = t[18];
51
+ let f;
52
+ t[19] !== m || t[20] !== c || t[21] !== p ? (f = /* @__PURE__ */ u.jsx("div", { className: "flex flex-col justify-center h-full", children: /* @__PURE__ */ u.jsx("p", { className: m, style: c, children: p }) }), t[19] = m, t[20] = c, t[21] = p, t[22] = f) : f = t[22];
53
+ let x;
54
+ t[23] !== j || t[24] !== f || t[25] !== g ? (x = /* @__PURE__ */ u.jsx("foreignObject", { y: 0, x: 0, width: g, height: j, children: f }), t[23] = j, t[24] = f, t[25] = g, t[26] = x) : x = t[26];
55
+ let d;
56
+ return t[27] !== x || t[28] !== r || t[29] !== w || t[30] !== o || t[31] !== i ? (d = /* @__PURE__ */ u.jsx(Y.g, { variants: r, initial: "initial", animate: w, exit: o, children: x }, i), t[27] = x, t[28] = r, t[29] = w, t[30] = o, t[31] = i, t[32] = d) : d = t[32], d;
57
+ }
58
+ export {
59
+ A as Y
60
+ };
61
+ //# sourceMappingURL=YAxesLabels-a57ZRv-0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"YAxesLabels-a57ZRv-0.js","sources":["../src/Components/Elements/Axes/YAxesLabels.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { motion } from 'motion/react';\r\n\r\nimport { AnimateDataType } from '@/Types';\r\n\r\ninterface Props {\r\n value: number | string;\r\n y: number;\r\n x: number;\r\n width: number;\r\n height: number;\r\n style?: React.CSSProperties;\r\n className?: string;\r\n alignment?: 'left' | 'right' | 'center';\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function YAxesLabels(props: Props) {\r\n const {\r\n value,\r\n y,\r\n x,\r\n style,\r\n className,\r\n width,\r\n height,\r\n alignment = 'right',\r\n animate,\r\n isInView,\r\n } = props;\r\n return (\r\n <motion.g\r\n key={x}\r\n variants={{\r\n initial: {\r\n y,\r\n x,\r\n },\r\n whileInView: {\r\n y,\r\n x,\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={width} height={height}>\r\n <div className='flex flex-col justify-center h-full'>\r\n <p\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 leading-none',\r\n `text-${alignment}`,\r\n className,\r\n )}\r\n style={{\r\n ...style,\r\n }}\r\n >\r\n {value}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n );\r\n}\r\n"],"names":["YAxesLabels","props","$","_c","value","y","x","style","className","width","height","alignment","t0","animate","isInView","undefined","t1","t2","duration","t3","transition","t4","initial","whileInView","t5","t6","opacity","t7","t8","cn","t9","t10","jsx","t11","t12","motion"],"mappings":"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"}