@splunk/visualizations 28.5.3 → 28.6.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/Area.d.ts.map +1 -1
- package/Area/areaUtils.d.ts +1 -1
- package/Area/areaUtils.d.ts.map +1 -1
- package/Area/config.d.ts.map +1 -1
- package/Area.config.js +93 -25
- package/Area.config.js.map +3 -3
- package/Area.js +708 -319
- package/Area.js.map +4 -4
- package/Bar/Bar.d.ts.map +1 -1
- package/Bar.config.js +81 -24
- package/Bar.config.js.map +3 -3
- package/Bar.js +528 -297
- package/Bar.js.map +4 -4
- package/Bubble.config.js +80 -23
- package/Bubble.config.js.map +2 -2
- package/Bubble.js +375 -208
- package/Bubble.js.map +4 -4
- package/CHANGELOG.external.md +56 -10
- package/ChoroplethSvg/PureChoroplethSvg/PureChoroplethSvg.d.ts +1 -0
- package/ChoroplethSvg/PureChoroplethSvg/PureChoroplethSvg.d.ts.map +1 -1
- package/ChoroplethSvg/PureChoroplethSvg/SvgChoroplethDynamic.d.ts +12 -25
- package/ChoroplethSvg/PureChoroplethSvg/SvgChoroplethDynamic.d.ts.map +1 -1
- package/ChoroplethSvg/PureChoroplethSvg/SvgMutator.d.ts +11 -4
- package/ChoroplethSvg/PureChoroplethSvg/SvgMutator.d.ts.map +1 -1
- package/ChoroplethSvg.js +1133 -253
- package/ChoroplethSvg.js.map +4 -4
- package/Column/Column.d.ts.map +1 -1
- package/Column.config.js +81 -24
- package/Column.config.js.map +3 -3
- package/Column.js +531 -300
- package/Column.js.map +4 -4
- package/Ellipse.config.js +1 -1
- package/Ellipse.config.js.map +2 -2
- package/Ellipse.js +277 -161
- package/Ellipse.js.map +4 -4
- package/Events/config.d.ts.map +1 -1
- package/Events.config.js +13 -3
- package/Events.config.js.map +2 -2
- package/Events.js +330 -194
- package/Events.js.map +4 -4
- package/FillerGauge/FillerGauge.d.ts.map +1 -1
- package/FillerGauge/config.d.ts.map +1 -1
- package/FillerGauge.config.js +76 -24
- package/FillerGauge.config.js.map +2 -2
- package/FillerGauge.js +512 -271
- package/FillerGauge.js.map +4 -4
- package/Image/config.d.ts.map +1 -1
- package/Image.config.js +7 -0
- package/Image.config.js.map +2 -2
- package/Image.js +282 -149
- package/Image.js.map +4 -4
- package/LICENSE +13 -0
- package/Line/Line.d.ts.map +1 -1
- package/Line/config.d.ts.map +1 -1
- package/Line/lineUtils.d.ts.map +1 -1
- package/Line/mockdata/LineData.d.ts +21 -0
- package/Line/mockdata/LineData.d.ts.map +1 -1
- package/Line.config.js +86 -25
- package/Line.config.js.map +3 -3
- package/Line.js +638 -382
- package/Line.js.map +4 -4
- package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts +47 -73
- package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts +11 -2
- package/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/components/Graph.d.ts +5 -5
- package/LinkGraph/PureLinkGraph/components/Node.d.ts +2 -2
- package/LinkGraph/PureLinkGraph/components/Nodes.d.ts +2 -2
- package/LinkGraph.js +886 -759
- package/LinkGraph.js.map +4 -4
- package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
- package/Map/PureMap/Tooltip.d.ts.map +1 -1
- package/Map/config.d.ts.map +1 -1
- package/Map.config.js +4 -1
- package/Map.config.js.map +2 -2
- package/Map.js +296 -169
- package/Map.js.map +4 -4
- package/Markdown/Markdown.d.ts.map +1 -1
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +283 -157
- package/Markdown.js.map +4 -4
- package/MarkerGauge/MarkerGauge.d.ts +1 -47
- package/MarkerGauge/MarkerGauge.d.ts.map +1 -1
- package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts +22 -68
- package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts.map +1 -1
- package/MarkerGauge/config.d.ts.map +1 -1
- package/MarkerGauge.config.js +75 -23
- package/MarkerGauge.config.js.map +2 -2
- package/MarkerGauge.js +560 -375
- package/MarkerGauge.js.map +4 -4
- package/NetworkGraph.config.js.map +1 -1
- package/NetworkGraph.js +544 -417
- package/NetworkGraph.js.map +4 -4
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +288 -172
- package/ParallelCoordinates.js.map +4 -4
- package/Pie/Pie.d.ts.map +1 -1
- package/Pie/pieUtils.d.ts +2 -2
- package/Pie.config.js +74 -22
- package/Pie.config.js.map +2 -2
- package/Pie.js +522 -296
- package/Pie.js.map +4 -4
- package/ProcessTree/ProcessTree.d.ts +21 -0
- package/ProcessTree/ProcessTree.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/PureProcessTree.d.ts +32 -0
- package/ProcessTree/PureProcessTree/PureProcessTree.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/components/DirectionalBytes.d.ts +8 -0
- package/ProcessTree/PureProcessTree/components/DirectionalBytes.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/components/ProcessTreeLeftPanel.d.ts +44 -0
- package/ProcessTree/PureProcessTree/components/ProcessTreeLeftPanel.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/components/ProcessTreeRightPanel.d.ts +20 -0
- package/ProcessTree/PureProcessTree/components/ProcessTreeRightPanel.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeExpansionState.d.ts +20 -0
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeExpansionState.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts +44 -0
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeLinkOverlay.d.ts +23 -0
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeLinkOverlay.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/mockdata/data.d.ts +235 -0
- package/ProcessTree/PureProcessTree/mockdata/data.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/utils/iconLoader.d.ts +9 -0
- package/ProcessTree/PureProcessTree/utils/iconLoader.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/utils/processTreeLinkOverlayUtils.d.ts +36 -0
- package/ProcessTree/PureProcessTree/utils/processTreeLinkOverlayUtils.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts +80 -0
- package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts.map +1 -0
- package/ProcessTree/config.d.ts +4 -0
- package/ProcessTree/config.d.ts.map +1 -0
- package/ProcessTree/index.d.ts +3 -0
- package/ProcessTree/index.d.ts.map +1 -0
- package/ProcessTree.config.js +192 -0
- package/ProcessTree.config.js.map +7 -0
- package/ProcessTree.js +5058 -0
- package/ProcessTree.js.map +7 -0
- package/Punchcard/Punchcard.d.ts +1 -5
- package/Punchcard/Punchcard.d.ts.map +1 -1
- package/Punchcard/PurePunchcard/Punchcard.d.ts +28 -32
- package/Punchcard/PurePunchcard/Punchcard.d.ts.map +1 -1
- package/Punchcard/PurePunchcard/src/PunchcardAxis.d.ts +7 -12
- package/Punchcard/PurePunchcard/src/PunchcardAxis.d.ts.map +1 -1
- package/Punchcard/PurePunchcard/src/PunchcardBubble.d.ts +14 -19
- package/Punchcard/PurePunchcard/src/PunchcardBubble.d.ts.map +1 -1
- package/Punchcard/PurePunchcard/src/PunchcardChartArea.d.ts +22 -27
- package/Punchcard/PurePunchcard/src/PunchcardChartArea.d.ts.map +1 -1
- package/Punchcard/PurePunchcard/src/PunchcardGridLines.d.ts +3 -8
- package/Punchcard/PurePunchcard/src/PunchcardGridLines.d.ts.map +1 -1
- package/Punchcard/PurePunchcard/src/PunchcardLegend.d.ts +9 -14
- package/Punchcard/PurePunchcard/src/PunchcardLegend.d.ts.map +1 -1
- package/Punchcard/PurePunchcard/src/PunchcardRow.d.ts.map +1 -1
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +444 -631
- package/Punchcard.js.map +4 -4
- package/Rectangle.config.js +1 -1
- package/Rectangle.config.js.map +2 -2
- package/Rectangle.js +289 -173
- package/Rectangle.js.map +4 -4
- package/RichText/PureRichText/Editor/EditorPanel.d.ts +20 -0
- package/RichText/PureRichText/Editor/EditorPanel.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/EditorPanelStyles.d.ts +17 -0
- package/RichText/PureRichText/Editor/EditorPanelStyles.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/FontSelector.d.ts +15 -0
- package/RichText/PureRichText/Editor/FontSelector.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/FormatButton.d.ts +23 -0
- package/RichText/PureRichText/Editor/FormatButton.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/editorPanelUtils.d.ts +19 -0
- package/RichText/PureRichText/Editor/editorPanelUtils.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/hooks/useLineSpacing.d.ts +11 -0
- package/RichText/PureRichText/Editor/hooks/useLineSpacing.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/hooks/useLinkHandlers.d.ts +26 -0
- package/RichText/PureRichText/Editor/hooks/useLinkHandlers.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/index.d.ts +9 -0
- package/RichText/PureRichText/Editor/index.d.ts.map +1 -0
- package/RichText/PureRichText/InnerEditor.d.ts +41 -0
- package/RichText/PureRichText/InnerEditor.d.ts.map +1 -0
- package/RichText/PureRichText/PureRichText.d.ts +19 -0
- package/RichText/PureRichText/PureRichText.d.ts.map +1 -0
- package/RichText/PureRichText/PureRichTextContext.d.ts +64 -0
- package/RichText/PureRichText/PureRichTextContext.d.ts.map +1 -0
- package/RichText/PureRichText/RichTextStyles.d.ts +25 -0
- package/RichText/PureRichText/RichTextStyles.d.ts.map +1 -0
- package/RichText/PureRichText/activeInstance.d.ts +23 -0
- package/RichText/PureRichText/activeInstance.d.ts.map +1 -0
- package/RichText/PureRichText/config.d.ts +17 -0
- package/RichText/PureRichText/config.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/index.d.ts +12 -0
- package/RichText/PureRichText/hooks/index.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useContentSave.d.ts +25 -0
- package/RichText/PureRichText/hooks/useContentSave.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useContentSync.d.ts +28 -0
- package/RichText/PureRichText/hooks/useContentSync.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useDashboardKeyboardNav.d.ts +33 -0
- package/RichText/PureRichText/hooks/useDashboardKeyboardNav.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useEditModeEffect.d.ts +10 -0
- package/RichText/PureRichText/hooks/useEditModeEffect.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useEditorSetup.d.ts +36 -0
- package/RichText/PureRichText/hooks/useEditorSetup.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useFakeHighlight.d.ts +33 -0
- package/RichText/PureRichText/hooks/useFakeHighlight.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useFocusHandlers.d.ts +35 -0
- package/RichText/PureRichText/hooks/useFocusHandlers.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useKeyboardShortcuts.d.ts +18 -0
- package/RichText/PureRichText/hooks/useKeyboardShortcuts.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useMouseHandlers.d.ts +24 -0
- package/RichText/PureRichText/hooks/useMouseHandlers.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useRichTextState.d.ts +38 -0
- package/RichText/PureRichText/hooks/useRichTextState.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useStepFontSize.d.ts +17 -0
- package/RichText/PureRichText/hooks/useStepFontSize.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useStepLineSpacing.d.ts +18 -0
- package/RichText/PureRichText/hooks/useStepLineSpacing.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useTokenMap.d.ts +45 -0
- package/RichText/PureRichText/hooks/useTokenMap.d.ts.map +1 -0
- package/RichText/PureRichText/index.d.ts +16 -0
- package/RichText/PureRichText/index.d.ts.map +1 -0
- package/RichText/PureRichText/renderers/ElementRenderer.d.ts +8 -0
- package/RichText/PureRichText/renderers/ElementRenderer.d.ts.map +1 -0
- package/RichText/PureRichText/renderers/LeafRenderer.d.ts +8 -0
- package/RichText/PureRichText/renderers/LeafRenderer.d.ts.map +1 -0
- package/RichText/PureRichText/types.d.ts +111 -0
- package/RichText/PureRichText/types.d.ts.map +1 -0
- package/RichText/PureRichText/utils/a11yUtils.d.ts +9 -0
- package/RichText/PureRichText/utils/a11yUtils.d.ts.map +1 -0
- package/RichText/PureRichText/utils/fontSize.d.ts +6 -0
- package/RichText/PureRichText/utils/fontSize.d.ts.map +1 -0
- package/RichText/PureRichText/utils/slateUtils.d.ts +99 -0
- package/RichText/PureRichText/utils/slateUtils.d.ts.map +1 -0
- package/RichText/RichText.d.ts +17 -0
- package/RichText/RichText.d.ts.map +1 -0
- package/RichText/config.d.ts +4 -0
- package/RichText/config.d.ts.map +1 -0
- package/RichText/index.d.ts +7 -0
- package/RichText/index.d.ts.map +1 -0
- package/RichText.config.js +268 -0
- package/RichText.config.js.map +7 -0
- package/RichText.js +7674 -0
- package/RichText.js.map +7 -0
- package/Sankey/PureSankey/PureSankey.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyLink.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyNode.d.ts +10 -3
- package/Sankey/PureSankey/SankeyNode.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyTooltip.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyUtils.d.ts +10 -0
- package/Sankey/PureSankey/SankeyUtils.d.ts.map +1 -1
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +562 -290
- package/Sankey.js.map +4 -4
- package/Scatter/Scatter.d.ts.map +1 -1
- package/Scatter.config.js +81 -24
- package/Scatter.config.js.map +3 -3
- package/Scatter.js +528 -297
- package/Scatter.js.map +4 -4
- package/SingleValue/SingleValue.d.ts.map +1 -1
- package/SingleValue/config.d.ts.map +1 -1
- package/SingleValue.config.js +76 -24
- package/SingleValue.config.js.map +2 -2
- package/SingleValue.js +534 -314
- package/SingleValue.js.map +4 -4
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon/SingleValueIcon.d.ts.map +1 -1
- package/SingleValueIcon/config.d.ts.map +1 -1
- package/SingleValueIcon.config.js +76 -24
- package/SingleValueIcon.config.js.map +2 -2
- package/SingleValueIcon.js +512 -287
- package/SingleValueIcon.js.map +4 -4
- package/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts +0 -8
- package/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts.map +1 -1
- package/SingleValueRadial/SingleValueRadial.d.ts.map +1 -1
- package/SingleValueRadial/config.d.ts.map +1 -1
- package/SingleValueRadial.config.js +76 -24
- package/SingleValueRadial.config.js.map +2 -2
- package/SingleValueRadial.js +543 -326
- package/SingleValueRadial.js.map +4 -4
- package/TRELLIS.md +48 -0
- package/Table/PureTable.d.ts +1 -0
- package/Table/PureTable.d.ts.map +1 -1
- package/Table/Table.d.ts.map +1 -1
- package/Table/cells/ArrayCell.d.ts.map +1 -1
- package/Table/config.d.ts.map +1 -1
- package/Table/hooks.d.ts.map +1 -1
- package/Table/tableUtils.d.ts +14 -0
- package/Table/tableUtils.d.ts.map +1 -0
- package/Table.config.js +4 -10
- package/Table.config.js.map +2 -2
- package/Table.js +769 -355
- package/Table.js.map +4 -4
- package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +5 -0
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -1
- package/Timeline/Timeline.d.ts +2 -0
- package/Timeline/Timeline.d.ts.map +1 -1
- package/Timeline/config.d.ts.map +1 -1
- package/Timeline/mockdata/timelineDataSource.d.ts +34 -0
- package/Timeline/mockdata/timelineDataSource.d.ts.map +1 -1
- package/Timeline.config.js +15 -0
- package/Timeline.config.js.map +2 -2
- package/Timeline.js +348 -186
- package/Timeline.js.map +4 -4
- package/common/Charting.d.ts.map +1 -1
- package/common/Charting.js +50 -28
- package/common/Charting.js.map +2 -2
- package/common/ChartingApi.d.ts +1 -1
- package/common/ChartingApi.d.ts.map +1 -1
- package/common/ChartingApi.js.map +2 -2
- package/common/DocExampleWithVizSandbox.js.map +1 -1
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.js.map +1 -1
- package/common/SplunkVisualization.d.ts +1 -1
- package/common/SplunkVisualization.d.ts.map +1 -1
- package/common/SplunkVisualization.js +6 -4
- package/common/SplunkVisualization.js.map +2 -2
- package/common/StyledSkipLink.d.ts +2 -0
- package/common/StyledSkipLink.d.ts.map +1 -0
- package/common/StyledSkipLink.js +81 -0
- package/common/StyledSkipLink.js.map +7 -0
- package/common/TimeSeriesChartWrapper.d.ts.map +1 -1
- package/common/TimeSeriesChartWrapper.js +228 -107
- package/common/TimeSeriesChartWrapper.js.map +4 -4
- package/common/chartingUtils.d.ts +32 -6
- package/common/chartingUtils.d.ts.map +1 -1
- package/common/chartingUtils.js +166 -39
- package/common/chartingUtils.js.map +4 -4
- package/common/components/TrellisTitle.d.ts.map +1 -1
- package/common/docUtils.js +1 -1
- package/common/docUtils.js.map +2 -2
- package/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -1
- package/common/editorConfig/AxesChartYGridAndLabels.d.ts.map +1 -1
- package/common/editorConfig/BackgroundColor.d.ts +2 -2
- package/common/editorConfig/TrellisEditors.d.ts +33 -5
- package/common/editorConfig/TrellisEditors.d.ts.map +1 -1
- package/common/hocs/mockdata/trellisData.d.ts +54 -0
- package/common/hocs/mockdata/trellisData.d.ts.map +1 -1
- package/common/hocs/withTrellis.d.ts +9 -0
- package/common/hocs/withTrellis.d.ts.map +1 -1
- package/common/hooks/useSorting.d.ts +2 -2
- package/common/hooks/useSorting.d.ts.map +1 -1
- package/common/shapeUtils.d.ts +1 -1
- package/common/shapeUtils.d.ts.map +1 -1
- package/common/shapeUtils.js.map +2 -2
- package/common/utils/dataUtils.js +2 -1
- package/common/utils/dataUtils.js.map +2 -2
- package/common/utils/focusUtils.d.ts +4 -0
- package/common/utils/focusUtils.d.ts.map +1 -0
- package/common/utils/focusUtils.js +101 -0
- package/common/utils/focusUtils.js.map +7 -0
- package/common/utils/mapUtils.js +2 -6
- package/common/utils/mapUtils.js.map +2 -2
- package/common/utils/singleValueUtils.js +14 -26
- package/common/utils/singleValueUtils.js.map +2 -2
- package/common/utils/trellisUtils.d.ts.map +1 -1
- package/common/utils/trellisUtils.js +76 -70
- package/common/utils/trellisUtils.js.map +2 -2
- package/common/withDashboardViz.d.ts.map +1 -1
- package/common/withDashboardViz.js +276 -151
- package/common/withDashboardViz.js.map +4 -4
- package/package.json +32 -27
- package/LICENSE.md +0 -449
package/Rectangle.js
CHANGED
|
@@ -12,6 +12,7 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
|
12
12
|
var __getProtoOf = Object.getPrototypeOf;
|
|
13
13
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
14
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
15
|
+
var __pow = Math.pow;
|
|
15
16
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16
17
|
var __spreadValues = (a, b) => {
|
|
17
18
|
for (var prop in b || (b = {}))
|
|
@@ -59,6 +60,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
59
60
|
mod
|
|
60
61
|
));
|
|
61
62
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
63
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
62
64
|
|
|
63
65
|
// src/Rectangle/index.ts
|
|
64
66
|
var Rectangle_exports = {};
|
|
@@ -208,7 +210,7 @@ var DefaultVizActionHandler = class {
|
|
|
208
210
|
var INITIAL_HEIGHT = 250;
|
|
209
211
|
var SplunkVisualization = class {
|
|
210
212
|
};
|
|
211
|
-
SplunkVisualization
|
|
213
|
+
__publicField(SplunkVisualization, "propTypes", {
|
|
212
214
|
/**
|
|
213
215
|
* display mode
|
|
214
216
|
*/
|
|
@@ -284,11 +286,11 @@ SplunkVisualization.propTypes = {
|
|
|
284
286
|
* A callback to request new data with updated request params
|
|
285
287
|
*/
|
|
286
288
|
onRequestParamsChange: prop_types_exports.func
|
|
287
|
-
};
|
|
289
|
+
});
|
|
288
290
|
/**
|
|
289
291
|
*
|
|
290
292
|
*/
|
|
291
|
-
SplunkVisualization
|
|
293
|
+
__publicField(SplunkVisualization, "defaults", {
|
|
292
294
|
// BaseVisualization in dashboard-visualizations uses 100% for width but 250 for height
|
|
293
295
|
width: "100%",
|
|
294
296
|
height: INITIAL_HEIGHT,
|
|
@@ -303,7 +305,7 @@ SplunkVisualization.defaults = {
|
|
|
303
305
|
onComputedProps: () => ({}),
|
|
304
306
|
loading: false,
|
|
305
307
|
onRequestParamsChange: lodash_exports.noop
|
|
306
|
-
};
|
|
308
|
+
});
|
|
307
309
|
var SplunkVisualization_default = SplunkVisualization;
|
|
308
310
|
|
|
309
311
|
// src/common/interfaces/DataSource.ts
|
|
@@ -357,9 +359,9 @@ var usePaginationParams = ({
|
|
|
357
359
|
meta,
|
|
358
360
|
onRequestParamsChange
|
|
359
361
|
}) => {
|
|
360
|
-
const totalCount = meta
|
|
361
|
-
const offset = requestParams
|
|
362
|
-
const count = requestParams
|
|
362
|
+
const totalCount = (meta == null ? void 0 : meta.totalCount) || 0;
|
|
363
|
+
const offset = (requestParams == null ? void 0 : requestParams.offset) || 0;
|
|
364
|
+
const count = requestParams == null ? void 0 : requestParams.count;
|
|
363
365
|
const totalPages = typeof count === "number" && count > 0 ? Math.ceil(totalCount / count) : 0;
|
|
364
366
|
const current = typeof count === "number" && count > 0 ? Math.floor(offset / count) + 1 : 0;
|
|
365
367
|
const isPaging = totalPages > 1 && typeof onRequestParamsChange === "function";
|
|
@@ -476,7 +478,7 @@ var Cover = styled_components_default.div`
|
|
|
476
478
|
bottom: 0;
|
|
477
479
|
`;
|
|
478
480
|
var Blocker = styled_components_default.div.attrs({
|
|
479
|
-
"data-splunk-visualization-version": "28.
|
|
481
|
+
"data-splunk-visualization-version": "28.6.0 - 92427899a"
|
|
480
482
|
})`
|
|
481
483
|
position: relative;
|
|
482
484
|
width: 100%;
|
|
@@ -575,7 +577,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
575
577
|
FixSizeItem,
|
|
576
578
|
{
|
|
577
579
|
"data-test": "fix-size-item",
|
|
578
|
-
"data-splunk-visualization-version": "28.
|
|
580
|
+
"data-splunk-visualization-version": "28.6.0 - 92427899a",
|
|
579
581
|
width,
|
|
580
582
|
height,
|
|
581
583
|
backgroundColor
|
|
@@ -1116,6 +1118,24 @@ var defaultImport25 = __toESM(require("@splunk/react-icons/Triangle"));
|
|
|
1116
1118
|
__reExport(Triangle_exports, require("@splunk/react-icons/Triangle"));
|
|
1117
1119
|
var Triangle_default = "default" in defaultImport25 ? defaultImport25.default : defaultImport25;
|
|
1118
1120
|
|
|
1121
|
+
// esm-externals:@splunk/visualizations-shared/propUtils
|
|
1122
|
+
var propUtils_exports = {};
|
|
1123
|
+
__export(propUtils_exports, {
|
|
1124
|
+
default: () => propUtils_default
|
|
1125
|
+
});
|
|
1126
|
+
var defaultImport26 = __toESM(require("@splunk/visualizations-shared/propUtils"));
|
|
1127
|
+
__reExport(propUtils_exports, require("@splunk/visualizations-shared/propUtils"));
|
|
1128
|
+
var propUtils_default = "default" in defaultImport26 ? defaultImport26.default : defaultImport26;
|
|
1129
|
+
|
|
1130
|
+
// esm-externals:@splunk/visualizations-shared/simpleXMLOptions
|
|
1131
|
+
var simpleXMLOptions_exports = {};
|
|
1132
|
+
__export(simpleXMLOptions_exports, {
|
|
1133
|
+
default: () => simpleXMLOptions_default
|
|
1134
|
+
});
|
|
1135
|
+
var defaultImport27 = __toESM(require("@splunk/visualizations-shared/simpleXMLOptions"));
|
|
1136
|
+
__reExport(simpleXMLOptions_exports, require("@splunk/visualizations-shared/simpleXMLOptions"));
|
|
1137
|
+
var simpleXMLOptions_default = "default" in defaultImport27 ? defaultImport27.default : defaultImport27;
|
|
1138
|
+
|
|
1119
1139
|
// src/common/chartingUtils.ts
|
|
1120
1140
|
var DEFAULT_LINE_WIDTH = 2;
|
|
1121
1141
|
var getAnnotationsForCanvas = ({
|
|
@@ -1153,9 +1173,9 @@ var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
|
|
|
1153
1173
|
const xAxisIsTime = xField === "_time";
|
|
1154
1174
|
return !!rangeSelectEventHandler && xAxisIsTime;
|
|
1155
1175
|
};
|
|
1156
|
-
var canvasSupportedTimeSeriesCharts = ["splunk.line"];
|
|
1176
|
+
var canvasSupportedTimeSeriesCharts = ["splunk.line", "splunk.area"];
|
|
1157
1177
|
var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
|
|
1158
|
-
return canvasSupportedTimeSeriesCharts.
|
|
1178
|
+
return canvasSupportedTimeSeriesCharts.includes(vizConfigKey);
|
|
1159
1179
|
};
|
|
1160
1180
|
var filterChartDataFromInternalFields = (chartData) => {
|
|
1161
1181
|
const { fields, columns } = chartData;
|
|
@@ -1310,46 +1330,66 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
1310
1330
|
}
|
|
1311
1331
|
return y2Config;
|
|
1312
1332
|
};
|
|
1313
|
-
var
|
|
1333
|
+
var getSeriesType = (isOverlay, isAreaChart, isStacked) => {
|
|
1334
|
+
if (isOverlay) return "line";
|
|
1335
|
+
if (!isAreaChart) return void 0;
|
|
1336
|
+
return isStacked ? "stacked-area" : "area";
|
|
1337
|
+
};
|
|
1338
|
+
var getY2Scale = (field, y2fields, overlayFields) => {
|
|
1339
|
+
const assignToY2 = (y2fields == null ? void 0 : y2fields.length) > 0 && y2fields.includes(field) || !(y2fields == null ? void 0 : y2fields.length) && (overlayFields == null ? void 0 : overlayFields.includes(field));
|
|
1340
|
+
return assignToY2 ? "y2" : "y";
|
|
1341
|
+
};
|
|
1342
|
+
var getSeriesOverrides = (opts) => {
|
|
1343
|
+
var _a;
|
|
1344
|
+
const {
|
|
1345
|
+
yfields,
|
|
1346
|
+
y2fields,
|
|
1347
|
+
lineWidth,
|
|
1348
|
+
overlayFields,
|
|
1349
|
+
y2Enabled,
|
|
1350
|
+
nullValueMode,
|
|
1351
|
+
markerDisplay,
|
|
1352
|
+
lineDashStyle,
|
|
1353
|
+
lineDashStylesByField,
|
|
1354
|
+
stepPosition,
|
|
1355
|
+
stepPositionsByField,
|
|
1356
|
+
type,
|
|
1357
|
+
stackMode,
|
|
1358
|
+
showLines
|
|
1359
|
+
} = opts;
|
|
1314
1360
|
const seriesConfig = {};
|
|
1315
1361
|
let spanGaps;
|
|
1316
|
-
let replaceNullsWithZero;
|
|
1317
1362
|
if (nullValueMode === "gaps") {
|
|
1318
1363
|
spanGaps = false;
|
|
1319
|
-
} else if (nullValueMode
|
|
1364
|
+
} else if (nullValueMode != null) {
|
|
1320
1365
|
spanGaps = true;
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
}
|
|
1366
|
+
} else {
|
|
1367
|
+
spanGaps = void 0;
|
|
1324
1368
|
}
|
|
1325
|
-
|
|
1369
|
+
const replaceNullsWithZero = nullValueMode === "zero" ? true : void 0;
|
|
1370
|
+
const isAreaChart = type === "area";
|
|
1371
|
+
const isStacked = isAreaChart && (stackMode === "stacked" || stackMode === "stacked100");
|
|
1372
|
+
const areaFields = isAreaChart ? yfields.filter((f) => !(overlayFields == null ? void 0 : overlayFields.includes(f))) : yfields;
|
|
1373
|
+
const overlayFieldsInOrder = (_a = overlayFields == null ? void 0 : overlayFields.filter((f) => yfields.includes(f))) != null ? _a : [];
|
|
1374
|
+
const orderedFields = isAreaChart ? [...areaFields, ...overlayFieldsInOrder] : yfields;
|
|
1375
|
+
orderedFields.forEach((field) => {
|
|
1376
|
+
var _a2;
|
|
1377
|
+
const isOverlay = (_a2 = overlayFields == null ? void 0 : overlayFields.includes(field)) != null ? _a2 : false;
|
|
1378
|
+
const isPercent = isAreaChart && stackMode === "stacked100" && !isOverlay;
|
|
1379
|
+
const shouldHideAreaOutline = isAreaChart && showLines === false && !isOverlay;
|
|
1326
1380
|
seriesConfig[field] = {
|
|
1327
|
-
overrides: {
|
|
1381
|
+
overrides: __spreadValues({
|
|
1382
|
+
width: shouldHideAreaOutline ? 0 : lineWidth != null ? lineWidth : DEFAULT_LINE_WIDTH
|
|
1383
|
+
}, isPercent ? { stacking: { mode: "percent", group: "A" } } : {})
|
|
1328
1384
|
};
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
if (y2Enabled)
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
);
|
|
1338
|
-
if (shouldAssignToY2) {
|
|
1339
|
-
seriesConfig[field].overrides.scale = "y2";
|
|
1340
|
-
} else {
|
|
1341
|
-
seriesConfig[field].overrides.scale = "y";
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
|
|
1345
|
-
seriesConfig[field].type = "line";
|
|
1346
|
-
}
|
|
1347
|
-
if (markerDisplay !== void 0) {
|
|
1348
|
-
seriesConfig[field].markerDisplay = markerDisplay;
|
|
1349
|
-
}
|
|
1350
|
-
const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
|
|
1351
|
-
if (fieldDashStyle) {
|
|
1352
|
-
seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
1385
|
+
const seriesType = getSeriesType(isOverlay, isAreaChart, isStacked);
|
|
1386
|
+
if (seriesType !== void 0) seriesConfig[field].type = seriesType;
|
|
1387
|
+
if (spanGaps !== void 0) seriesConfig[field].overrides.spanGaps = spanGaps;
|
|
1388
|
+
if (y2Enabled) seriesConfig[field].overrides.scale = getY2Scale(field, y2fields, overlayFields);
|
|
1389
|
+
if (markerDisplay !== void 0) seriesConfig[field].markerDisplay = markerDisplay;
|
|
1390
|
+
if (!isAreaChart || isOverlay) {
|
|
1391
|
+
const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
|
|
1392
|
+
if (fieldDashStyle) seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
1353
1393
|
}
|
|
1354
1394
|
const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
|
|
1355
1395
|
const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
|
|
@@ -1397,9 +1437,9 @@ var visualization_schemas_exports = {};
|
|
|
1397
1437
|
__export(visualization_schemas_exports, {
|
|
1398
1438
|
default: () => visualization_schemas_default
|
|
1399
1439
|
});
|
|
1400
|
-
var
|
|
1440
|
+
var defaultImport28 = __toESM(require("@splunk/visualization-schemas"));
|
|
1401
1441
|
__reExport(visualization_schemas_exports, require("@splunk/visualization-schemas"));
|
|
1402
|
-
var visualization_schemas_default = "default" in
|
|
1442
|
+
var visualization_schemas_default = "default" in defaultImport28 ? defaultImport28.default : defaultImport28;
|
|
1403
1443
|
|
|
1404
1444
|
// src/common/hooks/useTrellisEnabled.ts
|
|
1405
1445
|
var useTrellisFeatureFlagOn = () => {
|
|
@@ -1429,8 +1469,27 @@ var TrellisTitleDiv = styled_components_default.div`
|
|
|
1429
1469
|
background-color: ${(props) => props.backgroundColor};
|
|
1430
1470
|
box-shadow: 0 1px ${(props) => props.backgroundColor}; // this is added to avoid a 1px gap between title and viz divs that showed up intermittently because of pixel rounding error in chrome.
|
|
1431
1471
|
`;
|
|
1472
|
+
var formatTrellisKey = (value) => {
|
|
1473
|
+
if (value === null || value === void 0) {
|
|
1474
|
+
return "";
|
|
1475
|
+
}
|
|
1476
|
+
if (typeof value === "string") {
|
|
1477
|
+
return value;
|
|
1478
|
+
}
|
|
1479
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
1480
|
+
return value.toString();
|
|
1481
|
+
}
|
|
1482
|
+
if (typeof value === "symbol") {
|
|
1483
|
+
return value.toString();
|
|
1484
|
+
}
|
|
1485
|
+
try {
|
|
1486
|
+
return JSON.stringify(value);
|
|
1487
|
+
} catch (e) {
|
|
1488
|
+
return typeof value === "bigint" ? value.toString() : "";
|
|
1489
|
+
}
|
|
1490
|
+
};
|
|
1432
1491
|
var TrellisTitle = (props) => {
|
|
1433
|
-
const titleText =
|
|
1492
|
+
const titleText = formatTrellisKey(props.trellisKey);
|
|
1434
1493
|
return /* @__PURE__ */ react_exports.createElement(
|
|
1435
1494
|
TrellisTitleDiv,
|
|
1436
1495
|
{
|
|
@@ -1566,6 +1625,38 @@ var parseArrayOption = (value) => {
|
|
|
1566
1625
|
}
|
|
1567
1626
|
return void 0;
|
|
1568
1627
|
};
|
|
1628
|
+
var getAreaOpacityForCanvas = (areaOpacity) => (
|
|
1629
|
+
// Preserve legacy visualizations behavior where area opacity is squared to match charting output.
|
|
1630
|
+
areaOpacity !== void 0 && areaOpacity !== null ? __pow(areaOpacity, 2) : areaOpacity
|
|
1631
|
+
);
|
|
1632
|
+
var parseTickIntervalOption = (simpleXMLValue, canvasValue) => {
|
|
1633
|
+
if (simpleXMLValue) return Number(simpleXMLValue);
|
|
1634
|
+
if (canvasValue) return Number(canvasValue);
|
|
1635
|
+
return void 0;
|
|
1636
|
+
};
|
|
1637
|
+
var getYAxisTitles = ({
|
|
1638
|
+
y2Enabled,
|
|
1639
|
+
yFields,
|
|
1640
|
+
y2Fields,
|
|
1641
|
+
overlayFields,
|
|
1642
|
+
yAxisTitleText,
|
|
1643
|
+
yAxisTitleVisibility,
|
|
1644
|
+
y2AxisTitleText,
|
|
1645
|
+
y2AxisTitleVisibility,
|
|
1646
|
+
containerHeight
|
|
1647
|
+
}) => {
|
|
1648
|
+
const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
|
|
1649
|
+
const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
|
|
1650
|
+
const yAxisTitle = ellipsisAxisTitle(
|
|
1651
|
+
getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility),
|
|
1652
|
+
containerHeight
|
|
1653
|
+
);
|
|
1654
|
+
const y2AxisTitle = ellipsisAxisTitle(
|
|
1655
|
+
getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility),
|
|
1656
|
+
containerHeight
|
|
1657
|
+
);
|
|
1658
|
+
return { yAxisTitle, y2AxisTitle };
|
|
1659
|
+
};
|
|
1569
1660
|
var TimeSeriesChartWrapper = (props) => {
|
|
1570
1661
|
var _b, _c, _d;
|
|
1571
1662
|
const _a = props, {
|
|
@@ -1655,6 +1746,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1655
1746
|
"chart.overlayFields": overlayFieldsStr,
|
|
1656
1747
|
"chart.nullValueMode": nullValueMode,
|
|
1657
1748
|
"chart.showDataLabels": showDataLabels,
|
|
1749
|
+
"chart.showLines": showLines,
|
|
1750
|
+
"chart.stackMode": stackMode,
|
|
1658
1751
|
lineWidth,
|
|
1659
1752
|
lineDashStyle,
|
|
1660
1753
|
fieldDashStyles: lineDashStylesByFieldStr,
|
|
@@ -1683,7 +1776,10 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1683
1776
|
yAxisMinorTickSize,
|
|
1684
1777
|
y2AxisMinorTickSize,
|
|
1685
1778
|
showYAxisWithZero: showYAxisWithZeroFromOptions,
|
|
1686
|
-
showY2AxisWithZero: showY2AxisWithZeroFromOptions
|
|
1779
|
+
showY2AxisWithZero: showY2AxisWithZeroFromOptions,
|
|
1780
|
+
// area only props
|
|
1781
|
+
areaFillOpacity: areaOpacity,
|
|
1782
|
+
chart: chartType
|
|
1687
1783
|
} = options;
|
|
1688
1784
|
const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
|
|
1689
1785
|
const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
|
|
@@ -1700,13 +1796,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1700
1796
|
const yAxisMax = parseAxisValue(yAxisMaxRaw);
|
|
1701
1797
|
const y2AxisMin = parseAxisValue(y2AxisMinRaw);
|
|
1702
1798
|
const y2AxisMax = parseAxisValue(y2AxisMaxRaw);
|
|
1703
|
-
const
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
const yAxisMajorTickIntervalNum = parseTickInterval(yAxisMajorUnitFromSimpleXML, yAxisMajorTickInterval);
|
|
1709
|
-
const y2AxisMajorTickIntervalNum = parseTickInterval(
|
|
1799
|
+
const yAxisMajorTickIntervalNum = parseTickIntervalOption(
|
|
1800
|
+
yAxisMajorUnitFromSimpleXML,
|
|
1801
|
+
yAxisMajorTickInterval
|
|
1802
|
+
);
|
|
1803
|
+
const y2AxisMajorTickIntervalNum = parseTickIntervalOption(
|
|
1710
1804
|
y2AxisMajorUnitFromSimpleXML,
|
|
1711
1805
|
y2AxisMajorTickInterval
|
|
1712
1806
|
);
|
|
@@ -1715,6 +1809,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1715
1809
|
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
|
|
1716
1810
|
const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
|
|
1717
1811
|
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
|
|
1812
|
+
const areaOpacityForCanvas = getAreaOpacityForCanvas(areaOpacity);
|
|
1718
1813
|
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
1719
1814
|
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
1720
1815
|
const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
|
|
@@ -1745,26 +1840,40 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1745
1840
|
);
|
|
1746
1841
|
let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
|
|
1747
1842
|
xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
|
|
1748
|
-
const
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1843
|
+
const { yAxisTitle, y2AxisTitle } = getYAxisTitles({
|
|
1844
|
+
y2Enabled,
|
|
1845
|
+
yFields,
|
|
1846
|
+
y2Fields,
|
|
1847
|
+
overlayFields,
|
|
1848
|
+
yAxisTitleText,
|
|
1849
|
+
yAxisTitleVisibility,
|
|
1850
|
+
y2AxisTitleText,
|
|
1851
|
+
y2AxisTitleVisibility,
|
|
1852
|
+
containerHeight
|
|
1853
|
+
});
|
|
1754
1854
|
const xScaleConfig = (0, react_exports.useMemo)(
|
|
1755
1855
|
() => getXScaleConfig(xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation),
|
|
1756
1856
|
[xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation]
|
|
1757
1857
|
);
|
|
1858
|
+
const isStacked100 = stackMode === "stacked100";
|
|
1758
1859
|
const yScaleConfig = (0, react_exports.useMemo)(
|
|
1759
|
-
() =>
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1860
|
+
() => {
|
|
1861
|
+
const config2 = getYScaleConfig(
|
|
1862
|
+
yAxisTitle,
|
|
1863
|
+
yAxisAbbreviation,
|
|
1864
|
+
yAxisScale,
|
|
1865
|
+
yAxisLabelVisibility,
|
|
1866
|
+
yAxisMin,
|
|
1867
|
+
yAxisMax
|
|
1868
|
+
);
|
|
1869
|
+
if (isStacked100) {
|
|
1870
|
+
config2.y.tickFmt = (v) => `${Math.round(v * 100)}%`;
|
|
1871
|
+
config2.y.range = () => [0, 1];
|
|
1872
|
+
}
|
|
1873
|
+
return config2;
|
|
1874
|
+
},
|
|
1875
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1876
|
+
[yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax, isStacked100]
|
|
1768
1877
|
);
|
|
1769
1878
|
const y2ScaleConfig = (0, react_exports.useMemo)(() => {
|
|
1770
1879
|
if (y2Enabled) {
|
|
@@ -1796,10 +1905,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1796
1905
|
];
|
|
1797
1906
|
chartData.fields = filteredChartData.fields;
|
|
1798
1907
|
chartData.columns = seriesDataFormatted;
|
|
1908
|
+
const normalizedStackMode = stackMode === "stacked" || stackMode === "stacked100" ? stackMode : "auto";
|
|
1799
1909
|
const seriesOverrides = (0, react_exports.useMemo)(
|
|
1800
|
-
() => getSeriesOverrides(
|
|
1801
|
-
yFields,
|
|
1802
|
-
y2Fields,
|
|
1910
|
+
() => getSeriesOverrides({
|
|
1911
|
+
yfields: yFields,
|
|
1912
|
+
y2fields: y2Fields,
|
|
1803
1913
|
lineWidth,
|
|
1804
1914
|
overlayFields,
|
|
1805
1915
|
y2Enabled,
|
|
@@ -1808,8 +1918,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1808
1918
|
lineDashStyle,
|
|
1809
1919
|
lineDashStylesByField,
|
|
1810
1920
|
stepPosition,
|
|
1811
|
-
stepPositionsByField
|
|
1812
|
-
|
|
1921
|
+
stepPositionsByField,
|
|
1922
|
+
type: chartType,
|
|
1923
|
+
stackMode: normalizedStackMode,
|
|
1924
|
+
showLines
|
|
1925
|
+
}),
|
|
1813
1926
|
[
|
|
1814
1927
|
yFields,
|
|
1815
1928
|
y2Fields,
|
|
@@ -1821,7 +1934,10 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1821
1934
|
lineDashStyle,
|
|
1822
1935
|
lineDashStylesByField,
|
|
1823
1936
|
stepPosition,
|
|
1824
|
-
stepPositionsByField
|
|
1937
|
+
stepPositionsByField,
|
|
1938
|
+
chartType,
|
|
1939
|
+
normalizedStackMode,
|
|
1940
|
+
showLines
|
|
1825
1941
|
]
|
|
1826
1942
|
);
|
|
1827
1943
|
const chartingEventAnnotations = (0, react_exports.useMemo)(
|
|
@@ -1889,50 +2005,54 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1889
2005
|
react_exports.useEffect(() => {
|
|
1890
2006
|
additionalTooltipValuesRef.current = additionalTooltipValues;
|
|
1891
2007
|
}, [additionalTooltipValues]);
|
|
2008
|
+
const handleCrosshairMouseout = react_exports.useCallback(() => {
|
|
2009
|
+
if (onPointMouseOut && lastPayloadRef.current) {
|
|
2010
|
+
onPointMouseOut({
|
|
2011
|
+
type: "point.mouseout",
|
|
2012
|
+
originalEvent: lastOriginalEventRef.current,
|
|
2013
|
+
payload: lastPayloadRef.current
|
|
2014
|
+
});
|
|
2015
|
+
}
|
|
2016
|
+
previousMouseoverPayloadRef.current = null;
|
|
2017
|
+
}, [onPointMouseOut]);
|
|
1892
2018
|
const handleChartCrosshairChange = react_exports.useCallback(
|
|
1893
2019
|
(event) => {
|
|
1894
|
-
if (onPointMouseOver
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
2020
|
+
if (!onPointMouseOver && !onPointMouseOut) {
|
|
2021
|
+
return;
|
|
2022
|
+
}
|
|
2023
|
+
if (!event) {
|
|
2024
|
+
handleCrosshairMouseout();
|
|
2025
|
+
return;
|
|
2026
|
+
}
|
|
2027
|
+
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
|
|
2028
|
+
name: event.seriesKey
|
|
2029
|
+
});
|
|
2030
|
+
delete payload.seriesKey;
|
|
2031
|
+
if (event.rowContext) {
|
|
2032
|
+
Object.assign(
|
|
2033
|
+
payload,
|
|
2034
|
+
Object.keys(event.rowContext).reduce((acc, fieldName) => {
|
|
2035
|
+
acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
|
|
2036
|
+
return acc;
|
|
2037
|
+
}, {})
|
|
2038
|
+
);
|
|
2039
|
+
}
|
|
2040
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
2041
|
+
if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
|
|
2042
|
+
return;
|
|
2043
|
+
}
|
|
2044
|
+
lastPayloadRef.current = updatedPayload;
|
|
2045
|
+
lastOriginalEventRef.current = event;
|
|
2046
|
+
previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
|
|
2047
|
+
if (onPointMouseOver) {
|
|
2048
|
+
onPointMouseOver({
|
|
2049
|
+
type: "point.mouseover",
|
|
2050
|
+
originalEvent: event,
|
|
2051
|
+
payload: updatedPayload
|
|
1908
2052
|
});
|
|
1909
|
-
delete payload.seriesKey;
|
|
1910
|
-
if (event.rowContext) {
|
|
1911
|
-
Object.assign(
|
|
1912
|
-
payload,
|
|
1913
|
-
Object.keys(event.rowContext).reduce((acc, fieldName) => {
|
|
1914
|
-
acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
|
|
1915
|
-
return acc;
|
|
1916
|
-
}, {})
|
|
1917
|
-
);
|
|
1918
|
-
}
|
|
1919
|
-
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1920
|
-
if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
|
|
1921
|
-
return;
|
|
1922
|
-
}
|
|
1923
|
-
lastPayloadRef.current = updatedPayload;
|
|
1924
|
-
lastOriginalEventRef.current = event;
|
|
1925
|
-
previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
|
|
1926
|
-
if (onPointMouseOver) {
|
|
1927
|
-
onPointMouseOver({
|
|
1928
|
-
type: "point.mouseover",
|
|
1929
|
-
originalEvent: event,
|
|
1930
|
-
payload: updatedPayload
|
|
1931
|
-
});
|
|
1932
|
-
}
|
|
1933
2053
|
}
|
|
1934
2054
|
},
|
|
1935
|
-
[onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy]
|
|
2055
|
+
[onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy, handleCrosshairMouseout]
|
|
1936
2056
|
);
|
|
1937
2057
|
const dataKey = `${(_b = chartData.columns[0]) == null ? void 0 : _b[0]}-${(_c = chartData.columns[0]) == null ? void 0 : _c[chartData.columns[0].length - 1]}-${(_d = chartData.columns[0]) == null ? void 0 : _d.length}`;
|
|
1938
2058
|
const memoizedChart = (0, react_exports.useMemo)(() => {
|
|
@@ -1987,7 +2107,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1987
2107
|
showXAxisLine,
|
|
1988
2108
|
showYAxisLine,
|
|
1989
2109
|
showY2AxisLine,
|
|
1990
|
-
xAxisMaxLabelParts
|
|
2110
|
+
xAxisMaxLabelParts,
|
|
2111
|
+
areaOpacity: areaOpacityForCanvas
|
|
1991
2112
|
}
|
|
1992
2113
|
));
|
|
1993
2114
|
}, [
|
|
@@ -2039,7 +2160,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2039
2160
|
showYAxisLine,
|
|
2040
2161
|
showY2AxisLine,
|
|
2041
2162
|
legendMode,
|
|
2042
|
-
xAxisMaxLabelParts
|
|
2163
|
+
xAxisMaxLabelParts,
|
|
2164
|
+
areaOpacityForCanvas
|
|
2043
2165
|
]);
|
|
2044
2166
|
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
2045
2167
|
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
|
|
@@ -2067,6 +2189,37 @@ var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
|
|
|
2067
2189
|
|
|
2068
2190
|
// src/common/withDashboardViz.tsx
|
|
2069
2191
|
var SanitizedTimeSeriesChartWrapper = (0, SanitizeProps_exports.withSanitizedProps)(TimeSeriesChartWrapper_default);
|
|
2192
|
+
var buildEventCallbackProps = (supportedEvents, evaluatedOptionsToUse, onEventTrigger) => {
|
|
2193
|
+
const result = {};
|
|
2194
|
+
Object.keys(supportedEvents).forEach((eventName) => {
|
|
2195
|
+
const { parentKeys, payloadKeys } = supportedEvents[eventName];
|
|
2196
|
+
const eventCallbackPropName = (0, lodash_exports.camelCase)(`on.${eventName}`);
|
|
2197
|
+
let payload = {};
|
|
2198
|
+
if (Array.isArray(payloadKeys) && payloadKeys.length) {
|
|
2199
|
+
payloadKeys.forEach((p) => {
|
|
2200
|
+
payload[p] = evaluatedOptionsToUse[p];
|
|
2201
|
+
});
|
|
2202
|
+
}
|
|
2203
|
+
result[eventCallbackPropName] = (ev) => {
|
|
2204
|
+
if (ev == null ? void 0 : ev.payload) {
|
|
2205
|
+
payload = __spreadValues({}, ev.payload);
|
|
2206
|
+
}
|
|
2207
|
+
return onEventTrigger({
|
|
2208
|
+
originalEvent: ev,
|
|
2209
|
+
payload,
|
|
2210
|
+
type: eventName
|
|
2211
|
+
});
|
|
2212
|
+
};
|
|
2213
|
+
if (parentKeys) {
|
|
2214
|
+
for (let i = parentKeys.length - 1; i >= 0; i -= 1) {
|
|
2215
|
+
const newObject = {};
|
|
2216
|
+
newObject[parentKeys[i]] = result[eventCallbackPropName];
|
|
2217
|
+
result[eventCallbackPropName] = newObject;
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
2220
|
+
});
|
|
2221
|
+
return result;
|
|
2222
|
+
};
|
|
2070
2223
|
var withDashboardViz = (opts) => {
|
|
2071
2224
|
const {
|
|
2072
2225
|
ReactViz,
|
|
@@ -2124,9 +2277,7 @@ var withDashboardViz = (opts) => {
|
|
|
2124
2277
|
const isDownsamplingEnabledByFeatureFlag = Boolean(
|
|
2125
2278
|
featureFlagContext == null ? void 0 : featureFlagContext.visualizations_enableDownsampling
|
|
2126
2279
|
);
|
|
2127
|
-
const isTrellisFeatureFlagOn = Boolean(
|
|
2128
|
-
featureFlagContext && featureFlagContext.visualizations_enableTrellis
|
|
2129
|
-
);
|
|
2280
|
+
const isTrellisFeatureFlagOn = Boolean(featureFlagContext == null ? void 0 : featureFlagContext.visualizations_enableTrellis);
|
|
2130
2281
|
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 */;
|
|
2131
2282
|
const isAcceleratedRenderFeatureFlagOn = Boolean(
|
|
2132
2283
|
featureFlagContext == null ? void 0 : featureFlagContext.visualizations_enableAcceleratedRender
|
|
@@ -2291,38 +2442,12 @@ var withDashboardViz = (opts) => {
|
|
|
2291
2442
|
}
|
|
2292
2443
|
);
|
|
2293
2444
|
}
|
|
2294
|
-
const eventCallbackProps = {};
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
let payload = {};
|
|
2301
|
-
if (Array.isArray(payloadKeys) && payloadKeys.length) {
|
|
2302
|
-
payloadKeys.forEach((p) => {
|
|
2303
|
-
payload[p] = evaluatedOptionsToUse[p];
|
|
2304
|
-
});
|
|
2305
|
-
}
|
|
2306
|
-
eventCallbackProps[eventCallbackPropName] = (ev) => {
|
|
2307
|
-
if (ev == null ? void 0 : ev.payload) {
|
|
2308
|
-
payload = __spreadValues({}, ev.payload);
|
|
2309
|
-
}
|
|
2310
|
-
return onEventTrigger({
|
|
2311
|
-
originalEvent: ev,
|
|
2312
|
-
payload,
|
|
2313
|
-
type: eventName
|
|
2314
|
-
});
|
|
2315
|
-
};
|
|
2316
|
-
if (parentKeys) {
|
|
2317
|
-
for (let i = parentKeys.length - 1; i >= 0; i -= 1) {
|
|
2318
|
-
const newObject = {};
|
|
2319
|
-
newObject[parentKeys[i]] = eventCallbackProps[eventCallbackPropName];
|
|
2320
|
-
eventCallbackProps[eventCallbackPropName] = newObject;
|
|
2321
|
-
}
|
|
2322
|
-
}
|
|
2323
|
-
});
|
|
2324
|
-
}
|
|
2325
|
-
const computedVizProps = computeVizProps2(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, props), evaluatedOptionsToUse), eventCallbackProps), {
|
|
2445
|
+
const eventCallbackProps = hasEventHandlers && mode === "view" && vizConfig.supports.includes("events" /* EVENTS */) ? buildEventCallbackProps(vizConfig.events, evaluatedOptionsToUse, onEventTrigger) : {};
|
|
2446
|
+
const computedVizProps = computeVizProps2(__spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues({}, props), evaluatedOptionsToUse), {
|
|
2447
|
+
// Align option transformation with the actual renderer selected below.
|
|
2448
|
+
// This prevents canvas-only option preservation from leaking into Highcharts mode.
|
|
2449
|
+
isAcceleratedRenderOn
|
|
2450
|
+
}), eventCallbackProps), {
|
|
2326
2451
|
themeFunc
|
|
2327
2452
|
}));
|
|
2328
2453
|
if (useAsyncEvaluatedOptions && Object.keys(evaluatedOptionsToUse).length === 0) {
|
|
@@ -2356,36 +2481,36 @@ var PresetPalettes_exports = {};
|
|
|
2356
2481
|
__export(PresetPalettes_exports, {
|
|
2357
2482
|
default: () => PresetPalettes_default
|
|
2358
2483
|
});
|
|
2359
|
-
var
|
|
2484
|
+
var defaultImport29 = __toESM(require("@splunk/visualization-color-palettes/editors/PresetPalettes"));
|
|
2360
2485
|
__reExport(PresetPalettes_exports, require("@splunk/visualization-color-palettes/editors/PresetPalettes"));
|
|
2361
|
-
var PresetPalettes_default = "default" in
|
|
2486
|
+
var PresetPalettes_default = "default" in defaultImport29 ? defaultImport29.default : defaultImport29;
|
|
2362
2487
|
|
|
2363
2488
|
// esm-externals:@splunk/themes
|
|
2364
2489
|
var themes_exports = {};
|
|
2365
2490
|
__export(themes_exports, {
|
|
2366
2491
|
default: () => themes_default
|
|
2367
2492
|
});
|
|
2368
|
-
var
|
|
2493
|
+
var defaultImport30 = __toESM(require("@splunk/themes"));
|
|
2369
2494
|
__reExport(themes_exports, require("@splunk/themes"));
|
|
2370
|
-
var themes_default = "default" in
|
|
2495
|
+
var themes_default = "default" in defaultImport30 ? defaultImport30.default : defaultImport30;
|
|
2371
2496
|
|
|
2372
2497
|
// esm-externals:@splunk/react-icons/Square
|
|
2373
2498
|
var Square_exports = {};
|
|
2374
2499
|
__export(Square_exports, {
|
|
2375
2500
|
default: () => Square_default
|
|
2376
2501
|
});
|
|
2377
|
-
var
|
|
2502
|
+
var defaultImport31 = __toESM(require("@splunk/react-icons/Square"));
|
|
2378
2503
|
__reExport(Square_exports, require("@splunk/react-icons/Square"));
|
|
2379
|
-
var Square_default = "default" in
|
|
2504
|
+
var Square_default = "default" in defaultImport31 ? defaultImport31.default : defaultImport31;
|
|
2380
2505
|
|
|
2381
2506
|
// esm-externals:@splunk/visualizations-shared/configUtils
|
|
2382
2507
|
var configUtils_exports = {};
|
|
2383
2508
|
__export(configUtils_exports, {
|
|
2384
2509
|
default: () => configUtils_default
|
|
2385
2510
|
});
|
|
2386
|
-
var
|
|
2511
|
+
var defaultImport32 = __toESM(require("@splunk/visualizations-shared/configUtils"));
|
|
2387
2512
|
__reExport(configUtils_exports, require("@splunk/visualizations-shared/configUtils"));
|
|
2388
|
-
var configUtils_default = "default" in
|
|
2513
|
+
var configUtils_default = "default" in defaultImport32 ? defaultImport32.default : defaultImport32;
|
|
2389
2514
|
|
|
2390
2515
|
// src/common/utils/configUtils.ts
|
|
2391
2516
|
function enhanceConfig(vizConfig) {
|
|
@@ -2689,7 +2814,7 @@ var editorConfig = [
|
|
|
2689
2814
|
presets,
|
|
2690
2815
|
value: ({ context, options }) => {
|
|
2691
2816
|
const initialPreset = getInitialPreset(context, options, presets);
|
|
2692
|
-
return initialPreset
|
|
2817
|
+
return (initialPreset == null ? void 0 : initialPreset.label) || null;
|
|
2693
2818
|
}
|
|
2694
2819
|
}
|
|
2695
2820
|
}
|
|
@@ -2805,27 +2930,18 @@ var pick_exports = {};
|
|
|
2805
2930
|
__export(pick_exports, {
|
|
2806
2931
|
default: () => pick_default
|
|
2807
2932
|
});
|
|
2808
|
-
var
|
|
2933
|
+
var defaultImport33 = __toESM(require("@splunk/themes/pick"));
|
|
2809
2934
|
__reExport(pick_exports, require("@splunk/themes/pick"));
|
|
2810
|
-
var pick_default = "default" in
|
|
2811
|
-
|
|
2812
|
-
// esm-externals:@splunk/visualizations-shared/propUtils
|
|
2813
|
-
var propUtils_exports = {};
|
|
2814
|
-
__export(propUtils_exports, {
|
|
2815
|
-
default: () => propUtils_default
|
|
2816
|
-
});
|
|
2817
|
-
var defaultImport32 = __toESM(require("@splunk/visualizations-shared/propUtils"));
|
|
2818
|
-
__reExport(propUtils_exports, require("@splunk/visualizations-shared/propUtils"));
|
|
2819
|
-
var propUtils_default = "default" in defaultImport32 ? defaultImport32.default : defaultImport32;
|
|
2935
|
+
var pick_default = "default" in defaultImport33 ? defaultImport33.default : defaultImport33;
|
|
2820
2936
|
|
|
2821
2937
|
// esm-externals:@splunk/react-ui/ScreenReaderContent
|
|
2822
2938
|
var ScreenReaderContent_exports = {};
|
|
2823
2939
|
__export(ScreenReaderContent_exports, {
|
|
2824
2940
|
default: () => ScreenReaderContent_default
|
|
2825
2941
|
});
|
|
2826
|
-
var
|
|
2942
|
+
var defaultImport34 = __toESM(require("@splunk/react-ui/ScreenReaderContent"));
|
|
2827
2943
|
__reExport(ScreenReaderContent_exports, require("@splunk/react-ui/ScreenReaderContent"));
|
|
2828
|
-
var ScreenReaderContent_default = "default" in
|
|
2944
|
+
var ScreenReaderContent_default = "default" in defaultImport34 ? defaultImport34.default : defaultImport34;
|
|
2829
2945
|
|
|
2830
2946
|
// src/common/shapeUtils.tsx
|
|
2831
2947
|
var shapeOptionsMapping = {
|