@splunk/visualizations 28.1.0 → 28.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Area.config.js +27 -0
- package/Area.config.js.map +2 -2
- package/Area.js +715 -354
- package/Area.js.map +4 -4
- package/Bar.config.js +27 -0
- package/Bar.config.js.map +2 -2
- package/Bar.js +747 -386
- package/Bar.js.map +4 -4
- package/Bubble.config.js +27 -0
- package/Bubble.config.js.map +2 -2
- package/Bubble.js +677 -320
- package/Bubble.js.map +4 -4
- package/CHANGELOG.external.md +49 -0
- package/ChoroplethSvg.js +563 -193
- package/ChoroplethSvg.js.map +4 -4
- package/Column.config.js +27 -0
- package/Column.config.js.map +2 -2
- package/Column.js +762 -401
- package/Column.js.map +4 -4
- package/Ellipse.js +586 -213
- package/Ellipse.js.map +4 -4
- package/Events.js +585 -200
- package/Events.js.map +4 -4
- package/FEATUREFLAGS.md +1 -0
- package/FillerGauge.js +558 -190
- package/FillerGauge.js.map +4 -4
- package/Image.js +583 -216
- package/Image.js.map +4 -4
- package/Line.config.js +28 -1
- package/Line.config.js.map +2 -2
- package/Line.js +730 -369
- package/Line.js.map +4 -4
- package/LinkGraph.js +1087 -690
- package/LinkGraph.js.map +4 -4
- package/Map.config.js +2 -0
- package/Map.config.js.map +2 -2
- package/Map.js +527 -141
- package/Map.js.map +4 -4
- package/Markdown.js +607 -229
- package/Markdown.js.map +4 -4
- package/MarkerGauge.js +537 -168
- package/MarkerGauge.js.map +4 -4
- package/ParallelCoordinates.js +558 -173
- package/ParallelCoordinates.js.map +4 -4
- package/Pie.js +644 -315
- package/Pie.js.map +4 -4
- package/Punchcard.js +582 -199
- package/Punchcard.js.map +4 -4
- package/Rectangle.js +597 -223
- package/Rectangle.js.map +4 -4
- package/Sankey.js +570 -200
- package/Sankey.js.map +4 -4
- package/Scatter.config.js +27 -0
- package/Scatter.config.js.map +2 -2
- package/Scatter.js +681 -325
- package/Scatter.js.map +4 -4
- package/SingleValue.js +534 -165
- package/SingleValue.js.map +4 -4
- package/SingleValueIcon.js +528 -159
- package/SingleValueIcon.js.map +4 -4
- package/SingleValueRadial.js +521 -152
- package/SingleValueRadial.js.map +4 -4
- package/Table.config.js +87 -32
- package/Table.config.js.map +4 -4
- package/Table.js +925 -441
- package/Table.js.map +4 -4
- package/Timeline.js +605 -272
- package/Timeline.js.map +4 -4
- package/common/Charting.js +49 -111
- package/common/Charting.js.map +4 -4
- package/common/GaugeMajorTicks.js +6 -14
- package/common/GaugeMajorTicks.js.map +2 -2
- package/common/GaugeValueMarker.js +6 -14
- package/common/GaugeValueMarker.js.map +2 -2
- package/common/OptionsDoc.js +3 -2
- package/common/OptionsDoc.js.map +2 -2
- package/common/SplunkVisualization.js +1 -1
- package/common/SplunkVisualization.js.map +2 -2
- package/common/TimeSeriesChartWrapper.js +485 -0
- package/common/TimeSeriesChartWrapper.js.map +7 -0
- package/common/chartingUtils.js +252 -1
- package/common/chartingUtils.js.map +4 -4
- package/common/shapeUtils.js.map +1 -1
- package/common/utils/hocUtils.js +1 -1
- package/common/utils/hocUtils.js.map +2 -2
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/tableUtils.js +29 -28
- package/common/utils/tableUtils.js.map +2 -2
- package/common/withDashboardViz.js +545 -160
- package/common/withDashboardViz.js.map +4 -4
- package/dist/types/Area/Area.d.ts +13 -0
- package/dist/types/Area/Area.d.ts.map +1 -0
- package/dist/types/Area/areaUtils.d.ts +15 -0
- package/dist/types/Area/areaUtils.d.ts.map +1 -0
- package/dist/types/Area/config.d.ts +4 -0
- package/dist/types/Area/config.d.ts.map +1 -0
- package/dist/types/Area/index.d.ts +3 -0
- package/dist/types/Area/index.d.ts.map +1 -0
- package/dist/types/Bar/Bar.d.ts +13 -0
- package/dist/types/Bar/Bar.d.ts.map +1 -0
- package/dist/types/Bar/barUtils.d.ts +30 -0
- package/dist/types/Bar/barUtils.d.ts.map +1 -0
- package/dist/types/Bar/config.d.ts +4 -0
- package/dist/types/Bar/config.d.ts.map +1 -0
- package/dist/types/Bar/index.d.ts +3 -0
- package/dist/types/Bar/index.d.ts.map +1 -0
- package/dist/types/Bubble/Bubble.d.ts +9 -0
- package/dist/types/Bubble/Bubble.d.ts.map +1 -0
- package/dist/types/Bubble/bubbleUtils.d.ts +47 -0
- package/dist/types/Bubble/bubbleUtils.d.ts.map +1 -0
- package/dist/types/Bubble/config.d.ts +4 -0
- package/dist/types/Bubble/config.d.ts.map +1 -0
- package/dist/types/Bubble/index.d.ts +3 -0
- package/dist/types/Bubble/index.d.ts.map +1 -0
- package/dist/types/ChoroplethSvg/ChoroplethSvg.d.ts +24 -0
- package/dist/types/ChoroplethSvg/ChoroplethSvg.d.ts.map +1 -0
- package/dist/types/ChoroplethSvg/ErrorMessage/ErrorMessage.d.ts +6 -0
- package/dist/types/ChoroplethSvg/ErrorMessage/ErrorMessage.d.ts.map +1 -0
- package/dist/types/ChoroplethSvg/PureChoroplethSvg/PureChoroplethSvg.d.ts +29 -0
- package/dist/types/ChoroplethSvg/PureChoroplethSvg/PureChoroplethSvg.d.ts.map +1 -0
- package/dist/types/ChoroplethSvg/PureChoroplethSvg/SvgChoroplethDynamic.d.ts +34 -0
- package/dist/types/ChoroplethSvg/PureChoroplethSvg/SvgChoroplethDynamic.d.ts.map +1 -0
- package/dist/types/ChoroplethSvg/PureChoroplethSvg/SvgMutator.d.ts +144 -0
- package/dist/types/ChoroplethSvg/PureChoroplethSvg/SvgMutator.d.ts.map +1 -0
- package/dist/types/ChoroplethSvg/config.d.ts +4 -0
- package/dist/types/ChoroplethSvg/config.d.ts.map +1 -0
- package/dist/types/ChoroplethSvg/index.d.ts +3 -0
- package/dist/types/ChoroplethSvg/index.d.ts.map +1 -0
- package/dist/types/Column/Column.d.ts +11 -0
- package/dist/types/Column/Column.d.ts.map +1 -0
- package/dist/types/Column/columnUtils.d.ts +82 -0
- package/dist/types/Column/columnUtils.d.ts.map +1 -0
- package/dist/types/Column/config.d.ts +4 -0
- package/dist/types/Column/config.d.ts.map +1 -0
- package/dist/types/Column/index.d.ts +3 -0
- package/dist/types/Column/index.d.ts.map +1 -0
- package/dist/types/Ellipse/Ellipse.d.ts +7 -0
- package/dist/types/Ellipse/Ellipse.d.ts.map +1 -0
- package/dist/types/Ellipse/config.d.ts +4 -0
- package/dist/types/Ellipse/config.d.ts.map +1 -0
- package/dist/types/Ellipse/index.d.ts +3 -0
- package/dist/types/Ellipse/index.d.ts.map +1 -0
- package/dist/types/Events/EventUtils.d.ts +137 -0
- package/dist/types/Events/EventUtils.d.ts.map +1 -0
- package/dist/types/Events/Events.d.ts +19 -0
- package/dist/types/Events/Events.d.ts.map +1 -0
- package/dist/types/Events/PureEvents/FieldSummaryTooltip.d.ts +50 -0
- package/dist/types/Events/PureEvents/FieldSummaryTooltip.d.ts.map +1 -0
- package/dist/types/Events/PureEvents/PureEvents.d.ts +34 -0
- package/dist/types/Events/PureEvents/PureEvents.d.ts.map +1 -0
- package/dist/types/Events/PureEvents/TimeControlsPopover.d.ts +33 -0
- package/dist/types/Events/PureEvents/TimeControlsPopover.d.ts.map +1 -0
- package/dist/types/Events/config.d.ts +4 -0
- package/dist/types/Events/config.d.ts.map +1 -0
- package/dist/types/Events/index.d.ts +3 -0
- package/dist/types/Events/index.d.ts.map +1 -0
- package/dist/types/FillerGauge/FillerGauge.d.ts +13 -0
- package/dist/types/FillerGauge/FillerGauge.d.ts.map +1 -0
- package/dist/types/FillerGauge/PureFillerGauge/FillerGauge.d.ts +32 -0
- package/dist/types/FillerGauge/PureFillerGauge/FillerGauge.d.ts.map +1 -0
- package/dist/types/FillerGauge/config.d.ts +4 -0
- package/dist/types/FillerGauge/config.d.ts.map +1 -0
- package/dist/types/FillerGauge/index.d.ts +3 -0
- package/dist/types/FillerGauge/index.d.ts.map +1 -0
- package/dist/types/Image/Image.d.ts +13 -0
- package/dist/types/Image/Image.d.ts.map +1 -0
- package/dist/types/Image/ImageApi.d.ts +15 -0
- package/dist/types/Image/ImageApi.d.ts.map +1 -0
- package/dist/types/Image/config.d.ts +4 -0
- package/dist/types/Image/config.d.ts.map +1 -0
- package/dist/types/Image/index.d.ts +3 -0
- package/dist/types/Image/index.d.ts.map +1 -0
- package/dist/types/Line/Line.d.ts +13 -0
- package/dist/types/Line/Line.d.ts.map +1 -0
- package/dist/types/Line/config.d.ts +4 -0
- package/dist/types/Line/config.d.ts.map +1 -0
- package/dist/types/Line/index.d.ts +3 -0
- package/dist/types/Line/index.d.ts.map +1 -0
- package/dist/types/Line/lineUtils.d.ts +22 -0
- package/dist/types/Line/lineUtils.d.ts.map +1 -0
- package/dist/types/Line/mockdata/LineData.d.ts +184 -0
- package/dist/types/Line/mockdata/LineData.d.ts.map +1 -0
- package/dist/types/LinkGraph/ESTestDataSources.d.ts +32 -0
- package/dist/types/LinkGraph/ESTestDataSources.d.ts.map +1 -0
- package/dist/types/LinkGraph/ESTestTemplate.d.ts +2 -0
- package/dist/types/LinkGraph/ESTestTemplate.d.ts.map +1 -0
- package/dist/types/LinkGraph/LinkGraph.d.ts +22 -0
- package/dist/types/LinkGraph/LinkGraph.d.ts.map +1 -0
- package/dist/types/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts +89 -0
- package/dist/types/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts.map +1 -0
- package/dist/types/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts +74 -0
- package/dist/types/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts.map +1 -0
- package/dist/types/LinkGraph/PureLinkGraph/components/Edges.d.ts +9 -0
- package/dist/types/LinkGraph/PureLinkGraph/components/Edges.d.ts.map +1 -0
- package/dist/types/LinkGraph/PureLinkGraph/components/Field.d.ts +14 -0
- package/dist/types/LinkGraph/PureLinkGraph/components/Field.d.ts.map +1 -0
- package/dist/types/LinkGraph/PureLinkGraph/components/FieldStyles.d.ts +5 -0
- package/dist/types/LinkGraph/PureLinkGraph/components/FieldStyles.d.ts.map +1 -0
- package/dist/types/LinkGraph/PureLinkGraph/components/Graph.d.ts +49 -0
- package/dist/types/LinkGraph/PureLinkGraph/components/Graph.d.ts.map +1 -0
- package/dist/types/LinkGraph/PureLinkGraph/components/GraphStyles.d.ts +11 -0
- package/dist/types/LinkGraph/PureLinkGraph/components/GraphStyles.d.ts.map +1 -0
- package/dist/types/LinkGraph/PureLinkGraph/components/Node.d.ts +24 -0
- package/dist/types/LinkGraph/PureLinkGraph/components/Node.d.ts.map +1 -0
- package/dist/types/LinkGraph/PureLinkGraph/components/Nodes.d.ts +16 -0
- package/dist/types/LinkGraph/PureLinkGraph/components/Nodes.d.ts.map +1 -0
- package/dist/types/LinkGraph/PureLinkGraph/utils/iconLoader.d.ts +168 -0
- package/dist/types/LinkGraph/PureLinkGraph/utils/iconLoader.d.ts.map +1 -0
- package/dist/types/LinkGraph/config.d.ts +4 -0
- package/dist/types/LinkGraph/config.d.ts.map +1 -0
- package/dist/types/LinkGraph/index.d.ts +3 -0
- package/dist/types/LinkGraph/index.d.ts.map +1 -0
- package/dist/types/Map/Map.d.ts +28 -0
- package/dist/types/Map/Map.d.ts.map +1 -0
- package/dist/types/Map/MapContextDefault.d.ts +39 -0
- package/dist/types/Map/MapContextDefault.d.ts.map +1 -0
- package/dist/types/Map/PureMap/BubbleLayer.d.ts +51 -0
- package/dist/types/Map/PureMap/BubbleLayer.d.ts.map +1 -0
- package/dist/types/Map/PureMap/ChoroplethLayer.d.ts +36 -0
- package/dist/types/Map/PureMap/ChoroplethLayer.d.ts.map +1 -0
- package/dist/types/Map/PureMap/ClusterLayer.d.ts +17 -0
- package/dist/types/Map/PureMap/ClusterLayer.d.ts.map +1 -0
- package/dist/types/Map/PureMap/LocalChoroplethLayer.d.ts +18 -0
- package/dist/types/Map/PureMap/LocalChoroplethLayer.d.ts.map +1 -0
- package/dist/types/Map/PureMap/MapUtils.d.ts +141 -0
- package/dist/types/Map/PureMap/MapUtils.d.ts.map +1 -0
- package/dist/types/Map/PureMap/MarkerLayer.d.ts +34 -0
- package/dist/types/Map/PureMap/MarkerLayer.d.ts.map +1 -0
- package/dist/types/Map/PureMap/MarkerWrapper.d.ts +17 -0
- package/dist/types/Map/PureMap/MarkerWrapper.d.ts.map +1 -0
- package/dist/types/Map/PureMap/PureMap.d.ts +102 -0
- package/dist/types/Map/PureMap/PureMap.d.ts.map +1 -0
- package/dist/types/Map/PureMap/PureMapContainer.d.ts +15 -0
- package/dist/types/Map/PureMap/PureMapContainer.d.ts.map +1 -0
- package/dist/types/Map/PureMap/Tooltip.d.ts +20 -0
- package/dist/types/Map/PureMap/Tooltip.d.ts.map +1 -0
- package/dist/types/Map/PureMap/mockdata/data.d.ts +90 -0
- package/dist/types/Map/PureMap/mockdata/data.d.ts.map +1 -0
- package/dist/types/Map/config.d.ts +4 -0
- package/dist/types/Map/config.d.ts.map +1 -0
- package/dist/types/Map/index.d.ts +3 -0
- package/dist/types/Map/index.d.ts.map +1 -0
- package/dist/types/Markdown/Markdown.d.ts +31 -0
- package/dist/types/Markdown/Markdown.d.ts.map +1 -0
- package/dist/types/Markdown/config.d.ts +4 -0
- package/dist/types/Markdown/config.d.ts.map +1 -0
- package/dist/types/Markdown/index.d.ts +3 -0
- package/dist/types/Markdown/index.d.ts.map +1 -0
- package/dist/types/MarkerGauge/MarkerGauge.d.ts +55 -0
- package/dist/types/MarkerGauge/MarkerGauge.d.ts.map +1 -0
- package/dist/types/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts +72 -0
- package/dist/types/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts.map +1 -0
- package/dist/types/MarkerGauge/config.d.ts +4 -0
- package/dist/types/MarkerGauge/config.d.ts.map +1 -0
- package/dist/types/MarkerGauge/index.d.ts +3 -0
- package/dist/types/MarkerGauge/index.d.ts.map +1 -0
- package/dist/types/ParallelCoordinates/ParallelCoordinates.d.ts +58 -0
- package/dist/types/ParallelCoordinates/ParallelCoordinates.d.ts.map +1 -0
- package/dist/types/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts +69 -0
- package/dist/types/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts.map +1 -0
- package/dist/types/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesCanvas.d.ts +30 -0
- package/dist/types/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesCanvas.d.ts.map +1 -0
- package/dist/types/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts +42 -0
- package/dist/types/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts.map +1 -0
- package/dist/types/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesPrompt.d.ts +22 -0
- package/dist/types/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesPrompt.d.ts.map +1 -0
- package/dist/types/ParallelCoordinates/config.d.ts +4 -0
- package/dist/types/ParallelCoordinates/config.d.ts.map +1 -0
- package/dist/types/ParallelCoordinates/index.d.ts +3 -0
- package/dist/types/ParallelCoordinates/index.d.ts.map +1 -0
- package/dist/types/ParallelCoordinates/mockdata/arrayValueData.d.ts +6 -0
- package/dist/types/ParallelCoordinates/mockdata/arrayValueData.d.ts.map +1 -0
- package/dist/types/ParallelCoordinates/mockdata/sampleCarData.d.ts +6 -0
- package/dist/types/ParallelCoordinates/mockdata/sampleCarData.d.ts.map +1 -0
- package/dist/types/ParallelCoordinates/mockdata/sampleCarNumericalData.d.ts +6 -0
- package/dist/types/ParallelCoordinates/mockdata/sampleCarNumericalData.d.ts.map +1 -0
- package/dist/types/ParallelCoordinates/mockdata/sampleFoodData.d.ts +6 -0
- package/dist/types/ParallelCoordinates/mockdata/sampleFoodData.d.ts.map +1 -0
- package/dist/types/ParallelCoordinates/mockdata/sampleStringNumericalData.d.ts +6 -0
- package/dist/types/ParallelCoordinates/mockdata/sampleStringNumericalData.d.ts.map +1 -0
- package/dist/types/Pie/Pie.d.ts +15 -0
- package/dist/types/Pie/Pie.d.ts.map +1 -0
- package/dist/types/Pie/config.d.ts +4 -0
- package/dist/types/Pie/config.d.ts.map +1 -0
- package/dist/types/Pie/index.d.ts +3 -0
- package/dist/types/Pie/index.d.ts.map +1 -0
- package/dist/types/Pie/pieUtils.d.ts +78 -0
- package/dist/types/Pie/pieUtils.d.ts.map +1 -0
- package/dist/types/Punchcard/Punchcard.d.ts +13 -0
- package/dist/types/Punchcard/Punchcard.d.ts.map +1 -0
- package/dist/types/Punchcard/PurePunchcard/Punchcard.d.ts +40 -0
- package/dist/types/Punchcard/PurePunchcard/Punchcard.d.ts.map +1 -0
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardAxis.d.ts +20 -0
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardAxis.d.ts.map +1 -0
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardBubble.d.ts +27 -0
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardBubble.d.ts.map +1 -0
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardChartArea.d.ts +40 -0
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardChartArea.d.ts.map +1 -0
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardGridLines.d.ts +17 -0
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardGridLines.d.ts.map +1 -0
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardLegend.d.ts +21 -0
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardLegend.d.ts.map +1 -0
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardRow.d.ts +10 -0
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardRow.d.ts.map +1 -0
- package/dist/types/Punchcard/PurePunchcard/src/utils/punchcardUtils.d.ts +285 -0
- package/dist/types/Punchcard/PurePunchcard/src/utils/punchcardUtils.d.ts.map +1 -0
- package/dist/types/Punchcard/config.d.ts +4 -0
- package/dist/types/Punchcard/config.d.ts.map +1 -0
- package/dist/types/Punchcard/index.d.ts +3 -0
- package/dist/types/Punchcard/index.d.ts.map +1 -0
- package/dist/types/Punchcard/punchcardUtils.d.ts +32 -0
- package/dist/types/Punchcard/punchcardUtils.d.ts.map +1 -0
- package/dist/types/Rectangle/Rectangle.d.ts +14 -0
- package/dist/types/Rectangle/Rectangle.d.ts.map +1 -0
- package/dist/types/Rectangle/config.d.ts +4 -0
- package/dist/types/Rectangle/config.d.ts.map +1 -0
- package/dist/types/Rectangle/index.d.ts +3 -0
- package/dist/types/Rectangle/index.d.ts.map +1 -0
- package/dist/types/Sankey/PureSankey/PureSankey.d.ts +98 -0
- package/dist/types/Sankey/PureSankey/PureSankey.d.ts.map +1 -0
- package/dist/types/Sankey/PureSankey/SankeyLink.d.ts +33 -0
- package/dist/types/Sankey/PureSankey/SankeyLink.d.ts.map +1 -0
- package/dist/types/Sankey/PureSankey/SankeyModels.d.ts +48 -0
- package/dist/types/Sankey/PureSankey/SankeyModels.d.ts.map +1 -0
- package/dist/types/Sankey/PureSankey/SankeyNode.d.ts +38 -0
- package/dist/types/Sankey/PureSankey/SankeyNode.d.ts.map +1 -0
- package/dist/types/Sankey/PureSankey/SankeyTooltip.d.ts +43 -0
- package/dist/types/Sankey/PureSankey/SankeyTooltip.d.ts.map +1 -0
- package/dist/types/Sankey/PureSankey/SankeyUtils.d.ts +20 -0
- package/dist/types/Sankey/PureSankey/SankeyUtils.d.ts.map +1 -0
- package/dist/types/Sankey/PureSankey/mockdata/data.d.ts +35 -0
- package/dist/types/Sankey/PureSankey/mockdata/data.d.ts.map +1 -0
- package/dist/types/Sankey/Sankey.d.ts +31 -0
- package/dist/types/Sankey/Sankey.d.ts.map +1 -0
- package/dist/types/Sankey/config.d.ts +4 -0
- package/dist/types/Sankey/config.d.ts.map +1 -0
- package/dist/types/Sankey/index.d.ts +3 -0
- package/dist/types/Sankey/index.d.ts.map +1 -0
- package/dist/types/Scatter/Scatter.d.ts +11 -0
- package/dist/types/Scatter/Scatter.d.ts.map +1 -0
- package/dist/types/Scatter/config.d.ts +4 -0
- package/dist/types/Scatter/config.d.ts.map +1 -0
- package/dist/types/Scatter/index.d.ts +3 -0
- package/dist/types/Scatter/index.d.ts.map +1 -0
- package/dist/types/Scatter/mockdata/data.d.ts +35 -0
- package/dist/types/Scatter/mockdata/data.d.ts.map +1 -0
- package/dist/types/Scatter/scatterUtils.d.ts +47 -0
- package/dist/types/Scatter/scatterUtils.d.ts.map +1 -0
- package/dist/types/SingleValue/SingleValue.d.ts +16 -0
- package/dist/types/SingleValue/SingleValue.d.ts.map +1 -0
- package/dist/types/SingleValue/config.d.ts +4 -0
- package/dist/types/SingleValue/config.d.ts.map +1 -0
- package/dist/types/SingleValue/index.d.ts +3 -0
- package/dist/types/SingleValue/index.d.ts.map +1 -0
- package/dist/types/SingleValueBasic/index.d.ts +3 -0
- package/dist/types/SingleValueBasic/index.d.ts.map +1 -0
- package/dist/types/SingleValueIcon/SingleValueIcon.d.ts +29 -0
- package/dist/types/SingleValueIcon/SingleValueIcon.d.ts.map +1 -0
- package/dist/types/SingleValueIcon/config.d.ts +4 -0
- package/dist/types/SingleValueIcon/config.d.ts.map +1 -0
- package/dist/types/SingleValueIcon/index.d.ts +3 -0
- package/dist/types/SingleValueIcon/index.d.ts.map +1 -0
- package/dist/types/SingleValueRadial/PureSingleValueRadial/GaugeGraph.d.ts +20 -0
- package/dist/types/SingleValueRadial/PureSingleValueRadial/GaugeGraph.d.ts.map +1 -0
- package/dist/types/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts +82 -0
- package/dist/types/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts.map +1 -0
- package/dist/types/SingleValueRadial/SingleValueRadial.d.ts +17 -0
- package/dist/types/SingleValueRadial/SingleValueRadial.d.ts.map +1 -0
- package/dist/types/SingleValueRadial/config.d.ts +4 -0
- package/dist/types/SingleValueRadial/config.d.ts.map +1 -0
- package/dist/types/SingleValueRadial/index.d.ts +3 -0
- package/dist/types/SingleValueRadial/index.d.ts.map +1 -0
- package/dist/types/SparkLine/index.d.ts +2 -0
- package/dist/types/SparkLine/index.d.ts.map +1 -0
- package/dist/types/Table/PureTable.d.ts +50 -0
- package/dist/types/Table/PureTable.d.ts.map +1 -0
- package/dist/types/Table/Table.d.ts +10 -0
- package/dist/types/Table/Table.d.ts.map +1 -0
- package/dist/types/Table/cells/ArrayCell.d.ts +12 -0
- package/dist/types/Table/cells/ArrayCell.d.ts.map +1 -0
- package/dist/types/Table/cells/SparklineCell.d.ts +13 -0
- package/dist/types/Table/cells/SparklineCell.d.ts.map +1 -0
- package/dist/types/Table/cells/SwitchTableCell.d.ts +5 -0
- package/dist/types/Table/cells/SwitchTableCell.d.ts.map +1 -0
- package/dist/types/Table/cells/TextCell.d.ts +12 -0
- package/dist/types/Table/cells/TextCell.d.ts.map +1 -0
- package/dist/types/Table/cells/index.d.ts +5 -0
- package/dist/types/Table/cells/index.d.ts.map +1 -0
- package/dist/types/Table/config.d.ts +4 -0
- package/dist/types/Table/config.d.ts.map +1 -0
- package/dist/types/Table/hooks.d.ts +130 -0
- package/dist/types/Table/hooks.d.ts.map +1 -0
- package/dist/types/Table/index.d.ts +3 -0
- package/dist/types/Table/index.d.ts.map +1 -0
- package/dist/types/Timeline/PureTimeline/PureTimeline.d.ts +81 -0
- package/dist/types/Timeline/PureTimeline/PureTimeline.d.ts.map +1 -0
- package/dist/types/Timeline/PureTimeline/src/CursorPlugin.d.ts +8 -0
- package/dist/types/Timeline/PureTimeline/src/CursorPlugin.d.ts.map +1 -0
- package/dist/types/Timeline/PureTimeline/src/TimelineLegend.d.ts +28 -0
- package/dist/types/Timeline/PureTimeline/src/TimelineLegend.d.ts.map +1 -0
- package/dist/types/Timeline/PureTimeline/src/TimelinePlugin.d.ts +16 -0
- package/dist/types/Timeline/PureTimeline/src/TimelinePlugin.d.ts.map +1 -0
- package/dist/types/Timeline/PureTimeline/src/TimelineTooltip.d.ts +11 -0
- package/dist/types/Timeline/PureTimeline/src/TimelineTooltip.d.ts.map +1 -0
- package/dist/types/Timeline/PureTimeline/src/TimelineUplot.d.ts +22 -0
- package/dist/types/Timeline/PureTimeline/src/TimelineUplot.d.ts.map +1 -0
- package/dist/types/Timeline/PureTimeline/src/TimelineYAxis.d.ts +20 -0
- package/dist/types/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -0
- package/dist/types/Timeline/PureTimeline/src/XAxisPlugin.d.ts +18 -0
- package/dist/types/Timeline/PureTimeline/src/XAxisPlugin.d.ts.map +1 -0
- package/dist/types/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +34 -0
- package/dist/types/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -0
- package/dist/types/Timeline/Timeline.d.ts +22 -0
- package/dist/types/Timeline/Timeline.d.ts.map +1 -0
- package/dist/types/Timeline/config.d.ts +4 -0
- package/dist/types/Timeline/config.d.ts.map +1 -0
- package/dist/types/Timeline/index.d.ts +3 -0
- package/dist/types/Timeline/index.d.ts.map +1 -0
- package/dist/types/Timeline/mockdata/basicTimelineData.d.ts +76 -0
- package/dist/types/Timeline/mockdata/basicTimelineData.d.ts.map +1 -0
- package/dist/types/Timeline/mockdata/categoricalTimelineData.d.ts +31 -0
- package/dist/types/Timeline/mockdata/categoricalTimelineData.d.ts.map +1 -0
- package/dist/types/Timeline/mockdata/timelineDataSource.d.ts +52 -0
- package/dist/types/Timeline/mockdata/timelineDataSource.d.ts.map +1 -0
- package/dist/types/common/Charting.d.ts +46 -0
- package/dist/types/common/Charting.d.ts.map +1 -0
- package/dist/types/common/ChartingApi.d.ts +36 -0
- package/dist/types/common/ChartingApi.d.ts.map +1 -0
- package/dist/types/common/DocExampleWithVizSandbox.d.ts +22 -0
- package/dist/types/common/DocExampleWithVizSandbox.d.ts.map +1 -0
- package/dist/types/common/OverviewDoc.d.ts +20 -0
- package/dist/types/common/OverviewDoc.d.ts.map +1 -0
- package/dist/types/common/SplunkVisualization.d.ts +16 -0
- package/dist/types/common/SplunkVisualization.d.ts.map +1 -0
- package/dist/types/common/SplunkVisualizationApi.d.ts +16 -0
- package/dist/types/common/SplunkVisualizationApi.d.ts.map +1 -0
- package/dist/types/common/ThemedDefaults.d.ts +2 -0
- package/dist/types/common/ThemedDefaults.d.ts.map +1 -0
- package/dist/types/common/TimeSeriesChartWrapper.d.ts +7 -0
- package/dist/types/common/TimeSeriesChartWrapper.d.ts.map +1 -0
- package/dist/types/common/chartingUtils.d.ts +164 -0
- package/dist/types/common/chartingUtils.d.ts.map +1 -0
- package/dist/types/common/components/IconPlaceholder.d.ts +21 -0
- package/dist/types/common/components/IconPlaceholder.d.ts.map +1 -0
- package/dist/types/common/components/MissingPropsMessage.d.ts +28 -0
- package/dist/types/common/components/MissingPropsMessage.d.ts.map +1 -0
- package/dist/types/common/components/TrellisTitle.d.ts +10 -0
- package/dist/types/common/components/TrellisTitle.d.ts.map +1 -0
- package/dist/types/common/configContext/singleValueContext.d.ts +3 -0
- package/dist/types/common/configContext/singleValueContext.d.ts.map +1 -0
- package/dist/types/common/docUtils.d.ts +24 -0
- package/dist/types/common/docUtils.d.ts.map +1 -0
- package/dist/types/common/editorConfig/AxesChartColorAndStyle.d.ts +5 -0
- package/dist/types/common/editorConfig/AxesChartColorAndStyle.d.ts.map +1 -0
- package/dist/types/common/editorConfig/AxesChartDataConfig.d.ts +31 -0
- package/dist/types/common/editorConfig/AxesChartDataConfig.d.ts.map +1 -0
- package/dist/types/common/editorConfig/AxesChartDataDisplay.d.ts +14 -0
- package/dist/types/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -0
- package/dist/types/common/editorConfig/AxesChartLegend.d.ts +8 -0
- package/dist/types/common/editorConfig/AxesChartLegend.d.ts.map +1 -0
- package/dist/types/common/editorConfig/AxesChartXGridAndLabels.d.ts +6 -0
- package/dist/types/common/editorConfig/AxesChartXGridAndLabels.d.ts.map +1 -0
- package/dist/types/common/editorConfig/AxesChartY2GridAndLabels.d.ts +11 -0
- package/dist/types/common/editorConfig/AxesChartY2GridAndLabels.d.ts.map +1 -0
- package/dist/types/common/editorConfig/AxesChartYGridAndLabels.d.ts +4 -0
- package/dist/types/common/editorConfig/AxesChartYGridAndLabels.d.ts.map +1 -0
- package/dist/types/common/editorConfig/BackgroundColor.d.ts +10 -0
- package/dist/types/common/editorConfig/BackgroundColor.d.ts.map +1 -0
- package/dist/types/common/editorConfig/DynamicFillColorEditor.d.ts +29 -0
- package/dist/types/common/editorConfig/DynamicFillColorEditor.d.ts.map +1 -0
- package/dist/types/common/editorConfig/DynamicGaugeColorEditor.d.ts +29 -0
- package/dist/types/common/editorConfig/DynamicGaugeColorEditor.d.ts.map +1 -0
- package/dist/types/common/editorConfig/DynamicStrokeColorEditor.d.ts +29 -0
- package/dist/types/common/editorConfig/DynamicStrokeColorEditor.d.ts.map +1 -0
- package/dist/types/common/editorConfig/Gauge.d.ts +4 -0
- package/dist/types/common/editorConfig/Gauge.d.ts.map +1 -0
- package/dist/types/common/editorConfig/Legend.d.ts +4 -0
- package/dist/types/common/editorConfig/Legend.d.ts.map +1 -0
- package/dist/types/common/editorConfig/RadialBackgroundColor.d.ts +10 -0
- package/dist/types/common/editorConfig/RadialBackgroundColor.d.ts.map +1 -0
- package/dist/types/common/editorConfig/StaticFillColorEditor.d.ts +10 -0
- package/dist/types/common/editorConfig/StaticFillColorEditor.d.ts.map +1 -0
- package/dist/types/common/editorConfig/StaticGaugeColorEditor.d.ts +10 -0
- package/dist/types/common/editorConfig/StaticGaugeColorEditor.d.ts.map +1 -0
- package/dist/types/common/editorConfig/StaticStrokeColorEditor.d.ts +10 -0
- package/dist/types/common/editorConfig/StaticStrokeColorEditor.d.ts.map +1 -0
- package/dist/types/common/editorConfig/TrellisEditors.d.ts +66 -0
- package/dist/types/common/editorConfig/TrellisEditors.d.ts.map +1 -0
- package/dist/types/common/gaugeUtils.d.ts +387 -0
- package/dist/types/common/gaugeUtils.d.ts.map +1 -0
- package/dist/types/common/hocs/FixedSizeContainer.d.ts +9 -0
- package/dist/types/common/hocs/FixedSizeContainer.d.ts.map +1 -0
- package/dist/types/common/hocs/mockdata/trellisData.d.ts +1288 -0
- package/dist/types/common/hocs/mockdata/trellisData.d.ts.map +1 -0
- package/dist/types/common/hocs/withEditModeCover.d.ts +10 -0
- package/dist/types/common/hocs/withEditModeCover.d.ts.map +1 -0
- package/dist/types/common/hocs/withPlaceholder.d.ts +8 -0
- package/dist/types/common/hocs/withPlaceholder.d.ts.map +1 -0
- package/dist/types/common/hocs/withTrellis.d.ts +18 -0
- package/dist/types/common/hocs/withTrellis.d.ts.map +1 -0
- package/dist/types/common/hooks/useDeepMemo.d.ts +15 -0
- package/dist/types/common/hooks/useDeepMemo.d.ts.map +1 -0
- package/dist/types/common/hooks/useDownsampleDataSources.d.ts +7 -0
- package/dist/types/common/hooks/useDownsampleDataSources.d.ts.map +1 -0
- package/dist/types/common/hooks/useEventCallback.d.ts +9 -0
- package/dist/types/common/hooks/useEventCallback.d.ts.map +1 -0
- package/dist/types/common/hooks/useGetXAndYFields.d.ts +10 -0
- package/dist/types/common/hooks/useGetXAndYFields.d.ts.map +1 -0
- package/dist/types/common/hooks/usePagination.d.ts +21 -0
- package/dist/types/common/hooks/usePagination.d.ts.map +1 -0
- package/dist/types/common/hooks/usePrevious.d.ts +2 -0
- package/dist/types/common/hooks/usePrevious.d.ts.map +1 -0
- package/dist/types/common/hooks/useSorting.d.ts +17 -0
- package/dist/types/common/hooks/useSorting.d.ts.map +1 -0
- package/dist/types/common/hooks/useTrellisEnabled.d.ts +4 -0
- package/dist/types/common/hooks/useTrellisEnabled.d.ts.map +1 -0
- package/dist/types/common/interfaces/ChartEvent.d.ts +26 -0
- package/dist/types/common/interfaces/ChartEvent.d.ts.map +1 -0
- package/dist/types/common/interfaces/DashboardVizProps.d.ts +27 -0
- package/dist/types/common/interfaces/DashboardVizProps.d.ts.map +1 -0
- package/dist/types/common/interfaces/DataContract.d.ts +19 -0
- package/dist/types/common/interfaces/DataContract.d.ts.map +1 -0
- package/dist/types/common/interfaces/DataSource.d.ts +45 -0
- package/dist/types/common/interfaces/DataSource.d.ts.map +1 -0
- package/dist/types/common/interfaces/DefaultContext.d.ts +30 -0
- package/dist/types/common/interfaces/DefaultContext.d.ts.map +1 -0
- package/dist/types/common/interfaces/Editor.d.ts +23 -0
- package/dist/types/common/interfaces/Editor.d.ts.map +1 -0
- package/dist/types/common/interfaces/ExtendedDashViz.d.ts +7 -0
- package/dist/types/common/interfaces/ExtendedDashViz.d.ts.map +1 -0
- package/dist/types/common/interfaces/Object.d.ts +4 -0
- package/dist/types/common/interfaces/Object.d.ts.map +1 -0
- package/dist/types/common/interfaces/Overview.d.ts +14 -0
- package/dist/types/common/interfaces/Overview.d.ts.map +1 -0
- package/dist/types/common/interfaces/ThemedDefaults.d.ts +5 -0
- package/dist/types/common/interfaces/ThemedDefaults.d.ts.map +1 -0
- package/dist/types/common/interfaces/VizActionHandler.d.ts +15 -0
- package/dist/types/common/interfaces/VizActionHandler.d.ts.map +1 -0
- package/dist/types/common/interfaces/VizBehavior.d.ts +25 -0
- package/dist/types/common/interfaces/VizBehavior.d.ts.map +1 -0
- package/dist/types/common/interfaces/VizCategory.d.ts +16 -0
- package/dist/types/common/interfaces/VizCategory.d.ts.map +1 -0
- package/dist/types/common/interfaces/VizConfig.d.ts +34 -0
- package/dist/types/common/interfaces/VizConfig.d.ts.map +1 -0
- package/dist/types/common/interfaces/VizEvent.d.ts +13 -0
- package/dist/types/common/interfaces/VizEvent.d.ts.map +1 -0
- package/dist/types/common/interfaces/VizProps.d.ts +8 -0
- package/dist/types/common/interfaces/VizProps.d.ts.map +1 -0
- package/dist/types/common/interfaces/VizRegistry.d.ts +7 -0
- package/dist/types/common/interfaces/VizRegistry.d.ts.map +1 -0
- package/dist/types/common/interfaces/VizSize.d.ts +8 -0
- package/dist/types/common/interfaces/VizSize.d.ts.map +1 -0
- package/dist/types/common/interfaces/VizStatus.d.ts +2 -0
- package/dist/types/common/interfaces/VizStatus.d.ts.map +1 -0
- package/dist/types/common/interfaces/index.d.ts +19 -0
- package/dist/types/common/interfaces/index.d.ts.map +1 -0
- package/dist/types/common/shapeUtils.d.ts +26 -0
- package/dist/types/common/shapeUtils.d.ts.map +1 -0
- package/dist/types/common/utils/configUtils.d.ts +59 -0
- package/dist/types/common/utils/configUtils.d.ts.map +1 -0
- package/dist/types/common/utils/dataUtils.d.ts +31 -0
- package/dist/types/common/utils/dataUtils.d.ts.map +1 -0
- package/dist/types/common/utils/featureFlagUtils.d.ts +3 -0
- package/dist/types/common/utils/featureFlagUtils.d.ts.map +1 -0
- package/dist/types/common/utils/hocUtils.d.ts +12 -0
- package/dist/types/common/utils/hocUtils.d.ts.map +1 -0
- package/dist/types/common/utils/mapUtils.d.ts +2 -0
- package/dist/types/common/utils/mapUtils.d.ts.map +1 -0
- package/dist/types/common/utils/styleUtils.d.ts +2 -0
- package/dist/types/common/utils/styleUtils.d.ts.map +1 -0
- package/dist/types/common/utils/tableUtils.d.ts +3 -0
- package/dist/types/common/utils/tableUtils.d.ts.map +1 -0
- package/dist/types/common/utils/trellisUtils.d.ts +60 -0
- package/dist/types/common/utils/trellisUtils.d.ts.map +1 -0
- package/dist/types/common/utils/urlUtils.d.ts +2 -0
- package/dist/types/common/utils/urlUtils.d.ts.map +1 -0
- package/dist/types/common/withDashboardViz.d.ts +22 -0
- package/dist/types/common/withDashboardViz.d.ts.map +1 -0
- package/package.json +32 -34
package/Timeline.js
CHANGED
|
@@ -670,7 +670,7 @@ SplunkVisualization.propTypes = {
|
|
|
670
670
|
/**
|
|
671
671
|
*
|
|
672
672
|
*/
|
|
673
|
-
SplunkVisualization.
|
|
673
|
+
SplunkVisualization.defaults = {
|
|
674
674
|
// BaseVisualization in dashboard-visualizations uses 100% for width but 250 for height
|
|
675
675
|
width: "100%",
|
|
676
676
|
height: INITIAL_HEIGHT,
|
|
@@ -691,13 +691,13 @@ var SplunkVisualization_default = SplunkVisualization;
|
|
|
691
691
|
// src/common/interfaces/DataSource.ts
|
|
692
692
|
var validSortDirs = ["asc", "desc", "none"];
|
|
693
693
|
|
|
694
|
-
// src/common/hooks/
|
|
694
|
+
// src/common/hooks/useSorting.ts
|
|
695
695
|
var SortParamsPropTypes = prop_types_exports.shape({
|
|
696
696
|
currentSortKey: prop_types_exports.string,
|
|
697
697
|
currentSortDir: prop_types_exports.oneOf(validSortDirs),
|
|
698
698
|
onSort: prop_types_exports.func
|
|
699
699
|
});
|
|
700
|
-
var
|
|
700
|
+
var useSortingParams = ({ requestParams, onRequestParamsChange }) => {
|
|
701
701
|
let currentSortKey;
|
|
702
702
|
let currentSortDir;
|
|
703
703
|
const nextSortDirMap = {
|
|
@@ -727,14 +727,14 @@ var getSortingParams = ({ requestParams, onRequestParamsChange }) => {
|
|
|
727
727
|
};
|
|
728
728
|
};
|
|
729
729
|
|
|
730
|
-
// src/common/hooks/
|
|
730
|
+
// src/common/hooks/usePagination.ts
|
|
731
731
|
var PaginatorParamsPropTypes = prop_types_exports.shape({
|
|
732
732
|
isPaging: prop_types_exports.bool,
|
|
733
733
|
current: prop_types_exports.number,
|
|
734
734
|
totalPages: prop_types_exports.number,
|
|
735
735
|
onChange: prop_types_exports.func
|
|
736
736
|
});
|
|
737
|
-
var
|
|
737
|
+
var usePaginationParams = ({
|
|
738
738
|
requestParams,
|
|
739
739
|
meta,
|
|
740
740
|
onRequestParamsChange
|
|
@@ -787,23 +787,93 @@ var defaultImport25 = __toESM(require("@splunk/visualizations-shared/Message"));
|
|
|
787
787
|
__reExport(Message_exports, require("@splunk/visualizations-shared/Message"));
|
|
788
788
|
var Message_default = "default" in defaultImport25 ? defaultImport25.default : defaultImport25;
|
|
789
789
|
|
|
790
|
-
// esm-externals:@splunk/visualizations-shared/style
|
|
791
|
-
var style_exports = {};
|
|
792
|
-
__export(style_exports, {
|
|
793
|
-
default: () => style_default
|
|
794
|
-
});
|
|
795
|
-
var defaultImport26 = __toESM(require("@splunk/visualizations-shared/style"));
|
|
796
|
-
__reExport(style_exports, require("@splunk/visualizations-shared/style"));
|
|
797
|
-
var style_default = "default" in defaultImport26 ? defaultImport26.default : defaultImport26;
|
|
798
|
-
|
|
799
790
|
// esm-externals:@splunk/visualizations-shared/SizeAwareWrapper
|
|
800
791
|
var SizeAwareWrapper_exports = {};
|
|
801
792
|
__export(SizeAwareWrapper_exports, {
|
|
802
793
|
default: () => SizeAwareWrapper_default
|
|
803
794
|
});
|
|
804
|
-
var
|
|
795
|
+
var defaultImport26 = __toESM(require("@splunk/visualizations-shared/SizeAwareWrapper"));
|
|
805
796
|
__reExport(SizeAwareWrapper_exports, require("@splunk/visualizations-shared/SizeAwareWrapper"));
|
|
806
|
-
var SizeAwareWrapper_default = "default" in
|
|
797
|
+
var SizeAwareWrapper_default = "default" in defaultImport26 ? defaultImport26.default : defaultImport26;
|
|
798
|
+
|
|
799
|
+
// src/common/components/MissingPropsMessage.tsx
|
|
800
|
+
var isMissing = (v) => {
|
|
801
|
+
return v === null || v === void 0;
|
|
802
|
+
};
|
|
803
|
+
var missingKeys = (keys, target) => keys.filter((k) => isMissing(target[k]));
|
|
804
|
+
var MissingPropsMessage = (props) => {
|
|
805
|
+
const {
|
|
806
|
+
width = SplunkVisualization_default.defaults.width,
|
|
807
|
+
height = SplunkVisualization_default.defaults.height,
|
|
808
|
+
missingProps,
|
|
809
|
+
backgroundColor
|
|
810
|
+
} = props;
|
|
811
|
+
const cachedHandleResize = react_exports.useCallback((w, h) => {
|
|
812
|
+
setContainerWidth(w);
|
|
813
|
+
setContainerHeight(h);
|
|
814
|
+
}, []);
|
|
815
|
+
const [containerWidth, setContainerWidth] = react_exports.useState(Number(width));
|
|
816
|
+
const [containerHeight, setContainerHeight] = react_exports.useState(Number(height));
|
|
817
|
+
return /* @__PURE__ */ react_exports.createElement("div", { style: { width: containerWidth, height: containerHeight, background: backgroundColor } }, /* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }), /* @__PURE__ */ react_exports.createElement(
|
|
818
|
+
Message_default,
|
|
819
|
+
{
|
|
820
|
+
"data-test": "message",
|
|
821
|
+
width,
|
|
822
|
+
height,
|
|
823
|
+
message: (0, i18n_exports._)(`Missing property: ${missingProps.join(", ")}`),
|
|
824
|
+
level: "error"
|
|
825
|
+
}
|
|
826
|
+
));
|
|
827
|
+
};
|
|
828
|
+
var MissingPropsMessage_default = MissingPropsMessage;
|
|
829
|
+
|
|
830
|
+
// src/common/utils/hocUtils.ts
|
|
831
|
+
var extendStaticWrapperProps = ({
|
|
832
|
+
Wrapper,
|
|
833
|
+
Visualization
|
|
834
|
+
}) => {
|
|
835
|
+
const extendProperties = ["propTypes", "config"];
|
|
836
|
+
extendProperties.forEach((prop) => {
|
|
837
|
+
if (Visualization[prop]) {
|
|
838
|
+
Wrapper[prop] = Visualization[prop];
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
};
|
|
842
|
+
|
|
843
|
+
// src/common/hocs/withEditModeCover.tsx
|
|
844
|
+
var Cover = styled_components_default.div`
|
|
845
|
+
position: absolute;
|
|
846
|
+
left: 0;
|
|
847
|
+
right: 0;
|
|
848
|
+
top: 0;
|
|
849
|
+
bottom: 0;
|
|
850
|
+
`;
|
|
851
|
+
var Blocker = styled_components_default.div.attrs({
|
|
852
|
+
"data-splunk-visualization-version": "28.2.1 - b6faf8893"
|
|
853
|
+
})`
|
|
854
|
+
position: relative;
|
|
855
|
+
width: 100%;
|
|
856
|
+
height: 100%;
|
|
857
|
+
`;
|
|
858
|
+
var withEditModeCover = (Visualization, disableEditModeCover) => {
|
|
859
|
+
const Wrapper = (props) => {
|
|
860
|
+
const { mode } = props;
|
|
861
|
+
const showEditCover = mode === "edit" && !disableEditModeCover;
|
|
862
|
+
return /* @__PURE__ */ react_exports.createElement(Blocker, null, /* @__PURE__ */ react_exports.createElement(Visualization, __spreadValues({}, props)), showEditCover && /* @__PURE__ */ react_exports.createElement(Cover, { "data-test": "edit-mode-cover" }));
|
|
863
|
+
};
|
|
864
|
+
extendStaticWrapperProps({ Wrapper, Visualization });
|
|
865
|
+
return Wrapper;
|
|
866
|
+
};
|
|
867
|
+
var withEditModeCover_default = withEditModeCover;
|
|
868
|
+
|
|
869
|
+
// esm-externals:@splunk/visualizations-shared/style
|
|
870
|
+
var style_exports = {};
|
|
871
|
+
__export(style_exports, {
|
|
872
|
+
default: () => style_default
|
|
873
|
+
});
|
|
874
|
+
var defaultImport27 = __toESM(require("@splunk/visualizations-shared/style"));
|
|
875
|
+
__reExport(style_exports, require("@splunk/visualizations-shared/style"));
|
|
876
|
+
var style_default = "default" in defaultImport27 ? defaultImport27.default : defaultImport27;
|
|
807
877
|
|
|
808
878
|
// src/common/hocs/FixedSizeContainer.tsx
|
|
809
879
|
var Item = styled_components_default.div.attrs(({ width }) => ({
|
|
@@ -855,7 +925,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
855
925
|
FixSizeItem,
|
|
856
926
|
{
|
|
857
927
|
"data-test": "fix-size-item",
|
|
858
|
-
"data-splunk-visualization-version": "28.1
|
|
928
|
+
"data-splunk-visualization-version": "28.2.1 - b6faf8893",
|
|
859
929
|
width,
|
|
860
930
|
height,
|
|
861
931
|
backgroundColor
|
|
@@ -868,76 +938,6 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
868
938
|
};
|
|
869
939
|
var FixedSizeContainer_default = withFixedSizeContainer;
|
|
870
940
|
|
|
871
|
-
// src/common/components/MissingPropsMessage.tsx
|
|
872
|
-
var isMissing = (v) => {
|
|
873
|
-
return v === null || v === void 0;
|
|
874
|
-
};
|
|
875
|
-
var missingKeys = (keys, target) => keys.filter((k) => isMissing(target[k]));
|
|
876
|
-
var propTypes = {
|
|
877
|
-
width: prop_types_exports.oneOfType([prop_types_exports.string, prop_types_exports.number]),
|
|
878
|
-
height: prop_types_exports.oneOfType([prop_types_exports.string, prop_types_exports.number]),
|
|
879
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
|
880
|
-
backgroundColor: prop_types_exports.string,
|
|
881
|
-
missingProps: prop_types_exports.arrayOf(prop_types_exports.string)
|
|
882
|
-
};
|
|
883
|
-
var MissingPropsMessage = (props) => {
|
|
884
|
-
const { width, height, missingProps } = props;
|
|
885
|
-
return /* @__PURE__ */ react_exports.createElement(
|
|
886
|
-
Message_default,
|
|
887
|
-
{
|
|
888
|
-
"data-test": "message",
|
|
889
|
-
width,
|
|
890
|
-
height,
|
|
891
|
-
message: (0, i18n_exports._)(`Missing property: ${missingProps.join(", ")}`)
|
|
892
|
-
}
|
|
893
|
-
);
|
|
894
|
-
};
|
|
895
|
-
MissingPropsMessage.propTypes = propTypes;
|
|
896
|
-
MissingPropsMessage.defaultProps = {
|
|
897
|
-
width: "100%",
|
|
898
|
-
height: 250
|
|
899
|
-
};
|
|
900
|
-
var MissingPropsMessage_default = FixedSizeContainer_default(MissingPropsMessage);
|
|
901
|
-
|
|
902
|
-
// src/common/utils/hocUtils.ts
|
|
903
|
-
var extendStaticWrapperProps = ({
|
|
904
|
-
Wrapper,
|
|
905
|
-
Visualization
|
|
906
|
-
}) => {
|
|
907
|
-
const extendProperties = ["propTypes", "defaultProps", "config"];
|
|
908
|
-
extendProperties.forEach((prop) => {
|
|
909
|
-
if (Visualization[prop]) {
|
|
910
|
-
Wrapper[prop] = Visualization[prop];
|
|
911
|
-
}
|
|
912
|
-
});
|
|
913
|
-
};
|
|
914
|
-
|
|
915
|
-
// src/common/hocs/withEditModeCover.tsx
|
|
916
|
-
var Cover = styled_components_default.div`
|
|
917
|
-
position: absolute;
|
|
918
|
-
left: 0;
|
|
919
|
-
right: 0;
|
|
920
|
-
top: 0;
|
|
921
|
-
bottom: 0;
|
|
922
|
-
`;
|
|
923
|
-
var Blocker = styled_components_default.div.attrs({
|
|
924
|
-
"data-splunk-visualization-version": "28.1.0 - 4a1bff08b"
|
|
925
|
-
})`
|
|
926
|
-
position: relative;
|
|
927
|
-
width: 100%;
|
|
928
|
-
height: 100%;
|
|
929
|
-
`;
|
|
930
|
-
var withEditModeCover = (Visualization, disableEditModeCover) => {
|
|
931
|
-
const Wrapper = (props) => {
|
|
932
|
-
const { mode } = props;
|
|
933
|
-
const showEditCover = mode === "edit" && !disableEditModeCover;
|
|
934
|
-
return /* @__PURE__ */ react_exports.createElement(Blocker, null, /* @__PURE__ */ react_exports.createElement(Visualization, __spreadValues({}, props)), showEditCover && /* @__PURE__ */ react_exports.createElement(Cover, { "data-test": "edit-mode-cover" }));
|
|
935
|
-
};
|
|
936
|
-
extendStaticWrapperProps({ Wrapper, Visualization });
|
|
937
|
-
return Wrapper;
|
|
938
|
-
};
|
|
939
|
-
var withEditModeCover_default = withEditModeCover;
|
|
940
|
-
|
|
941
941
|
// src/common/components/IconPlaceholder.tsx
|
|
942
942
|
var shouldShowIconPlaceholder = (dataSources, loading = false) => {
|
|
943
943
|
const data = (0, lodash_exports.get)(dataSources, "primary.data.columns[0]", void 0);
|
|
@@ -946,18 +946,17 @@ var shouldShowIconPlaceholder = (dataSources, loading = false) => {
|
|
|
946
946
|
const noFields = fields === void 0;
|
|
947
947
|
return loading || noData || noFields;
|
|
948
948
|
};
|
|
949
|
-
var propTypes2 = {
|
|
950
|
-
icon: prop_types_exports.func,
|
|
951
|
-
width: prop_types_exports.oneOfType([prop_types_exports.string, prop_types_exports.number]),
|
|
952
|
-
height: prop_types_exports.oneOfType([prop_types_exports.string, prop_types_exports.number]),
|
|
953
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
|
954
|
-
backgroundColor: prop_types_exports.string,
|
|
955
|
-
iconColor: prop_types_exports.string
|
|
956
|
-
};
|
|
957
949
|
var IconPlaceholder = (props) => {
|
|
958
|
-
const {
|
|
950
|
+
const {
|
|
951
|
+
width = SplunkVisualization_default.defaults.width,
|
|
952
|
+
height = SplunkVisualization_default.defaults.height,
|
|
953
|
+
icon,
|
|
954
|
+
iconColor,
|
|
955
|
+
backgroundColor
|
|
956
|
+
} = props;
|
|
957
|
+
let content = /* @__PURE__ */ react_exports.createElement(Message_default, { width, height, level: "warning", message: (0, i18n_exports._)("No DataSource Connected") });
|
|
959
958
|
if (icon) {
|
|
960
|
-
|
|
959
|
+
content = react_exports.createElement(icon, {
|
|
961
960
|
style: {
|
|
962
961
|
left: "50%",
|
|
963
962
|
top: "50%",
|
|
@@ -971,12 +970,7 @@ var IconPlaceholder = (props) => {
|
|
|
971
970
|
"data-test": "icon-placeholder"
|
|
972
971
|
});
|
|
973
972
|
}
|
|
974
|
-
return /* @__PURE__ */ react_exports.createElement(
|
|
975
|
-
};
|
|
976
|
-
IconPlaceholder.propTypes = propTypes2;
|
|
977
|
-
IconPlaceholder.defaultProps = {
|
|
978
|
-
width: "100%",
|
|
979
|
-
height: 250
|
|
973
|
+
return /* @__PURE__ */ react_exports.createElement("div", { style: { width, height, background: backgroundColor } }, content);
|
|
980
974
|
};
|
|
981
975
|
var IconPlaceholder_default = FixedSizeContainer_default(IconPlaceholder);
|
|
982
976
|
|
|
@@ -986,11 +980,17 @@ var withPlaceholder = (Visualization, useIconPlaceholder = shouldShowIconPlaceho
|
|
|
986
980
|
const { themes: themes3 } = config3;
|
|
987
981
|
const Wrapper = (props) => {
|
|
988
982
|
var _a, _b;
|
|
989
|
-
const {
|
|
983
|
+
const {
|
|
984
|
+
dataSources,
|
|
985
|
+
loading,
|
|
986
|
+
options,
|
|
987
|
+
height = SplunkVisualization_default.defaults.height,
|
|
988
|
+
width = SplunkVisualization_default.defaults.width
|
|
989
|
+
} = props;
|
|
990
990
|
const showPlaceholder = useIconPlaceholder(dataSources, loading, options);
|
|
991
|
-
const
|
|
992
|
-
const icon = (_b = config3.placeholderIcon) != null ? _b : config3.icon;
|
|
991
|
+
const icon = (_a = config3.placeholderIcon) != null ? _a : config3.icon;
|
|
993
992
|
const iconColor = variables_default.contentColorActive(props);
|
|
993
|
+
const bgColorFromTheme = (0, colorUtils_exports.isColor)(options == null ? void 0 : options.backgroundColor) ? options == null ? void 0 : options.backgroundColor : (_b = themes3 == null ? void 0 : themes3.defaultBackgroundColor) == null ? void 0 : _b.call(themes3, props);
|
|
994
994
|
if (config3.supports.includes("placeholder" /* PLACEHOLDER */) && showPlaceholder) {
|
|
995
995
|
return /* @__PURE__ */ react_exports.createElement(
|
|
996
996
|
IconPlaceholder_default,
|
|
@@ -1432,6 +1432,382 @@ var turnOffLegendDisplayWhenTrellisIsOn = (isTrellisOn, options) => {
|
|
|
1432
1432
|
return {};
|
|
1433
1433
|
};
|
|
1434
1434
|
|
|
1435
|
+
// esm-externals:@splunk/visualization-canvas
|
|
1436
|
+
var visualization_canvas_exports = {};
|
|
1437
|
+
__export(visualization_canvas_exports, {
|
|
1438
|
+
default: () => visualization_canvas_default
|
|
1439
|
+
});
|
|
1440
|
+
var defaultImport31 = __toESM(require("@splunk/visualization-canvas"));
|
|
1441
|
+
__reExport(visualization_canvas_exports, require("@splunk/visualization-canvas"));
|
|
1442
|
+
var visualization_canvas_default = "default" in defaultImport31 ? defaultImport31.default : defaultImport31;
|
|
1443
|
+
|
|
1444
|
+
// src/common/components/VizStyleWrapper.jsx
|
|
1445
|
+
var VizStyleWrapper = styled_components_default.div.attrs(({ dataTestKey }) => ({
|
|
1446
|
+
"data-test": dataTestKey,
|
|
1447
|
+
"data-testid": dataTestKey
|
|
1448
|
+
}))`
|
|
1449
|
+
display: flex;
|
|
1450
|
+
justify-content: center;
|
|
1451
|
+
flex-direction: column;
|
|
1452
|
+
width: 100%;
|
|
1453
|
+
height: 100%;
|
|
1454
|
+
background-color: ${(props) => props.backgroundColor};
|
|
1455
|
+
`;
|
|
1456
|
+
VizStyleWrapper.displayName = "VizStyleWrapper";
|
|
1457
|
+
var VizStyleWrapper_default = VizStyleWrapper;
|
|
1458
|
+
|
|
1459
|
+
// esm-externals:@splunk/react-icons/Triangle
|
|
1460
|
+
var Triangle_exports = {};
|
|
1461
|
+
__export(Triangle_exports, {
|
|
1462
|
+
default: () => Triangle_default
|
|
1463
|
+
});
|
|
1464
|
+
var defaultImport32 = __toESM(require("@splunk/react-icons/Triangle"));
|
|
1465
|
+
__reExport(Triangle_exports, require("@splunk/react-icons/Triangle"));
|
|
1466
|
+
var Triangle_default = "default" in defaultImport32 ? defaultImport32.default : defaultImport32;
|
|
1467
|
+
|
|
1468
|
+
// src/common/chartingUtils.ts
|
|
1469
|
+
var DEFAULT_LINE_WIDTH = 2;
|
|
1470
|
+
var getAnnotationsForCanvas = ({
|
|
1471
|
+
annotationX,
|
|
1472
|
+
annotationColor,
|
|
1473
|
+
annotationLabel
|
|
1474
|
+
}) => (annotationX == null ? void 0 : annotationX.length) ? annotationX.map((timestamp, i) => ({
|
|
1475
|
+
key: annotationLabel == null ? void 0 : annotationLabel[i],
|
|
1476
|
+
time: timestamp,
|
|
1477
|
+
color: annotationColor == null ? void 0 : annotationColor[i]
|
|
1478
|
+
})) : [];
|
|
1479
|
+
var StyledTriangle = styled_components_default(Triangle_default)`
|
|
1480
|
+
color: ${(props) => props.eventColor || variables_default.severityColorNotice(props)};
|
|
1481
|
+
`;
|
|
1482
|
+
var triangleEventAnnotationRenderer = ({ event }) => {
|
|
1483
|
+
const eventWithColor = event;
|
|
1484
|
+
return react_default.createElement(StyledTriangle, {
|
|
1485
|
+
viewBox: "0 0 24 24",
|
|
1486
|
+
variant: "filled",
|
|
1487
|
+
eventColor: eventWithColor.color
|
|
1488
|
+
});
|
|
1489
|
+
};
|
|
1490
|
+
var canvasSupportedTimeSeriesCharts = ["splunk.line"];
|
|
1491
|
+
var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
|
|
1492
|
+
return canvasSupportedTimeSeriesCharts.indexOf(vizConfigKey) > -1;
|
|
1493
|
+
};
|
|
1494
|
+
var filterChartDataFromInternalFields = (chartData) => {
|
|
1495
|
+
const { fields, columns } = chartData;
|
|
1496
|
+
const keepIndexes = fields.reduce((acc, field, index) => {
|
|
1497
|
+
const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
|
|
1498
|
+
if (!(fieldName == null ? void 0 : fieldName.startsWith("_")) || fieldName === "_time") {
|
|
1499
|
+
acc.push(index);
|
|
1500
|
+
}
|
|
1501
|
+
return acc;
|
|
1502
|
+
}, []);
|
|
1503
|
+
const filteredFields = keepIndexes.map((index) => fields[index]);
|
|
1504
|
+
const filteredColumns = keepIndexes.map((index) => columns[index]);
|
|
1505
|
+
return { fields: filteredFields, columns: filteredColumns };
|
|
1506
|
+
};
|
|
1507
|
+
var convert2DArrayToNumbers = (arr) => {
|
|
1508
|
+
return arr.map((subArray) => subArray.map((element) => parseFloat(element)));
|
|
1509
|
+
};
|
|
1510
|
+
var SideLegendWidth = 75;
|
|
1511
|
+
var commonLegendProps = { center: true, fontSize: 12, largerTiles: true, hideSeriesValue: true };
|
|
1512
|
+
var getLegend = (props) => {
|
|
1513
|
+
const legendPlacement = props == null ? void 0 : props.legendDisplay;
|
|
1514
|
+
switch (legendPlacement) {
|
|
1515
|
+
case "off":
|
|
1516
|
+
return false;
|
|
1517
|
+
case "left":
|
|
1518
|
+
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
|
|
1519
|
+
width: SideLegendWidth
|
|
1520
|
+
}, commonLegendProps));
|
|
1521
|
+
case "bottom":
|
|
1522
|
+
return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
|
|
1523
|
+
wrap: true
|
|
1524
|
+
}, commonLegendProps));
|
|
1525
|
+
case "top":
|
|
1526
|
+
return (0, visualization_canvas_exports.TopLegendFactory)(__spreadValues({
|
|
1527
|
+
wrap: true
|
|
1528
|
+
}, commonLegendProps));
|
|
1529
|
+
default:
|
|
1530
|
+
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
|
|
1531
|
+
width: SideLegendWidth
|
|
1532
|
+
}, commonLegendProps));
|
|
1533
|
+
}
|
|
1534
|
+
};
|
|
1535
|
+
var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
|
|
1536
|
+
if (axisTitleVisibility === "collapsed") {
|
|
1537
|
+
return "";
|
|
1538
|
+
}
|
|
1539
|
+
let fieldTitle = fields.length > 1 ? "" : fields[0];
|
|
1540
|
+
if (!fieldTitle) {
|
|
1541
|
+
fieldTitle = "";
|
|
1542
|
+
}
|
|
1543
|
+
return (inputAxisTitle == null ? void 0 : inputAxisTitle.length) ? inputAxisTitle.trim() : fieldTitle;
|
|
1544
|
+
};
|
|
1545
|
+
var ellipsisAxisTitle = (axisTitle, containerSpacing, fontSize = 12) => {
|
|
1546
|
+
if (!axisTitle) {
|
|
1547
|
+
return "";
|
|
1548
|
+
}
|
|
1549
|
+
if (Number.isNaN(containerSpacing) || containerSpacing <= 0) {
|
|
1550
|
+
return axisTitle;
|
|
1551
|
+
}
|
|
1552
|
+
const availableHeight = containerSpacing * 0.6;
|
|
1553
|
+
const avgCharWidth = fontSize * 0.55;
|
|
1554
|
+
const maxChars = Math.floor(availableHeight / avgCharWidth);
|
|
1555
|
+
if (axisTitle.length <= maxChars) {
|
|
1556
|
+
return axisTitle;
|
|
1557
|
+
}
|
|
1558
|
+
if (maxChars <= 3) {
|
|
1559
|
+
return "...";
|
|
1560
|
+
}
|
|
1561
|
+
const availableChars = maxChars - 3;
|
|
1562
|
+
const halfChars = Math.floor(availableChars / 2);
|
|
1563
|
+
const start = axisTitle.slice(0, halfChars);
|
|
1564
|
+
const end = axisTitle.slice(-halfChars);
|
|
1565
|
+
return `${start}...${end}`;
|
|
1566
|
+
};
|
|
1567
|
+
var getFieldName = (field) => {
|
|
1568
|
+
const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
|
|
1569
|
+
return fieldName;
|
|
1570
|
+
};
|
|
1571
|
+
var getFieldNames = (fields) => {
|
|
1572
|
+
return fields.map((field) => getFieldName(field));
|
|
1573
|
+
};
|
|
1574
|
+
var getXScaleConfig = (label) => {
|
|
1575
|
+
const xConfig = { x: {} };
|
|
1576
|
+
xConfig.x.label = label;
|
|
1577
|
+
return xConfig;
|
|
1578
|
+
};
|
|
1579
|
+
var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale) => {
|
|
1580
|
+
const scaleType = yAxisScale != null ? yAxisScale : "linear";
|
|
1581
|
+
const yConfig = { y: {} };
|
|
1582
|
+
yConfig.y.label = label;
|
|
1583
|
+
yConfig.y.type = scaleType;
|
|
1584
|
+
if (yAxisAbbreviation !== "none") {
|
|
1585
|
+
yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
|
|
1586
|
+
}
|
|
1587
|
+
if (yAxisAbbreviation === "none") {
|
|
1588
|
+
yConfig.y.width = 55;
|
|
1589
|
+
} else {
|
|
1590
|
+
yConfig.y.width = label && label.length > 0 ? 30 : 10;
|
|
1591
|
+
}
|
|
1592
|
+
return yConfig;
|
|
1593
|
+
};
|
|
1594
|
+
var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger) => {
|
|
1595
|
+
const y2Config = { y2: {} };
|
|
1596
|
+
const scaleType = axisScale != null ? axisScale : "linear";
|
|
1597
|
+
y2Config.y2.label = label;
|
|
1598
|
+
y2Config.y2.side = "right";
|
|
1599
|
+
y2Config.y2.showGrid = false;
|
|
1600
|
+
y2Config.y2.type = scaleType;
|
|
1601
|
+
if (axisAbbreviation !== "none") {
|
|
1602
|
+
y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
|
|
1603
|
+
} else if (roundAxisLabelsToInteger) {
|
|
1604
|
+
y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
|
|
1605
|
+
}
|
|
1606
|
+
return y2Config;
|
|
1607
|
+
};
|
|
1608
|
+
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode) => {
|
|
1609
|
+
const seriesConfig = {};
|
|
1610
|
+
let spanGaps;
|
|
1611
|
+
let replaceNullsWithZero;
|
|
1612
|
+
if (nullValueMode === "gaps") {
|
|
1613
|
+
spanGaps = false;
|
|
1614
|
+
} else if (nullValueMode === "connect" || nullValueMode === "zero") {
|
|
1615
|
+
spanGaps = true;
|
|
1616
|
+
if (nullValueMode === "zero") {
|
|
1617
|
+
replaceNullsWithZero = true;
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
yfields.forEach((field) => {
|
|
1621
|
+
seriesConfig[field] = {
|
|
1622
|
+
overrides: { width: lineWidth != null ? lineWidth : DEFAULT_LINE_WIDTH }
|
|
1623
|
+
};
|
|
1624
|
+
if (spanGaps !== void 0) {
|
|
1625
|
+
seriesConfig[field].overrides.spanGaps = spanGaps;
|
|
1626
|
+
}
|
|
1627
|
+
if (y2Enabled) {
|
|
1628
|
+
const shouldAssignToY2 = (
|
|
1629
|
+
// If y2Fields are present, assign all y2Fields to y2 scale
|
|
1630
|
+
(y2fields == null ? void 0 : y2fields.length) > 0 && y2fields.includes(field) || // Else, assign all overlayFields to y2 scale
|
|
1631
|
+
(!y2fields || y2fields.length === 0) && (overlayFields == null ? void 0 : overlayFields.includes(field))
|
|
1632
|
+
);
|
|
1633
|
+
if (shouldAssignToY2) {
|
|
1634
|
+
seriesConfig[field].overrides.scale = "y2";
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
|
|
1638
|
+
seriesConfig[field].type = "line";
|
|
1639
|
+
}
|
|
1640
|
+
if (replaceNullsWithZero !== void 0) {
|
|
1641
|
+
seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
|
|
1642
|
+
}
|
|
1643
|
+
});
|
|
1644
|
+
return seriesConfig;
|
|
1645
|
+
};
|
|
1646
|
+
|
|
1647
|
+
// src/common/TimeSeriesChartWrapper.tsx
|
|
1648
|
+
var TimeSeriesChartContainer = styled_components_default.div`
|
|
1649
|
+
overflow: hidden;
|
|
1650
|
+
${(props) => (0, style_exports.toDimension)((0, lodash_exports.pick)(props, ["width", "height"]))};
|
|
1651
|
+
|
|
1652
|
+
canvas {
|
|
1653
|
+
position: absolute !important; // This is needed for canvas element export pdf/png to work correctly
|
|
1654
|
+
}
|
|
1655
|
+
`;
|
|
1656
|
+
var handleClick = (chartEvent, props) => {
|
|
1657
|
+
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(chartEvent, "value", "seriesKey")), {
|
|
1658
|
+
name: chartEvent.seriesKey
|
|
1659
|
+
});
|
|
1660
|
+
delete payload.seriesKey;
|
|
1661
|
+
const clickHandler = props == null ? void 0 : props.onClick;
|
|
1662
|
+
if (clickHandler) {
|
|
1663
|
+
clickHandler({
|
|
1664
|
+
type: "point.click",
|
|
1665
|
+
originalEvent: chartEvent,
|
|
1666
|
+
payload
|
|
1667
|
+
});
|
|
1668
|
+
}
|
|
1669
|
+
};
|
|
1670
|
+
var handleLegendClick = (chartEvent, props) => {
|
|
1671
|
+
const payload = {
|
|
1672
|
+
name: chartEvent
|
|
1673
|
+
};
|
|
1674
|
+
const clickHandler = props == null ? void 0 : props.onClick;
|
|
1675
|
+
if (clickHandler) {
|
|
1676
|
+
clickHandler({
|
|
1677
|
+
type: "legend.click",
|
|
1678
|
+
originalEvent: chartEvent,
|
|
1679
|
+
payload
|
|
1680
|
+
});
|
|
1681
|
+
}
|
|
1682
|
+
};
|
|
1683
|
+
var TimeSeriesChartWrapper = (props) => {
|
|
1684
|
+
const { width, height, chartData, options, userLocale, annotationX, annotationLabel, annotationColor } = props;
|
|
1685
|
+
const {
|
|
1686
|
+
backgroundColor,
|
|
1687
|
+
seriesColors: seriesColorsStr,
|
|
1688
|
+
fieldColors,
|
|
1689
|
+
"axisTitleX.text": xAxisTitleText,
|
|
1690
|
+
"axisTitleY.text": yAxisTitleText,
|
|
1691
|
+
"axisTitleY2.text": y2AxisTitleText,
|
|
1692
|
+
"axisTitleX.visibility": xAxisTitleVisibility,
|
|
1693
|
+
"axisTitleY.visibility": yAxisTitleVisibility,
|
|
1694
|
+
"axisTitleY2.visibility": y2AxisTitleVisibility,
|
|
1695
|
+
"axisY.abbreviation": yAxisAbbreviation,
|
|
1696
|
+
"axisY.scale": yAxisScale,
|
|
1697
|
+
"axisY2.abbreviation": y2AxisAbbreviation,
|
|
1698
|
+
"axisY2.fields": y2FieldsStr,
|
|
1699
|
+
"axisY2.scale": y2AxisScale,
|
|
1700
|
+
"axisY2.enabled": y2Enabled,
|
|
1701
|
+
"axisLabelsY2.integerUnits": y2IntegerUnits,
|
|
1702
|
+
"chart.overlayFields": overlayFieldsStr,
|
|
1703
|
+
"chart.nullValueMode": nullValueMode,
|
|
1704
|
+
lineWidth
|
|
1705
|
+
} = options;
|
|
1706
|
+
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
1707
|
+
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
1708
|
+
const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
|
|
1709
|
+
const [containerHeight, setContainerHeight] = react_exports.useState(Number(props.height));
|
|
1710
|
+
const cachedHandleResize = react_exports.useCallback((w, h) => {
|
|
1711
|
+
setContainerWidth(w);
|
|
1712
|
+
setContainerHeight(h);
|
|
1713
|
+
}, []);
|
|
1714
|
+
const filteredChartData = filterChartDataFromInternalFields({
|
|
1715
|
+
fields: chartData.fields,
|
|
1716
|
+
columns: chartData.seriesList
|
|
1717
|
+
});
|
|
1718
|
+
const xField = getFieldName(filteredChartData.fields[0]);
|
|
1719
|
+
const yFields = getFieldNames(
|
|
1720
|
+
filteredChartData.fields.length > 1 ? filteredChartData.fields.slice(1) : []
|
|
1721
|
+
);
|
|
1722
|
+
const y2Fields = y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [];
|
|
1723
|
+
const overlayFields = overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [];
|
|
1724
|
+
let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
|
|
1725
|
+
xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
|
|
1726
|
+
let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFields, yAxisTitleVisibility);
|
|
1727
|
+
yAxisTitle = ellipsisAxisTitle(yAxisTitle, containerHeight);
|
|
1728
|
+
const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
|
|
1729
|
+
let y2AxisTitle = getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility);
|
|
1730
|
+
y2AxisTitle = ellipsisAxisTitle(y2AxisTitle, containerHeight);
|
|
1731
|
+
const xScaleConfig = getXScaleConfig(xAxisTitle);
|
|
1732
|
+
const yScaleConfig = getYScaleConfig(yAxisTitle, yAxisAbbreviation, yAxisScale);
|
|
1733
|
+
let y2ScaleConfig = {};
|
|
1734
|
+
if (y2Enabled) {
|
|
1735
|
+
y2ScaleConfig = getY2ScaleConfig(y2AxisTitle, y2AxisAbbreviation, y2AxisScale, y2IntegerUnits);
|
|
1736
|
+
}
|
|
1737
|
+
const uplotContainerElement = (0, react_exports.useRef)(null);
|
|
1738
|
+
const seriesDataFormatted = [
|
|
1739
|
+
filteredChartData.columns[0],
|
|
1740
|
+
...convert2DArrayToNumbers(filteredChartData.columns.slice(1))
|
|
1741
|
+
];
|
|
1742
|
+
chartData.fields = filteredChartData.fields;
|
|
1743
|
+
chartData.columns = seriesDataFormatted;
|
|
1744
|
+
const seriesOverrides = getSeriesOverrides(
|
|
1745
|
+
yFields,
|
|
1746
|
+
y2Fields,
|
|
1747
|
+
lineWidth,
|
|
1748
|
+
overlayFields,
|
|
1749
|
+
y2Enabled,
|
|
1750
|
+
nullValueMode
|
|
1751
|
+
);
|
|
1752
|
+
const chartingEventAnnotations = getAnnotationsForCanvas({
|
|
1753
|
+
annotationX,
|
|
1754
|
+
annotationColor,
|
|
1755
|
+
annotationLabel
|
|
1756
|
+
});
|
|
1757
|
+
const MemoizedChart = react_exports.memo(visualization_canvas_exports.TimeSeriesChart);
|
|
1758
|
+
const scaleConfig = __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig);
|
|
1759
|
+
const memoizedChart = (0, react_exports.useMemo)(
|
|
1760
|
+
() => /* @__PURE__ */ react_exports.createElement(
|
|
1761
|
+
MemoizedChart,
|
|
1762
|
+
{
|
|
1763
|
+
data: chartData,
|
|
1764
|
+
width: containerWidth,
|
|
1765
|
+
height: containerHeight,
|
|
1766
|
+
seriesColors,
|
|
1767
|
+
seriesColorsByField,
|
|
1768
|
+
seriesConfig: seriesOverrides,
|
|
1769
|
+
legend: getLegend(props),
|
|
1770
|
+
scaleConfig,
|
|
1771
|
+
timestampFormat: "expanded",
|
|
1772
|
+
onCrosshairClick: (event) => handleClick(event, props),
|
|
1773
|
+
onSeriesClick: (event) => handleLegendClick(event, props),
|
|
1774
|
+
userLocale,
|
|
1775
|
+
events: chartingEventAnnotations,
|
|
1776
|
+
eventsConfig: { renderer: triangleEventAnnotationRenderer }
|
|
1777
|
+
}
|
|
1778
|
+
),
|
|
1779
|
+
[
|
|
1780
|
+
MemoizedChart,
|
|
1781
|
+
chartData,
|
|
1782
|
+
containerWidth,
|
|
1783
|
+
containerHeight,
|
|
1784
|
+
seriesColors,
|
|
1785
|
+
seriesColorsByField,
|
|
1786
|
+
seriesOverrides,
|
|
1787
|
+
lineWidth,
|
|
1788
|
+
props,
|
|
1789
|
+
scaleConfig,
|
|
1790
|
+
userLocale,
|
|
1791
|
+
chartingEventAnnotations
|
|
1792
|
+
]
|
|
1793
|
+
);
|
|
1794
|
+
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
1795
|
+
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor }, memoizedChart);
|
|
1796
|
+
}, [backgroundColor]);
|
|
1797
|
+
return /* @__PURE__ */ react_exports.createElement(
|
|
1798
|
+
TimeSeriesChartContainer,
|
|
1799
|
+
{
|
|
1800
|
+
height,
|
|
1801
|
+
width,
|
|
1802
|
+
ref: uplotContainerElement,
|
|
1803
|
+
"data-test": "timeseries-chart-wrapper"
|
|
1804
|
+
},
|
|
1805
|
+
/* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }),
|
|
1806
|
+
memoizedVisualization
|
|
1807
|
+
);
|
|
1808
|
+
};
|
|
1809
|
+
var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
|
|
1810
|
+
|
|
1435
1811
|
// src/common/withDashboardViz.tsx
|
|
1436
1812
|
var withDashboardViz = (opts) => {
|
|
1437
1813
|
const {
|
|
@@ -1449,30 +1825,29 @@ var withDashboardViz = (opts) => {
|
|
|
1449
1825
|
const DashboardViz = (props) => {
|
|
1450
1826
|
var _a;
|
|
1451
1827
|
const {
|
|
1452
|
-
mode,
|
|
1828
|
+
mode = "view",
|
|
1453
1829
|
hasEventHandlers,
|
|
1454
1830
|
dataSources,
|
|
1455
1831
|
// type of { [key: string]: DataSource }
|
|
1456
|
-
options,
|
|
1832
|
+
options = {},
|
|
1457
1833
|
context = {},
|
|
1458
1834
|
width,
|
|
1459
1835
|
height,
|
|
1460
|
-
onComputedProps,
|
|
1461
|
-
onEventTrigger,
|
|
1836
|
+
onComputedProps = lodash_exports.noop,
|
|
1837
|
+
onEventTrigger = SplunkVisualization_default.defaults.onEventTrigger,
|
|
1462
1838
|
theme,
|
|
1463
|
-
onRequestParamsChange
|
|
1839
|
+
onRequestParamsChange = lodash_exports.noop
|
|
1464
1840
|
} = props;
|
|
1465
|
-
const
|
|
1466
|
-
if (serializedTimezone) {
|
|
1841
|
+
const localeContext = react_exports.useContext(TimezoneContext_default);
|
|
1842
|
+
if (localeContext.serializedTimezone) {
|
|
1467
1843
|
if (!moment_default.getDefaultSplunkTimezone()) {
|
|
1468
|
-
moment_default.setDefaultSplunkTimezone(serializedTimezone);
|
|
1844
|
+
moment_default.setDefaultSplunkTimezone(localeContext.serializedTimezone);
|
|
1469
1845
|
}
|
|
1470
1846
|
}
|
|
1471
1847
|
const themeFunc = (themeVar) => {
|
|
1472
1848
|
var _a2, _b;
|
|
1473
1849
|
return (_b = (_a2 = vizConfig.themes)[themeVar]) == null ? void 0 : _b.call(_a2, props);
|
|
1474
1850
|
};
|
|
1475
|
-
const bgColorFromTheme = themeFunc("defaultBackgroundColor");
|
|
1476
1851
|
const {
|
|
1477
1852
|
family: currentThemeFamily,
|
|
1478
1853
|
colorScheme: currentThemeColorScheme,
|
|
@@ -1494,6 +1869,10 @@ var withDashboardViz = (opts) => {
|
|
|
1494
1869
|
featureFlagContext && featureFlagContext.visualizations_enableTrellis
|
|
1495
1870
|
);
|
|
1496
1871
|
const isTrellisOn = isTrellisFeatureFlagOn && ((_a = vizConfig == null ? void 0 : vizConfig.supports) == null ? void 0 : _a.includes("trellis" /* TRELLIS */)) && (options == null ? void 0 : options.splitByLayout) === "trellis" /* TRELLIS */;
|
|
1872
|
+
const isAcceleratedRenderFeatureFlagOn = Boolean(
|
|
1873
|
+
featureFlagContext == null ? void 0 : featureFlagContext.visualizations_enableAcceleratedRender
|
|
1874
|
+
);
|
|
1875
|
+
const isAcceleratedRenderOn = isAcceleratedRenderFeatureFlagOn && isTimeSeriesCanvasRenderSupported(vizConfig.key) && (options == null ? void 0 : options.acceleratedRender) === true;
|
|
1497
1876
|
const isMounted = react_exports.useRef(true);
|
|
1498
1877
|
const optionsToEvaluate = react_exports.useMemo(() => {
|
|
1499
1878
|
var _a2;
|
|
@@ -1588,10 +1967,34 @@ var withDashboardViz = (opts) => {
|
|
|
1588
1967
|
currentThemeDensity,
|
|
1589
1968
|
optionsToEvaluate,
|
|
1590
1969
|
downsampledDataSources,
|
|
1591
|
-
serializedTimezone,
|
|
1970
|
+
localeContext.serializedTimezone,
|
|
1592
1971
|
useAsyncEvaluatedOptions
|
|
1593
1972
|
]);
|
|
1594
1973
|
const evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync;
|
|
1974
|
+
let dataSourceMetadata = {};
|
|
1975
|
+
const OptionKey = "paginateDataSourceKey";
|
|
1976
|
+
const optsKey = (0, lodash_exports.has)(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey];
|
|
1977
|
+
const paginateDataSourceKey = typeof optsKey === "string" ? optsKey : "primary";
|
|
1978
|
+
const requestParams = (0, lodash_exports.get)(dataSources, [paginateDataSourceKey, "requestParams"], {});
|
|
1979
|
+
const meta = (0, lodash_exports.get)(dataSources, [paginateDataSourceKey, "meta"], {});
|
|
1980
|
+
const handleRequestParamsChange = (payload) => onRequestParamsChange(paginateDataSourceKey, payload);
|
|
1981
|
+
const sortParams = useSortingParams({
|
|
1982
|
+
requestParams,
|
|
1983
|
+
meta,
|
|
1984
|
+
onRequestParamsChange: handleRequestParamsChange
|
|
1985
|
+
});
|
|
1986
|
+
const paginatorParams = usePaginationParams({
|
|
1987
|
+
requestParams,
|
|
1988
|
+
meta,
|
|
1989
|
+
onRequestParamsChange: handleRequestParamsChange
|
|
1990
|
+
});
|
|
1991
|
+
dataSourceMetadata = {
|
|
1992
|
+
sortParams,
|
|
1993
|
+
paginatorParams
|
|
1994
|
+
};
|
|
1995
|
+
if (vizConfig.supports.indexOf("page-and-sort" /* PAGE_AND_SORT */) === -1 && !(0, lodash_exports.has)(dataSources, paginateDataSourceKey)) {
|
|
1996
|
+
dataSourceMetadata = {};
|
|
1997
|
+
}
|
|
1595
1998
|
const clonedEvaluatedOptions = __spreadValues({}, evaluatedOptionsToUse);
|
|
1596
1999
|
if (isTrellisOn) {
|
|
1597
2000
|
clonedEvaluatedOptions.backgroundColor = clonedEvaluatedOptions == null ? void 0 : clonedEvaluatedOptions.trellisBackgroundColor;
|
|
@@ -1617,7 +2020,7 @@ var withDashboardViz = (opts) => {
|
|
|
1617
2020
|
width,
|
|
1618
2021
|
height,
|
|
1619
2022
|
missingProps: missing,
|
|
1620
|
-
backgroundColor:
|
|
2023
|
+
backgroundColor: themeFunc("defaultBackgroundColor")
|
|
1621
2024
|
}
|
|
1622
2025
|
);
|
|
1623
2026
|
}
|
|
@@ -1655,45 +2058,27 @@ var withDashboardViz = (opts) => {
|
|
|
1655
2058
|
const computedVizProps = computeVizProps2(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, props), evaluatedOptionsToUse), eventCallbackProps), {
|
|
1656
2059
|
themeFunc
|
|
1657
2060
|
}));
|
|
1658
|
-
let dataSourceMetadata = {};
|
|
1659
|
-
const OptionKey = "paginateDataSourceKey";
|
|
1660
|
-
const optsKey = (0, lodash_exports.has)(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey];
|
|
1661
|
-
const paginateDataSourceKey = typeof optsKey === "string" ? optsKey : "primary";
|
|
1662
|
-
if (vizConfig.supports.indexOf("page-and-sort" /* PAGE_AND_SORT */) > -1 && (0, lodash_exports.has)(dataSources, paginateDataSourceKey)) {
|
|
1663
|
-
const requestParams = (0, lodash_exports.get)(dataSources, [paginateDataSourceKey, "requestParams"], {});
|
|
1664
|
-
const meta = (0, lodash_exports.get)(dataSources, [paginateDataSourceKey, "meta"], {});
|
|
1665
|
-
const handleRequestParamsChange = (payload) => onRequestParamsChange(paginateDataSourceKey, payload);
|
|
1666
|
-
const sortParams = getSortingParams({
|
|
1667
|
-
requestParams,
|
|
1668
|
-
meta,
|
|
1669
|
-
onRequestParamsChange: handleRequestParamsChange
|
|
1670
|
-
});
|
|
1671
|
-
const paginatorParams = getPaginationParams({
|
|
1672
|
-
requestParams,
|
|
1673
|
-
meta,
|
|
1674
|
-
onRequestParamsChange: handleRequestParamsChange
|
|
1675
|
-
});
|
|
1676
|
-
dataSourceMetadata = {
|
|
1677
|
-
sortParams,
|
|
1678
|
-
paginatorParams
|
|
1679
|
-
};
|
|
1680
|
-
}
|
|
1681
2061
|
if (useAsyncEvaluatedOptions && Object.keys(evaluatedOptionsToUse).length === 0) {
|
|
1682
2062
|
return null;
|
|
1683
2063
|
}
|
|
2064
|
+
let SanitizedViz = SanitizedReactViz;
|
|
2065
|
+
if (isAcceleratedRenderOn) {
|
|
2066
|
+
SanitizedViz = (0, SanitizeProps_exports.withSanitizedProps)(TimeSeriesChartWrapper_default);
|
|
2067
|
+
}
|
|
1684
2068
|
return /* @__PURE__ */ react_exports.createElement(
|
|
1685
|
-
|
|
1686
|
-
__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
2069
|
+
SanitizedViz,
|
|
2070
|
+
__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, SplunkVisualization_default.defaults), {
|
|
1687
2071
|
mode,
|
|
1688
|
-
width,
|
|
1689
|
-
height
|
|
1690
|
-
|
|
2072
|
+
width: width || SplunkVisualization_default.defaults.width,
|
|
2073
|
+
height: height || SplunkVisualization_default.defaults.height,
|
|
2074
|
+
userLocale: localeContext
|
|
2075
|
+
}), downsamplingProps), evaluatedOptionsToUse), computedVizProps), eventCallbackProps), dataSourceMetadata)
|
|
1691
2076
|
);
|
|
1692
2077
|
};
|
|
1693
2078
|
DashboardViz.propTypes = __spreadValues(__spreadValues({}, SplunkVisualization_default.propTypes), ReactViz.propTypes);
|
|
1694
|
-
DashboardViz.defaultProps = __spreadProps(__spreadValues(
|
|
1695
|
-
//
|
|
1696
|
-
|
|
2079
|
+
DashboardViz.defaultProps = __spreadProps(__spreadValues({}, ReactViz.defaultProps), {
|
|
2080
|
+
// we still need ReactViz.defaultProps for the visualizations that still have them
|
|
2081
|
+
onEventTrigger: SplunkVisualization_default.defaults.onEventTrigger
|
|
1697
2082
|
});
|
|
1698
2083
|
DashboardViz.config = vizConfig;
|
|
1699
2084
|
return (0, styled_components_exports.withTheme)(
|
|
@@ -1707,18 +2092,18 @@ var config_exports = {};
|
|
|
1707
2092
|
__export(config_exports, {
|
|
1708
2093
|
default: () => config_default2
|
|
1709
2094
|
});
|
|
1710
|
-
var
|
|
2095
|
+
var defaultImport33 = __toESM(require("@splunk/splunk-utils/config"));
|
|
1711
2096
|
__reExport(config_exports, require("@splunk/splunk-utils/config"));
|
|
1712
|
-
var config_default2 = "default" in
|
|
2097
|
+
var config_default2 = "default" in defaultImport33 ? defaultImport33.default : defaultImport33;
|
|
1713
2098
|
|
|
1714
2099
|
// esm-externals:@splunk/themes
|
|
1715
2100
|
var themes_exports = {};
|
|
1716
2101
|
__export(themes_exports, {
|
|
1717
2102
|
default: () => themes_default
|
|
1718
2103
|
});
|
|
1719
|
-
var
|
|
2104
|
+
var defaultImport34 = __toESM(require("@splunk/themes"));
|
|
1720
2105
|
__reExport(themes_exports, require("@splunk/themes"));
|
|
1721
|
-
var themes_default = "default" in
|
|
2106
|
+
var themes_default = "default" in defaultImport34 ? defaultImport34.default : defaultImport34;
|
|
1722
2107
|
|
|
1723
2108
|
// src/common/utils/styleUtils.ts
|
|
1724
2109
|
var VIZ_FONT_FAMILY = "'Splunk Platform Sans', 'Splunk Data Sans', Roboto, Droid, 'Helvetica Neue', Helvetica, Arial, sans-serif";
|
|
@@ -1957,108 +2342,51 @@ var uplot_react_exports = {};
|
|
|
1957
2342
|
__export(uplot_react_exports, {
|
|
1958
2343
|
default: () => uplot_react_default
|
|
1959
2344
|
});
|
|
1960
|
-
var
|
|
2345
|
+
var defaultImport35 = __toESM(require("uplot-react"));
|
|
1961
2346
|
__reExport(uplot_react_exports, require("uplot-react"));
|
|
1962
|
-
var uplot_react_default = "default" in
|
|
2347
|
+
var uplot_react_default = "default" in defaultImport35 ? defaultImport35.default : defaultImport35;
|
|
1963
2348
|
|
|
1964
|
-
//
|
|
1965
|
-
var
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
var _a;
|
|
1969
|
-
const fullscreenEl = document.fullscreenElement;
|
|
1970
|
-
if (fullscreenEl && fullscreenEl.tagName !== "BODY") {
|
|
1971
|
-
currentScaleFactor = 1;
|
|
1972
|
-
return;
|
|
1973
|
-
}
|
|
1974
|
-
const scope = root || document;
|
|
1975
|
-
const canvasElement = scope.querySelector('[data-test="canvas"]');
|
|
1976
|
-
if (!canvasElement) {
|
|
1977
|
-
canvasScaleObserver == null ? void 0 : canvasScaleObserver.disconnect();
|
|
1978
|
-
return;
|
|
1979
|
-
}
|
|
1980
|
-
const scaleAttr = (_a = canvasElement == null ? void 0 : canvasElement.getAttribute) == null ? void 0 : _a.call(canvasElement, "data-test-scale");
|
|
1981
|
-
if (scaleAttr) {
|
|
1982
|
-
currentScaleFactor = parseFloat(scaleAttr) || 1;
|
|
1983
|
-
return;
|
|
1984
|
-
}
|
|
1985
|
-
const transformMatrix = window.getComputedStyle(canvasElement).getPropertyValue("transform");
|
|
1986
|
-
if (transformMatrix && transformMatrix !== "none") {
|
|
1987
|
-
const matrixValues = transformMatrix.match(/matrix(?:3d)?\((.+)\)/);
|
|
1988
|
-
if (matrixValues) {
|
|
1989
|
-
const values = matrixValues[1].split(", ");
|
|
1990
|
-
currentScaleFactor = parseFloat(values[0]);
|
|
1991
|
-
return;
|
|
1992
|
-
}
|
|
1993
|
-
}
|
|
1994
|
-
currentScaleFactor = 1;
|
|
1995
|
-
};
|
|
1996
|
-
var resetScaleFactorOnFullscreen = () => {
|
|
1997
|
-
document.addEventListener("fullscreenchange", () => {
|
|
1998
|
-
updateScaleFactor();
|
|
1999
|
-
if (document.fullscreenElement) {
|
|
2000
|
-
if (canvasScaleObserver) {
|
|
2001
|
-
canvasScaleObserver.disconnect();
|
|
2002
|
-
}
|
|
2003
|
-
}
|
|
2004
|
-
});
|
|
2005
|
-
};
|
|
2006
|
-
var initObserver = () => {
|
|
2007
|
-
const gridElement = document.querySelector('[data-test="grid-layout"]');
|
|
2008
|
-
const canvasElement = document.querySelector('[data-test="canvas"]');
|
|
2009
|
-
if (gridElement) {
|
|
2010
|
-
canvasScaleObserver = new MutationObserver((mutationsList) => {
|
|
2011
|
-
mutationsList.forEach((mutation) => {
|
|
2012
|
-
if (mutation.type === "attributes" && mutation.attributeName === "data-test-scale") {
|
|
2013
|
-
if (!document.fullscreenElement) {
|
|
2014
|
-
updateScaleFactor();
|
|
2015
|
-
} else {
|
|
2016
|
-
currentScaleFactor = 1;
|
|
2017
|
-
}
|
|
2018
|
-
}
|
|
2019
|
-
});
|
|
2020
|
-
});
|
|
2021
|
-
canvasScaleObserver.observe(gridElement, {
|
|
2022
|
-
attributes: true,
|
|
2023
|
-
attributeFilter: ["data-test-scale"]
|
|
2024
|
-
});
|
|
2025
|
-
} else if (canvasElement) {
|
|
2026
|
-
canvasScaleObserver = new MutationObserver((mutationsList) => {
|
|
2027
|
-
mutationsList.forEach((mutation) => {
|
|
2028
|
-
if (mutation.type === "attributes" && mutation.attributeName === "style") {
|
|
2029
|
-
updateScaleFactor();
|
|
2030
|
-
}
|
|
2031
|
-
});
|
|
2032
|
-
});
|
|
2033
|
-
canvasScaleObserver.observe(canvasElement, {
|
|
2034
|
-
attributes: true,
|
|
2035
|
-
attributeFilter: ["style"]
|
|
2036
|
-
});
|
|
2037
|
-
}
|
|
2038
|
-
};
|
|
2039
|
-
document.addEventListener("DOMContentLoaded", () => {
|
|
2040
|
-
updateScaleFactor();
|
|
2041
|
-
initObserver();
|
|
2042
|
-
resetScaleFactorOnFullscreen();
|
|
2349
|
+
// esm-externals:@splunk/visualization-context/ZoomContext
|
|
2350
|
+
var ZoomContext_exports = {};
|
|
2351
|
+
__export(ZoomContext_exports, {
|
|
2352
|
+
default: () => ZoomContext_default
|
|
2043
2353
|
});
|
|
2044
|
-
var
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2354
|
+
var defaultImport36 = __toESM(require("@splunk/visualization-context/ZoomContext"));
|
|
2355
|
+
__reExport(ZoomContext_exports, require("@splunk/visualization-context/ZoomContext"));
|
|
2356
|
+
var ZoomContext_default = "default" in defaultImport36 ? defaultImport36.default : defaultImport36;
|
|
2357
|
+
|
|
2358
|
+
// src/Timeline/PureTimeline/src/CursorPlugin.tsx
|
|
2359
|
+
var CursorPlugin = (props) => {
|
|
2360
|
+
const {
|
|
2361
|
+
laneSeries,
|
|
2362
|
+
lanes,
|
|
2363
|
+
numTicks,
|
|
2364
|
+
durationPerTick,
|
|
2365
|
+
setHighlightedCategory,
|
|
2366
|
+
setHighlightedEvent,
|
|
2367
|
+
setHighlightedLane,
|
|
2368
|
+
handleEventClick,
|
|
2369
|
+
tooltipRef,
|
|
2370
|
+
locale
|
|
2371
|
+
} = props;
|
|
2056
2372
|
const FIXED_LANE_HEIGHT = 32;
|
|
2057
2373
|
const MIN_BAR_WIDTH = 20;
|
|
2058
2374
|
const CIRCLE_X_OFFSET = 10;
|
|
2059
2375
|
const CIRCLE_LANE_SCALE_FACTOR = 0.85;
|
|
2060
|
-
|
|
2376
|
+
const zoom = (0, ZoomContext_exports.useZoomContext)();
|
|
2377
|
+
const initFullscreenEl = typeof document !== "undefined" ? document.fullscreenElement : null;
|
|
2378
|
+
const initScale = initFullscreenEl && initFullscreenEl.tagName !== "BODY" ? 1 : zoom || 1;
|
|
2379
|
+
const scaleFactorRef = (0, react_exports.useRef)(initScale);
|
|
2380
|
+
(0, react_exports.useEffect)(() => {
|
|
2381
|
+
const fullscreenEl = document.fullscreenElement;
|
|
2382
|
+
if (fullscreenEl && fullscreenEl.tagName !== "BODY") {
|
|
2383
|
+
scaleFactorRef.current = 1;
|
|
2384
|
+
} else {
|
|
2385
|
+
scaleFactorRef.current = zoom;
|
|
2386
|
+
}
|
|
2387
|
+
}, [zoom]);
|
|
2061
2388
|
const dpr = window.devicePixelRatio || 1;
|
|
2389
|
+
let previousTooltipContent = null;
|
|
2062
2390
|
const handleMouseLeave = (u) => {
|
|
2063
2391
|
const xCursorLine = u.root.querySelector(".u-cursor-x");
|
|
2064
2392
|
xCursorLine.classList.add("u-off");
|
|
@@ -2072,7 +2400,7 @@ var CursorPlugin = ({
|
|
|
2072
2400
|
setHighlightedEvent(null);
|
|
2073
2401
|
setHighlightedCategory(null);
|
|
2074
2402
|
};
|
|
2075
|
-
const
|
|
2403
|
+
const handleClick2 = () => {
|
|
2076
2404
|
if (tooltipRef.current.visible) {
|
|
2077
2405
|
const { content, meta } = tooltipRef.current;
|
|
2078
2406
|
if (!previousTooltipContent || JSON.stringify(previousTooltipContent) !== JSON.stringify(content)) {
|
|
@@ -2085,8 +2413,7 @@ var CursorPlugin = ({
|
|
|
2085
2413
|
hooks: {
|
|
2086
2414
|
init: (u) => {
|
|
2087
2415
|
const chartContainer = u.root;
|
|
2088
|
-
chartContainer.addEventListener("click",
|
|
2089
|
-
updateScaleFactor();
|
|
2416
|
+
chartContainer.addEventListener("click", handleClick2);
|
|
2090
2417
|
const pointerLeaveHandler = (e) => {
|
|
2091
2418
|
if (!chartContainer.contains(e.relatedTarget)) {
|
|
2092
2419
|
handleMouseLeave(u);
|
|
@@ -2102,7 +2429,7 @@ var CursorPlugin = ({
|
|
|
2102
2429
|
return () => {
|
|
2103
2430
|
chartContainer.removeEventListener("pointerleave", pointerLeaveHandler);
|
|
2104
2431
|
document.removeEventListener("pointerout", pointerOutHandler, true);
|
|
2105
|
-
chartContainer.removeEventListener("click",
|
|
2432
|
+
chartContainer.removeEventListener("click", handleClick2);
|
|
2106
2433
|
};
|
|
2107
2434
|
},
|
|
2108
2435
|
setCursor: (u) => {
|
|
@@ -2115,21 +2442,26 @@ var CursorPlugin = ({
|
|
|
2115
2442
|
}
|
|
2116
2443
|
return;
|
|
2117
2444
|
}
|
|
2118
|
-
const
|
|
2119
|
-
const
|
|
2120
|
-
const
|
|
2121
|
-
const
|
|
2445
|
+
const rect = u.root.getBoundingClientRect();
|
|
2446
|
+
const scaleFactor = scaleFactorRef.current || 1;
|
|
2447
|
+
const plotLeftCss = u.bbox.left / dpr;
|
|
2448
|
+
const plotTopCss = u.bbox.top / dpr;
|
|
2449
|
+
const xPos = (mouseEvent.clientX - rect.left - plotLeftCss) / scaleFactor;
|
|
2450
|
+
const yPos = (mouseEvent.clientY - rect.top - plotTopCss) / scaleFactor;
|
|
2122
2451
|
u.cursor.left = xPos;
|
|
2123
2452
|
u.cursor.top = yPos;
|
|
2124
2453
|
if (xCursorLine) {
|
|
2125
|
-
if (xPos < 0 || xPos > u.bbox.width || yPos < 0 || yPos > u.bbox.height) {
|
|
2454
|
+
if (xPos < 0 || xPos > u.bbox.width / dpr || yPos < 0 || yPos > u.bbox.height / dpr) {
|
|
2126
2455
|
xCursorLine.classList.add("u-off");
|
|
2127
2456
|
} else {
|
|
2128
2457
|
xCursorLine.classList.remove("u-off");
|
|
2129
2458
|
xCursorLine.style.transform = `translateX(${xPos}px)`;
|
|
2130
2459
|
}
|
|
2131
2460
|
}
|
|
2132
|
-
const cursorSeriesIndex = Math.
|
|
2461
|
+
const cursorSeriesIndex = Math.min(
|
|
2462
|
+
lanes.length,
|
|
2463
|
+
Math.max(1, Math.floor(yPos / FIXED_LANE_HEIGHT) + 1)
|
|
2464
|
+
);
|
|
2133
2465
|
const events = laneSeries[cursorSeriesIndex - 1];
|
|
2134
2466
|
let showTooltip = false;
|
|
2135
2467
|
let tooltipContent = {};
|
|
@@ -2143,20 +2475,21 @@ var CursorPlugin = ({
|
|
|
2143
2475
|
if (a.duration !== 0 && b.duration === 0) return -1;
|
|
2144
2476
|
return 0;
|
|
2145
2477
|
});
|
|
2478
|
+
const widthPerTick = u.bbox.width / dpr / numTicks;
|
|
2146
2479
|
for (let i = sortedEvents.length - 1; i >= 0; i -= 1) {
|
|
2147
2480
|
const event = sortedEvents[i];
|
|
2148
2481
|
const xStartFraction = (event.start - u.scales.x.min) / durationPerTick;
|
|
2149
|
-
const
|
|
2150
|
-
const
|
|
2151
|
-
const circleStart = xStart - CIRCLE_X_OFFSET;
|
|
2482
|
+
const xStartBase = xStartFraction * widthPerTick;
|
|
2483
|
+
const xStart = cursorSeriesIndex - 1 === 0 ? xStartBase + 2 : xStartBase;
|
|
2152
2484
|
if (event.duration === 0) {
|
|
2153
|
-
|
|
2154
|
-
|
|
2485
|
+
const circleRadius = FIXED_LANE_HEIGHT * CIRCLE_LANE_SCALE_FACTOR / 2;
|
|
2486
|
+
if (xPos >= xStart - circleRadius && xPos <= xStart + circleRadius) {
|
|
2487
|
+
tooltipX = xStart + CIRCLE_X_OFFSET;
|
|
2155
2488
|
tooltipY = cursorSeriesIndex * FIXED_LANE_HEIGHT;
|
|
2156
2489
|
showTooltip = true;
|
|
2157
2490
|
}
|
|
2158
2491
|
} else {
|
|
2159
|
-
const durationWidth = event.duration / durationPerTick *
|
|
2492
|
+
const durationWidth = event.duration / durationPerTick * widthPerTick;
|
|
2160
2493
|
const barWidth = Math.max(durationWidth, MIN_BAR_WIDTH);
|
|
2161
2494
|
if (xPos >= xStart && xPos <= xStart + barWidth) {
|
|
2162
2495
|
tooltipX = xStart + CIRCLE_X_OFFSET;
|
|
@@ -2584,7 +2917,7 @@ var TimelineLegend = ({
|
|
|
2584
2917
|
setHighlightedCategory,
|
|
2585
2918
|
height,
|
|
2586
2919
|
width,
|
|
2587
|
-
handleLegendClick,
|
|
2920
|
+
handleLegendClick: handleLegendClick2,
|
|
2588
2921
|
legendDisplay = "right",
|
|
2589
2922
|
legendTruncation = "ellipsisEnd",
|
|
2590
2923
|
yAxisLabelWidth = 0
|
|
@@ -2623,7 +2956,7 @@ var TimelineLegend = ({
|
|
|
2623
2956
|
onMouseEnter: () => handleMouseEnter(category),
|
|
2624
2957
|
onMouseOut: (e) => handleMouseLeave(e),
|
|
2625
2958
|
onClick: () => {
|
|
2626
|
-
|
|
2959
|
+
handleLegendClick2(category);
|
|
2627
2960
|
}
|
|
2628
2961
|
},
|
|
2629
2962
|
/* @__PURE__ */ react_exports.createElement(
|
|
@@ -2656,9 +2989,9 @@ var useSplunkTheme_exports = {};
|
|
|
2656
2989
|
__export(useSplunkTheme_exports, {
|
|
2657
2990
|
default: () => useSplunkTheme_default
|
|
2658
2991
|
});
|
|
2659
|
-
var
|
|
2992
|
+
var defaultImport37 = __toESM(require("@splunk/themes/useSplunkTheme"));
|
|
2660
2993
|
__reExport(useSplunkTheme_exports, require("@splunk/themes/useSplunkTheme"));
|
|
2661
|
-
var useSplunkTheme_default = "default" in
|
|
2994
|
+
var useSplunkTheme_default = "default" in defaultImport37 ? defaultImport37.default : defaultImport37;
|
|
2662
2995
|
|
|
2663
2996
|
// src/Timeline/PureTimeline/src/TimelineTooltip.tsx
|
|
2664
2997
|
var TooltipContainer = styled_components_default.div`
|
|
@@ -2748,9 +3081,9 @@ var uPlot_min_exports = {};
|
|
|
2748
3081
|
__export(uPlot_min_exports, {
|
|
2749
3082
|
default: () => uPlot_min_default
|
|
2750
3083
|
});
|
|
2751
|
-
var
|
|
3084
|
+
var defaultImport38 = __toESM(require("uplot/dist/uPlot.min.css"));
|
|
2752
3085
|
__reExport(uPlot_min_exports, require("uplot/dist/uPlot.min.css"));
|
|
2753
|
-
var uPlot_min_default = "default" in
|
|
3086
|
+
var uPlot_min_default = "default" in defaultImport38 ? defaultImport38.default : defaultImport38;
|
|
2754
3087
|
|
|
2755
3088
|
// src/Timeline/PureTimeline/src/TimelineUplot.tsx
|
|
2756
3089
|
var TimelineUplotContainer = styled_components_default.div`
|
|
@@ -2784,7 +3117,7 @@ var TimelineUplot = ({
|
|
|
2784
3117
|
tickInterval,
|
|
2785
3118
|
handleEventClick,
|
|
2786
3119
|
handleLaneClick,
|
|
2787
|
-
handleLegendClick,
|
|
3120
|
+
handleLegendClick: handleLegendClick2,
|
|
2788
3121
|
locale
|
|
2789
3122
|
}) => {
|
|
2790
3123
|
const [highlightedCategory, setHighlightedCategory] = react_exports.useState(null);
|
|
@@ -2894,7 +3227,7 @@ var TimelineUplot = ({
|
|
|
2894
3227
|
highlightedCategory,
|
|
2895
3228
|
setHighlightedCategory,
|
|
2896
3229
|
legendTruncation,
|
|
2897
|
-
handleLegendClick
|
|
3230
|
+
handleLegendClick: handleLegendClick2
|
|
2898
3231
|
}
|
|
2899
3232
|
));
|
|
2900
3233
|
};
|
|
@@ -2956,7 +3289,7 @@ var PureTimeline = (_a) => {
|
|
|
2956
3289
|
}
|
|
2957
3290
|
});
|
|
2958
3291
|
};
|
|
2959
|
-
const
|
|
3292
|
+
const handleLegendClick2 = (categoryValue) => {
|
|
2960
3293
|
onLegendClick({
|
|
2961
3294
|
type: "legend.click",
|
|
2962
3295
|
payload: {
|
|
@@ -3004,7 +3337,7 @@ var PureTimeline = (_a) => {
|
|
|
3004
3337
|
tickInterval,
|
|
3005
3338
|
handleEventClick,
|
|
3006
3339
|
handleLaneClick,
|
|
3007
|
-
handleLegendClick,
|
|
3340
|
+
handleLegendClick: handleLegendClick2,
|
|
3008
3341
|
locale
|
|
3009
3342
|
}
|
|
3010
3343
|
)
|