@splunk/visualizations 28.7.0 → 28.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Area.config.js +2 -4
- package/Area.config.js.map +2 -2
- package/Area.js +245 -147
- package/Area.js.map +4 -4
- package/Bar.config.js +2 -4
- package/Bar.config.js.map +2 -2
- package/Bar.js +246 -148
- package/Bar.js.map +4 -4
- package/Bubble/Bubble.d.ts +3 -1
- package/Bubble/Bubble.d.ts.map +1 -1
- package/Bubble.js +216 -108
- package/Bubble.js.map +4 -4
- package/CHANGELOG.external.md +56 -0
- package/ChoroplethSvg/ChoroplethSvg.d.ts +3 -1
- package/ChoroplethSvg/ChoroplethSvg.d.ts.map +1 -1
- package/ChoroplethSvg/PureChoroplethSvg/PureChoroplethSvg.d.ts.map +1 -1
- package/ChoroplethSvg/PureChoroplethSvg/SvgMutator.d.ts.map +1 -1
- package/ChoroplethSvg.js +638 -209
- package/ChoroplethSvg.js.map +4 -4
- package/Column.config.js +2 -4
- package/Column.config.js.map +2 -2
- package/Column.js +246 -148
- package/Column.js.map +4 -4
- package/Ellipse/Ellipse.d.ts +3 -1
- package/Ellipse/Ellipse.d.ts.map +1 -1
- package/Ellipse.js +216 -105
- package/Ellipse.js.map +4 -4
- package/Events/Events.d.ts +5 -3
- package/Events/Events.d.ts.map +1 -1
- package/Events/PureEvents/FieldSummaryTooltip.d.ts.map +1 -1
- package/Events/PureEvents/PureEvents.d.ts +0 -1
- package/Events/PureEvents/PureEvents.d.ts.map +1 -1
- package/Events.js +270 -157
- package/Events.js.map +4 -4
- package/FillerGauge.js +251 -143
- package/FillerGauge.js.map +4 -4
- package/Image/Image.d.ts +3 -1
- package/Image/Image.d.ts.map +1 -1
- package/Image.js +217 -106
- package/Image.js.map +4 -4
- package/Line.config.js +2 -4
- package/Line.config.js.map +2 -2
- package/Line.js +246 -148
- package/Line.js.map +4 -4
- package/LinkGraph/LinkGraph.d.ts +3 -1
- package/LinkGraph/LinkGraph.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/components/Node.d.ts.map +1 -1
- package/LinkGraph.config.js +1 -1
- package/LinkGraph.config.js.map +2 -2
- package/LinkGraph.js +802 -682
- package/LinkGraph.js.map +4 -4
- package/Map/Map.d.ts +10 -9
- package/Map/Map.d.ts.map +1 -1
- package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
- package/Map/PureMap/ClusterLayer.d.ts.map +1 -1
- package/Map/PureMap/MapUtils.d.ts.map +1 -1
- package/Map/PureMap/MarkerWrapper.d.ts.map +1 -1
- package/Map/PureMap/PureMap.d.ts +8 -65
- package/Map/PureMap/PureMap.d.ts.map +1 -1
- package/Map.config.js +1 -1
- package/Map.config.js.map +2 -2
- package/Map.js +363 -313
- package/Map.js.map +4 -4
- package/Markdown/Markdown.d.ts +9 -1
- package/Markdown/Markdown.d.ts.map +1 -1
- package/Markdown/config.d.ts.map +1 -1
- package/Markdown.config.js +6 -1
- package/Markdown.config.js.map +2 -2
- package/Markdown.js +226 -95
- package/Markdown.js.map +3 -3
- package/MarkerGauge.js +247 -137
- package/MarkerGauge.js.map +4 -4
- package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts +1 -0
- package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/components/Node.d.ts +1 -0
- package/NetworkGraph/PureNetworkGraph/components/Node.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts +3 -5
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -1
- package/NetworkGraph.config.js +4 -2
- package/NetworkGraph.config.js.map +2 -2
- package/NetworkGraph.js +327 -188
- package/NetworkGraph.js.map +4 -4
- package/ParallelCoordinates/ParallelCoordinates.d.ts +3 -1
- package/ParallelCoordinates/ParallelCoordinates.d.ts.map +1 -1
- package/ParallelCoordinates.js +239 -128
- package/ParallelCoordinates.js.map +4 -4
- package/Pie/config.d.ts.map +1 -1
- package/Pie/pieUtils.d.ts.map +1 -1
- package/Pie.config.js +4 -2
- package/Pie.config.js.map +2 -2
- package/Pie.js +228 -125
- package/Pie.js.map +3 -3
- package/ProcessTree/ProcessTree.d.ts +3 -1
- package/ProcessTree/ProcessTree.d.ts.map +1 -1
- package/ProcessTree/PureProcessTree/PureProcessTree.d.ts +1 -0
- package/ProcessTree/PureProcessTree/PureProcessTree.d.ts.map +1 -1
- package/ProcessTree/PureProcessTree/components/ProcessTreeLeftPanel.d.ts +1 -0
- package/ProcessTree/PureProcessTree/components/ProcessTreeLeftPanel.d.ts.map +1 -1
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts +2 -1
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts.map +1 -1
- package/ProcessTree/PureProcessTree/utils/iconLoader.d.ts +2 -0
- package/ProcessTree/PureProcessTree/utils/iconLoader.d.ts.map +1 -1
- package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts +5 -1
- package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts.map +1 -1
- package/ProcessTree.js +435 -192
- package/ProcessTree.js.map +4 -4
- package/Punchcard/Punchcard.d.ts +3 -1
- package/Punchcard/Punchcard.d.ts.map +1 -1
- package/Punchcard.js +238 -129
- package/Punchcard.js.map +4 -4
- package/Rectangle/Rectangle.d.ts +3 -1
- package/Rectangle/Rectangle.d.ts.map +1 -1
- package/Rectangle.js +218 -116
- package/Rectangle.js.map +4 -4
- package/RichText/PureRichText/Editor/EditorPanel.d.ts +1 -4
- package/RichText/PureRichText/Editor/EditorPanel.d.ts.map +1 -1
- package/RichText/PureRichText/Editor/hooks/useConfigPanelFocus.d.ts +14 -0
- package/RichText/PureRichText/Editor/hooks/useConfigPanelFocus.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/hooks/useEditorPanelSync.d.ts +15 -0
- package/RichText/PureRichText/Editor/hooks/useEditorPanelSync.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/hooks/useLinkHandlers.d.ts.map +1 -1
- package/RichText/PureRichText/Editor/hooks/usePortalTarget.d.ts +9 -0
- package/RichText/PureRichText/Editor/hooks/usePortalTarget.d.ts.map +1 -0
- package/RichText/PureRichText/InnerEditor.d.ts +20 -4
- package/RichText/PureRichText/InnerEditor.d.ts.map +1 -1
- package/RichText/PureRichText/PureRichText.d.ts +21 -9
- package/RichText/PureRichText/PureRichText.d.ts.map +1 -1
- package/RichText/PureRichText/PureRichTextContext.d.ts +3 -6
- package/RichText/PureRichText/PureRichTextContext.d.ts.map +1 -1
- package/RichText/PureRichText/RichTextStyles.d.ts +5 -4
- package/RichText/PureRichText/RichTextStyles.d.ts.map +1 -1
- package/RichText/PureRichText/activeInstance.d.ts +6 -7
- package/RichText/PureRichText/activeInstance.d.ts.map +1 -1
- package/RichText/PureRichText/config.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useContentSave.d.ts +6 -0
- package/RichText/PureRichText/hooks/useContentSave.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useContentSync.d.ts +13 -1
- package/RichText/PureRichText/hooks/useContentSync.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useDashboardKeyboardNav.d.ts +2 -7
- package/RichText/PureRichText/hooks/useDashboardKeyboardNav.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useEditorSetup.d.ts +8 -4
- package/RichText/PureRichText/hooks/useEditorSetup.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useFakeHighlight.d.ts +1 -16
- package/RichText/PureRichText/hooks/useFakeHighlight.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useFocusHandlers.d.ts +2 -4
- package/RichText/PureRichText/hooks/useFocusHandlers.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useKeyboardShortcuts.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useMouseHandlers.d.ts +3 -7
- package/RichText/PureRichText/hooks/useMouseHandlers.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useStepFontSize.d.ts +2 -2
- package/RichText/PureRichText/hooks/useStepLineSpacing.d.ts +2 -3
- package/RichText/PureRichText/hooks/useStepLineSpacing.d.ts.map +1 -1
- package/RichText/PureRichText/hooks/useTokenMap.d.ts +31 -40
- package/RichText/PureRichText/hooks/useTokenMap.d.ts.map +1 -1
- package/RichText/PureRichText/renderers/ElementRenderer.d.ts +2 -5
- package/RichText/PureRichText/renderers/ElementRenderer.d.ts.map +1 -1
- package/RichText/PureRichText/renderers/LeafRenderer.d.ts +0 -4
- package/RichText/PureRichText/renderers/LeafRenderer.d.ts.map +1 -1
- package/RichText/PureRichText/types.d.ts +21 -0
- package/RichText/PureRichText/types.d.ts.map +1 -1
- package/RichText/PureRichText/utils/slateUtils.d.ts +26 -2
- package/RichText/PureRichText/utils/slateUtils.d.ts.map +1 -1
- package/RichText/RichText.d.ts +5 -1
- package/RichText/RichText.d.ts.map +1 -1
- package/RichText/config.d.ts.map +1 -1
- package/RichText.config.js +19 -1
- package/RichText.config.js.map +2 -2
- package/RichText.js +2311 -835
- package/RichText.js.map +4 -4
- package/Sankey/PureSankey/PureSankey.d.ts +2 -0
- package/Sankey/PureSankey/PureSankey.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyLink.d.ts +3 -1
- package/Sankey/PureSankey/SankeyLink.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyNode.d.ts +5 -2
- package/Sankey/PureSankey/SankeyNode.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyUtils.d.ts.map +1 -1
- package/Sankey/Sankey.d.ts +3 -1
- package/Sankey/Sankey.d.ts.map +1 -1
- package/Sankey.js +508 -219
- package/Sankey.js.map +4 -4
- package/Scatter.config.js +3 -5
- package/Scatter.config.js.map +2 -2
- package/Scatter.js +244 -146
- package/Scatter.js.map +4 -4
- package/SingleValue/SingleValue.d.ts.map +1 -1
- package/SingleValue.js +273 -173
- package/SingleValue.js.map +4 -4
- package/SingleValueBasic.js +4 -4
- package/SingleValueBasic.js.map +2 -2
- package/SingleValueIcon/SingleValueIcon.d.ts.map +1 -1
- package/SingleValueIcon.js +264 -164
- package/SingleValueIcon.js.map +4 -4
- package/SingleValueRadial.js +267 -167
- package/SingleValueRadial.js.map +4 -4
- package/SparkLine/SparkLine.d.ts.map +1 -1
- package/SparkLine.js.map +2 -2
- package/Table/PureTable.d.ts +2 -0
- package/Table/PureTable.d.ts.map +1 -1
- package/Table/Table.d.ts +2 -5
- package/Table/Table.d.ts.map +1 -1
- package/Table/config.d.ts.map +1 -1
- package/Table/hooks.d.ts.map +1 -1
- package/Table.config.js +8 -1
- package/Table.config.js.map +2 -2
- package/Table.js +374 -270
- package/Table.js.map +4 -4
- package/Timeline/PureTimeline/PureTimeline.d.ts +6 -5
- package/Timeline/PureTimeline/PureTimeline.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/CursorPlugin.d.ts +1 -0
- package/Timeline/PureTimeline/src/CursorPlugin.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelineLegend.d.ts +10 -7
- package/Timeline/PureTimeline/src/TimelineLegend.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelineTooltip.d.ts +5 -1
- package/Timeline/PureTimeline/src/TimelineTooltip.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelineUplot.d.ts +19 -2
- package/Timeline/PureTimeline/src/TimelineUplot.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/XAxisPlugin.d.ts +1 -0
- package/Timeline/PureTimeline/src/XAxisPlugin.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +8 -0
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -1
- package/Timeline/Timeline.d.ts +3 -1
- package/Timeline/Timeline.d.ts.map +1 -1
- package/Timeline.config.js +2 -2
- package/Timeline.config.js.map +2 -2
- package/Timeline.js +713 -351
- package/Timeline.js.map +4 -4
- package/Treemap/PureTreemap/components/PureTreemap.d.ts +42 -0
- package/Treemap/PureTreemap/components/PureTreemap.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapBreadcrumb.d.ts +10 -0
- package/Treemap/PureTreemap/components/TreemapBreadcrumb.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapChildCell.d.ts +28 -0
- package/Treemap/PureTreemap/components/TreemapChildCell.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapHeader.d.ts +19 -0
- package/Treemap/PureTreemap/components/TreemapHeader.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapHoverTarget.d.ts +17 -0
- package/Treemap/PureTreemap/components/TreemapHoverTarget.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapLegend.d.ts +20 -0
- package/Treemap/PureTreemap/components/TreemapLegend.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapNode.d.ts +5 -0
- package/Treemap/PureTreemap/components/TreemapNode.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapParentNode.d.ts +10 -0
- package/Treemap/PureTreemap/components/TreemapParentNode.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapStandaloneNode.d.ts +6 -0
- package/Treemap/PureTreemap/components/TreemapStandaloneNode.d.ts.map +1 -0
- package/Treemap/PureTreemap/components/TreemapTooltip.d.ts +17 -0
- package/Treemap/PureTreemap/components/TreemapTooltip.d.ts.map +1 -0
- package/Treemap/PureTreemap/mockdata/data.d.ts +90 -0
- package/Treemap/PureTreemap/mockdata/data.d.ts.map +1 -0
- package/Treemap/PureTreemap/utils/treemapColorUtils.d.ts +67 -0
- package/Treemap/PureTreemap/utils/treemapColorUtils.d.ts.map +1 -0
- package/Treemap/PureTreemap/utils/treemapDataColorUtils.d.ts +5 -0
- package/Treemap/PureTreemap/utils/treemapDataColorUtils.d.ts.map +1 -0
- package/Treemap/PureTreemap/utils/treemapDataUtils.d.ts +14 -0
- package/Treemap/PureTreemap/utils/treemapDataUtils.d.ts.map +1 -0
- package/Treemap/PureTreemap/utils/treemapLayout.d.ts +49 -0
- package/Treemap/PureTreemap/utils/treemapLayout.d.ts.map +1 -0
- package/Treemap/PureTreemap/utils/treemapNodeUtils.d.ts +81 -0
- package/Treemap/PureTreemap/utils/treemapNodeUtils.d.ts.map +1 -0
- package/Treemap/PureTreemap/utils/treemapTypes.d.ts +37 -0
- package/Treemap/PureTreemap/utils/treemapTypes.d.ts.map +1 -0
- package/Treemap/PureTreemap/utils/treemapUtils.d.ts +76 -0
- package/Treemap/PureTreemap/utils/treemapUtils.d.ts.map +1 -0
- package/Treemap/Treemap.d.ts +14 -0
- package/Treemap/Treemap.d.ts.map +1 -0
- package/Treemap/config.d.ts +4 -0
- package/Treemap/config.d.ts.map +1 -0
- package/Treemap/index.d.ts +3 -0
- package/Treemap/index.d.ts.map +1 -0
- package/Treemap.config.js +465 -0
- package/Treemap.config.js.map +7 -0
- package/Treemap.js +6349 -0
- package/Treemap.js.map +7 -0
- package/common/Charting.js +8 -10
- package/common/Charting.js.map +2 -2
- package/common/ChartingApi.d.ts.map +1 -1
- package/common/ChartingApi.js +5 -2
- package/common/ChartingApi.js.map +2 -2
- package/common/DocExampleWithVizSandbox.js +3 -3
- package/common/DocExampleWithVizSandbox.js.map +2 -2
- package/common/GaugeMajorTicks.js.map +2 -2
- package/common/GaugeValueMarker.js +1 -0
- package/common/GaugeValueMarker.js.map +2 -2
- package/common/OptionsDoc.js +1 -1
- package/common/OptionsDoc.js.map +2 -2
- package/common/OverviewDoc.js +3 -3
- package/common/OverviewDoc.js.map +2 -2
- package/common/ThemesDoc.js.map +2 -2
- package/common/TimeSeriesChartWrapper.js +10 -9
- package/common/TimeSeriesChartWrapper.js.map +2 -2
- package/common/chartingUtils.d.ts.map +1 -1
- package/common/chartingUtils.js +12 -11
- package/common/chartingUtils.js.map +2 -2
- package/common/components/IconPlaceholder.d.ts.map +1 -1
- package/common/docUtils.d.ts.map +1 -1
- package/common/docUtils.js +16 -14
- package/common/docUtils.js.map +2 -2
- package/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -1
- package/common/gaugeUtils.d.ts.map +1 -1
- package/common/gaugeUtils.js +11 -5
- package/common/gaugeUtils.js.map +2 -2
- package/common/hocs/FixedSizeContainer.d.ts.map +1 -1
- package/common/hooks/useDynamicHeight.d.ts +67 -0
- package/common/hooks/useDynamicHeight.d.ts.map +1 -0
- package/common/hooks/useSorting.d.ts.map +1 -1
- package/common/interfaces/VizCategory.d.ts +2 -1
- package/common/interfaces/VizCategory.d.ts.map +1 -1
- package/common/interfaces/VizEvent.d.ts +7 -0
- package/common/interfaces/VizEvent.d.ts.map +1 -1
- package/common/utils/dataUtils.d.ts.map +1 -1
- package/common/utils/dataUtils.js +6 -10
- package/common/utils/dataUtils.js.map +2 -2
- package/common/utils/featureFlagUtils.js +2 -2
- package/common/utils/featureFlagUtils.js.map +2 -2
- package/common/utils/focusUtils.js +1 -1
- package/common/utils/focusUtils.js.map +2 -2
- package/common/utils/mapUtils.d.ts.map +1 -1
- package/common/utils/mapUtils.js +14 -18
- package/common/utils/mapUtils.js.map +2 -2
- package/common/utils/singleValueUtils.js +22 -25
- package/common/utils/singleValueUtils.js.map +2 -2
- package/common/utils/textUtils.d.ts.map +1 -1
- package/common/utils/textUtils.js +37 -23
- package/common/utils/textUtils.js.map +2 -2
- package/common/utils/trellisUtils.d.ts.map +1 -1
- package/common/utils/trellisUtils.js +18 -17
- package/common/utils/trellisUtils.js.map +2 -2
- package/common/utils/urlUtils.js.map +2 -2
- package/common/utils/visualizationTheme.d.ts +15 -0
- package/common/utils/visualizationTheme.d.ts.map +1 -0
- package/common/utils/visualizationTheme.js +72 -0
- package/common/utils/visualizationTheme.js.map +7 -0
- package/common/withDashboardViz.d.ts +3 -1
- package/common/withDashboardViz.d.ts.map +1 -1
- package/common/withDashboardViz.js +216 -105
- package/common/withDashboardViz.js.map +4 -4
- package/docs-llm/INDEX.md +1 -0
- package/docs-llm/area/options.md +84 -84
- package/docs-llm/bar/options.md +77 -77
- package/docs-llm/bubble/options.md +51 -51
- package/docs-llm/choropleth-svg/options.md +5 -5
- package/docs-llm/column/options.md +82 -82
- package/docs-llm/ellipse/options.md +6 -6
- package/docs-llm/events/options.md +6 -6
- package/docs-llm/filler-gauge/options.md +16 -16
- package/docs-llm/image/options.md +3 -3
- package/docs-llm/line/options.md +82 -82
- package/docs-llm/link-graph/options.md +16 -16
- package/docs-llm/map/options.md +12 -12
- package/docs-llm/markdown/options.md +7 -7
- package/docs-llm/marker-gauge/options.md +16 -16
- package/docs-llm/network-graph/options.md +39 -39
- package/docs-llm/parallel-coordinates/options.md +4 -4
- package/docs-llm/pie/examples-json.md +195 -0
- package/docs-llm/pie/examples-react.md +123 -0
- package/docs-llm/pie/options.md +23 -23
- package/docs-llm/process-tree/options.md +23 -22
- package/docs-llm/punchcard/options.md +23 -23
- package/docs-llm/pure-rich-text/options.md +6 -5
- package/docs-llm/rectangle/options.md +9 -9
- package/docs-llm/rich-text/options.md +6 -5
- package/docs-llm/sankey/options.md +9 -9
- package/docs-llm/scatter/options.md +57 -57
- package/docs-llm/single-value/options.md +39 -39
- package/docs-llm/single-value-icon/options.md +33 -33
- package/docs-llm/single-value-radial/options.md +31 -31
- package/docs-llm/table/options.md +14 -13
- package/docs-llm/timeline/options.md +17 -17
- package/docs-llm/treemap/examples-json.md +5 -0
- package/docs-llm/treemap/examples-react.md +5 -0
- package/docs-llm/treemap/options.md +26 -0
- package/docs-llm/treemap/overview.md +27 -0
- package/package.json +31 -30
package/Table.js
CHANGED
|
@@ -437,7 +437,7 @@ var themes = {
|
|
|
437
437
|
prisma: variables_default.contentColorInverted(props)
|
|
438
438
|
})(props)
|
|
439
439
|
};
|
|
440
|
-
var backgroundColorPaletteSet =
|
|
440
|
+
var backgroundColorPaletteSet = new Set(colorConstants_exports.COLOR_EDITOR_PALETTE);
|
|
441
441
|
var EDITOR_LABEL_WIDTH = 100;
|
|
442
442
|
var editorConfig = [
|
|
443
443
|
{
|
|
@@ -454,6 +454,13 @@ var editorConfig = [
|
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
456
|
],
|
|
457
|
+
[
|
|
458
|
+
{
|
|
459
|
+
label: (0, i18n_exports._)("Dynamic table height"),
|
|
460
|
+
option: "dynamicHeight",
|
|
461
|
+
editor: "editor.toggle"
|
|
462
|
+
}
|
|
463
|
+
],
|
|
457
464
|
[
|
|
458
465
|
{
|
|
459
466
|
label: (0, i18n_exports._)("Row numbers"),
|
|
@@ -1061,7 +1068,10 @@ var useSortingParams = ({ requestParams, onRequestParamsChange }) => {
|
|
|
1061
1068
|
onSort = (e, { sortKey, sortDir }) => {
|
|
1062
1069
|
if (typeof sortKey === "string") {
|
|
1063
1070
|
const nextSortDir = (0, lodash_exports.has)(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : "none";
|
|
1064
|
-
onRequestParamsChange(
|
|
1071
|
+
onRequestParamsChange(__spreadProps(__spreadValues({}, requestParams), {
|
|
1072
|
+
offset: 0,
|
|
1073
|
+
sort: { [sortKey]: nextSortDir }
|
|
1074
|
+
}));
|
|
1065
1075
|
} else {
|
|
1066
1076
|
onRequestParamsChange(requestParams);
|
|
1067
1077
|
}
|
|
@@ -1196,7 +1206,7 @@ var Cover = styled_components_default.div`
|
|
|
1196
1206
|
bottom: 0;
|
|
1197
1207
|
`;
|
|
1198
1208
|
var Blocker = styled_components_default.div.attrs({
|
|
1199
|
-
"data-splunk-visualization-version": "28.
|
|
1209
|
+
"data-splunk-visualization-version": "28.9.0 - 96b03188d"
|
|
1200
1210
|
})`
|
|
1201
1211
|
position: relative;
|
|
1202
1212
|
width: 100%;
|
|
@@ -1213,14 +1223,23 @@ var withEditModeCover = (Visualization, disableEditModeCover) => {
|
|
|
1213
1223
|
};
|
|
1214
1224
|
var withEditModeCover_default = withEditModeCover;
|
|
1215
1225
|
|
|
1226
|
+
// esm-externals:@splunk/themes
|
|
1227
|
+
var themes_exports = {};
|
|
1228
|
+
__export(themes_exports, {
|
|
1229
|
+
default: () => themes_default
|
|
1230
|
+
});
|
|
1231
|
+
var defaultImport30 = __toESM(require("@splunk/themes"));
|
|
1232
|
+
__reExport(themes_exports, require("@splunk/themes"));
|
|
1233
|
+
var themes_default = "default" in defaultImport30 ? defaultImport30.default : defaultImport30;
|
|
1234
|
+
|
|
1216
1235
|
// esm-externals:@splunk/visualizations-shared/style
|
|
1217
1236
|
var style_exports = {};
|
|
1218
1237
|
__export(style_exports, {
|
|
1219
1238
|
default: () => style_default
|
|
1220
1239
|
});
|
|
1221
|
-
var
|
|
1240
|
+
var defaultImport31 = __toESM(require("@splunk/visualizations-shared/style"));
|
|
1222
1241
|
__reExport(style_exports, require("@splunk/visualizations-shared/style"));
|
|
1223
|
-
var style_default = "default" in
|
|
1242
|
+
var style_default = "default" in defaultImport31 ? defaultImport31.default : defaultImport31;
|
|
1224
1243
|
|
|
1225
1244
|
// src/common/hocs/FixedSizeContainer.tsx
|
|
1226
1245
|
var Item = styled_components_default.div.attrs(({ width }) => ({
|
|
@@ -1277,7 +1296,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
1277
1296
|
FixSizeItem,
|
|
1278
1297
|
{
|
|
1279
1298
|
"data-test": "fix-size-item",
|
|
1280
|
-
"data-splunk-visualization-version": "28.
|
|
1299
|
+
"data-splunk-visualization-version": "28.9.0 - 96b03188d",
|
|
1281
1300
|
width,
|
|
1282
1301
|
height,
|
|
1283
1302
|
backgroundColor
|
|
@@ -1298,6 +1317,14 @@ var shouldShowIconPlaceholder = (dataSources, loading = false) => {
|
|
|
1298
1317
|
const noFields = fields === void 0;
|
|
1299
1318
|
return loading || noData || noFields;
|
|
1300
1319
|
};
|
|
1320
|
+
var PlaceholderContainer = styled_components_default.div`
|
|
1321
|
+
/* The inline token color wins when supported. Older browsers discard an
|
|
1322
|
+
unsupported oklch value and retain this inherited fallback instead. */
|
|
1323
|
+
color: ${(0, themes_exports.pick)({
|
|
1324
|
+
dark: "#fafafa",
|
|
1325
|
+
light: "#2c2c2c"
|
|
1326
|
+
})};
|
|
1327
|
+
`;
|
|
1301
1328
|
var IconPlaceholder = (props) => {
|
|
1302
1329
|
const {
|
|
1303
1330
|
width = SplunkVisualization_default.defaults.width,
|
|
@@ -1312,7 +1339,6 @@ var IconPlaceholder = (props) => {
|
|
|
1312
1339
|
style: {
|
|
1313
1340
|
left: "50%",
|
|
1314
1341
|
top: "50%",
|
|
1315
|
-
color: iconColor,
|
|
1316
1342
|
opacity: 0.15,
|
|
1317
1343
|
position: "absolute",
|
|
1318
1344
|
transform: "translate(-50%, -50%)"
|
|
@@ -1322,7 +1348,14 @@ var IconPlaceholder = (props) => {
|
|
|
1322
1348
|
"data-test": "icon-placeholder"
|
|
1323
1349
|
});
|
|
1324
1350
|
}
|
|
1325
|
-
return /* @__PURE__ */ react_exports.createElement(
|
|
1351
|
+
return /* @__PURE__ */ react_exports.createElement(
|
|
1352
|
+
PlaceholderContainer,
|
|
1353
|
+
{
|
|
1354
|
+
"data-test": "icon-placeholder-container",
|
|
1355
|
+
style: { width, height, background: backgroundColor, color: iconColor }
|
|
1356
|
+
},
|
|
1357
|
+
content
|
|
1358
|
+
);
|
|
1326
1359
|
};
|
|
1327
1360
|
var IconPlaceholder_default = FixedSizeContainer_default(IconPlaceholder);
|
|
1328
1361
|
|
|
@@ -1368,9 +1401,9 @@ var numberUtils_exports = {};
|
|
|
1368
1401
|
__export(numberUtils_exports, {
|
|
1369
1402
|
default: () => numberUtils_default
|
|
1370
1403
|
});
|
|
1371
|
-
var
|
|
1404
|
+
var defaultImport32 = __toESM(require("@splunk/visualizations-shared/numberUtils"));
|
|
1372
1405
|
__reExport(numberUtils_exports, require("@splunk/visualizations-shared/numberUtils"));
|
|
1373
|
-
var numberUtils_default = "default" in
|
|
1406
|
+
var numberUtils_default = "default" in defaultImport32 ? defaultImport32.default : defaultImport32;
|
|
1374
1407
|
|
|
1375
1408
|
// src/common/utils/dataUtils.ts
|
|
1376
1409
|
var getFieldName = (field) => typeof field === "string" ? field : field.name;
|
|
@@ -1396,7 +1429,7 @@ var largestTriangleThreeBuckets = (data, threshold, preferredDownsampleIndices)
|
|
|
1396
1429
|
let avgY = 0;
|
|
1397
1430
|
let avgRangeStart = Math.floor((i + 1) * every) + 1;
|
|
1398
1431
|
let avgRangeEnd = Math.floor((i + 2) * every) + 1;
|
|
1399
|
-
avgRangeEnd = avgRangeEnd
|
|
1432
|
+
avgRangeEnd = Math.min(avgRangeEnd, dataLength);
|
|
1400
1433
|
const avgRangeLength = avgRangeEnd - avgRangeStart;
|
|
1401
1434
|
for (; avgRangeStart < avgRangeEnd; avgRangeStart++) {
|
|
1402
1435
|
avgX += Number(data[avgRangeStart][0]);
|
|
@@ -1431,9 +1464,9 @@ var largestTriangleThreeBuckets = (data, threshold, preferredDownsampleIndices)
|
|
|
1431
1464
|
};
|
|
1432
1465
|
var strictlyCoerceYColumn = (column, options) => {
|
|
1433
1466
|
const isNullCoercionEnabled = options.nullValueDisplay === "zero";
|
|
1434
|
-
const canLooselyCoerceSomeValues = column.
|
|
1467
|
+
const canLooselyCoerceSomeValues = column.some(
|
|
1435
1468
|
(value) => (0, numberUtils_exports.startsWithNumber)(`${value}`) || isNullCoercionEnabled && value === null
|
|
1436
|
-
)
|
|
1469
|
+
);
|
|
1437
1470
|
const coercedColumn = [];
|
|
1438
1471
|
const canDownsampleColumn = !column.some((value) => {
|
|
1439
1472
|
const coercedValue = Number(value);
|
|
@@ -1452,7 +1485,7 @@ var strictlyCoerceYColumn = (column, options) => {
|
|
|
1452
1485
|
};
|
|
1453
1486
|
var strictlyCoerceXColumn = (column, fieldType) => {
|
|
1454
1487
|
if (fieldType === "number") {
|
|
1455
|
-
const coercedXColumn = column.map(
|
|
1488
|
+
const coercedXColumn = column.map(Number);
|
|
1456
1489
|
if (isColumnStrictlyIncreasing(coercedXColumn, fieldType)) {
|
|
1457
1490
|
return coercedXColumn;
|
|
1458
1491
|
}
|
|
@@ -1751,16 +1784,16 @@ var FeatureFlags_exports = {};
|
|
|
1751
1784
|
__export(FeatureFlags_exports, {
|
|
1752
1785
|
default: () => FeatureFlags_default
|
|
1753
1786
|
});
|
|
1754
|
-
var
|
|
1787
|
+
var defaultImport33 = __toESM(require("@splunk/visualization-context/FeatureFlags"));
|
|
1755
1788
|
__reExport(FeatureFlags_exports, require("@splunk/visualization-context/FeatureFlags"));
|
|
1756
|
-
var FeatureFlags_default = "default" in
|
|
1789
|
+
var FeatureFlags_default = "default" in defaultImport33 ? defaultImport33.default : defaultImport33;
|
|
1757
1790
|
|
|
1758
1791
|
// src/common/utils/featureFlagUtils.ts
|
|
1759
1792
|
var getFeatureFlag = (context, flagName) => {
|
|
1760
|
-
if (context && Object.keys(context).
|
|
1793
|
+
if (context && Object.keys(context).includes(flagName)) {
|
|
1761
1794
|
return context[flagName];
|
|
1762
1795
|
}
|
|
1763
|
-
if (Object.keys(FeatureFlags_default).
|
|
1796
|
+
if (Object.keys(FeatureFlags_default).includes(flagName)) {
|
|
1764
1797
|
return FeatureFlags_default[flagName];
|
|
1765
1798
|
}
|
|
1766
1799
|
return false;
|
|
@@ -1771,9 +1804,9 @@ var trellisUtils_exports = {};
|
|
|
1771
1804
|
__export(trellisUtils_exports, {
|
|
1772
1805
|
default: () => trellisUtils_default
|
|
1773
1806
|
});
|
|
1774
|
-
var
|
|
1807
|
+
var defaultImport34 = __toESM(require("@splunk/visualizations-shared/trellisUtils"));
|
|
1775
1808
|
__reExport(trellisUtils_exports, require("@splunk/visualizations-shared/trellisUtils"));
|
|
1776
|
-
var trellisUtils_default = "default" in
|
|
1809
|
+
var trellisUtils_default = "default" in defaultImport34 ? defaultImport34.default : defaultImport34;
|
|
1777
1810
|
|
|
1778
1811
|
// src/common/utils/trellisUtils.ts
|
|
1779
1812
|
var turnOffLegendDisplayWhenTrellisIsOn = (isTrellisOn, options) => {
|
|
@@ -1790,9 +1823,9 @@ var visualization_canvas_exports = {};
|
|
|
1790
1823
|
__export(visualization_canvas_exports, {
|
|
1791
1824
|
default: () => visualization_canvas_default
|
|
1792
1825
|
});
|
|
1793
|
-
var
|
|
1826
|
+
var defaultImport35 = __toESM(require("@splunk/visualization-canvas"));
|
|
1794
1827
|
__reExport(visualization_canvas_exports, require("@splunk/visualization-canvas"));
|
|
1795
|
-
var visualization_canvas_default = "default" in
|
|
1828
|
+
var visualization_canvas_default = "default" in defaultImport35 ? defaultImport35.default : defaultImport35;
|
|
1796
1829
|
|
|
1797
1830
|
// src/common/components/VizStyleWrapper.jsx
|
|
1798
1831
|
var VizStyleWrapper = styled_components_default.div.attrs(({ dataTestKey }) => ({
|
|
@@ -1814,27 +1847,27 @@ var Triangle_exports = {};
|
|
|
1814
1847
|
__export(Triangle_exports, {
|
|
1815
1848
|
default: () => Triangle_default
|
|
1816
1849
|
});
|
|
1817
|
-
var
|
|
1850
|
+
var defaultImport36 = __toESM(require("@splunk/react-icons/Triangle"));
|
|
1818
1851
|
__reExport(Triangle_exports, require("@splunk/react-icons/Triangle"));
|
|
1819
|
-
var Triangle_default = "default" in
|
|
1852
|
+
var Triangle_default = "default" in defaultImport36 ? defaultImport36.default : defaultImport36;
|
|
1820
1853
|
|
|
1821
1854
|
// esm-externals:@splunk/visualizations-shared/propUtils
|
|
1822
1855
|
var propUtils_exports = {};
|
|
1823
1856
|
__export(propUtils_exports, {
|
|
1824
1857
|
default: () => propUtils_default
|
|
1825
1858
|
});
|
|
1826
|
-
var
|
|
1859
|
+
var defaultImport37 = __toESM(require("@splunk/visualizations-shared/propUtils"));
|
|
1827
1860
|
__reExport(propUtils_exports, require("@splunk/visualizations-shared/propUtils"));
|
|
1828
|
-
var propUtils_default = "default" in
|
|
1861
|
+
var propUtils_default = "default" in defaultImport37 ? defaultImport37.default : defaultImport37;
|
|
1829
1862
|
|
|
1830
1863
|
// esm-externals:@splunk/visualizations-shared/simpleXMLOptions
|
|
1831
1864
|
var simpleXMLOptions_exports = {};
|
|
1832
1865
|
__export(simpleXMLOptions_exports, {
|
|
1833
1866
|
default: () => simpleXMLOptions_default
|
|
1834
1867
|
});
|
|
1835
|
-
var
|
|
1868
|
+
var defaultImport38 = __toESM(require("@splunk/visualizations-shared/simpleXMLOptions"));
|
|
1836
1869
|
__reExport(simpleXMLOptions_exports, require("@splunk/visualizations-shared/simpleXMLOptions"));
|
|
1837
|
-
var simpleXMLOptions_default = "default" in
|
|
1870
|
+
var simpleXMLOptions_default = "default" in defaultImport38 ? defaultImport38.default : defaultImport38;
|
|
1838
1871
|
|
|
1839
1872
|
// src/common/chartingUtils.ts
|
|
1840
1873
|
var DEFAULT_LINE_WIDTH = 2;
|
|
@@ -1873,9 +1906,9 @@ var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
|
|
|
1873
1906
|
const xAxisIsTime = xField === "_time";
|
|
1874
1907
|
return !!rangeSelectEventHandler && xAxisIsTime;
|
|
1875
1908
|
};
|
|
1876
|
-
var canvasSupportedTimeSeriesCharts = ["splunk.line", "splunk.area"];
|
|
1909
|
+
var canvasSupportedTimeSeriesCharts = /* @__PURE__ */ new Set(["splunk.line", "splunk.area"]);
|
|
1877
1910
|
var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
|
|
1878
|
-
return canvasSupportedTimeSeriesCharts.
|
|
1911
|
+
return canvasSupportedTimeSeriesCharts.has(vizConfigKey);
|
|
1879
1912
|
};
|
|
1880
1913
|
var filterChartDataFromInternalFields = (chartData) => {
|
|
1881
1914
|
const { fields, columns } = chartData;
|
|
@@ -1891,7 +1924,7 @@ var filterChartDataFromInternalFields = (chartData) => {
|
|
|
1891
1924
|
return { fields: filteredFields, columns: filteredColumns };
|
|
1892
1925
|
};
|
|
1893
1926
|
var convert2DArrayToNumbers = (arr) => {
|
|
1894
|
-
return arr.map((subArray) => subArray.map((element) => parseFloat(element)));
|
|
1927
|
+
return arr.map((subArray) => subArray.map((element) => Number.parseFloat(element)));
|
|
1895
1928
|
};
|
|
1896
1929
|
var parseAxisValue = (val) => {
|
|
1897
1930
|
if (val === void 0 || val === null || val === "auto" || val === "") {
|
|
@@ -1929,6 +1962,7 @@ var getLegend = (props) => {
|
|
|
1929
1962
|
return (0, visualization_canvas_exports.TopLegendFactory)(__spreadValues({
|
|
1930
1963
|
wrap: true
|
|
1931
1964
|
}, commonLegendProps));
|
|
1965
|
+
// Note: By default, use right legend
|
|
1932
1966
|
default:
|
|
1933
1967
|
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
1934
1968
|
}
|
|
@@ -2061,10 +2095,10 @@ var getSeriesOverrides = (opts) => {
|
|
|
2061
2095
|
let spanGaps;
|
|
2062
2096
|
if (nullValueMode === "gaps") {
|
|
2063
2097
|
spanGaps = false;
|
|
2064
|
-
} else if (nullValueMode
|
|
2065
|
-
spanGaps = true;
|
|
2066
|
-
} else {
|
|
2098
|
+
} else if (nullValueMode == null) {
|
|
2067
2099
|
spanGaps = void 0;
|
|
2100
|
+
} else {
|
|
2101
|
+
spanGaps = true;
|
|
2068
2102
|
}
|
|
2069
2103
|
const replaceNullsWithZero = nullValueMode === "zero" ? true : void 0;
|
|
2070
2104
|
const isAreaChart = type === "area";
|
|
@@ -2495,11 +2529,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2495
2529
|
y2AxisMajorUnitFromSimpleXML,
|
|
2496
2530
|
y2AxisMajorTickInterval
|
|
2497
2531
|
);
|
|
2498
|
-
const xAxisMajorTickSizeNum = xAxisMajorTickSize
|
|
2499
|
-
const yAxisMajorTickSizeNum = yAxisMajorTickSize
|
|
2500
|
-
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize
|
|
2501
|
-
const yAxisMinorTickSizeNum = yAxisMinorTickSize
|
|
2502
|
-
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize
|
|
2532
|
+
const xAxisMajorTickSizeNum = xAxisMajorTickSize == null ? void 0 : Number(xAxisMajorTickSize);
|
|
2533
|
+
const yAxisMajorTickSizeNum = yAxisMajorTickSize == null ? void 0 : Number(yAxisMajorTickSize);
|
|
2534
|
+
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize == null ? void 0 : Number(y2AxisMajorTickSize);
|
|
2535
|
+
const yAxisMinorTickSizeNum = yAxisMinorTickSize == null ? void 0 : Number(yAxisMinorTickSize);
|
|
2536
|
+
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize == null ? void 0 : Number(y2AxisMinorTickSize);
|
|
2503
2537
|
const areaOpacityForCanvas = getAreaOpacityForCanvas(areaOpacity);
|
|
2504
2538
|
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
2505
2539
|
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
@@ -2911,6 +2945,76 @@ var buildEventCallbackProps = (supportedEvents, evaluatedOptionsToUse, onEventTr
|
|
|
2911
2945
|
});
|
|
2912
2946
|
return result;
|
|
2913
2947
|
};
|
|
2948
|
+
var buildAllEventCallbackProps = (events, evaluatedOptionsToUse, onEventTrigger, { supportsEvents, hasEventHandlers, mode }) => {
|
|
2949
|
+
if (!supportsEvents) return {};
|
|
2950
|
+
const defaultEvents = {};
|
|
2951
|
+
const userEvents = {};
|
|
2952
|
+
Object.entries(events || {}).forEach(([eventKey, eventConfig]) => {
|
|
2953
|
+
(eventConfig.source === "default" ? defaultEvents : userEvents)[eventKey] = eventConfig;
|
|
2954
|
+
});
|
|
2955
|
+
const userProps = hasEventHandlers && mode === "view" ? buildEventCallbackProps(userEvents, evaluatedOptionsToUse, onEventTrigger) : {};
|
|
2956
|
+
return __spreadValues(__spreadValues({}, userProps), buildEventCallbackProps(defaultEvents, evaluatedOptionsToUse, onEventTrigger));
|
|
2957
|
+
};
|
|
2958
|
+
var applyContextTimezone = (localeContext) => {
|
|
2959
|
+
if (localeContext.serializedTimezone && !moment_default.getDefaultSplunkTimezone()) {
|
|
2960
|
+
moment_default.setDefaultSplunkTimezone(localeContext.serializedTimezone);
|
|
2961
|
+
}
|
|
2962
|
+
};
|
|
2963
|
+
var getAsyncOptionsEvaluationParams = ({
|
|
2964
|
+
visualizationID,
|
|
2965
|
+
props,
|
|
2966
|
+
optionsToEvaluate,
|
|
2967
|
+
downsampledDataSources,
|
|
2968
|
+
vizConfig,
|
|
2969
|
+
bypassCloneDeepOptionScope,
|
|
2970
|
+
lazyLoadingDataFrame
|
|
2971
|
+
}) => {
|
|
2972
|
+
return {
|
|
2973
|
+
visualizationID,
|
|
2974
|
+
props,
|
|
2975
|
+
options: __spreadValues({}, optionsToEvaluate),
|
|
2976
|
+
dataSources: downsampledDataSources,
|
|
2977
|
+
theme: vizConfig.themes,
|
|
2978
|
+
bypassCloneDeepOptionScope,
|
|
2979
|
+
lazyLoadingDataFrame
|
|
2980
|
+
};
|
|
2981
|
+
};
|
|
2982
|
+
var evaluateOptionsSync = ({
|
|
2983
|
+
optionsToEvaluate,
|
|
2984
|
+
downsampledDataSources,
|
|
2985
|
+
dataSourcesInState,
|
|
2986
|
+
dataFramesInState,
|
|
2987
|
+
setDataSourcesInState,
|
|
2988
|
+
setDataFramesInState,
|
|
2989
|
+
computeDataFrames,
|
|
2990
|
+
featureFlagContext,
|
|
2991
|
+
themeFunc
|
|
2992
|
+
}) => {
|
|
2993
|
+
let dataFrames = dataFramesInState;
|
|
2994
|
+
if (downsampledDataSources !== dataSourcesInState) {
|
|
2995
|
+
setDataSourcesInState(downsampledDataSources);
|
|
2996
|
+
dataFrames = Options_exports.Options.dataFrameFromDataSource(
|
|
2997
|
+
downsampledDataSources,
|
|
2998
|
+
getFeatureFlag(featureFlagContext, "visualizations_lazyLoadingDataFrame")
|
|
2999
|
+
);
|
|
3000
|
+
setDataFramesInState(dataFrames);
|
|
3001
|
+
}
|
|
3002
|
+
let mergedFrames = dataFrames;
|
|
3003
|
+
if (computeDataFrames && dataFrames) {
|
|
3004
|
+
const derivedFrames = computeDataFrames({
|
|
3005
|
+
dataSources: downsampledDataSources,
|
|
3006
|
+
options: optionsToEvaluate.options
|
|
3007
|
+
});
|
|
3008
|
+
mergedFrames = __spreadValues(__spreadValues({}, dataFrames), derivedFrames);
|
|
3009
|
+
}
|
|
3010
|
+
return Options_exports.Options.evaluate(
|
|
3011
|
+
optionsToEvaluate,
|
|
3012
|
+
downsampledDataSources,
|
|
3013
|
+
themeFunc,
|
|
3014
|
+
mergedFrames,
|
|
3015
|
+
getFeatureFlag(featureFlagContext, "visualizations_bypassCloneDeepOptionScope")
|
|
3016
|
+
);
|
|
3017
|
+
};
|
|
2914
3018
|
var withDashboardViz = (opts) => {
|
|
2915
3019
|
const {
|
|
2916
3020
|
ReactViz,
|
|
@@ -2942,11 +3046,7 @@ var withDashboardViz = (opts) => {
|
|
|
2942
3046
|
onRequestParamsChange = lodash_exports.noop
|
|
2943
3047
|
} = props;
|
|
2944
3048
|
const localeContext = react_exports.useContext(TimezoneContext_default);
|
|
2945
|
-
|
|
2946
|
-
if (!moment_default.getDefaultSplunkTimezone()) {
|
|
2947
|
-
moment_default.setDefaultSplunkTimezone(localeContext.serializedTimezone);
|
|
2948
|
-
}
|
|
2949
|
-
}
|
|
3049
|
+
applyContextTimezone(localeContext);
|
|
2950
3050
|
const themeFunc = (themeVar) => {
|
|
2951
3051
|
var _a2, _b;
|
|
2952
3052
|
return (_b = (_a2 = vizConfig.themes)[themeVar]) == null ? void 0 : _b.call(_a2, props);
|
|
@@ -2974,7 +3074,12 @@ var withDashboardViz = (opts) => {
|
|
|
2974
3074
|
featureFlagContext == null ? void 0 : featureFlagContext.visualizations_enableAcceleratedRender
|
|
2975
3075
|
);
|
|
2976
3076
|
const isAcceleratedRenderOn = isAcceleratedRenderFeatureFlagOn && isTimeSeriesCanvasRenderSupported(vizConfig.key) && (options == null ? void 0 : options.acceleratedRender) === true;
|
|
2977
|
-
const
|
|
3077
|
+
const bypassCloneDeepOptionScope = Boolean(
|
|
3078
|
+
getFeatureFlag(featureFlagContext, "visualizations_bypassCloneDeepOptionScope")
|
|
3079
|
+
);
|
|
3080
|
+
const lazyLoadingDataFrame = Boolean(
|
|
3081
|
+
getFeatureFlag(featureFlagContext, "visualizations_lazyLoadingDataFrame")
|
|
3082
|
+
);
|
|
2978
3083
|
const optionsToEvaluate = react_exports.useMemo(() => {
|
|
2979
3084
|
var _a2;
|
|
2980
3085
|
const legendDisplay = turnOffLegendDisplayWhenTrellisIsOn(isTrellisOn, options);
|
|
@@ -3013,63 +3118,74 @@ var withDashboardViz = (opts) => {
|
|
|
3013
3118
|
threshold,
|
|
3014
3119
|
isDownsamplingEnabled
|
|
3015
3120
|
});
|
|
3016
|
-
|
|
3121
|
+
const asyncOptionsEvaluationParams = useDeepMemo(
|
|
3122
|
+
() => getAsyncOptionsEvaluationParams({
|
|
3123
|
+
visualizationID,
|
|
3124
|
+
props,
|
|
3125
|
+
optionsToEvaluate,
|
|
3126
|
+
downsampledDataSources,
|
|
3127
|
+
vizConfig,
|
|
3128
|
+
bypassCloneDeepOptionScope,
|
|
3129
|
+
lazyLoadingDataFrame
|
|
3130
|
+
}),
|
|
3131
|
+
[
|
|
3132
|
+
visualizationID,
|
|
3133
|
+
optionsToEvaluate,
|
|
3134
|
+
downsampledDataSources,
|
|
3135
|
+
vizConfig,
|
|
3136
|
+
bypassCloneDeepOptionScope,
|
|
3137
|
+
lazyLoadingDataFrame,
|
|
3138
|
+
currentThemeFamily,
|
|
3139
|
+
currentThemeColorScheme,
|
|
3140
|
+
currentThemeDensity,
|
|
3141
|
+
localeContext.serializedTimezone
|
|
3142
|
+
]
|
|
3143
|
+
);
|
|
3144
|
+
react_exports.useEffect(() => {
|
|
3145
|
+
if (!useAsyncEvaluatedOptions) {
|
|
3146
|
+
return void 0;
|
|
3147
|
+
}
|
|
3148
|
+
let ownsEvaluation = true;
|
|
3017
3149
|
try {
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
visualizationID,
|
|
3021
|
-
props,
|
|
3022
|
-
options: optionsToEvaluate,
|
|
3023
|
-
dataSources: downsampledDataSources,
|
|
3024
|
-
theme: vizConfig.themes,
|
|
3025
|
-
bypassCloneDeepOptionScope: Boolean(
|
|
3026
|
-
getFeatureFlag(featureFlagContext, "visualizations_bypassCloneDeepOptionScope")
|
|
3027
|
-
),
|
|
3028
|
-
lazyLoadingDataFrame: Boolean(
|
|
3029
|
-
getFeatureFlag(featureFlagContext, "visualizations_lazyLoadingDataFrame")
|
|
3030
|
-
)
|
|
3031
|
-
};
|
|
3032
|
-
async_dynamic_options_evaluator_default.evaluate(asyncDynamicOptionsEvaluatorParams).then((results) => {
|
|
3150
|
+
async_dynamic_options_evaluator_default.evaluate(asyncOptionsEvaluationParams).then((results) => {
|
|
3151
|
+
if (ownsEvaluation) {
|
|
3033
3152
|
setEvaluatedOptionsAsync(results.results);
|
|
3034
|
-
}).catch(() => {
|
|
3035
|
-
if (isMounted.current) {
|
|
3036
|
-
setUseAsyncEvaluatedOptions(false);
|
|
3037
|
-
}
|
|
3038
|
-
});
|
|
3039
|
-
} else {
|
|
3040
|
-
let dataFrames = dataFramesInState;
|
|
3041
|
-
if (downsampledDataSources !== dataSourcesInState) {
|
|
3042
|
-
setDataSourcesInState(downsampledDataSources);
|
|
3043
|
-
dataFrames = Options_exports.Options.dataFrameFromDataSource(
|
|
3044
|
-
downsampledDataSources,
|
|
3045
|
-
getFeatureFlag(featureFlagContext, "visualizations_lazyLoadingDataFrame")
|
|
3046
|
-
);
|
|
3047
|
-
setDataFramesInState(dataFrames);
|
|
3048
3153
|
}
|
|
3049
|
-
|
|
3050
|
-
if (
|
|
3051
|
-
|
|
3052
|
-
dataSources: downsampledDataSources,
|
|
3053
|
-
options: optionsToEvaluate.options
|
|
3054
|
-
});
|
|
3055
|
-
mergedFrames = __spreadValues(__spreadValues({}, dataFrames), derivedFrames);
|
|
3154
|
+
}).catch(() => {
|
|
3155
|
+
if (ownsEvaluation) {
|
|
3156
|
+
setUseAsyncEvaluatedOptions(false);
|
|
3056
3157
|
}
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3158
|
+
});
|
|
3159
|
+
} catch (e) {
|
|
3160
|
+
setUseAsyncEvaluatedOptions(false);
|
|
3161
|
+
}
|
|
3162
|
+
return () => {
|
|
3163
|
+
ownsEvaluation = false;
|
|
3164
|
+
async_dynamic_options_evaluator_default.reset(visualizationID);
|
|
3165
|
+
};
|
|
3166
|
+
}, [asyncOptionsEvaluationParams, useAsyncEvaluatedOptions, visualizationID]);
|
|
3167
|
+
evaluatedOptions = useDeepMemo(() => {
|
|
3168
|
+
try {
|
|
3169
|
+
if (useAsyncEvaluatedOptions) {
|
|
3170
|
+
return {};
|
|
3065
3171
|
}
|
|
3172
|
+
return evaluateOptionsSync({
|
|
3173
|
+
optionsToEvaluate,
|
|
3174
|
+
downsampledDataSources,
|
|
3175
|
+
dataSourcesInState,
|
|
3176
|
+
dataFramesInState,
|
|
3177
|
+
setDataSourcesInState,
|
|
3178
|
+
setDataFramesInState,
|
|
3179
|
+
computeDataFrames,
|
|
3180
|
+
featureFlagContext,
|
|
3181
|
+
themeFunc
|
|
3182
|
+
});
|
|
3066
3183
|
} catch (e) {
|
|
3067
3184
|
if (e instanceof Error) {
|
|
3068
3185
|
console.error(`unexpected error evaluating options: ${e.message}`);
|
|
3069
3186
|
}
|
|
3070
3187
|
return {};
|
|
3071
3188
|
}
|
|
3072
|
-
return {};
|
|
3073
3189
|
}, [
|
|
3074
3190
|
currentThemeFamily,
|
|
3075
3191
|
currentThemeColorScheme,
|
|
@@ -3079,7 +3195,7 @@ var withDashboardViz = (opts) => {
|
|
|
3079
3195
|
localeContext.serializedTimezone,
|
|
3080
3196
|
useAsyncEvaluatedOptions
|
|
3081
3197
|
]);
|
|
3082
|
-
const evaluatedOptionsToUse =
|
|
3198
|
+
const evaluatedOptionsToUse = useAsyncEvaluatedOptions ? evaluatedOptionsAsync : evaluatedOptions;
|
|
3083
3199
|
let dataSourceMetadata = {};
|
|
3084
3200
|
const OptionKey = "paginateDataSourceKey";
|
|
3085
3201
|
const optsKey = (0, lodash_exports.has)(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey];
|
|
@@ -3101,7 +3217,7 @@ var withDashboardViz = (opts) => {
|
|
|
3101
3217
|
sortParams,
|
|
3102
3218
|
paginatorParams
|
|
3103
3219
|
};
|
|
3104
|
-
if (vizConfig.supports.
|
|
3220
|
+
if (!vizConfig.supports.includes("page-and-sort" /* PAGE_AND_SORT */) && !(0, lodash_exports.has)(dataSources, paginateDataSourceKey)) {
|
|
3105
3221
|
dataSourceMetadata = {};
|
|
3106
3222
|
}
|
|
3107
3223
|
const clonedEvaluatedOptions = __spreadValues({}, evaluatedOptionsToUse);
|
|
@@ -3111,14 +3227,6 @@ var withDashboardViz = (opts) => {
|
|
|
3111
3227
|
react_exports.useEffect(() => {
|
|
3112
3228
|
onComputedProps(clonedEvaluatedOptions);
|
|
3113
3229
|
});
|
|
3114
|
-
react_exports.useEffect(() => {
|
|
3115
|
-
return () => {
|
|
3116
|
-
if (useAsyncEvaluatedOptions) {
|
|
3117
|
-
isMounted.current = false;
|
|
3118
|
-
async_dynamic_options_evaluator_default.reset(visualizationID);
|
|
3119
|
-
}
|
|
3120
|
-
};
|
|
3121
|
-
}, []);
|
|
3122
3230
|
const { requiredProps = [], supports } = vizConfig;
|
|
3123
3231
|
const missing = missingKeys(requiredProps, evaluatedOptionsToUse);
|
|
3124
3232
|
if (missing.length > 0 && supports.includes("placeholder" /* PLACEHOLDER */) && vizConfig.key !== "splunk.singlevalue") {
|
|
@@ -3133,7 +3241,16 @@ var withDashboardViz = (opts) => {
|
|
|
3133
3241
|
}
|
|
3134
3242
|
);
|
|
3135
3243
|
}
|
|
3136
|
-
const eventCallbackProps =
|
|
3244
|
+
const eventCallbackProps = buildAllEventCallbackProps(
|
|
3245
|
+
vizConfig.events,
|
|
3246
|
+
evaluatedOptionsToUse,
|
|
3247
|
+
onEventTrigger,
|
|
3248
|
+
{
|
|
3249
|
+
supportsEvents: vizConfig.supports.includes("events" /* EVENTS */),
|
|
3250
|
+
hasEventHandlers,
|
|
3251
|
+
mode
|
|
3252
|
+
}
|
|
3253
|
+
);
|
|
3137
3254
|
const computedVizProps = computeVizProps2(__spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues({}, props), evaluatedOptionsToUse), {
|
|
3138
3255
|
// Align option transformation with the actual renderer selected below.
|
|
3139
3256
|
// This prevents canvas-only option preservation from leaking into Highcharts mode.
|
|
@@ -3161,8 +3278,9 @@ var withDashboardViz = (opts) => {
|
|
|
3161
3278
|
onEventTrigger: SplunkVisualization_default.defaults.onEventTrigger
|
|
3162
3279
|
});
|
|
3163
3280
|
DashboardViz.config = vizConfig;
|
|
3164
|
-
return
|
|
3165
|
-
withPlaceholder_default(withEditModeCover_default(DashboardViz, disableEditModeCover), useIconPlaceholder)
|
|
3281
|
+
return Object.assign(
|
|
3282
|
+
(0, styled_components_exports.withTheme)(withPlaceholder_default(withEditModeCover_default(DashboardViz, disableEditModeCover), useIconPlaceholder)),
|
|
3283
|
+
{ config: vizConfig }
|
|
3166
3284
|
);
|
|
3167
3285
|
};
|
|
3168
3286
|
var withDashboardViz_default = withDashboardViz;
|
|
@@ -3172,45 +3290,45 @@ var debounce_exports = {};
|
|
|
3172
3290
|
__export(debounce_exports, {
|
|
3173
3291
|
default: () => debounce_default
|
|
3174
3292
|
});
|
|
3175
|
-
var
|
|
3293
|
+
var defaultImport39 = __toESM(require("lodash/debounce"));
|
|
3176
3294
|
__reExport(debounce_exports, require("lodash/debounce"));
|
|
3177
|
-
var debounce_default = "default" in
|
|
3295
|
+
var debounce_default = "default" in defaultImport39 ? defaultImport39.default : defaultImport39;
|
|
3178
3296
|
|
|
3179
3297
|
// esm-externals:@splunk/react-ui/Table
|
|
3180
3298
|
var Table_exports = {};
|
|
3181
3299
|
__export(Table_exports, {
|
|
3182
3300
|
default: () => Table_default
|
|
3183
3301
|
});
|
|
3184
|
-
var
|
|
3302
|
+
var defaultImport40 = __toESM(require("@splunk/react-ui/Table"));
|
|
3185
3303
|
__reExport(Table_exports, require("@splunk/react-ui/Table"));
|
|
3186
|
-
var Table_default = "default" in
|
|
3304
|
+
var Table_default = "default" in defaultImport40 ? defaultImport40.default : defaultImport40;
|
|
3187
3305
|
|
|
3188
3306
|
// esm-externals:@splunk/react-ui/Paginator
|
|
3189
3307
|
var Paginator_exports = {};
|
|
3190
3308
|
__export(Paginator_exports, {
|
|
3191
3309
|
default: () => Paginator_default
|
|
3192
3310
|
});
|
|
3193
|
-
var
|
|
3311
|
+
var defaultImport41 = __toESM(require("@splunk/react-ui/Paginator"));
|
|
3194
3312
|
__reExport(Paginator_exports, require("@splunk/react-ui/Paginator"));
|
|
3195
|
-
var Paginator_default = "default" in
|
|
3313
|
+
var Paginator_default = "default" in defaultImport41 ? defaultImport41.default : defaultImport41;
|
|
3196
3314
|
|
|
3197
3315
|
// esm-externals:@splunk/react-ui/Message
|
|
3198
3316
|
var Message_exports2 = {};
|
|
3199
3317
|
__export(Message_exports2, {
|
|
3200
3318
|
default: () => Message_default2
|
|
3201
3319
|
});
|
|
3202
|
-
var
|
|
3320
|
+
var defaultImport42 = __toESM(require("@splunk/react-ui/Message"));
|
|
3203
3321
|
__reExport(Message_exports2, require("@splunk/react-ui/Message"));
|
|
3204
|
-
var Message_default2 = "default" in
|
|
3322
|
+
var Message_default2 = "default" in defaultImport42 ? defaultImport42.default : defaultImport42;
|
|
3205
3323
|
|
|
3206
3324
|
// esm-externals:@splunk/react-ui/JSONTree
|
|
3207
3325
|
var JSONTree_exports = {};
|
|
3208
3326
|
__export(JSONTree_exports, {
|
|
3209
3327
|
default: () => JSONTree_default
|
|
3210
3328
|
});
|
|
3211
|
-
var
|
|
3329
|
+
var defaultImport43 = __toESM(require("@splunk/react-ui/JSONTree"));
|
|
3212
3330
|
__reExport(JSONTree_exports, require("@splunk/react-ui/JSONTree"));
|
|
3213
|
-
var JSONTree_default = "default" in
|
|
3331
|
+
var JSONTree_default = "default" in defaultImport43 ? defaultImport43.default : defaultImport43;
|
|
3214
3332
|
|
|
3215
3333
|
// src/Table/hooks.tsx
|
|
3216
3334
|
var isArray2 = (v) => Array.isArray(v);
|
|
@@ -3256,7 +3374,7 @@ var generateHeader = (value, columnId, i, columnFormat, tableFormat, showInterna
|
|
|
3256
3374
|
sortKey: value,
|
|
3257
3375
|
showCell: true
|
|
3258
3376
|
};
|
|
3259
|
-
if (!showInternalFields && value.
|
|
3377
|
+
if (!showInternalFields && value.startsWith("_") && value !== "_time") {
|
|
3260
3378
|
ret.showCell = false;
|
|
3261
3379
|
}
|
|
3262
3380
|
const headerAlign = getColumnFormatHeaderAlign(columnFormat, columnId, value) || getTableFormatHeaderAlign(tableFormat) || "left";
|
|
@@ -3280,7 +3398,7 @@ var getColumnFormatAlign = (columnFormat, currentColumn, currentRow) => {
|
|
|
3280
3398
|
align = void 0;
|
|
3281
3399
|
} else if (typeof alignOption === "string" && (0, lodash_exports.includes)(visualization_schemas_exports.validAlignments, alignOption)) {
|
|
3282
3400
|
align = alignOption;
|
|
3283
|
-
} else if (
|
|
3401
|
+
} else if (alignOption !== void 0) {
|
|
3284
3402
|
console.warn(
|
|
3285
3403
|
`columnFormat.${currentColumn.columnId}.align should be a string or an array containing (${visualization_schemas_exports.validAlignments.join(
|
|
3286
3404
|
" | "
|
|
@@ -3299,7 +3417,7 @@ var getColumnFormatCellType = (columnFormat, currentColumn, currentRow) => {
|
|
|
3299
3417
|
);
|
|
3300
3418
|
if (isArray2(cellTypes) && (0, lodash_exports.includes)(visualization_schemas_exports.validCellRenderers, cellTypes[currentRow])) {
|
|
3301
3419
|
cellType = cellTypes[currentRow];
|
|
3302
|
-
} else if (
|
|
3420
|
+
} else if (cellTypes !== void 0) {
|
|
3303
3421
|
console.warn(
|
|
3304
3422
|
`columnFormat.${currentColumn.value}.cellType should be an array containing (${visualization_schemas_exports.validCellRenderers.join(" | ")}). ${JSON.stringify(
|
|
3305
3423
|
cellTypes
|
|
@@ -3318,7 +3436,7 @@ var getColumnFormatSparklineType = (columnFormat, currentColumn, currentRow) =>
|
|
|
3318
3436
|
);
|
|
3319
3437
|
if (isArray2(types) && (0, lodash_exports.includes)(visualization_schemas_exports.validSparklineTypes, types[currentRow])) {
|
|
3320
3438
|
sparklineType = types[currentRow];
|
|
3321
|
-
} else if (
|
|
3439
|
+
} else if (types !== void 0) {
|
|
3322
3440
|
console.warn(
|
|
3323
3441
|
`columnFormat.${currentColumn.value}.sparklineTypes should be one of (${visualization_schemas_exports.validSparklineTypes.join(
|
|
3324
3442
|
" | "
|
|
@@ -3337,7 +3455,7 @@ var getColumnFormatData = (columnFormat, currentColumn, currentRow) => {
|
|
|
3337
3455
|
);
|
|
3338
3456
|
if (isArray2(data)) {
|
|
3339
3457
|
datum = data[currentRow];
|
|
3340
|
-
} else if (
|
|
3458
|
+
} else if (data !== void 0) {
|
|
3341
3459
|
console.warn(
|
|
3342
3460
|
`columnFormat.${currentColumn.value}.data should be an array containing formatted data. ${typeof data} provided`
|
|
3343
3461
|
);
|
|
@@ -3390,7 +3508,7 @@ var getColumnFormatHeaderAlign = (columnFormat, columnId, columnValue) => {
|
|
|
3390
3508
|
}
|
|
3391
3509
|
if (typeof alignOption === "string" && (0, lodash_exports.includes)(visualization_schemas_exports.validAlignments, alignOption)) {
|
|
3392
3510
|
headerAlign = alignOption;
|
|
3393
|
-
} else if (
|
|
3511
|
+
} else if (alignOption !== void 0) {
|
|
3394
3512
|
console.warn(
|
|
3395
3513
|
`columnFormat.${columnId}.headerAlign should be a string containing (${visualization_schemas_exports.validAlignments.join(
|
|
3396
3514
|
" | "
|
|
@@ -3406,7 +3524,7 @@ var getTableFormatAlign = (tableFormat, currentColumn, currentRow) => {
|
|
|
3406
3524
|
align = alignOption[currentColumn][currentRow];
|
|
3407
3525
|
} else if (typeof alignOption === "string" && (0, lodash_exports.includes)(visualization_schemas_exports.validAlignments, alignOption)) {
|
|
3408
3526
|
align = alignOption;
|
|
3409
|
-
} else if (
|
|
3527
|
+
} else if (alignOption !== void 0) {
|
|
3410
3528
|
console.warn(
|
|
3411
3529
|
`tableFormat.align should be a string or a 2 dimensional array containing (${visualization_schemas_exports.validAlignments.join(
|
|
3412
3530
|
" | "
|
|
@@ -3420,7 +3538,7 @@ var getTableFormatCellType = (tableFormat, currentColumn, currentRow) => {
|
|
|
3420
3538
|
let cellType;
|
|
3421
3539
|
if (isArray2(cellTypes) && isArray2(cellTypes[currentColumn]) && (0, lodash_exports.includes)(visualization_schemas_exports.validCellRenderers, cellTypes[currentColumn][currentRow])) {
|
|
3422
3540
|
cellType = cellTypes[currentColumn][currentRow];
|
|
3423
|
-
} else if (
|
|
3541
|
+
} else if (cellTypes !== void 0) {
|
|
3424
3542
|
console.warn(
|
|
3425
3543
|
`tableFormat.cellType should be a 2 dimensional array containing (${visualization_schemas_exports.validCellRenderers.join(
|
|
3426
3544
|
" | "
|
|
@@ -3434,7 +3552,7 @@ var getTableFormatSparklineType = (tableFormat, currentColumn, currentRow) => {
|
|
|
3434
3552
|
let sparklineType;
|
|
3435
3553
|
if (isArray2(types) && isArray2(types[currentColumn]) && (0, lodash_exports.includes)(visualization_schemas_exports.validSparklineTypes, types[currentColumn][currentRow])) {
|
|
3436
3554
|
sparklineType = types[currentColumn][currentRow];
|
|
3437
|
-
} else if (
|
|
3555
|
+
} else if (types !== void 0) {
|
|
3438
3556
|
console.warn(
|
|
3439
3557
|
`tableFormat.sparklineTypes should be a 2 dimensional array containing one of (${visualization_schemas_exports.validSparklineTypes.join(
|
|
3440
3558
|
" | "
|
|
@@ -3450,7 +3568,7 @@ var getTableFormatColor = (tableFormat, currentColumn, currentRow, field) => {
|
|
|
3450
3568
|
color = colors[currentColumn][currentRow];
|
|
3451
3569
|
} else if (isArray2(colors) && (0, colorUtils_exports.isColor)(colors[currentRow])) {
|
|
3452
3570
|
color = colors[currentRow];
|
|
3453
|
-
} else if (
|
|
3571
|
+
} else if (colors !== void 0 && isArray2(colors) && isArray2(colors[currentColumn]) && colors[currentColumn][currentRow] !== void 0) {
|
|
3454
3572
|
console.warn(
|
|
3455
3573
|
`tableFormat.${field} needs to be an array of colors, provided ${JSON.stringify(
|
|
3456
3574
|
colors
|
|
@@ -3492,7 +3610,7 @@ var getTableFormatData = (tableFormat, currentCol, currentRow) => {
|
|
|
3492
3610
|
let datum;
|
|
3493
3611
|
if (isArray2(data) && isArray2(data[currentCol])) {
|
|
3494
3612
|
datum = data[currentCol][currentRow];
|
|
3495
|
-
} else if (
|
|
3613
|
+
} else if (data !== void 0) {
|
|
3496
3614
|
console.warn(
|
|
3497
3615
|
`tableFormat.data should be a 2 dimensional array containing formatted data to be displayed. ${typeof data} provided`
|
|
3498
3616
|
);
|
|
@@ -3504,7 +3622,7 @@ var getTableFormatHeaderAlign = (tableFormat) => {
|
|
|
3504
3622
|
let headerAlign;
|
|
3505
3623
|
if (typeof alignOption === "string" && visualization_schemas_exports.validAlignments.includes(alignOption)) {
|
|
3506
3624
|
headerAlign = alignOption;
|
|
3507
|
-
} else if (
|
|
3625
|
+
} else if (alignOption !== void 0) {
|
|
3508
3626
|
console.warn(
|
|
3509
3627
|
`tableFormat.headerAlign should be a string containing (${visualization_schemas_exports.validAlignments.join(
|
|
3510
3628
|
" | "
|
|
@@ -3515,14 +3633,14 @@ var getTableFormatHeaderAlign = (tableFormat) => {
|
|
|
3515
3633
|
};
|
|
3516
3634
|
var getAttributeFromColumnFormat = (attribute, columnFormat, columnId, columnValue) => (0, lodash_exports.get)(columnFormat, [columnId, attribute]) || (0, lodash_exports.get)(columnFormat, [columnValue, attribute]);
|
|
3517
3635
|
var validValueSelector = (v1, v2, v3, defaultValue) => {
|
|
3518
|
-
const validTypes = ["string", "number"];
|
|
3519
|
-
if (validTypes.
|
|
3636
|
+
const validTypes = /* @__PURE__ */ new Set(["string", "number"]);
|
|
3637
|
+
if (validTypes.has(typeof v1) || isArray2(v1)) {
|
|
3520
3638
|
return v1;
|
|
3521
3639
|
}
|
|
3522
|
-
if (validTypes.
|
|
3640
|
+
if (validTypes.has(typeof v2) || isArray2(v2)) {
|
|
3523
3641
|
return v2;
|
|
3524
3642
|
}
|
|
3525
|
-
if (validTypes.
|
|
3643
|
+
if (validTypes.has(typeof v3) || isArray2(v3)) {
|
|
3526
3644
|
return v3;
|
|
3527
3645
|
}
|
|
3528
3646
|
return defaultValue;
|
|
@@ -3676,7 +3794,7 @@ var useTable = (tableArgs = {}) => {
|
|
|
3676
3794
|
));
|
|
3677
3795
|
}
|
|
3678
3796
|
const tableHeader = {
|
|
3679
|
-
visibility: visualization_schemas_exports.validHeaderVisibilities.
|
|
3797
|
+
visibility: visualization_schemas_exports.validHeaderVisibilities.includes(headerVisibility) ? headerVisibility : "inline",
|
|
3680
3798
|
cells: table.map((f, i) => {
|
|
3681
3799
|
if (i < headers.length) {
|
|
3682
3800
|
return generateHeader(
|
|
@@ -3732,12 +3850,10 @@ var useTable = (tableArgs = {}) => {
|
|
|
3732
3850
|
let displayValue = "";
|
|
3733
3851
|
if (Array.isArray(columnFooterRaw)) {
|
|
3734
3852
|
displayValue = key === "footer-percentages" ? (_d = columnFooterRaw[1]) != null ? _d : "" : (_e = columnFooterRaw[0]) != null ? _e : "";
|
|
3735
|
-
} else if (
|
|
3853
|
+
} else if (columnFooterRaw !== void 0) {
|
|
3736
3854
|
displayValue = key === "footer-percentages" ? "" : columnFooterRaw;
|
|
3737
|
-
} else {
|
|
3738
|
-
displayValue = "";
|
|
3739
3855
|
}
|
|
3740
|
-
const derivedAlign = computeDerivedAlign(colMeta, colIdx
|
|
3856
|
+
const derivedAlign = computeDerivedAlign(colMeta, colIdx);
|
|
3741
3857
|
row.cells.push({
|
|
3742
3858
|
key: `${key}-${colIdx}`,
|
|
3743
3859
|
value: displayValue,
|
|
@@ -3771,18 +3887,9 @@ var Link_exports = {};
|
|
|
3771
3887
|
__export(Link_exports, {
|
|
3772
3888
|
default: () => Link_default
|
|
3773
3889
|
});
|
|
3774
|
-
var
|
|
3890
|
+
var defaultImport44 = __toESM(require("@splunk/react-ui/Link"));
|
|
3775
3891
|
__reExport(Link_exports, require("@splunk/react-ui/Link"));
|
|
3776
|
-
var Link_default = "default" in
|
|
3777
|
-
|
|
3778
|
-
// esm-externals:@splunk/themes
|
|
3779
|
-
var themes_exports = {};
|
|
3780
|
-
__export(themes_exports, {
|
|
3781
|
-
default: () => themes_default
|
|
3782
|
-
});
|
|
3783
|
-
var defaultImport44 = __toESM(require("@splunk/themes"));
|
|
3784
|
-
__reExport(themes_exports, require("@splunk/themes"));
|
|
3785
|
-
var themes_default = "default" in defaultImport44 ? defaultImport44.default : defaultImport44;
|
|
3892
|
+
var Link_default = "default" in defaultImport44 ? defaultImport44.default : defaultImport44;
|
|
3786
3893
|
|
|
3787
3894
|
// src/common/StyledSkipLink.tsx
|
|
3788
3895
|
var StyledSkipLink = styled_components_default(Link_default)`
|
|
@@ -4470,6 +4577,72 @@ var SparklineCell = ({
|
|
|
4470
4577
|
};
|
|
4471
4578
|
SparklineCell.displayName = "SparklineCell";
|
|
4472
4579
|
|
|
4580
|
+
// src/common/hooks/useDynamicHeight.ts
|
|
4581
|
+
var PAGINATOR_CONTAINER_HEIGHT = 38;
|
|
4582
|
+
var PAGINATOR_SPACING = 5;
|
|
4583
|
+
var useDynamicHeight = ({
|
|
4584
|
+
dynamicHeight,
|
|
4585
|
+
onRequestHeight,
|
|
4586
|
+
isPaging,
|
|
4587
|
+
rows,
|
|
4588
|
+
expandedRowJson
|
|
4589
|
+
}) => {
|
|
4590
|
+
const containerRef = (0, react_exports.useRef)(null);
|
|
4591
|
+
const containerRefInner = (0, react_exports.useRef)(null);
|
|
4592
|
+
const suiTableRef = (0, react_exports.useRef)(null);
|
|
4593
|
+
const lastReportedHeight = (0, react_exports.useRef)(null);
|
|
4594
|
+
const lastContentHeightRef = (0, react_exports.useRef)(void 0);
|
|
4595
|
+
const prevRowsRef = (0, react_exports.useRef)(rows);
|
|
4596
|
+
const prevExpandedRef = (0, react_exports.useRef)(expandedRowJson);
|
|
4597
|
+
(0, react_exports.useEffect)(() => {
|
|
4598
|
+
var _a, _b;
|
|
4599
|
+
if (!dynamicHeight || !onRequestHeight) {
|
|
4600
|
+
return void 0;
|
|
4601
|
+
}
|
|
4602
|
+
const contentChanged = prevRowsRef.current !== rows || prevExpandedRef.current !== expandedRowJson;
|
|
4603
|
+
prevRowsRef.current = rows;
|
|
4604
|
+
prevExpandedRef.current = expandedRowJson;
|
|
4605
|
+
if (contentChanged) {
|
|
4606
|
+
lastReportedHeight.current = null;
|
|
4607
|
+
}
|
|
4608
|
+
const containerEl = containerRef.current;
|
|
4609
|
+
const viewport = containerRefInner.current;
|
|
4610
|
+
const contentNode = (_b = (_a = suiTableRef.current) == null ? void 0 : _a.querySelector("table")) != null ? _b : null;
|
|
4611
|
+
const reportNaturalHeight = () => {
|
|
4612
|
+
var _a2, _b2;
|
|
4613
|
+
const rawPadding = containerEl ? Number.parseInt(getComputedStyle(containerEl).paddingTop, 10) : 0;
|
|
4614
|
+
const paddingOffset = (Number.isNaN(rawPadding) ? 0 : rawPadding) * 2;
|
|
4615
|
+
const paginatorChrome = isPaging ? PAGINATOR_CONTAINER_HEIGHT + PAGINATOR_SPACING : 0;
|
|
4616
|
+
const measuredHeight = (_b2 = (_a2 = contentNode == null ? void 0 : contentNode.scrollHeight) != null ? _a2 : viewport == null ? void 0 : viewport.scrollHeight) != null ? _b2 : 0;
|
|
4617
|
+
const naturalHeight = Math.ceil(measuredHeight + paddingOffset + paginatorChrome);
|
|
4618
|
+
lastContentHeightRef.current = naturalHeight;
|
|
4619
|
+
if (naturalHeight !== lastReportedHeight.current) {
|
|
4620
|
+
lastReportedHeight.current = naturalHeight;
|
|
4621
|
+
onRequestHeight(naturalHeight);
|
|
4622
|
+
}
|
|
4623
|
+
};
|
|
4624
|
+
if (!contentNode) {
|
|
4625
|
+
reportNaturalHeight();
|
|
4626
|
+
return void 0;
|
|
4627
|
+
}
|
|
4628
|
+
reportNaturalHeight();
|
|
4629
|
+
const observer = new ResizeObserver(reportNaturalHeight);
|
|
4630
|
+
observer.observe(contentNode);
|
|
4631
|
+
return () => observer.disconnect();
|
|
4632
|
+
}, [dynamicHeight, isPaging, rows, expandedRowJson, onRequestHeight]);
|
|
4633
|
+
(0, react_exports.useEffect)(() => {
|
|
4634
|
+
if (lastContentHeightRef.current === void 0) {
|
|
4635
|
+
return;
|
|
4636
|
+
}
|
|
4637
|
+
if (dynamicHeight) {
|
|
4638
|
+
onRequestHeight == null ? void 0 : onRequestHeight(lastContentHeightRef.current);
|
|
4639
|
+
} else {
|
|
4640
|
+
onRequestHeight == null ? void 0 : onRequestHeight(void 0);
|
|
4641
|
+
}
|
|
4642
|
+
}, [dynamicHeight, onRequestHeight]);
|
|
4643
|
+
return { containerRef, containerRefInner, suiTableRef };
|
|
4644
|
+
};
|
|
4645
|
+
|
|
4473
4646
|
// src/common/utils/textUtils.ts
|
|
4474
4647
|
var VIZ_FONT_FAMILY = "'Splunk Platform Sans', 'Splunk Data Sans', Roboto, Droid, 'Helvetica Neue', Helvetica, Arial, sans-serif";
|
|
4475
4648
|
|
|
@@ -4494,7 +4667,7 @@ var getFocusableElements = () => {
|
|
|
4494
4667
|
return Array.from(document.querySelectorAll(DEFAULT_FOCUSABLE_SELECTORS));
|
|
4495
4668
|
};
|
|
4496
4669
|
var isElementHidden = (element) => {
|
|
4497
|
-
const computedStyle =
|
|
4670
|
+
const computedStyle = globalThis.getComputedStyle(element);
|
|
4498
4671
|
return element.hasAttribute("hidden") || element.getAttribute("aria-hidden") === "true" || computedStyle.display === "none" || computedStyle.visibility === "hidden";
|
|
4499
4672
|
};
|
|
4500
4673
|
var isVisibleFocusableElement = (element) => {
|
|
@@ -4673,8 +4846,6 @@ var VizTableContainer = styled_components_default.div`
|
|
|
4673
4846
|
}
|
|
4674
4847
|
`;
|
|
4675
4848
|
VizTableContainer.displayName = "VizTableContainer";
|
|
4676
|
-
var PAGINATOR_CONTAINER_HEIGHT = 38;
|
|
4677
|
-
var PAGINATOR_SPACING = 5;
|
|
4678
4849
|
var SUITableContainer = styled_components_default.div`
|
|
4679
4850
|
& * {
|
|
4680
4851
|
font-family: ${(props) => props.font};
|
|
@@ -4687,7 +4858,7 @@ var SUITableContainer = styled_components_default.div`
|
|
|
4687
4858
|
|
|
4688
4859
|
${({ width, height, isPaging, theme }) => {
|
|
4689
4860
|
const padding = variables_default.spacingSmall({ theme });
|
|
4690
|
-
const paddingOffset = parseInt(padding, 10) * 2;
|
|
4861
|
+
const paddingOffset = Number.parseInt(padding, 10) * 2;
|
|
4691
4862
|
const calculatedHeight = isPaging ? height - PAGINATOR_CONTAINER_HEIGHT - PAGINATOR_SPACING - paddingOffset : height - paddingOffset;
|
|
4692
4863
|
const finalHeight = Math.max(calculatedHeight, 1);
|
|
4693
4864
|
return (0, style_exports.toDimension)({
|
|
@@ -4864,33 +5035,38 @@ var getUseMouseOverEffect = (props, header) => {
|
|
|
4864
5035
|
return handlerFields.includes(header);
|
|
4865
5036
|
});
|
|
4866
5037
|
};
|
|
4867
|
-
var PureTable = (
|
|
4868
|
-
|
|
5038
|
+
var PureTable = (_a) => {
|
|
5039
|
+
var _b = _a, {
|
|
4869
5040
|
count,
|
|
4870
|
-
width,
|
|
4871
|
-
height,
|
|
5041
|
+
width = 300,
|
|
5042
|
+
height = 300,
|
|
4872
5043
|
backgroundColor,
|
|
4873
5044
|
tableHeader,
|
|
4874
5045
|
tableBody,
|
|
4875
5046
|
tableFooter,
|
|
4876
|
-
showRowNumbers,
|
|
4877
|
-
showFooterTotals,
|
|
4878
|
-
showFooterPercentages,
|
|
4879
|
-
sortParams: { currentSortKey, currentSortDir, onSort },
|
|
4880
|
-
paginatorParams:
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
5047
|
+
showRowNumbers = false,
|
|
5048
|
+
showFooterTotals = false,
|
|
5049
|
+
showFooterPercentages = false,
|
|
5050
|
+
sortParams: { currentSortKey, currentSortDir, onSort } = { onSort: lodash_exports.noop },
|
|
5051
|
+
paginatorParams: _c = {
|
|
5052
|
+
isPaging: false,
|
|
5053
|
+
onChange: lodash_exports.noop
|
|
5054
|
+
}
|
|
5055
|
+
} = _b, _d = _c, { isPaging, onChange: paginatorOnChange } = _d, paginatorProps = __objRest(_d, ["isPaging", "onChange"]), {
|
|
5056
|
+
onCellClick = null,
|
|
5057
|
+
onColumnFormatChange = lodash_exports.noop,
|
|
5058
|
+
columnFormat = {},
|
|
5059
|
+
mode = "view",
|
|
5060
|
+
headerVisibility = "inline",
|
|
4887
5061
|
font,
|
|
4888
5062
|
fontSize,
|
|
4889
|
-
showColumnAsExpandedJson
|
|
4890
|
-
|
|
5063
|
+
showColumnAsExpandedJson = [],
|
|
5064
|
+
dynamicHeight = false,
|
|
5065
|
+
onRequestHeight,
|
|
5066
|
+
hasEventHandlers,
|
|
5067
|
+
eventHandlers
|
|
5068
|
+
} = _b;
|
|
4891
5069
|
const [columns, setColumns] = react_exports.useState(columnFormat);
|
|
4892
|
-
const containerRef = react_exports.useRef(null);
|
|
4893
|
-
const containerRefInner = react_exports.useRef(null);
|
|
4894
5070
|
const [isResizing, setResizing] = react_exports.useState(false);
|
|
4895
5071
|
const firstRenderCount = react_exports.useRef(count);
|
|
4896
5072
|
react_exports.useEffect(() => {
|
|
@@ -4917,10 +5093,17 @@ var PureTable = (props) => {
|
|
|
4917
5093
|
() => expandedRowJson.some((rowJson) => rowJson.isExpandable),
|
|
4918
5094
|
[expandedRowJson]
|
|
4919
5095
|
);
|
|
5096
|
+
const { containerRef, containerRefInner, suiTableRef } = useDynamicHeight({
|
|
5097
|
+
dynamicHeight,
|
|
5098
|
+
onRequestHeight,
|
|
5099
|
+
isPaging,
|
|
5100
|
+
rows: tableBody.rows,
|
|
5101
|
+
expandedRowJson
|
|
5102
|
+
});
|
|
4920
5103
|
const TableHead = useTableHead(headerVisibility);
|
|
4921
5104
|
const debouncedDrilldown = react_exports.useMemo(
|
|
4922
5105
|
() => debounce_default((e, payload) => {
|
|
4923
|
-
if (
|
|
5106
|
+
if (globalThis.getSelection().toString() === "" || (e == null ? void 0 : e.ctrlKey) || (e == null ? void 0 : e.metaKey)) {
|
|
4924
5107
|
if (typeof onCellClick === "function") {
|
|
4925
5108
|
onCellClick({ e, payload });
|
|
4926
5109
|
}
|
|
@@ -4935,9 +5118,9 @@ var PureTable = (props) => {
|
|
|
4935
5118
|
if (!element) {
|
|
4936
5119
|
return;
|
|
4937
5120
|
}
|
|
4938
|
-
const row = element.
|
|
4939
|
-
const col = element.
|
|
4940
|
-
const arrayIndex = element.
|
|
5121
|
+
const row = element.dataset.rowIndex;
|
|
5122
|
+
const col = element.dataset.colIndex;
|
|
5123
|
+
const arrayIndex = element.dataset.arrayIndex || -1;
|
|
4941
5124
|
if (row && col) {
|
|
4942
5125
|
const cellRefIndex = +col;
|
|
4943
5126
|
let cellIndex = cellRefIndex;
|
|
@@ -5037,7 +5220,7 @@ var PureTable = (props) => {
|
|
|
5037
5220
|
};
|
|
5038
5221
|
const footerVisibleHeaderCells = tableHeader.cells.filter((c) => c.showCell !== false);
|
|
5039
5222
|
const renderFooterRow = (key, dataAttr) => {
|
|
5040
|
-
const rows = ((tableFooter == null ? void 0 : tableFooter.rows) || []).filter((r) => r
|
|
5223
|
+
const rows = ((tableFooter == null ? void 0 : tableFooter.rows) || []).filter((r) => (r == null ? void 0 : r.key) === key);
|
|
5041
5224
|
if (rows.length === 0) return null;
|
|
5042
5225
|
return rows.map((row) => /* @__PURE__ */ react_exports.createElement(
|
|
5043
5226
|
Table_default.Row,
|
|
@@ -5047,7 +5230,7 @@ var PureTable = (props) => {
|
|
|
5047
5230
|
"data-row-index": key === "footer-totals" ? "0" : "1"
|
|
5048
5231
|
},
|
|
5049
5232
|
(row.cells || []).filter((c) => c.showCell !== false).map((c, idx) => {
|
|
5050
|
-
var _a2, _b2, _c2,
|
|
5233
|
+
var _a2, _b2, _c2, _d2;
|
|
5051
5234
|
const headerCell = footerVisibleHeaderCells[idx];
|
|
5052
5235
|
const explicitWidth = headerCell && ((_a2 = columns[headerCell.value]) == null ? void 0 : _a2.width);
|
|
5053
5236
|
const colWidth = explicitWidth && explicitWidth !== "auto" ? explicitWidth : void 0;
|
|
@@ -5061,7 +5244,7 @@ var PureTable = (props) => {
|
|
|
5061
5244
|
}), colWidth !== void 0 && { width: colWidth }),
|
|
5062
5245
|
align: c.align || "right"
|
|
5063
5246
|
},
|
|
5064
|
-
(
|
|
5247
|
+
(_d2 = c.value) != null ? _d2 : ""
|
|
5065
5248
|
);
|
|
5066
5249
|
})
|
|
5067
5250
|
));
|
|
@@ -5090,6 +5273,7 @@ var PureTable = (props) => {
|
|
|
5090
5273
|
/* @__PURE__ */ react_exports.createElement(
|
|
5091
5274
|
Table_default,
|
|
5092
5275
|
{
|
|
5276
|
+
elementRef: suiTableRef,
|
|
5093
5277
|
resizableFillLayout: true,
|
|
5094
5278
|
headType: isHeaderHidden ? void 0 : "inline",
|
|
5095
5279
|
rowExpansion: hasExpandableRows ? "multi" : "none",
|
|
@@ -5101,15 +5285,15 @@ var PureTable = (props) => {
|
|
|
5101
5285
|
onRequestResizeColumn: handleResizeColumn
|
|
5102
5286
|
},
|
|
5103
5287
|
/* @__PURE__ */ react_exports.createElement(TableHead, null, visibleHeaderCells.map(
|
|
5104
|
-
(
|
|
5105
|
-
var
|
|
5288
|
+
(_a2) => {
|
|
5289
|
+
var _b2 = _a2, {
|
|
5106
5290
|
key,
|
|
5107
5291
|
value,
|
|
5108
5292
|
sortKey,
|
|
5109
5293
|
style,
|
|
5110
5294
|
align,
|
|
5111
5295
|
textOverflowType
|
|
5112
|
-
} =
|
|
5296
|
+
} = _b2, rest = __objRest(_b2, [
|
|
5113
5297
|
"key",
|
|
5114
5298
|
"value",
|
|
5115
5299
|
"sortKey",
|
|
@@ -5117,7 +5301,7 @@ var PureTable = (props) => {
|
|
|
5117
5301
|
"align",
|
|
5118
5302
|
"textOverflowType"
|
|
5119
5303
|
]);
|
|
5120
|
-
var
|
|
5304
|
+
var _a3, _b3;
|
|
5121
5305
|
return /* @__PURE__ */ react_exports.createElement(
|
|
5122
5306
|
HeadCell,
|
|
5123
5307
|
__spreadProps(__spreadValues({}, __spreadValues({ sortKey }, rest)), {
|
|
@@ -5127,7 +5311,7 @@ var PureTable = (props) => {
|
|
|
5127
5311
|
key,
|
|
5128
5312
|
columnId: value,
|
|
5129
5313
|
sortDir: sortKey === currentSortKey ? currentSortDir : "none",
|
|
5130
|
-
width: (
|
|
5314
|
+
width: (_b3 = (_a3 = columns[value]) == null ? void 0 : _a3.width) != null ? _b3 : INITIAL_UNSET_COLUMN_WIDTH,
|
|
5131
5315
|
onMouseDown: handleEventHeadCellMouseDown,
|
|
5132
5316
|
value,
|
|
5133
5317
|
onSort: showRowNumbers && value === "#" || isHeaderHidden ? null : onSortToUse,
|
|
@@ -5172,7 +5356,7 @@ var PureTable = (props) => {
|
|
|
5172
5356
|
{
|
|
5173
5357
|
cell,
|
|
5174
5358
|
useMouseOverEffect: getUseMouseOverEffect(
|
|
5175
|
-
|
|
5359
|
+
{ hasEventHandlers, mode, eventHandlers },
|
|
5176
5360
|
cell.header
|
|
5177
5361
|
)
|
|
5178
5362
|
}
|
|
@@ -5181,7 +5365,7 @@ var PureTable = (props) => {
|
|
|
5181
5365
|
{
|
|
5182
5366
|
cell,
|
|
5183
5367
|
useMouseOverEffect: getUseMouseOverEffect(
|
|
5184
|
-
|
|
5368
|
+
{ hasEventHandlers, mode, eventHandlers },
|
|
5185
5369
|
cell.header
|
|
5186
5370
|
),
|
|
5187
5371
|
width: (_b2 = (_a3 = columns[cell.header]) == null ? void 0 : _a3.width) != null ? _b2 : "auto"
|
|
@@ -5191,7 +5375,7 @@ var PureTable = (props) => {
|
|
|
5191
5375
|
{
|
|
5192
5376
|
cell,
|
|
5193
5377
|
useMouseOverEffect: getUseMouseOverEffect(
|
|
5194
|
-
|
|
5378
|
+
{ hasEventHandlers, mode, eventHandlers },
|
|
5195
5379
|
cell.header
|
|
5196
5380
|
)
|
|
5197
5381
|
}
|
|
@@ -5221,79 +5405,6 @@ var PureTable = (props) => {
|
|
|
5221
5405
|
}, paginatorProps)
|
|
5222
5406
|
)) : null);
|
|
5223
5407
|
};
|
|
5224
|
-
var cellDataType = prop_types_exports.oneOfType([prop_types_exports.string, prop_types_exports.number, prop_types_exports.arrayOf(prop_types_exports.oneOfType([prop_types_exports.string, prop_types_exports.number]))]);
|
|
5225
|
-
PureTable.propTypes = {
|
|
5226
|
-
backgroundColor: prop_types_exports.string,
|
|
5227
|
-
count: prop_types_exports.number,
|
|
5228
|
-
columnFormat: prop_types_exports.objectOf(
|
|
5229
|
-
prop_types_exports.shape({
|
|
5230
|
-
align: prop_types_exports.oneOfType([prop_types_exports.arrayOf(prop_types_exports.oneOf(visualization_schemas_exports.validColumnAlignments)), prop_types_exports.oneOf(visualization_schemas_exports.validColumnAlignments)]),
|
|
5231
|
-
cellTypes: prop_types_exports.arrayOf(prop_types_exports.oneOf(visualization_schemas_exports.validCellRenderers)),
|
|
5232
|
-
data: prop_types_exports.arrayOf(cellDataType),
|
|
5233
|
-
headerAlign: prop_types_exports.oneOf(visualization_schemas_exports.validColumnAlignments),
|
|
5234
|
-
rowBackgroundColors: prop_types_exports.arrayOf(prop_types_exports.string),
|
|
5235
|
-
rowColors: prop_types_exports.arrayOf(prop_types_exports.string),
|
|
5236
|
-
sparklineAreaColors: prop_types_exports.arrayOf(prop_types_exports.string),
|
|
5237
|
-
sparklineColors: prop_types_exports.arrayOf(prop_types_exports.string),
|
|
5238
|
-
sparklineTypes: prop_types_exports.arrayOf(prop_types_exports.oneOf(visualization_schemas_exports.validSparklineTypes))
|
|
5239
|
-
})
|
|
5240
|
-
),
|
|
5241
|
-
headers: prop_types_exports.arrayOf(prop_types_exports.string),
|
|
5242
|
-
headerVisibility: prop_types_exports.oneOf(visualization_schemas_exports.validHeaderVisibilities),
|
|
5243
|
-
height: prop_types_exports.oneOfType([prop_types_exports.number]),
|
|
5244
|
-
mode: prop_types_exports.string,
|
|
5245
|
-
onCellClick: prop_types_exports.func,
|
|
5246
|
-
paginatorParams: PaginatorParamsPropTypes,
|
|
5247
|
-
showColumnAsExpandedJson: prop_types_exports.arrayOf(prop_types_exports.string),
|
|
5248
|
-
showRowNumbers: prop_types_exports.bool,
|
|
5249
|
-
showFooterTotals: prop_types_exports.bool,
|
|
5250
|
-
sortParams: SortParamsPropTypes,
|
|
5251
|
-
table: prop_types_exports.arrayOf(prop_types_exports.arrayOf(cellDataType)),
|
|
5252
|
-
tableFormat: prop_types_exports.shape({
|
|
5253
|
-
align: prop_types_exports.oneOfType([prop_types_exports.arrayOf(prop_types_exports.arrayOf(prop_types_exports.oneOf(visualization_schemas_exports.validAlignments))), prop_types_exports.oneOf(visualization_schemas_exports.validAlignments)]),
|
|
5254
|
-
cellTypes: prop_types_exports.arrayOf(prop_types_exports.arrayOf(prop_types_exports.oneOf(visualization_schemas_exports.validCellRenderers))),
|
|
5255
|
-
data: prop_types_exports.arrayOf(prop_types_exports.arrayOf(cellDataType)),
|
|
5256
|
-
headerAlign: prop_types_exports.oneOf(visualization_schemas_exports.validAlignments),
|
|
5257
|
-
headerBackgroundColor: prop_types_exports.string,
|
|
5258
|
-
headerColor: prop_types_exports.string,
|
|
5259
|
-
rowBackgroundColors: prop_types_exports.oneOfType([prop_types_exports.arrayOf(prop_types_exports.string), prop_types_exports.arrayOf(prop_types_exports.arrayOf(prop_types_exports.string))]),
|
|
5260
|
-
rowColors: prop_types_exports.oneOfType([prop_types_exports.arrayOf(prop_types_exports.string), prop_types_exports.arrayOf(prop_types_exports.arrayOf(prop_types_exports.string))]),
|
|
5261
|
-
sparklineAreaColors: prop_types_exports.arrayOf(prop_types_exports.arrayOf(prop_types_exports.string)),
|
|
5262
|
-
sparklineColors: prop_types_exports.arrayOf(prop_types_exports.arrayOf(prop_types_exports.string)),
|
|
5263
|
-
sparklineTypes: prop_types_exports.arrayOf(prop_types_exports.arrayOf(prop_types_exports.oneOf(visualization_schemas_exports.validSparklineTypes)))
|
|
5264
|
-
}),
|
|
5265
|
-
theme: prop_types_exports.any,
|
|
5266
|
-
width: prop_types_exports.oneOfType([prop_types_exports.number]),
|
|
5267
|
-
onColumnFormatChange: prop_types_exports.func,
|
|
5268
|
-
font: prop_types_exports.string,
|
|
5269
|
-
fontSize: prop_types_exports.string
|
|
5270
|
-
};
|
|
5271
|
-
PureTable.defaultProps = {
|
|
5272
|
-
columnFormat: {},
|
|
5273
|
-
headers: [],
|
|
5274
|
-
headerVisibility: "inline",
|
|
5275
|
-
height: 300,
|
|
5276
|
-
mode: "view",
|
|
5277
|
-
onCellClick: null,
|
|
5278
|
-
paginatorParams: {
|
|
5279
|
-
isPaging: false,
|
|
5280
|
-
onChange: lodash_exports.noop
|
|
5281
|
-
},
|
|
5282
|
-
showColumnAsExpandedJson: [],
|
|
5283
|
-
showRowNumbers: false,
|
|
5284
|
-
showFooterTotals: false,
|
|
5285
|
-
showFooterPercentages: false,
|
|
5286
|
-
sortParams: {
|
|
5287
|
-
onSort: lodash_exports.noop
|
|
5288
|
-
},
|
|
5289
|
-
table: [],
|
|
5290
|
-
tableFormat: {},
|
|
5291
|
-
theme: {},
|
|
5292
|
-
width: 300,
|
|
5293
|
-
onColumnFormatChange: lodash_exports.noop,
|
|
5294
|
-
font: fontMap.proportional,
|
|
5295
|
-
fontSize: fontSizeMap.default
|
|
5296
|
-
};
|
|
5297
5408
|
PureTable.displayName = "VizTable";
|
|
5298
5409
|
var PureTable_default = withEmptyTableMessage(FixedSizeContainer_default(PureTable));
|
|
5299
5410
|
|
|
@@ -5329,7 +5440,7 @@ var computeVizProps = (_a) => {
|
|
|
5329
5440
|
if (vizProps.onOptionsChange) {
|
|
5330
5441
|
const handleColumnFormatChange = (updatedColumnFormat) => {
|
|
5331
5442
|
var _a3;
|
|
5332
|
-
const cloneOfExistingColumnFormat = __spreadValues({}, (
|
|
5443
|
+
const cloneOfExistingColumnFormat = __spreadValues({}, (_a3 = vizProps == null ? void 0 : vizProps.options) == null ? void 0 : _a3.columnFormat);
|
|
5333
5444
|
const keys = Object.keys(updatedColumnFormat);
|
|
5334
5445
|
const values = Object.values(updatedColumnFormat);
|
|
5335
5446
|
keys.forEach((key, index) => {
|
|
@@ -5351,13 +5462,7 @@ var computeVizProps = (_a) => {
|
|
|
5351
5462
|
};
|
|
5352
5463
|
var withTableFooter = (Viz) => {
|
|
5353
5464
|
const VizWithTableFooter = (_a) => {
|
|
5354
|
-
var _b = _a, {
|
|
5355
|
-
dataSources,
|
|
5356
|
-
options = {}
|
|
5357
|
-
} = _b, otherProps = __objRest(_b, [
|
|
5358
|
-
"dataSources",
|
|
5359
|
-
"options"
|
|
5360
|
-
]);
|
|
5465
|
+
var _b = _a, { dataSources, options = {} } = _b, otherProps = __objRest(_b, ["dataSources", "options"]);
|
|
5361
5466
|
var _a2, _b2, _c;
|
|
5362
5467
|
const footerKeyRef = react_exports.useRef(null);
|
|
5363
5468
|
if (footerKeyRef.current === null) {
|
|
@@ -5390,13 +5495,13 @@ var withTableFooter = (Viz) => {
|
|
|
5390
5495
|
if (!showFooterTotals && !showFooterPercentages) {
|
|
5391
5496
|
return options;
|
|
5392
5497
|
}
|
|
5393
|
-
const columnFormat = __spreadValues({},
|
|
5498
|
+
const columnFormat = __spreadValues({}, options == null ? void 0 : options.columnFormat);
|
|
5394
5499
|
const fieldNames = (fieldsMeta || []).map((f) => f && (f.name || f)).filter(Boolean);
|
|
5395
5500
|
fieldNames.forEach((fieldName) => {
|
|
5396
5501
|
var _a3, _b3;
|
|
5397
5502
|
if (!fieldName || fieldName === "#") return;
|
|
5398
5503
|
const existingFooter = (_a3 = columnFormat == null ? void 0 : columnFormat[fieldName]) == null ? void 0 : _a3.footer;
|
|
5399
|
-
if (
|
|
5504
|
+
if (existingFooter === void 0) {
|
|
5400
5505
|
const dataDsl = (_b3 = columnFormat == null ? void 0 : columnFormat[fieldName]) == null ? void 0 : _b3.data;
|
|
5401
5506
|
let configToken = null;
|
|
5402
5507
|
if (typeof dataDsl === "string") {
|
|
@@ -5405,13 +5510,13 @@ var withTableFooter = (Viz) => {
|
|
|
5405
5510
|
}
|
|
5406
5511
|
let footerDsl = `> ${footerKey} | seriesByName("${fieldName}")`;
|
|
5407
5512
|
if (configToken) footerDsl += ` | formatByType(${configToken})`;
|
|
5408
|
-
columnFormat[fieldName] = __spreadProps(__spreadValues({}, columnFormat[fieldName]
|
|
5513
|
+
columnFormat[fieldName] = __spreadProps(__spreadValues({}, columnFormat[fieldName]), {
|
|
5409
5514
|
footer: footerDsl
|
|
5410
5515
|
});
|
|
5411
5516
|
} else if (typeof existingFooter === "string") {
|
|
5412
5517
|
const updatedFooterDsl = existingFooter.replaceAll(/>\s*footer\w*/g, `> ${footerKey}`);
|
|
5413
5518
|
if (updatedFooterDsl !== existingFooter) {
|
|
5414
|
-
columnFormat[fieldName] = __spreadProps(__spreadValues({}, columnFormat[fieldName]
|
|
5519
|
+
columnFormat[fieldName] = __spreadProps(__spreadValues({}, columnFormat[fieldName]), {
|
|
5415
5520
|
footer: updatedFooterDsl
|
|
5416
5521
|
});
|
|
5417
5522
|
}
|
|
@@ -5424,7 +5529,6 @@ var withTableFooter = (Viz) => {
|
|
|
5424
5529
|
}
|
|
5425
5530
|
return /* @__PURE__ */ react_exports.createElement(Viz, __spreadValues({ dataSources: newDataSources, options: newOptions }, otherProps));
|
|
5426
5531
|
};
|
|
5427
|
-
VizWithTableFooter.defaultProps = Viz.defaultProps;
|
|
5428
5532
|
VizWithTableFooter.config = Viz.config;
|
|
5429
5533
|
return VizWithTableFooter;
|
|
5430
5534
|
};
|