@splunk/visualizations 28.7.0 → 28.9.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/Area.config.js +2 -4
- package/Area.config.js.map +2 -2
- package/Area.js +245 -147
- package/Area.js.map +4 -4
- package/Bar.config.js +2 -4
- package/Bar.config.js.map +2 -2
- package/Bar.js +246 -148
- package/Bar.js.map +4 -4
- package/Bubble/Bubble.d.ts +3 -1
- package/Bubble/Bubble.d.ts.map +1 -1
- package/Bubble.js +216 -108
- package/Bubble.js.map +4 -4
- package/CHANGELOG.external.md +56 -0
- package/ChoroplethSvg/ChoroplethSvg.d.ts +3 -1
- package/ChoroplethSvg/ChoroplethSvg.d.ts.map +1 -1
- package/ChoroplethSvg/PureChoroplethSvg/PureChoroplethSvg.d.ts.map +1 -1
- package/ChoroplethSvg/PureChoroplethSvg/SvgMutator.d.ts.map +1 -1
- package/ChoroplethSvg.js +638 -209
- package/ChoroplethSvg.js.map +4 -4
- package/Column.config.js +2 -4
- package/Column.config.js.map +2 -2
- package/Column.js +246 -148
- package/Column.js.map +4 -4
- package/Ellipse/Ellipse.d.ts +3 -1
- package/Ellipse/Ellipse.d.ts.map +1 -1
- package/Ellipse.js +216 -105
- package/Ellipse.js.map +4 -4
- package/Events/Events.d.ts +5 -3
- package/Events/Events.d.ts.map +1 -1
- package/Events/PureEvents/FieldSummaryTooltip.d.ts.map +1 -1
- package/Events/PureEvents/PureEvents.d.ts +0 -1
- package/Events/PureEvents/PureEvents.d.ts.map +1 -1
- package/Events.js +270 -157
- package/Events.js.map +4 -4
- package/FillerGauge.js +251 -143
- package/FillerGauge.js.map +4 -4
- package/Image/Image.d.ts +3 -1
- package/Image/Image.d.ts.map +1 -1
- package/Image.js +217 -106
- package/Image.js.map +4 -4
- package/Line.config.js +2 -4
- package/Line.config.js.map +2 -2
- package/Line.js +246 -148
- package/Line.js.map +4 -4
- package/LinkGraph/LinkGraph.d.ts +3 -1
- package/LinkGraph/LinkGraph.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/components/Node.d.ts.map +1 -1
- package/LinkGraph.config.js +1 -1
- package/LinkGraph.config.js.map +2 -2
- package/LinkGraph.js +802 -682
- package/LinkGraph.js.map +4 -4
- package/Map/Map.d.ts +10 -9
- package/Map/Map.d.ts.map +1 -1
- package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
- package/Map/PureMap/ClusterLayer.d.ts.map +1 -1
- package/Map/PureMap/MapUtils.d.ts.map +1 -1
- package/Map/PureMap/MarkerWrapper.d.ts.map +1 -1
- package/Map/PureMap/PureMap.d.ts +8 -65
- package/Map/PureMap/PureMap.d.ts.map +1 -1
- package/Map.config.js +1 -1
- package/Map.config.js.map +2 -2
- package/Map.js +363 -313
- package/Map.js.map +4 -4
- package/Markdown/Markdown.d.ts +9 -1
- package/Markdown/Markdown.d.ts.map +1 -1
- package/Markdown/config.d.ts.map +1 -1
- package/Markdown.config.js +6 -1
- package/Markdown.config.js.map +2 -2
- package/Markdown.js +226 -95
- package/Markdown.js.map +3 -3
- package/MarkerGauge.js +247 -137
- package/MarkerGauge.js.map +4 -4
- package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts +1 -0
- package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/components/Node.d.ts +1 -0
- package/NetworkGraph/PureNetworkGraph/components/Node.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts +3 -5
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -1
- package/NetworkGraph.config.js +4 -2
- package/NetworkGraph.config.js.map +2 -2
- package/NetworkGraph.js +327 -188
- package/NetworkGraph.js.map +4 -4
- package/ParallelCoordinates/ParallelCoordinates.d.ts +3 -1
- package/ParallelCoordinates/ParallelCoordinates.d.ts.map +1 -1
- package/ParallelCoordinates.js +239 -128
- package/ParallelCoordinates.js.map +4 -4
- package/Pie/config.d.ts.map +1 -1
- package/Pie/pieUtils.d.ts.map +1 -1
- package/Pie.config.js +4 -2
- package/Pie.config.js.map +2 -2
- package/Pie.js +228 -125
- package/Pie.js.map +3 -3
- package/ProcessTree/ProcessTree.d.ts +3 -1
- package/ProcessTree/ProcessTree.d.ts.map +1 -1
- package/ProcessTree/PureProcessTree/PureProcessTree.d.ts +1 -0
- package/ProcessTree/PureProcessTree/PureProcessTree.d.ts.map +1 -1
- package/ProcessTree/PureProcessTree/components/ProcessTreeLeftPanel.d.ts +1 -0
- package/ProcessTree/PureProcessTree/components/ProcessTreeLeftPanel.d.ts.map +1 -1
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts +2 -1
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts.map +1 -1
- package/ProcessTree/PureProcessTree/utils/iconLoader.d.ts +2 -0
- package/ProcessTree/PureProcessTree/utils/iconLoader.d.ts.map +1 -1
- package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts +5 -1
- package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts.map +1 -1
- package/ProcessTree.js +435 -192
- package/ProcessTree.js.map +4 -4
- package/Punchcard/Punchcard.d.ts +3 -1
- package/Punchcard/Punchcard.d.ts.map +1 -1
- package/Punchcard.js +238 -129
- package/Punchcard.js.map +4 -4
- package/Rectangle/Rectangle.d.ts +3 -1
- package/Rectangle/Rectangle.d.ts.map +1 -1
- package/Rectangle.js +218 -116
- package/Rectangle.js.map +4 -4
- package/RichText/PureRichText/Editor/EditorPanel.d.ts +1 -4
- package/RichText/PureRichText/Editor/EditorPanel.d.ts.map +1 -1
- package/RichText/PureRichText/Editor/hooks/useConfigPanelFocus.d.ts +14 -0
- package/RichText/PureRichText/Editor/hooks/useConfigPanelFocus.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/hooks/useEditorPanelSync.d.ts +15 -0
- package/RichText/PureRichText/Editor/hooks/useEditorPanelSync.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/hooks/useLinkHandlers.d.ts.map +1 -1
- package/RichText/PureRichText/Editor/hooks/usePortalTarget.d.ts +9 -0
- package/RichText/PureRichText/Editor/hooks/usePortalTarget.d.ts.map +1 -0
- package/RichText/PureRichText/InnerEditor.d.ts +20 -4
- package/RichText/PureRichText/InnerEditor.d.ts.map +1 -1
- package/RichText/PureRichText/PureRichText.d.ts +21 -9
- package/RichText/PureRichText/PureRichText.d.ts.map +1 -1
- package/RichText/PureRichText/PureRichTextContext.d.ts +3 -6
- package/RichText/PureRichText/PureRichTextContext.d.ts.map +1 -1
- package/RichText/PureRichText/RichTextStyles.d.ts +5 -4
- package/RichText/PureRichText/RichTextStyles.d.ts.map +1 -1
- package/RichText/PureRichText/activeInstance.d.ts +6 -7
- package/RichText/PureRichText/activeInstance.d.ts.map +1 -1
- package/RichText/PureRichText/config.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useContentSave.d.ts +6 -0
- package/RichText/PureRichText/hooks/useContentSave.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useContentSync.d.ts +13 -1
- package/RichText/PureRichText/hooks/useContentSync.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useDashboardKeyboardNav.d.ts +2 -7
- package/RichText/PureRichText/hooks/useDashboardKeyboardNav.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useEditorSetup.d.ts +8 -4
- package/RichText/PureRichText/hooks/useEditorSetup.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useFakeHighlight.d.ts +1 -16
- package/RichText/PureRichText/hooks/useFakeHighlight.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useFocusHandlers.d.ts +2 -4
- package/RichText/PureRichText/hooks/useFocusHandlers.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useKeyboardShortcuts.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useMouseHandlers.d.ts +3 -7
- package/RichText/PureRichText/hooks/useMouseHandlers.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useStepFontSize.d.ts +2 -2
- package/RichText/PureRichText/hooks/useStepLineSpacing.d.ts +2 -3
- package/RichText/PureRichText/hooks/useStepLineSpacing.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useTokenMap.d.ts +31 -40
- package/RichText/PureRichText/hooks/useTokenMap.d.ts.map +1 -1
- package/RichText/PureRichText/renderers/ElementRenderer.d.ts +2 -5
- package/RichText/PureRichText/renderers/ElementRenderer.d.ts.map +1 -1
- package/RichText/PureRichText/renderers/LeafRenderer.d.ts +0 -4
- package/RichText/PureRichText/renderers/LeafRenderer.d.ts.map +1 -1
- package/RichText/PureRichText/types.d.ts +21 -0
- package/RichText/PureRichText/types.d.ts.map +1 -1
- package/RichText/PureRichText/utils/slateUtils.d.ts +26 -2
- package/RichText/PureRichText/utils/slateUtils.d.ts.map +1 -1
- package/RichText/RichText.d.ts +5 -1
- package/RichText/RichText.d.ts.map +1 -1
- package/RichText/config.d.ts.map +1 -1
- package/RichText.config.js +19 -1
- package/RichText.config.js.map +2 -2
- package/RichText.js +2311 -835
- package/RichText.js.map +4 -4
- package/Sankey/PureSankey/PureSankey.d.ts +2 -0
- package/Sankey/PureSankey/PureSankey.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyLink.d.ts +3 -1
- package/Sankey/PureSankey/SankeyLink.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyNode.d.ts +5 -2
- package/Sankey/PureSankey/SankeyNode.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyUtils.d.ts.map +1 -1
- package/Sankey/Sankey.d.ts +3 -1
- package/Sankey/Sankey.d.ts.map +1 -1
- package/Sankey.js +508 -219
- package/Sankey.js.map +4 -4
- package/Scatter.config.js +3 -5
- package/Scatter.config.js.map +2 -2
- package/Scatter.js +244 -146
- package/Scatter.js.map +4 -4
- package/SingleValue/SingleValue.d.ts.map +1 -1
- package/SingleValue.js +273 -173
- package/SingleValue.js.map +4 -4
- package/SingleValueBasic.js +4 -4
- package/SingleValueBasic.js.map +2 -2
- package/SingleValueIcon/SingleValueIcon.d.ts.map +1 -1
- package/SingleValueIcon.js +264 -164
- package/SingleValueIcon.js.map +4 -4
- package/SingleValueRadial.js +267 -167
- package/SingleValueRadial.js.map +4 -4
- package/SparkLine/SparkLine.d.ts.map +1 -1
- package/SparkLine.js.map +2 -2
- package/Table/PureTable.d.ts +2 -0
- package/Table/PureTable.d.ts.map +1 -1
- package/Table/Table.d.ts +2 -5
- package/Table/Table.d.ts.map +1 -1
- package/Table/config.d.ts.map +1 -1
- package/Table/hooks.d.ts.map +1 -1
- package/Table.config.js +8 -1
- package/Table.config.js.map +2 -2
- package/Table.js +374 -270
- package/Table.js.map +4 -4
- package/Timeline/PureTimeline/PureTimeline.d.ts +6 -5
- package/Timeline/PureTimeline/PureTimeline.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/CursorPlugin.d.ts +1 -0
- package/Timeline/PureTimeline/src/CursorPlugin.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelineLegend.d.ts +10 -7
- package/Timeline/PureTimeline/src/TimelineLegend.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelineTooltip.d.ts +5 -1
- package/Timeline/PureTimeline/src/TimelineTooltip.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelineUplot.d.ts +19 -2
- package/Timeline/PureTimeline/src/TimelineUplot.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/XAxisPlugin.d.ts +1 -0
- package/Timeline/PureTimeline/src/XAxisPlugin.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +8 -0
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -1
- package/Timeline/Timeline.d.ts +3 -1
- package/Timeline/Timeline.d.ts.map +1 -1
- package/Timeline.config.js +2 -2
- package/Timeline.config.js.map +2 -2
- package/Timeline.js +713 -351
- package/Timeline.js.map +4 -4
- package/Treemap/PureTreemap/components/PureTreemap.d.ts +42 -0
- package/Treemap/PureTreemap/components/PureTreemap.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapBreadcrumb.d.ts +10 -0
- package/Treemap/PureTreemap/components/TreemapBreadcrumb.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapChildCell.d.ts +28 -0
- package/Treemap/PureTreemap/components/TreemapChildCell.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapHeader.d.ts +19 -0
- package/Treemap/PureTreemap/components/TreemapHeader.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapHoverTarget.d.ts +17 -0
- package/Treemap/PureTreemap/components/TreemapHoverTarget.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapLegend.d.ts +20 -0
- package/Treemap/PureTreemap/components/TreemapLegend.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapNode.d.ts +5 -0
- package/Treemap/PureTreemap/components/TreemapNode.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapParentNode.d.ts +10 -0
- package/Treemap/PureTreemap/components/TreemapParentNode.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapStandaloneNode.d.ts +6 -0
- package/Treemap/PureTreemap/components/TreemapStandaloneNode.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapTooltip.d.ts +17 -0
- package/Treemap/PureTreemap/components/TreemapTooltip.d.ts.map +1 -0
- package/Treemap/PureTreemap/mockdata/data.d.ts +90 -0
- package/Treemap/PureTreemap/mockdata/data.d.ts.map +1 -0
- package/Treemap/PureTreemap/utils/treemapColorUtils.d.ts +67 -0
- package/Treemap/PureTreemap/utils/treemapColorUtils.d.ts.map +1 -0
- package/Treemap/PureTreemap/utils/treemapDataColorUtils.d.ts +5 -0
- package/Treemap/PureTreemap/utils/treemapDataColorUtils.d.ts.map +1 -0
- package/Treemap/PureTreemap/utils/treemapDataUtils.d.ts +14 -0
- package/Treemap/PureTreemap/utils/treemapDataUtils.d.ts.map +1 -0
- package/Treemap/PureTreemap/utils/treemapLayout.d.ts +49 -0
- package/Treemap/PureTreemap/utils/treemapLayout.d.ts.map +1 -0
- package/Treemap/PureTreemap/utils/treemapNodeUtils.d.ts +81 -0
- package/Treemap/PureTreemap/utils/treemapNodeUtils.d.ts.map +1 -0
- package/Treemap/PureTreemap/utils/treemapTypes.d.ts +37 -0
- package/Treemap/PureTreemap/utils/treemapTypes.d.ts.map +1 -0
- package/Treemap/PureTreemap/utils/treemapUtils.d.ts +76 -0
- package/Treemap/PureTreemap/utils/treemapUtils.d.ts.map +1 -0
- package/Treemap/Treemap.d.ts +14 -0
- package/Treemap/Treemap.d.ts.map +1 -0
- package/Treemap/config.d.ts +4 -0
- package/Treemap/config.d.ts.map +1 -0
- package/Treemap/index.d.ts +3 -0
- package/Treemap/index.d.ts.map +1 -0
- package/Treemap.config.js +465 -0
- package/Treemap.config.js.map +7 -0
- package/Treemap.js +6349 -0
- package/Treemap.js.map +7 -0
- package/common/Charting.js +8 -10
- package/common/Charting.js.map +2 -2
- package/common/ChartingApi.d.ts.map +1 -1
- package/common/ChartingApi.js +5 -2
- package/common/ChartingApi.js.map +2 -2
- package/common/DocExampleWithVizSandbox.js +3 -3
- package/common/DocExampleWithVizSandbox.js.map +2 -2
- package/common/GaugeMajorTicks.js.map +2 -2
- package/common/GaugeValueMarker.js +1 -0
- package/common/GaugeValueMarker.js.map +2 -2
- package/common/OptionsDoc.js +1 -1
- package/common/OptionsDoc.js.map +2 -2
- package/common/OverviewDoc.js +3 -3
- package/common/OverviewDoc.js.map +2 -2
- package/common/ThemesDoc.js.map +2 -2
- package/common/TimeSeriesChartWrapper.js +10 -9
- package/common/TimeSeriesChartWrapper.js.map +2 -2
- package/common/chartingUtils.d.ts.map +1 -1
- package/common/chartingUtils.js +12 -11
- package/common/chartingUtils.js.map +2 -2
- package/common/components/IconPlaceholder.d.ts.map +1 -1
- package/common/docUtils.d.ts.map +1 -1
- package/common/docUtils.js +16 -14
- package/common/docUtils.js.map +2 -2
- package/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -1
- package/common/gaugeUtils.d.ts.map +1 -1
- package/common/gaugeUtils.js +11 -5
- package/common/gaugeUtils.js.map +2 -2
- package/common/hocs/FixedSizeContainer.d.ts.map +1 -1
- package/common/hooks/useDynamicHeight.d.ts +67 -0
- package/common/hooks/useDynamicHeight.d.ts.map +1 -0
- package/common/hooks/useSorting.d.ts.map +1 -1
- package/common/interfaces/VizCategory.d.ts +2 -1
- package/common/interfaces/VizCategory.d.ts.map +1 -1
- package/common/interfaces/VizEvent.d.ts +7 -0
- package/common/interfaces/VizEvent.d.ts.map +1 -1
- package/common/utils/dataUtils.d.ts.map +1 -1
- package/common/utils/dataUtils.js +6 -10
- package/common/utils/dataUtils.js.map +2 -2
- package/common/utils/featureFlagUtils.js +2 -2
- package/common/utils/featureFlagUtils.js.map +2 -2
- package/common/utils/focusUtils.js +1 -1
- package/common/utils/focusUtils.js.map +2 -2
- package/common/utils/mapUtils.d.ts.map +1 -1
- package/common/utils/mapUtils.js +14 -18
- package/common/utils/mapUtils.js.map +2 -2
- package/common/utils/singleValueUtils.js +22 -25
- package/common/utils/singleValueUtils.js.map +2 -2
- package/common/utils/textUtils.d.ts.map +1 -1
- package/common/utils/textUtils.js +37 -23
- package/common/utils/textUtils.js.map +2 -2
- package/common/utils/trellisUtils.d.ts.map +1 -1
- package/common/utils/trellisUtils.js +18 -17
- package/common/utils/trellisUtils.js.map +2 -2
- package/common/utils/urlUtils.js.map +2 -2
- package/common/utils/visualizationTheme.d.ts +15 -0
- package/common/utils/visualizationTheme.d.ts.map +1 -0
- package/common/utils/visualizationTheme.js +72 -0
- package/common/utils/visualizationTheme.js.map +7 -0
- package/common/withDashboardViz.d.ts +3 -1
- package/common/withDashboardViz.d.ts.map +1 -1
- package/common/withDashboardViz.js +216 -105
- package/common/withDashboardViz.js.map +4 -4
- package/docs-llm/INDEX.md +1 -0
- package/docs-llm/area/options.md +84 -84
- package/docs-llm/bar/options.md +77 -77
- package/docs-llm/bubble/options.md +51 -51
- package/docs-llm/choropleth-svg/options.md +5 -5
- package/docs-llm/column/options.md +82 -82
- package/docs-llm/ellipse/options.md +6 -6
- package/docs-llm/events/options.md +6 -6
- package/docs-llm/filler-gauge/options.md +16 -16
- package/docs-llm/image/options.md +3 -3
- package/docs-llm/line/options.md +82 -82
- package/docs-llm/link-graph/options.md +16 -16
- package/docs-llm/map/options.md +12 -12
- package/docs-llm/markdown/options.md +7 -7
- package/docs-llm/marker-gauge/options.md +16 -16
- package/docs-llm/network-graph/options.md +39 -39
- package/docs-llm/parallel-coordinates/options.md +4 -4
- package/docs-llm/pie/examples-json.md +195 -0
- package/docs-llm/pie/examples-react.md +123 -0
- package/docs-llm/pie/options.md +23 -23
- package/docs-llm/process-tree/options.md +23 -22
- package/docs-llm/punchcard/options.md +23 -23
- package/docs-llm/pure-rich-text/options.md +6 -5
- package/docs-llm/rectangle/options.md +9 -9
- package/docs-llm/rich-text/options.md +6 -5
- package/docs-llm/sankey/options.md +9 -9
- package/docs-llm/scatter/options.md +57 -57
- package/docs-llm/single-value/options.md +39 -39
- package/docs-llm/single-value-icon/options.md +33 -33
- package/docs-llm/single-value-radial/options.md +31 -31
- package/docs-llm/table/options.md +14 -13
- package/docs-llm/timeline/options.md +17 -17
- package/docs-llm/treemap/examples-json.md +5 -0
- package/docs-llm/treemap/examples-react.md +5 -0
- package/docs-llm/treemap/options.md +26 -0
- package/docs-llm/treemap/overview.md +27 -0
- package/package.json +31 -30
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DataColorLegendConfig, TreemapDataColorValue } from '../utils/treemapUtils';
|
|
3
|
+
import type { TreemapAdditionalTooltipField, TreemapDataColumn } from '../utils/treemapTypes';
|
|
4
|
+
export declare const DEFAULT_CHART_WIDTH = 600;
|
|
5
|
+
export declare const DEFAULT_CHART_HEIGHT = 400;
|
|
6
|
+
export declare const CHART_MIN_WIDTH = 200;
|
|
7
|
+
export declare const CHART_MIN_HEIGHT = 150;
|
|
8
|
+
export interface PureTreemapProps {
|
|
9
|
+
parent?: TreemapDataColumn;
|
|
10
|
+
nodeIds?: TreemapDataColumn;
|
|
11
|
+
nodeLabels?: TreemapDataColumn;
|
|
12
|
+
value?: TreemapDataColumn;
|
|
13
|
+
width?: string | number;
|
|
14
|
+
height?: string | number;
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
seriesColors?: string[];
|
|
17
|
+
dataColors?: string[];
|
|
18
|
+
dataColorValues?: TreemapDataColorValue[];
|
|
19
|
+
additionalTooltipFieldValues?: TreemapAdditionalTooltipField[];
|
|
20
|
+
additionalTooltipFields?: string[];
|
|
21
|
+
resultLimit?: number;
|
|
22
|
+
showTooltip?: boolean;
|
|
23
|
+
showChildValues?: boolean;
|
|
24
|
+
showParentValues?: boolean;
|
|
25
|
+
showSubdivisions?: boolean;
|
|
26
|
+
sumFromLeafNodes?: boolean;
|
|
27
|
+
legendDisplay?: 'bottom' | 'off';
|
|
28
|
+
dataColorConfig?: DataColorLegendConfig;
|
|
29
|
+
contentTextColor?: string;
|
|
30
|
+
tooltipBodyColor?: string;
|
|
31
|
+
tooltipTitleColor?: string;
|
|
32
|
+
defaultNodeColor?: string;
|
|
33
|
+
dataColorValuesUseValueField?: boolean;
|
|
34
|
+
metadata?: Record<string, unknown>[];
|
|
35
|
+
onEventTrigger?: (event: {
|
|
36
|
+
type: string;
|
|
37
|
+
payload: Record<string, unknown>;
|
|
38
|
+
}) => void;
|
|
39
|
+
}
|
|
40
|
+
declare const PureTreemap: ({ width, height, parent, nodeIds, nodeLabels, value, backgroundColor, seriesColors, dataColors, dataColorValues, additionalTooltipFieldValues, additionalTooltipFields, resultLimit, showTooltip, showChildValues, showParentValues, showSubdivisions, sumFromLeafNodes, legendDisplay, dataColorConfig, tooltipBodyColor, tooltipTitleColor, defaultNodeColor, dataColorValuesUseValueField, metadata, onEventTrigger, }: PureTreemapProps) => React.JSX.Element;
|
|
41
|
+
export default PureTreemap;
|
|
42
|
+
//# sourceMappingURL=PureTreemap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PureTreemap.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/components/PureTreemap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4B/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,KAAK,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE9F,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,eAAe,MAAM,CAAC;AACnC,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAwBpC,MAAM,WAAW,gBAAgB;IAC7B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC1C,4BAA4B,CAAC,EAAE,6BAA6B,EAAE,CAAC;IAC/D,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IACjC,eAAe,CAAC,EAAE,qBAAqB,CAAC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACrC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,KAAK,IAAI,CAAC;CACxF;AAeD,QAAA,MAAM,WAAW,GAAI,2ZA2BlB,gBAAgB,sBAuZlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TreemapNodeData } from '../utils/treemapTypes';
|
|
3
|
+
export interface TreemapBreadcrumbProps {
|
|
4
|
+
path: TreemapNodeData[];
|
|
5
|
+
onNavigate: (index: number) => void;
|
|
6
|
+
textColor: string;
|
|
7
|
+
}
|
|
8
|
+
declare const TreemapBreadcrumb: ({ path, onNavigate, textColor }: TreemapBreadcrumbProps) => React.ReactElement;
|
|
9
|
+
export default TreemapBreadcrumb;
|
|
10
|
+
//# sourceMappingURL=TreemapBreadcrumb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreemapBreadcrumb.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/components/TreemapBreadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAE,eAAe,EAAE,CAAC;IACxB,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;CACrB;AAoCD,QAAA,MAAM,iBAAiB,GAAI,iCAAiC,sBAAsB,KAAG,KAAK,CAAC,YA0C1F,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TreemapRect } from '../utils/treemapLayout';
|
|
3
|
+
import { TreemapNodeData } from '../utils/treemapTypes';
|
|
4
|
+
export interface TreemapChildCellProps {
|
|
5
|
+
treemapInstanceId: string;
|
|
6
|
+
rect: TreemapRect;
|
|
7
|
+
parentBounds: ChildPaintBounds;
|
|
8
|
+
clickNode: TreemapNodeData;
|
|
9
|
+
fillColor?: string;
|
|
10
|
+
textColor: string;
|
|
11
|
+
dividerColor: string;
|
|
12
|
+
backgroundColor: string;
|
|
13
|
+
labelFontWeight: string | number;
|
|
14
|
+
showChildValues: boolean;
|
|
15
|
+
centerText?: boolean;
|
|
16
|
+
onClick: (node: TreemapNodeData) => void;
|
|
17
|
+
onMouseEnter: (node: TreemapNodeData, element: SVGElement, forceTooltip?: boolean) => void;
|
|
18
|
+
onMouseLeave: () => void;
|
|
19
|
+
}
|
|
20
|
+
interface ChildPaintBounds {
|
|
21
|
+
x0: number;
|
|
22
|
+
y0: number;
|
|
23
|
+
x1: number;
|
|
24
|
+
y1: number;
|
|
25
|
+
}
|
|
26
|
+
declare const TreemapChildCell: ({ treemapInstanceId, rect, parentBounds, clickNode, fillColor, textColor, dividerColor, backgroundColor, labelFontWeight, showChildValues, centerText, onClick, onMouseEnter, onMouseLeave, }: TreemapChildCellProps) => React.ReactElement | null;
|
|
27
|
+
export default TreemapChildCell;
|
|
28
|
+
//# sourceMappingURL=TreemapChildCell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreemapChildCell.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/components/TreemapChildCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAwBxD,MAAM,WAAW,qBAAqB;IAClC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,SAAS,EAAE,eAAe,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACzC,YAAY,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3F,YAAY,EAAE,MAAM,IAAI,CAAC;CAC5B;AAgCD,UAAU,gBAAgB;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACd;AAwLD,QAAA,MAAM,gBAAgB,GAAI,+LAevB,qBAAqB,KAAG,KAAK,CAAC,YAAY,GAAG,IA+J/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TreemapHeaderProps {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: number;
|
|
6
|
+
label: string;
|
|
7
|
+
value?: number;
|
|
8
|
+
showValue: boolean;
|
|
9
|
+
position: 'inside' | 'outside';
|
|
10
|
+
textColor: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Renders a parent node header label, either inside or outside the rectangle.
|
|
14
|
+
* When "outside", the header sits above the rectangle as a bar.
|
|
15
|
+
* When "inside", the header is rendered at the top of the rectangle.
|
|
16
|
+
*/
|
|
17
|
+
declare const TreemapHeader: ({ x, y, width, label, value, showValue, position, textColor, }: TreemapHeaderProps) => React.ReactElement;
|
|
18
|
+
export default TreemapHeader;
|
|
19
|
+
//# sourceMappingURL=TreemapHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreemapHeader.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/components/TreemapHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,kBAAkB;IAC/B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,QAAA,MAAM,aAAa,GAAI,gEASpB,kBAAkB,KAAG,KAAK,CAAC,YAmB7B,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { HoverTargetBounds, NodeMouseDownHandler, NodeMouseEnterHandler } from '../utils/treemapNodeUtils';
|
|
3
|
+
export interface TreemapHoverTargetProps extends HoverTargetBounds {
|
|
4
|
+
nodeId: string;
|
|
5
|
+
dataTest?: string;
|
|
6
|
+
expandTop?: boolean;
|
|
7
|
+
expandRight?: boolean;
|
|
8
|
+
expandBottom?: boolean;
|
|
9
|
+
expandLeft?: boolean;
|
|
10
|
+
onMouseDown?: NodeMouseDownHandler;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
onMouseEnter?: NodeMouseEnterHandler;
|
|
13
|
+
onMouseLeave?: () => void;
|
|
14
|
+
}
|
|
15
|
+
declare const TreemapHoverTarget: ({ nodeId, x, y, width, height, dataTest, expandTop, expandRight, expandBottom, expandLeft, onMouseDown, onClick, onMouseEnter, onMouseLeave, }: TreemapHoverTargetProps) => React.ReactElement | null;
|
|
16
|
+
export default TreemapHoverTarget;
|
|
17
|
+
//# sourceMappingURL=TreemapHoverTarget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreemapHoverTarget.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/components/TreemapHoverTarget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEH,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACxB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,QAAA,MAAM,kBAAkB,GAAI,gJAezB,uBAAuB,KAAG,KAAK,CAAC,YAAY,GAAG,IAiCjD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DataColorLegendConfig } from '../utils/treemapUtils';
|
|
3
|
+
export type { DataColorLegendConfig, GradientConfig, MatchEntry, RangeEntry } from '../utils/treemapUtils';
|
|
4
|
+
export interface DataColorsTreemapLegendProps {
|
|
5
|
+
config: DataColorLegendConfig;
|
|
6
|
+
textColor: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SeriesColorLegendItem {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
color: string;
|
|
12
|
+
}
|
|
13
|
+
export interface SeriesColorLegendProps {
|
|
14
|
+
items: SeriesColorLegendItem[];
|
|
15
|
+
textColor: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const SeriesColorLegend: ({ items, textColor }: SeriesColorLegendProps) => React.ReactElement;
|
|
18
|
+
declare const DataColorsTreemapLegend: ({ config, textColor, }: DataColorsTreemapLegendProps) => React.ReactElement | null;
|
|
19
|
+
export default DataColorsTreemapLegend;
|
|
20
|
+
//# sourceMappingURL=TreemapLegend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreemapLegend.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/components/TreemapLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,qBAAqB,EAA0C,MAAM,uBAAuB,CAAC;AAE3G,YAAY,EAAE,qBAAqB,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE3G,MAAM,WAAW,4BAA4B;IACzC,MAAM,EAAE,qBAAqB,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,qBAAqB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACnC,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;CACrB;AAoFD,eAAO,MAAM,iBAAiB,GAAI,sBAAsB,sBAAsB,KAAG,KAAK,CAAC,YAWtF,CAAC;AA+DF,QAAA,MAAM,uBAAuB,GAAI,wBAG9B,4BAA4B,KAAG,KAAK,CAAC,YAAY,GAAG,IAuBtD,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type TreemapNodeProps } from '../utils/treemapNodeUtils';
|
|
3
|
+
declare const TreemapNode: ({ treemapInstanceId, rect, seriesColors, categoryIndex, backgroundColor, nodeColorMap, defaultNodeColor, clickNode, showChildValues, showParentValues, centerStandaloneText, hoveredNodeId, ancestorDimmed, onClick, onMouseEnter, onMouseLeave, }: TreemapNodeProps) => React.ReactElement;
|
|
4
|
+
export default TreemapNode;
|
|
5
|
+
//# sourceMappingURL=TreemapNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreemapNode.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/components/TreemapNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAIH,KAAK,gBAAgB,EACxB,MAAM,2BAA2B,CAAC;AAEnC,QAAA,MAAM,WAAW,GAAI,oPAiBlB,gBAAgB,KAAG,KAAK,CAAC,YA0G3B,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TreemapRect } from '../utils/treemapLayout';
|
|
3
|
+
import { RenderNestedNode, RenderNodeState, TreemapNodeProps } from '../utils/treemapNodeUtils';
|
|
4
|
+
type TreemapParentNodeProps = TreemapNodeProps & RenderNodeState & {
|
|
5
|
+
childRects: TreemapRect[];
|
|
6
|
+
renderNestedNode: RenderNestedNode;
|
|
7
|
+
};
|
|
8
|
+
declare const TreemapParentNode: ({ treemapInstanceId, rect, childRects, backgroundColor, nodeColorMap, defaultNodeColor, clickNode, showChildValues, showParentValues, hoveredNodeId, ancestorDimmed, onClick, onMouseEnter, onMouseLeave, nodeWidth, nodeHeight, baseColor, formattedValue, activationAriaLabel, hasSpaceForLabel, handleMouseDown, handleClick, handleKeyDown, renderNestedNode, }: TreemapParentNodeProps) => React.ReactElement;
|
|
9
|
+
export default TreemapParentNode;
|
|
10
|
+
//# sourceMappingURL=TreemapParentNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreemapParentNode.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/components/TreemapParentNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAgC,MAAM,wBAAwB,CAAC;AAKnF,OAAO,EAkBH,gBAAgB,EAChB,eAAe,EAGf,gBAAgB,EAEnB,MAAM,2BAA2B,CAAC;AAEnC,KAAK,sBAAsB,GAAG,gBAAgB,GAC1C,eAAe,GAAG;IACd,UAAU,EAAE,WAAW,EAAE,CAAC;IAC1B,gBAAgB,EAAE,gBAAgB,CAAC;CACtC,CAAC;AAkkBN,QAAA,MAAM,iBAAiB,GAAI,qWAyBxB,sBAAsB,KAAG,KAAK,CAAC,YAiIjC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { RenderNodeState, TreemapNodeProps } from '../utils/treemapNodeUtils';
|
|
3
|
+
type TreemapStandaloneNodeProps = TreemapNodeProps & RenderNodeState;
|
|
4
|
+
declare const TreemapStandaloneNode: ({ rect, backgroundColor, clickNode, showChildValues, hoveredNodeId, centerStandaloneText, ancestorDimmed, onMouseEnter, onMouseLeave, nodeWidth, nodeHeight, baseColor, formattedValue, activationAriaLabel, hasSpaceForLabel, availableTextWidth, handleMouseDown, handleClick, handleKeyDown, }: TreemapStandaloneNodeProps) => React.ReactElement;
|
|
5
|
+
export default TreemapStandaloneNode;
|
|
6
|
+
//# sourceMappingURL=TreemapStandaloneNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreemapStandaloneNode.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/components/TreemapStandaloneNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAOH,eAAe,EAIf,gBAAgB,EAKnB,MAAM,2BAA2B,CAAC;AAEnC,KAAK,0BAA0B,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAkLrE,QAAA,MAAM,qBAAqB,GAAI,mSAoB5B,0BAA0B,KAAG,KAAK,CAAC,YA0GrC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TreemapNodeData } from '../utils/treemapTypes';
|
|
3
|
+
export interface TreemapTooltipProps {
|
|
4
|
+
node: TreemapNodeData;
|
|
5
|
+
anchor: SVGElement | HTMLElement;
|
|
6
|
+
additionalFields: string[];
|
|
7
|
+
textColor: string;
|
|
8
|
+
headerColor: string;
|
|
9
|
+
seriesColors: string[];
|
|
10
|
+
categoryIndex: Map<string, number>;
|
|
11
|
+
nodeColorMap?: Map<string, string>;
|
|
12
|
+
defaultNodeColor?: string;
|
|
13
|
+
containerWidth: number;
|
|
14
|
+
}
|
|
15
|
+
declare const TreemapTooltip: ({ node, anchor, additionalFields, textColor, headerColor, seriesColors, categoryIndex, nodeColorMap, defaultNodeColor, containerWidth, }: TreemapTooltipProps) => React.ReactElement;
|
|
16
|
+
export default TreemapTooltip;
|
|
17
|
+
//# sourceMappingURL=TreemapTooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreemapTooltip.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/components/TreemapTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAUxD,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,UAAU,GAAG,WAAW,CAAC;IACjC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;CAC1B;AAsDD,QAAA,MAAM,cAAc,GAAI,0IAWrB,mBAAmB,KAAG,KAAK,CAAC,YA6E9B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mock data for Treemap visualization tests and stories.
|
|
3
|
+
* All data uses parent-child (from/to) format: [parent[], child[], value[]]
|
|
4
|
+
*/
|
|
5
|
+
export declare const basicColumns: (string[] | number[])[];
|
|
6
|
+
export declare const basicFields: string[];
|
|
7
|
+
export declare const subdivisionColumns: (string[] | number[])[];
|
|
8
|
+
export declare const subdivisionFields: string[];
|
|
9
|
+
export declare const headingColumns: (string[] | number[])[];
|
|
10
|
+
export declare const headingFields: string[];
|
|
11
|
+
export declare const parentGreaterThanChildrenColumns: (string[] | number[])[];
|
|
12
|
+
export declare const parentGreaterThanChildrenFields: string[];
|
|
13
|
+
export declare const parentLessThanChildrenColumns: (string[] | number[])[];
|
|
14
|
+
export declare const parentLessThanChildrenFields: string[];
|
|
15
|
+
export declare const largeColumns: (string[] | number[])[];
|
|
16
|
+
export declare const largeFields: string[];
|
|
17
|
+
export declare const flat10kColumns: (string[] | number[])[];
|
|
18
|
+
export declare const flat10kFields: string[];
|
|
19
|
+
export declare const flat50kColumns: (string[] | number[])[];
|
|
20
|
+
export declare const flat50kFields: string[];
|
|
21
|
+
export declare const nested10kColumns: (string[] | number[])[];
|
|
22
|
+
export declare const nested10kFields: string[];
|
|
23
|
+
export declare const nested50kColumns: (string[] | number[])[];
|
|
24
|
+
export declare const nested50kFields: string[];
|
|
25
|
+
/** Per-row numeric color values for basic (flat) data: temperature-like metric */
|
|
26
|
+
export declare const basicColorValues: number[];
|
|
27
|
+
/** Per-row numeric color values for heading (three-level) data.
|
|
28
|
+
* Non-leaf rows get 0; leaf rows get a distinct metric (e.g. growth rate). */
|
|
29
|
+
export declare const headingColorValues: number[];
|
|
30
|
+
/** Gradient dataColors for basic data: blue (cold) -> red (hot) based on temperature */
|
|
31
|
+
export declare const basicGradientDataColors: string[];
|
|
32
|
+
/** MatchValue dataColors for basic data: continent-based color matching */
|
|
33
|
+
export declare const basicMatchValueDataColors: string[];
|
|
34
|
+
/** RangeValue dataColors for basic data: population thresholds */
|
|
35
|
+
export declare const basicRangeValueDataColors: string[];
|
|
36
|
+
/** Gradient dataColors for heading (three-level) data */
|
|
37
|
+
export declare const headingGradientDataColors: string[];
|
|
38
|
+
export declare const fields: string[];
|
|
39
|
+
export declare const twoLevelColumns: (string[] | number[])[];
|
|
40
|
+
export declare const twoLevelFields: string[];
|
|
41
|
+
export declare const singleLevelColumns: (string[] | number[])[];
|
|
42
|
+
export declare const singleLevelFields: string[];
|
|
43
|
+
export declare const fromToColumns: (string[] | number[])[];
|
|
44
|
+
export declare const fromToFields: string[];
|
|
45
|
+
export declare const mockDataSource: {
|
|
46
|
+
primary: {
|
|
47
|
+
requestParams: {
|
|
48
|
+
offset: number;
|
|
49
|
+
count: number;
|
|
50
|
+
};
|
|
51
|
+
data: {
|
|
52
|
+
columns: (string[] | number[])[];
|
|
53
|
+
fields: string[];
|
|
54
|
+
};
|
|
55
|
+
meta: {
|
|
56
|
+
totalCount: number;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export declare const mockDataSourceTwoLevel: {
|
|
61
|
+
primary: {
|
|
62
|
+
requestParams: {
|
|
63
|
+
offset: number;
|
|
64
|
+
count: number;
|
|
65
|
+
};
|
|
66
|
+
data: {
|
|
67
|
+
columns: (string[] | number[])[];
|
|
68
|
+
fields: string[];
|
|
69
|
+
};
|
|
70
|
+
meta: {
|
|
71
|
+
totalCount: number;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export declare const mockDataSourceEmpty: {
|
|
76
|
+
primary: {
|
|
77
|
+
requestParams: {
|
|
78
|
+
offset: number;
|
|
79
|
+
count: number;
|
|
80
|
+
};
|
|
81
|
+
data: {
|
|
82
|
+
columns: any[];
|
|
83
|
+
fields: any[];
|
|
84
|
+
};
|
|
85
|
+
meta: {
|
|
86
|
+
totalCount: number;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/mockdata/data.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,eAAO,MAAM,YAAY,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,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F,kEAAkE;AAClE,eAAO,MAAM,yBAAyB,EAAE,MAAM,EAW7C,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,yBAAyB,EAAE,MAAM,EA6B7C,CAAC;AAKF,eAAO,MAAM,MAAM,UAAc,CAAC;AAElC,eAAO,MAAM,eAAe,yBAAqB,CAAC;AAClD,eAAO,MAAM,cAAc,UAAoB,CAAC;AAEhD,eAAO,MAAM,kBAAkB,yBAAe,CAAC;AAC/C,eAAO,MAAM,iBAAiB,UAAc,CAAC;AAE7C,eAAO,MAAM,aAAa,yBAAiB,CAAC;AAC5C,eAAO,MAAM,YAAY,UAAgB,CAAC;AAK1C,eAAO,MAAM,cAAc;;;;;;;;;;;;;;CAS1B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;CASlC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;CAS/B,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { TreemapNodeData } from './treemapTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Returns true when a CSS color has transparency.
|
|
4
|
+
*/
|
|
5
|
+
export declare const isTransparentColor: (color?: string) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Returns the appropriate text color (light or dark) for a given background color,
|
|
8
|
+
* following WCAG luminance contrast guidelines.
|
|
9
|
+
*
|
|
10
|
+
* @param bgColor - CSS background color string
|
|
11
|
+
* @returns '#ffffff' for dark backgrounds, '#000000' for light backgrounds
|
|
12
|
+
*/
|
|
13
|
+
export declare const getTextColorForBackground: (bgColor?: string) => string;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the fill color for a treemap node based on series coloring.
|
|
16
|
+
* Level 1 categories each get a distinct color from the palette.
|
|
17
|
+
*
|
|
18
|
+
* @param node - The node to color
|
|
19
|
+
* @param seriesColors - The categorical color palette
|
|
20
|
+
* @param categoryIndex - Map of root category name to palette index
|
|
21
|
+
* @returns CSS color string
|
|
22
|
+
*/
|
|
23
|
+
export declare const getSeriesColor: (node: TreemapNodeData, seriesColors: string[], categoryIndex: Map<string, number>) => string;
|
|
24
|
+
/**
|
|
25
|
+
* Darkens a CSS color by a factor (0-1).
|
|
26
|
+
* factor=0 returns original, factor=1 returns black.
|
|
27
|
+
*/
|
|
28
|
+
export declare const darkenColor: (hex: string, factor: number) => string;
|
|
29
|
+
/**
|
|
30
|
+
* Lightens a CSS color by a factor (0-1).
|
|
31
|
+
* factor=0 returns original, factor=1 returns white.
|
|
32
|
+
*/
|
|
33
|
+
export declare const lightenColor: (hex: string, factor: number) => string;
|
|
34
|
+
/**
|
|
35
|
+
* Returns a stroke color for a node rect that contrasts with the dashboard background.
|
|
36
|
+
* Dark backgrounds get a lighter stroke; light backgrounds get a darker stroke.
|
|
37
|
+
*
|
|
38
|
+
* @param fillColor - The node's CSS fill color
|
|
39
|
+
* @param bgColor - The dashboard CSS background color
|
|
40
|
+
* @param factor - How much to lighten or darken (0-1)
|
|
41
|
+
*/
|
|
42
|
+
export declare const getStrokeColor: (fillColor: string, bgColor: string, factor: number) => string;
|
|
43
|
+
export interface StandaloneNodeStyle {
|
|
44
|
+
nodeFillColor: string;
|
|
45
|
+
strokeColor: string;
|
|
46
|
+
strokeWidth: number;
|
|
47
|
+
}
|
|
48
|
+
export declare const getStandaloneNodeStyle: ({ isSynthetic, backgroundColor, baseColor, strokeFactor, defaultStrokeWidth, }: {
|
|
49
|
+
isSynthetic: boolean;
|
|
50
|
+
backgroundColor: string;
|
|
51
|
+
baseColor: string;
|
|
52
|
+
strokeFactor: number;
|
|
53
|
+
defaultStrokeWidth: number;
|
|
54
|
+
}) => StandaloneNodeStyle;
|
|
55
|
+
/**
|
|
56
|
+
* Builds a map from Level 1 category names to their index in the color palette.
|
|
57
|
+
*/
|
|
58
|
+
export declare const buildCategoryIndex: (rootChildren: TreemapNodeData[]) => Map<string, number>;
|
|
59
|
+
/**
|
|
60
|
+
* Determines whether label text should be light or dark based on the background color.
|
|
61
|
+
* Uses WCAG relative luminance calculation.
|
|
62
|
+
*
|
|
63
|
+
* @param bgColor - CSS background color string
|
|
64
|
+
* @returns 'light' or 'dark'
|
|
65
|
+
*/
|
|
66
|
+
export declare const getLabelColorMode: (bgColor: string) => "light" | "dark";
|
|
67
|
+
//# sourceMappingURL=treemapColorUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treemapColorUtils.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/utils/treemapColorUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAgBjD;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,KAAG,OAcnD,CAAC;AAgBF;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GAAI,UAAU,MAAM,KAAG,MAG5D,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,GACvB,MAAM,eAAe,EACrB,cAAc,MAAM,EAAE,EACtB,eAAe,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KACnC,MAGF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,QAAQ,MAAM,KAAG,MAMzD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,EAAE,QAAQ,MAAM,KAAG,MAM1D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,WAAW,MAAM,EAAE,SAAS,MAAM,EAAE,QAAQ,MAAM,KAAG,MAKnF,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,sBAAsB,GAAI,gFAMpC;IACC,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;CAC9B,KAAG,mBAcH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,cAAc,eAAe,EAAE,KAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAMtF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,KAAG,OAAO,GAAG,MAG7D,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DataColorLegendConfig } from './treemapUtils';
|
|
2
|
+
/** Build data color config from the original DSL string and context. */
|
|
3
|
+
declare const buildDataColorConfig: (options: Record<string, unknown>, context: Record<string, unknown>) => DataColorLegendConfig | undefined;
|
|
4
|
+
export default buildDataColorConfig;
|
|
5
|
+
//# sourceMappingURL=treemapDataColorUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treemapDataColorUtils.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/utils/treemapDataColorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAqC5D,wEAAwE;AACxE,QAAA,MAAM,oBAAoB,GACtB,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACjC,qBAAqB,GAAG,SAU1B,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TreemapInputData, TreemapNodeData } from './treemapTypes';
|
|
2
|
+
export declare const PARENT_VALUE_LESS_THAN_CHILDREN_ERROR = "Error: The given parent values is less than the sum of its children. Set sumFromLeafNodes true to generate parent values from children.";
|
|
3
|
+
interface BuildTreeOptions {
|
|
4
|
+
sumFromLeafNodes?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Builds a tree from explicit parent-node pair data.
|
|
8
|
+
*
|
|
9
|
+
* @param inputData - Resolved treemap option data arrays
|
|
10
|
+
* @returns Root TreemapNodeData
|
|
11
|
+
*/
|
|
12
|
+
export declare const buildTree: (inputData: TreemapInputData, options?: BuildTreeOptions) => TreemapNodeData | null;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=treemapDataUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treemapDataUtils.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/utils/treemapDataUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEnE,eAAO,MAAM,qCAAqC,4IAC2F,CAAC;AAM9I,UAAU,gBAAgB;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AA6RD;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAClB,WAAW,gBAAgB,EAC3B,UAAS,gBAAqB,KAC/B,eAAe,GAAG,IAiBpB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { TreemapNodeData } from './treemapTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a positioned rectangle in the treemap layout.
|
|
4
|
+
* x0, y0 = top-left corner; x1, y1 = bottom-right corner.
|
|
5
|
+
* Children are nested rects laid out inside this rect.
|
|
6
|
+
*/
|
|
7
|
+
export interface TreemapRect {
|
|
8
|
+
x0: number;
|
|
9
|
+
y0: number;
|
|
10
|
+
x1: number;
|
|
11
|
+
y1: number;
|
|
12
|
+
node: TreemapNodeData;
|
|
13
|
+
children?: TreemapRect[];
|
|
14
|
+
}
|
|
15
|
+
interface ComputeTreemapLayoutOptions {
|
|
16
|
+
svgMode?: boolean;
|
|
17
|
+
showSubdivisions?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** Pointer target padding that lets adjacent nodes each own half of the visual gap. */
|
|
20
|
+
declare const HOVER_TARGET_PADDING: number;
|
|
21
|
+
/** Height reserved for the parent header label */
|
|
22
|
+
declare const HEADER_HEIGHT = 22;
|
|
23
|
+
/** Border radius for all rects */
|
|
24
|
+
declare const BORDER_RADIUS = 2;
|
|
25
|
+
/**
|
|
26
|
+
* Minimum area (px) a leaf must be allocated for it to reach MIN_LEAF_DIM on
|
|
27
|
+
* its shortest side. Accounts for gap inset and worst-case squarify aspect
|
|
28
|
+
* ratio (~4:1): shortSide = sqrt(area / 4), so area >= (dim+gap)^2 * 4.
|
|
29
|
+
*/
|
|
30
|
+
declare const MIN_LEAF_AREA: number;
|
|
31
|
+
/**
|
|
32
|
+
* Computes the full nested treemap layout for a given node's children.
|
|
33
|
+
* Nested subdivisions are opt-in; otherwise only the current node's direct
|
|
34
|
+
* children are laid out. When the total descendant count exceeds
|
|
35
|
+
* SVG_NODE_LIMIT, nesting is disabled so parents render as solid blocks.
|
|
36
|
+
*/
|
|
37
|
+
export declare const computeTreemapLayout: (node: TreemapNodeData, width: number, height: number, options?: ComputeTreemapLayoutOptions | boolean) => TreemapRect[];
|
|
38
|
+
export interface CollapsedTreemapNodeResult {
|
|
39
|
+
node: TreemapNodeData | null;
|
|
40
|
+
collapsedCount: number;
|
|
41
|
+
tooManySameSizeNodes: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Collapses small tail nodes into a synthetic "N others" node so all data is
|
|
45
|
+
* represented in one treemap without pagination.
|
|
46
|
+
*/
|
|
47
|
+
export declare const getCollapsedTreemapNode: (currentNode: TreemapNodeData | null | undefined, width: number, height: number, sortedChildren: TreemapNodeData[]) => CollapsedTreemapNodeResult;
|
|
48
|
+
export { HEADER_HEIGHT, BORDER_RADIUS, MIN_LEAF_AREA, HOVER_TARGET_PADDING };
|
|
49
|
+
//# sourceMappingURL=treemapLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treemapLayout.d.ts","sourceRoot":"","sources":["../../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';
|
|
2
|
+
import { TreemapRect } from './treemapLayout';
|
|
3
|
+
import { TreemapNodeData } from './treemapTypes';
|
|
4
|
+
export declare const LABEL_PADDING = 8;
|
|
5
|
+
export declare const LABEL_PADDING_DOUBLE: number;
|
|
6
|
+
export declare const STROKE_WIDTH = 1;
|
|
7
|
+
export declare const STROKE_FACTOR = 0.4;
|
|
8
|
+
export declare const PARENT_FONT_SIZE = 12;
|
|
9
|
+
export declare const HEADER_VALUE_FONT_SIZE = 12;
|
|
10
|
+
export declare const CHILD_FONT_WEIGHT = 500;
|
|
11
|
+
export declare const PARENT_FONT_WEIGHT = "bold";
|
|
12
|
+
export declare const VALUE_FONT_FAMILY = "'Splunk Platform Sans', 'Splunk Data Sans', Roboto, Droid, 'Helvetica Neue', Helvetica, Arial, sans-serif";
|
|
13
|
+
export declare const VALUE_LABEL_PADDING: number;
|
|
14
|
+
export declare const VALUE_LABEL_PADDING_DOUBLE: number;
|
|
15
|
+
export declare const VALUE_OPACITY = 0.8;
|
|
16
|
+
export declare const VALUE_TEXT_GAP = 2;
|
|
17
|
+
export declare const MIN_VALUE_TEXT_WIDTH = 12;
|
|
18
|
+
export declare const MIN_HEADER_LABEL_WIDTH = 12;
|
|
19
|
+
export declare const DIM_OPACITY = 0.5;
|
|
20
|
+
export declare const PARENT_FONT = "bold 12px 'Splunk Platform Sans', 'Splunk Data Sans', Roboto, Droid, 'Helvetica Neue', Helvetica, Arial, sans-serif";
|
|
21
|
+
export declare const HEADER_VALUE_FONT = "12px 'Splunk Platform Sans', 'Splunk Data Sans', Roboto, Droid, 'Helvetica Neue', Helvetica, Arial, sans-serif";
|
|
22
|
+
export type TextAnchor = 'start' | 'middle' | 'end' | 'inherit';
|
|
23
|
+
export type NodeMouseDownHandler = (e: React.MouseEvent<SVGGElement | SVGRectElement>) => void;
|
|
24
|
+
export type NodeKeyDownHandler = (e: React.KeyboardEvent<SVGGElement | SVGRectElement>) => void;
|
|
25
|
+
export type NodeMouseEnterHandler = (e: React.MouseEvent<SVGElement>) => void;
|
|
26
|
+
export interface TreemapNodeProps {
|
|
27
|
+
treemapInstanceId?: string;
|
|
28
|
+
rect: TreemapRect;
|
|
29
|
+
seriesColors: string[];
|
|
30
|
+
categoryIndex: Map<string, number>;
|
|
31
|
+
backgroundColor: string;
|
|
32
|
+
nodeColorMap?: Map<string, string>;
|
|
33
|
+
defaultNodeColor?: string;
|
|
34
|
+
clickNode?: TreemapNodeData;
|
|
35
|
+
showChildValues?: boolean;
|
|
36
|
+
showParentValues: boolean;
|
|
37
|
+
centerStandaloneText?: boolean;
|
|
38
|
+
hoveredNodeId?: string | null;
|
|
39
|
+
ancestorDimmed?: boolean;
|
|
40
|
+
onClick: (node: TreemapNodeData) => void;
|
|
41
|
+
onMouseEnter: (node: TreemapNodeData, element: SVGElement, forceTooltip?: boolean) => void;
|
|
42
|
+
onMouseLeave: () => void;
|
|
43
|
+
}
|
|
44
|
+
export interface RenderNodeState {
|
|
45
|
+
nodeWidth: number;
|
|
46
|
+
nodeHeight: number;
|
|
47
|
+
baseColor: string;
|
|
48
|
+
formattedValue: string;
|
|
49
|
+
activationAriaLabel: string;
|
|
50
|
+
hasSpaceForLabel: boolean;
|
|
51
|
+
availableTextWidth: number;
|
|
52
|
+
handleMouseDown: NodeMouseDownHandler;
|
|
53
|
+
handleClick: () => void;
|
|
54
|
+
handleKeyDown: NodeKeyDownHandler;
|
|
55
|
+
}
|
|
56
|
+
export type RenderNestedNode = (childRect: TreemapRect, clickNode: TreemapNodeData, ancestorDimmed: boolean) => React.ReactElement;
|
|
57
|
+
interface TextLayout {
|
|
58
|
+
text: string;
|
|
59
|
+
isTruncated: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface HoverTargetBounds {
|
|
62
|
+
x: number;
|
|
63
|
+
y: number;
|
|
64
|
+
width: number;
|
|
65
|
+
height: number;
|
|
66
|
+
}
|
|
67
|
+
export declare const getHoverTargetBounds: ({ x, y, width, height, expandTop, expandRight, expandBottom, expandLeft, }: HoverTargetBounds & {
|
|
68
|
+
expandTop?: boolean;
|
|
69
|
+
expandRight?: boolean;
|
|
70
|
+
expandBottom?: boolean;
|
|
71
|
+
expandLeft?: boolean;
|
|
72
|
+
}) => HoverTargetBounds;
|
|
73
|
+
export declare const getTextLayout: (text: string, availableWidth: number, font: string, shouldRender?: boolean) => TextLayout;
|
|
74
|
+
export declare const callNodeMouseEnter: (onMouseEnter: TreemapNodeProps["onMouseEnter"], node: TreemapNodeData, element: SVGElement, forceTooltip: boolean) => void;
|
|
75
|
+
export declare const getParentFocusTargetTestId: (nodeId: string) => string;
|
|
76
|
+
export declare const getParentFocusTargetId: (treemapInstanceId: string, nodeId: string) => string;
|
|
77
|
+
export declare const focusParentTarget: (treemapInstanceId: string, nodeId: string) => void;
|
|
78
|
+
export declare const getActivationAriaLabel: (node: TreemapNodeData, clickNode: TreemapNodeData, formattedValue: string) => string;
|
|
79
|
+
export declare const rectContainsNodeId: (rect: TreemapRect, nodeId: string) => boolean;
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=treemapNodeUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treemapNodeUtils.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/utils/treemapNodeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAwB,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,oBAAoB,QAAoB,CAAC;AACtD,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,eAAO,MAAM,aAAa,MAAM,CAAC;AACjC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,eAAO,M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tB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB,KAAG,iBAcH,CAAC;AAEF,eAAO,MAAM,aAAa,GACtB,MAAM,MAAM,EACZ,gBAAgB,MAAM,EACtB,MAAM,MAAM,EACZ,sBAAmB,KACpB,UASF,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC3B,cAAc,gBAAgB,CAAC,cAAc,CAAC,EAC9C,MAAM,eAAe,EACrB,SAAS,UAAU,EACnB,cAAc,OAAO,KACtB,IAMF,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,QAAQ,MAAM,KAAG,MAAiD,CAAC;AAE9G,eAAO,MAAM,sBAAsB,GAAI,mBAAmB,MAAM,EAAE,QAAQ,MAAM,KAAG,MACnB,CAAC;AAEjE,eAAO,MAAM,iBAAiB,GAAI,mBAAmB,MAAM,EAAE,QAAQ,MAAM,KAAG,IAK7E,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAC/B,MAAM,eAAe,EACrB,WAAW,eAAe,EAC1B,gBAAgB,MAAM,KACvB,MAQF,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,MAAM,WAAW,EAAE,QAAQ,MAAM,KAAG,OAKtE,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type TreemapDataColumn = Array<string | number | null | undefined>;
|
|
2
|
+
export type TreemapDataColorValue = string | number | null | undefined;
|
|
3
|
+
export interface TreemapAdditionalTooltipField {
|
|
4
|
+
name: string;
|
|
5
|
+
values: unknown[];
|
|
6
|
+
}
|
|
7
|
+
export interface TreemapInputData {
|
|
8
|
+
parent?: TreemapDataColumn;
|
|
9
|
+
nodeIds?: TreemapDataColumn;
|
|
10
|
+
nodeLabels?: TreemapDataColumn;
|
|
11
|
+
value?: TreemapDataColumn;
|
|
12
|
+
dataColorValues?: TreemapDataColorValue[];
|
|
13
|
+
additionalTooltipFieldValues?: TreemapAdditionalTooltipField[];
|
|
14
|
+
}
|
|
15
|
+
export interface TreemapNodeData {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
value: number;
|
|
19
|
+
depth: number;
|
|
20
|
+
children?: TreemapNodeData[];
|
|
21
|
+
parent?: TreemapNodeData;
|
|
22
|
+
/** The hierarchy path from root to this node */
|
|
23
|
+
path: string[];
|
|
24
|
+
/** Stable source node-id path, used to reconcile drill state after data changes. */
|
|
25
|
+
sourcePath?: string[];
|
|
26
|
+
/** The Level 1 category this node belongs to (for series coloring) */
|
|
27
|
+
rootCategory: string;
|
|
28
|
+
/** Row index in the original columns data (for dataColors mapping) */
|
|
29
|
+
rowIndex?: number;
|
|
30
|
+
/** Additional field values for tooltip display */
|
|
31
|
+
additionalFields?: Record<string, unknown>;
|
|
32
|
+
/** Optional validation error for the built tree */
|
|
33
|
+
validationError?: string;
|
|
34
|
+
/** True when the node represents collapsed child nodes rather than one source row. */
|
|
35
|
+
isSynthetic?: boolean;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=treemapTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treemapTypes.d.ts","sourceRoot":"","sources":["../../../src/Treemap/PureTreemap/utils/treemapTypes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAC1E,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAEvE,MAAM,WAAW,6BAA6B;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC7B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,KAAK,CAAC,EAAE,iBAAiB,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