@splunk/visualizations 28.5.2 → 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 +75 -8
- 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/NetworkGraph.d.ts +2 -1
- package/NetworkGraph/NetworkGraph.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -1
- package/NetworkGraph.config.js.map +2 -2
- package/NetworkGraph.js +628 -434
- 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/Image.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/Image/index.ts
|
|
64
66
|
var Image_exports = {};
|
|
@@ -196,6 +198,13 @@ var editorConfig = [
|
|
|
196
198
|
editor: "editor.checkbox",
|
|
197
199
|
showEditor: ({ options }) => !!options.src
|
|
198
200
|
}
|
|
201
|
+
],
|
|
202
|
+
[
|
|
203
|
+
{
|
|
204
|
+
label: (0, i18n_exports._)("Title for alt text"),
|
|
205
|
+
option: "title",
|
|
206
|
+
editor: "editor.text"
|
|
207
|
+
}
|
|
199
208
|
]
|
|
200
209
|
]
|
|
201
210
|
}
|
|
@@ -342,7 +351,7 @@ var DefaultVizActionHandler = class {
|
|
|
342
351
|
var INITIAL_HEIGHT = 250;
|
|
343
352
|
var SplunkVisualization = class {
|
|
344
353
|
};
|
|
345
|
-
SplunkVisualization
|
|
354
|
+
__publicField(SplunkVisualization, "propTypes", {
|
|
346
355
|
/**
|
|
347
356
|
* display mode
|
|
348
357
|
*/
|
|
@@ -418,11 +427,11 @@ SplunkVisualization.propTypes = {
|
|
|
418
427
|
* A callback to request new data with updated request params
|
|
419
428
|
*/
|
|
420
429
|
onRequestParamsChange: prop_types_exports.func
|
|
421
|
-
};
|
|
430
|
+
});
|
|
422
431
|
/**
|
|
423
432
|
*
|
|
424
433
|
*/
|
|
425
|
-
SplunkVisualization
|
|
434
|
+
__publicField(SplunkVisualization, "defaults", {
|
|
426
435
|
// BaseVisualization in dashboard-visualizations uses 100% for width but 250 for height
|
|
427
436
|
width: "100%",
|
|
428
437
|
height: INITIAL_HEIGHT,
|
|
@@ -437,7 +446,7 @@ SplunkVisualization.defaults = {
|
|
|
437
446
|
onComputedProps: () => ({}),
|
|
438
447
|
loading: false,
|
|
439
448
|
onRequestParamsChange: lodash_exports.noop
|
|
440
|
-
};
|
|
449
|
+
});
|
|
441
450
|
var SplunkVisualization_default = SplunkVisualization;
|
|
442
451
|
|
|
443
452
|
// src/common/interfaces/DataSource.ts
|
|
@@ -491,9 +500,9 @@ var usePaginationParams = ({
|
|
|
491
500
|
meta,
|
|
492
501
|
onRequestParamsChange
|
|
493
502
|
}) => {
|
|
494
|
-
const totalCount = meta
|
|
495
|
-
const offset = requestParams
|
|
496
|
-
const count = requestParams
|
|
503
|
+
const totalCount = (meta == null ? void 0 : meta.totalCount) || 0;
|
|
504
|
+
const offset = (requestParams == null ? void 0 : requestParams.offset) || 0;
|
|
505
|
+
const count = requestParams == null ? void 0 : requestParams.count;
|
|
497
506
|
const totalPages = typeof count === "number" && count > 0 ? Math.ceil(totalCount / count) : 0;
|
|
498
507
|
const current = typeof count === "number" && count > 0 ? Math.floor(offset / count) + 1 : 0;
|
|
499
508
|
const isPaging = totalPages > 1 && typeof onRequestParamsChange === "function";
|
|
@@ -601,7 +610,7 @@ var Cover = styled_components_default.div`
|
|
|
601
610
|
bottom: 0;
|
|
602
611
|
`;
|
|
603
612
|
var Blocker = styled_components_default.div.attrs({
|
|
604
|
-
"data-splunk-visualization-version": "28.
|
|
613
|
+
"data-splunk-visualization-version": "28.6.0 - 92427899a"
|
|
605
614
|
})`
|
|
606
615
|
position: relative;
|
|
607
616
|
width: 100%;
|
|
@@ -691,7 +700,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
691
700
|
FixSizeItem,
|
|
692
701
|
{
|
|
693
702
|
"data-test": "fix-size-item",
|
|
694
|
-
"data-splunk-visualization-version": "28.
|
|
703
|
+
"data-splunk-visualization-version": "28.6.0 - 92427899a",
|
|
695
704
|
width,
|
|
696
705
|
height,
|
|
697
706
|
backgroundColor
|
|
@@ -1232,6 +1241,24 @@ var defaultImport29 = __toESM(require("@splunk/react-icons/Triangle"));
|
|
|
1232
1241
|
__reExport(Triangle_exports, require("@splunk/react-icons/Triangle"));
|
|
1233
1242
|
var Triangle_default = "default" in defaultImport29 ? defaultImport29.default : defaultImport29;
|
|
1234
1243
|
|
|
1244
|
+
// esm-externals:@splunk/visualizations-shared/propUtils
|
|
1245
|
+
var propUtils_exports = {};
|
|
1246
|
+
__export(propUtils_exports, {
|
|
1247
|
+
default: () => propUtils_default
|
|
1248
|
+
});
|
|
1249
|
+
var defaultImport30 = __toESM(require("@splunk/visualizations-shared/propUtils"));
|
|
1250
|
+
__reExport(propUtils_exports, require("@splunk/visualizations-shared/propUtils"));
|
|
1251
|
+
var propUtils_default = "default" in defaultImport30 ? defaultImport30.default : defaultImport30;
|
|
1252
|
+
|
|
1253
|
+
// esm-externals:@splunk/visualizations-shared/simpleXMLOptions
|
|
1254
|
+
var simpleXMLOptions_exports = {};
|
|
1255
|
+
__export(simpleXMLOptions_exports, {
|
|
1256
|
+
default: () => simpleXMLOptions_default
|
|
1257
|
+
});
|
|
1258
|
+
var defaultImport31 = __toESM(require("@splunk/visualizations-shared/simpleXMLOptions"));
|
|
1259
|
+
__reExport(simpleXMLOptions_exports, require("@splunk/visualizations-shared/simpleXMLOptions"));
|
|
1260
|
+
var simpleXMLOptions_default = "default" in defaultImport31 ? defaultImport31.default : defaultImport31;
|
|
1261
|
+
|
|
1235
1262
|
// src/common/chartingUtils.ts
|
|
1236
1263
|
var DEFAULT_LINE_WIDTH = 2;
|
|
1237
1264
|
var getAnnotationsForCanvas = ({
|
|
@@ -1269,9 +1296,9 @@ var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
|
|
|
1269
1296
|
const xAxisIsTime = xField === "_time";
|
|
1270
1297
|
return !!rangeSelectEventHandler && xAxisIsTime;
|
|
1271
1298
|
};
|
|
1272
|
-
var canvasSupportedTimeSeriesCharts = ["splunk.line"];
|
|
1299
|
+
var canvasSupportedTimeSeriesCharts = ["splunk.line", "splunk.area"];
|
|
1273
1300
|
var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
|
|
1274
|
-
return canvasSupportedTimeSeriesCharts.
|
|
1301
|
+
return canvasSupportedTimeSeriesCharts.includes(vizConfigKey);
|
|
1275
1302
|
};
|
|
1276
1303
|
var filterChartDataFromInternalFields = (chartData) => {
|
|
1277
1304
|
const { fields, columns } = chartData;
|
|
@@ -1426,46 +1453,66 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
1426
1453
|
}
|
|
1427
1454
|
return y2Config;
|
|
1428
1455
|
};
|
|
1429
|
-
var
|
|
1456
|
+
var getSeriesType = (isOverlay, isAreaChart, isStacked) => {
|
|
1457
|
+
if (isOverlay) return "line";
|
|
1458
|
+
if (!isAreaChart) return void 0;
|
|
1459
|
+
return isStacked ? "stacked-area" : "area";
|
|
1460
|
+
};
|
|
1461
|
+
var getY2Scale = (field, y2fields, overlayFields) => {
|
|
1462
|
+
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));
|
|
1463
|
+
return assignToY2 ? "y2" : "y";
|
|
1464
|
+
};
|
|
1465
|
+
var getSeriesOverrides = (opts) => {
|
|
1466
|
+
var _a;
|
|
1467
|
+
const {
|
|
1468
|
+
yfields,
|
|
1469
|
+
y2fields,
|
|
1470
|
+
lineWidth,
|
|
1471
|
+
overlayFields,
|
|
1472
|
+
y2Enabled,
|
|
1473
|
+
nullValueMode,
|
|
1474
|
+
markerDisplay,
|
|
1475
|
+
lineDashStyle,
|
|
1476
|
+
lineDashStylesByField,
|
|
1477
|
+
stepPosition,
|
|
1478
|
+
stepPositionsByField,
|
|
1479
|
+
type,
|
|
1480
|
+
stackMode,
|
|
1481
|
+
showLines
|
|
1482
|
+
} = opts;
|
|
1430
1483
|
const seriesConfig = {};
|
|
1431
1484
|
let spanGaps;
|
|
1432
|
-
let replaceNullsWithZero;
|
|
1433
1485
|
if (nullValueMode === "gaps") {
|
|
1434
1486
|
spanGaps = false;
|
|
1435
|
-
} else if (nullValueMode
|
|
1487
|
+
} else if (nullValueMode != null) {
|
|
1436
1488
|
spanGaps = true;
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
}
|
|
1489
|
+
} else {
|
|
1490
|
+
spanGaps = void 0;
|
|
1440
1491
|
}
|
|
1441
|
-
|
|
1492
|
+
const replaceNullsWithZero = nullValueMode === "zero" ? true : void 0;
|
|
1493
|
+
const isAreaChart = type === "area";
|
|
1494
|
+
const isStacked = isAreaChart && (stackMode === "stacked" || stackMode === "stacked100");
|
|
1495
|
+
const areaFields = isAreaChart ? yfields.filter((f) => !(overlayFields == null ? void 0 : overlayFields.includes(f))) : yfields;
|
|
1496
|
+
const overlayFieldsInOrder = (_a = overlayFields == null ? void 0 : overlayFields.filter((f) => yfields.includes(f))) != null ? _a : [];
|
|
1497
|
+
const orderedFields = isAreaChart ? [...areaFields, ...overlayFieldsInOrder] : yfields;
|
|
1498
|
+
orderedFields.forEach((field) => {
|
|
1499
|
+
var _a2;
|
|
1500
|
+
const isOverlay = (_a2 = overlayFields == null ? void 0 : overlayFields.includes(field)) != null ? _a2 : false;
|
|
1501
|
+
const isPercent = isAreaChart && stackMode === "stacked100" && !isOverlay;
|
|
1502
|
+
const shouldHideAreaOutline = isAreaChart && showLines === false && !isOverlay;
|
|
1442
1503
|
seriesConfig[field] = {
|
|
1443
|
-
overrides: {
|
|
1504
|
+
overrides: __spreadValues({
|
|
1505
|
+
width: shouldHideAreaOutline ? 0 : lineWidth != null ? lineWidth : DEFAULT_LINE_WIDTH
|
|
1506
|
+
}, isPercent ? { stacking: { mode: "percent", group: "A" } } : {})
|
|
1444
1507
|
};
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
if (y2Enabled)
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
);
|
|
1454
|
-
if (shouldAssignToY2) {
|
|
1455
|
-
seriesConfig[field].overrides.scale = "y2";
|
|
1456
|
-
} else {
|
|
1457
|
-
seriesConfig[field].overrides.scale = "y";
|
|
1458
|
-
}
|
|
1459
|
-
}
|
|
1460
|
-
if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
|
|
1461
|
-
seriesConfig[field].type = "line";
|
|
1462
|
-
}
|
|
1463
|
-
if (markerDisplay !== void 0) {
|
|
1464
|
-
seriesConfig[field].markerDisplay = markerDisplay;
|
|
1465
|
-
}
|
|
1466
|
-
const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
|
|
1467
|
-
if (fieldDashStyle) {
|
|
1468
|
-
seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
1508
|
+
const seriesType = getSeriesType(isOverlay, isAreaChart, isStacked);
|
|
1509
|
+
if (seriesType !== void 0) seriesConfig[field].type = seriesType;
|
|
1510
|
+
if (spanGaps !== void 0) seriesConfig[field].overrides.spanGaps = spanGaps;
|
|
1511
|
+
if (y2Enabled) seriesConfig[field].overrides.scale = getY2Scale(field, y2fields, overlayFields);
|
|
1512
|
+
if (markerDisplay !== void 0) seriesConfig[field].markerDisplay = markerDisplay;
|
|
1513
|
+
if (!isAreaChart || isOverlay) {
|
|
1514
|
+
const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
|
|
1515
|
+
if (fieldDashStyle) seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
1469
1516
|
}
|
|
1470
1517
|
const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
|
|
1471
1518
|
const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
|
|
@@ -1536,8 +1583,27 @@ var TrellisTitleDiv = styled_components_default.div`
|
|
|
1536
1583
|
background-color: ${(props) => props.backgroundColor};
|
|
1537
1584
|
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.
|
|
1538
1585
|
`;
|
|
1586
|
+
var formatTrellisKey = (value) => {
|
|
1587
|
+
if (value === null || value === void 0) {
|
|
1588
|
+
return "";
|
|
1589
|
+
}
|
|
1590
|
+
if (typeof value === "string") {
|
|
1591
|
+
return value;
|
|
1592
|
+
}
|
|
1593
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
1594
|
+
return value.toString();
|
|
1595
|
+
}
|
|
1596
|
+
if (typeof value === "symbol") {
|
|
1597
|
+
return value.toString();
|
|
1598
|
+
}
|
|
1599
|
+
try {
|
|
1600
|
+
return JSON.stringify(value);
|
|
1601
|
+
} catch (e) {
|
|
1602
|
+
return typeof value === "bigint" ? value.toString() : "";
|
|
1603
|
+
}
|
|
1604
|
+
};
|
|
1539
1605
|
var TrellisTitle = (props) => {
|
|
1540
|
-
const titleText =
|
|
1606
|
+
const titleText = formatTrellisKey(props.trellisKey);
|
|
1541
1607
|
return /* @__PURE__ */ react_exports.createElement(
|
|
1542
1608
|
TrellisTitleDiv,
|
|
1543
1609
|
{
|
|
@@ -1673,6 +1739,38 @@ var parseArrayOption = (value) => {
|
|
|
1673
1739
|
}
|
|
1674
1740
|
return void 0;
|
|
1675
1741
|
};
|
|
1742
|
+
var getAreaOpacityForCanvas = (areaOpacity) => (
|
|
1743
|
+
// Preserve legacy visualizations behavior where area opacity is squared to match charting output.
|
|
1744
|
+
areaOpacity !== void 0 && areaOpacity !== null ? __pow(areaOpacity, 2) : areaOpacity
|
|
1745
|
+
);
|
|
1746
|
+
var parseTickIntervalOption = (simpleXMLValue, canvasValue) => {
|
|
1747
|
+
if (simpleXMLValue) return Number(simpleXMLValue);
|
|
1748
|
+
if (canvasValue) return Number(canvasValue);
|
|
1749
|
+
return void 0;
|
|
1750
|
+
};
|
|
1751
|
+
var getYAxisTitles = ({
|
|
1752
|
+
y2Enabled,
|
|
1753
|
+
yFields,
|
|
1754
|
+
y2Fields,
|
|
1755
|
+
overlayFields,
|
|
1756
|
+
yAxisTitleText,
|
|
1757
|
+
yAxisTitleVisibility,
|
|
1758
|
+
y2AxisTitleText,
|
|
1759
|
+
y2AxisTitleVisibility,
|
|
1760
|
+
containerHeight
|
|
1761
|
+
}) => {
|
|
1762
|
+
const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
|
|
1763
|
+
const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
|
|
1764
|
+
const yAxisTitle = ellipsisAxisTitle(
|
|
1765
|
+
getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility),
|
|
1766
|
+
containerHeight
|
|
1767
|
+
);
|
|
1768
|
+
const y2AxisTitle = ellipsisAxisTitle(
|
|
1769
|
+
getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility),
|
|
1770
|
+
containerHeight
|
|
1771
|
+
);
|
|
1772
|
+
return { yAxisTitle, y2AxisTitle };
|
|
1773
|
+
};
|
|
1676
1774
|
var TimeSeriesChartWrapper = (props) => {
|
|
1677
1775
|
var _b, _c, _d;
|
|
1678
1776
|
const _a = props, {
|
|
@@ -1762,6 +1860,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1762
1860
|
"chart.overlayFields": overlayFieldsStr,
|
|
1763
1861
|
"chart.nullValueMode": nullValueMode,
|
|
1764
1862
|
"chart.showDataLabels": showDataLabels,
|
|
1863
|
+
"chart.showLines": showLines,
|
|
1864
|
+
"chart.stackMode": stackMode,
|
|
1765
1865
|
lineWidth,
|
|
1766
1866
|
lineDashStyle,
|
|
1767
1867
|
fieldDashStyles: lineDashStylesByFieldStr,
|
|
@@ -1790,7 +1890,10 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1790
1890
|
yAxisMinorTickSize,
|
|
1791
1891
|
y2AxisMinorTickSize,
|
|
1792
1892
|
showYAxisWithZero: showYAxisWithZeroFromOptions,
|
|
1793
|
-
showY2AxisWithZero: showY2AxisWithZeroFromOptions
|
|
1893
|
+
showY2AxisWithZero: showY2AxisWithZeroFromOptions,
|
|
1894
|
+
// area only props
|
|
1895
|
+
areaFillOpacity: areaOpacity,
|
|
1896
|
+
chart: chartType
|
|
1794
1897
|
} = options;
|
|
1795
1898
|
const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
|
|
1796
1899
|
const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
|
|
@@ -1807,13 +1910,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1807
1910
|
const yAxisMax = parseAxisValue(yAxisMaxRaw);
|
|
1808
1911
|
const y2AxisMin = parseAxisValue(y2AxisMinRaw);
|
|
1809
1912
|
const y2AxisMax = parseAxisValue(y2AxisMaxRaw);
|
|
1810
|
-
const
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
const yAxisMajorTickIntervalNum = parseTickInterval(yAxisMajorUnitFromSimpleXML, yAxisMajorTickInterval);
|
|
1816
|
-
const y2AxisMajorTickIntervalNum = parseTickInterval(
|
|
1913
|
+
const yAxisMajorTickIntervalNum = parseTickIntervalOption(
|
|
1914
|
+
yAxisMajorUnitFromSimpleXML,
|
|
1915
|
+
yAxisMajorTickInterval
|
|
1916
|
+
);
|
|
1917
|
+
const y2AxisMajorTickIntervalNum = parseTickIntervalOption(
|
|
1817
1918
|
y2AxisMajorUnitFromSimpleXML,
|
|
1818
1919
|
y2AxisMajorTickInterval
|
|
1819
1920
|
);
|
|
@@ -1822,6 +1923,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1822
1923
|
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
|
|
1823
1924
|
const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
|
|
1824
1925
|
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
|
|
1926
|
+
const areaOpacityForCanvas = getAreaOpacityForCanvas(areaOpacity);
|
|
1825
1927
|
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
1826
1928
|
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
1827
1929
|
const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
|
|
@@ -1852,26 +1954,40 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1852
1954
|
);
|
|
1853
1955
|
let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
|
|
1854
1956
|
xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
|
|
1855
|
-
const
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1957
|
+
const { yAxisTitle, y2AxisTitle } = getYAxisTitles({
|
|
1958
|
+
y2Enabled,
|
|
1959
|
+
yFields,
|
|
1960
|
+
y2Fields,
|
|
1961
|
+
overlayFields,
|
|
1962
|
+
yAxisTitleText,
|
|
1963
|
+
yAxisTitleVisibility,
|
|
1964
|
+
y2AxisTitleText,
|
|
1965
|
+
y2AxisTitleVisibility,
|
|
1966
|
+
containerHeight
|
|
1967
|
+
});
|
|
1861
1968
|
const xScaleConfig = (0, react_exports.useMemo)(
|
|
1862
1969
|
() => getXScaleConfig(xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation),
|
|
1863
1970
|
[xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation]
|
|
1864
1971
|
);
|
|
1972
|
+
const isStacked100 = stackMode === "stacked100";
|
|
1865
1973
|
const yScaleConfig = (0, react_exports.useMemo)(
|
|
1866
|
-
() =>
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1974
|
+
() => {
|
|
1975
|
+
const config2 = getYScaleConfig(
|
|
1976
|
+
yAxisTitle,
|
|
1977
|
+
yAxisAbbreviation,
|
|
1978
|
+
yAxisScale,
|
|
1979
|
+
yAxisLabelVisibility,
|
|
1980
|
+
yAxisMin,
|
|
1981
|
+
yAxisMax
|
|
1982
|
+
);
|
|
1983
|
+
if (isStacked100) {
|
|
1984
|
+
config2.y.tickFmt = (v) => `${Math.round(v * 100)}%`;
|
|
1985
|
+
config2.y.range = () => [0, 1];
|
|
1986
|
+
}
|
|
1987
|
+
return config2;
|
|
1988
|
+
},
|
|
1989
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1990
|
+
[yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax, isStacked100]
|
|
1875
1991
|
);
|
|
1876
1992
|
const y2ScaleConfig = (0, react_exports.useMemo)(() => {
|
|
1877
1993
|
if (y2Enabled) {
|
|
@@ -1903,10 +2019,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1903
2019
|
];
|
|
1904
2020
|
chartData.fields = filteredChartData.fields;
|
|
1905
2021
|
chartData.columns = seriesDataFormatted;
|
|
2022
|
+
const normalizedStackMode = stackMode === "stacked" || stackMode === "stacked100" ? stackMode : "auto";
|
|
1906
2023
|
const seriesOverrides = (0, react_exports.useMemo)(
|
|
1907
|
-
() => getSeriesOverrides(
|
|
1908
|
-
yFields,
|
|
1909
|
-
y2Fields,
|
|
2024
|
+
() => getSeriesOverrides({
|
|
2025
|
+
yfields: yFields,
|
|
2026
|
+
y2fields: y2Fields,
|
|
1910
2027
|
lineWidth,
|
|
1911
2028
|
overlayFields,
|
|
1912
2029
|
y2Enabled,
|
|
@@ -1915,8 +2032,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1915
2032
|
lineDashStyle,
|
|
1916
2033
|
lineDashStylesByField,
|
|
1917
2034
|
stepPosition,
|
|
1918
|
-
stepPositionsByField
|
|
1919
|
-
|
|
2035
|
+
stepPositionsByField,
|
|
2036
|
+
type: chartType,
|
|
2037
|
+
stackMode: normalizedStackMode,
|
|
2038
|
+
showLines
|
|
2039
|
+
}),
|
|
1920
2040
|
[
|
|
1921
2041
|
yFields,
|
|
1922
2042
|
y2Fields,
|
|
@@ -1928,7 +2048,10 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1928
2048
|
lineDashStyle,
|
|
1929
2049
|
lineDashStylesByField,
|
|
1930
2050
|
stepPosition,
|
|
1931
|
-
stepPositionsByField
|
|
2051
|
+
stepPositionsByField,
|
|
2052
|
+
chartType,
|
|
2053
|
+
normalizedStackMode,
|
|
2054
|
+
showLines
|
|
1932
2055
|
]
|
|
1933
2056
|
);
|
|
1934
2057
|
const chartingEventAnnotations = (0, react_exports.useMemo)(
|
|
@@ -1996,50 +2119,54 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1996
2119
|
react_exports.useEffect(() => {
|
|
1997
2120
|
additionalTooltipValuesRef.current = additionalTooltipValues;
|
|
1998
2121
|
}, [additionalTooltipValues]);
|
|
2122
|
+
const handleCrosshairMouseout = react_exports.useCallback(() => {
|
|
2123
|
+
if (onPointMouseOut && lastPayloadRef.current) {
|
|
2124
|
+
onPointMouseOut({
|
|
2125
|
+
type: "point.mouseout",
|
|
2126
|
+
originalEvent: lastOriginalEventRef.current,
|
|
2127
|
+
payload: lastPayloadRef.current
|
|
2128
|
+
});
|
|
2129
|
+
}
|
|
2130
|
+
previousMouseoverPayloadRef.current = null;
|
|
2131
|
+
}, [onPointMouseOut]);
|
|
1999
2132
|
const handleChartCrosshairChange = react_exports.useCallback(
|
|
2000
2133
|
(event) => {
|
|
2001
|
-
if (onPointMouseOver
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2134
|
+
if (!onPointMouseOver && !onPointMouseOut) {
|
|
2135
|
+
return;
|
|
2136
|
+
}
|
|
2137
|
+
if (!event) {
|
|
2138
|
+
handleCrosshairMouseout();
|
|
2139
|
+
return;
|
|
2140
|
+
}
|
|
2141
|
+
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
|
|
2142
|
+
name: event.seriesKey
|
|
2143
|
+
});
|
|
2144
|
+
delete payload.seriesKey;
|
|
2145
|
+
if (event.rowContext) {
|
|
2146
|
+
Object.assign(
|
|
2147
|
+
payload,
|
|
2148
|
+
Object.keys(event.rowContext).reduce((acc, fieldName) => {
|
|
2149
|
+
acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
|
|
2150
|
+
return acc;
|
|
2151
|
+
}, {})
|
|
2152
|
+
);
|
|
2153
|
+
}
|
|
2154
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
2155
|
+
if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
|
|
2156
|
+
return;
|
|
2157
|
+
}
|
|
2158
|
+
lastPayloadRef.current = updatedPayload;
|
|
2159
|
+
lastOriginalEventRef.current = event;
|
|
2160
|
+
previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
|
|
2161
|
+
if (onPointMouseOver) {
|
|
2162
|
+
onPointMouseOver({
|
|
2163
|
+
type: "point.mouseover",
|
|
2164
|
+
originalEvent: event,
|
|
2165
|
+
payload: updatedPayload
|
|
2015
2166
|
});
|
|
2016
|
-
delete payload.seriesKey;
|
|
2017
|
-
if (event.rowContext) {
|
|
2018
|
-
Object.assign(
|
|
2019
|
-
payload,
|
|
2020
|
-
Object.keys(event.rowContext).reduce((acc, fieldName) => {
|
|
2021
|
-
acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
|
|
2022
|
-
return acc;
|
|
2023
|
-
}, {})
|
|
2024
|
-
);
|
|
2025
|
-
}
|
|
2026
|
-
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
2027
|
-
if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
|
|
2028
|
-
return;
|
|
2029
|
-
}
|
|
2030
|
-
lastPayloadRef.current = updatedPayload;
|
|
2031
|
-
lastOriginalEventRef.current = event;
|
|
2032
|
-
previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
|
|
2033
|
-
if (onPointMouseOver) {
|
|
2034
|
-
onPointMouseOver({
|
|
2035
|
-
type: "point.mouseover",
|
|
2036
|
-
originalEvent: event,
|
|
2037
|
-
payload: updatedPayload
|
|
2038
|
-
});
|
|
2039
|
-
}
|
|
2040
2167
|
}
|
|
2041
2168
|
},
|
|
2042
|
-
[onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy]
|
|
2169
|
+
[onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy, handleCrosshairMouseout]
|
|
2043
2170
|
);
|
|
2044
2171
|
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}`;
|
|
2045
2172
|
const memoizedChart = (0, react_exports.useMemo)(() => {
|
|
@@ -2094,7 +2221,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2094
2221
|
showXAxisLine,
|
|
2095
2222
|
showYAxisLine,
|
|
2096
2223
|
showY2AxisLine,
|
|
2097
|
-
xAxisMaxLabelParts
|
|
2224
|
+
xAxisMaxLabelParts,
|
|
2225
|
+
areaOpacity: areaOpacityForCanvas
|
|
2098
2226
|
}
|
|
2099
2227
|
));
|
|
2100
2228
|
}, [
|
|
@@ -2146,7 +2274,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2146
2274
|
showYAxisLine,
|
|
2147
2275
|
showY2AxisLine,
|
|
2148
2276
|
legendMode,
|
|
2149
|
-
xAxisMaxLabelParts
|
|
2277
|
+
xAxisMaxLabelParts,
|
|
2278
|
+
areaOpacityForCanvas
|
|
2150
2279
|
]);
|
|
2151
2280
|
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
2152
2281
|
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
|
|
@@ -2174,6 +2303,37 @@ var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
|
|
|
2174
2303
|
|
|
2175
2304
|
// src/common/withDashboardViz.tsx
|
|
2176
2305
|
var SanitizedTimeSeriesChartWrapper = (0, SanitizeProps_exports.withSanitizedProps)(TimeSeriesChartWrapper_default);
|
|
2306
|
+
var buildEventCallbackProps = (supportedEvents, evaluatedOptionsToUse, onEventTrigger) => {
|
|
2307
|
+
const result = {};
|
|
2308
|
+
Object.keys(supportedEvents).forEach((eventName) => {
|
|
2309
|
+
const { parentKeys, payloadKeys } = supportedEvents[eventName];
|
|
2310
|
+
const eventCallbackPropName = (0, lodash_exports.camelCase)(`on.${eventName}`);
|
|
2311
|
+
let payload = {};
|
|
2312
|
+
if (Array.isArray(payloadKeys) && payloadKeys.length) {
|
|
2313
|
+
payloadKeys.forEach((p) => {
|
|
2314
|
+
payload[p] = evaluatedOptionsToUse[p];
|
|
2315
|
+
});
|
|
2316
|
+
}
|
|
2317
|
+
result[eventCallbackPropName] = (ev) => {
|
|
2318
|
+
if (ev == null ? void 0 : ev.payload) {
|
|
2319
|
+
payload = __spreadValues({}, ev.payload);
|
|
2320
|
+
}
|
|
2321
|
+
return onEventTrigger({
|
|
2322
|
+
originalEvent: ev,
|
|
2323
|
+
payload,
|
|
2324
|
+
type: eventName
|
|
2325
|
+
});
|
|
2326
|
+
};
|
|
2327
|
+
if (parentKeys) {
|
|
2328
|
+
for (let i = parentKeys.length - 1; i >= 0; i -= 1) {
|
|
2329
|
+
const newObject = {};
|
|
2330
|
+
newObject[parentKeys[i]] = result[eventCallbackPropName];
|
|
2331
|
+
result[eventCallbackPropName] = newObject;
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
});
|
|
2335
|
+
return result;
|
|
2336
|
+
};
|
|
2177
2337
|
var withDashboardViz = (opts) => {
|
|
2178
2338
|
const {
|
|
2179
2339
|
ReactViz,
|
|
@@ -2231,9 +2391,7 @@ var withDashboardViz = (opts) => {
|
|
|
2231
2391
|
const isDownsamplingEnabledByFeatureFlag = Boolean(
|
|
2232
2392
|
featureFlagContext == null ? void 0 : featureFlagContext.visualizations_enableDownsampling
|
|
2233
2393
|
);
|
|
2234
|
-
const isTrellisFeatureFlagOn = Boolean(
|
|
2235
|
-
featureFlagContext && featureFlagContext.visualizations_enableTrellis
|
|
2236
|
-
);
|
|
2394
|
+
const isTrellisFeatureFlagOn = Boolean(featureFlagContext == null ? void 0 : featureFlagContext.visualizations_enableTrellis);
|
|
2237
2395
|
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 */;
|
|
2238
2396
|
const isAcceleratedRenderFeatureFlagOn = Boolean(
|
|
2239
2397
|
featureFlagContext == null ? void 0 : featureFlagContext.visualizations_enableAcceleratedRender
|
|
@@ -2398,38 +2556,12 @@ var withDashboardViz = (opts) => {
|
|
|
2398
2556
|
}
|
|
2399
2557
|
);
|
|
2400
2558
|
}
|
|
2401
|
-
const eventCallbackProps = {};
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
let payload = {};
|
|
2408
|
-
if (Array.isArray(payloadKeys) && payloadKeys.length) {
|
|
2409
|
-
payloadKeys.forEach((p) => {
|
|
2410
|
-
payload[p] = evaluatedOptionsToUse[p];
|
|
2411
|
-
});
|
|
2412
|
-
}
|
|
2413
|
-
eventCallbackProps[eventCallbackPropName] = (ev) => {
|
|
2414
|
-
if (ev == null ? void 0 : ev.payload) {
|
|
2415
|
-
payload = __spreadValues({}, ev.payload);
|
|
2416
|
-
}
|
|
2417
|
-
return onEventTrigger({
|
|
2418
|
-
originalEvent: ev,
|
|
2419
|
-
payload,
|
|
2420
|
-
type: eventName
|
|
2421
|
-
});
|
|
2422
|
-
};
|
|
2423
|
-
if (parentKeys) {
|
|
2424
|
-
for (let i = parentKeys.length - 1; i >= 0; i -= 1) {
|
|
2425
|
-
const newObject = {};
|
|
2426
|
-
newObject[parentKeys[i]] = eventCallbackProps[eventCallbackPropName];
|
|
2427
|
-
eventCallbackProps[eventCallbackPropName] = newObject;
|
|
2428
|
-
}
|
|
2429
|
-
}
|
|
2430
|
-
});
|
|
2431
|
-
}
|
|
2432
|
-
const computedVizProps = computeVizProps2(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, props), evaluatedOptionsToUse), eventCallbackProps), {
|
|
2559
|
+
const eventCallbackProps = hasEventHandlers && mode === "view" && vizConfig.supports.includes("events" /* EVENTS */) ? buildEventCallbackProps(vizConfig.events, evaluatedOptionsToUse, onEventTrigger) : {};
|
|
2560
|
+
const computedVizProps = computeVizProps2(__spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues({}, props), evaluatedOptionsToUse), {
|
|
2561
|
+
// Align option transformation with the actual renderer selected below.
|
|
2562
|
+
// This prevents canvas-only option preservation from leaking into Highcharts mode.
|
|
2563
|
+
isAcceleratedRenderOn
|
|
2564
|
+
}), eventCallbackProps), {
|
|
2433
2565
|
themeFunc
|
|
2434
2566
|
}));
|
|
2435
2567
|
if (useAsyncEvaluatedOptions && Object.keys(evaluatedOptionsToUse).length === 0) {
|
|
@@ -2461,6 +2593,7 @@ var withDashboardViz_default = withDashboardViz;
|
|
|
2461
2593
|
// src/Image/ImageApi.ts
|
|
2462
2594
|
var ImageApi = class {
|
|
2463
2595
|
constructor(viz) {
|
|
2596
|
+
__publicField(this, "viz");
|
|
2464
2597
|
this.viz = viz;
|
|
2465
2598
|
}
|
|
2466
2599
|
/**
|