@splunk/visualizations 28.6.0 → 28.8.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.js +2 -2
- package/Area.js.map +2 -2
- package/Bar.js +2 -2
- package/Bar.js.map +2 -2
- package/Bubble.js +2 -2
- package/Bubble.js.map +2 -2
- package/CHANGELOG.external.md +45 -50
- package/ChoroplethSvg.js +2 -2
- package/ChoroplethSvg.js.map +2 -2
- package/Column.js +2 -2
- package/Column.js.map +2 -2
- package/Ellipse.js +2 -2
- package/Ellipse.js.map +2 -2
- package/Events/PureEvents/FieldSummaryTooltip.d.ts +8 -31
- package/Events/PureEvents/FieldSummaryTooltip.d.ts.map +1 -1
- package/Events/PureEvents/PureEvents.d.ts.map +1 -1
- package/Events/PureEvents/TimeControlsPopover.d.ts +6 -25
- package/Events/PureEvents/TimeControlsPopover.d.ts.map +1 -1
- package/Events.js +27 -101
- package/Events.js.map +2 -2
- package/FillerGauge.js +10 -5
- package/FillerGauge.js.map +2 -2
- package/Image.js +2 -2
- package/Image.js.map +2 -2
- package/Line.js +2 -2
- package/Line.js.map +2 -2
- package/LinkGraph.js +2 -2
- package/LinkGraph.js.map +2 -2
- package/Map/Map.d.ts +1 -0
- package/Map/Map.d.ts.map +1 -1
- package/Map/PureMap/BubbleLayer.d.ts +22 -4
- package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
- package/Map/PureMap/ChoroplethLayer.d.ts +9 -1
- package/Map/PureMap/ChoroplethLayer.d.ts.map +1 -1
- package/Map/PureMap/ClusterLayer.d.ts +3 -1
- package/Map/PureMap/ClusterLayer.d.ts.map +1 -1
- package/Map/PureMap/LocalChoroplethLayer.d.ts +1 -0
- package/Map/PureMap/LocalChoroplethLayer.d.ts.map +1 -1
- package/Map/PureMap/MapContext.d.ts +13 -0
- package/Map/PureMap/MapContext.d.ts.map +1 -0
- package/Map/PureMap/MarkerLayer.d.ts +19 -2
- package/Map/PureMap/MarkerLayer.d.ts.map +1 -1
- package/Map/PureMap/MarkerWrapper.d.ts +3 -2
- package/Map/PureMap/MarkerWrapper.d.ts.map +1 -1
- package/Map/PureMap/PureMap.d.ts +1 -0
- package/Map/PureMap/PureMap.d.ts.map +1 -1
- package/Map/PureMap/PureMapContainer.d.ts.map +1 -1
- package/Map/PureMap/Tooltip.d.ts +6 -1
- package/Map/PureMap/Tooltip.d.ts.map +1 -1
- package/Map/PureMap/keyboardConstants.d.ts +11 -0
- package/Map/PureMap/keyboardConstants.d.ts.map +1 -0
- package/Map/PureMap/useRovingTabindex.d.ts +18 -0
- package/Map/PureMap/useRovingTabindex.d.ts.map +1 -0
- package/Map.js +1317 -478
- package/Map.js.map +4 -4
- package/Markdown/Markdown.d.ts.map +1 -1
- package/Markdown.config.js +1 -1
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +24 -7
- package/Markdown.js.map +2 -2
- package/MarkerGauge.js +10 -5
- package/MarkerGauge.js.map +2 -2
- package/NetworkGraph/NetworkGraph.d.ts +2 -5
- package/NetworkGraph/NetworkGraph.d.ts.map +1 -1
- 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/components/Tooltip.d.ts +1 -1
- package/NetworkGraph/PureNetworkGraph/components/Tooltip.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts +1 -0
- package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts +23 -0
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -1
- package/NetworkGraph.config.js +2 -0
- package/NetworkGraph.config.js.map +2 -2
- package/NetworkGraph.js +353 -40
- package/NetworkGraph.js.map +4 -4
- package/ParallelCoordinates.js +2 -2
- package/ParallelCoordinates.js.map +2 -2
- package/Pie.js +2 -2
- package/Pie.js.map +2 -2
- 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 +2 -0
- package/ProcessTree/PureProcessTree/components/ProcessTreeLeftPanel.d.ts.map +1 -1
- package/ProcessTree/PureProcessTree/components/ProcessTreeRightPanel.d.ts.map +1 -1
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts +3 -1
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts.map +1 -1
- package/ProcessTree/PureProcessTree/mockdata/data.d.ts.map +1 -1
- package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts +3 -1
- package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts.map +1 -1
- package/ProcessTree.js +101 -31
- package/ProcessTree.js.map +3 -3
- package/Punchcard.js +2 -2
- package/Punchcard.js.map +2 -2
- package/README.md +2 -0
- package/Rectangle.js +2 -2
- package/Rectangle.js.map +2 -2
- package/RichText/PureRichText/Editor/EditorPanel.d.ts.map +1 -1
- package/RichText/PureRichText/InnerEditor.d.ts +10 -0
- package/RichText/PureRichText/InnerEditor.d.ts.map +1 -1
- package/RichText/PureRichText/PureRichText.d.ts +17 -0
- package/RichText/PureRichText/PureRichText.d.ts.map +1 -1
- package/RichText/PureRichText/PureRichTextContext.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.map +1 -1
- 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/useTokenMap.d.ts +37 -35
- package/RichText/PureRichText/hooks/useTokenMap.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 +15 -0
- package/RichText/PureRichText/types.d.ts.map +1 -1
- package/RichText/PureRichText/utils/slateUtils.d.ts.map +1 -1
- package/RichText/RichText.d.ts +2 -0
- package/RichText/RichText.d.ts.map +1 -1
- package/RichText/config.d.ts.map +1 -1
- package/RichText.config.js +14 -1
- package/RichText.config.js.map +2 -2
- package/RichText.js +733 -263
- package/RichText.js.map +4 -4
- package/Sankey.js +2 -2
- package/Sankey.js.map +2 -2
- package/Scatter.js +2 -2
- package/Scatter.js.map +2 -2
- package/SingleValue.js +368 -471
- package/SingleValue.js.map +4 -4
- package/SingleValueIcon.js +2 -2
- package/SingleValueIcon.js.map +2 -2
- package/SingleValueRadial.js +2 -2
- package/SingleValueRadial.js.map +2 -2
- package/SparkLine/SparkLine.d.ts +57 -0
- package/SparkLine/SparkLine.d.ts.map +1 -0
- package/SparkLine/index.d.ts +1 -1
- package/SparkLine/index.d.ts.map +1 -1
- package/SparkLine.js +384 -485
- package/SparkLine.js.map +4 -4
- package/Table/PureTable.d.ts +2 -0
- package/Table/PureTable.d.ts.map +1 -1
- package/Table/config.d.ts.map +1 -1
- package/Table/hooks.d.ts +1 -1
- package/Table/hooks.d.ts.map +1 -1
- package/Table.config.js +7 -0
- package/Table.config.js.map +2 -2
- package/Table.js +480 -500
- 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.js +449 -211
- 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 +12 -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 +6233 -0
- package/Treemap.js.map +7 -0
- 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.map +1 -1
- package/common/OverviewDoc.js.map +2 -2
- package/common/docUtils.d.ts.map +1 -1
- package/common/docUtils.js +1 -8
- package/common/docUtils.js.map +2 -2
- package/common/gaugeUtils.d.ts.map +1 -1
- package/common/gaugeUtils.js +7 -3
- 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/interfaces/VizCategory.d.ts +2 -1
- package/common/interfaces/VizCategory.d.ts.map +1 -1
- package/common/utils/mapUtils.js +512 -179
- package/common/utils/mapUtils.js.map +4 -4
- package/common/utils/shadowDomUtils.d.ts +2 -0
- package/common/utils/shadowDomUtils.d.ts.map +1 -0
- package/common/utils/shadowDomUtils.js +39 -0
- package/common/utils/shadowDomUtils.js.map +7 -0
- package/common/withDashboardViz.js +2 -2
- package/common/withDashboardViz.js.map +2 -2
- package/docs-llm/INDEX.md +119 -0
- package/docs-llm/area/examples-json.md +3854 -0
- package/docs-llm/area/examples-react.md +2816 -0
- package/docs-llm/area/options.md +97 -0
- package/docs-llm/area/overview.md +27 -0
- package/docs-llm/bar/examples-json.md +3380 -0
- package/docs-llm/bar/examples-react.md +2352 -0
- package/docs-llm/bar/options.md +89 -0
- package/docs-llm/bar/overview.md +25 -0
- package/docs-llm/bubble/examples-json.md +4082 -0
- package/docs-llm/bubble/examples-react.md +3977 -0
- package/docs-llm/bubble/options.md +62 -0
- package/docs-llm/bubble/overview.md +26 -0
- package/docs-llm/choropleth-svg/examples-json.md +397 -0
- package/docs-llm/choropleth-svg/examples-react.md +389 -0
- package/docs-llm/choropleth-svg/options.md +15 -0
- package/docs-llm/choropleth-svg/overview.md +23 -0
- package/docs-llm/column/examples-json.md +3898 -0
- package/docs-llm/column/examples-react.md +2653 -0
- package/docs-llm/column/options.md +94 -0
- package/docs-llm/column/overview.md +31 -0
- package/docs-llm/dsl/examples-json.md +43 -0
- package/docs-llm/dsl/examples-react.md +78 -0
- package/docs-llm/dsl/formatters/format-by-type-examples-json.md +58 -0
- package/docs-llm/dsl/formatters/format-by-type-examples-react.md +43 -0
- package/docs-llm/dsl/formatters/format-by-type.md +38 -0
- package/docs-llm/dsl/formatters/frame-examples-json.md +42 -0
- package/docs-llm/dsl/formatters/frame-examples-react.md +24 -0
- package/docs-llm/dsl/formatters/frame.md +6 -0
- package/docs-llm/dsl/formatters/gradient-examples-json.md +98 -0
- package/docs-llm/dsl/formatters/gradient-examples-react.md +44 -0
- package/docs-llm/dsl/formatters/gradient.md +23 -0
- package/docs-llm/dsl/formatters/lerp-examples-json.md +40 -0
- package/docs-llm/dsl/formatters/lerp-examples-react.md +28 -0
- package/docs-llm/dsl/formatters/lerp.md +19 -0
- package/docs-llm/dsl/formatters/match-value-examples-json.md +65 -0
- package/docs-llm/dsl/formatters/match-value-examples-react.md +37 -0
- package/docs-llm/dsl/formatters/match-value.md +13 -0
- package/docs-llm/dsl/formatters/max-contrast-examples-json.md +39 -0
- package/docs-llm/dsl/formatters/max-contrast-examples-react.md +27 -0
- package/docs-llm/dsl/formatters/max-contrast.md +9 -0
- package/docs-llm/dsl/formatters/multi-format-examples-json.md +67 -0
- package/docs-llm/dsl/formatters/multi-format-examples-react.md +49 -0
- package/docs-llm/dsl/formatters/multi-format.md +12 -0
- package/docs-llm/dsl/formatters/objects-examples-json.md +49 -0
- package/docs-llm/dsl/formatters/objects-examples-react.md +37 -0
- package/docs-llm/dsl/formatters/objects.md +3 -0
- package/docs-llm/dsl/formatters/pick-examples-json.md +59 -0
- package/docs-llm/dsl/formatters/pick-examples-react.md +30 -0
- package/docs-llm/dsl/formatters/pick.md +9 -0
- package/docs-llm/dsl/formatters/prefix-examples-json.md +29 -0
- package/docs-llm/dsl/formatters/prefix-examples-react.md +19 -0
- package/docs-llm/dsl/formatters/prefix.md +3 -0
- package/docs-llm/dsl/formatters/prepend-examples-json.md +51 -0
- package/docs-llm/dsl/formatters/prepend-examples-react.md +33 -0
- package/docs-llm/dsl/formatters/prepend.md +9 -0
- package/docs-llm/dsl/formatters/range-value-examples-json.md +48 -0
- package/docs-llm/dsl/formatters/range-value-examples-react.md +34 -0
- package/docs-llm/dsl/formatters/range-value.md +15 -0
- package/docs-llm/dsl/formatters/set-color-channel-examples-json.md +40 -0
- package/docs-llm/dsl/formatters/set-color-channel-examples-react.md +31 -0
- package/docs-llm/dsl/formatters/set-color-channel.md +9 -0
- package/docs-llm/dsl/formatters/suffix-examples-json.md +29 -0
- package/docs-llm/dsl/formatters/suffix-examples-react.md +19 -0
- package/docs-llm/dsl/formatters/suffix.md +3 -0
- package/docs-llm/dsl/formatters/type-examples-json.md +37 -0
- package/docs-llm/dsl/formatters/type-examples-react.md +20 -0
- package/docs-llm/dsl/formatters/type.md +3 -0
- package/docs-llm/dsl/overview.md +41 -0
- package/docs-llm/dsl/selectors/abs.md +7 -0
- package/docs-llm/dsl/selectors/ceil.md +7 -0
- package/docs-llm/dsl/selectors/data-frame-average-examples-json.md +41 -0
- package/docs-llm/dsl/selectors/data-frame-average-examples-react.md +36 -0
- package/docs-llm/dsl/selectors/data-frame-average.md +7 -0
- package/docs-llm/dsl/selectors/data-frame-count-examples-json.md +41 -0
- package/docs-llm/dsl/selectors/data-frame-count-examples-react.md +36 -0
- package/docs-llm/dsl/selectors/data-frame-count.md +7 -0
- package/docs-llm/dsl/selectors/data-frame-examples-json.md +830 -0
- package/docs-llm/dsl/selectors/data-frame-examples-react.md +929 -0
- package/docs-llm/dsl/selectors/data-frame-get-field-examples-json.md +89 -0
- package/docs-llm/dsl/selectors/data-frame-get-field-examples-react.md +124 -0
- package/docs-llm/dsl/selectors/data-frame-get-field.md +5 -0
- package/docs-llm/dsl/selectors/data-frame-get-raw-value.md +5 -0
- package/docs-llm/dsl/selectors/data-frame-get-type.md +5 -0
- package/docs-llm/dsl/selectors/data-frame-get-value.md +5 -0
- package/docs-llm/dsl/selectors/data-frame-max-examples-json.md +51 -0
- package/docs-llm/dsl/selectors/data-frame-max-examples-react.md +41 -0
- package/docs-llm/dsl/selectors/data-frame-max.md +7 -0
- package/docs-llm/dsl/selectors/data-frame-min-examples-json.md +51 -0
- package/docs-llm/dsl/selectors/data-frame-min-examples-react.md +41 -0
- package/docs-llm/dsl/selectors/data-frame-min.md +7 -0
- package/docs-llm/dsl/selectors/data-frame-percentile-examples-json.md +41 -0
- package/docs-llm/dsl/selectors/data-frame-percentile-examples-react.md +36 -0
- package/docs-llm/dsl/selectors/data-frame-percentile.md +8 -0
- package/docs-llm/dsl/selectors/data-frame-set-value.md +5 -0
- package/docs-llm/dsl/selectors/data-frame-sum-examples-json.md +51 -0
- package/docs-llm/dsl/selectors/data-frame-sum-examples-react.md +41 -0
- package/docs-llm/dsl/selectors/data-frame-sum.md +7 -0
- package/docs-llm/dsl/selectors/data-frame.md +4 -0
- package/docs-llm/dsl/selectors/data-point-get-field.md +5 -0
- package/docs-llm/dsl/selectors/data-point-get-raw-value.md +4 -0
- package/docs-llm/dsl/selectors/data-point-get-type.md +5 -0
- package/docs-llm/dsl/selectors/data-point-get-value.md +5 -0
- package/docs-llm/dsl/selectors/data-point-set-value.md +4 -0
- package/docs-llm/dsl/selectors/data-point.md +5 -0
- package/docs-llm/dsl/selectors/data-series-average.md +22 -0
- package/docs-llm/dsl/selectors/data-series-count.md +14 -0
- package/docs-llm/dsl/selectors/data-series-get-field.md +5 -0
- package/docs-llm/dsl/selectors/data-series-get-raw-value.md +4 -0
- package/docs-llm/dsl/selectors/data-series-get-type.md +5 -0
- package/docs-llm/dsl/selectors/data-series-get-value.md +4 -0
- package/docs-llm/dsl/selectors/data-series-max.md +5 -0
- package/docs-llm/dsl/selectors/data-series-min.md +5 -0
- package/docs-llm/dsl/selectors/data-series-percentile.md +17 -0
- package/docs-llm/dsl/selectors/data-series-set-value.md +4 -0
- package/docs-llm/dsl/selectors/data-series-sum.md +24 -0
- package/docs-llm/dsl/selectors/data-series.md +4 -0
- package/docs-llm/dsl/selectors/delta.md +7 -0
- package/docs-llm/dsl/selectors/divide.md +8 -0
- package/docs-llm/dsl/selectors/first-point.md +5 -0
- package/docs-llm/dsl/selectors/floor.md +7 -0
- package/docs-llm/dsl/selectors/frame-by-series-index-range-examples-json.md +89 -0
- package/docs-llm/dsl/selectors/frame-by-series-index-range-examples-react.md +88 -0
- package/docs-llm/dsl/selectors/frame-by-series-index-range.md +10 -0
- package/docs-llm/dsl/selectors/frame-by-series-indexes-examples-json.md +88 -0
- package/docs-llm/dsl/selectors/frame-by-series-indexes-examples-react.md +87 -0
- package/docs-llm/dsl/selectors/frame-by-series-indexes.md +9 -0
- package/docs-llm/dsl/selectors/frame-by-series-names-examples-json.md +89 -0
- package/docs-llm/dsl/selectors/frame-by-series-names-examples-react.md +88 -0
- package/docs-llm/dsl/selectors/frame-by-series-names-or-indexes-examples-json.md +89 -0
- package/docs-llm/dsl/selectors/frame-by-series-names-or-indexes-examples-react.md +88 -0
- package/docs-llm/dsl/selectors/frame-by-series-names-or-indexes.md +9 -0
- package/docs-llm/dsl/selectors/frame-by-series-names.md +9 -0
- package/docs-llm/dsl/selectors/frame-by-series-types-examples-json.md +89 -0
- package/docs-llm/dsl/selectors/frame-by-series-types-examples-react.md +88 -0
- package/docs-llm/dsl/selectors/frame-by-series-types.md +9 -0
- package/docs-llm/dsl/selectors/frame-without-internal-fields-examples-json.md +137 -0
- package/docs-llm/dsl/selectors/frame-without-internal-fields-examples-react.md +135 -0
- package/docs-llm/dsl/selectors/frame-without-internal-fields-except-examples-json.md +157 -0
- package/docs-llm/dsl/selectors/frame-without-internal-fields-except-examples-react.md +155 -0
- package/docs-llm/dsl/selectors/frame-without-internal-fields-except.md +21 -0
- package/docs-llm/dsl/selectors/frame-without-internal-fields.md +17 -0
- package/docs-llm/dsl/selectors/frame-without-series-names.md +8 -0
- package/docs-llm/dsl/selectors/last-point.md +5 -0
- package/docs-llm/dsl/selectors/minus.md +8 -0
- package/docs-llm/dsl/selectors/multiply.md +8 -0
- package/docs-llm/dsl/selectors/plus.md +8 -0
- package/docs-llm/dsl/selectors/point-by-index.md +6 -0
- package/docs-llm/dsl/selectors/points-by-indexes.md +6 -0
- package/docs-llm/dsl/selectors/round.md +7 -0
- package/docs-llm/dsl/selectors/series-by-index-examples-json.md +49 -0
- package/docs-llm/dsl/selectors/series-by-index-examples-react.md +39 -0
- package/docs-llm/dsl/selectors/series-by-index.md +8 -0
- package/docs-llm/dsl/selectors/series-by-name-examples-json.md +49 -0
- package/docs-llm/dsl/selectors/series-by-name-examples-react.md +39 -0
- package/docs-llm/dsl/selectors/series-by-name.md +8 -0
- package/docs-llm/dsl/selectors/series-by-prioritized-types-examples-json.md +47 -0
- package/docs-llm/dsl/selectors/series-by-prioritized-types-examples-react.md +39 -0
- package/docs-llm/dsl/selectors/series-by-prioritized-types.md +10 -0
- package/docs-llm/dsl/selectors/series-by-type-examples-json.md +49 -0
- package/docs-llm/dsl/selectors/series-by-type-examples-react.md +39 -0
- package/docs-llm/dsl/selectors/series-by-type.md +10 -0
- package/docs-llm/dsl/selectors/series-by-types.md +6 -0
- package/docs-llm/ellipse/examples-json.md +5 -0
- package/docs-llm/ellipse/examples-react.md +5 -0
- package/docs-llm/ellipse/options.md +16 -0
- package/docs-llm/ellipse/overview.md +5 -0
- package/docs-llm/events/examples-json.md +705 -0
- package/docs-llm/events/examples-react.md +536 -0
- package/docs-llm/events/options.md +18 -0
- package/docs-llm/events/overview.md +5 -0
- package/docs-llm/filler-gauge/examples-json.md +376 -0
- package/docs-llm/filler-gauge/examples-react.md +274 -0
- package/docs-llm/filler-gauge/options.md +26 -0
- package/docs-llm/filler-gauge/overview.md +5 -0
- package/docs-llm/image/examples-json.md +39 -0
- package/docs-llm/image/examples-react.md +65 -0
- package/docs-llm/image/options.md +13 -0
- package/docs-llm/image/overview.md +5 -0
- package/docs-llm/line/examples-json.md +3724 -0
- package/docs-llm/line/examples-react.md +2683 -0
- package/docs-llm/line/options.md +95 -0
- package/docs-llm/line/overview.md +29 -0
- package/docs-llm/link-graph/examples-json.md +5 -0
- package/docs-llm/link-graph/examples-react.md +5 -0
- package/docs-llm/link-graph/options.md +26 -0
- package/docs-llm/link-graph/overview.md +16 -0
- package/docs-llm/map/examples-json.md +13973 -0
- package/docs-llm/map/examples-react.md +6154 -0
- package/docs-llm/map/options.md +22 -0
- package/docs-llm/map/overview.md +32 -0
- package/docs-llm/markdown/examples-json.md +63 -0
- package/docs-llm/markdown/examples-react.md +98 -0
- package/docs-llm/markdown/options.md +17 -0
- package/docs-llm/markdown/overview.md +5 -0
- package/docs-llm/marker-gauge/examples-json.md +436 -0
- package/docs-llm/marker-gauge/examples-react.md +367 -0
- package/docs-llm/marker-gauge/options.md +26 -0
- package/docs-llm/marker-gauge/overview.md +5 -0
- package/docs-llm/network-graph/examples-json.md +8843 -0
- package/docs-llm/network-graph/examples-react.md +7339 -0
- package/docs-llm/network-graph/options.md +50 -0
- package/docs-llm/network-graph/overview.md +28 -0
- package/docs-llm/parallel-coordinates/examples-json.md +8376 -0
- package/docs-llm/parallel-coordinates/examples-react.md +2771 -0
- package/docs-llm/parallel-coordinates/options.md +14 -0
- package/docs-llm/parallel-coordinates/overview.md +22 -0
- package/docs-llm/pie/examples-json.md +851 -0
- package/docs-llm/pie/examples-react.md +606 -0
- package/docs-llm/pie/options.md +34 -0
- package/docs-llm/pie/overview.md +23 -0
- package/docs-llm/process-tree/options.md +32 -0
- package/docs-llm/punchcard/examples-json.md +6134 -0
- package/docs-llm/punchcard/examples-react.md +4562 -0
- package/docs-llm/punchcard/options.md +33 -0
- package/docs-llm/punchcard/overview.md +5 -0
- package/docs-llm/pure-rich-text/options.md +29 -0
- package/docs-llm/rectangle/examples-json.md +5 -0
- package/docs-llm/rectangle/examples-react.md +5 -0
- package/docs-llm/rectangle/options.md +19 -0
- package/docs-llm/rectangle/overview.md +5 -0
- package/docs-llm/rich-text/examples-json.md +96 -0
- package/docs-llm/rich-text/examples-react.md +119 -0
- package/docs-llm/rich-text/options.md +29 -0
- package/docs-llm/rich-text/overview.md +5 -0
- package/docs-llm/sankey/examples-json.md +844 -0
- package/docs-llm/sankey/examples-react.md +546 -0
- package/docs-llm/sankey/options.md +19 -0
- package/docs-llm/sankey/overview.md +24 -0
- package/docs-llm/scatter/examples-json.md +4012 -0
- package/docs-llm/scatter/examples-react.md +3914 -0
- package/docs-llm/scatter/options.md +68 -0
- package/docs-llm/scatter/overview.md +25 -0
- package/docs-llm/single-value/examples-json.md +2613 -0
- package/docs-llm/single-value/examples-react.md +2296 -0
- package/docs-llm/single-value/options.md +49 -0
- package/docs-llm/single-value/overview.md +23 -0
- package/docs-llm/single-value-icon/examples-json.md +1686 -0
- package/docs-llm/single-value-icon/examples-react.md +1573 -0
- package/docs-llm/single-value-icon/options.md +43 -0
- package/docs-llm/single-value-icon/overview.md +5 -0
- package/docs-llm/single-value-radial/examples-json.md +1178 -0
- package/docs-llm/single-value-radial/examples-react.md +1028 -0
- package/docs-llm/single-value-radial/options.md +41 -0
- package/docs-llm/single-value-radial/overview.md +5 -0
- package/docs-llm/table/examples-json.md +5 -0
- package/docs-llm/table/examples-react.md +5 -0
- package/docs-llm/table/options.md +26 -0
- package/docs-llm/table/overview.md +24 -0
- package/docs-llm/timeline/examples-json.md +5 -0
- package/docs-llm/timeline/examples-react.md +5 -0
- package/docs-llm/timeline/options.md +27 -0
- package/docs-llm/timeline/overview.md +24 -0
- 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 +33 -28
package/Table.js
CHANGED
|
@@ -454,6 +454,13 @@ var editorConfig = [
|
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
456
|
],
|
|
457
|
+
[
|
|
458
|
+
{
|
|
459
|
+
label: (0, i18n_exports._)("Dynamic table height"),
|
|
460
|
+
option: "dynamicHeight",
|
|
461
|
+
editor: "editor.toggle"
|
|
462
|
+
}
|
|
463
|
+
],
|
|
457
464
|
[
|
|
458
465
|
{
|
|
459
466
|
label: (0, i18n_exports._)("Row numbers"),
|
|
@@ -1147,7 +1154,7 @@ var SizeAwareWrapper_default = "default" in defaultImport29 ? defaultImport29.de
|
|
|
1147
1154
|
var isMissing = (v) => {
|
|
1148
1155
|
return v === null || v === void 0;
|
|
1149
1156
|
};
|
|
1150
|
-
var missingKeys = (
|
|
1157
|
+
var missingKeys = (keys, target) => keys.filter((k) => isMissing(target[k]));
|
|
1151
1158
|
var MissingPropsMessage = (props) => {
|
|
1152
1159
|
const {
|
|
1153
1160
|
width = SplunkVisualization_default.defaults.width,
|
|
@@ -1196,7 +1203,7 @@ var Cover = styled_components_default.div`
|
|
|
1196
1203
|
bottom: 0;
|
|
1197
1204
|
`;
|
|
1198
1205
|
var Blocker = styled_components_default.div.attrs({
|
|
1199
|
-
"data-splunk-visualization-version": "28.
|
|
1206
|
+
"data-splunk-visualization-version": "28.8.0 - 633c53372"
|
|
1200
1207
|
})`
|
|
1201
1208
|
position: relative;
|
|
1202
1209
|
width: 100%;
|
|
@@ -1277,7 +1284,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
1277
1284
|
FixSizeItem,
|
|
1278
1285
|
{
|
|
1279
1286
|
"data-test": "fix-size-item",
|
|
1280
|
-
"data-splunk-visualization-version": "28.
|
|
1287
|
+
"data-splunk-visualization-version": "28.8.0 - 633c53372",
|
|
1281
1288
|
width,
|
|
1282
1289
|
height,
|
|
1283
1290
|
backgroundColor
|
|
@@ -3247,18 +3254,6 @@ var getTextOverflowType = (columnFormat, columnId, tableFormat, currentColumn, d
|
|
|
3247
3254
|
}
|
|
3248
3255
|
return (tableFormat == null ? void 0 : tableFormat.textOverflow) || defaultValue;
|
|
3249
3256
|
};
|
|
3250
|
-
var getTextOverflow = (columnFormat, columnId, tableFormat, currentColumn) => {
|
|
3251
|
-
const columnTextOverflow = getAttributeFromColumnFormat(
|
|
3252
|
-
"textOverflow",
|
|
3253
|
-
columnFormat,
|
|
3254
|
-
columnId,
|
|
3255
|
-
currentColumn
|
|
3256
|
-
);
|
|
3257
|
-
if (columnTextOverflow) {
|
|
3258
|
-
return columnTextOverflow;
|
|
3259
|
-
}
|
|
3260
|
-
return tableFormat == null ? void 0 : tableFormat.textOverflow;
|
|
3261
|
-
};
|
|
3262
3257
|
var generateHeader = (value, columnId, i, columnFormat, tableFormat, showInternalFields) => {
|
|
3263
3258
|
const ret = {
|
|
3264
3259
|
key: generateKey(value, String(i)),
|
|
@@ -3274,10 +3269,8 @@ var generateHeader = (value, columnId, i, columnFormat, tableFormat, showInterna
|
|
|
3274
3269
|
const headerAlign = getColumnFormatHeaderAlign(columnFormat, columnId, value) || getTableFormatHeaderAlign(tableFormat) || "left";
|
|
3275
3270
|
ret.align = headerAlign;
|
|
3276
3271
|
ret.truncate = true;
|
|
3277
|
-
const
|
|
3278
|
-
|
|
3279
|
-
ret.textOverflowType = textOverflow;
|
|
3280
|
-
}
|
|
3272
|
+
const explicitTextOverflow = getAttributeFromColumnFormat("textOverflow", columnFormat, columnId, value) || (tableFormat == null ? void 0 : tableFormat.textOverflow);
|
|
3273
|
+
ret.textOverflowType = explicitTextOverflow || (/\s/.test(value) ? "break-word" : "ellipsis");
|
|
3281
3274
|
return ret;
|
|
3282
3275
|
};
|
|
3283
3276
|
var getColumnFormatAlign = (columnFormat, currentColumn, currentRow) => {
|
|
@@ -3908,7 +3901,7 @@ var defaultImport45 = __toESM(require("@splunk/react-ui/Popover"));
|
|
|
3908
3901
|
__reExport(Popover_exports, require("@splunk/react-ui/Popover"));
|
|
3909
3902
|
var Popover_default = "default" in defaultImport45 ? defaultImport45.default : defaultImport45;
|
|
3910
3903
|
|
|
3911
|
-
// src/SparkLine/SparkLine.
|
|
3904
|
+
// src/SparkLine/SparkLine.tsx
|
|
3912
3905
|
var StyledSvg = styled_components_default.svg`
|
|
3913
3906
|
/* For fixing IE11 shows overflow part line issue */
|
|
3914
3907
|
overflow: hidden;
|
|
@@ -3920,233 +3913,262 @@ var StyledTooltip = styled_components_default.div`
|
|
|
3920
3913
|
min-width: 20px;
|
|
3921
3914
|
`;
|
|
3922
3915
|
var preventDefault = (e) => e.preventDefault();
|
|
3923
|
-
var
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3916
|
+
var PROP_KEYS = [
|
|
3917
|
+
"acceptNull",
|
|
3918
|
+
"data",
|
|
3919
|
+
"elementRef",
|
|
3920
|
+
"endDotCount",
|
|
3921
|
+
"endDotFillColor",
|
|
3922
|
+
"endDotRadius",
|
|
3923
|
+
"endDotStroke",
|
|
3924
|
+
"endDotStrokeWidth",
|
|
3925
|
+
"fillColor",
|
|
3926
|
+
"fillOpacity",
|
|
3927
|
+
"cursorStroke",
|
|
3928
|
+
"cursorStrokeWidth",
|
|
3929
|
+
"cursorStrokeLinecap",
|
|
3930
|
+
"cursorStrokeDasharray",
|
|
3931
|
+
"height",
|
|
3932
|
+
"isArea",
|
|
3933
|
+
"lineColor",
|
|
3934
|
+
"lineLength",
|
|
3935
|
+
"lineStrokeWidth",
|
|
3936
|
+
"showEndDot",
|
|
3937
|
+
"showTooltip",
|
|
3938
|
+
"yMax",
|
|
3939
|
+
"yMin",
|
|
3940
|
+
"width",
|
|
3941
|
+
"title"
|
|
3942
|
+
];
|
|
3943
|
+
var SparkLineInner = (_a) => {
|
|
3944
|
+
var _b = _a, {
|
|
3945
|
+
acceptNull = false,
|
|
3946
|
+
data = [],
|
|
3947
|
+
elementRef,
|
|
3948
|
+
endDotCount = 0,
|
|
3949
|
+
endDotFillColor = "white",
|
|
3950
|
+
endDotRadius = 0,
|
|
3951
|
+
endDotStroke = "black",
|
|
3952
|
+
endDotStrokeWidth = 0,
|
|
3953
|
+
fillColor = "#65a637",
|
|
3954
|
+
fillOpacity = ".1",
|
|
3955
|
+
cursorStroke = "#5184AF",
|
|
3956
|
+
cursorStrokeWidth = 3,
|
|
3957
|
+
cursorStrokeLinecap = "square",
|
|
3958
|
+
cursorStrokeDasharray = "1, 5",
|
|
3959
|
+
height,
|
|
3960
|
+
isArea = false,
|
|
3961
|
+
lineColor = "#65a637",
|
|
3962
|
+
lineLength,
|
|
3963
|
+
lineStrokeWidth = 1,
|
|
3964
|
+
showEndDot = false,
|
|
3965
|
+
showTooltip = true,
|
|
3966
|
+
yMax,
|
|
3967
|
+
yMin,
|
|
3968
|
+
width,
|
|
3969
|
+
title
|
|
3970
|
+
} = _b, restProps = __objRest(_b, [
|
|
3971
|
+
"acceptNull",
|
|
3972
|
+
"data",
|
|
3973
|
+
"elementRef",
|
|
3974
|
+
"endDotCount",
|
|
3975
|
+
"endDotFillColor",
|
|
3976
|
+
"endDotRadius",
|
|
3977
|
+
"endDotStroke",
|
|
3978
|
+
"endDotStrokeWidth",
|
|
3979
|
+
"fillColor",
|
|
3980
|
+
"fillOpacity",
|
|
3981
|
+
"cursorStroke",
|
|
3982
|
+
"cursorStrokeWidth",
|
|
3983
|
+
"cursorStrokeLinecap",
|
|
3984
|
+
"cursorStrokeDasharray",
|
|
3985
|
+
"height",
|
|
3986
|
+
"isArea",
|
|
3987
|
+
"lineColor",
|
|
3988
|
+
"lineLength",
|
|
3989
|
+
"lineStrokeWidth",
|
|
3990
|
+
"showEndDot",
|
|
3991
|
+
"showTooltip",
|
|
3992
|
+
"yMax",
|
|
3993
|
+
"yMin",
|
|
3994
|
+
"width",
|
|
3995
|
+
"title"
|
|
3996
|
+
]);
|
|
3997
|
+
const [anchor, setAnchor] = (0, react_exports.useState)(null);
|
|
3998
|
+
const [activeIndex, setActiveIndex] = (0, react_exports.useState)(0);
|
|
3999
|
+
const [hoveredIndex, setHoveredIndex] = (0, react_exports.useState)(null);
|
|
4000
|
+
const [componentIsFocused, setComponentIsFocused] = (0, react_exports.useState)(false);
|
|
4001
|
+
const titleId = (0, react_exports.useMemo)(() => (0, id_exports.createDOMID)("sparkline-title"), []);
|
|
4002
|
+
const pointRefs = (0, react_exports.useRef)([]);
|
|
4003
|
+
const containerRef = (0, react_exports.useRef)(null);
|
|
4004
|
+
const fillNull = (0, react_exports.useCallback)(() => data.map((value) => value != null ? value : 0), [data]);
|
|
4005
|
+
const getMax = (0, react_exports.useCallback)(() => {
|
|
4006
|
+
const dataMax = () => acceptNull ? (0, lodash_exports.max)(fillNull()) : (0, lodash_exports.max)(data);
|
|
4007
|
+
return yMax != null ? yMax : dataMax();
|
|
4008
|
+
}, [acceptNull, data, fillNull, yMax]);
|
|
4009
|
+
const getMin = (0, react_exports.useCallback)(() => {
|
|
4010
|
+
const dataMin = () => acceptNull ? (0, lodash_exports.min)(fillNull()) : (0, lodash_exports.min)(data);
|
|
4011
|
+
return yMin != null ? yMin : dataMin();
|
|
4012
|
+
}, [acceptNull, data, fillNull, yMin]);
|
|
4013
|
+
const getXUnit = (0, react_exports.useCallback)(
|
|
4014
|
+
(xMargin2) => {
|
|
4015
|
+
const xUnit = (width - xMargin2 * 2) / (data.length > 1 ? data.length - 1 : 1);
|
|
4016
|
+
return Math.max(0, xUnit);
|
|
4017
|
+
},
|
|
4018
|
+
[data.length, width]
|
|
4019
|
+
);
|
|
4020
|
+
const getYUnit = (0, react_exports.useCallback)(
|
|
4021
|
+
(yMargin2) => {
|
|
4022
|
+
const maxValue = getMax();
|
|
4023
|
+
const minValue = getMin();
|
|
4024
|
+
const yUnit = (height - yMargin2 * 2) / (maxValue - minValue || 2);
|
|
4025
|
+
return Math.max(0, yUnit);
|
|
4026
|
+
},
|
|
4027
|
+
[getMax, getMin, height]
|
|
4028
|
+
);
|
|
4029
|
+
const getSegmentSets = (0, react_exports.useCallback)(
|
|
4030
|
+
(segmentData, points2) => {
|
|
4031
|
+
const lines = [];
|
|
4032
|
+
const isolatedPoints = [];
|
|
4033
|
+
let currentLine = [];
|
|
4034
|
+
for (const [idx, p] of segmentData.entries()) {
|
|
4035
|
+
if (!acceptNull && (0, lodash_exports.isNull)(p)) {
|
|
4036
|
+
if (currentLine.length > 1) {
|
|
4037
|
+
lines.push(currentLine);
|
|
4038
|
+
} else if (currentLine.length === 1) {
|
|
4039
|
+
isolatedPoints.push(currentLine[0]);
|
|
4040
|
+
}
|
|
4041
|
+
currentLine = [];
|
|
4042
|
+
} else {
|
|
4043
|
+
currentLine.push(points2[idx]);
|
|
4044
|
+
}
|
|
3958
4045
|
}
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
return
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
4046
|
+
if (currentLine.length > 1) {
|
|
4047
|
+
lines.push(currentLine);
|
|
4048
|
+
} else if (currentLine.length === 1) {
|
|
4049
|
+
isolatedPoints.push(currentLine[0]);
|
|
4050
|
+
}
|
|
4051
|
+
return { lines, isolatedPoints };
|
|
4052
|
+
},
|
|
4053
|
+
[acceptNull]
|
|
4054
|
+
);
|
|
4055
|
+
const dataToPoints = (0, react_exports.useCallback)(
|
|
4056
|
+
(xMargin2, yMargin2) => {
|
|
4057
|
+
const xUnit = getXUnit(xMargin2);
|
|
4058
|
+
const yUnit = getYUnit(yMargin2);
|
|
4059
|
+
const maxValue = getMax();
|
|
4060
|
+
const minValue = getMin();
|
|
4061
|
+
return data.map((val, idx) => ({
|
|
4062
|
+
x: idx * xUnit + xMargin2,
|
|
4063
|
+
y: maxValue === minValue ? yUnit + yMargin2 : (maxValue - val) * yUnit + yMargin2
|
|
4064
|
+
})).map((p) => [p.x, p.y]);
|
|
4065
|
+
},
|
|
4066
|
+
[data, getMax, getMin, getXUnit, getYUnit]
|
|
4067
|
+
);
|
|
4068
|
+
const handleFocus = (0, react_exports.useCallback)(
|
|
4069
|
+
(event) => {
|
|
4070
|
+
const { target } = event;
|
|
4071
|
+
const { pointIndex: pointIndexStr } = target.dataset || {};
|
|
4072
|
+
if (pointIndexStr !== void 0) {
|
|
4073
|
+
const pointIndex = Number.parseInt(pointIndexStr, 10);
|
|
4074
|
+
if (activeIndex !== pointIndex || !componentIsFocused || hoveredIndex !== null) {
|
|
4075
|
+
setActiveIndex(pointIndex);
|
|
4076
|
+
setHoveredIndex(null);
|
|
4077
|
+
setComponentIsFocused(true);
|
|
4078
|
+
}
|
|
4079
|
+
} else if (pointRefs.current.length > 0) {
|
|
4080
|
+
const indexToFocus = activeIndex ? Math.min(pointRefs.current.length - 1, activeIndex) : 0;
|
|
4081
|
+
pointRefs.current[indexToFocus].focus();
|
|
4082
|
+
}
|
|
4083
|
+
},
|
|
4084
|
+
[activeIndex, componentIsFocused, hoveredIndex]
|
|
4085
|
+
);
|
|
4086
|
+
const handleBlur = (0, react_exports.useCallback)((event) => {
|
|
4087
|
+
if (containerRef.current && !containerRef.current.contains(event.relatedTarget)) {
|
|
4088
|
+
setComponentIsFocused(false);
|
|
3979
4089
|
}
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
4090
|
+
}, []);
|
|
4091
|
+
const handleKeyDown = (0, react_exports.useCallback)(
|
|
4092
|
+
(event) => {
|
|
4093
|
+
const numPoints = data.length;
|
|
4094
|
+
const allowedKeys = ["ArrowLeft", "ArrowRight", "Home", "End"];
|
|
4095
|
+
if (!allowedKeys.includes(event.key)) {
|
|
4096
|
+
return;
|
|
4097
|
+
}
|
|
4098
|
+
let newIndex;
|
|
4099
|
+
if (event.key === "Home") {
|
|
3983
4100
|
newIndex = 0;
|
|
3984
|
-
|
|
3985
|
-
case "End":
|
|
4101
|
+
} else if (event.key === "End") {
|
|
3986
4102
|
newIndex = numPoints - 1;
|
|
3987
|
-
|
|
3988
|
-
case "ArrowLeft":
|
|
4103
|
+
} else if (event.key === "ArrowLeft") {
|
|
3989
4104
|
newIndex = Math.max(0, activeIndex - 1);
|
|
3990
|
-
|
|
3991
|
-
case "ArrowRight":
|
|
4105
|
+
} else {
|
|
3992
4106
|
newIndex = Math.min(numPoints - 1, activeIndex + 1);
|
|
3993
|
-
break;
|
|
3994
|
-
default:
|
|
3995
|
-
return;
|
|
3996
|
-
}
|
|
3997
|
-
if (newIndex !== activeIndex) {
|
|
3998
|
-
event.preventDefault();
|
|
3999
|
-
if (this.pointRefs[newIndex]) {
|
|
4000
|
-
this.pointRefs[newIndex].focus();
|
|
4001
4107
|
}
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
const pointIndex = Number.parseInt(pointIndexStr, 10);
|
|
4008
|
-
if (this.state.hoveredIndex !== pointIndex) {
|
|
4009
|
-
this.setState({ hoveredIndex: pointIndex });
|
|
4108
|
+
if (newIndex !== activeIndex) {
|
|
4109
|
+
event.preventDefault();
|
|
4110
|
+
if (pointRefs.current[newIndex]) {
|
|
4111
|
+
pointRefs.current[newIndex].focus();
|
|
4112
|
+
}
|
|
4010
4113
|
}
|
|
4011
|
-
}
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
}
|
|
4023
|
-
getMin() {
|
|
4024
|
-
const { data, acceptNull, yMin } = this.props;
|
|
4025
|
-
const dataMin = () => acceptNull ? (0, lodash_exports.min)(this.fillNull()) : (0, lodash_exports.min)(data);
|
|
4026
|
-
return yMin === void 0 ? dataMin() : yMin;
|
|
4027
|
-
}
|
|
4028
|
-
/**
|
|
4029
|
-
* Gets unit value of x axis.
|
|
4030
|
-
* @param {Number} xMargin - margin of x axis.
|
|
4031
|
-
* @return {Number} unit value of x axis.
|
|
4032
|
-
* @private
|
|
4033
|
-
*/
|
|
4034
|
-
getXUnit(xMargin) {
|
|
4035
|
-
const { data, width } = this.props;
|
|
4036
|
-
const xUnit = (width - xMargin * 2) / (data.length > 1 ? data.length - 1 : 1);
|
|
4037
|
-
return Math.max(0, xUnit);
|
|
4038
|
-
}
|
|
4039
|
-
/**
|
|
4040
|
-
* Gets unit value of y axis.
|
|
4041
|
-
* @param {String} yMargin - margin of y axis.
|
|
4042
|
-
* @return {Number} unit value of y axis.
|
|
4043
|
-
* @private
|
|
4044
|
-
*/
|
|
4045
|
-
getYUnit(yMargin) {
|
|
4046
|
-
const { height } = this.props;
|
|
4047
|
-
const maxValue = this.getMax();
|
|
4048
|
-
const minValue = this.getMin();
|
|
4049
|
-
const yUnit = (height - yMargin * 2) / (maxValue - minValue || 2);
|
|
4050
|
-
return Math.max(0, yUnit);
|
|
4051
|
-
}
|
|
4052
|
-
/**
|
|
4053
|
-
* Get a list of arrays of points for drawing lines, based on acceptNull property
|
|
4054
|
-
* @method getSegmentSets
|
|
4055
|
-
* @param {Array} data
|
|
4056
|
-
* @param {Array} points
|
|
4057
|
-
* @returns {Object} Object containing lines (arrays of points for polylines) and isolatedPoints (single points surrounded by nulls)
|
|
4058
|
-
*/
|
|
4059
|
-
getSegmentSets(data, points) {
|
|
4060
|
-
const { acceptNull } = this.props;
|
|
4061
|
-
const lines = [];
|
|
4062
|
-
const isolatedPoints = [];
|
|
4063
|
-
let currentLine = [];
|
|
4064
|
-
for (const [idx, p] of data.entries()) {
|
|
4065
|
-
if (!acceptNull && (0, lodash_exports.isNull)(p)) {
|
|
4066
|
-
if (currentLine.length > 1) {
|
|
4067
|
-
lines.push(currentLine);
|
|
4068
|
-
} else if (currentLine.length === 1) {
|
|
4069
|
-
isolatedPoints.push(currentLine[0]);
|
|
4114
|
+
},
|
|
4115
|
+
[activeIndex, data.length]
|
|
4116
|
+
);
|
|
4117
|
+
const handleMouseOver = (0, react_exports.useCallback)(
|
|
4118
|
+
(event) => {
|
|
4119
|
+
var _a2;
|
|
4120
|
+
const pointIndexStr = (_a2 = event.target.dataset) == null ? void 0 : _a2.pointIndex;
|
|
4121
|
+
if (pointIndexStr !== void 0) {
|
|
4122
|
+
const pointIndex = Number.parseInt(pointIndexStr, 10);
|
|
4123
|
+
if (hoveredIndex !== pointIndex) {
|
|
4124
|
+
setHoveredIndex(pointIndex);
|
|
4070
4125
|
}
|
|
4071
|
-
currentLine = [];
|
|
4072
|
-
} else {
|
|
4073
|
-
currentLine.push(points[idx]);
|
|
4074
4126
|
}
|
|
4127
|
+
},
|
|
4128
|
+
[hoveredIndex]
|
|
4129
|
+
);
|
|
4130
|
+
const handleMouseLeave = (0, react_exports.useCallback)(() => {
|
|
4131
|
+
if (hoveredIndex !== null) {
|
|
4132
|
+
setHoveredIndex(null);
|
|
4075
4133
|
}
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
})
|
|
4108
|
-
}
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
* @param {Array} points - array of points coordination.
|
|
4112
|
-
* @param {Number} xMargin - margin of x axis.
|
|
4113
|
-
* @return {Array} array of svg rect objects
|
|
4114
|
-
* @private
|
|
4115
|
-
*/
|
|
4116
|
-
renderRect(points, xMargin) {
|
|
4117
|
-
const { data, height, showTooltip } = this.props;
|
|
4118
|
-
const xUnit = this.getXUnit(xMargin);
|
|
4119
|
-
return points.map((p, i) => (
|
|
4120
|
-
/* eslint-disable react/no-array-index-key */
|
|
4121
|
-
/* @__PURE__ */ react_default.createElement(
|
|
4122
|
-
"rect",
|
|
4123
|
-
{
|
|
4124
|
-
key: `${i}_${p[0]}`,
|
|
4125
|
-
role: "graphics-symbol",
|
|
4126
|
-
"aria-label": `Value: ${data[i] === null ? "N/A" : data[i]}, point ${i + 1} of ${data.length}`,
|
|
4127
|
-
"data-test": `rect-${i}`,
|
|
4128
|
-
"data-point-index": i,
|
|
4129
|
-
tabIndex: showTooltip && this.state.activeIndex === i ? 0 : -1,
|
|
4130
|
-
ref: (el) => {
|
|
4131
|
-
this.pointRefs[i] = el;
|
|
4132
|
-
},
|
|
4133
|
-
x: Math.max(0, p[0] - xUnit / 2),
|
|
4134
|
-
y: 0,
|
|
4135
|
-
width: i === 0 && data.length !== 1 ? xUnit / 2 : xUnit,
|
|
4136
|
-
height,
|
|
4137
|
-
style: { fillOpacity: 0 },
|
|
4138
|
-
onMouseDown: preventDefault
|
|
4139
|
-
}
|
|
4140
|
-
)
|
|
4141
|
-
));
|
|
4142
|
-
}
|
|
4143
|
-
// Renders area chart
|
|
4144
|
-
renderArea(points) {
|
|
4145
|
-
const { data, fillColor, fillOpacity, height, isArea } = this.props;
|
|
4146
|
-
if (!isArea || points.length === 0) {
|
|
4134
|
+
}, [hoveredIndex]);
|
|
4135
|
+
const handleCursorMount = (0, react_exports.useCallback)((el) => {
|
|
4136
|
+
setAnchor(el);
|
|
4137
|
+
}, []);
|
|
4138
|
+
const renderRect = (points2, xMargin2) => {
|
|
4139
|
+
const xUnit = getXUnit(xMargin2);
|
|
4140
|
+
return points2.map((p, i) => {
|
|
4141
|
+
var _a2;
|
|
4142
|
+
return (
|
|
4143
|
+
/* eslint-disable react/no-array-index-key */
|
|
4144
|
+
/* @__PURE__ */ react_default.createElement(
|
|
4145
|
+
"rect",
|
|
4146
|
+
{
|
|
4147
|
+
key: `${i}_${p[0]}`,
|
|
4148
|
+
role: "graphics-symbol",
|
|
4149
|
+
"aria-label": `Value: ${(_a2 = data[i]) != null ? _a2 : "N/A"}, point ${i + 1} of ${data.length}`,
|
|
4150
|
+
"data-test": `rect-${i}`,
|
|
4151
|
+
"data-point-index": i,
|
|
4152
|
+
tabIndex: showTooltip && activeIndex === i ? 0 : -1,
|
|
4153
|
+
ref: (el) => {
|
|
4154
|
+
pointRefs.current[i] = el;
|
|
4155
|
+
},
|
|
4156
|
+
x: Math.max(0, p[0] - xUnit / 2),
|
|
4157
|
+
y: 0,
|
|
4158
|
+
width: i === 0 && data.length !== 1 ? xUnit / 2 : xUnit,
|
|
4159
|
+
height,
|
|
4160
|
+
style: { fillOpacity: 0 },
|
|
4161
|
+
onMouseDown: preventDefault
|
|
4162
|
+
}
|
|
4163
|
+
)
|
|
4164
|
+
);
|
|
4165
|
+
});
|
|
4166
|
+
};
|
|
4167
|
+
const renderArea = (points2) => {
|
|
4168
|
+
if (!isArea || points2.length === 0) {
|
|
4147
4169
|
return null;
|
|
4148
4170
|
}
|
|
4149
|
-
const { lines } =
|
|
4171
|
+
const { lines } = getSegmentSets(data, points2);
|
|
4150
4172
|
const segments = lines.map(
|
|
4151
4173
|
(s) => s.concat([
|
|
4152
4174
|
[s.at(-1)[0], height],
|
|
@@ -4170,80 +4192,56 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
4170
4192
|
}
|
|
4171
4193
|
}
|
|
4172
4194
|
)));
|
|
4173
|
-
}
|
|
4174
|
-
renderCursor(
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
"
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
strokeLinecap: cursorStrokeLinecap,
|
|
4189
|
-
strokeDasharray: cursorStrokeDasharray
|
|
4190
|
-
}
|
|
4195
|
+
};
|
|
4196
|
+
const renderCursor = (currentPointX2, shouldRender) => shouldRender && /* @__PURE__ */ react_default.createElement(
|
|
4197
|
+
"line",
|
|
4198
|
+
{
|
|
4199
|
+
"data-test": "cursor",
|
|
4200
|
+
ref: handleCursorMount,
|
|
4201
|
+
x1: currentPointX2,
|
|
4202
|
+
y1: 0,
|
|
4203
|
+
x2: currentPointX2,
|
|
4204
|
+
y2: height,
|
|
4205
|
+
style: {
|
|
4206
|
+
stroke: cursorStroke,
|
|
4207
|
+
strokeWidth: cursorStrokeWidth,
|
|
4208
|
+
strokeLinecap: cursorStrokeLinecap,
|
|
4209
|
+
strokeDasharray: cursorStrokeDasharray
|
|
4191
4210
|
}
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
renderTooltip(
|
|
4195
|
-
const
|
|
4196
|
-
const displayValue = tooltipValue === null ? "-" : tooltipValue;
|
|
4211
|
+
}
|
|
4212
|
+
);
|
|
4213
|
+
const renderTooltip = (tooltipValue2, isOpen) => {
|
|
4214
|
+
const displayValue = tooltipValue2 === null ? "-" : tooltipValue2;
|
|
4197
4215
|
return /* @__PURE__ */ react_default.createElement(
|
|
4198
4216
|
Popover_default,
|
|
4199
4217
|
{
|
|
4200
4218
|
"data-test": "tooltip",
|
|
4201
4219
|
open: isOpen,
|
|
4202
4220
|
anchor,
|
|
4203
|
-
"data-test-value":
|
|
4221
|
+
"data-test-value": tooltipValue2,
|
|
4204
4222
|
appearance: "inverted",
|
|
4205
4223
|
defaultPlacement: "above",
|
|
4206
4224
|
animation: false
|
|
4207
4225
|
},
|
|
4208
4226
|
/* @__PURE__ */ react_default.createElement(StyledTooltip, null, displayValue)
|
|
4209
4227
|
);
|
|
4210
|
-
}
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
"circle",
|
|
4224
|
-
{
|
|
4225
|
-
key: `end-dot${point[0]}${point[1]}`,
|
|
4226
|
-
"data-test": "end-dot",
|
|
4227
|
-
cx: point[0],
|
|
4228
|
-
cy: point[1],
|
|
4229
|
-
r: endDotRadius === 0 ? xMargin : endDotRadius,
|
|
4230
|
-
style: {
|
|
4231
|
-
fill: endDotFillColor,
|
|
4232
|
-
stroke: endDotStroke,
|
|
4233
|
-
strokeWidth: endDotStrokeWidth
|
|
4234
|
-
}
|
|
4228
|
+
};
|
|
4229
|
+
const renderEndDots = (points2, dotsToShow2, xMargin2) => /* @__PURE__ */ react_default.createElement("g", null, points2.slice(-dotsToShow2).map((point) => /* @__PURE__ */ react_default.createElement(
|
|
4230
|
+
"circle",
|
|
4231
|
+
{
|
|
4232
|
+
key: `end-dot${point[0]}${point[1]}`,
|
|
4233
|
+
"data-test": "end-dot",
|
|
4234
|
+
cx: point[0],
|
|
4235
|
+
cy: point[1],
|
|
4236
|
+
r: endDotRadius === 0 ? xMargin2 : endDotRadius,
|
|
4237
|
+
style: {
|
|
4238
|
+
fill: endDotFillColor,
|
|
4239
|
+
stroke: endDotStroke,
|
|
4240
|
+
strokeWidth: endDotStrokeWidth
|
|
4235
4241
|
}
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
* Renders circles for isolated points (single data points surrounded by nulls)
|
|
4240
|
-
* These would otherwise be invisible since a line requires at least 2 points
|
|
4241
|
-
* @method renderIsolatedPoints
|
|
4242
|
-
* @param {Array} isolatedPoints - Array of [x, y] coordinates for isolated points
|
|
4243
|
-
* @returns {Object} SVG Group of circles
|
|
4244
|
-
*/
|
|
4245
|
-
renderIsolatedPoints(isolatedPoints) {
|
|
4246
|
-
const { lineColor, lineStrokeWidth } = this.props;
|
|
4242
|
+
}
|
|
4243
|
+
)));
|
|
4244
|
+
const renderIsolatedPoints = (isolatedPoints) => {
|
|
4247
4245
|
if (!isolatedPoints || isolatedPoints.length === 0) {
|
|
4248
4246
|
return null;
|
|
4249
4247
|
}
|
|
@@ -4261,20 +4259,10 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
4261
4259
|
}
|
|
4262
4260
|
}
|
|
4263
4261
|
)));
|
|
4264
|
-
}
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
* @param {Array} points
|
|
4269
|
-
* @returns {Object} SVG Group of polylines and isolated points
|
|
4270
|
-
*/
|
|
4271
|
-
renderPolyline(points) {
|
|
4272
|
-
const { data, lineColor, lineLength, lineStrokeWidth } = this.props;
|
|
4273
|
-
const linePoints = (0, lodash_exports.isFinite)(lineLength) && lineLength > 0 ? lineLength : points.length;
|
|
4274
|
-
const { lines, isolatedPoints } = this.getSegmentSets(
|
|
4275
|
-
data.slice(-linePoints),
|
|
4276
|
-
points.slice(-linePoints)
|
|
4277
|
-
);
|
|
4262
|
+
};
|
|
4263
|
+
const renderPolyline = (points2) => {
|
|
4264
|
+
const linePoints = (0, lodash_exports.isFinite)(lineLength) && lineLength > 0 ? lineLength : points2.length;
|
|
4265
|
+
const { lines, isolatedPoints } = getSegmentSets(data.slice(-linePoints), points2.slice(-linePoints));
|
|
4278
4266
|
return /* @__PURE__ */ react_default.createElement("g", { "data-test": "sparkline" }, lines.map((lineData) => /* @__PURE__ */ react_default.createElement(
|
|
4279
4267
|
"polyline",
|
|
4280
4268
|
{
|
|
@@ -4289,10 +4277,18 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
4289
4277
|
},
|
|
4290
4278
|
points: lineData.join(" ")
|
|
4291
4279
|
}
|
|
4292
|
-
)),
|
|
4293
|
-
}
|
|
4294
|
-
getInteractionState
|
|
4295
|
-
|
|
4280
|
+
)), renderIsolatedPoints(isolatedPoints));
|
|
4281
|
+
};
|
|
4282
|
+
const getInteractionState = ({
|
|
4283
|
+
interactionData,
|
|
4284
|
+
points: interactionPoints,
|
|
4285
|
+
interactionShowTooltip,
|
|
4286
|
+
interactionActiveIndex,
|
|
4287
|
+
interactionHoveredIndex,
|
|
4288
|
+
interactionComponentIsFocused
|
|
4289
|
+
}) => {
|
|
4290
|
+
var _a2;
|
|
4291
|
+
if (!interactionShowTooltip) {
|
|
4296
4292
|
return {
|
|
4297
4293
|
currentPointX: null,
|
|
4298
4294
|
tooltipValue: null,
|
|
@@ -4300,200 +4296,94 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
4300
4296
|
interactiveProps: {}
|
|
4301
4297
|
};
|
|
4302
4298
|
}
|
|
4303
|
-
const
|
|
4304
|
-
onKeyDown:
|
|
4305
|
-
onMouseOver:
|
|
4306
|
-
onMouseLeave:
|
|
4307
|
-
onFocus:
|
|
4308
|
-
onBlur:
|
|
4299
|
+
const interactiveProps2 = {
|
|
4300
|
+
onKeyDown: handleKeyDown,
|
|
4301
|
+
onMouseOver: handleMouseOver,
|
|
4302
|
+
onMouseLeave: handleMouseLeave,
|
|
4303
|
+
onFocus: handleFocus,
|
|
4304
|
+
onBlur: handleBlur
|
|
4309
4305
|
};
|
|
4310
|
-
const isHovered =
|
|
4311
|
-
const shouldDisplayInteractiveElements = (isHovered ||
|
|
4306
|
+
const isHovered = interactionHoveredIndex !== null;
|
|
4307
|
+
const shouldDisplayInteractiveElements = (isHovered || interactionComponentIsFocused) && interactionData.length > 0;
|
|
4312
4308
|
if (!shouldDisplayInteractiveElements) {
|
|
4313
4309
|
return {
|
|
4314
4310
|
currentPointX: null,
|
|
4315
4311
|
tooltipValue: null,
|
|
4316
4312
|
showCursorAndTooltip: false,
|
|
4317
|
-
interactiveProps
|
|
4313
|
+
interactiveProps: interactiveProps2
|
|
4318
4314
|
};
|
|
4319
4315
|
}
|
|
4320
|
-
const displayIndex = isHovered ?
|
|
4316
|
+
const displayIndex = isHovered ? interactionHoveredIndex : interactionActiveIndex;
|
|
4321
4317
|
const isValidIndex = displayIndex !== null && displayIndex >= 0;
|
|
4322
|
-
const withinBounds = isValidIndex && displayIndex <
|
|
4318
|
+
const withinBounds = isValidIndex && displayIndex < interactionData.length && displayIndex < interactionPoints.length;
|
|
4323
4319
|
if (!withinBounds) {
|
|
4324
4320
|
return {
|
|
4325
4321
|
currentPointX: null,
|
|
4326
4322
|
tooltipValue: null,
|
|
4327
4323
|
showCursorAndTooltip: false,
|
|
4328
|
-
interactiveProps
|
|
4324
|
+
interactiveProps: interactiveProps2
|
|
4329
4325
|
};
|
|
4330
4326
|
}
|
|
4331
|
-
const displayPointCoords =
|
|
4332
|
-
const
|
|
4333
|
-
const
|
|
4327
|
+
const displayPointCoords = interactionPoints[displayIndex];
|
|
4328
|
+
const currentPointX2 = (_a2 = displayPointCoords == null ? void 0 : displayPointCoords[0]) != null ? _a2 : null;
|
|
4329
|
+
const tooltipValue2 = interactionData[displayIndex];
|
|
4334
4330
|
return {
|
|
4335
|
-
currentPointX,
|
|
4336
|
-
tooltipValue,
|
|
4337
|
-
showCursorAndTooltip:
|
|
4338
|
-
interactiveProps
|
|
4331
|
+
currentPointX: currentPointX2,
|
|
4332
|
+
tooltipValue: tooltipValue2,
|
|
4333
|
+
showCursorAndTooltip: currentPointX2 !== null,
|
|
4334
|
+
interactiveProps: interactiveProps2
|
|
4339
4335
|
};
|
|
4336
|
+
};
|
|
4337
|
+
if (data.length === 0) {
|
|
4338
|
+
return null;
|
|
4340
4339
|
}
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4340
|
+
if (pointRefs.current.length !== data.length) {
|
|
4341
|
+
pointRefs.current.length = data.length;
|
|
4342
|
+
}
|
|
4343
|
+
const xMargin = endDotRadius + endDotStrokeWidth / 2;
|
|
4344
|
+
const yMargin = Math.max(lineStrokeWidth / 2, endDotRadius + endDotStrokeWidth / 2);
|
|
4345
|
+
const points = dataToPoints(xMargin, yMargin);
|
|
4346
|
+
const dotsToShow = Math.max(showEndDot && 1, (0, lodash_exports.isFinite)(endDotCount) && endDotCount > 0 && endDotCount);
|
|
4347
|
+
const { currentPointX, tooltipValue, showCursorAndTooltip, interactiveProps } = getInteractionState({
|
|
4348
|
+
interactionData: data,
|
|
4349
|
+
points,
|
|
4350
|
+
interactionShowTooltip: showTooltip,
|
|
4351
|
+
interactionActiveIndex: activeIndex,
|
|
4352
|
+
interactionHoveredIndex: hoveredIndex,
|
|
4353
|
+
interactionComponentIsFocused: componentIsFocused
|
|
4354
|
+
});
|
|
4355
|
+
const ariaLabel = title || (0, i18n_exports._)("Source count over time sparkline trend");
|
|
4356
|
+
return /* @__PURE__ */ react_default.createElement(
|
|
4357
|
+
"div",
|
|
4358
|
+
__spreadValues(__spreadValues({
|
|
4359
|
+
"data-test": "line",
|
|
4360
|
+
"data-test-type": isArea ? "area" : "line",
|
|
4361
|
+
ref: (el) => {
|
|
4362
|
+
containerRef.current = el;
|
|
4363
|
+
if (typeof elementRef === "function") {
|
|
4364
|
+
elementRef(el);
|
|
4365
|
+
} else if (elementRef && typeof elementRef === "object") {
|
|
4366
|
+
elementRef.current = el;
|
|
4367
|
+
}
|
|
4368
|
+
}
|
|
4369
|
+
}, interactiveProps), (0, lodash_exports.omit)(restProps, PROP_KEYS)),
|
|
4370
|
+
/* @__PURE__ */ react_default.createElement(StyledSvg, { height, width, "aria-labelledby": titleId, "data-test": "sparkline-svg" }, /* @__PURE__ */ react_default.createElement("title", { id: titleId, "data-test": "sparkline-title" }, ariaLabel), /* @__PURE__ */ react_default.createElement("g", null, showTooltip ? renderCursor(currentPointX, showCursorAndTooltip) : null, renderPolyline(points), renderArea(points), dotsToShow ? renderEndDots(points, dotsToShow, xMargin) : null, renderRect(points, xMargin), showTooltip ? renderTooltip(tooltipValue, showCursorAndTooltip) : null))
|
|
4371
|
+
);
|
|
4372
|
+
};
|
|
4373
|
+
var SparkLine = (_a) => {
|
|
4374
|
+
var _b = _a, { data = [] } = _b, props = __objRest(_b, ["data"]);
|
|
4375
|
+
if (true) {
|
|
4376
|
+
if (!Array.isArray(data)) {
|
|
4377
|
+
console.error("Data provided to SparkLine must be an array.");
|
|
4358
4378
|
return null;
|
|
4359
4379
|
}
|
|
4360
|
-
if (
|
|
4361
|
-
|
|
4380
|
+
if (!data.every((value) => value === null || (0, lodash_exports.isFinite)(value))) {
|
|
4381
|
+
console.error("Data provided to SparkLine must contain finite numbers or null.");
|
|
4382
|
+
return null;
|
|
4362
4383
|
}
|
|
4363
|
-
const xMargin = endDotRadius + endDotStrokeWidth / 2;
|
|
4364
|
-
const yMargin = Math.max(lineStrokeWidth / 2, endDotRadius + endDotStrokeWidth / 2);
|
|
4365
|
-
const points = this.dataToPoints(xMargin, yMargin);
|
|
4366
|
-
const dotsToShow = Math.max(showEndDot && 1, (0, lodash_exports.isFinite)(endDotCount) && endDotCount > 0 && endDotCount);
|
|
4367
|
-
const { currentPointX, tooltipValue, showCursorAndTooltip, interactiveProps } = this.getInteractionState({
|
|
4368
|
-
data,
|
|
4369
|
-
points,
|
|
4370
|
-
showTooltip,
|
|
4371
|
-
activeIndex,
|
|
4372
|
-
hoveredIndex,
|
|
4373
|
-
componentIsFocused
|
|
4374
|
-
});
|
|
4375
|
-
const ariaLabel = title || (0, i18n_exports._)("Source count over time sparkline trend");
|
|
4376
|
-
return /* @__PURE__ */ react_default.createElement(
|
|
4377
|
-
"div",
|
|
4378
|
-
__spreadValues(__spreadValues({
|
|
4379
|
-
"data-test": "line",
|
|
4380
|
-
"data-test-type": isArea ? "area" : "line",
|
|
4381
|
-
ref: (el) => {
|
|
4382
|
-
this.containerRef.current = el;
|
|
4383
|
-
if (typeof elementRef === "function") {
|
|
4384
|
-
elementRef(el);
|
|
4385
|
-
} else if (elementRef && typeof elementRef === "object") {
|
|
4386
|
-
elementRef.current = el;
|
|
4387
|
-
}
|
|
4388
|
-
}
|
|
4389
|
-
}, interactiveProps), (0, lodash_exports.omit)(this.props, (0, lodash_exports.keys)(_SparkLine.propTypes))),
|
|
4390
|
-
/* @__PURE__ */ react_default.createElement(
|
|
4391
|
-
StyledSvg,
|
|
4392
|
-
{
|
|
4393
|
-
height,
|
|
4394
|
-
width,
|
|
4395
|
-
"aria-labelledby": this.titleId,
|
|
4396
|
-
"data-test": "sparkline-svg"
|
|
4397
|
-
},
|
|
4398
|
-
/* @__PURE__ */ react_default.createElement("title", { id: this.titleId, "data-test": "sparkline-title" }, ariaLabel),
|
|
4399
|
-
/* @__PURE__ */ react_default.createElement("g", null, showTooltip ? this.renderCursor(currentPointX, showCursorAndTooltip) : null, this.renderPolyline(points), this.renderArea(points), dotsToShow ? this.renderEndDots(points, dotsToShow, xMargin) : null, this.renderRect(points, xMargin), showTooltip ? this.renderTooltip(tooltipValue, showCursorAndTooltip) : null)
|
|
4400
|
-
)
|
|
4401
|
-
);
|
|
4402
4384
|
}
|
|
4385
|
+
return /* @__PURE__ */ react_default.createElement(SparkLineInner, __spreadValues({ data }, props));
|
|
4403
4386
|
};
|
|
4404
|
-
__publicField(_SparkLine, "propTypes", {
|
|
4405
|
-
/**
|
|
4406
|
-
* If true, data can contain `null` as a value and is treated as `0`. If false, this throws error when data contains `null`.
|
|
4407
|
-
*/
|
|
4408
|
-
acceptNull: prop_types_default.bool,
|
|
4409
|
-
/** Array of numbers. These data numbers are converted to points and show on sparkline. */
|
|
4410
|
-
data: (props) => {
|
|
4411
|
-
if (!(0, lodash_exports.isArray)(props.data)) {
|
|
4412
|
-
return new Error("Data provided to Sparkline must be an array.");
|
|
4413
|
-
}
|
|
4414
|
-
if (props.acceptNull && !props.data.every((value) => (0, lodash_exports.isNull)(value) || (0, lodash_exports.isFinite)(value))) {
|
|
4415
|
-
return new Error("Data provided to Sparkline must be finite numbers or null.");
|
|
4416
|
-
}
|
|
4417
|
-
if (!props.acceptNull && !props.data.every((value) => (0, lodash_exports.isFinite)(value))) {
|
|
4418
|
-
return new Error("Data provided to Sparkline must be finite numbers.");
|
|
4419
|
-
}
|
|
4420
|
-
return null;
|
|
4421
|
-
},
|
|
4422
|
-
/** A React ref which is set to the DOM element when the component mounts and `null` when it unmounts. */
|
|
4423
|
-
elementRef: prop_types_default.oneOfType([prop_types_default.func, prop_types_default.object]),
|
|
4424
|
-
/** Sets the number of end dots to display. When showEndDot is set to `true`, endDotCount is at least 1. If set to a positive value, this overrides showEndDot. */
|
|
4425
|
-
endDotCount: prop_types_default.number,
|
|
4426
|
-
/** Fills color to the end dot. */
|
|
4427
|
-
endDotFillColor: prop_types_default.string,
|
|
4428
|
-
/**
|
|
4429
|
-
* Sets end dot radius. End dot radius must be less than or equal to the margin. By default, its value equals the margin.
|
|
4430
|
-
*/
|
|
4431
|
-
endDotRadius: prop_types_default.number,
|
|
4432
|
-
/** Sets end dot circle stroke color. */
|
|
4433
|
-
endDotStroke: prop_types_default.string,
|
|
4434
|
-
/** Sets end dot circle stroke width in pixels. */
|
|
4435
|
-
endDotStrokeWidth: prop_types_default.number,
|
|
4436
|
-
/** Fills color to area. */
|
|
4437
|
-
fillColor: prop_types_default.string,
|
|
4438
|
-
/** Fills opacity to area. Value must be in 0 ~ 1. */
|
|
4439
|
-
fillOpacity: prop_types_default.string,
|
|
4440
|
-
/** Sets cursor stroke color. */
|
|
4441
|
-
cursorStroke: prop_types_default.string,
|
|
4442
|
-
/** Sets cursor stroke width in pixels. */
|
|
4443
|
-
cursorStrokeWidth: prop_types_default.number,
|
|
4444
|
-
/** Sets cursor line cap style. */
|
|
4445
|
-
cursorStrokeLinecap: prop_types_default.oneOf(["butt", "round", "square"]),
|
|
4446
|
-
/** Sets cursor dash array style. */
|
|
4447
|
-
cursorStrokeDasharray: prop_types_default.string,
|
|
4448
|
-
/**
|
|
4449
|
-
* Container height. If this value is specified, sparkline calculates the size using this height. If height isn't specified,
|
|
4450
|
-
* sparkline figures out the container height by itself.
|
|
4451
|
-
*/
|
|
4452
|
-
height: prop_types_default.number.isRequired,
|
|
4453
|
-
/** When set to `true`, sparkline shows as area. */
|
|
4454
|
-
isArea: prop_types_default.bool,
|
|
4455
|
-
/** The sparkline line color. */
|
|
4456
|
-
lineColor: prop_types_default.string,
|
|
4457
|
-
/** Allows user to draw only the last data points for the line. */
|
|
4458
|
-
lineLength: prop_types_default.number,
|
|
4459
|
-
/** The sparkline line stroke width in pixels. */
|
|
4460
|
-
lineStrokeWidth: prop_types_default.number,
|
|
4461
|
-
/** Enable to show end dot. */
|
|
4462
|
-
showEndDot: prop_types_default.bool,
|
|
4463
|
-
/** Enable to show tooltip. */
|
|
4464
|
-
showTooltip: prop_types_default.bool,
|
|
4465
|
-
/** Sets the data value range and maximum value shown on sparkline. */
|
|
4466
|
-
yMax: prop_types_default.number,
|
|
4467
|
-
/** Sets the data value range and minimum value shown on sparkline. */
|
|
4468
|
-
yMin: prop_types_default.number,
|
|
4469
|
-
/**
|
|
4470
|
-
* The width of the container.
|
|
4471
|
-
*/
|
|
4472
|
-
width: prop_types_default.number.isRequired,
|
|
4473
|
-
/** Sets the a11y title text on sparkline. */
|
|
4474
|
-
title: prop_types_default.string
|
|
4475
|
-
});
|
|
4476
|
-
__publicField(_SparkLine, "defaultProps", {
|
|
4477
|
-
acceptNull: false,
|
|
4478
|
-
data: [],
|
|
4479
|
-
showTooltip: true,
|
|
4480
|
-
endDotCount: 0,
|
|
4481
|
-
showEndDot: false,
|
|
4482
|
-
endDotRadius: 0,
|
|
4483
|
-
endDotFillColor: "white",
|
|
4484
|
-
endDotStroke: "black",
|
|
4485
|
-
endDotStrokeWidth: 0,
|
|
4486
|
-
fillColor: "#65a637",
|
|
4487
|
-
fillOpacity: ".1",
|
|
4488
|
-
cursorStroke: "#5184AF",
|
|
4489
|
-
cursorStrokeWidth: 3,
|
|
4490
|
-
cursorStrokeLinecap: "square",
|
|
4491
|
-
cursorStrokeDasharray: "1, 5",
|
|
4492
|
-
isArea: false,
|
|
4493
|
-
lineColor: "#65a637",
|
|
4494
|
-
lineStrokeWidth: 1
|
|
4495
|
-
});
|
|
4496
|
-
var SparkLine = _SparkLine;
|
|
4497
4387
|
var SparkLine_default = SparkLine;
|
|
4498
4388
|
|
|
4499
4389
|
// src/Table/cells/SparklineCell.tsx
|
|
@@ -4587,6 +4477,72 @@ var SparklineCell = ({
|
|
|
4587
4477
|
};
|
|
4588
4478
|
SparklineCell.displayName = "SparklineCell";
|
|
4589
4479
|
|
|
4480
|
+
// src/common/hooks/useDynamicHeight.ts
|
|
4481
|
+
var PAGINATOR_CONTAINER_HEIGHT = 38;
|
|
4482
|
+
var PAGINATOR_SPACING = 5;
|
|
4483
|
+
var useDynamicHeight = ({
|
|
4484
|
+
dynamicHeight,
|
|
4485
|
+
onRequestHeight,
|
|
4486
|
+
isPaging,
|
|
4487
|
+
rows,
|
|
4488
|
+
expandedRowJson
|
|
4489
|
+
}) => {
|
|
4490
|
+
const containerRef = (0, react_exports.useRef)(null);
|
|
4491
|
+
const containerRefInner = (0, react_exports.useRef)(null);
|
|
4492
|
+
const suiTableRef = (0, react_exports.useRef)(null);
|
|
4493
|
+
const lastReportedHeight = (0, react_exports.useRef)(null);
|
|
4494
|
+
const lastContentHeightRef = (0, react_exports.useRef)(void 0);
|
|
4495
|
+
const prevRowsRef = (0, react_exports.useRef)(rows);
|
|
4496
|
+
const prevExpandedRef = (0, react_exports.useRef)(expandedRowJson);
|
|
4497
|
+
(0, react_exports.useEffect)(() => {
|
|
4498
|
+
var _a, _b;
|
|
4499
|
+
if (!dynamicHeight || !onRequestHeight) {
|
|
4500
|
+
return void 0;
|
|
4501
|
+
}
|
|
4502
|
+
const contentChanged = prevRowsRef.current !== rows || prevExpandedRef.current !== expandedRowJson;
|
|
4503
|
+
prevRowsRef.current = rows;
|
|
4504
|
+
prevExpandedRef.current = expandedRowJson;
|
|
4505
|
+
if (contentChanged) {
|
|
4506
|
+
lastReportedHeight.current = null;
|
|
4507
|
+
}
|
|
4508
|
+
const containerEl = containerRef.current;
|
|
4509
|
+
const viewport = containerRefInner.current;
|
|
4510
|
+
const contentNode = (_b = (_a = suiTableRef.current) == null ? void 0 : _a.querySelector("table")) != null ? _b : null;
|
|
4511
|
+
const reportNaturalHeight = () => {
|
|
4512
|
+
var _a2, _b2;
|
|
4513
|
+
const rawPadding = containerEl ? Number.parseInt(getComputedStyle(containerEl).paddingTop, 10) : 0;
|
|
4514
|
+
const paddingOffset = (Number.isNaN(rawPadding) ? 0 : rawPadding) * 2;
|
|
4515
|
+
const paginatorChrome = isPaging ? PAGINATOR_CONTAINER_HEIGHT + PAGINATOR_SPACING : 0;
|
|
4516
|
+
const measuredHeight = (_b2 = (_a2 = contentNode == null ? void 0 : contentNode.scrollHeight) != null ? _a2 : viewport == null ? void 0 : viewport.scrollHeight) != null ? _b2 : 0;
|
|
4517
|
+
const naturalHeight = Math.ceil(measuredHeight + paddingOffset + paginatorChrome);
|
|
4518
|
+
lastContentHeightRef.current = naturalHeight;
|
|
4519
|
+
if (naturalHeight !== lastReportedHeight.current) {
|
|
4520
|
+
lastReportedHeight.current = naturalHeight;
|
|
4521
|
+
onRequestHeight(naturalHeight);
|
|
4522
|
+
}
|
|
4523
|
+
};
|
|
4524
|
+
if (!contentNode) {
|
|
4525
|
+
reportNaturalHeight();
|
|
4526
|
+
return void 0;
|
|
4527
|
+
}
|
|
4528
|
+
reportNaturalHeight();
|
|
4529
|
+
const observer = new ResizeObserver(reportNaturalHeight);
|
|
4530
|
+
observer.observe(contentNode);
|
|
4531
|
+
return () => observer.disconnect();
|
|
4532
|
+
}, [dynamicHeight, isPaging, rows, expandedRowJson, onRequestHeight]);
|
|
4533
|
+
(0, react_exports.useEffect)(() => {
|
|
4534
|
+
if (lastContentHeightRef.current === void 0) {
|
|
4535
|
+
return;
|
|
4536
|
+
}
|
|
4537
|
+
if (dynamicHeight) {
|
|
4538
|
+
onRequestHeight == null ? void 0 : onRequestHeight(lastContentHeightRef.current);
|
|
4539
|
+
} else {
|
|
4540
|
+
onRequestHeight == null ? void 0 : onRequestHeight(void 0);
|
|
4541
|
+
}
|
|
4542
|
+
}, [dynamicHeight, onRequestHeight]);
|
|
4543
|
+
return { containerRef, containerRefInner, suiTableRef };
|
|
4544
|
+
};
|
|
4545
|
+
|
|
4590
4546
|
// src/common/utils/textUtils.ts
|
|
4591
4547
|
var VIZ_FONT_FAMILY = "'Splunk Platform Sans', 'Splunk Data Sans', Roboto, Droid, 'Helvetica Neue', Helvetica, Arial, sans-serif";
|
|
4592
4548
|
|
|
@@ -4737,20 +4693,35 @@ var headerTextOverflowStyles = {
|
|
|
4737
4693
|
`,
|
|
4738
4694
|
anywhere: `
|
|
4739
4695
|
word-break: break-all;
|
|
4740
|
-
white-space:
|
|
4696
|
+
white-space: pre-wrap;
|
|
4697
|
+
text-overflow: clip;
|
|
4741
4698
|
display: inline;
|
|
4742
4699
|
`,
|
|
4743
|
-
|
|
4744
|
-
word-break:
|
|
4745
|
-
|
|
4746
|
-
white-space:
|
|
4747
|
-
|
|
4700
|
+
"break-word": `
|
|
4701
|
+
word-break: normal;
|
|
4702
|
+
overflow-wrap: normal;
|
|
4703
|
+
white-space: normal;
|
|
4704
|
+
overflow: hidden;
|
|
4705
|
+
text-overflow: ellipsis;
|
|
4706
|
+
display: block;
|
|
4748
4707
|
`
|
|
4749
4708
|
};
|
|
4750
4709
|
var TableHeadCell = styled_components_default(Table_default.HeadCell)`
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4710
|
+
${(props) => {
|
|
4711
|
+
const type = props.textOverflowType;
|
|
4712
|
+
const styles = type && headerTextOverflowStyles[type];
|
|
4713
|
+
if (!styles) return "";
|
|
4714
|
+
const expandsHeader = type === "break-word" || type === "anywhere";
|
|
4715
|
+
return styled_components_exports.css`
|
|
4716
|
+
&& :is(button, div) {
|
|
4717
|
+
min-height: 100%;
|
|
4718
|
+
${expandsHeader ? "grid-template-rows: auto 1fr; height: auto;" : ""}
|
|
4719
|
+
}
|
|
4720
|
+
&& :is(button, div) > span {
|
|
4721
|
+
${styles}
|
|
4722
|
+
}
|
|
4723
|
+
`;
|
|
4724
|
+
}}
|
|
4754
4725
|
`;
|
|
4755
4726
|
var VizTableContainer = styled_components_default.div`
|
|
4756
4727
|
box-sizing: border-box;
|
|
@@ -4775,8 +4746,6 @@ var VizTableContainer = styled_components_default.div`
|
|
|
4775
4746
|
}
|
|
4776
4747
|
`;
|
|
4777
4748
|
VizTableContainer.displayName = "VizTableContainer";
|
|
4778
|
-
var PAGINATOR_CONTAINER_HEIGHT = 38;
|
|
4779
|
-
var PAGINATOR_SPACING = 5;
|
|
4780
4749
|
var SUITableContainer = styled_components_default.div`
|
|
4781
4750
|
& * {
|
|
4782
4751
|
font-family: ${(props) => props.font};
|
|
@@ -4988,11 +4957,11 @@ var PureTable = (props) => {
|
|
|
4988
4957
|
headerVisibility,
|
|
4989
4958
|
font,
|
|
4990
4959
|
fontSize,
|
|
4991
|
-
showColumnAsExpandedJson
|
|
4960
|
+
showColumnAsExpandedJson,
|
|
4961
|
+
dynamicHeight,
|
|
4962
|
+
onRequestHeight
|
|
4992
4963
|
} = _a;
|
|
4993
4964
|
const [columns, setColumns] = react_exports.useState(columnFormat);
|
|
4994
|
-
const containerRef = react_exports.useRef(null);
|
|
4995
|
-
const containerRefInner = react_exports.useRef(null);
|
|
4996
4965
|
const [isResizing, setResizing] = react_exports.useState(false);
|
|
4997
4966
|
const firstRenderCount = react_exports.useRef(count);
|
|
4998
4967
|
react_exports.useEffect(() => {
|
|
@@ -5019,6 +4988,13 @@ var PureTable = (props) => {
|
|
|
5019
4988
|
() => expandedRowJson.some((rowJson) => rowJson.isExpandable),
|
|
5020
4989
|
[expandedRowJson]
|
|
5021
4990
|
);
|
|
4991
|
+
const { containerRef, containerRefInner, suiTableRef } = useDynamicHeight({
|
|
4992
|
+
dynamicHeight,
|
|
4993
|
+
onRequestHeight,
|
|
4994
|
+
isPaging,
|
|
4995
|
+
rows: tableBody.rows,
|
|
4996
|
+
expandedRowJson
|
|
4997
|
+
});
|
|
5022
4998
|
const TableHead = useTableHead(headerVisibility);
|
|
5023
4999
|
const debouncedDrilldown = react_exports.useMemo(
|
|
5024
5000
|
() => debounce_default((e, payload) => {
|
|
@@ -5192,6 +5168,7 @@ var PureTable = (props) => {
|
|
|
5192
5168
|
/* @__PURE__ */ react_exports.createElement(
|
|
5193
5169
|
Table_default,
|
|
5194
5170
|
{
|
|
5171
|
+
elementRef: suiTableRef,
|
|
5195
5172
|
resizableFillLayout: true,
|
|
5196
5173
|
headType: isHeaderHidden ? void 0 : "inline",
|
|
5197
5174
|
rowExpansion: hasExpandableRows ? "multi" : "none",
|
|
@@ -5368,7 +5345,9 @@ PureTable.propTypes = {
|
|
|
5368
5345
|
width: prop_types_exports.oneOfType([prop_types_exports.number]),
|
|
5369
5346
|
onColumnFormatChange: prop_types_exports.func,
|
|
5370
5347
|
font: prop_types_exports.string,
|
|
5371
|
-
fontSize: prop_types_exports.string
|
|
5348
|
+
fontSize: prop_types_exports.string,
|
|
5349
|
+
dynamicHeight: prop_types_exports.bool,
|
|
5350
|
+
onRequestHeight: prop_types_exports.func
|
|
5372
5351
|
};
|
|
5373
5352
|
PureTable.defaultProps = {
|
|
5374
5353
|
columnFormat: {},
|
|
@@ -5394,7 +5373,8 @@ PureTable.defaultProps = {
|
|
|
5394
5373
|
width: 300,
|
|
5395
5374
|
onColumnFormatChange: lodash_exports.noop,
|
|
5396
5375
|
font: fontMap.proportional,
|
|
5397
|
-
fontSize: fontSizeMap.default
|
|
5376
|
+
fontSize: fontSizeMap.default,
|
|
5377
|
+
dynamicHeight: false
|
|
5398
5378
|
};
|
|
5399
5379
|
PureTable.displayName = "VizTable";
|
|
5400
5380
|
var PureTable_default = withEmptyTableMessage(FixedSizeContainer_default(PureTable));
|
|
@@ -5432,9 +5412,9 @@ var computeVizProps = (_a) => {
|
|
|
5432
5412
|
const handleColumnFormatChange = (updatedColumnFormat) => {
|
|
5433
5413
|
var _a3;
|
|
5434
5414
|
const cloneOfExistingColumnFormat = __spreadValues({}, ((_a3 = vizProps == null ? void 0 : vizProps.options) == null ? void 0 : _a3.columnFormat) || {});
|
|
5435
|
-
const
|
|
5415
|
+
const keys = Object.keys(updatedColumnFormat);
|
|
5436
5416
|
const values = Object.values(updatedColumnFormat);
|
|
5437
|
-
|
|
5417
|
+
keys.forEach((key, index) => {
|
|
5438
5418
|
if (!cloneOfExistingColumnFormat[key]) {
|
|
5439
5419
|
cloneOfExistingColumnFormat[key] = {};
|
|
5440
5420
|
}
|