@undp/data-viz 1.2.8 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.d.ts +224 -0
- package/dist/AreaChart.js +2 -0
- package/dist/AreaChart.js.map +1 -0
- package/dist/Axis-BlyBRMNw.cjs +2 -0
- package/dist/Axis-BlyBRMNw.cjs.map +1 -0
- package/dist/Axis-CvK-w3E2.js +44 -0
- package/dist/Axis-CvK-w3E2.js.map +1 -0
- package/dist/AxisTitle-BY8MI9jC.cjs +2 -0
- package/dist/AxisTitle-BY8MI9jC.cjs.map +1 -0
- package/dist/AxisTitle-BeMxcw5I.js +21 -0
- package/dist/AxisTitle-BeMxcw5I.js.map +1 -0
- package/dist/BarGraph.d.ts +460 -0
- package/dist/BarGraph.js +2 -0
- package/dist/BarGraph.js.map +1 -0
- package/dist/BasicStatCard.d.ts +106 -0
- package/dist/BasicStatCard.js +2 -0
- package/dist/BasicStatCard.js.map +1 -0
- package/dist/BeeSwarmChart.d.ts +189 -0
- package/dist/BeeSwarmChart.js +2 -0
- package/dist/BeeSwarmChart.js.map +1 -0
- package/dist/BiVariateChoroplethMap.d.ts +189 -0
- package/dist/BiVariateChoroplethMap.js +2 -0
- package/dist/BiVariateChoroplethMap.js.map +1 -0
- package/dist/BulletChart.d.ts +219 -0
- package/dist/BulletChart.js +2 -0
- package/dist/BulletChart.js.map +1 -0
- package/dist/ButterflyChart.d.ts +201 -0
- package/dist/ButterflyChart.js +2 -0
- package/dist/ButterflyChart.js.map +1 -0
- package/dist/ChoroplethMap.d.ts +190 -0
- package/dist/ChoroplethMap.js +2 -0
- package/dist/ChoroplethMap.js.map +1 -0
- package/dist/CirclePackingGraph.d.ts +161 -0
- package/dist/CirclePackingGraph.js +2 -0
- package/dist/CirclePackingGraph.js.map +1 -0
- package/dist/ColorLegend.d.ts +17 -0
- package/dist/ColorLegend.js +2 -0
- package/dist/ColorLegend.js.map +1 -0
- package/dist/ColorLegendWithMouseOver.d.ts +16 -0
- package/dist/ColorLegendWithMouseOver.js +2 -0
- package/dist/ColorLegendWithMouseOver.js.map +1 -0
- package/dist/Colors.d.ts +174 -0
- package/dist/Colors.js +2 -0
- package/dist/Colors.js.map +1 -0
- package/dist/CopyTextButton.d.ts +13 -0
- package/dist/CopyTextButton.js +17 -0
- package/dist/CopyTextButton.js.map +1 -0
- package/dist/CsvDownloadButton.d.ts +22 -0
- package/dist/CsvDownloadButton.js +23 -0
- package/dist/CsvDownloadButton.js.map +1 -0
- package/dist/DataCards.d.ts +131 -0
- package/dist/DataCards.js +2 -0
- package/dist/DataCards.js.map +1 -0
- package/dist/DataTable.d.ts +122 -0
- package/dist/DataTable.js +2 -0
- package/dist/DataTable.js.map +1 -0
- package/dist/DifferenceLineChart.d.ts +237 -0
- package/dist/DifferenceLineChart.js +2 -0
- package/dist/DifferenceLineChart.js.map +1 -0
- package/dist/DonutChart.d.ts +148 -0
- package/dist/DonutChart.js +2 -0
- package/dist/DonutChart.js.map +1 -0
- package/dist/DotDensityMap.d.ts +191 -0
- package/dist/DotDensityMap.js +2 -0
- package/dist/DotDensityMap.js.map +1 -0
- package/dist/DropdownSelect-CuzV7gdj.cjs +29 -0
- package/dist/DropdownSelect-CuzV7gdj.cjs.map +1 -0
- package/dist/DropdownSelect-DmZsXrhY.js +2698 -0
- package/dist/DropdownSelect-DmZsXrhY.js.map +1 -0
- package/dist/DualAxisLineChart.d.ts +180 -0
- package/dist/DualAxisLineChart.js +2 -0
- package/dist/DualAxisLineChart.js.map +1 -0
- package/dist/DumbbellChart.d.ts +224 -0
- package/dist/DumbbellChart.js +2 -0
- package/dist/DumbbellChart.js.map +1 -0
- package/dist/EmptyState-BQguKAp5.cjs +2 -0
- package/dist/EmptyState-BQguKAp5.cjs.map +1 -0
- package/dist/EmptyState-b2Ln487i.js +22 -0
- package/dist/EmptyState-b2Ln487i.js.map +1 -0
- package/dist/ExcelDownloadButton.d.ts +22 -0
- package/dist/ExcelDownloadButton.js +2 -0
- package/dist/ExcelDownloadButton.js.map +1 -0
- package/dist/FootNote.d.ts +12 -0
- package/dist/FootNote.js +2 -0
- package/dist/FootNote.js.map +1 -0
- package/dist/GeoHubCompareMaps.d.ts +103 -0
- package/dist/GeoHubCompareMaps.js +2 -0
- package/dist/GeoHubCompareMaps.js.map +1 -0
- package/dist/GeoHubMap.d.ts +118 -0
- package/dist/GeoHubMap.js +2 -0
- package/dist/GeoHubMap.js.map +1 -0
- package/dist/GeoHubMapWithLayerSelection.d.ts +117 -0
- package/dist/GeoHubMapWithLayerSelection.js +2 -0
- package/dist/GeoHubMapWithLayerSelection.js.map +1 -0
- package/dist/GraphDescription.d.ts +12 -0
- package/dist/GraphDescription.js +2 -0
- package/dist/GraphDescription.js.map +1 -0
- package/dist/GraphFooter.d.ts +24 -0
- package/dist/GraphFooter.js +2 -0
- package/dist/GraphFooter.js.map +1 -0
- package/dist/GraphHeader.d.ts +22 -0
- package/dist/GraphHeader.js +2 -0
- package/dist/GraphHeader.js.map +1 -0
- package/dist/GraphTitle.d.ts +13 -0
- package/dist/GraphTitle.js +2 -0
- package/dist/GraphTitle.js.map +1 -0
- package/dist/GriddedGraphs.d.ts +540 -0
- package/dist/GriddedGraphs.js +2 -0
- package/dist/GriddedGraphs.js.map +1 -0
- package/dist/GriddedGraphsFromConfig.d.ts +543 -0
- package/dist/GriddedGraphsFromConfig.js +2 -0
- package/dist/GriddedGraphsFromConfig.js.map +1 -0
- package/dist/HeatMap.d.ts +166 -0
- package/dist/HeatMap.js +2 -0
- package/dist/HeatMap.js.map +1 -0
- package/dist/Histogram.d.ts +165 -0
- package/dist/Histogram.js +2 -0
- package/dist/Histogram.js.map +1 -0
- package/dist/ImageDownloadButton.d.ts +15 -0
- package/dist/ImageDownloadButton.js +2 -0
- package/dist/ImageDownloadButton.js.map +1 -0
- package/dist/LineChartWithConfidenceInterval.d.ts +250 -0
- package/dist/LineChartWithConfidenceInterval.js +2 -0
- package/dist/LineChartWithConfidenceInterval.js.map +1 -0
- package/dist/LinearColorLegend.d.ts +13 -0
- package/dist/LinearColorLegend.js +2 -0
- package/dist/LinearColorLegend.js.map +1 -0
- package/dist/Modal-C9txyGOk.js +723 -0
- package/dist/Modal-C9txyGOk.js.map +1 -0
- package/dist/Modal-cQF2UQIa.cjs +46 -0
- package/dist/Modal-cQF2UQIa.cjs.map +1 -0
- package/dist/MultiGraphDashboard.d.ts +558 -0
- package/dist/MultiGraphDashboard.js +2 -0
- package/dist/MultiGraphDashboard.js.map +1 -0
- package/dist/MultiGraphDashboardFromConfig.d.ts +562 -0
- package/dist/MultiGraphDashboardFromConfig.js +2 -0
- package/dist/MultiGraphDashboardFromConfig.js.map +1 -0
- package/dist/MultiGraphDashboardWideToLongFormat.d.ts +128 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js +2 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +133 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +2 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js.map +1 -0
- package/dist/MultiLineAltChart.d.ts +244 -0
- package/dist/MultiLineAltChart.js +2 -0
- package/dist/MultiLineAltChart.js.map +1 -0
- package/dist/MultiLineChart.d.ts +246 -0
- package/dist/MultiLineChart.js +2 -0
- package/dist/MultiLineChart.js.map +1 -0
- package/dist/ParetoChart.d.ts +178 -0
- package/dist/ParetoChart.js +2 -0
- package/dist/ParetoChart.js.map +1 -0
- package/dist/RadarChart.d.ts +176 -0
- package/dist/RadarChart.js +2 -0
- package/dist/RadarChart.js.map +1 -0
- package/dist/ReferenceLine-BgDdQbDI.js +129 -0
- package/dist/ReferenceLine-BgDdQbDI.js.map +1 -0
- package/dist/ReferenceLine-Bsb5jeE4.cjs +2 -0
- package/dist/ReferenceLine-Bsb5jeE4.cjs.map +1 -0
- package/dist/RegressionLine-BfpCuD7B.cjs +2 -0
- package/dist/RegressionLine-BfpCuD7B.cjs.map +1 -0
- package/dist/RegressionLine-cSljpHaE.js +49 -0
- package/dist/RegressionLine-cSljpHaE.js.map +1 -0
- package/dist/SVGDownloadButton.d.ts +15 -0
- package/dist/SVGDownloadButton.js +2 -0
- package/dist/SVGDownloadButton.js.map +1 -0
- package/dist/SankeyChart.d.ts +178 -0
- package/dist/SankeyChart.js +2 -0
- package/dist/SankeyChart.js.map +1 -0
- package/dist/ScatterPlot.d.ts +266 -0
- package/dist/ScatterPlot.js +2 -0
- package/dist/ScatterPlot.js.map +1 -0
- package/dist/ScrollStory.d.ts +491 -0
- package/dist/ScrollStory.js +2 -0
- package/dist/ScrollStory.js.map +1 -0
- package/dist/SimpleLineChart.d.ts +230 -0
- package/dist/SimpleLineChart.js +2 -0
- package/dist/SimpleLineChart.js.map +1 -0
- package/dist/SingleGraphDashboard.d.ts +545 -0
- package/dist/SingleGraphDashboard.js +2 -0
- package/dist/SingleGraphDashboard.js.map +1 -0
- package/dist/SingleGraphDashboardFromConfig.d.ts +547 -0
- package/dist/SingleGraphDashboardFromConfig.js +2 -0
- package/dist/SingleGraphDashboardFromConfig.js.map +1 -0
- package/dist/SlopeChart.d.ts +167 -0
- package/dist/SlopeChart.js +2 -0
- package/dist/SlopeChart.js.map +1 -0
- package/dist/Source.d.ts +16 -0
- package/dist/Source.js +2 -0
- package/dist/Source.js.map +1 -0
- package/dist/SparkLine.d.ts +139 -0
- package/dist/SparkLine.js +2 -0
- package/dist/SparkLine.js.map +1 -0
- package/dist/Spinner-DN3s4S0H.js +17 -0
- package/dist/Spinner-DN3s4S0H.js.map +1 -0
- package/dist/Spinner-UmN-KPe9.cjs +2 -0
- package/dist/Spinner-UmN-KPe9.cjs.map +1 -0
- package/dist/StatCardFromData.d.ts +115 -0
- package/dist/StatCardFromData.js +2 -0
- package/dist/StatCardFromData.js.map +1 -0
- package/dist/StripChart.d.ts +178 -0
- package/dist/StripChart.js +2 -0
- package/dist/StripChart.js.map +1 -0
- package/dist/ThreeDGlobe.d.ts +158 -0
- package/dist/ThreeDGlobe.js +2 -0
- package/dist/ThreeDGlobe.js.map +1 -0
- package/dist/ThresholdColorLegendWithMouseOver.d.ts +16 -0
- package/dist/ThresholdColorLegendWithMouseOver.js +2 -0
- package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -0
- package/dist/Tooltip-BM18N_3l.cjs +2 -0
- package/dist/Tooltip-BM18N_3l.cjs.map +1 -0
- package/dist/Tooltip-CzZ1wFyF.js +47 -0
- package/dist/Tooltip-CzZ1wFyF.js.map +1 -0
- package/dist/TreeMapGraph.d.ts +158 -0
- package/dist/TreeMapGraph.js +2 -0
- package/dist/TreeMapGraph.js.map +1 -0
- package/dist/Types.d.ts +883 -0
- package/dist/Types.js +2 -0
- package/dist/Types.js.map +1 -0
- package/dist/Typography-CDR-DAHH.cjs +2 -0
- package/dist/Typography-CDR-DAHH.cjs.map +1 -0
- package/dist/Typography-XJoSE-By.js +58 -0
- package/dist/Typography-XJoSE-By.js.map +1 -0
- package/dist/UnitChart.d.ts +132 -0
- package/dist/UnitChart.js +2 -0
- package/dist/UnitChart.js.map +1 -0
- package/dist/XAxesLabels-C9REbQQs.cjs +2 -0
- package/dist/XAxesLabels-C9REbQQs.cjs.map +1 -0
- package/dist/XAxesLabels-DVw7Lvuz.js +58 -0
- package/dist/XAxesLabels-DVw7Lvuz.js.map +1 -0
- package/dist/XTicksAndGridLines-CUefTINd.js +57 -0
- package/dist/XTicksAndGridLines-CUefTINd.js.map +1 -0
- package/dist/XTicksAndGridLines-DuK35ROS.cjs +2 -0
- package/dist/XTicksAndGridLines-DuK35ROS.cjs.map +1 -0
- package/dist/YAxesLabels-CYVY053X.js +53 -0
- package/dist/YAxesLabels-CYVY053X.js.map +1 -0
- package/dist/YAxesLabels-DhBdLk3Z.cjs +2 -0
- package/dist/YAxesLabels-DhBdLk3Z.cjs.map +1 -0
- package/dist/YTicksAndGridLines-BJRXuBdC.js +57 -0
- package/dist/YTicksAndGridLines-BJRXuBdC.js.map +1 -0
- package/dist/YTicksAndGridLines-CtLvzExe.cjs +2 -0
- package/dist/YTicksAndGridLines-CtLvzExe.cjs.map +1 -0
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +2 -0
- package/dist/_commonjsHelpers-DKOUU3wS.cjs.map +1 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
- package/dist/area-BE2wo7fv.js +53 -0
- package/dist/area-BE2wo7fv.js.map +1 -0
- package/dist/area-D3Qx7k7K.cjs +2 -0
- package/dist/area-D3Qx7k7K.cjs.map +1 -0
- package/dist/array-B7TkkRH0.js +89 -0
- package/dist/array-B7TkkRH0.js.map +1 -0
- package/dist/array-DKbXV8lR.cjs +2 -0
- package/dist/array-DKbXV8lR.cjs.map +1 -0
- package/dist/band-BEjh2CHI.js +47 -0
- package/dist/band-BEjh2CHI.js.map +1 -0
- package/dist/band-CAApY4Pd.cjs +2 -0
- package/dist/band-CAApY4Pd.cjs.map +1 -0
- package/dist/checkIfMultiple-CaefP4X2.js +2264 -0
- package/dist/checkIfMultiple-CaefP4X2.js.map +1 -0
- package/dist/checkIfMultiple-D3h8to1T.cjs +12 -0
- package/dist/checkIfMultiple-D3h8to1T.cjs.map +1 -0
- package/dist/checkIfNullOrUndefined.d.ts +15 -0
- package/dist/checkIfNullOrUndefined.js +2 -0
- package/dist/checkIfNullOrUndefined.js.map +1 -0
- package/dist/customArea-B47Ew5cT.cjs +2 -0
- package/dist/customArea-B47Ew5cT.cjs.map +1 -0
- package/dist/customArea-I3MsoqIl.js +176 -0
- package/dist/customArea-I3MsoqIl.js.map +1 -0
- package/dist/defaultLocale-BEa-49Qz.js +172 -0
- package/dist/defaultLocale-BEa-49Qz.js.map +1 -0
- package/dist/defaultLocale-DIVzfLaQ.cjs +2 -0
- package/dist/defaultLocale-DIVzfLaQ.cjs.map +1 -0
- package/dist/delaunay-C1uAf38t.js +684 -0
- package/dist/delaunay-C1uAf38t.js.map +1 -0
- package/dist/delaunay-rcy0HhZi.cjs +2 -0
- package/dist/delaunay-rcy0HhZi.cjs.map +1 -0
- package/dist/ensureCompleteData-BBDZbDCE.js +102 -0
- package/dist/ensureCompleteData-BBDZbDCE.js.map +1 -0
- package/dist/ensureCompleteData-DqWQ2Zbi.cjs +2 -0
- package/dist/ensureCompleteData-DqWQ2Zbi.cjs.map +1 -0
- package/dist/excelDownload.d.ts +31 -0
- package/dist/excelDownload.js +2 -0
- package/dist/excelDownload.js.map +1 -0
- package/dist/fetchAndParseData.d.ts +84 -0
- package/dist/fetchAndParseData.js +16 -0
- package/dist/fetchAndParseData.js.map +1 -0
- package/dist/filterData-B8ocT57s.js +14 -0
- package/dist/filterData-B8ocT57s.js.map +1 -0
- package/dist/filterData-DN6py7y_.cjs +2 -0
- package/dist/filterData-DN6py7y_.cjs.map +1 -0
- package/dist/generateCodes.d.ts +25 -0
- package/dist/generateCodes.js +2 -0
- package/dist/generateCodes.js.map +1 -0
- package/dist/generateRandomString-B5zBiJzS.cjs +2 -0
- package/dist/generateRandomString-B5zBiJzS.cjs.map +1 -0
- package/dist/generateRandomString-za3IQGfQ.js +11 -0
- package/dist/generateRandomString-za3IQGfQ.js.map +1 -0
- package/dist/getJenks.d.ts +17 -0
- package/dist/getJenks.js +2 -0
- package/dist/getJenks.js.map +1 -0
- package/dist/getPercentileValue.d.ts +13 -0
- package/dist/getPercentileValue.js +2 -0
- package/dist/getPercentileValue.js.map +1 -0
- package/dist/getQueryParamsFromLink.d.ts +18 -0
- package/dist/getQueryParamsFromLink.js +2 -0
- package/dist/getQueryParamsFromLink.js.map +1 -0
- package/dist/getSchema.d.ts +3256 -0
- package/dist/getSchema.js +2 -0
- package/dist/getSchema.js.map +1 -0
- package/dist/getSliderMarks-CWajGCGq.js +719 -0
- package/dist/getSliderMarks-CWajGCGq.js.map +1 -0
- package/dist/getSliderMarks-DDJ1CdhL.cjs +6 -0
- package/dist/getSliderMarks-DDJ1CdhL.cjs.map +1 -0
- package/dist/getTextColorBasedOnBgColor.d.ts +13 -0
- package/dist/getTextColorBasedOnBgColor.js +2 -0
- package/dist/getTextColorBasedOnBgColor.js.map +1 -0
- package/dist/getUniqValue.d.ts +18 -0
- package/dist/getUniqValue.js +2 -0
- package/dist/getUniqValue.js.map +1 -0
- package/dist/graphList.d.ts +9 -0
- package/dist/graphList.js +2 -0
- package/dist/graphList.js.map +1 -0
- package/dist/imageDownload.d.ts +16 -0
- package/dist/imageDownload.js +3 -0
- package/dist/imageDownload.js.map +1 -0
- package/dist/index-01r5X3Gr-9jE0ObrK.cjs +2 -0
- package/dist/index-01r5X3Gr-9jE0ObrK.cjs.map +1 -0
- package/dist/index-01r5X3Gr-kH7FxQ7P.js +451 -0
- package/dist/index-01r5X3Gr-kH7FxQ7P.js.map +1 -0
- package/dist/index-27yTRcko.js +35 -0
- package/dist/index-27yTRcko.js.map +1 -0
- package/dist/index-B0rbzOoC.cjs +2 -0
- package/dist/index-B0rbzOoC.cjs.map +1 -0
- package/dist/index-BGMGC-HN.cjs +22 -0
- package/dist/index-BGMGC-HN.cjs.map +1 -0
- package/dist/index-BHm2KTjD-2e-Fu8L-.js +702 -0
- package/dist/index-BHm2KTjD-2e-Fu8L-.js.map +1 -0
- package/dist/index-BHm2KTjD-D8FylaKc.cjs +44 -0
- package/dist/index-BHm2KTjD-D8FylaKc.cjs.map +1 -0
- package/dist/index-BIPNFFja.js +506 -0
- package/dist/index-BIPNFFja.js.map +1 -0
- package/dist/index-BLizQDlg.js +658 -0
- package/dist/index-BLizQDlg.js.map +1 -0
- package/dist/index-BXns0-ng.cjs +2 -0
- package/dist/index-BXns0-ng.cjs.map +1 -0
- package/dist/index-BYroABPm.cjs +2 -0
- package/dist/index-BYroABPm.cjs.map +1 -0
- package/dist/index-BczVvEBZ.cjs +2 -0
- package/dist/index-BczVvEBZ.cjs.map +1 -0
- package/dist/index-BzeLQvXk.cjs +2 -0
- package/dist/index-BzeLQvXk.cjs.map +1 -0
- package/dist/index-C1rRk_50.js +273 -0
- package/dist/index-C1rRk_50.js.map +1 -0
- package/dist/index-C21TvELx.cjs +2 -0
- package/dist/index-C21TvELx.cjs.map +1 -0
- package/dist/index-CEc_9zWy.cjs +2 -0
- package/dist/index-CEc_9zWy.cjs.map +1 -0
- package/dist/index-CZbIGs8q.cjs +2 -0
- package/dist/index-CZbIGs8q.cjs.map +1 -0
- package/dist/index-CaAIPGZo.js +631 -0
- package/dist/index-CaAIPGZo.js.map +1 -0
- package/dist/index-CbVeVrla.cjs +2 -0
- package/dist/index-CbVeVrla.cjs.map +1 -0
- package/dist/index-CqzhBPuO-CfQywbdq.js +41 -0
- package/dist/index-CqzhBPuO-CfQywbdq.js.map +1 -0
- package/dist/index-CqzhBPuO-raKZqS7l.cjs +2 -0
- package/dist/index-CqzhBPuO-raKZqS7l.cjs.map +1 -0
- package/dist/index-D7ltPi18.js +26 -0
- package/dist/index-D7ltPi18.js.map +1 -0
- package/dist/index-DSnvdkHZ.js +495 -0
- package/dist/index-DSnvdkHZ.js.map +1 -0
- package/dist/index-DXmF_0ez.js +308 -0
- package/dist/index-DXmF_0ez.js.map +1 -0
- package/dist/index-Db-Yg_Ud.js +120 -0
- package/dist/index-Db-Yg_Ud.js.map +1 -0
- package/dist/index-Ds0uHjK9.cjs +2 -0
- package/dist/index-Ds0uHjK9.cjs.map +1 -0
- package/dist/index-DxagiOHo.js +707 -0
- package/dist/index-DxagiOHo.js.map +1 -0
- package/dist/index-DzdwZ2OA.js +77 -0
- package/dist/index-DzdwZ2OA.js.map +1 -0
- package/dist/index-UV9hjG_S.js +53 -0
- package/dist/index-UV9hjG_S.js.map +1 -0
- package/dist/index-a2C2Bqn2.cjs +10 -0
- package/dist/index-a2C2Bqn2.cjs.map +1 -0
- package/dist/index.js +1 -52488
- package/dist/index.js.map +1 -1
- package/dist/init-BhZylTFx.js +63 -0
- package/dist/init-BhZylTFx.js.map +1 -0
- package/dist/init-DU0ybBc_.cjs +2 -0
- package/dist/init-DU0ybBc_.cjs.map +1 -0
- package/dist/line-CPfhohvF.js +68 -0
- package/dist/line-CPfhohvF.js.map +1 -0
- package/dist/line-DHV4JwCR.cjs +2 -0
- package/dist/line-DHV4JwCR.cjs.map +1 -0
- package/dist/linear-BVckp9RD.cjs +2 -0
- package/dist/linear-BVckp9RD.cjs.map +1 -0
- package/dist/linear-DUdu7l2G.js +221 -0
- package/dist/linear-DUdu7l2G.js.map +1 -0
- package/dist/numberFormattingFunction.d.ts +22 -0
- package/dist/numberFormattingFunction.js +2 -0
- package/dist/numberFormattingFunction.js.map +1 -0
- package/dist/ordinal-BOeNbyae.cjs +2 -0
- package/dist/ordinal-BOeNbyae.cjs.map +1 -0
- package/dist/ordinal-w9Lu4Stb.js +62 -0
- package/dist/ordinal-w9Lu4Stb.js.map +1 -0
- package/dist/parse-DlCRUFh_.js +2768 -0
- package/dist/parse-DlCRUFh_.js.map +1 -0
- package/dist/parse-hMnG_lRV.cjs +2 -0
- package/dist/parse-hMnG_lRV.cjs.map +1 -0
- package/dist/pointer-CWRWOsrb.js +23 -0
- package/dist/pointer-CWRWOsrb.js.map +1 -0
- package/dist/pointer-Dkq5NV1q.cjs +2 -0
- package/dist/pointer-Dkq5NV1q.cjs.map +1 -0
- package/dist/pow-B5-jkdHU.cjs +2 -0
- package/dist/pow-B5-jkdHU.cjs.map +1 -0
- package/dist/pow-e8zx3AQJ.js +35 -0
- package/dist/pow-e8zx3AQJ.js.map +1 -0
- package/dist/removeOutliers.d.ts +16 -0
- package/dist/removeOutliers.js +2 -0
- package/dist/removeOutliers.js.map +1 -0
- package/dist/select-Bnfk0lJx.cjs +2 -0
- package/dist/select-Bnfk0lJx.cjs.map +1 -0
- package/dist/select-DKy99ogv.js +584 -0
- package/dist/select-DKy99ogv.js.map +1 -0
- package/dist/simple-statistics-flVzqVtt.js +65 -0
- package/dist/simple-statistics-flVzqVtt.js.map +1 -0
- package/dist/simple-statistics-xm8c0LQQ.cjs +2 -0
- package/dist/simple-statistics-xm8c0LQQ.cjs.map +1 -0
- package/dist/step-BZ3C8QFW.cjs +2 -0
- package/dist/step-BZ3C8QFW.cjs.map +1 -0
- package/dist/step-BrDul-H4.js +119 -0
- package/dist/step-BrDul-H4.js.map +1 -0
- package/dist/string-B8KlVSPX.js +364 -0
- package/dist/string-B8KlVSPX.js.map +1 -0
- package/dist/string-CRoCZCYa.cjs +2 -0
- package/dist/string-CRoCZCYa.cjs.map +1 -0
- package/dist/string2HTML-BX0oNw83.js +758 -0
- package/dist/string2HTML-BX0oNw83.js.map +1 -0
- package/dist/string2HTML-X4ZYX5jI.cjs +3 -0
- package/dist/string2HTML-X4ZYX5jI.cjs.map +1 -0
- package/dist/style.css +1 -1
- package/dist/svgDownload.d.ts +16 -0
- package/dist/svgDownload.js +2 -0
- package/dist/svgDownload.js.map +1 -0
- package/dist/threshold-DFfqcDMa.js +23 -0
- package/dist/threshold-DFfqcDMa.js.map +1 -0
- package/dist/threshold-DNsSUf8Q.cjs +2 -0
- package/dist/threshold-DNsSUf8Q.cjs.map +1 -0
- package/dist/time-Byw_jYQ7.cjs +2 -0
- package/dist/time-Byw_jYQ7.cjs.map +1 -0
- package/dist/time-BzJP5SPC.js +715 -0
- package/dist/time-BzJP5SPC.js.map +1 -0
- package/dist/timer-B39XOBYL.js +124 -0
- package/dist/timer-B39XOBYL.js.map +1 -0
- package/dist/timer-CKyBCVzT.cjs +2 -0
- package/dist/timer-CKyBCVzT.cjs.map +1 -0
- package/dist/toConsumableArray-BSMMWi3w-Cu4vcE-m.js +139 -0
- package/dist/toConsumableArray-BSMMWi3w-Cu4vcE-m.js.map +1 -0
- package/dist/toConsumableArray-BSMMWi3w-DJL7-zAp.cjs +4 -0
- package/dist/toConsumableArray-BSMMWi3w-DJL7-zAp.cjs.map +1 -0
- package/dist/transformColumnsToArray.d.ts +38 -0
- package/dist/transformColumnsToArray.js +2 -0
- package/dist/transformColumnsToArray.js.map +1 -0
- package/dist/transformDataForAggregation.d.ts +38 -0
- package/dist/transformDataForAggregation.js +2 -0
- package/dist/transformDataForAggregation.js.map +1 -0
- package/dist/transformDataForGraph.d.ts +47 -0
- package/dist/transformDataForGraph.js +2 -0
- package/dist/transformDataForGraph.js.map +1 -0
- package/dist/transformDataForGraphFromFile.d.ts +66 -0
- package/dist/transformDataForGraphFromFile.js +2 -0
- package/dist/transformDataForGraphFromFile.js.map +1 -0
- package/dist/use-in-view-CZPXmTZM.js +4645 -0
- package/dist/use-in-view-CZPXmTZM.js.map +1 -0
- package/dist/use-in-view-Dl1CsAIo.cjs +2 -0
- package/dist/use-in-view-Dl1CsAIo.cjs.map +1 -0
- package/dist/validateSchema.d.ts +68 -0
- package/dist/validateSchema.js +2 -0
- package/dist/validateSchema.js.map +1 -0
- package/dist/x-Dft9NVe_-DcB7wtv5.js +61 -0
- package/dist/x-Dft9NVe_-DcB7wtv5.js.map +1 -0
- package/dist/x-Dft9NVe_-LeyJu02C.cjs +27 -0
- package/dist/x-Dft9NVe_-LeyJu02C.cjs.map +1 -0
- package/dist/y-D0sAaVii.js +421 -0
- package/dist/y-D0sAaVii.js.map +1 -0
- package/dist/y-QcCbqrzx.cjs +2 -0
- package/dist/y-QcCbqrzx.cjs.map +1 -0
- package/dist/zoom-Lo7IAUfC.cjs +2 -0
- package/dist/zoom-Lo7IAUfC.cjs.map +1 -0
- package/dist/zoom-_lqdiGoI.js +1983 -0
- package/dist/zoom-_lqdiGoI.js.map +1 -0
- package/package.json +415 -4
- package/dist/index.cjs +0 -68
- package/dist/index.cjs.map +0 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
declare interface AxesClassNameObject {
|
|
4
|
+
gridLines?: string;
|
|
5
|
+
labels?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
axis?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare interface AxesStyleObject {
|
|
11
|
+
gridLines?: React.CSSProperties;
|
|
12
|
+
labels?: React.CSSProperties;
|
|
13
|
+
title?: React.CSSProperties;
|
|
14
|
+
axis?: React.CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare interface ClassNameObject {
|
|
18
|
+
title?: string;
|
|
19
|
+
footnote?: string;
|
|
20
|
+
source?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
tooltip?: string;
|
|
23
|
+
xAxis?: AxesClassNameObject;
|
|
24
|
+
yAxis?: AxesClassNameObject;
|
|
25
|
+
legend?: string;
|
|
26
|
+
graphContainer?: string;
|
|
27
|
+
graphObjectValues?: string;
|
|
28
|
+
dataConnectors?: string;
|
|
29
|
+
mouseOverLine?: string;
|
|
30
|
+
regLine?: string;
|
|
31
|
+
dataCards?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export declare function DataTable(props: Props): JSX.Element;
|
|
35
|
+
|
|
36
|
+
declare interface DataTableColumnDataType {
|
|
37
|
+
columnTitle?: string;
|
|
38
|
+
columnId: string;
|
|
39
|
+
sortable?: boolean;
|
|
40
|
+
filterOptions?: string[];
|
|
41
|
+
chip?: boolean;
|
|
42
|
+
chipColumnId?: string;
|
|
43
|
+
chipColors?: {
|
|
44
|
+
value: string;
|
|
45
|
+
color: string;
|
|
46
|
+
}[];
|
|
47
|
+
separator?: string;
|
|
48
|
+
align?: 'left' | 'right' | 'center';
|
|
49
|
+
suffix?: string;
|
|
50
|
+
prefix?: string;
|
|
51
|
+
columnWidth?: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
|
|
55
|
+
|
|
56
|
+
declare interface Props {
|
|
57
|
+
/** Array of data objects. If the data have a object for ket `rowStyle` then that is use to style the row of the table. */
|
|
58
|
+
data: object[];
|
|
59
|
+
/** Title of the graph */
|
|
60
|
+
graphTitle?: string | React.ReactNode;
|
|
61
|
+
/** Description of the graph */
|
|
62
|
+
graphDescription?: string | React.ReactNode;
|
|
63
|
+
/** Footnote for the graph */
|
|
64
|
+
footNote?: string | React.ReactNode;
|
|
65
|
+
/** Source data for the graph */
|
|
66
|
+
sources?: SourcesDataType[];
|
|
67
|
+
/** Accessibility label */
|
|
68
|
+
ariaLabel?: string;
|
|
69
|
+
/** Background color of the graph */
|
|
70
|
+
backgroundColor?: string | boolean;
|
|
71
|
+
/** Custom styles for the graph. Each object should be a valid React CSS style object. */
|
|
72
|
+
styles?: StyleObject;
|
|
73
|
+
/** Custom class names */
|
|
74
|
+
classNames?: ClassNameObject;
|
|
75
|
+
/** Width of the graph */
|
|
76
|
+
width?: number;
|
|
77
|
+
/** Minimum width of the table as string in px */
|
|
78
|
+
minWidth?: string;
|
|
79
|
+
/** Height of the graph */
|
|
80
|
+
height?: number;
|
|
81
|
+
/** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */
|
|
82
|
+
padding?: string;
|
|
83
|
+
/** Column settings for each column shown in the table. */
|
|
84
|
+
columnData: DataTableColumnDataType[];
|
|
85
|
+
/** Specifies the number of decimal places to display in the value. */
|
|
86
|
+
precision?: number;
|
|
87
|
+
/** Defines how “NA” values should be displayed/labelled in the graph */
|
|
88
|
+
naLabel?: string;
|
|
89
|
+
/** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */
|
|
90
|
+
resetSelectionOnDoubleClick?: boolean;
|
|
91
|
+
/** Callback for mouse click event */
|
|
92
|
+
onSeriesMouseClick?: (_d: any) => void;
|
|
93
|
+
/** Language setting */
|
|
94
|
+
language?: Languages;
|
|
95
|
+
/** Color theme */
|
|
96
|
+
theme?: 'light' | 'dark';
|
|
97
|
+
/** Unique ID for the graph */
|
|
98
|
+
graphID?: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare interface SourcesDataType {
|
|
102
|
+
source: string;
|
|
103
|
+
link?: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
declare interface StyleObject {
|
|
107
|
+
title?: React.CSSProperties;
|
|
108
|
+
footnote?: React.CSSProperties;
|
|
109
|
+
source?: React.CSSProperties;
|
|
110
|
+
description?: React.CSSProperties;
|
|
111
|
+
graphContainer?: React.CSSProperties;
|
|
112
|
+
tooltip?: React.CSSProperties;
|
|
113
|
+
xAxis?: AxesStyleObject;
|
|
114
|
+
yAxis?: AxesStyleObject;
|
|
115
|
+
graphObjectValues?: React.CSSProperties;
|
|
116
|
+
dataConnectors?: React.CSSProperties;
|
|
117
|
+
mouseOverLine?: React.CSSProperties;
|
|
118
|
+
regLine?: React.CSSProperties;
|
|
119
|
+
dataCards?: React.CSSProperties;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export { }
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-BHm2KTjD-D8FylaKc.cjs"),H=require("./index-BXns0-ng.cjs"),p=require("react"),M=require("./index-BzeLQvXk.cjs"),Z=require("./index-Ds0uHjK9.cjs"),m=require("./Typography-CDR-DAHH.cjs"),R=require("./numberFormattingFunction.js"),_=require("./GraphFooter.js"),tt=require("./GraphHeader.js"),j=require("./index-CEc_9zWy.cjs"),S=require("./getTextColorBasedOnBgColor.js"),X=v=>v.map(c=>c||1).reduce((c,b)=>c+b,0);function rt(v){const{width:l,height:N,graphTitle:c,sources:b,graphDescription:C,footNote:T,graphID:L,data:d,columnData:n,onSeriesMouseClick:E,language:$="en",theme:V="light",ariaLabel:K,backgroundColor:u=!1,padding:B,resetSelectionOnDoubleClick:Y=!0,styles:g,classNames:h,minWidth:F,naLabel:I="NA",precision:w=2}=v,[x,D]=p.useState(void 0),[q,z]=p.useState(void 0),[y,P]=p.useState("asc"),[f,W]=p.useState(void 0),[J,Q]=p.useState({}),[a,G]=p.useState(n.filter(r=>r.filterOptions&&r.filterOptions.length>0).map(r=>({id:r.columnId,option:r.filterOptions}))),[U,A]=p.useState(d);return p.useEffect(()=>{const r=[];d.forEach(s=>{let t=!0;a.forEach(e=>{if(typeof s[e.id]!="object"&&typeof s[e.id]!="function"&&typeof s[e.id]!="symbol")if(n[n.findIndex(i=>i.columnId===e.id)].separator){const i=s[e.id].split(n[n.findIndex(k=>k.columnId===e.id)].separator);Z.intersection(i,e.option).length===0&&(t=!1)}else e.option.indexOf(s[e.id])===-1&&(t=!1)}),t&&r.push(s)}),A(x&&d?y==="asc"?M.sortBy(r,[x]):M.sortBy(r,[x]).reverse():r)},[x,y,d,a,n]),o.jsxRuntimeExports.jsx("div",{className:`${V||"light"} flex ${l?"w-fit grow-0":"w-full grow"}`,dir:$==="he"||$==="ar"?"rtl":void 0,children:o.jsxRuntimeExports.jsx("div",{className:m.cnExports.cn(`${u?u===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${$||"en"} w-full`,h?.graphContainer),style:{...g?.graphContainer||{},...u&&u!==!0?{backgroundColor:u}:{}},id:L,"aria-label":K||`${c?`The graph shows ${c}. `:""}This is an data table. ${C?` ${C}`:""}`,children:o.jsxRuntimeExports.jsxs("div",{className:"flex grow",style:{padding:u?B||"1rem":B||0},children:[o.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-3 w-full justify-between grow",children:[c||C?o.jsxRuntimeExports.jsx(tt.GraphHeader,{styles:{title:g?.title,description:g?.description},classNames:{title:h?.title,description:h?.description},graphTitle:c,graphDescription:C,width:l}):null,o.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center",children:o.jsxRuntimeExports.jsx("div",{className:"undp-scrollbar",style:{width:l?`${l}px`:"100%",height:N?`${N}px`:"auto"},children:o.jsxRuntimeExports.jsx("div",{style:F?{minWidth:F}:void 0,children:d?o.jsxRuntimeExports.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse"},children:[o.jsxRuntimeExports.jsx("thead",{className:"text-left bg-primary-gray-300 dark:bg-primary-gray-550",children:o.jsxRuntimeExports.jsx("tr",{children:n?.map((r,s)=>o.jsxRuntimeExports.jsx("th",{className:"text-primary-gray-700 dark:text-primary-gray-100 text-sm",style:{width:`calc(${100*(r.columnWidth||1)/X(n.map(t=>t.columnWidth||1))}%`},children:o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 justify-between items-center p-4",children:[o.jsxRuntimeExports.jsx(m.TypographyExports.P,{size:"sm",marginBottom:"none",className:`w-fit grow text-${r.align||"left"} font-bold`,children:r.columnTitle||r.columnId}),r.sortable?o.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent cursor-pointer p-0 m-0 border-0",onClick:()=>{x===r.columnId?(y==="asc"&&P("desc"),y==="desc"&&D(void 0)):(D(r.columnId),P("asc"))},children:x===r.columnId?y==="asc"?o.jsxRuntimeExports.jsx(j.SortingIconAscending,{}):o.jsxRuntimeExports.jsx(j.SortingIconDescending,{}):o.jsxRuntimeExports.jsx(j.SortingIcon,{})}):null,r.filterOptions&&r.filterOptions.length?o.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent cursor-pointer m-0 p-0 border-0",onClick:t=>{if(f===r.columnId)W(void 0);else if(t.currentTarget){W(r.columnId);const e=t.currentTarget.getBoundingClientRect();Q({top:e.bottom+window.scrollY,left:e.left+window.scrollX-160<0?e.left+window.scrollX:e.left+window.scrollX-160,width:"10rem"})}},children:a[a.findIndex(t=>t.id===r.columnId)].option.length===r.filterOptions?.length?o.jsxRuntimeExports.jsx(j.FilterIcon,{}):o.jsxRuntimeExports.jsx(j.FilterIconApplied,{})}):null]})},s))})}),o.jsxRuntimeExports.jsx("tbody",{children:U?.map((r,s)=>o.jsxRuntimeExports.jsx("tr",{className:`cursor-${E?"pointer":"auto"} border-b border-b-primary-gray-400 dark:border-b-primary-gray-500 ${H.isEqual(q,r)?"bg-primary-gray-200 dark:bg-primary-gray-600":"bg-transparent"}`,style:r.rowStyle,onClick:()=>{E&&(H.isEqual(q,r)&&Y?(z(void 0),E(void 0)):(z(r),E(r)))},children:n.map((t,e)=>o.jsxRuntimeExports.jsx("td",{className:`text-primary-gray-700 dark:text-primary-gray-100 text-sm text-${t.align||"left"}`,style:{width:`calc(${100*(r.columnWidth||1)/X(n.map(i=>i.columnWidth||1))}%`},children:o.jsxRuntimeExports.jsx("div",{className:`text-primary-gray-700 dark:text-primary-gray-100 flex p-4 ${t.align==="right"?"justify-end":t.align==="center"?"justify-center":"justify-start"}`,children:typeof r[t.columnId]=="number"?o.jsxRuntimeExports.jsx(m.TypographyExports.P,{marginBottom:"none",size:"sm",className:`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${t.chip?"grow-0 rounded-sm p-2":"grow rounded-none p-0"} text-${t.align||"left"} ${t.chip?t.chipColors?"":"bg-primary-gray-300 dark:bg-primary-gray-500":"bg-transparent"}`,style:{...t.chip&&t.chipColors?{backgroundColor:t.chipColors[t.chipColors.findIndex(i=>i.value===r[t.chipColumnId||t.columnId])].color,color:S.getTextColorBasedOnBgColor(t.chipColors[t.chipColors.findIndex(i=>i.value===r[t.chipColumnId||t.columnId])].color)}:{}},children:R.numberFormattingFunction(r[t.columnId],I,w,t.prefix,t.suffix)}):typeof r[t.columnId]=="string"?t.separator?o.jsxRuntimeExports.jsx("div",{className:"text-primary-gray-700 dark:text-primary-gray-100 flex flex-wrap gap-2",children:r[t.columnId].split(t.separator).map((i,k)=>o.jsxRuntimeExports.jsx(m.TypographyExports.P,{marginBottom:"none",size:"sm",className:`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${t.chip?"grow-0 rounded-sm p-2":"grow rounded-none p-0"} text-${t.align||"left"} ${t.chip?t.chipColors?"":"bg-primary-gray-300 dark:bg-primary-gray-500":"bg-transparent"}`,style:{...t.chip&&t.chipColors?{backgroundColor:t.chipColors[t.chipColors.findIndex(O=>O.value===(t.chipColumnId?r[t.chipColumnId]:i))].color,color:S.getTextColorBasedOnBgColor(t.chipColors[t.chipColors.findIndex(O=>O.value===(t.chipColumnId?r[t.chipColumnId]:i))].color)}:{}},children:R.numberFormattingFunction(i,I,w,t.prefix,t.suffix)},k))}):o.jsxRuntimeExports.jsx(m.TypographyExports.P,{marginBottom:"none",size:"sm",className:`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${t.chip?"grow-0 rounded-sm p-2":"grow rounded-none p-0"} text-${t.align||"left"} ${t.chip?t.chipColors?"":"bg-primary-gray-300 dark:bg-primary-gray-500":"bg-transparent"}`,style:{...t.chip&&t.chipColors?{backgroundColor:t.chipColors[t.chipColors.findIndex(i=>i.value===r[t.chipColumnId||t.columnId])].color,color:S.getTextColorBasedOnBgColor(t.chipColors[t.chipColors.findIndex(i=>i.value===r[t.chipColumnId||t.columnId])].color)}:{}},children:R.numberFormattingFunction(r[t.columnId],I,w,t.prefix,t.suffix)}):o.jsxRuntimeExports.jsx("div",{children:R.numberFormattingFunction(r[t.columnId],I,w,t.prefix,t.suffix)})})},e))},s))})]}):null})})}),b||T?o.jsxRuntimeExports.jsx(_.GraphFooter,{styles:{footnote:g?.footnote,source:g?.source},classNames:{footnote:h?.footnote,source:h?.source},sources:b,footNote:T,width:l}):null]}),f&&o.jsxRuntimeExports.jsx("div",{style:J,className:"absolute p-3 border z-[1000] rounded-sm bg-primary-white dark:bg-primary-gray-700 border-primary-gray-300 dark:border-primary-gray-550",children:o.jsxRuntimeExports.jsxs("div",{className:"max-w-60",children:[o.jsxRuntimeExports.jsx(m.TypographyExports.P,{size:"sm",marginBottom:"2xs",className:"font-bold",children:"Filter data by"}),o.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-2",children:n[n.findIndex(r=>r.columnId===f)].filterOptions?.map((r,s)=>o.jsxRuntimeExports.jsx("div",{children:o.jsxRuntimeExports.jsxs("label",{className:"undp-viz-label",children:[o.jsxRuntimeExports.jsx("input",{type:"checkbox",className:"undp-viz-checkbox",checked:a[a.findIndex(t=>t.id===f)].option.indexOf(r)!==-1,onChange:()=>{const t=a.findIndex(i=>i.id===f),e=[...a[t].option];if(e.indexOf(r)!==-1){e.splice(e.indexOf(r),1);const i=[...a];i[t].option=e,G(i)}else{e.push(r);const i=[...a];i[t].option=e,G(i)}}}),r]},s)},s))})]})})]})})})}exports.DataTable=rt;
|
|
2
|
+
//# sourceMappingURL=DataTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTable.js","sources":["../src/Components/Graphs/DataTable/index.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport isEqual from 'fast-deep-equal';\r\nimport { useEffect, useState } from 'react';\r\nimport sortBy from 'lodash.sortby';\r\nimport intersection from 'lodash.intersection';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { P } from '@undp/design-system-react/Typography';\r\n\r\nimport {\r\n DataTableColumnDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n FilterIcon,\r\n FilterIconApplied,\r\n SortingIcon,\r\n SortingIconAscending,\r\n SortingIconDescending,\r\n} from '@/Components/Icons';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects. If the data have a object for ket `rowStyle` then that is use to style the row of the table. */\r\n data: object[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Minimum width of the table as string in px */\r\n minWidth?: string;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Column settings for each column shown in the table. */\r\n columnData: DataTableColumnDataType[];\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Defines how “NA” values should be displayed/labelled in the graph */\r\n naLabel?: string;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Callback for mouse click event */\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nconst TotalWidth = (columns: (number | undefined)[]) => {\r\n const columnWidth = columns.map(d => d || 1);\r\n const sum = columnWidth.reduce((acc, cur) => acc + cur, 0);\r\n return sum;\r\n};\r\n\r\nexport function DataTable(props: Props) {\r\n const {\r\n width,\r\n height,\r\n graphTitle,\r\n sources,\r\n graphDescription,\r\n footNote,\r\n graphID,\r\n data,\r\n columnData,\r\n onSeriesMouseClick,\r\n language = 'en',\r\n theme = 'light',\r\n ariaLabel,\r\n backgroundColor = false,\r\n padding,\r\n resetSelectionOnDoubleClick = true,\r\n styles,\r\n classNames,\r\n minWidth,\r\n naLabel = 'NA',\r\n precision = 2,\r\n } = props;\r\n const [columnSortBy, setColumnSortBy] = useState<string | undefined>(undefined);\r\n\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [sortDirection, setSortDirection] = useState<'asc' | 'desc'>('asc');\r\n const [popupVisible, setPopupVisible] = useState<string | undefined>(undefined);\r\n const [popupStyle, setPopupStyle] = useState({});\r\n const [filterOption, setFilterOption] = useState(\r\n columnData\r\n .filter(d => d.filterOptions && d.filterOptions.length > 0)\r\n .map(d => ({ id: d.columnId, option: d.filterOptions as string[] })),\r\n );\r\n const [sortedData, setSortedData] = useState(data);\r\n useEffect(() => {\r\n const dataFiltered: any = [];\r\n\r\n data.forEach((d: any) => {\r\n let filter = true;\r\n filterOption.forEach(el => {\r\n if (\r\n typeof d[el.id] !== 'object' &&\r\n typeof d[el.id] !== 'function' &&\r\n typeof d[el.id] !== 'symbol'\r\n ) {\r\n if (columnData[columnData.findIndex(cd => cd.columnId === el.id)].separator) {\r\n const arr = d[el.id].split(\r\n columnData[columnData.findIndex(cd => cd.columnId === el.id)].separator,\r\n );\r\n if (intersection(arr, el.option).length === 0) filter = false;\r\n } else if (el.option.indexOf(d[el.id]) === -1) filter = false;\r\n }\r\n });\r\n if (filter) dataFiltered.push(d);\r\n });\r\n if (columnSortBy && data) {\r\n setSortedData(\r\n sortDirection === 'asc'\r\n ? sortBy(dataFiltered, [columnSortBy])\r\n : sortBy(dataFiltered, [columnSortBy]).reverse(),\r\n );\r\n } else {\r\n setSortedData(dataFiltered);\r\n }\r\n }, [columnSortBy, sortDirection, data, filterOption, columnData]);\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'} w-full`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n aria-label={\r\n ariaLabel ||\r\n `${graphTitle ? `The graph shows ${graphTitle}. ` : ''}This is an data table. ${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col gap-3 w-full justify-between grow'>\r\n {graphTitle || graphDescription ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n />\r\n ) : null}\r\n <div className='grow flex flex-col justify-center'>\r\n <div\r\n className='undp-scrollbar'\r\n style={{\r\n width: width ? `${width}px` : '100%',\r\n height: height ? `${height}px` : 'auto',\r\n }}\r\n >\r\n <div style={minWidth ? { minWidth } : undefined}>\r\n {data ? (\r\n <table className='w-full' style={{ borderCollapse: 'collapse' }}>\r\n <thead className='text-left bg-primary-gray-300 dark:bg-primary-gray-550'>\r\n <tr>\r\n {columnData?.map((d, i) => (\r\n <th\r\n className='text-primary-gray-700 dark:text-primary-gray-100 text-sm'\r\n style={{\r\n width: `calc(${\r\n (100 * (d.columnWidth || 1)) /\r\n TotalWidth(columnData.map(cd => cd.columnWidth || 1))\r\n }%`,\r\n }}\r\n key={i}\r\n >\r\n <div className='flex gap-2 justify-between items-center p-4'>\r\n <P\r\n size='sm'\r\n marginBottom='none'\r\n className={`w-fit grow text-${d.align || 'left'} font-bold`}\r\n >\r\n {d.columnTitle || d.columnId}\r\n </P>\r\n {d.sortable ? (\r\n <button\r\n type='button'\r\n className='bg-transparent cursor-pointer p-0 m-0 border-0'\r\n onClick={() => {\r\n if (columnSortBy === d.columnId) {\r\n if (sortDirection === 'asc') {\r\n setSortDirection('desc');\r\n }\r\n if (sortDirection === 'desc') {\r\n setColumnSortBy(undefined);\r\n }\r\n } else {\r\n setColumnSortBy(d.columnId);\r\n setSortDirection('asc');\r\n }\r\n }}\r\n >\r\n {columnSortBy === d.columnId ? (\r\n sortDirection === 'asc' ? (\r\n <SortingIconAscending />\r\n ) : (\r\n <SortingIconDescending />\r\n )\r\n ) : (\r\n <SortingIcon />\r\n )}\r\n </button>\r\n ) : null}\r\n {d.filterOptions && d.filterOptions.length ? (\r\n <button\r\n type='button'\r\n className='bg-transparent cursor-pointer m-0 p-0 border-0'\r\n onClick={event => {\r\n if (popupVisible === d.columnId) {\r\n setPopupVisible(undefined);\r\n } else if (event.currentTarget) {\r\n setPopupVisible(d.columnId);\r\n const rect = event.currentTarget.getBoundingClientRect();\r\n setPopupStyle({\r\n top: rect.bottom + window.scrollY,\r\n left:\r\n rect.left + window.scrollX - 160 < 0\r\n ? rect.left + window.scrollX\r\n : rect.left + window.scrollX - 160,\r\n width: '10rem',\r\n });\r\n }\r\n }}\r\n >\r\n {filterOption[\r\n filterOption.findIndex(el => el.id === d.columnId)\r\n ].option.length === d.filterOptions?.length ? (\r\n <FilterIcon />\r\n ) : (\r\n <FilterIconApplied />\r\n )}\r\n </button>\r\n ) : null}\r\n </div>\r\n </th>\r\n ))}\r\n </tr>\r\n </thead>\r\n <tbody>\r\n {sortedData?.map((d: any, i: number) => (\r\n <tr\r\n key={i}\r\n className={`cursor-${\r\n onSeriesMouseClick ? 'pointer' : 'auto'\r\n } border-b border-b-primary-gray-400 dark:border-b-primary-gray-500 ${\r\n isEqual(mouseClickData, d)\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-600'\r\n : 'bg-transparent'\r\n }`}\r\n style={d.rowStyle}\r\n onClick={() => {\r\n if (onSeriesMouseClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick(d);\r\n }\r\n }\r\n }}\r\n >\r\n {columnData.map((el, j) => (\r\n <td\r\n key={j}\r\n className={`text-primary-gray-700 dark:text-primary-gray-100 text-sm text-${\r\n el.align || 'left'\r\n }`}\r\n style={{\r\n width: `calc(${\r\n (100 * (d.columnWidth || 1)) /\r\n TotalWidth(columnData.map(cd => cd.columnWidth || 1))\r\n }%`,\r\n }}\r\n >\r\n <div\r\n className={`text-primary-gray-700 dark:text-primary-gray-100 flex p-4 ${\r\n el.align === 'right'\r\n ? 'justify-end'\r\n : el.align === 'center'\r\n ? 'justify-center'\r\n : 'justify-start'\r\n }`}\r\n >\r\n {typeof d[el.columnId] === 'number' ? (\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n className={`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${\r\n el.chip ? 'grow-0 rounded-sm p-2' : 'grow rounded-none p-0'\r\n } text-${el.align || 'left'} ${\r\n el.chip\r\n ? !el.chipColors\r\n ? 'bg-primary-gray-300 dark:bg-primary-gray-500'\r\n : ''\r\n : 'bg-transparent'\r\n }`}\r\n style={{\r\n ...(el.chip && el.chipColors\r\n ? {\r\n backgroundColor:\r\n el.chipColors[\r\n el.chipColors.findIndex(\r\n c =>\r\n c.value === d[el.chipColumnId || el.columnId],\r\n )\r\n ].color,\r\n color: getTextColorBasedOnBgColor(\r\n el.chipColors[\r\n el.chipColors.findIndex(\r\n c =>\r\n c.value === d[el.chipColumnId || el.columnId],\r\n )\r\n ].color,\r\n ),\r\n }\r\n : {}),\r\n }}\r\n >\r\n {numberFormattingFunction(\r\n d[el.columnId],\r\n naLabel,\r\n precision,\r\n el.prefix,\r\n el.suffix,\r\n )}\r\n </P>\r\n ) : typeof d[el.columnId] === 'string' ? (\r\n el.separator ? (\r\n <div className='text-primary-gray-700 dark:text-primary-gray-100 flex flex-wrap gap-2'>\r\n {d[el.columnId]\r\n .split(el.separator)\r\n .map((element: string, indx: number) => (\r\n <P\r\n key={indx}\r\n marginBottom='none'\r\n size='sm'\r\n className={`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${\r\n el.chip\r\n ? 'grow-0 rounded-sm p-2'\r\n : 'grow rounded-none p-0'\r\n } text-${el.align || 'left'} ${\r\n el.chip\r\n ? !el.chipColors\r\n ? 'bg-primary-gray-300 dark:bg-primary-gray-500'\r\n : ''\r\n : 'bg-transparent'\r\n }`}\r\n style={{\r\n ...(el.chip && el.chipColors\r\n ? {\r\n backgroundColor:\r\n el.chipColors[\r\n el.chipColors.findIndex(\r\n c =>\r\n c.value ===\r\n (el.chipColumnId\r\n ? d[el.chipColumnId]\r\n : element),\r\n )\r\n ].color,\r\n color: getTextColorBasedOnBgColor(\r\n el.chipColors[\r\n el.chipColors.findIndex(\r\n c =>\r\n c.value ===\r\n (el.chipColumnId\r\n ? d[el.chipColumnId]\r\n : element),\r\n )\r\n ].color,\r\n ),\r\n }\r\n : {}),\r\n }}\r\n >\r\n {numberFormattingFunction(\r\n element,\r\n naLabel,\r\n precision,\r\n el.prefix,\r\n el.suffix,\r\n )}\r\n </P>\r\n ))}\r\n </div>\r\n ) : (\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n className={`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${\r\n el.chip\r\n ? 'grow-0 rounded-sm p-2'\r\n : 'grow rounded-none p-0'\r\n } text-${el.align || 'left'} ${\r\n el.chip\r\n ? !el.chipColors\r\n ? 'bg-primary-gray-300 dark:bg-primary-gray-500'\r\n : ''\r\n : 'bg-transparent'\r\n }`}\r\n style={{\r\n ...(el.chip && el.chipColors\r\n ? {\r\n backgroundColor:\r\n el.chipColors[\r\n el.chipColors.findIndex(\r\n c =>\r\n c.value ===\r\n d[el.chipColumnId || el.columnId],\r\n )\r\n ].color,\r\n color: getTextColorBasedOnBgColor(\r\n el.chipColors[\r\n el.chipColors.findIndex(\r\n c =>\r\n c.value ===\r\n d[el.chipColumnId || el.columnId],\r\n )\r\n ].color,\r\n ),\r\n }\r\n : {}),\r\n }}\r\n >\r\n {numberFormattingFunction(\r\n d[el.columnId],\r\n naLabel,\r\n precision,\r\n el.prefix,\r\n el.suffix,\r\n )}\r\n </P>\r\n )\r\n ) : (\r\n <div>\r\n {numberFormattingFunction(\r\n d[el.columnId],\r\n naLabel,\r\n precision,\r\n el.prefix,\r\n el.suffix,\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </td>\r\n ))}\r\n </tr>\r\n ))}\r\n </tbody>\r\n </table>\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </div>\r\n {popupVisible && (\r\n <div\r\n style={popupStyle}\r\n className='absolute p-3 border z-[1000] rounded-sm bg-primary-white dark:bg-primary-gray-700 border-primary-gray-300 dark:border-primary-gray-550'\r\n >\r\n <div className='max-w-60'>\r\n <P size='sm' marginBottom='2xs' className='font-bold'>\r\n Filter data by\r\n </P>\r\n <div className='flex flex-col gap-2'>\r\n {columnData[\r\n columnData.findIndex(d => d.columnId === popupVisible)\r\n ].filterOptions?.map((el, i) => (\r\n <div key={i}>\r\n <label key={i} className='undp-viz-label'>\r\n <input\r\n type='checkbox'\r\n className='undp-viz-checkbox'\r\n checked={\r\n filterOption[\r\n filterOption.findIndex(d => d.id === popupVisible)\r\n ].option.indexOf(el) !== -1\r\n }\r\n onChange={() => {\r\n const indx = filterOption.findIndex(d => d.id === popupVisible);\r\n const opt = [...filterOption[indx].option];\r\n if (opt.indexOf(el) !== -1) {\r\n opt.splice(opt.indexOf(el), 1);\r\n const filterOptionDuplicate = [...filterOption];\r\n filterOptionDuplicate[indx].option = opt;\r\n setFilterOption(filterOptionDuplicate);\r\n } else {\r\n opt.push(el);\r\n const filterOptionDuplicate = [...filterOption];\r\n filterOptionDuplicate[indx].option = opt;\r\n setFilterOption(filterOptionDuplicate);\r\n }\r\n }}\r\n />\r\n {el}\r\n </label>\r\n </div>\r\n ))}\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["TotalWidth","columns","d","acc","cur","DataTable","props","width","height","graphTitle","sources","graphDescription","footNote","graphID","data","columnData","onSeriesMouseClick","language","theme","ariaLabel","backgroundColor","padding","resetSelectionOnDoubleClick","styles","classNames","minWidth","naLabel","precision","columnSortBy","setColumnSortBy","useState","mouseClickData","setMouseClickData","sortDirection","setSortDirection","popupVisible","setPopupVisible","popupStyle","setPopupStyle","filterOption","setFilterOption","sortedData","setSortedData","useEffect","dataFiltered","filter","el","cd","arr","intersection","sortBy","jsx","cn","jsxs","GraphHeader","i","P","SortingIconAscending","SortingIconDescending","SortingIcon","event","rect","FilterIcon","FilterIconApplied","isEqual","j","c","getTextColorBasedOnBgColor","numberFormattingFunction","element","indx","GraphFooter","opt","filterOptionDuplicate"],"mappings":"wdAqFMA,EAAcC,GACEA,EAAQ,IAAIC,GAAKA,GAAK,CAAC,EACnB,OAAO,CAACC,EAAKC,IAAQD,EAAMC,EAAK,CAAC,EAIpD,SAASC,GAAUC,EAAc,CACtC,KAAM,CACJ,MAAAC,EACA,OAAAC,EACA,WAAAC,EACA,QAAAC,EACA,iBAAAC,EACA,SAAAC,EACA,QAAAC,EACA,KAAAC,EACA,WAAAC,EACA,mBAAAC,EACA,SAAAC,EAAW,KACX,MAAAC,EAAQ,QACR,UAAAC,EACA,gBAAAC,EAAkB,GAClB,QAAAC,EACA,4BAAAC,EAA8B,GAC9B,OAAAC,EACA,WAAAC,EACA,SAAAC,EACA,QAAAC,EAAU,KACV,UAAAC,EAAY,CAAA,EACVrB,EACE,CAACsB,EAAcC,CAAe,EAAIC,EAAAA,SAA6B,MAAS,EAExE,CAACC,EAAgBC,CAAiB,EAAIF,EAAAA,SAAc,MAAS,EAC7D,CAACG,EAAeC,CAAgB,EAAIJ,EAAAA,SAAyB,KAAK,EAClE,CAACK,EAAcC,CAAe,EAAIN,EAAAA,SAA6B,MAAS,EACxE,CAACO,EAAYC,CAAa,EAAIR,EAAAA,SAAS,CAAA,CAAE,EACzC,CA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@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
declare interface AnimateDataType {
|
|
4
|
+
duration: number;
|
|
5
|
+
once: boolean;
|
|
6
|
+
amount: 'some' | 'all' | number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare interface AnnotationSettingsDataType {
|
|
10
|
+
text: string;
|
|
11
|
+
maxWidth?: number;
|
|
12
|
+
xCoordinate?: number | string;
|
|
13
|
+
yCoordinate?: number | string;
|
|
14
|
+
xOffset?: number;
|
|
15
|
+
yOffset?: number;
|
|
16
|
+
align?: 'center' | 'left' | 'right';
|
|
17
|
+
color?: string;
|
|
18
|
+
fontWeight?: 'regular' | 'bold' | 'medium';
|
|
19
|
+
showConnector?: boolean | number;
|
|
20
|
+
connectorRadius?: number;
|
|
21
|
+
classNames?: {
|
|
22
|
+
connector?: string;
|
|
23
|
+
text?: string;
|
|
24
|
+
};
|
|
25
|
+
styles?: {
|
|
26
|
+
connector?: React.CSSProperties;
|
|
27
|
+
text?: React.CSSProperties;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare interface AxesClassNameObject {
|
|
32
|
+
gridLines?: string;
|
|
33
|
+
labels?: string;
|
|
34
|
+
title?: string;
|
|
35
|
+
axis?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare interface AxesStyleObject {
|
|
39
|
+
gridLines?: React.CSSProperties;
|
|
40
|
+
labels?: React.CSSProperties;
|
|
41
|
+
title?: React.CSSProperties;
|
|
42
|
+
axis?: React.CSSProperties;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare interface ClassNameObject {
|
|
46
|
+
title?: string;
|
|
47
|
+
footnote?: string;
|
|
48
|
+
source?: string;
|
|
49
|
+
description?: string;
|
|
50
|
+
tooltip?: string;
|
|
51
|
+
xAxis?: AxesClassNameObject;
|
|
52
|
+
yAxis?: AxesClassNameObject;
|
|
53
|
+
legend?: string;
|
|
54
|
+
graphContainer?: string;
|
|
55
|
+
graphObjectValues?: string;
|
|
56
|
+
dataConnectors?: string;
|
|
57
|
+
mouseOverLine?: string;
|
|
58
|
+
regLine?: string;
|
|
59
|
+
dataCards?: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare type CurveTypes = 'linear' | 'curve' | 'step' | 'stepAfter' | 'stepBefore';
|
|
63
|
+
|
|
64
|
+
declare interface CustomHighlightAreaSettingsDataType {
|
|
65
|
+
coordinates: (number | string)[];
|
|
66
|
+
closePath?: boolean;
|
|
67
|
+
style?: React.CSSProperties;
|
|
68
|
+
className?: string;
|
|
69
|
+
color?: string;
|
|
70
|
+
strokeWidth?: number;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
declare interface CustomLayerDataType {
|
|
74
|
+
position: 'before' | 'after';
|
|
75
|
+
layer: React.ReactNode;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export declare function DifferenceLineChart(props: Props): JSX.Element;
|
|
79
|
+
|
|
80
|
+
declare interface DifferenceLineChartDataType {
|
|
81
|
+
date: number | string;
|
|
82
|
+
y1: number;
|
|
83
|
+
y2: number;
|
|
84
|
+
data?: object;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare interface HighlightAreaSettingsDataType {
|
|
88
|
+
coordinates: [number | string | null, number | string | null];
|
|
89
|
+
style?: React.CSSProperties;
|
|
90
|
+
className?: string;
|
|
91
|
+
color?: string;
|
|
92
|
+
strokeWidth?: number;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
|
|
96
|
+
|
|
97
|
+
declare interface Props {
|
|
98
|
+
/** Array of data objects */
|
|
99
|
+
data: DifferenceLineChartDataType[];
|
|
100
|
+
/** Title of the graph */
|
|
101
|
+
graphTitle?: string | React.ReactNode;
|
|
102
|
+
/** Description of the graph */
|
|
103
|
+
graphDescription?: string | React.ReactNode;
|
|
104
|
+
/** Footnote for the graph */
|
|
105
|
+
footNote?: string | React.ReactNode;
|
|
106
|
+
/** Source data for the graph */
|
|
107
|
+
sources?: SourcesDataType[];
|
|
108
|
+
/** Accessibility label */
|
|
109
|
+
ariaLabel?: string;
|
|
110
|
+
/** Array of colors for the 2 lines */
|
|
111
|
+
lineColors?: [string, string];
|
|
112
|
+
/** Array of colors to highlight the negative and positive difference between the lines */
|
|
113
|
+
diffAreaColors?: [string, string];
|
|
114
|
+
/** Toggle the visibility of color legend between the top of the graphs and next to the line */
|
|
115
|
+
showColorLegendAtTop?: boolean;
|
|
116
|
+
/** Title for the color legend */
|
|
117
|
+
colorLegendTitle?: string;
|
|
118
|
+
/** Background color of the graph */
|
|
119
|
+
backgroundColor?: string | boolean;
|
|
120
|
+
/** Custom styles for the graph. Each object should be a valid React CSS style object. */
|
|
121
|
+
styles?: StyleObject;
|
|
122
|
+
/** Custom class names */
|
|
123
|
+
classNames?: ClassNameObject;
|
|
124
|
+
/** Width of the graph */
|
|
125
|
+
width?: number;
|
|
126
|
+
/** Height of the graph */
|
|
127
|
+
height?: number;
|
|
128
|
+
/** Minimum height of the graph */
|
|
129
|
+
minHeight?: number;
|
|
130
|
+
/** Relative height scaling factor. This overwrites the height props */
|
|
131
|
+
relativeHeight?: number;
|
|
132
|
+
/** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */
|
|
133
|
+
padding?: string;
|
|
134
|
+
/** Left margin of the graph */
|
|
135
|
+
leftMargin?: number;
|
|
136
|
+
/** Right margin of the graph */
|
|
137
|
+
rightMargin?: number;
|
|
138
|
+
/** Top margin of the graph */
|
|
139
|
+
topMargin?: number;
|
|
140
|
+
/** Bottom margin of the graph */
|
|
141
|
+
bottomMargin?: number;
|
|
142
|
+
/** Prefix for values */
|
|
143
|
+
prefix?: string;
|
|
144
|
+
/** Suffix for values */
|
|
145
|
+
suffix?: string;
|
|
146
|
+
/** Maximum value for the chart */
|
|
147
|
+
maxValue?: number;
|
|
148
|
+
/** Minimum value for the chart */
|
|
149
|
+
minValue?: number;
|
|
150
|
+
/** Maximum value of the date for the chart */
|
|
151
|
+
maxDate?: string | number;
|
|
152
|
+
/** Minimum value of the date for the chart */
|
|
153
|
+
minDate?: string | number;
|
|
154
|
+
/** Reference values for comparison */
|
|
155
|
+
refValues?: ReferenceDataType[];
|
|
156
|
+
/** No. of ticks on the x-axis */
|
|
157
|
+
noOfXTicks?: number;
|
|
158
|
+
/** No. of ticks on the y-axis */
|
|
159
|
+
noOfYTicks?: number;
|
|
160
|
+
/** Toggle visibility of values */
|
|
161
|
+
showValues?: boolean;
|
|
162
|
+
/** Toggle visibility of dots on the line */
|
|
163
|
+
showDots?: boolean;
|
|
164
|
+
/** Stroke width of the line */
|
|
165
|
+
strokeWidth?: number;
|
|
166
|
+
/** Toggle the initial animation of the line. If the type is number then it uses the number as the time in seconds for animation. */
|
|
167
|
+
animate?: boolean | AnimateDataType;
|
|
168
|
+
/** Labels for the lines */
|
|
169
|
+
labels: [string, string];
|
|
170
|
+
/** Format of the date in the data object. Available formats can be found [here](https://date-fns.org/docs/format) */
|
|
171
|
+
dateFormat?: string;
|
|
172
|
+
/** Title for the Y-axis */
|
|
173
|
+
yAxisTitle?: string;
|
|
174
|
+
/** Annotations on the chart */
|
|
175
|
+
annotations?: AnnotationSettingsDataType[];
|
|
176
|
+
/** Highlighted area(square) on the chart */
|
|
177
|
+
highlightAreaSettings?: HighlightAreaSettingsDataType[];
|
|
178
|
+
/** Highlighted area(custom shape) on the chart */
|
|
179
|
+
customHighlightAreaSettings?: CustomHighlightAreaSettingsDataType[];
|
|
180
|
+
/** Curve type for the line */
|
|
181
|
+
curveType?: CurveTypes;
|
|
182
|
+
/** Specifies the number of decimal places to display in the value. */
|
|
183
|
+
precision?: number;
|
|
184
|
+
/** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */
|
|
185
|
+
customLayers?: CustomLayerDataType[];
|
|
186
|
+
/** Enable graph download option as png */
|
|
187
|
+
graphDownload?: boolean;
|
|
188
|
+
/** Enable data download option as a csv */
|
|
189
|
+
dataDownload?: boolean;
|
|
190
|
+
/** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */
|
|
191
|
+
tooltip?: string | ((_d: any) => React.ReactNode);
|
|
192
|
+
/** Callback for mouse over event */
|
|
193
|
+
onSeriesMouseOver?: (_d: any) => void;
|
|
194
|
+
/** Language setting */
|
|
195
|
+
language?: Languages;
|
|
196
|
+
/** Color theme */
|
|
197
|
+
theme?: 'light' | 'dark';
|
|
198
|
+
/** Unique ID for the graph */
|
|
199
|
+
graphID?: string;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
declare interface ReferenceDataType {
|
|
203
|
+
value: number | null;
|
|
204
|
+
text: string;
|
|
205
|
+
color?: string;
|
|
206
|
+
styles?: {
|
|
207
|
+
line?: React.CSSProperties;
|
|
208
|
+
text?: React.CSSProperties;
|
|
209
|
+
};
|
|
210
|
+
classNames?: {
|
|
211
|
+
line?: string;
|
|
212
|
+
text?: string;
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
declare interface SourcesDataType {
|
|
217
|
+
source: string;
|
|
218
|
+
link?: string;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
declare interface StyleObject {
|
|
222
|
+
title?: React.CSSProperties;
|
|
223
|
+
footnote?: React.CSSProperties;
|
|
224
|
+
source?: React.CSSProperties;
|
|
225
|
+
description?: React.CSSProperties;
|
|
226
|
+
graphContainer?: React.CSSProperties;
|
|
227
|
+
tooltip?: React.CSSProperties;
|
|
228
|
+
xAxis?: AxesStyleObject;
|
|
229
|
+
yAxis?: AxesStyleObject;
|
|
230
|
+
graphObjectValues?: React.CSSProperties;
|
|
231
|
+
dataConnectors?: React.CSSProperties;
|
|
232
|
+
mouseOverLine?: React.CSSProperties;
|
|
233
|
+
regLine?: React.CSSProperties;
|
|
234
|
+
dataCards?: React.CSSProperties;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export { }
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-BHm2KTjD-D8FylaKc.cjs"),y=require("react"),G=require("./Typography-CDR-DAHH.cjs"),m=require("./parse-hMnG_lRV.cjs"),Tt=require("./index-BzeLQvXk.cjs"),bt=require("./numberFormattingFunction.js"),Mt=require("./Tooltip-BM18N_3l.cjs"),T=require("./checkIfNullOrUndefined.js"),At=require("./customArea-B47Ew5cT.cjs"),Ft=require("./AxisTitle-BY8MI9jC.cjs"),Pt=require("./Axis-BlyBRMNw.cjs"),Gt=require("./XTicksAndGridLines-DuK35ROS.cjs"),Ht=require("./ReferenceLine-Bsb5jeE4.cjs"),Wt=require("./YTicksAndGridLines-CtLvzExe.cjs"),Yt=require("./index-BYroABPm.cjs"),d=require("./use-in-view-Dl1CsAIo.cjs"),Xt=require("./time-Byw_jYQ7.cjs"),Ut=require("./linear-BVckp9RD.cjs"),Ct=require("./line-DHV4JwCR.cjs"),ht=require("./step-BZ3C8QFW.cjs"),Ot=require("./area-D3Qx7k7K.cjs"),Bt=require("./select-Bnfk0lJx.cjs"),zt=require("./init-DU0ybBc_.cjs"),Kt=require("./pointer-Dkq5NV1q.cjs"),Jt=require("./GraphFooter.js"),Qt=require("./GraphHeader.js"),Zt=require("./ColorLegend.js"),dt=require("./Colors.js"),_t=require("./generateRandomString-B5zBiJzS.cjs"),te=require("./EmptyState-BQguKAp5.cjs");function ee(yt){const{data:I,width:O,height:H,lineColors:f,suffix:V,prefix:w,dateFormat:r,showValues:l,noOfXTicks:K,rightMargin:gt,leftMargin:R,topMargin:ft,bottomMargin:J,tooltip:W,highlightAreaSettings:N,onSeriesMouseOver:Y,animate:n,rtl:Q,showColorLegendAtTop:jt,colorDomain:M,diffAreaColors:Z,idSuffix:E,strokeWidth:_,showDots:tt,refValues:X,minValue:k,maxValue:U,annotations:L,customHighlightAreaSettings:F,yAxisTitle:B,noOfYTicks:et,minDate:it,maxDate:nt,curveType:P,styles:p,classNames:h,precision:$,customLayers:at}=yt,st=y.useRef(null),o=d.useInView(st,{once:n.once,amount:n.amount}),[c,wt]=y.useState(!1);y.useEffect(()=>{if(o&&!c){const t=setTimeout(()=>{wt(!0)},(n.duration+.5)*1e3);return()=>clearTimeout(t)}},[o,c,n.duration]);const S=P==="linear"?Ct.curveLinear:P==="step"?ht.curveStep:P==="stepAfter"?ht.stepAfter:P==="stepBefore"?ht.stepBefore:ht.monotoneX,[q,rt]=y.useState(void 0),[ot,lt]=y.useState(void 0),[b,A]=y.useState(void 0),j={top:ft,bottom:J,left:B?R+30:R,right:gt},ct=y.useRef(null),e=Tt.sortBy(I.map(t=>({...t,date:m.parse(`${t.date}`,r,new Date)})),"date"),xt=N.map(t=>({...t,coordinates:[t.coordinates[0]===null?null:m.parse(`${t.coordinates[0]}`,r,new Date),t.coordinates[1]===null?null:m.parse(`${t.coordinates[1]}`,r,new Date)]})),ut=F.map(t=>({...t,coordinates:t.coordinates.map((v,D)=>D%2===0?m.parse(`${v}`,r,new Date):v)})),x=O-j.left-j.right,g=H-j.top-j.bottom,mt=it?m.parse(`${it}`,r,new Date):e[0].date,u=nt?m.parse(`${nt}`,r,new Date):e[e.length-1].date,z=Math.min(...e.map(t=>t.y1))!==1/0?Math.min(...e.map(t=>t.y1))>0?0:Math.min(...e.map(t=>t.y1)):0,Nt=Math.min(...e.map(t=>t.y2))!==1/0?Math.min(...e.map(t=>t.y2))>0?0:Math.min(...e.map(t=>t.y2)):0,Dt=Math.max(...e.map(t=>t.y1))!==1/0?Math.max(...e.map(t=>t.y1)):0,It=Math.max(...e.map(t=>t.y2))!==1/0?Math.max(...e.map(t=>t.y2)):0,C=T.checkIfNullOrUndefined(k)?z<Nt?z:Nt:k,vt=Dt>It?Dt:It,a=Xt.time().domain([mt,u]).range([0,x]),s=Ut.linear().domain([T.checkIfNullOrUndefined(k)?C:k,T.checkIfNullOrUndefined(U)?vt>0?vt:0:U]).range([g,0]).nice(),Rt=Ct.line().x(t=>a(t.date)).y(t=>s(t.y1)).curve(S),Vt=Ct.line().x(t=>a(t.date)).y(t=>s(t.y2)).curve(S),kt=Ot.area().x(t=>a(t.date)).y1(t=>s(t.y1)).y0(t=>s(t.y2)).curve(S),St=Ot.area().x(t=>a(t.date)).y1(t=>s(t.y1)).y0(0).curve(S),qt=Ot.area().x(t=>a(t.date)).y1(t=>s(t.y2)).y0(0).curve(S),Lt=s.ticks(et),$t=a.ticks(K);return y.useEffect(()=>{const t=D=>{const pt=e[zt.bisectCenter(e.map(Et=>Et.date),a.invert(Kt.pointer(D)[0]),1)];rt(pt||e[e.length-1]),Y?.(pt||e[e.length-1]),A(D.clientY),lt(D.clientX)},v=()=>{rt(void 0),lt(void 0),A(void 0),Y?.(void 0)};Bt.select(ct.current).on("mousemove",t).on("mouseout",v)},[a,e,Y]),i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(d.motion.svg,{width:`${O}px`,height:`${H}px`,viewBox:`0 0 ${O} ${H}`,direction:"ltr",ref:st,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${j.left},${j.top})`,children:[i.jsxRuntimeExports.jsx("clipPath",{id:`above${E}`,children:i.jsxRuntimeExports.jsx("path",{d:qt(e),style:{fill:"none"}})}),i.jsxRuntimeExports.jsx("clipPath",{id:`below${E}`,children:i.jsxRuntimeExports.jsx("path",{d:St(e),style:{fill:"none"}})}),i.jsxRuntimeExports.jsx(Yt.HighlightArea,{areaSettings:xt,width:x,height:g,scale:a,animate:n,isInView:o}),i.jsxRuntimeExports.jsx(At.CustomArea,{areaSettings:ut,scaleX:a,scaleY:s,animate:n,isInView:o}),i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(Wt.YTicksAndGridLines,{values:Lt.filter(t=>t!==0),y:Lt.filter(t=>t!==0).map(t=>s(t)),x1:0-R,x2:x+j.right,styles:{gridLines:p?.yAxis?.gridLines,labels:p?.yAxis?.labels},classNames:{gridLines:h?.yAxis?.gridLines,labels:h?.yAxis?.labels},suffix:V,prefix:w,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:$}),i.jsxRuntimeExports.jsx(Pt.Axis,{y1:s(C<0?0:C),y2:s(C<0?0:C),x1:0-R,x2:x+j.right,label:bt.numberFormattingFunction(C<0?0:C,"NA",$,w,V),labelPos:{x:0-R,y:s(C<0?0:C),dx:0,dy:vt<0?"1rem":-5},classNames:{axis:h?.xAxis?.axis,label:h?.yAxis?.labels},styles:{axis:p?.xAxis?.axis,label:p?.yAxis?.labels}}),i.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:0-R-15,y:g/2,style:p?.yAxis?.title,className:h?.yAxis?.title,text:B,rotate90:!0})]})}),i.jsxRuntimeExports.jsx(Gt.XTicksAndGridLines,{values:$t.map(t=>m.format(t,r)),x:$t.map(t=>a(t)),y1:0,y2:g,styles:{gridLines:p?.xAxis?.gridLines,labels:p?.xAxis?.labels},classNames:{gridLines:G.cnExports.cn("opacity-0",h?.xAxis?.gridLines),labels:G.cnExports.cn("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",h?.xAxis?.labels)},suffix:V,prefix:w,labelType:"primary",showGridLines:!0,precision:$}),at.filter(t=>t.position==="before").map(t=>t.layer),i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(d.motion.path,{clipPath:`url(#below${E})`,d:kt(e)||"",style:{fill:Z[1]},exit:{opacity:0,transition:{duration:n.duration}},variants:{initial:{opacity:1},whileInView:{opacity:1,transition:{duration:n.duration}}},initial:"initial",animate:o?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(d.motion.path,{clipPath:`url(#above${E})`,d:kt(e)||"",style:{fill:Z[0]},exit:{opacity:0,transition:{duration:n.duration}},variants:{initial:{opacity:0},whileInView:{opacity:1,transition:{duration:n.duration}}},initial:"initial",animate:o?"whileInView":"initial"})]}),i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(d.motion.path,{d:Rt(e)||"",style:{fill:"none",stroke:f[0],strokeWidth:_},exit:{opacity:0,transition:{duration:n.duration}},variants:{initial:{pathLength:0,d:Rt(e)||"",opacity:1},whileInView:{pathLength:1,d:Rt(e)||"",opacity:1,transition:{duration:n.duration}}},initial:"initial",animate:o?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(d.motion.path,{style:{fill:"none",stroke:f[1],strokeWidth:_},exit:{opacity:0,transition:{duration:n.duration}},variants:{initial:{pathLength:0,d:Vt(e)||"",opacity:1},whileInView:{pathLength:1,d:Vt(e)||"",opacity:1,transition:{duration:n.duration}}},initial:"initial",animate:o?"whileInView":"initial"}),jt?null:i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(d.motion.text,{style:{fill:f[0]},className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:n.duration}},variants:{initial:{opacity:0,x:a(e[e.length-1].date),y:s(e[e.length-1].y1)},whileInView:{opacity:1,x:a(e[e.length-1].date),y:s(e[e.length-1].y1),transition:{duration:c?n.duration:.5,delay:c?0:n.duration}}},initial:"initial",animate:o?"whileInView":"initial",children:M[0]},M[0]),i.jsxRuntimeExports.jsx(d.motion.text,{style:{fill:f[1]},className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:n.duration}},variants:{initial:{opacity:0,x:a(e[e.length-1].date),y:s(e[e.length-1].y2)},whileInView:{opacity:1,x:a(e[e.length-1].date),y:s(e[e.length-1].y2),transition:{duration:c?n.duration:.5,delay:c?0:n.duration}}},initial:"initial",animate:o?"whileInView":"initial",children:M[1]},M[1])]}),q?i.jsxRuntimeExports.jsx("line",{y1:0,y2:g,x1:a(q.date),x2:a(q.date),className:G.cnExports.cn("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",h?.mouseOverLine),style:p?.mouseOverLine}):null,e.map((t,v)=>i.jsxRuntimeExports.jsxs(d.motion.g,{children:[T.checkIfNullOrUndefined(t.y1)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[tt?i.jsxRuntimeExports.jsx(d.motion.circle,{r:x/e.length<5?0:x/e.length<20?2:4,style:{fill:f[0]},exit:{opacity:0,transition:{duration:n.duration}},variants:{initial:{opacity:0,cx:a(t.date),cy:s(t.y1)},whileInView:{opacity:1,transition:{duration:.5,delay:n.duration},cx:a(t.date),cy:s(t.y1)}},initial:"initial",animate:o?"whileInView":"initial"}):null,l?i.jsxRuntimeExports.jsx(d.motion.text,{dy:t.y2<t.y1?-8:"1em",style:{fill:f[0],textAnchor:"middle",...p?.graphObjectValues||{}},className:G.cnExports.cn("graph-value graph-value-line-1 text-xs font-bold",h?.graphObjectValues),exit:{opacity:0,transition:{duration:n.duration}},variants:{initial:{opacity:0,x:a(t.date),y:s(t.y1)},whileInView:{opacity:1,x:a(t.date),y:s(t.y1),transition:{duration:c?n.duration:.5,delay:c?0:n.duration}}},initial:"initial",animate:o?"whileInView":"initial",children:bt.numberFormattingFunction(t.y1,"NA",$,w,V)}):null]}),T.checkIfNullOrUndefined(t.y2)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[tt?i.jsxRuntimeExports.jsx(d.motion.circle,{r:x/e.length<5?0:x/e.length<20?2:4,style:{fill:f[1]},exit:{opacity:0,transition:{duration:n.duration}},variants:{initial:{opacity:0,cx:a(t.date),cy:s(t.y2)},whileInView:{opacity:1,transition:{duration:c?n.duration:.5,delay:c?0:n.duration},cx:a(t.date),cy:s(t.y2)}},initial:"initial",animate:o?"whileInView":"initial"}):null,l?i.jsxRuntimeExports.jsx(d.motion.text,{dy:t.y2>t.y1?-8:"1em",style:{fill:f[1],textAnchor:"middle",...p?.graphObjectValues||{}},className:G.cnExports.cn("graph-value graph-value-line-2 text-xs font-bold",h?.graphObjectValues),exit:{opacity:0,transition:{duration:n.duration}},variants:{initial:{opacity:0,x:a(t.date),y:s(t.y2)},whileInView:{opacity:1,x:a(t.date),y:s(t.y2),transition:{duration:c?n.duration:.5,delay:c?0:n.duration}}},initial:"initial",animate:o?"whileInView":"initial",children:bt.numberFormattingFunction(t.y2,"NA",$,w,V)}):null]})]},v))]}),X?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:X.map((t,v)=>i.jsxRuntimeExports.jsx(Ht.RefLineY,{text:t.text,color:t.color,y:s(t.value),x1:0-R,x2:x+j.right,classNames:t.classNames,styles:t.styles,animate:n,isInView:o},v))}):null,i.jsxRuntimeExports.jsx("g",{children:L.map((t,v)=>{const D=At.getLineEndPoint({x:t.xCoordinate?a(m.parse(`${t.xCoordinate}`,r,new Date))+(t.xOffset||0):0+(t.xOffset||0),y:t.yCoordinate?s(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8},{x:t.xCoordinate?a(m.parse(`${t.xCoordinate}`,r,new Date)):0,y:t.yCoordinate?s(t.yCoordinate):0},T.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius),pt=t.showConnector?{y1:D.y,x1:D.x,y2:t.yCoordinate?s(t.yCoordinate)+(t.yOffset||0):0+(t.yOffset||0),x2:t.xCoordinate?a(m.parse(`${t.xCoordinate}`,r,new Date))+(t.xOffset||0):0+(t.xOffset||0),cy:t.yCoordinate?s(t.yCoordinate):0,cx:t.xCoordinate?a(m.parse(`${t.xCoordinate}`,r,new Date)):0,circleRadius:T.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius,strokeWidth:t.showConnector===!0?2:Math.min(t.showConnector||0,1)}:void 0,Et={y:t.yCoordinate?s(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8,x:Q?0:t.xCoordinate?a(m.parse(`${t.xCoordinate}`,r,new Date))+(t.xOffset||0):0+(t.xOffset||0),width:Q?t.xCoordinate?a(m.parse(`${t.xCoordinate}`,r,new Date))+(t.xOffset||0):0+(t.xOffset||0):x-(t.xCoordinate?a(m.parse(`${t.xCoordinate}`,r,new Date))+(t.xOffset||0):0+(t.xOffset||0)),maxWidth:t.maxWidth,fontWeight:t.fontWeight,align:t.align};return i.jsxRuntimeExports.jsx(At.Annotation,{color:t.color,connectorsSettings:pt,labelSettings:Et,text:t.text,classNames:t.classNames,styles:t.styles,animate:n,isInView:o},v)})}),at.filter(t=>t.position==="after").map(t=>t.layer),i.jsxRuntimeExports.jsx("rect",{ref:ct,style:{fill:"none",pointerEvents:"all"},width:x,height:g})]})}),q&&W&&ot&&b?i.jsxRuntimeExports.jsx(Mt.Tooltip,{data:q,body:W,xPos:ot,yPos:b,backgroundStyle:p?.tooltip,className:h?.tooltip}):null]})}function ie(yt){const{data:I,graphTitle:O,suffix:H="",sources:f,prefix:V="",graphDescription:w,height:r,width:l,footNote:K,noOfXTicks:gt=10,dateFormat:R="yyyy",showValues:ft=!1,padding:J,lineColors:W=[dt.Colors.light.categoricalColors.colors[0],dt.Colors.light.categoricalColors.colors[1]],backgroundColor:N=!1,leftMargin:Y=30,rightMargin:n=50,topMargin:Q=20,bottomMargin:jt=25,tooltip:M,highlightAreaSettings:Z=[],relativeHeight:E,onSeriesMouseOver:_,graphID:tt,graphDownload:X=!1,dataDownload:k=!1,animate:U=!1,language:L="en",minHeight:F=0,labels:B,showColorLegendAtTop:et=!1,colorLegendTitle:it,diffAreaColors:nt=[dt.Colors.alerts.red,dt.Colors.alerts.darkGreen],strokeWidth:P=2,showDots:p=!0,refValues:h=[],minValue:$,maxValue:at,annotations:st=[],customHighlightAreaSettings:o=[],theme:c="light",ariaLabel:wt,yAxisTitle:S,noOfYTicks:q=5,minDate:rt,maxDate:ot,curveType:lt="curve",styles:b,classNames:A,precision:j=2,customLayers:ct=[]}=yt,[e,xt]=y.useState(0),[ut,x]=y.useState(0),g=y.useRef(null),mt=y.useRef(null);return y.useEffect(()=>{const u=new ResizeObserver(z=>{xt(l||z[0].target.clientWidth||620),x(r||z[0].target.clientHeight||480)});return g.current&&(x(g.current.clientHeight||480),xt(g.current.clientWidth||620),l||u.observe(g.current)),()=>u.disconnect()},[l,r]),i.jsxRuntimeExports.jsx("div",{className:`${c||"light"} flex ${l?"w-fit grow-0":"w-full grow"}`,dir:L==="he"||L==="ar"?"rtl":void 0,children:i.jsxRuntimeExports.jsx("div",{className:G.cnExports.cn(`${N?N===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${L||"en"}`,A?.graphContainer),style:{...b?.graphContainer||{},...N&&N!==!0?{backgroundColor:N}:{}},id:tt,ref:mt,"aria-label":wt||`${O?`The graph shows ${O}. `:""}This is a line chart that highlights the difference between two datasets over time.${w?` ${w}`:""}`,children:i.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:N?J||"1rem":J||0},children:i.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[O||w||X||k?i.jsxRuntimeExports.jsx(Qt.GraphHeader,{styles:{title:b?.title,description:b?.description},classNames:{title:A?.title,description:A?.description},graphTitle:O,graphDescription:w,width:l,graphDownload:X?mt.current:void 0,dataDownload:k?I.map(u=>u.data).filter(u=>u!==void 0).length>0?I.map(u=>u.data).filter(u=>u!==void 0):I.filter(u=>u!==void 0):null}):null,i.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:I.length===0?i.jsxRuntimeExports.jsx(te.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[et?i.jsxRuntimeExports.jsx(Zt.ColorLegend,{colorDomain:B,colorLegendTitle:it,colors:W,showNAColor:!1}):null,i.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:g,"aria-label":"Graph area",children:(l||e)&&(r||ut)?i.jsxRuntimeExports.jsx(ee,{data:I,lineColors:W,colorDomain:B,width:l||e,height:Math.max(F,r||(E?F?(l||e)*E>F?(l||e)*E:F:(l||e)*E:ut)),suffix:H,prefix:V,dateFormat:R,showValues:ft,noOfXTicks:gt,leftMargin:Y,rightMargin:n,topMargin:Q,bottomMargin:jt,highlightAreaSettings:Z,tooltip:M,onSeriesMouseOver:_,showColorLegendAtTop:et,animate:U===!0?{duration:.5,once:!0,amount:.5}:U||{duration:0,once:!0,amount:0},rtl:L==="he"||L==="ar",diffAreaColors:nt,idSuffix:_t.generateRandomString(8),strokeWidth:P,showDots:p,refValues:h,minValue:$,maxValue:at,annotations:st,customHighlightAreaSettings:o,yAxisTitle:S,noOfYTicks:q,minDate:rt,maxDate:ot,curveType:lt,styles:b,classNames:A,precision:j,customLayers:ct}):null})]})}),f||K?i.jsxRuntimeExports.jsx(Jt.GraphFooter,{styles:{footnote:b?.footnote,source:b?.source},classNames:{footnote:A?.footnote,source:A?.source},sources:f,footNote:K,width:l}):null]})})})})}exports.DifferenceLineChart=ie;
|
|
2
|
+
//# sourceMappingURL=DifferenceLineChart.js.map
|