@splunk/visualizations 28.1.0 → 28.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Area.config.js +27 -0
- package/Area.config.js.map +2 -2
- package/Area.js +721 -354
- package/Area.js.map +4 -4
- package/Bar.config.js +27 -0
- package/Bar.config.js.map +2 -2
- package/Bar.js +753 -386
- package/Bar.js.map +4 -4
- package/Bubble.config.js +27 -0
- package/Bubble.config.js.map +2 -2
- package/Bubble.js +683 -320
- package/Bubble.js.map +4 -4
- package/CHANGELOG.external.md +33 -0
- package/ChoroplethSvg.js +569 -193
- package/ChoroplethSvg.js.map +4 -4
- package/Column.config.js +27 -0
- package/Column.config.js.map +2 -2
- package/Column.js +768 -401
- package/Column.js.map +4 -4
- package/Ellipse.js +592 -213
- package/Ellipse.js.map +4 -4
- package/Events.js +591 -200
- package/Events.js.map +4 -4
- package/FEATUREFLAGS.md +1 -0
- package/FillerGauge.js +564 -190
- package/FillerGauge.js.map +4 -4
- package/Image.js +589 -216
- package/Image.js.map +4 -4
- package/Line.config.js +28 -1
- package/Line.config.js.map +2 -2
- package/Line.js +736 -369
- package/Line.js.map +4 -4
- package/LinkGraph.js +1093 -690
- package/LinkGraph.js.map +4 -4
- package/Map.config.js +2 -0
- package/Map.config.js.map +2 -2
- package/Map.js +533 -141
- package/Map.js.map +4 -4
- package/Markdown.js +613 -229
- package/Markdown.js.map +4 -4
- package/MarkerGauge.js +543 -168
- package/MarkerGauge.js.map +4 -4
- package/ParallelCoordinates.js +564 -173
- package/ParallelCoordinates.js.map +4 -4
- package/Pie.js +650 -315
- package/Pie.js.map +4 -4
- package/Punchcard.js +588 -199
- package/Punchcard.js.map +4 -4
- package/Rectangle.js +603 -223
- package/Rectangle.js.map +4 -4
- package/Sankey.js +576 -200
- package/Sankey.js.map +4 -4
- package/Scatter.config.js +27 -0
- package/Scatter.config.js.map +2 -2
- package/Scatter.js +687 -325
- package/Scatter.js.map +4 -4
- package/SingleValue.js +540 -165
- package/SingleValue.js.map +4 -4
- package/SingleValueIcon.js +534 -159
- package/SingleValueIcon.js.map +4 -4
- package/SingleValueRadial.js +527 -152
- package/SingleValueRadial.js.map +4 -4
- package/Table.config.js +87 -32
- package/Table.config.js.map +4 -4
- package/Table.js +931 -441
- package/Table.js.map +4 -4
- package/Timeline.js +611 -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 +551 -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.0 - 7eea200d8"
|
|
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.
|
|
928
|
+
"data-splunk-visualization-version": "28.2.0 - 7eea200d8",
|
|
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,23 @@ 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
|
+
const cachedHandleResize = react_exports.useCallback((w, h) => {
|
|
958
|
+
setContainerWidth(w);
|
|
959
|
+
setContainerHeight(h);
|
|
960
|
+
}, []);
|
|
961
|
+
const [containerWidth, setContainerWidth] = react_exports.useState(Number(width));
|
|
962
|
+
const [containerHeight, setContainerHeight] = react_exports.useState(Number(height));
|
|
963
|
+
let content = /* @__PURE__ */ react_exports.createElement(Message_default, { width, height, level: "warning", message: (0, i18n_exports._)("No DataSource Connected") });
|
|
959
964
|
if (icon) {
|
|
960
|
-
|
|
965
|
+
content = react_exports.createElement(icon, {
|
|
961
966
|
style: {
|
|
962
967
|
left: "50%",
|
|
963
968
|
top: "50%",
|
|
@@ -971,12 +976,7 @@ var IconPlaceholder = (props) => {
|
|
|
971
976
|
"data-test": "icon-placeholder"
|
|
972
977
|
});
|
|
973
978
|
}
|
|
974
|
-
return /* @__PURE__ */ react_exports.createElement(
|
|
975
|
-
};
|
|
976
|
-
IconPlaceholder.propTypes = propTypes2;
|
|
977
|
-
IconPlaceholder.defaultProps = {
|
|
978
|
-
width: "100%",
|
|
979
|
-
height: 250
|
|
979
|
+
return /* @__PURE__ */ react_exports.createElement("div", { style: { width: containerWidth, height: containerHeight, background: backgroundColor } }, /* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }), content);
|
|
980
980
|
};
|
|
981
981
|
var IconPlaceholder_default = FixedSizeContainer_default(IconPlaceholder);
|
|
982
982
|
|
|
@@ -986,11 +986,17 @@ var withPlaceholder = (Visualization, useIconPlaceholder = shouldShowIconPlaceho
|
|
|
986
986
|
const { themes: themes3 } = config3;
|
|
987
987
|
const Wrapper = (props) => {
|
|
988
988
|
var _a, _b;
|
|
989
|
-
const {
|
|
989
|
+
const {
|
|
990
|
+
dataSources,
|
|
991
|
+
loading,
|
|
992
|
+
options,
|
|
993
|
+
height = SplunkVisualization_default.defaults.height,
|
|
994
|
+
width = SplunkVisualization_default.defaults.width
|
|
995
|
+
} = props;
|
|
990
996
|
const showPlaceholder = useIconPlaceholder(dataSources, loading, options);
|
|
991
|
-
const
|
|
992
|
-
const icon = (_b = config3.placeholderIcon) != null ? _b : config3.icon;
|
|
997
|
+
const icon = (_a = config3.placeholderIcon) != null ? _a : config3.icon;
|
|
993
998
|
const iconColor = variables_default.contentColorActive(props);
|
|
999
|
+
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
1000
|
if (config3.supports.includes("placeholder" /* PLACEHOLDER */) && showPlaceholder) {
|
|
995
1001
|
return /* @__PURE__ */ react_exports.createElement(
|
|
996
1002
|
IconPlaceholder_default,
|
|
@@ -1432,6 +1438,382 @@ var turnOffLegendDisplayWhenTrellisIsOn = (isTrellisOn, options) => {
|
|
|
1432
1438
|
return {};
|
|
1433
1439
|
};
|
|
1434
1440
|
|
|
1441
|
+
// esm-externals:@splunk/visualization-canvas
|
|
1442
|
+
var visualization_canvas_exports = {};
|
|
1443
|
+
__export(visualization_canvas_exports, {
|
|
1444
|
+
default: () => visualization_canvas_default
|
|
1445
|
+
});
|
|
1446
|
+
var defaultImport31 = __toESM(require("@splunk/visualization-canvas"));
|
|
1447
|
+
__reExport(visualization_canvas_exports, require("@splunk/visualization-canvas"));
|
|
1448
|
+
var visualization_canvas_default = "default" in defaultImport31 ? defaultImport31.default : defaultImport31;
|
|
1449
|
+
|
|
1450
|
+
// src/common/components/VizStyleWrapper.jsx
|
|
1451
|
+
var VizStyleWrapper = styled_components_default.div.attrs(({ dataTestKey }) => ({
|
|
1452
|
+
"data-test": dataTestKey,
|
|
1453
|
+
"data-testid": dataTestKey
|
|
1454
|
+
}))`
|
|
1455
|
+
display: flex;
|
|
1456
|
+
justify-content: center;
|
|
1457
|
+
flex-direction: column;
|
|
1458
|
+
width: 100%;
|
|
1459
|
+
height: 100%;
|
|
1460
|
+
background-color: ${(props) => props.backgroundColor};
|
|
1461
|
+
`;
|
|
1462
|
+
VizStyleWrapper.displayName = "VizStyleWrapper";
|
|
1463
|
+
var VizStyleWrapper_default = VizStyleWrapper;
|
|
1464
|
+
|
|
1465
|
+
// esm-externals:@splunk/react-icons/Triangle
|
|
1466
|
+
var Triangle_exports = {};
|
|
1467
|
+
__export(Triangle_exports, {
|
|
1468
|
+
default: () => Triangle_default
|
|
1469
|
+
});
|
|
1470
|
+
var defaultImport32 = __toESM(require("@splunk/react-icons/Triangle"));
|
|
1471
|
+
__reExport(Triangle_exports, require("@splunk/react-icons/Triangle"));
|
|
1472
|
+
var Triangle_default = "default" in defaultImport32 ? defaultImport32.default : defaultImport32;
|
|
1473
|
+
|
|
1474
|
+
// src/common/chartingUtils.ts
|
|
1475
|
+
var DEFAULT_LINE_WIDTH = 2;
|
|
1476
|
+
var getAnnotationsForCanvas = ({
|
|
1477
|
+
annotationX,
|
|
1478
|
+
annotationColor,
|
|
1479
|
+
annotationLabel
|
|
1480
|
+
}) => (annotationX == null ? void 0 : annotationX.length) ? annotationX.map((timestamp, i) => ({
|
|
1481
|
+
key: annotationLabel == null ? void 0 : annotationLabel[i],
|
|
1482
|
+
time: timestamp,
|
|
1483
|
+
color: annotationColor == null ? void 0 : annotationColor[i]
|
|
1484
|
+
})) : [];
|
|
1485
|
+
var StyledTriangle = styled_components_default(Triangle_default)`
|
|
1486
|
+
color: ${(props) => props.eventColor || variables_default.severityColorNotice(props)};
|
|
1487
|
+
`;
|
|
1488
|
+
var triangleEventAnnotationRenderer = ({ event }) => {
|
|
1489
|
+
const eventWithColor = event;
|
|
1490
|
+
return react_default.createElement(StyledTriangle, {
|
|
1491
|
+
viewBox: "0 0 24 24",
|
|
1492
|
+
variant: "filled",
|
|
1493
|
+
eventColor: eventWithColor.color
|
|
1494
|
+
});
|
|
1495
|
+
};
|
|
1496
|
+
var canvasSupportedTimeSeriesCharts = ["splunk.line"];
|
|
1497
|
+
var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
|
|
1498
|
+
return canvasSupportedTimeSeriesCharts.indexOf(vizConfigKey) > -1;
|
|
1499
|
+
};
|
|
1500
|
+
var filterChartDataFromInternalFields = (chartData) => {
|
|
1501
|
+
const { fields, columns } = chartData;
|
|
1502
|
+
const keepIndexes = fields.reduce((acc, field, index) => {
|
|
1503
|
+
const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
|
|
1504
|
+
if (!(fieldName == null ? void 0 : fieldName.startsWith("_")) || fieldName === "_time") {
|
|
1505
|
+
acc.push(index);
|
|
1506
|
+
}
|
|
1507
|
+
return acc;
|
|
1508
|
+
}, []);
|
|
1509
|
+
const filteredFields = keepIndexes.map((index) => fields[index]);
|
|
1510
|
+
const filteredColumns = keepIndexes.map((index) => columns[index]);
|
|
1511
|
+
return { fields: filteredFields, columns: filteredColumns };
|
|
1512
|
+
};
|
|
1513
|
+
var convert2DArrayToNumbers = (arr) => {
|
|
1514
|
+
return arr.map((subArray) => subArray.map((element) => parseFloat(element)));
|
|
1515
|
+
};
|
|
1516
|
+
var SideLegendWidth = 75;
|
|
1517
|
+
var commonLegendProps = { center: true, fontSize: 12, largerTiles: true, hideSeriesValue: true };
|
|
1518
|
+
var getLegend = (props) => {
|
|
1519
|
+
const legendPlacement = props == null ? void 0 : props.legendDisplay;
|
|
1520
|
+
switch (legendPlacement) {
|
|
1521
|
+
case "off":
|
|
1522
|
+
return false;
|
|
1523
|
+
case "left":
|
|
1524
|
+
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
|
|
1525
|
+
width: SideLegendWidth
|
|
1526
|
+
}, commonLegendProps));
|
|
1527
|
+
case "bottom":
|
|
1528
|
+
return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
|
|
1529
|
+
wrap: true
|
|
1530
|
+
}, commonLegendProps));
|
|
1531
|
+
case "top":
|
|
1532
|
+
return (0, visualization_canvas_exports.TopLegendFactory)(__spreadValues({
|
|
1533
|
+
wrap: true
|
|
1534
|
+
}, commonLegendProps));
|
|
1535
|
+
default:
|
|
1536
|
+
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
|
|
1537
|
+
width: SideLegendWidth
|
|
1538
|
+
}, commonLegendProps));
|
|
1539
|
+
}
|
|
1540
|
+
};
|
|
1541
|
+
var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
|
|
1542
|
+
if (axisTitleVisibility === "collapsed") {
|
|
1543
|
+
return "";
|
|
1544
|
+
}
|
|
1545
|
+
let fieldTitle = fields.length > 1 ? "" : fields[0];
|
|
1546
|
+
if (!fieldTitle) {
|
|
1547
|
+
fieldTitle = "";
|
|
1548
|
+
}
|
|
1549
|
+
return (inputAxisTitle == null ? void 0 : inputAxisTitle.length) ? inputAxisTitle.trim() : fieldTitle;
|
|
1550
|
+
};
|
|
1551
|
+
var ellipsisAxisTitle = (axisTitle, containerSpacing, fontSize = 12) => {
|
|
1552
|
+
if (!axisTitle) {
|
|
1553
|
+
return "";
|
|
1554
|
+
}
|
|
1555
|
+
if (Number.isNaN(containerSpacing) || containerSpacing <= 0) {
|
|
1556
|
+
return axisTitle;
|
|
1557
|
+
}
|
|
1558
|
+
const availableHeight = containerSpacing * 0.6;
|
|
1559
|
+
const avgCharWidth = fontSize * 0.55;
|
|
1560
|
+
const maxChars = Math.floor(availableHeight / avgCharWidth);
|
|
1561
|
+
if (axisTitle.length <= maxChars) {
|
|
1562
|
+
return axisTitle;
|
|
1563
|
+
}
|
|
1564
|
+
if (maxChars <= 3) {
|
|
1565
|
+
return "...";
|
|
1566
|
+
}
|
|
1567
|
+
const availableChars = maxChars - 3;
|
|
1568
|
+
const halfChars = Math.floor(availableChars / 2);
|
|
1569
|
+
const start = axisTitle.slice(0, halfChars);
|
|
1570
|
+
const end = axisTitle.slice(-halfChars);
|
|
1571
|
+
return `${start}...${end}`;
|
|
1572
|
+
};
|
|
1573
|
+
var getFieldName = (field) => {
|
|
1574
|
+
const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
|
|
1575
|
+
return fieldName;
|
|
1576
|
+
};
|
|
1577
|
+
var getFieldNames = (fields) => {
|
|
1578
|
+
return fields.map((field) => getFieldName(field));
|
|
1579
|
+
};
|
|
1580
|
+
var getXScaleConfig = (label) => {
|
|
1581
|
+
const xConfig = { x: {} };
|
|
1582
|
+
xConfig.x.label = label;
|
|
1583
|
+
return xConfig;
|
|
1584
|
+
};
|
|
1585
|
+
var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale) => {
|
|
1586
|
+
const scaleType = yAxisScale != null ? yAxisScale : "linear";
|
|
1587
|
+
const yConfig = { y: {} };
|
|
1588
|
+
yConfig.y.label = label;
|
|
1589
|
+
yConfig.y.type = scaleType;
|
|
1590
|
+
if (yAxisAbbreviation !== "none") {
|
|
1591
|
+
yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
|
|
1592
|
+
}
|
|
1593
|
+
if (yAxisAbbreviation === "none") {
|
|
1594
|
+
yConfig.y.width = 55;
|
|
1595
|
+
} else {
|
|
1596
|
+
yConfig.y.width = label && label.length > 0 ? 30 : 10;
|
|
1597
|
+
}
|
|
1598
|
+
return yConfig;
|
|
1599
|
+
};
|
|
1600
|
+
var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger) => {
|
|
1601
|
+
const y2Config = { y2: {} };
|
|
1602
|
+
const scaleType = axisScale != null ? axisScale : "linear";
|
|
1603
|
+
y2Config.y2.label = label;
|
|
1604
|
+
y2Config.y2.side = "right";
|
|
1605
|
+
y2Config.y2.showGrid = false;
|
|
1606
|
+
y2Config.y2.type = scaleType;
|
|
1607
|
+
if (axisAbbreviation !== "none") {
|
|
1608
|
+
y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
|
|
1609
|
+
} else if (roundAxisLabelsToInteger) {
|
|
1610
|
+
y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
|
|
1611
|
+
}
|
|
1612
|
+
return y2Config;
|
|
1613
|
+
};
|
|
1614
|
+
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode) => {
|
|
1615
|
+
const seriesConfig = {};
|
|
1616
|
+
let spanGaps;
|
|
1617
|
+
let replaceNullsWithZero;
|
|
1618
|
+
if (nullValueMode === "gaps") {
|
|
1619
|
+
spanGaps = false;
|
|
1620
|
+
} else if (nullValueMode === "connect" || nullValueMode === "zero") {
|
|
1621
|
+
spanGaps = true;
|
|
1622
|
+
if (nullValueMode === "zero") {
|
|
1623
|
+
replaceNullsWithZero = true;
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
yfields.forEach((field) => {
|
|
1627
|
+
seriesConfig[field] = {
|
|
1628
|
+
overrides: { width: lineWidth != null ? lineWidth : DEFAULT_LINE_WIDTH }
|
|
1629
|
+
};
|
|
1630
|
+
if (spanGaps !== void 0) {
|
|
1631
|
+
seriesConfig[field].overrides.spanGaps = spanGaps;
|
|
1632
|
+
}
|
|
1633
|
+
if (y2Enabled) {
|
|
1634
|
+
const shouldAssignToY2 = (
|
|
1635
|
+
// If y2Fields are present, assign all y2Fields to y2 scale
|
|
1636
|
+
(y2fields == null ? void 0 : y2fields.length) > 0 && y2fields.includes(field) || // Else, assign all overlayFields to y2 scale
|
|
1637
|
+
(!y2fields || y2fields.length === 0) && (overlayFields == null ? void 0 : overlayFields.includes(field))
|
|
1638
|
+
);
|
|
1639
|
+
if (shouldAssignToY2) {
|
|
1640
|
+
seriesConfig[field].overrides.scale = "y2";
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
|
|
1644
|
+
seriesConfig[field].type = "line";
|
|
1645
|
+
}
|
|
1646
|
+
if (replaceNullsWithZero !== void 0) {
|
|
1647
|
+
seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
|
|
1648
|
+
}
|
|
1649
|
+
});
|
|
1650
|
+
return seriesConfig;
|
|
1651
|
+
};
|
|
1652
|
+
|
|
1653
|
+
// src/common/TimeSeriesChartWrapper.tsx
|
|
1654
|
+
var TimeSeriesChartContainer = styled_components_default.div`
|
|
1655
|
+
overflow: hidden;
|
|
1656
|
+
${(props) => (0, style_exports.toDimension)((0, lodash_exports.pick)(props, ["width", "height"]))};
|
|
1657
|
+
|
|
1658
|
+
canvas {
|
|
1659
|
+
position: absolute !important; // This is needed for canvas element export pdf/png to work correctly
|
|
1660
|
+
}
|
|
1661
|
+
`;
|
|
1662
|
+
var handleClick = (chartEvent, props) => {
|
|
1663
|
+
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(chartEvent, "value", "seriesKey")), {
|
|
1664
|
+
name: chartEvent.seriesKey
|
|
1665
|
+
});
|
|
1666
|
+
delete payload.seriesKey;
|
|
1667
|
+
const clickHandler = props == null ? void 0 : props.onClick;
|
|
1668
|
+
if (clickHandler) {
|
|
1669
|
+
clickHandler({
|
|
1670
|
+
type: "point.click",
|
|
1671
|
+
originalEvent: chartEvent,
|
|
1672
|
+
payload
|
|
1673
|
+
});
|
|
1674
|
+
}
|
|
1675
|
+
};
|
|
1676
|
+
var handleLegendClick = (chartEvent, props) => {
|
|
1677
|
+
const payload = {
|
|
1678
|
+
name: chartEvent
|
|
1679
|
+
};
|
|
1680
|
+
const clickHandler = props == null ? void 0 : props.onClick;
|
|
1681
|
+
if (clickHandler) {
|
|
1682
|
+
clickHandler({
|
|
1683
|
+
type: "legend.click",
|
|
1684
|
+
originalEvent: chartEvent,
|
|
1685
|
+
payload
|
|
1686
|
+
});
|
|
1687
|
+
}
|
|
1688
|
+
};
|
|
1689
|
+
var TimeSeriesChartWrapper = (props) => {
|
|
1690
|
+
const { width, height, chartData, options, userLocale, annotationX, annotationLabel, annotationColor } = props;
|
|
1691
|
+
const {
|
|
1692
|
+
backgroundColor,
|
|
1693
|
+
seriesColors: seriesColorsStr,
|
|
1694
|
+
fieldColors,
|
|
1695
|
+
"axisTitleX.text": xAxisTitleText,
|
|
1696
|
+
"axisTitleY.text": yAxisTitleText,
|
|
1697
|
+
"axisTitleY2.text": y2AxisTitleText,
|
|
1698
|
+
"axisTitleX.visibility": xAxisTitleVisibility,
|
|
1699
|
+
"axisTitleY.visibility": yAxisTitleVisibility,
|
|
1700
|
+
"axisTitleY2.visibility": y2AxisTitleVisibility,
|
|
1701
|
+
"axisY.abbreviation": yAxisAbbreviation,
|
|
1702
|
+
"axisY.scale": yAxisScale,
|
|
1703
|
+
"axisY2.abbreviation": y2AxisAbbreviation,
|
|
1704
|
+
"axisY2.fields": y2FieldsStr,
|
|
1705
|
+
"axisY2.scale": y2AxisScale,
|
|
1706
|
+
"axisY2.enabled": y2Enabled,
|
|
1707
|
+
"axisLabelsY2.integerUnits": y2IntegerUnits,
|
|
1708
|
+
"chart.overlayFields": overlayFieldsStr,
|
|
1709
|
+
"chart.nullValueMode": nullValueMode,
|
|
1710
|
+
lineWidth
|
|
1711
|
+
} = options;
|
|
1712
|
+
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
1713
|
+
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
1714
|
+
const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
|
|
1715
|
+
const [containerHeight, setContainerHeight] = react_exports.useState(Number(props.height));
|
|
1716
|
+
const cachedHandleResize = react_exports.useCallback((w, h) => {
|
|
1717
|
+
setContainerWidth(w);
|
|
1718
|
+
setContainerHeight(h);
|
|
1719
|
+
}, []);
|
|
1720
|
+
const filteredChartData = filterChartDataFromInternalFields({
|
|
1721
|
+
fields: chartData.fields,
|
|
1722
|
+
columns: chartData.seriesList
|
|
1723
|
+
});
|
|
1724
|
+
const xField = getFieldName(filteredChartData.fields[0]);
|
|
1725
|
+
const yFields = getFieldNames(
|
|
1726
|
+
filteredChartData.fields.length > 1 ? filteredChartData.fields.slice(1) : []
|
|
1727
|
+
);
|
|
1728
|
+
const y2Fields = y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [];
|
|
1729
|
+
const overlayFields = overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [];
|
|
1730
|
+
let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
|
|
1731
|
+
xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
|
|
1732
|
+
let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFields, yAxisTitleVisibility);
|
|
1733
|
+
yAxisTitle = ellipsisAxisTitle(yAxisTitle, containerHeight);
|
|
1734
|
+
const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
|
|
1735
|
+
let y2AxisTitle = getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility);
|
|
1736
|
+
y2AxisTitle = ellipsisAxisTitle(y2AxisTitle, containerHeight);
|
|
1737
|
+
const xScaleConfig = getXScaleConfig(xAxisTitle);
|
|
1738
|
+
const yScaleConfig = getYScaleConfig(yAxisTitle, yAxisAbbreviation, yAxisScale);
|
|
1739
|
+
let y2ScaleConfig = {};
|
|
1740
|
+
if (y2Enabled) {
|
|
1741
|
+
y2ScaleConfig = getY2ScaleConfig(y2AxisTitle, y2AxisAbbreviation, y2AxisScale, y2IntegerUnits);
|
|
1742
|
+
}
|
|
1743
|
+
const uplotContainerElement = (0, react_exports.useRef)(null);
|
|
1744
|
+
const seriesDataFormatted = [
|
|
1745
|
+
filteredChartData.columns[0],
|
|
1746
|
+
...convert2DArrayToNumbers(filteredChartData.columns.slice(1))
|
|
1747
|
+
];
|
|
1748
|
+
chartData.fields = filteredChartData.fields;
|
|
1749
|
+
chartData.columns = seriesDataFormatted;
|
|
1750
|
+
const seriesOverrides = getSeriesOverrides(
|
|
1751
|
+
yFields,
|
|
1752
|
+
y2Fields,
|
|
1753
|
+
lineWidth,
|
|
1754
|
+
overlayFields,
|
|
1755
|
+
y2Enabled,
|
|
1756
|
+
nullValueMode
|
|
1757
|
+
);
|
|
1758
|
+
const chartingEventAnnotations = getAnnotationsForCanvas({
|
|
1759
|
+
annotationX,
|
|
1760
|
+
annotationColor,
|
|
1761
|
+
annotationLabel
|
|
1762
|
+
});
|
|
1763
|
+
const MemoizedChart = react_exports.memo(visualization_canvas_exports.TimeSeriesChart);
|
|
1764
|
+
const scaleConfig = __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig);
|
|
1765
|
+
const memoizedChart = (0, react_exports.useMemo)(
|
|
1766
|
+
() => /* @__PURE__ */ react_exports.createElement(
|
|
1767
|
+
MemoizedChart,
|
|
1768
|
+
{
|
|
1769
|
+
data: chartData,
|
|
1770
|
+
width: containerWidth,
|
|
1771
|
+
height: containerHeight,
|
|
1772
|
+
seriesColors,
|
|
1773
|
+
seriesColorsByField,
|
|
1774
|
+
seriesConfig: seriesOverrides,
|
|
1775
|
+
legend: getLegend(props),
|
|
1776
|
+
scaleConfig,
|
|
1777
|
+
timestampFormat: "expanded",
|
|
1778
|
+
onCrosshairClick: (event) => handleClick(event, props),
|
|
1779
|
+
onSeriesClick: (event) => handleLegendClick(event, props),
|
|
1780
|
+
userLocale,
|
|
1781
|
+
events: chartingEventAnnotations,
|
|
1782
|
+
eventsConfig: { renderer: triangleEventAnnotationRenderer }
|
|
1783
|
+
}
|
|
1784
|
+
),
|
|
1785
|
+
[
|
|
1786
|
+
MemoizedChart,
|
|
1787
|
+
chartData,
|
|
1788
|
+
containerWidth,
|
|
1789
|
+
containerHeight,
|
|
1790
|
+
seriesColors,
|
|
1791
|
+
seriesColorsByField,
|
|
1792
|
+
seriesOverrides,
|
|
1793
|
+
lineWidth,
|
|
1794
|
+
props,
|
|
1795
|
+
scaleConfig,
|
|
1796
|
+
userLocale,
|
|
1797
|
+
chartingEventAnnotations
|
|
1798
|
+
]
|
|
1799
|
+
);
|
|
1800
|
+
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
1801
|
+
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor }, memoizedChart);
|
|
1802
|
+
}, [backgroundColor]);
|
|
1803
|
+
return /* @__PURE__ */ react_exports.createElement(
|
|
1804
|
+
TimeSeriesChartContainer,
|
|
1805
|
+
{
|
|
1806
|
+
height,
|
|
1807
|
+
width,
|
|
1808
|
+
ref: uplotContainerElement,
|
|
1809
|
+
"data-test": "timeseries-chart-wrapper"
|
|
1810
|
+
},
|
|
1811
|
+
/* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }),
|
|
1812
|
+
memoizedVisualization
|
|
1813
|
+
);
|
|
1814
|
+
};
|
|
1815
|
+
var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
|
|
1816
|
+
|
|
1435
1817
|
// src/common/withDashboardViz.tsx
|
|
1436
1818
|
var withDashboardViz = (opts) => {
|
|
1437
1819
|
const {
|
|
@@ -1449,30 +1831,29 @@ var withDashboardViz = (opts) => {
|
|
|
1449
1831
|
const DashboardViz = (props) => {
|
|
1450
1832
|
var _a;
|
|
1451
1833
|
const {
|
|
1452
|
-
mode,
|
|
1834
|
+
mode = "view",
|
|
1453
1835
|
hasEventHandlers,
|
|
1454
1836
|
dataSources,
|
|
1455
1837
|
// type of { [key: string]: DataSource }
|
|
1456
|
-
options,
|
|
1838
|
+
options = {},
|
|
1457
1839
|
context = {},
|
|
1458
1840
|
width,
|
|
1459
1841
|
height,
|
|
1460
|
-
onComputedProps,
|
|
1461
|
-
onEventTrigger,
|
|
1842
|
+
onComputedProps = lodash_exports.noop,
|
|
1843
|
+
onEventTrigger = SplunkVisualization_default.defaults.onEventTrigger,
|
|
1462
1844
|
theme,
|
|
1463
|
-
onRequestParamsChange
|
|
1845
|
+
onRequestParamsChange = lodash_exports.noop
|
|
1464
1846
|
} = props;
|
|
1465
|
-
const
|
|
1466
|
-
if (serializedTimezone) {
|
|
1847
|
+
const localeContext = react_exports.useContext(TimezoneContext_default);
|
|
1848
|
+
if (localeContext.serializedTimezone) {
|
|
1467
1849
|
if (!moment_default.getDefaultSplunkTimezone()) {
|
|
1468
|
-
moment_default.setDefaultSplunkTimezone(serializedTimezone);
|
|
1850
|
+
moment_default.setDefaultSplunkTimezone(localeContext.serializedTimezone);
|
|
1469
1851
|
}
|
|
1470
1852
|
}
|
|
1471
1853
|
const themeFunc = (themeVar) => {
|
|
1472
1854
|
var _a2, _b;
|
|
1473
1855
|
return (_b = (_a2 = vizConfig.themes)[themeVar]) == null ? void 0 : _b.call(_a2, props);
|
|
1474
1856
|
};
|
|
1475
|
-
const bgColorFromTheme = themeFunc("defaultBackgroundColor");
|
|
1476
1857
|
const {
|
|
1477
1858
|
family: currentThemeFamily,
|
|
1478
1859
|
colorScheme: currentThemeColorScheme,
|
|
@@ -1494,6 +1875,10 @@ var withDashboardViz = (opts) => {
|
|
|
1494
1875
|
featureFlagContext && featureFlagContext.visualizations_enableTrellis
|
|
1495
1876
|
);
|
|
1496
1877
|
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 */;
|
|
1878
|
+
const isAcceleratedRenderFeatureFlagOn = Boolean(
|
|
1879
|
+
featureFlagContext == null ? void 0 : featureFlagContext.visualizations_enableAcceleratedRender
|
|
1880
|
+
);
|
|
1881
|
+
const isAcceleratedRenderOn = isAcceleratedRenderFeatureFlagOn && isTimeSeriesCanvasRenderSupported(vizConfig.key) && (options == null ? void 0 : options.acceleratedRender) === true;
|
|
1497
1882
|
const isMounted = react_exports.useRef(true);
|
|
1498
1883
|
const optionsToEvaluate = react_exports.useMemo(() => {
|
|
1499
1884
|
var _a2;
|
|
@@ -1588,10 +1973,34 @@ var withDashboardViz = (opts) => {
|
|
|
1588
1973
|
currentThemeDensity,
|
|
1589
1974
|
optionsToEvaluate,
|
|
1590
1975
|
downsampledDataSources,
|
|
1591
|
-
serializedTimezone,
|
|
1976
|
+
localeContext.serializedTimezone,
|
|
1592
1977
|
useAsyncEvaluatedOptions
|
|
1593
1978
|
]);
|
|
1594
1979
|
const evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync;
|
|
1980
|
+
let dataSourceMetadata = {};
|
|
1981
|
+
const OptionKey = "paginateDataSourceKey";
|
|
1982
|
+
const optsKey = (0, lodash_exports.has)(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey];
|
|
1983
|
+
const paginateDataSourceKey = typeof optsKey === "string" ? optsKey : "primary";
|
|
1984
|
+
const requestParams = (0, lodash_exports.get)(dataSources, [paginateDataSourceKey, "requestParams"], {});
|
|
1985
|
+
const meta = (0, lodash_exports.get)(dataSources, [paginateDataSourceKey, "meta"], {});
|
|
1986
|
+
const handleRequestParamsChange = (payload) => onRequestParamsChange(paginateDataSourceKey, payload);
|
|
1987
|
+
const sortParams = useSortingParams({
|
|
1988
|
+
requestParams,
|
|
1989
|
+
meta,
|
|
1990
|
+
onRequestParamsChange: handleRequestParamsChange
|
|
1991
|
+
});
|
|
1992
|
+
const paginatorParams = usePaginationParams({
|
|
1993
|
+
requestParams,
|
|
1994
|
+
meta,
|
|
1995
|
+
onRequestParamsChange: handleRequestParamsChange
|
|
1996
|
+
});
|
|
1997
|
+
dataSourceMetadata = {
|
|
1998
|
+
sortParams,
|
|
1999
|
+
paginatorParams
|
|
2000
|
+
};
|
|
2001
|
+
if (vizConfig.supports.indexOf("page-and-sort" /* PAGE_AND_SORT */) === -1 && !(0, lodash_exports.has)(dataSources, paginateDataSourceKey)) {
|
|
2002
|
+
dataSourceMetadata = {};
|
|
2003
|
+
}
|
|
1595
2004
|
const clonedEvaluatedOptions = __spreadValues({}, evaluatedOptionsToUse);
|
|
1596
2005
|
if (isTrellisOn) {
|
|
1597
2006
|
clonedEvaluatedOptions.backgroundColor = clonedEvaluatedOptions == null ? void 0 : clonedEvaluatedOptions.trellisBackgroundColor;
|
|
@@ -1617,7 +2026,7 @@ var withDashboardViz = (opts) => {
|
|
|
1617
2026
|
width,
|
|
1618
2027
|
height,
|
|
1619
2028
|
missingProps: missing,
|
|
1620
|
-
backgroundColor:
|
|
2029
|
+
backgroundColor: themeFunc("defaultBackgroundColor")
|
|
1621
2030
|
}
|
|
1622
2031
|
);
|
|
1623
2032
|
}
|
|
@@ -1655,45 +2064,27 @@ var withDashboardViz = (opts) => {
|
|
|
1655
2064
|
const computedVizProps = computeVizProps2(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, props), evaluatedOptionsToUse), eventCallbackProps), {
|
|
1656
2065
|
themeFunc
|
|
1657
2066
|
}));
|
|
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
2067
|
if (useAsyncEvaluatedOptions && Object.keys(evaluatedOptionsToUse).length === 0) {
|
|
1682
2068
|
return null;
|
|
1683
2069
|
}
|
|
2070
|
+
let SanitizedViz = SanitizedReactViz;
|
|
2071
|
+
if (isAcceleratedRenderOn) {
|
|
2072
|
+
SanitizedViz = (0, SanitizeProps_exports.withSanitizedProps)(TimeSeriesChartWrapper_default);
|
|
2073
|
+
}
|
|
1684
2074
|
return /* @__PURE__ */ react_exports.createElement(
|
|
1685
|
-
|
|
1686
|
-
__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
2075
|
+
SanitizedViz,
|
|
2076
|
+
__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, SplunkVisualization_default.defaults), {
|
|
1687
2077
|
mode,
|
|
1688
|
-
width,
|
|
1689
|
-
height
|
|
1690
|
-
|
|
2078
|
+
width: width || SplunkVisualization_default.defaults.width,
|
|
2079
|
+
height: height || SplunkVisualization_default.defaults.height,
|
|
2080
|
+
userLocale: localeContext
|
|
2081
|
+
}), downsamplingProps), evaluatedOptionsToUse), computedVizProps), eventCallbackProps), dataSourceMetadata)
|
|
1691
2082
|
);
|
|
1692
2083
|
};
|
|
1693
2084
|
DashboardViz.propTypes = __spreadValues(__spreadValues({}, SplunkVisualization_default.propTypes), ReactViz.propTypes);
|
|
1694
|
-
DashboardViz.defaultProps = __spreadProps(__spreadValues(
|
|
1695
|
-
//
|
|
1696
|
-
|
|
2085
|
+
DashboardViz.defaultProps = __spreadProps(__spreadValues({}, ReactViz.defaultProps), {
|
|
2086
|
+
// we still need ReactViz.defaultProps for the visualizations that still have them
|
|
2087
|
+
onEventTrigger: SplunkVisualization_default.defaults.onEventTrigger
|
|
1697
2088
|
});
|
|
1698
2089
|
DashboardViz.config = vizConfig;
|
|
1699
2090
|
return (0, styled_components_exports.withTheme)(
|
|
@@ -1707,18 +2098,18 @@ var config_exports = {};
|
|
|
1707
2098
|
__export(config_exports, {
|
|
1708
2099
|
default: () => config_default2
|
|
1709
2100
|
});
|
|
1710
|
-
var
|
|
2101
|
+
var defaultImport33 = __toESM(require("@splunk/splunk-utils/config"));
|
|
1711
2102
|
__reExport(config_exports, require("@splunk/splunk-utils/config"));
|
|
1712
|
-
var config_default2 = "default" in
|
|
2103
|
+
var config_default2 = "default" in defaultImport33 ? defaultImport33.default : defaultImport33;
|
|
1713
2104
|
|
|
1714
2105
|
// esm-externals:@splunk/themes
|
|
1715
2106
|
var themes_exports = {};
|
|
1716
2107
|
__export(themes_exports, {
|
|
1717
2108
|
default: () => themes_default
|
|
1718
2109
|
});
|
|
1719
|
-
var
|
|
2110
|
+
var defaultImport34 = __toESM(require("@splunk/themes"));
|
|
1720
2111
|
__reExport(themes_exports, require("@splunk/themes"));
|
|
1721
|
-
var themes_default = "default" in
|
|
2112
|
+
var themes_default = "default" in defaultImport34 ? defaultImport34.default : defaultImport34;
|
|
1722
2113
|
|
|
1723
2114
|
// src/common/utils/styleUtils.ts
|
|
1724
2115
|
var VIZ_FONT_FAMILY = "'Splunk Platform Sans', 'Splunk Data Sans', Roboto, Droid, 'Helvetica Neue', Helvetica, Arial, sans-serif";
|
|
@@ -1957,108 +2348,51 @@ var uplot_react_exports = {};
|
|
|
1957
2348
|
__export(uplot_react_exports, {
|
|
1958
2349
|
default: () => uplot_react_default
|
|
1959
2350
|
});
|
|
1960
|
-
var
|
|
2351
|
+
var defaultImport35 = __toESM(require("uplot-react"));
|
|
1961
2352
|
__reExport(uplot_react_exports, require("uplot-react"));
|
|
1962
|
-
var uplot_react_default = "default" in
|
|
2353
|
+
var uplot_react_default = "default" in defaultImport35 ? defaultImport35.default : defaultImport35;
|
|
1963
2354
|
|
|
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();
|
|
2355
|
+
// esm-externals:@splunk/visualization-context/ZoomContext
|
|
2356
|
+
var ZoomContext_exports = {};
|
|
2357
|
+
__export(ZoomContext_exports, {
|
|
2358
|
+
default: () => ZoomContext_default
|
|
2043
2359
|
});
|
|
2044
|
-
var
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2360
|
+
var defaultImport36 = __toESM(require("@splunk/visualization-context/ZoomContext"));
|
|
2361
|
+
__reExport(ZoomContext_exports, require("@splunk/visualization-context/ZoomContext"));
|
|
2362
|
+
var ZoomContext_default = "default" in defaultImport36 ? defaultImport36.default : defaultImport36;
|
|
2363
|
+
|
|
2364
|
+
// src/Timeline/PureTimeline/src/CursorPlugin.tsx
|
|
2365
|
+
var CursorPlugin = (props) => {
|
|
2366
|
+
const {
|
|
2367
|
+
laneSeries,
|
|
2368
|
+
lanes,
|
|
2369
|
+
numTicks,
|
|
2370
|
+
durationPerTick,
|
|
2371
|
+
setHighlightedCategory,
|
|
2372
|
+
setHighlightedEvent,
|
|
2373
|
+
setHighlightedLane,
|
|
2374
|
+
handleEventClick,
|
|
2375
|
+
tooltipRef,
|
|
2376
|
+
locale
|
|
2377
|
+
} = props;
|
|
2056
2378
|
const FIXED_LANE_HEIGHT = 32;
|
|
2057
2379
|
const MIN_BAR_WIDTH = 20;
|
|
2058
2380
|
const CIRCLE_X_OFFSET = 10;
|
|
2059
2381
|
const CIRCLE_LANE_SCALE_FACTOR = 0.85;
|
|
2060
|
-
|
|
2382
|
+
const zoom = (0, ZoomContext_exports.useZoomContext)();
|
|
2383
|
+
const initFullscreenEl = typeof document !== "undefined" ? document.fullscreenElement : null;
|
|
2384
|
+
const initScale = initFullscreenEl && initFullscreenEl.tagName !== "BODY" ? 1 : zoom || 1;
|
|
2385
|
+
const scaleFactorRef = (0, react_exports.useRef)(initScale);
|
|
2386
|
+
(0, react_exports.useEffect)(() => {
|
|
2387
|
+
const fullscreenEl = document.fullscreenElement;
|
|
2388
|
+
if (fullscreenEl && fullscreenEl.tagName !== "BODY") {
|
|
2389
|
+
scaleFactorRef.current = 1;
|
|
2390
|
+
} else {
|
|
2391
|
+
scaleFactorRef.current = zoom;
|
|
2392
|
+
}
|
|
2393
|
+
}, [zoom]);
|
|
2061
2394
|
const dpr = window.devicePixelRatio || 1;
|
|
2395
|
+
let previousTooltipContent = null;
|
|
2062
2396
|
const handleMouseLeave = (u) => {
|
|
2063
2397
|
const xCursorLine = u.root.querySelector(".u-cursor-x");
|
|
2064
2398
|
xCursorLine.classList.add("u-off");
|
|
@@ -2072,7 +2406,7 @@ var CursorPlugin = ({
|
|
|
2072
2406
|
setHighlightedEvent(null);
|
|
2073
2407
|
setHighlightedCategory(null);
|
|
2074
2408
|
};
|
|
2075
|
-
const
|
|
2409
|
+
const handleClick2 = () => {
|
|
2076
2410
|
if (tooltipRef.current.visible) {
|
|
2077
2411
|
const { content, meta } = tooltipRef.current;
|
|
2078
2412
|
if (!previousTooltipContent || JSON.stringify(previousTooltipContent) !== JSON.stringify(content)) {
|
|
@@ -2085,8 +2419,7 @@ var CursorPlugin = ({
|
|
|
2085
2419
|
hooks: {
|
|
2086
2420
|
init: (u) => {
|
|
2087
2421
|
const chartContainer = u.root;
|
|
2088
|
-
chartContainer.addEventListener("click",
|
|
2089
|
-
updateScaleFactor();
|
|
2422
|
+
chartContainer.addEventListener("click", handleClick2);
|
|
2090
2423
|
const pointerLeaveHandler = (e) => {
|
|
2091
2424
|
if (!chartContainer.contains(e.relatedTarget)) {
|
|
2092
2425
|
handleMouseLeave(u);
|
|
@@ -2102,7 +2435,7 @@ var CursorPlugin = ({
|
|
|
2102
2435
|
return () => {
|
|
2103
2436
|
chartContainer.removeEventListener("pointerleave", pointerLeaveHandler);
|
|
2104
2437
|
document.removeEventListener("pointerout", pointerOutHandler, true);
|
|
2105
|
-
chartContainer.removeEventListener("click",
|
|
2438
|
+
chartContainer.removeEventListener("click", handleClick2);
|
|
2106
2439
|
};
|
|
2107
2440
|
},
|
|
2108
2441
|
setCursor: (u) => {
|
|
@@ -2115,21 +2448,26 @@ var CursorPlugin = ({
|
|
|
2115
2448
|
}
|
|
2116
2449
|
return;
|
|
2117
2450
|
}
|
|
2118
|
-
const
|
|
2119
|
-
const
|
|
2120
|
-
const
|
|
2121
|
-
const
|
|
2451
|
+
const rect = u.root.getBoundingClientRect();
|
|
2452
|
+
const scaleFactor = scaleFactorRef.current || 1;
|
|
2453
|
+
const plotLeftCss = u.bbox.left / dpr;
|
|
2454
|
+
const plotTopCss = u.bbox.top / dpr;
|
|
2455
|
+
const xPos = (mouseEvent.clientX - rect.left - plotLeftCss) / scaleFactor;
|
|
2456
|
+
const yPos = (mouseEvent.clientY - rect.top - plotTopCss) / scaleFactor;
|
|
2122
2457
|
u.cursor.left = xPos;
|
|
2123
2458
|
u.cursor.top = yPos;
|
|
2124
2459
|
if (xCursorLine) {
|
|
2125
|
-
if (xPos < 0 || xPos > u.bbox.width || yPos < 0 || yPos > u.bbox.height) {
|
|
2460
|
+
if (xPos < 0 || xPos > u.bbox.width / dpr || yPos < 0 || yPos > u.bbox.height / dpr) {
|
|
2126
2461
|
xCursorLine.classList.add("u-off");
|
|
2127
2462
|
} else {
|
|
2128
2463
|
xCursorLine.classList.remove("u-off");
|
|
2129
2464
|
xCursorLine.style.transform = `translateX(${xPos}px)`;
|
|
2130
2465
|
}
|
|
2131
2466
|
}
|
|
2132
|
-
const cursorSeriesIndex = Math.
|
|
2467
|
+
const cursorSeriesIndex = Math.min(
|
|
2468
|
+
lanes.length,
|
|
2469
|
+
Math.max(1, Math.floor(yPos / FIXED_LANE_HEIGHT) + 1)
|
|
2470
|
+
);
|
|
2133
2471
|
const events = laneSeries[cursorSeriesIndex - 1];
|
|
2134
2472
|
let showTooltip = false;
|
|
2135
2473
|
let tooltipContent = {};
|
|
@@ -2143,20 +2481,21 @@ var CursorPlugin = ({
|
|
|
2143
2481
|
if (a.duration !== 0 && b.duration === 0) return -1;
|
|
2144
2482
|
return 0;
|
|
2145
2483
|
});
|
|
2484
|
+
const widthPerTick = u.bbox.width / dpr / numTicks;
|
|
2146
2485
|
for (let i = sortedEvents.length - 1; i >= 0; i -= 1) {
|
|
2147
2486
|
const event = sortedEvents[i];
|
|
2148
2487
|
const xStartFraction = (event.start - u.scales.x.min) / durationPerTick;
|
|
2149
|
-
const
|
|
2150
|
-
const
|
|
2151
|
-
const circleStart = xStart - CIRCLE_X_OFFSET;
|
|
2488
|
+
const xStartBase = xStartFraction * widthPerTick;
|
|
2489
|
+
const xStart = cursorSeriesIndex - 1 === 0 ? xStartBase + 2 : xStartBase;
|
|
2152
2490
|
if (event.duration === 0) {
|
|
2153
|
-
|
|
2154
|
-
|
|
2491
|
+
const circleRadius = FIXED_LANE_HEIGHT * CIRCLE_LANE_SCALE_FACTOR / 2;
|
|
2492
|
+
if (xPos >= xStart - circleRadius && xPos <= xStart + circleRadius) {
|
|
2493
|
+
tooltipX = xStart + CIRCLE_X_OFFSET;
|
|
2155
2494
|
tooltipY = cursorSeriesIndex * FIXED_LANE_HEIGHT;
|
|
2156
2495
|
showTooltip = true;
|
|
2157
2496
|
}
|
|
2158
2497
|
} else {
|
|
2159
|
-
const durationWidth = event.duration / durationPerTick *
|
|
2498
|
+
const durationWidth = event.duration / durationPerTick * widthPerTick;
|
|
2160
2499
|
const barWidth = Math.max(durationWidth, MIN_BAR_WIDTH);
|
|
2161
2500
|
if (xPos >= xStart && xPos <= xStart + barWidth) {
|
|
2162
2501
|
tooltipX = xStart + CIRCLE_X_OFFSET;
|
|
@@ -2584,7 +2923,7 @@ var TimelineLegend = ({
|
|
|
2584
2923
|
setHighlightedCategory,
|
|
2585
2924
|
height,
|
|
2586
2925
|
width,
|
|
2587
|
-
handleLegendClick,
|
|
2926
|
+
handleLegendClick: handleLegendClick2,
|
|
2588
2927
|
legendDisplay = "right",
|
|
2589
2928
|
legendTruncation = "ellipsisEnd",
|
|
2590
2929
|
yAxisLabelWidth = 0
|
|
@@ -2623,7 +2962,7 @@ var TimelineLegend = ({
|
|
|
2623
2962
|
onMouseEnter: () => handleMouseEnter(category),
|
|
2624
2963
|
onMouseOut: (e) => handleMouseLeave(e),
|
|
2625
2964
|
onClick: () => {
|
|
2626
|
-
|
|
2965
|
+
handleLegendClick2(category);
|
|
2627
2966
|
}
|
|
2628
2967
|
},
|
|
2629
2968
|
/* @__PURE__ */ react_exports.createElement(
|
|
@@ -2656,9 +2995,9 @@ var useSplunkTheme_exports = {};
|
|
|
2656
2995
|
__export(useSplunkTheme_exports, {
|
|
2657
2996
|
default: () => useSplunkTheme_default
|
|
2658
2997
|
});
|
|
2659
|
-
var
|
|
2998
|
+
var defaultImport37 = __toESM(require("@splunk/themes/useSplunkTheme"));
|
|
2660
2999
|
__reExport(useSplunkTheme_exports, require("@splunk/themes/useSplunkTheme"));
|
|
2661
|
-
var useSplunkTheme_default = "default" in
|
|
3000
|
+
var useSplunkTheme_default = "default" in defaultImport37 ? defaultImport37.default : defaultImport37;
|
|
2662
3001
|
|
|
2663
3002
|
// src/Timeline/PureTimeline/src/TimelineTooltip.tsx
|
|
2664
3003
|
var TooltipContainer = styled_components_default.div`
|
|
@@ -2748,9 +3087,9 @@ var uPlot_min_exports = {};
|
|
|
2748
3087
|
__export(uPlot_min_exports, {
|
|
2749
3088
|
default: () => uPlot_min_default
|
|
2750
3089
|
});
|
|
2751
|
-
var
|
|
3090
|
+
var defaultImport38 = __toESM(require("uplot/dist/uPlot.min.css"));
|
|
2752
3091
|
__reExport(uPlot_min_exports, require("uplot/dist/uPlot.min.css"));
|
|
2753
|
-
var uPlot_min_default = "default" in
|
|
3092
|
+
var uPlot_min_default = "default" in defaultImport38 ? defaultImport38.default : defaultImport38;
|
|
2754
3093
|
|
|
2755
3094
|
// src/Timeline/PureTimeline/src/TimelineUplot.tsx
|
|
2756
3095
|
var TimelineUplotContainer = styled_components_default.div`
|
|
@@ -2784,7 +3123,7 @@ var TimelineUplot = ({
|
|
|
2784
3123
|
tickInterval,
|
|
2785
3124
|
handleEventClick,
|
|
2786
3125
|
handleLaneClick,
|
|
2787
|
-
handleLegendClick,
|
|
3126
|
+
handleLegendClick: handleLegendClick2,
|
|
2788
3127
|
locale
|
|
2789
3128
|
}) => {
|
|
2790
3129
|
const [highlightedCategory, setHighlightedCategory] = react_exports.useState(null);
|
|
@@ -2894,7 +3233,7 @@ var TimelineUplot = ({
|
|
|
2894
3233
|
highlightedCategory,
|
|
2895
3234
|
setHighlightedCategory,
|
|
2896
3235
|
legendTruncation,
|
|
2897
|
-
handleLegendClick
|
|
3236
|
+
handleLegendClick: handleLegendClick2
|
|
2898
3237
|
}
|
|
2899
3238
|
));
|
|
2900
3239
|
};
|
|
@@ -2956,7 +3295,7 @@ var PureTimeline = (_a) => {
|
|
|
2956
3295
|
}
|
|
2957
3296
|
});
|
|
2958
3297
|
};
|
|
2959
|
-
const
|
|
3298
|
+
const handleLegendClick2 = (categoryValue) => {
|
|
2960
3299
|
onLegendClick({
|
|
2961
3300
|
type: "legend.click",
|
|
2962
3301
|
payload: {
|
|
@@ -3004,7 +3343,7 @@ var PureTimeline = (_a) => {
|
|
|
3004
3343
|
tickInterval,
|
|
3005
3344
|
handleEventClick,
|
|
3006
3345
|
handleLaneClick,
|
|
3007
|
-
handleLegendClick,
|
|
3346
|
+
handleLegendClick: handleLegendClick2,
|
|
3008
3347
|
locale
|
|
3009
3348
|
}
|
|
3010
3349
|
)
|