@splunk/visualizations 28.6.0 → 28.7.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/Bar.js +2 -2
- package/Bubble.js +2 -2
- package/CHANGELOG.external.md +19 -50
- package/ChoroplethSvg.js +2 -2
- package/Column.js +2 -2
- package/Ellipse.js +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 +2 -2
- package/Image.js +2 -2
- package/Line.js +2 -2
- package/LinkGraph.js +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.js +23 -6
- package/Markdown.js.map +2 -2
- package/MarkerGauge.js +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/Pie.js +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/README.md +2 -0
- package/Rectangle.js +2 -2
- package/RichText.js +2 -2
- package/Sankey.js +2 -2
- package/Scatter.js +2 -2
- package/SingleValue.js +368 -471
- package/SingleValue.js.map +4 -4
- package/SingleValueIcon.js +2 -2
- package/SingleValueRadial.js +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.map +1 -1
- package/Table/hooks.d.ts +1 -1
- package/Table/hooks.d.ts.map +1 -1
- package/Table.js +391 -493
- package/Table.js.map +4 -4
- package/Timeline.js +2 -2
- package/common/OptionsDoc.js.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/docs-llm/INDEX.md +118 -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 +28 -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 +28 -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 +25 -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/package.json +28 -24
package/Table.js
CHANGED
|
@@ -1147,7 +1147,7 @@ var SizeAwareWrapper_default = "default" in defaultImport29 ? defaultImport29.de
|
|
|
1147
1147
|
var isMissing = (v) => {
|
|
1148
1148
|
return v === null || v === void 0;
|
|
1149
1149
|
};
|
|
1150
|
-
var missingKeys = (
|
|
1150
|
+
var missingKeys = (keys, target) => keys.filter((k) => isMissing(target[k]));
|
|
1151
1151
|
var MissingPropsMessage = (props) => {
|
|
1152
1152
|
const {
|
|
1153
1153
|
width = SplunkVisualization_default.defaults.width,
|
|
@@ -1196,7 +1196,7 @@ var Cover = styled_components_default.div`
|
|
|
1196
1196
|
bottom: 0;
|
|
1197
1197
|
`;
|
|
1198
1198
|
var Blocker = styled_components_default.div.attrs({
|
|
1199
|
-
"data-splunk-visualization-version": "28.
|
|
1199
|
+
"data-splunk-visualization-version": "28.7.0 - d7b18cab6"
|
|
1200
1200
|
})`
|
|
1201
1201
|
position: relative;
|
|
1202
1202
|
width: 100%;
|
|
@@ -1277,7 +1277,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
1277
1277
|
FixSizeItem,
|
|
1278
1278
|
{
|
|
1279
1279
|
"data-test": "fix-size-item",
|
|
1280
|
-
"data-splunk-visualization-version": "28.
|
|
1280
|
+
"data-splunk-visualization-version": "28.7.0 - d7b18cab6",
|
|
1281
1281
|
width,
|
|
1282
1282
|
height,
|
|
1283
1283
|
backgroundColor
|
|
@@ -3247,18 +3247,6 @@ var getTextOverflowType = (columnFormat, columnId, tableFormat, currentColumn, d
|
|
|
3247
3247
|
}
|
|
3248
3248
|
return (tableFormat == null ? void 0 : tableFormat.textOverflow) || defaultValue;
|
|
3249
3249
|
};
|
|
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
3250
|
var generateHeader = (value, columnId, i, columnFormat, tableFormat, showInternalFields) => {
|
|
3263
3251
|
const ret = {
|
|
3264
3252
|
key: generateKey(value, String(i)),
|
|
@@ -3274,10 +3262,8 @@ var generateHeader = (value, columnId, i, columnFormat, tableFormat, showInterna
|
|
|
3274
3262
|
const headerAlign = getColumnFormatHeaderAlign(columnFormat, columnId, value) || getTableFormatHeaderAlign(tableFormat) || "left";
|
|
3275
3263
|
ret.align = headerAlign;
|
|
3276
3264
|
ret.truncate = true;
|
|
3277
|
-
const
|
|
3278
|
-
|
|
3279
|
-
ret.textOverflowType = textOverflow;
|
|
3280
|
-
}
|
|
3265
|
+
const explicitTextOverflow = getAttributeFromColumnFormat("textOverflow", columnFormat, columnId, value) || (tableFormat == null ? void 0 : tableFormat.textOverflow);
|
|
3266
|
+
ret.textOverflowType = explicitTextOverflow || (/\s/.test(value) ? "break-word" : "ellipsis");
|
|
3281
3267
|
return ret;
|
|
3282
3268
|
};
|
|
3283
3269
|
var getColumnFormatAlign = (columnFormat, currentColumn, currentRow) => {
|
|
@@ -3908,7 +3894,7 @@ var defaultImport45 = __toESM(require("@splunk/react-ui/Popover"));
|
|
|
3908
3894
|
__reExport(Popover_exports, require("@splunk/react-ui/Popover"));
|
|
3909
3895
|
var Popover_default = "default" in defaultImport45 ? defaultImport45.default : defaultImport45;
|
|
3910
3896
|
|
|
3911
|
-
// src/SparkLine/SparkLine.
|
|
3897
|
+
// src/SparkLine/SparkLine.tsx
|
|
3912
3898
|
var StyledSvg = styled_components_default.svg`
|
|
3913
3899
|
/* For fixing IE11 shows overflow part line issue */
|
|
3914
3900
|
overflow: hidden;
|
|
@@ -3920,233 +3906,262 @@ var StyledTooltip = styled_components_default.div`
|
|
|
3920
3906
|
min-width: 20px;
|
|
3921
3907
|
`;
|
|
3922
3908
|
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
|
-
|
|
3909
|
+
var PROP_KEYS = [
|
|
3910
|
+
"acceptNull",
|
|
3911
|
+
"data",
|
|
3912
|
+
"elementRef",
|
|
3913
|
+
"endDotCount",
|
|
3914
|
+
"endDotFillColor",
|
|
3915
|
+
"endDotRadius",
|
|
3916
|
+
"endDotStroke",
|
|
3917
|
+
"endDotStrokeWidth",
|
|
3918
|
+
"fillColor",
|
|
3919
|
+
"fillOpacity",
|
|
3920
|
+
"cursorStroke",
|
|
3921
|
+
"cursorStrokeWidth",
|
|
3922
|
+
"cursorStrokeLinecap",
|
|
3923
|
+
"cursorStrokeDasharray",
|
|
3924
|
+
"height",
|
|
3925
|
+
"isArea",
|
|
3926
|
+
"lineColor",
|
|
3927
|
+
"lineLength",
|
|
3928
|
+
"lineStrokeWidth",
|
|
3929
|
+
"showEndDot",
|
|
3930
|
+
"showTooltip",
|
|
3931
|
+
"yMax",
|
|
3932
|
+
"yMin",
|
|
3933
|
+
"width",
|
|
3934
|
+
"title"
|
|
3935
|
+
];
|
|
3936
|
+
var SparkLineInner = (_a) => {
|
|
3937
|
+
var _b = _a, {
|
|
3938
|
+
acceptNull = false,
|
|
3939
|
+
data = [],
|
|
3940
|
+
elementRef,
|
|
3941
|
+
endDotCount = 0,
|
|
3942
|
+
endDotFillColor = "white",
|
|
3943
|
+
endDotRadius = 0,
|
|
3944
|
+
endDotStroke = "black",
|
|
3945
|
+
endDotStrokeWidth = 0,
|
|
3946
|
+
fillColor = "#65a637",
|
|
3947
|
+
fillOpacity = ".1",
|
|
3948
|
+
cursorStroke = "#5184AF",
|
|
3949
|
+
cursorStrokeWidth = 3,
|
|
3950
|
+
cursorStrokeLinecap = "square",
|
|
3951
|
+
cursorStrokeDasharray = "1, 5",
|
|
3952
|
+
height,
|
|
3953
|
+
isArea = false,
|
|
3954
|
+
lineColor = "#65a637",
|
|
3955
|
+
lineLength,
|
|
3956
|
+
lineStrokeWidth = 1,
|
|
3957
|
+
showEndDot = false,
|
|
3958
|
+
showTooltip = true,
|
|
3959
|
+
yMax,
|
|
3960
|
+
yMin,
|
|
3961
|
+
width,
|
|
3962
|
+
title
|
|
3963
|
+
} = _b, restProps = __objRest(_b, [
|
|
3964
|
+
"acceptNull",
|
|
3965
|
+
"data",
|
|
3966
|
+
"elementRef",
|
|
3967
|
+
"endDotCount",
|
|
3968
|
+
"endDotFillColor",
|
|
3969
|
+
"endDotRadius",
|
|
3970
|
+
"endDotStroke",
|
|
3971
|
+
"endDotStrokeWidth",
|
|
3972
|
+
"fillColor",
|
|
3973
|
+
"fillOpacity",
|
|
3974
|
+
"cursorStroke",
|
|
3975
|
+
"cursorStrokeWidth",
|
|
3976
|
+
"cursorStrokeLinecap",
|
|
3977
|
+
"cursorStrokeDasharray",
|
|
3978
|
+
"height",
|
|
3979
|
+
"isArea",
|
|
3980
|
+
"lineColor",
|
|
3981
|
+
"lineLength",
|
|
3982
|
+
"lineStrokeWidth",
|
|
3983
|
+
"showEndDot",
|
|
3984
|
+
"showTooltip",
|
|
3985
|
+
"yMax",
|
|
3986
|
+
"yMin",
|
|
3987
|
+
"width",
|
|
3988
|
+
"title"
|
|
3989
|
+
]);
|
|
3990
|
+
const [anchor, setAnchor] = (0, react_exports.useState)(null);
|
|
3991
|
+
const [activeIndex, setActiveIndex] = (0, react_exports.useState)(0);
|
|
3992
|
+
const [hoveredIndex, setHoveredIndex] = (0, react_exports.useState)(null);
|
|
3993
|
+
const [componentIsFocused, setComponentIsFocused] = (0, react_exports.useState)(false);
|
|
3994
|
+
const titleId = (0, react_exports.useMemo)(() => (0, id_exports.createDOMID)("sparkline-title"), []);
|
|
3995
|
+
const pointRefs = (0, react_exports.useRef)([]);
|
|
3996
|
+
const containerRef = (0, react_exports.useRef)(null);
|
|
3997
|
+
const fillNull = (0, react_exports.useCallback)(() => data.map((value) => value != null ? value : 0), [data]);
|
|
3998
|
+
const getMax = (0, react_exports.useCallback)(() => {
|
|
3999
|
+
const dataMax = () => acceptNull ? (0, lodash_exports.max)(fillNull()) : (0, lodash_exports.max)(data);
|
|
4000
|
+
return yMax != null ? yMax : dataMax();
|
|
4001
|
+
}, [acceptNull, data, fillNull, yMax]);
|
|
4002
|
+
const getMin = (0, react_exports.useCallback)(() => {
|
|
4003
|
+
const dataMin = () => acceptNull ? (0, lodash_exports.min)(fillNull()) : (0, lodash_exports.min)(data);
|
|
4004
|
+
return yMin != null ? yMin : dataMin();
|
|
4005
|
+
}, [acceptNull, data, fillNull, yMin]);
|
|
4006
|
+
const getXUnit = (0, react_exports.useCallback)(
|
|
4007
|
+
(xMargin2) => {
|
|
4008
|
+
const xUnit = (width - xMargin2 * 2) / (data.length > 1 ? data.length - 1 : 1);
|
|
4009
|
+
return Math.max(0, xUnit);
|
|
4010
|
+
},
|
|
4011
|
+
[data.length, width]
|
|
4012
|
+
);
|
|
4013
|
+
const getYUnit = (0, react_exports.useCallback)(
|
|
4014
|
+
(yMargin2) => {
|
|
4015
|
+
const maxValue = getMax();
|
|
4016
|
+
const minValue = getMin();
|
|
4017
|
+
const yUnit = (height - yMargin2 * 2) / (maxValue - minValue || 2);
|
|
4018
|
+
return Math.max(0, yUnit);
|
|
4019
|
+
},
|
|
4020
|
+
[getMax, getMin, height]
|
|
4021
|
+
);
|
|
4022
|
+
const getSegmentSets = (0, react_exports.useCallback)(
|
|
4023
|
+
(segmentData, points2) => {
|
|
4024
|
+
const lines = [];
|
|
4025
|
+
const isolatedPoints = [];
|
|
4026
|
+
let currentLine = [];
|
|
4027
|
+
for (const [idx, p] of segmentData.entries()) {
|
|
4028
|
+
if (!acceptNull && (0, lodash_exports.isNull)(p)) {
|
|
4029
|
+
if (currentLine.length > 1) {
|
|
4030
|
+
lines.push(currentLine);
|
|
4031
|
+
} else if (currentLine.length === 1) {
|
|
4032
|
+
isolatedPoints.push(currentLine[0]);
|
|
4033
|
+
}
|
|
4034
|
+
currentLine = [];
|
|
4035
|
+
} else {
|
|
4036
|
+
currentLine.push(points2[idx]);
|
|
4037
|
+
}
|
|
3958
4038
|
}
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
return
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
4039
|
+
if (currentLine.length > 1) {
|
|
4040
|
+
lines.push(currentLine);
|
|
4041
|
+
} else if (currentLine.length === 1) {
|
|
4042
|
+
isolatedPoints.push(currentLine[0]);
|
|
4043
|
+
}
|
|
4044
|
+
return { lines, isolatedPoints };
|
|
4045
|
+
},
|
|
4046
|
+
[acceptNull]
|
|
4047
|
+
);
|
|
4048
|
+
const dataToPoints = (0, react_exports.useCallback)(
|
|
4049
|
+
(xMargin2, yMargin2) => {
|
|
4050
|
+
const xUnit = getXUnit(xMargin2);
|
|
4051
|
+
const yUnit = getYUnit(yMargin2);
|
|
4052
|
+
const maxValue = getMax();
|
|
4053
|
+
const minValue = getMin();
|
|
4054
|
+
return data.map((val, idx) => ({
|
|
4055
|
+
x: idx * xUnit + xMargin2,
|
|
4056
|
+
y: maxValue === minValue ? yUnit + yMargin2 : (maxValue - val) * yUnit + yMargin2
|
|
4057
|
+
})).map((p) => [p.x, p.y]);
|
|
4058
|
+
},
|
|
4059
|
+
[data, getMax, getMin, getXUnit, getYUnit]
|
|
4060
|
+
);
|
|
4061
|
+
const handleFocus = (0, react_exports.useCallback)(
|
|
4062
|
+
(event) => {
|
|
4063
|
+
const { target } = event;
|
|
4064
|
+
const { pointIndex: pointIndexStr } = target.dataset || {};
|
|
4065
|
+
if (pointIndexStr !== void 0) {
|
|
4066
|
+
const pointIndex = Number.parseInt(pointIndexStr, 10);
|
|
4067
|
+
if (activeIndex !== pointIndex || !componentIsFocused || hoveredIndex !== null) {
|
|
4068
|
+
setActiveIndex(pointIndex);
|
|
4069
|
+
setHoveredIndex(null);
|
|
4070
|
+
setComponentIsFocused(true);
|
|
4071
|
+
}
|
|
4072
|
+
} else if (pointRefs.current.length > 0) {
|
|
4073
|
+
const indexToFocus = activeIndex ? Math.min(pointRefs.current.length - 1, activeIndex) : 0;
|
|
4074
|
+
pointRefs.current[indexToFocus].focus();
|
|
4075
|
+
}
|
|
4076
|
+
},
|
|
4077
|
+
[activeIndex, componentIsFocused, hoveredIndex]
|
|
4078
|
+
);
|
|
4079
|
+
const handleBlur = (0, react_exports.useCallback)((event) => {
|
|
4080
|
+
if (containerRef.current && !containerRef.current.contains(event.relatedTarget)) {
|
|
4081
|
+
setComponentIsFocused(false);
|
|
3979
4082
|
}
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
4083
|
+
}, []);
|
|
4084
|
+
const handleKeyDown = (0, react_exports.useCallback)(
|
|
4085
|
+
(event) => {
|
|
4086
|
+
const numPoints = data.length;
|
|
4087
|
+
const allowedKeys = ["ArrowLeft", "ArrowRight", "Home", "End"];
|
|
4088
|
+
if (!allowedKeys.includes(event.key)) {
|
|
4089
|
+
return;
|
|
4090
|
+
}
|
|
4091
|
+
let newIndex;
|
|
4092
|
+
if (event.key === "Home") {
|
|
3983
4093
|
newIndex = 0;
|
|
3984
|
-
|
|
3985
|
-
case "End":
|
|
4094
|
+
} else if (event.key === "End") {
|
|
3986
4095
|
newIndex = numPoints - 1;
|
|
3987
|
-
|
|
3988
|
-
case "ArrowLeft":
|
|
4096
|
+
} else if (event.key === "ArrowLeft") {
|
|
3989
4097
|
newIndex = Math.max(0, activeIndex - 1);
|
|
3990
|
-
|
|
3991
|
-
case "ArrowRight":
|
|
4098
|
+
} else {
|
|
3992
4099
|
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
4100
|
}
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
const pointIndex = Number.parseInt(pointIndexStr, 10);
|
|
4008
|
-
if (this.state.hoveredIndex !== pointIndex) {
|
|
4009
|
-
this.setState({ hoveredIndex: pointIndex });
|
|
4101
|
+
if (newIndex !== activeIndex) {
|
|
4102
|
+
event.preventDefault();
|
|
4103
|
+
if (pointRefs.current[newIndex]) {
|
|
4104
|
+
pointRefs.current[newIndex].focus();
|
|
4105
|
+
}
|
|
4010
4106
|
}
|
|
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]);
|
|
4107
|
+
},
|
|
4108
|
+
[activeIndex, data.length]
|
|
4109
|
+
);
|
|
4110
|
+
const handleMouseOver = (0, react_exports.useCallback)(
|
|
4111
|
+
(event) => {
|
|
4112
|
+
var _a2;
|
|
4113
|
+
const pointIndexStr = (_a2 = event.target.dataset) == null ? void 0 : _a2.pointIndex;
|
|
4114
|
+
if (pointIndexStr !== void 0) {
|
|
4115
|
+
const pointIndex = Number.parseInt(pointIndexStr, 10);
|
|
4116
|
+
if (hoveredIndex !== pointIndex) {
|
|
4117
|
+
setHoveredIndex(pointIndex);
|
|
4070
4118
|
}
|
|
4071
|
-
currentLine = [];
|
|
4072
|
-
} else {
|
|
4073
|
-
currentLine.push(points[idx]);
|
|
4074
4119
|
}
|
|
4120
|
+
},
|
|
4121
|
+
[hoveredIndex]
|
|
4122
|
+
);
|
|
4123
|
+
const handleMouseLeave = (0, react_exports.useCallback)(() => {
|
|
4124
|
+
if (hoveredIndex !== null) {
|
|
4125
|
+
setHoveredIndex(null);
|
|
4075
4126
|
}
|
|
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) {
|
|
4127
|
+
}, [hoveredIndex]);
|
|
4128
|
+
const handleCursorMount = (0, react_exports.useCallback)((el) => {
|
|
4129
|
+
setAnchor(el);
|
|
4130
|
+
}, []);
|
|
4131
|
+
const renderRect = (points2, xMargin2) => {
|
|
4132
|
+
const xUnit = getXUnit(xMargin2);
|
|
4133
|
+
return points2.map((p, i) => {
|
|
4134
|
+
var _a2;
|
|
4135
|
+
return (
|
|
4136
|
+
/* eslint-disable react/no-array-index-key */
|
|
4137
|
+
/* @__PURE__ */ react_default.createElement(
|
|
4138
|
+
"rect",
|
|
4139
|
+
{
|
|
4140
|
+
key: `${i}_${p[0]}`,
|
|
4141
|
+
role: "graphics-symbol",
|
|
4142
|
+
"aria-label": `Value: ${(_a2 = data[i]) != null ? _a2 : "N/A"}, point ${i + 1} of ${data.length}`,
|
|
4143
|
+
"data-test": `rect-${i}`,
|
|
4144
|
+
"data-point-index": i,
|
|
4145
|
+
tabIndex: showTooltip && activeIndex === i ? 0 : -1,
|
|
4146
|
+
ref: (el) => {
|
|
4147
|
+
pointRefs.current[i] = el;
|
|
4148
|
+
},
|
|
4149
|
+
x: Math.max(0, p[0] - xUnit / 2),
|
|
4150
|
+
y: 0,
|
|
4151
|
+
width: i === 0 && data.length !== 1 ? xUnit / 2 : xUnit,
|
|
4152
|
+
height,
|
|
4153
|
+
style: { fillOpacity: 0 },
|
|
4154
|
+
onMouseDown: preventDefault
|
|
4155
|
+
}
|
|
4156
|
+
)
|
|
4157
|
+
);
|
|
4158
|
+
});
|
|
4159
|
+
};
|
|
4160
|
+
const renderArea = (points2) => {
|
|
4161
|
+
if (!isArea || points2.length === 0) {
|
|
4147
4162
|
return null;
|
|
4148
4163
|
}
|
|
4149
|
-
const { lines } =
|
|
4164
|
+
const { lines } = getSegmentSets(data, points2);
|
|
4150
4165
|
const segments = lines.map(
|
|
4151
4166
|
(s) => s.concat([
|
|
4152
4167
|
[s.at(-1)[0], height],
|
|
@@ -4170,80 +4185,56 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
4170
4185
|
}
|
|
4171
4186
|
}
|
|
4172
4187
|
)));
|
|
4173
|
-
}
|
|
4174
|
-
renderCursor(
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
"
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
strokeLinecap: cursorStrokeLinecap,
|
|
4189
|
-
strokeDasharray: cursorStrokeDasharray
|
|
4190
|
-
}
|
|
4188
|
+
};
|
|
4189
|
+
const renderCursor = (currentPointX2, shouldRender) => shouldRender && /* @__PURE__ */ react_default.createElement(
|
|
4190
|
+
"line",
|
|
4191
|
+
{
|
|
4192
|
+
"data-test": "cursor",
|
|
4193
|
+
ref: handleCursorMount,
|
|
4194
|
+
x1: currentPointX2,
|
|
4195
|
+
y1: 0,
|
|
4196
|
+
x2: currentPointX2,
|
|
4197
|
+
y2: height,
|
|
4198
|
+
style: {
|
|
4199
|
+
stroke: cursorStroke,
|
|
4200
|
+
strokeWidth: cursorStrokeWidth,
|
|
4201
|
+
strokeLinecap: cursorStrokeLinecap,
|
|
4202
|
+
strokeDasharray: cursorStrokeDasharray
|
|
4191
4203
|
}
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
renderTooltip(
|
|
4195
|
-
const
|
|
4196
|
-
const displayValue = tooltipValue === null ? "-" : tooltipValue;
|
|
4204
|
+
}
|
|
4205
|
+
);
|
|
4206
|
+
const renderTooltip = (tooltipValue2, isOpen) => {
|
|
4207
|
+
const displayValue = tooltipValue2 === null ? "-" : tooltipValue2;
|
|
4197
4208
|
return /* @__PURE__ */ react_default.createElement(
|
|
4198
4209
|
Popover_default,
|
|
4199
4210
|
{
|
|
4200
4211
|
"data-test": "tooltip",
|
|
4201
4212
|
open: isOpen,
|
|
4202
4213
|
anchor,
|
|
4203
|
-
"data-test-value":
|
|
4214
|
+
"data-test-value": tooltipValue2,
|
|
4204
4215
|
appearance: "inverted",
|
|
4205
4216
|
defaultPlacement: "above",
|
|
4206
4217
|
animation: false
|
|
4207
4218
|
},
|
|
4208
4219
|
/* @__PURE__ */ react_default.createElement(StyledTooltip, null, displayValue)
|
|
4209
4220
|
);
|
|
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
|
-
}
|
|
4221
|
+
};
|
|
4222
|
+
const renderEndDots = (points2, dotsToShow2, xMargin2) => /* @__PURE__ */ react_default.createElement("g", null, points2.slice(-dotsToShow2).map((point) => /* @__PURE__ */ react_default.createElement(
|
|
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 ? xMargin2 : endDotRadius,
|
|
4230
|
+
style: {
|
|
4231
|
+
fill: endDotFillColor,
|
|
4232
|
+
stroke: endDotStroke,
|
|
4233
|
+
strokeWidth: endDotStrokeWidth
|
|
4235
4234
|
}
|
|
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;
|
|
4235
|
+
}
|
|
4236
|
+
)));
|
|
4237
|
+
const renderIsolatedPoints = (isolatedPoints) => {
|
|
4247
4238
|
if (!isolatedPoints || isolatedPoints.length === 0) {
|
|
4248
4239
|
return null;
|
|
4249
4240
|
}
|
|
@@ -4261,20 +4252,10 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
4261
4252
|
}
|
|
4262
4253
|
}
|
|
4263
4254
|
)));
|
|
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
|
-
);
|
|
4255
|
+
};
|
|
4256
|
+
const renderPolyline = (points2) => {
|
|
4257
|
+
const linePoints = (0, lodash_exports.isFinite)(lineLength) && lineLength > 0 ? lineLength : points2.length;
|
|
4258
|
+
const { lines, isolatedPoints } = getSegmentSets(data.slice(-linePoints), points2.slice(-linePoints));
|
|
4278
4259
|
return /* @__PURE__ */ react_default.createElement("g", { "data-test": "sparkline" }, lines.map((lineData) => /* @__PURE__ */ react_default.createElement(
|
|
4279
4260
|
"polyline",
|
|
4280
4261
|
{
|
|
@@ -4289,10 +4270,18 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
4289
4270
|
},
|
|
4290
4271
|
points: lineData.join(" ")
|
|
4291
4272
|
}
|
|
4292
|
-
)),
|
|
4293
|
-
}
|
|
4294
|
-
getInteractionState
|
|
4295
|
-
|
|
4273
|
+
)), renderIsolatedPoints(isolatedPoints));
|
|
4274
|
+
};
|
|
4275
|
+
const getInteractionState = ({
|
|
4276
|
+
interactionData,
|
|
4277
|
+
points: interactionPoints,
|
|
4278
|
+
interactionShowTooltip,
|
|
4279
|
+
interactionActiveIndex,
|
|
4280
|
+
interactionHoveredIndex,
|
|
4281
|
+
interactionComponentIsFocused
|
|
4282
|
+
}) => {
|
|
4283
|
+
var _a2;
|
|
4284
|
+
if (!interactionShowTooltip) {
|
|
4296
4285
|
return {
|
|
4297
4286
|
currentPointX: null,
|
|
4298
4287
|
tooltipValue: null,
|
|
@@ -4300,200 +4289,94 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
4300
4289
|
interactiveProps: {}
|
|
4301
4290
|
};
|
|
4302
4291
|
}
|
|
4303
|
-
const
|
|
4304
|
-
onKeyDown:
|
|
4305
|
-
onMouseOver:
|
|
4306
|
-
onMouseLeave:
|
|
4307
|
-
onFocus:
|
|
4308
|
-
onBlur:
|
|
4292
|
+
const interactiveProps2 = {
|
|
4293
|
+
onKeyDown: handleKeyDown,
|
|
4294
|
+
onMouseOver: handleMouseOver,
|
|
4295
|
+
onMouseLeave: handleMouseLeave,
|
|
4296
|
+
onFocus: handleFocus,
|
|
4297
|
+
onBlur: handleBlur
|
|
4309
4298
|
};
|
|
4310
|
-
const isHovered =
|
|
4311
|
-
const shouldDisplayInteractiveElements = (isHovered ||
|
|
4299
|
+
const isHovered = interactionHoveredIndex !== null;
|
|
4300
|
+
const shouldDisplayInteractiveElements = (isHovered || interactionComponentIsFocused) && interactionData.length > 0;
|
|
4312
4301
|
if (!shouldDisplayInteractiveElements) {
|
|
4313
4302
|
return {
|
|
4314
4303
|
currentPointX: null,
|
|
4315
4304
|
tooltipValue: null,
|
|
4316
4305
|
showCursorAndTooltip: false,
|
|
4317
|
-
interactiveProps
|
|
4306
|
+
interactiveProps: interactiveProps2
|
|
4318
4307
|
};
|
|
4319
4308
|
}
|
|
4320
|
-
const displayIndex = isHovered ?
|
|
4309
|
+
const displayIndex = isHovered ? interactionHoveredIndex : interactionActiveIndex;
|
|
4321
4310
|
const isValidIndex = displayIndex !== null && displayIndex >= 0;
|
|
4322
|
-
const withinBounds = isValidIndex && displayIndex <
|
|
4311
|
+
const withinBounds = isValidIndex && displayIndex < interactionData.length && displayIndex < interactionPoints.length;
|
|
4323
4312
|
if (!withinBounds) {
|
|
4324
4313
|
return {
|
|
4325
4314
|
currentPointX: null,
|
|
4326
4315
|
tooltipValue: null,
|
|
4327
4316
|
showCursorAndTooltip: false,
|
|
4328
|
-
interactiveProps
|
|
4317
|
+
interactiveProps: interactiveProps2
|
|
4329
4318
|
};
|
|
4330
4319
|
}
|
|
4331
|
-
const displayPointCoords =
|
|
4332
|
-
const
|
|
4333
|
-
const
|
|
4320
|
+
const displayPointCoords = interactionPoints[displayIndex];
|
|
4321
|
+
const currentPointX2 = (_a2 = displayPointCoords == null ? void 0 : displayPointCoords[0]) != null ? _a2 : null;
|
|
4322
|
+
const tooltipValue2 = interactionData[displayIndex];
|
|
4334
4323
|
return {
|
|
4335
|
-
currentPointX,
|
|
4336
|
-
tooltipValue,
|
|
4337
|
-
showCursorAndTooltip:
|
|
4338
|
-
interactiveProps
|
|
4324
|
+
currentPointX: currentPointX2,
|
|
4325
|
+
tooltipValue: tooltipValue2,
|
|
4326
|
+
showCursorAndTooltip: currentPointX2 !== null,
|
|
4327
|
+
interactiveProps: interactiveProps2
|
|
4339
4328
|
};
|
|
4329
|
+
};
|
|
4330
|
+
if (data.length === 0) {
|
|
4331
|
+
return null;
|
|
4340
4332
|
}
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4333
|
+
if (pointRefs.current.length !== data.length) {
|
|
4334
|
+
pointRefs.current.length = data.length;
|
|
4335
|
+
}
|
|
4336
|
+
const xMargin = endDotRadius + endDotStrokeWidth / 2;
|
|
4337
|
+
const yMargin = Math.max(lineStrokeWidth / 2, endDotRadius + endDotStrokeWidth / 2);
|
|
4338
|
+
const points = dataToPoints(xMargin, yMargin);
|
|
4339
|
+
const dotsToShow = Math.max(showEndDot && 1, (0, lodash_exports.isFinite)(endDotCount) && endDotCount > 0 && endDotCount);
|
|
4340
|
+
const { currentPointX, tooltipValue, showCursorAndTooltip, interactiveProps } = getInteractionState({
|
|
4341
|
+
interactionData: data,
|
|
4342
|
+
points,
|
|
4343
|
+
interactionShowTooltip: showTooltip,
|
|
4344
|
+
interactionActiveIndex: activeIndex,
|
|
4345
|
+
interactionHoveredIndex: hoveredIndex,
|
|
4346
|
+
interactionComponentIsFocused: componentIsFocused
|
|
4347
|
+
});
|
|
4348
|
+
const ariaLabel = title || (0, i18n_exports._)("Source count over time sparkline trend");
|
|
4349
|
+
return /* @__PURE__ */ react_default.createElement(
|
|
4350
|
+
"div",
|
|
4351
|
+
__spreadValues(__spreadValues({
|
|
4352
|
+
"data-test": "line",
|
|
4353
|
+
"data-test-type": isArea ? "area" : "line",
|
|
4354
|
+
ref: (el) => {
|
|
4355
|
+
containerRef.current = el;
|
|
4356
|
+
if (typeof elementRef === "function") {
|
|
4357
|
+
elementRef(el);
|
|
4358
|
+
} else if (elementRef && typeof elementRef === "object") {
|
|
4359
|
+
elementRef.current = el;
|
|
4360
|
+
}
|
|
4361
|
+
}
|
|
4362
|
+
}, interactiveProps), (0, lodash_exports.omit)(restProps, PROP_KEYS)),
|
|
4363
|
+
/* @__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))
|
|
4364
|
+
);
|
|
4365
|
+
};
|
|
4366
|
+
var SparkLine = (_a) => {
|
|
4367
|
+
var _b = _a, { data = [] } = _b, props = __objRest(_b, ["data"]);
|
|
4368
|
+
if (true) {
|
|
4369
|
+
if (!Array.isArray(data)) {
|
|
4370
|
+
console.error("Data provided to SparkLine must be an array.");
|
|
4358
4371
|
return null;
|
|
4359
4372
|
}
|
|
4360
|
-
if (
|
|
4361
|
-
|
|
4373
|
+
if (!data.every((value) => value === null || (0, lodash_exports.isFinite)(value))) {
|
|
4374
|
+
console.error("Data provided to SparkLine must contain finite numbers or null.");
|
|
4375
|
+
return null;
|
|
4362
4376
|
}
|
|
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
4377
|
}
|
|
4378
|
+
return /* @__PURE__ */ react_default.createElement(SparkLineInner, __spreadValues({ data }, props));
|
|
4403
4379
|
};
|
|
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
4380
|
var SparkLine_default = SparkLine;
|
|
4498
4381
|
|
|
4499
4382
|
// src/Table/cells/SparklineCell.tsx
|
|
@@ -4737,20 +4620,35 @@ var headerTextOverflowStyles = {
|
|
|
4737
4620
|
`,
|
|
4738
4621
|
anywhere: `
|
|
4739
4622
|
word-break: break-all;
|
|
4740
|
-
white-space:
|
|
4623
|
+
white-space: pre-wrap;
|
|
4624
|
+
text-overflow: clip;
|
|
4741
4625
|
display: inline;
|
|
4742
4626
|
`,
|
|
4743
|
-
|
|
4744
|
-
word-break:
|
|
4745
|
-
|
|
4746
|
-
white-space:
|
|
4747
|
-
|
|
4627
|
+
"break-word": `
|
|
4628
|
+
word-break: normal;
|
|
4629
|
+
overflow-wrap: normal;
|
|
4630
|
+
white-space: normal;
|
|
4631
|
+
overflow: hidden;
|
|
4632
|
+
text-overflow: ellipsis;
|
|
4633
|
+
display: block;
|
|
4748
4634
|
`
|
|
4749
4635
|
};
|
|
4750
4636
|
var TableHeadCell = styled_components_default(Table_default.HeadCell)`
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4637
|
+
${(props) => {
|
|
4638
|
+
const type = props.textOverflowType;
|
|
4639
|
+
const styles = type && headerTextOverflowStyles[type];
|
|
4640
|
+
if (!styles) return "";
|
|
4641
|
+
const expandsHeader = type === "break-word" || type === "anywhere";
|
|
4642
|
+
return styled_components_exports.css`
|
|
4643
|
+
&& :is(button, div) {
|
|
4644
|
+
min-height: 100%;
|
|
4645
|
+
${expandsHeader ? "grid-template-rows: auto 1fr; height: auto;" : ""}
|
|
4646
|
+
}
|
|
4647
|
+
&& :is(button, div) > span {
|
|
4648
|
+
${styles}
|
|
4649
|
+
}
|
|
4650
|
+
`;
|
|
4651
|
+
}}
|
|
4754
4652
|
`;
|
|
4755
4653
|
var VizTableContainer = styled_components_default.div`
|
|
4756
4654
|
box-sizing: border-box;
|
|
@@ -5432,9 +5330,9 @@ var computeVizProps = (_a) => {
|
|
|
5432
5330
|
const handleColumnFormatChange = (updatedColumnFormat) => {
|
|
5433
5331
|
var _a3;
|
|
5434
5332
|
const cloneOfExistingColumnFormat = __spreadValues({}, ((_a3 = vizProps == null ? void 0 : vizProps.options) == null ? void 0 : _a3.columnFormat) || {});
|
|
5435
|
-
const
|
|
5333
|
+
const keys = Object.keys(updatedColumnFormat);
|
|
5436
5334
|
const values = Object.values(updatedColumnFormat);
|
|
5437
|
-
|
|
5335
|
+
keys.forEach((key, index) => {
|
|
5438
5336
|
if (!cloneOfExistingColumnFormat[key]) {
|
|
5439
5337
|
cloneOfExistingColumnFormat[key] = {};
|
|
5440
5338
|
}
|