@splunk/visualizations 28.3.0 → 28.5.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.config.js +28 -8
- package/Area.config.js.map +2 -2
- package/Area.js +583 -120
- package/Area.js.map +3 -3
- package/Bar/Bar.d.ts.map +1 -1
- package/Bar.config.js +28 -8
- package/Bar.config.js.map +2 -2
- package/Bar.js +593 -120
- package/Bar.js.map +3 -3
- package/Bubble.config.js +4 -5
- package/Bubble.config.js.map +2 -2
- package/Bubble.js +554 -98
- package/Bubble.js.map +3 -3
- package/CHANGELOG.external.md +165 -0
- package/ChoroplethSvg/ChoroplethSvg.d.ts +4 -3
- package/ChoroplethSvg/ChoroplethSvg.d.ts.map +1 -1
- package/ChoroplethSvg.config.js +1 -3
- package/ChoroplethSvg.config.js.map +2 -2
- package/ChoroplethSvg.js +595 -111
- package/ChoroplethSvg.js.map +4 -4
- package/Column/Column.d.ts.map +1 -1
- package/Column.config.js +28 -8
- package/Column.config.js.map +2 -2
- package/Column.js +583 -120
- package/Column.js.map +3 -3
- package/Ellipse/config.d.ts.map +1 -1
- package/Ellipse.config.js +14 -5
- package/Ellipse.config.js.map +4 -4
- package/Ellipse.js +640 -159
- package/Ellipse.js.map +4 -4
- package/Events/PureEvents/PureEvents.d.ts.map +1 -1
- package/Events.js +668 -157
- package/Events.js.map +4 -4
- package/FillerGauge/FillerGauge.d.ts.map +1 -1
- package/FillerGauge/PureFillerGauge/FillerGauge.d.ts.map +1 -1
- package/FillerGauge.js +751 -169
- package/FillerGauge.js.map +4 -4
- package/Image/Image.d.ts.map +1 -1
- package/Image.js +620 -116
- package/Image.js.map +4 -4
- package/Line/Line.d.ts.map +1 -1
- package/Line/lineUtils.d.ts.map +1 -1
- package/Line/mockdata/LineData.d.ts +154 -0
- package/Line/mockdata/LineData.d.ts.map +1 -1
- package/Line.config.js +28 -8
- package/Line.config.js.map +2 -2
- package/Line.js +704 -122
- package/Line.js.map +3 -3
- package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts +5 -0
- package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/components/Graph.d.ts +9 -1
- package/LinkGraph/PureLinkGraph/components/Graph.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/components/GraphStyles.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/components/Node.d.ts +1 -0
- package/LinkGraph/PureLinkGraph/components/Node.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/components/Nodes.d.ts +1 -0
- package/LinkGraph/PureLinkGraph/components/Nodes.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/measurementUtils.d.ts +16 -0
- package/LinkGraph/PureLinkGraph/measurementUtils.d.ts.map +1 -0
- package/LinkGraph/PureLinkGraph/utils/iconLoader.d.ts.map +1 -1
- package/LinkGraph/config.d.ts.map +1 -1
- package/LinkGraph.config.js +15 -1
- package/LinkGraph.config.js.map +2 -2
- package/LinkGraph.js +1411 -662
- package/LinkGraph.js.map +4 -4
- package/Map/Map.d.ts +2 -2
- package/Map/Map.d.ts.map +1 -1
- package/Map/PureMap/BubbleLayer.d.ts +5 -0
- package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
- package/Map/PureMap/ClusterLayer.d.ts.map +1 -1
- package/Map/PureMap/LocalChoroplethLayer.d.ts.map +1 -1
- package/Map/PureMap/MapUtils.d.ts +2 -2
- package/Map/PureMap/MapUtils.d.ts.map +1 -1
- package/Map/PureMap/PureMap.d.ts.map +1 -1
- package/Map/PureMap/PureMapContainer.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 +0 -1
- package/Map.config.js.map +2 -2
- package/Map.js +831 -247
- package/Map.js.map +4 -4
- package/Markdown/Markdown.d.ts.map +1 -1
- package/Markdown/config.d.ts.map +1 -1
- package/Markdown.config.js +14 -5
- package/Markdown.config.js.map +4 -4
- package/Markdown.js +619 -109
- package/Markdown.js.map +4 -4
- package/MarkerGauge/MarkerGauge.d.ts +5 -1
- package/MarkerGauge/MarkerGauge.d.ts.map +1 -1
- package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts +4 -0
- package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts.map +1 -1
- package/MarkerGauge/config.d.ts.map +1 -1
- package/MarkerGauge.config.js +121 -3
- package/MarkerGauge.config.js.map +3 -3
- package/MarkerGauge.js +1535 -172
- package/MarkerGauge.js.map +4 -4
- package/NetworkGraph/NetworkGraph.d.ts +22 -0
- package/NetworkGraph/NetworkGraph.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts +60 -0
- package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/components/Link.d.ts +19 -0
- package/NetworkGraph/PureNetworkGraph/components/Link.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts +29 -0
- package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/components/Node.d.ts +27 -0
- package/NetworkGraph/PureNetworkGraph/components/Node.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/components/Tooltip.d.ts +12 -0
- package/NetworkGraph/PureNetworkGraph/components/Tooltip.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts +13 -0
- package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/mockdata/data.d.ts +140 -0
- package/NetworkGraph/PureNetworkGraph/mockdata/data.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/mockdata/datasource.d.ts +89 -0
- package/NetworkGraph/PureNetworkGraph/mockdata/datasource.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts +78 -0
- package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/utils/forceLayout.d.ts +47 -0
- package/NetworkGraph/PureNetworkGraph/utils/forceLayout.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/utils/iconLoader.d.ts +78 -0
- package/NetworkGraph/PureNetworkGraph/utils/iconLoader.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphShared.d.ts +111 -0
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphShared.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts +122 -0
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -0
- package/NetworkGraph/config.d.ts +4 -0
- package/NetworkGraph/config.d.ts.map +1 -0
- package/NetworkGraph/index.d.ts +3 -0
- package/NetworkGraph/index.d.ts.map +1 -0
- package/NetworkGraph.config.js +938 -0
- package/NetworkGraph.config.js.map +7 -0
- package/NetworkGraph.js +7053 -0
- package/NetworkGraph.js.map +7 -0
- package/PERFORMANCE.md +23 -0
- package/ParallelCoordinates/ParallelCoordinates.d.ts +1 -46
- package/ParallelCoordinates/ParallelCoordinates.d.ts.map +1 -1
- package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts +12 -58
- package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts.map +1 -1
- package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts +1 -0
- package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts.map +1 -1
- package/ParallelCoordinates.js +664 -228
- package/ParallelCoordinates.js.map +4 -4
- package/Pie/Pie.d.ts.map +1 -1
- package/Pie/config.d.ts.map +1 -1
- package/Pie/pieUtils.d.ts +4 -0
- package/Pie/pieUtils.d.ts.map +1 -1
- package/Pie.config.js +16 -0
- package/Pie.config.js.map +2 -2
- package/Pie.js +610 -118
- package/Pie.js.map +3 -3
- package/Punchcard.js +579 -92
- package/Punchcard.js.map +4 -4
- package/Rectangle/config.d.ts.map +1 -1
- package/Rectangle.config.js +14 -5
- package/Rectangle.config.js.map +4 -4
- package/Rectangle.js +611 -130
- package/Rectangle.js.map +4 -4
- package/Sankey/PureSankey/PureSankey.d.ts +26 -72
- package/Sankey/PureSankey/PureSankey.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyLink.d.ts +3 -19
- package/Sankey/PureSankey/SankeyLink.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyNode.d.ts +3 -20
- package/Sankey/PureSankey/SankeyNode.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyTooltip.d.ts +3 -24
- package/Sankey/PureSankey/SankeyTooltip.d.ts.map +1 -1
- package/Sankey.js +814 -429
- package/Sankey.js.map +4 -4
- package/Scatter/Scatter.d.ts.map +1 -1
- package/Scatter.config.js +168 -148
- package/Scatter.config.js.map +4 -4
- package/Scatter.js +733 -260
- 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 +15 -2
- package/SingleValue.config.js.map +2 -2
- package/SingleValue.js +733 -229
- package/SingleValue.js.map +3 -3
- 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 +14 -6
- package/SingleValueIcon.config.js.map +4 -4
- package/SingleValueIcon.js +612 -182
- package/SingleValueIcon.js.map +4 -4
- package/SingleValueRadial/PureSingleValueRadial/GaugeGraph.d.ts.map +1 -1
- 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.js +0 -1
- package/SingleValueRadial.config.js.map +2 -2
- package/SingleValueRadial.js +594 -182
- package/SingleValueRadial.js.map +4 -4
- package/SparkLine.js +46 -8
- package/SparkLine.js.map +2 -2
- package/Table/PureTable.d.ts +10 -0
- package/Table/PureTable.d.ts.map +1 -1
- package/Table/Table.d.ts.map +1 -1
- package/Table/cells/SparklineCell.d.ts.map +1 -1
- package/Table/config.d.ts.map +1 -1
- package/Table/hooks.d.ts +6 -0
- package/Table/hooks.d.ts.map +1 -1
- package/Table.config.js +1 -1
- package/Table.config.js.map +2 -2
- package/Table.js +836 -253
- package/Table.js.map +4 -4
- package/Timeline/PureTimeline/PureTimeline.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/CursorPlugin.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelineLegend.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelinePlugin.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +2 -1
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -1
- package/Timeline/config.d.ts.map +1 -1
- package/Timeline.config.js +31 -12
- package/Timeline.config.js.map +4 -4
- package/Timeline.js +785 -247
- package/Timeline.js.map +4 -4
- package/common/Charting.d.ts +5 -0
- package/common/Charting.d.ts.map +1 -1
- package/common/Charting.js +12 -0
- package/common/Charting.js.map +2 -2
- package/common/GaugeMajorTicks.js +150 -13
- package/common/GaugeMajorTicks.js.map +4 -4
- package/common/GaugeValueMarker.js +84 -17
- package/common/GaugeValueMarker.js.map +4 -4
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.d.ts.map +1 -1
- package/common/OverviewDoc.js +2 -2
- package/common/OverviewDoc.js.map +2 -2
- package/common/ThemesDoc.js +0 -1
- package/common/ThemesDoc.js.map +2 -2
- package/common/TimeSeriesChartWrapper.d.ts +24 -11
- package/common/TimeSeriesChartWrapper.d.ts.map +1 -1
- package/common/TimeSeriesChartWrapper.js +617 -91
- package/common/TimeSeriesChartWrapper.js.map +4 -4
- package/common/chartingUtils.d.ts +52 -6
- package/common/chartingUtils.d.ts.map +1 -1
- package/common/chartingUtils.js +116 -17
- package/common/chartingUtils.js.map +3 -3
- package/common/editorConfig/AxesChartDataConfig.d.ts +3 -3
- package/common/editorConfig/AxesChartDataConfig.d.ts.map +1 -1
- package/common/editorConfig/AxesChartDataDisplay.d.ts +4 -0
- package/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -1
- package/common/editorConfig/AxesChartLegend.d.ts.map +1 -1
- package/common/gaugeUtils.d.ts +37 -0
- package/common/gaugeUtils.d.ts.map +1 -1
- package/common/gaugeUtils.js +152 -2
- package/common/gaugeUtils.js.map +4 -4
- package/common/hocs/mockdata/trellisData.d.ts +119 -0
- package/common/hocs/mockdata/trellisData.d.ts.map +1 -1
- package/common/hocs/withTrellis.d.ts.map +1 -1
- package/common/interfaces/DashboardVizProps.d.ts +0 -3
- package/common/interfaces/DashboardVizProps.d.ts.map +1 -1
- package/common/interfaces/DataSource.d.ts +1 -1
- package/common/interfaces/DataSource.d.ts.map +1 -1
- package/common/interfaces/Overview.d.ts +1 -0
- package/common/interfaces/Overview.d.ts.map +1 -1
- package/common/interfaces/VizConfig.d.ts +2 -1
- package/common/interfaces/VizConfig.d.ts.map +1 -1
- package/common/shapeUtils.js +5 -20
- package/common/shapeUtils.js.map +2 -2
- package/common/utils/dataUtils.d.ts.map +1 -1
- package/common/utils/dataUtils.js +5 -4
- package/common/utils/dataUtils.js.map +2 -2
- package/common/utils/mapUtils.js +16 -9
- package/common/utils/mapUtils.js.map +2 -2
- package/common/utils/singleValueUtils.js +17 -18
- package/common/utils/singleValueUtils.js.map +2 -2
- package/common/utils/textUtils.d.ts +20 -0
- package/common/utils/textUtils.d.ts.map +1 -0
- package/common/utils/textUtils.js +76 -0
- package/common/utils/textUtils.js.map +7 -0
- package/common/utils/trellisUtils.d.ts.map +1 -1
- package/common/utils/trellisUtils.js +16 -20
- package/common/utils/trellisUtils.js.map +2 -2
- package/common/withDashboardViz.d.ts.map +1 -1
- package/common/withDashboardViz.js +600 -92
- package/common/withDashboardViz.js.map +4 -4
- package/package.json +46 -39
- package/common/utils/styleUtils.d.ts +0 -2
- package/common/utils/styleUtils.d.ts.map +0 -1
- package/common/utils/styleUtils.js +0 -30
- package/common/utils/styleUtils.js.map +0 -7
package/Ellipse.js
CHANGED
|
@@ -141,14 +141,23 @@ var defaultImport8 = __toESM(require("@splunk/themes/variables"));
|
|
|
141
141
|
__reExport(variables_exports, require("@splunk/themes/variables"));
|
|
142
142
|
var variables_default = "default" in defaultImport8 ? defaultImport8.default : defaultImport8;
|
|
143
143
|
|
|
144
|
+
// esm-externals:@splunk/react-icons/Circle
|
|
145
|
+
var Circle_exports = {};
|
|
146
|
+
__export(Circle_exports, {
|
|
147
|
+
default: () => Circle_default
|
|
148
|
+
});
|
|
149
|
+
var defaultImport9 = __toESM(require("@splunk/react-icons/Circle"));
|
|
150
|
+
__reExport(Circle_exports, require("@splunk/react-icons/Circle"));
|
|
151
|
+
var Circle_default = "default" in defaultImport9 ? defaultImport9.default : defaultImport9;
|
|
152
|
+
|
|
144
153
|
// esm-externals:@splunk/visualizations-shared/configUtils
|
|
145
154
|
var configUtils_exports = {};
|
|
146
155
|
__export(configUtils_exports, {
|
|
147
156
|
default: () => configUtils_default
|
|
148
157
|
});
|
|
149
|
-
var
|
|
158
|
+
var defaultImport10 = __toESM(require("@splunk/visualizations-shared/configUtils"));
|
|
150
159
|
__reExport(configUtils_exports, require("@splunk/visualizations-shared/configUtils"));
|
|
151
|
-
var configUtils_default = "default" in
|
|
160
|
+
var configUtils_default = "default" in defaultImport10 ? defaultImport10.default : defaultImport10;
|
|
152
161
|
|
|
153
162
|
// src/common/utils/configUtils.ts
|
|
154
163
|
function enhanceConfig(vizConfig) {
|
|
@@ -535,7 +544,7 @@ var config = {
|
|
|
535
544
|
/**
|
|
536
545
|
* viz icon
|
|
537
546
|
*/
|
|
538
|
-
icon:
|
|
547
|
+
icon: Circle_default,
|
|
539
548
|
dataContract,
|
|
540
549
|
size,
|
|
541
550
|
defaultContext,
|
|
@@ -557,99 +566,99 @@ var getSettingsFromThemedProps_exports = {};
|
|
|
557
566
|
__export(getSettingsFromThemedProps_exports, {
|
|
558
567
|
default: () => getSettingsFromThemedProps_default
|
|
559
568
|
});
|
|
560
|
-
var
|
|
569
|
+
var defaultImport11 = __toESM(require("@splunk/themes/getSettingsFromThemedProps"));
|
|
561
570
|
__reExport(getSettingsFromThemedProps_exports, require("@splunk/themes/getSettingsFromThemedProps"));
|
|
562
|
-
var getSettingsFromThemedProps_default = "default" in
|
|
571
|
+
var getSettingsFromThemedProps_default = "default" in defaultImport11 ? defaultImport11.default : defaultImport11;
|
|
563
572
|
|
|
564
573
|
// esm-externals:@splunk/visualization-encoding/Options
|
|
565
574
|
var Options_exports = {};
|
|
566
575
|
__export(Options_exports, {
|
|
567
576
|
default: () => Options_default
|
|
568
577
|
});
|
|
569
|
-
var
|
|
578
|
+
var defaultImport12 = __toESM(require("@splunk/visualization-encoding/Options"));
|
|
570
579
|
__reExport(Options_exports, require("@splunk/visualization-encoding/Options"));
|
|
571
|
-
var Options_default = "default" in
|
|
580
|
+
var Options_default = "default" in defaultImport12 ? defaultImport12.default : defaultImport12;
|
|
572
581
|
|
|
573
582
|
// esm-externals:@splunk/visualizations-shared/SanitizeProps
|
|
574
583
|
var SanitizeProps_exports = {};
|
|
575
584
|
__export(SanitizeProps_exports, {
|
|
576
585
|
default: () => SanitizeProps_default
|
|
577
586
|
});
|
|
578
|
-
var
|
|
587
|
+
var defaultImport13 = __toESM(require("@splunk/visualizations-shared/SanitizeProps"));
|
|
579
588
|
__reExport(SanitizeProps_exports, require("@splunk/visualizations-shared/SanitizeProps"));
|
|
580
|
-
var SanitizeProps_default = "default" in
|
|
589
|
+
var SanitizeProps_default = "default" in defaultImport13 ? defaultImport13.default : defaultImport13;
|
|
581
590
|
|
|
582
591
|
// esm-externals:@splunk/visualization-context/TimezoneContext
|
|
583
592
|
var TimezoneContext_exports = {};
|
|
584
593
|
__export(TimezoneContext_exports, {
|
|
585
594
|
default: () => TimezoneContext_default
|
|
586
595
|
});
|
|
587
|
-
var
|
|
596
|
+
var defaultImport14 = __toESM(require("@splunk/visualization-context/TimezoneContext"));
|
|
588
597
|
__reExport(TimezoneContext_exports, require("@splunk/visualization-context/TimezoneContext"));
|
|
589
|
-
var TimezoneContext_default = "default" in
|
|
598
|
+
var TimezoneContext_default = "default" in defaultImport14 ? defaultImport14.default : defaultImport14;
|
|
590
599
|
|
|
591
600
|
// esm-externals:@splunk/moment
|
|
592
601
|
var moment_exports = {};
|
|
593
602
|
__export(moment_exports, {
|
|
594
603
|
default: () => moment_default
|
|
595
604
|
});
|
|
596
|
-
var
|
|
605
|
+
var defaultImport15 = __toESM(require("@splunk/moment"));
|
|
597
606
|
__reExport(moment_exports, require("@splunk/moment"));
|
|
598
|
-
var moment_default = "default" in
|
|
607
|
+
var moment_default = "default" in defaultImport15 ? defaultImport15.default : defaultImport15;
|
|
599
608
|
|
|
600
609
|
// esm-externals:@splunk/visualization-context/FeatureFlagContext
|
|
601
610
|
var FeatureFlagContext_exports = {};
|
|
602
611
|
__export(FeatureFlagContext_exports, {
|
|
603
612
|
default: () => FeatureFlagContext_default
|
|
604
613
|
});
|
|
605
|
-
var
|
|
614
|
+
var defaultImport16 = __toESM(require("@splunk/visualization-context/FeatureFlagContext"));
|
|
606
615
|
__reExport(FeatureFlagContext_exports, require("@splunk/visualization-context/FeatureFlagContext"));
|
|
607
|
-
var FeatureFlagContext_default = "default" in
|
|
616
|
+
var FeatureFlagContext_default = "default" in defaultImport16 ? defaultImport16.default : defaultImport16;
|
|
608
617
|
|
|
609
618
|
// esm-externals:@splunk/visualizations-shared/hocUtils
|
|
610
619
|
var hocUtils_exports = {};
|
|
611
620
|
__export(hocUtils_exports, {
|
|
612
621
|
default: () => hocUtils_default
|
|
613
622
|
});
|
|
614
|
-
var
|
|
623
|
+
var defaultImport17 = __toESM(require("@splunk/visualizations-shared/hocUtils"));
|
|
615
624
|
__reExport(hocUtils_exports, require("@splunk/visualizations-shared/hocUtils"));
|
|
616
|
-
var hocUtils_default = "default" in
|
|
625
|
+
var hocUtils_default = "default" in defaultImport17 ? defaultImport17.default : defaultImport17;
|
|
617
626
|
|
|
618
627
|
// esm-externals:@splunk/visualizations-shared/JSONSchemaUtils
|
|
619
628
|
var JSONSchemaUtils_exports = {};
|
|
620
629
|
__export(JSONSchemaUtils_exports, {
|
|
621
630
|
default: () => JSONSchemaUtils_default
|
|
622
631
|
});
|
|
623
|
-
var
|
|
632
|
+
var defaultImport18 = __toESM(require("@splunk/visualizations-shared/JSONSchemaUtils"));
|
|
624
633
|
__reExport(JSONSchemaUtils_exports, require("@splunk/visualizations-shared/JSONSchemaUtils"));
|
|
625
|
-
var JSONSchemaUtils_default = "default" in
|
|
634
|
+
var JSONSchemaUtils_default = "default" in defaultImport18 ? defaultImport18.default : defaultImport18;
|
|
626
635
|
|
|
627
636
|
// esm-externals:@splunk/async-dynamic-options-evaluator
|
|
628
637
|
var async_dynamic_options_evaluator_exports = {};
|
|
629
638
|
__export(async_dynamic_options_evaluator_exports, {
|
|
630
639
|
default: () => async_dynamic_options_evaluator_default
|
|
631
640
|
});
|
|
632
|
-
var
|
|
641
|
+
var defaultImport19 = __toESM(require("@splunk/async-dynamic-options-evaluator"));
|
|
633
642
|
__reExport(async_dynamic_options_evaluator_exports, require("@splunk/async-dynamic-options-evaluator"));
|
|
634
|
-
var async_dynamic_options_evaluator_default = "default" in
|
|
643
|
+
var async_dynamic_options_evaluator_default = "default" in defaultImport19 ? defaultImport19.default : defaultImport19;
|
|
635
644
|
|
|
636
645
|
// esm-externals:@splunk/ui-utils/id
|
|
637
646
|
var id_exports = {};
|
|
638
647
|
__export(id_exports, {
|
|
639
648
|
default: () => id_default
|
|
640
649
|
});
|
|
641
|
-
var
|
|
650
|
+
var defaultImport20 = __toESM(require("@splunk/ui-utils/id"));
|
|
642
651
|
__reExport(id_exports, require("@splunk/ui-utils/id"));
|
|
643
|
-
var id_default = "default" in
|
|
652
|
+
var id_default = "default" in defaultImport20 ? defaultImport20.default : defaultImport20;
|
|
644
653
|
|
|
645
654
|
// esm-externals:prop-types
|
|
646
655
|
var prop_types_exports = {};
|
|
647
656
|
__export(prop_types_exports, {
|
|
648
657
|
default: () => prop_types_default
|
|
649
658
|
});
|
|
650
|
-
var
|
|
659
|
+
var defaultImport21 = __toESM(require("prop-types"));
|
|
651
660
|
__reExport(prop_types_exports, require("prop-types"));
|
|
652
|
-
var prop_types_default = "default" in
|
|
661
|
+
var prop_types_default = "default" in defaultImport21 ? defaultImport21.default : defaultImport21;
|
|
653
662
|
|
|
654
663
|
// src/common/interfaces/VizActionHandler.ts
|
|
655
664
|
var DefaultVizActionHandler = class {
|
|
@@ -857,18 +866,18 @@ var Message_exports = {};
|
|
|
857
866
|
__export(Message_exports, {
|
|
858
867
|
default: () => Message_default
|
|
859
868
|
});
|
|
860
|
-
var
|
|
869
|
+
var defaultImport22 = __toESM(require("@splunk/visualizations-shared/Message"));
|
|
861
870
|
__reExport(Message_exports, require("@splunk/visualizations-shared/Message"));
|
|
862
|
-
var Message_default = "default" in
|
|
871
|
+
var Message_default = "default" in defaultImport22 ? defaultImport22.default : defaultImport22;
|
|
863
872
|
|
|
864
873
|
// esm-externals:@splunk/visualizations-shared/SizeAwareWrapper
|
|
865
874
|
var SizeAwareWrapper_exports = {};
|
|
866
875
|
__export(SizeAwareWrapper_exports, {
|
|
867
876
|
default: () => SizeAwareWrapper_default
|
|
868
877
|
});
|
|
869
|
-
var
|
|
878
|
+
var defaultImport23 = __toESM(require("@splunk/visualizations-shared/SizeAwareWrapper"));
|
|
870
879
|
__reExport(SizeAwareWrapper_exports, require("@splunk/visualizations-shared/SizeAwareWrapper"));
|
|
871
|
-
var SizeAwareWrapper_default = "default" in
|
|
880
|
+
var SizeAwareWrapper_default = "default" in defaultImport23 ? defaultImport23.default : defaultImport23;
|
|
872
881
|
|
|
873
882
|
// src/common/components/MissingPropsMessage.tsx
|
|
874
883
|
var isMissing = (v) => {
|
|
@@ -923,7 +932,7 @@ var Cover = styled_components_default.div`
|
|
|
923
932
|
bottom: 0;
|
|
924
933
|
`;
|
|
925
934
|
var Blocker = styled_components_default.div.attrs({
|
|
926
|
-
"data-splunk-visualization-version": "28.
|
|
935
|
+
"data-splunk-visualization-version": "28.5.0 - b192418b7"
|
|
927
936
|
})`
|
|
928
937
|
position: relative;
|
|
929
938
|
width: 100%;
|
|
@@ -945,18 +954,18 @@ var colorUtils_exports = {};
|
|
|
945
954
|
__export(colorUtils_exports, {
|
|
946
955
|
default: () => colorUtils_default
|
|
947
956
|
});
|
|
948
|
-
var
|
|
957
|
+
var defaultImport24 = __toESM(require("@splunk/visualizations-shared/colorUtils"));
|
|
949
958
|
__reExport(colorUtils_exports, require("@splunk/visualizations-shared/colorUtils"));
|
|
950
|
-
var colorUtils_default = "default" in
|
|
959
|
+
var colorUtils_default = "default" in defaultImport24 ? defaultImport24.default : defaultImport24;
|
|
951
960
|
|
|
952
961
|
// esm-externals:@splunk/visualizations-shared/style
|
|
953
962
|
var style_exports = {};
|
|
954
963
|
__export(style_exports, {
|
|
955
964
|
default: () => style_default
|
|
956
965
|
});
|
|
957
|
-
var
|
|
966
|
+
var defaultImport25 = __toESM(require("@splunk/visualizations-shared/style"));
|
|
958
967
|
__reExport(style_exports, require("@splunk/visualizations-shared/style"));
|
|
959
|
-
var style_default = "default" in
|
|
968
|
+
var style_default = "default" in defaultImport25 ? defaultImport25.default : defaultImport25;
|
|
960
969
|
|
|
961
970
|
// src/common/hocs/FixedSizeContainer.tsx
|
|
962
971
|
var Item = styled_components_default.div.attrs(({ width }) => ({
|
|
@@ -1013,7 +1022,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
1013
1022
|
FixSizeItem,
|
|
1014
1023
|
{
|
|
1015
1024
|
"data-test": "fix-size-item",
|
|
1016
|
-
"data-splunk-visualization-version": "28.
|
|
1025
|
+
"data-splunk-visualization-version": "28.5.0 - b192418b7",
|
|
1017
1026
|
width,
|
|
1018
1027
|
height,
|
|
1019
1028
|
backgroundColor
|
|
@@ -1104,11 +1113,12 @@ var numberUtils_exports = {};
|
|
|
1104
1113
|
__export(numberUtils_exports, {
|
|
1105
1114
|
default: () => numberUtils_default
|
|
1106
1115
|
});
|
|
1107
|
-
var
|
|
1116
|
+
var defaultImport26 = __toESM(require("@splunk/visualizations-shared/numberUtils"));
|
|
1108
1117
|
__reExport(numberUtils_exports, require("@splunk/visualizations-shared/numberUtils"));
|
|
1109
|
-
var numberUtils_default = "default" in
|
|
1118
|
+
var numberUtils_default = "default" in defaultImport26 ? defaultImport26.default : defaultImport26;
|
|
1110
1119
|
|
|
1111
1120
|
// src/common/utils/dataUtils.ts
|
|
1121
|
+
var getFieldName = (field) => typeof field === "string" ? field : field.name;
|
|
1112
1122
|
var largestTriangleThreeBuckets = (data, threshold, preferredDownsampleIndices) => {
|
|
1113
1123
|
const dataLength = data.length;
|
|
1114
1124
|
const downsampledIndices = [];
|
|
@@ -1225,9 +1235,9 @@ var tryToCoerceAllDisplayedFields = (ds, xField, yFields, fieldTypes, options) =
|
|
|
1225
1235
|
let xColumn = [];
|
|
1226
1236
|
const yColumns = [];
|
|
1227
1237
|
const canDownsample = !ds.data.fields.some((field, index) => {
|
|
1228
|
-
var _a
|
|
1229
|
-
const fieldName = (
|
|
1230
|
-
const fieldType = (
|
|
1238
|
+
var _a;
|
|
1239
|
+
const fieldName = getFieldName(field);
|
|
1240
|
+
const fieldType = (_a = fieldTypes[index]) != null ? _a : "unknown";
|
|
1231
1241
|
const column = ds.data.columns[index];
|
|
1232
1242
|
let hasDisplayedColumnThatCantBeDownsampled = false;
|
|
1233
1243
|
if (fieldName === xField) {
|
|
@@ -1486,9 +1496,9 @@ var FeatureFlags_exports = {};
|
|
|
1486
1496
|
__export(FeatureFlags_exports, {
|
|
1487
1497
|
default: () => FeatureFlags_default
|
|
1488
1498
|
});
|
|
1489
|
-
var
|
|
1499
|
+
var defaultImport27 = __toESM(require("@splunk/visualization-context/FeatureFlags"));
|
|
1490
1500
|
__reExport(FeatureFlags_exports, require("@splunk/visualization-context/FeatureFlags"));
|
|
1491
|
-
var FeatureFlags_default = "default" in
|
|
1501
|
+
var FeatureFlags_default = "default" in defaultImport27 ? defaultImport27.default : defaultImport27;
|
|
1492
1502
|
|
|
1493
1503
|
// src/common/utils/featureFlagUtils.ts
|
|
1494
1504
|
var getFeatureFlag = (context, flagName) => {
|
|
@@ -1506,9 +1516,9 @@ var trellisUtils_exports = {};
|
|
|
1506
1516
|
__export(trellisUtils_exports, {
|
|
1507
1517
|
default: () => trellisUtils_default
|
|
1508
1518
|
});
|
|
1509
|
-
var
|
|
1519
|
+
var defaultImport28 = __toESM(require("@splunk/visualizations-shared/trellisUtils"));
|
|
1510
1520
|
__reExport(trellisUtils_exports, require("@splunk/visualizations-shared/trellisUtils"));
|
|
1511
|
-
var trellisUtils_default = "default" in
|
|
1521
|
+
var trellisUtils_default = "default" in defaultImport28 ? defaultImport28.default : defaultImport28;
|
|
1512
1522
|
|
|
1513
1523
|
// src/common/utils/trellisUtils.ts
|
|
1514
1524
|
var turnOffLegendDisplayWhenTrellisIsOn = (isTrellisOn, options) => {
|
|
@@ -1525,9 +1535,9 @@ var visualization_canvas_exports = {};
|
|
|
1525
1535
|
__export(visualization_canvas_exports, {
|
|
1526
1536
|
default: () => visualization_canvas_default
|
|
1527
1537
|
});
|
|
1528
|
-
var
|
|
1538
|
+
var defaultImport29 = __toESM(require("@splunk/visualization-canvas"));
|
|
1529
1539
|
__reExport(visualization_canvas_exports, require("@splunk/visualization-canvas"));
|
|
1530
|
-
var visualization_canvas_default = "default" in
|
|
1540
|
+
var visualization_canvas_default = "default" in defaultImport29 ? defaultImport29.default : defaultImport29;
|
|
1531
1541
|
|
|
1532
1542
|
// src/common/components/VizStyleWrapper.jsx
|
|
1533
1543
|
var VizStyleWrapper = styled_components_default.div.attrs(({ dataTestKey }) => ({
|
|
@@ -1549,9 +1559,9 @@ var Triangle_exports = {};
|
|
|
1549
1559
|
__export(Triangle_exports, {
|
|
1550
1560
|
default: () => Triangle_default
|
|
1551
1561
|
});
|
|
1552
|
-
var
|
|
1562
|
+
var defaultImport30 = __toESM(require("@splunk/react-icons/Triangle"));
|
|
1553
1563
|
__reExport(Triangle_exports, require("@splunk/react-icons/Triangle"));
|
|
1554
|
-
var Triangle_default = "default" in
|
|
1564
|
+
var Triangle_default = "default" in defaultImport30 ? defaultImport30.default : defaultImport30;
|
|
1555
1565
|
|
|
1556
1566
|
// src/common/chartingUtils.ts
|
|
1557
1567
|
var DEFAULT_LINE_WIDTH = 2;
|
|
@@ -1580,6 +1590,16 @@ var triangleEventAnnotationRenderer = ({
|
|
|
1580
1590
|
eventColor: eventWithColor.color
|
|
1581
1591
|
});
|
|
1582
1592
|
};
|
|
1593
|
+
var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
|
|
1594
|
+
const rangeSelectEventHandler = eventHandlers.find(
|
|
1595
|
+
(eventHandler) => {
|
|
1596
|
+
var _a;
|
|
1597
|
+
return (_a = eventHandler.options.events) == null ? void 0 : _a.includes("range.select");
|
|
1598
|
+
}
|
|
1599
|
+
);
|
|
1600
|
+
const xAxisIsTime = xField === "_time";
|
|
1601
|
+
return !!rangeSelectEventHandler && xAxisIsTime;
|
|
1602
|
+
};
|
|
1583
1603
|
var canvasSupportedTimeSeriesCharts = ["splunk.line"];
|
|
1584
1604
|
var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
|
|
1585
1605
|
return canvasSupportedTimeSeriesCharts.indexOf(vizConfigKey) > -1;
|
|
@@ -1600,17 +1620,34 @@ var filterChartDataFromInternalFields = (chartData) => {
|
|
|
1600
1620
|
var convert2DArrayToNumbers = (arr) => {
|
|
1601
1621
|
return arr.map((subArray) => subArray.map((element) => parseFloat(element)));
|
|
1602
1622
|
};
|
|
1603
|
-
var
|
|
1604
|
-
|
|
1623
|
+
var parseAxisValue = (val) => {
|
|
1624
|
+
if (val === void 0 || val === null || val === "auto" || val === "") {
|
|
1625
|
+
return void 0;
|
|
1626
|
+
}
|
|
1627
|
+
const num = typeof val === "number" ? val : Number.parseFloat(val);
|
|
1628
|
+
return Number.isNaN(num) ? void 0 : num;
|
|
1629
|
+
};
|
|
1630
|
+
var parseXAxisLineVisibility = (visibility) => {
|
|
1631
|
+
if (visibility === "hide") return false;
|
|
1632
|
+
if (visibility === "show") return true;
|
|
1633
|
+
return void 0;
|
|
1634
|
+
};
|
|
1605
1635
|
var getLegend = (props) => {
|
|
1606
1636
|
const legendPlacement = props == null ? void 0 : props.legendDisplay;
|
|
1637
|
+
const { isSeriesCompare, legendTruncation } = props;
|
|
1638
|
+
const commonLegendProps = {
|
|
1639
|
+
center: true,
|
|
1640
|
+
fontSize: 12,
|
|
1641
|
+
largerTiles: true,
|
|
1642
|
+
hideSeriesValue: !isSeriesCompare,
|
|
1643
|
+
// Show values if in seriesCompare mode
|
|
1644
|
+
legendTruncation
|
|
1645
|
+
};
|
|
1607
1646
|
switch (legendPlacement) {
|
|
1608
1647
|
case "off":
|
|
1609
1648
|
return false;
|
|
1610
1649
|
case "left":
|
|
1611
|
-
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
|
|
1612
|
-
width: SideLegendWidth
|
|
1613
|
-
}, commonLegendProps));
|
|
1650
|
+
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
1614
1651
|
case "bottom":
|
|
1615
1652
|
return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
|
|
1616
1653
|
wrap: true
|
|
@@ -1620,9 +1657,7 @@ var getLegend = (props) => {
|
|
|
1620
1657
|
wrap: true
|
|
1621
1658
|
}, commonLegendProps));
|
|
1622
1659
|
default:
|
|
1623
|
-
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
|
|
1624
|
-
width: SideLegendWidth
|
|
1625
|
-
}, commonLegendProps));
|
|
1660
|
+
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
1626
1661
|
}
|
|
1627
1662
|
};
|
|
1628
1663
|
var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
|
|
@@ -1657,22 +1692,25 @@ var ellipsisAxisTitle = (axisTitle, containerSpacing, fontSize = 12) => {
|
|
|
1657
1692
|
const end = axisTitle.slice(-halfChars);
|
|
1658
1693
|
return `${start}...${end}`;
|
|
1659
1694
|
};
|
|
1660
|
-
var
|
|
1695
|
+
var getFieldName2 = (field) => {
|
|
1661
1696
|
const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
|
|
1662
1697
|
return fieldName;
|
|
1663
1698
|
};
|
|
1664
1699
|
var getFieldNames = (fields) => {
|
|
1665
|
-
return fields.map((field) =>
|
|
1700
|
+
return fields.map((field) => getFieldName2(field));
|
|
1666
1701
|
};
|
|
1667
|
-
var getXScaleConfig = (label, xAxisLabelVisibility) => {
|
|
1702
|
+
var getXScaleConfig = (label, xAxisLabelVisibility, xAxisLabelRotation) => {
|
|
1668
1703
|
const xConfig = { x: {} };
|
|
1669
1704
|
xConfig.x.label = label;
|
|
1670
1705
|
if (xAxisLabelVisibility === "hide") {
|
|
1671
1706
|
xConfig.x.hideLabels = true;
|
|
1672
1707
|
}
|
|
1708
|
+
if (xAxisLabelRotation !== void 0) {
|
|
1709
|
+
xConfig.x.labelRotation = xAxisLabelRotation;
|
|
1710
|
+
}
|
|
1673
1711
|
return xConfig;
|
|
1674
1712
|
};
|
|
1675
|
-
var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility) => {
|
|
1713
|
+
var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax) => {
|
|
1676
1714
|
const scaleType = yAxisScale != null ? yAxisScale : "linear";
|
|
1677
1715
|
const yConfig = { y: {} };
|
|
1678
1716
|
yConfig.y.label = label;
|
|
@@ -1680,34 +1718,46 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
|
|
|
1680
1718
|
if (yAxisAbbreviation !== "none") {
|
|
1681
1719
|
yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
|
|
1682
1720
|
}
|
|
1683
|
-
if (yAxisAbbreviation
|
|
1684
|
-
yConfig.y.width = 55;
|
|
1685
|
-
} else {
|
|
1721
|
+
if (yAxisAbbreviation !== "none") {
|
|
1686
1722
|
yConfig.y.width = label && label.length > 0 ? 30 : 10;
|
|
1687
1723
|
}
|
|
1688
1724
|
if (yAxisLabelVisibility === "hide") {
|
|
1689
1725
|
yConfig.y.hideLabels = true;
|
|
1690
1726
|
}
|
|
1727
|
+
if (yAxisMin !== void 0 || yAxisMax !== void 0) {
|
|
1728
|
+
yConfig.y.range = (u, dataMin, dataMax) => {
|
|
1729
|
+
const min = yAxisMin != null ? yAxisMin : dataMin;
|
|
1730
|
+
const max = yAxisMax != null ? yAxisMax : dataMax;
|
|
1731
|
+
return [min, max];
|
|
1732
|
+
};
|
|
1733
|
+
}
|
|
1691
1734
|
return yConfig;
|
|
1692
1735
|
};
|
|
1693
|
-
var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility) => {
|
|
1736
|
+
var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility, y2AxisMin, y2AxisMax) => {
|
|
1694
1737
|
const y2Config = { y2: {} };
|
|
1695
1738
|
const scaleType = axisScale != null ? axisScale : "linear";
|
|
1696
1739
|
y2Config.y2.label = label;
|
|
1697
1740
|
y2Config.y2.side = "right";
|
|
1698
|
-
y2Config.y2.showGrid = false;
|
|
1699
1741
|
y2Config.y2.type = scaleType;
|
|
1700
1742
|
if (axisAbbreviation !== "none") {
|
|
1701
1743
|
y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
|
|
1744
|
+
y2Config.y2.width = label && label.length > 0 ? 50 : 10;
|
|
1702
1745
|
} else if (roundAxisLabelsToInteger) {
|
|
1703
1746
|
y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
|
|
1704
1747
|
}
|
|
1705
1748
|
if (y2AxisLabelVisibility === "hide") {
|
|
1706
1749
|
y2Config.y2.hideLabels = true;
|
|
1707
1750
|
}
|
|
1751
|
+
if (y2AxisMin !== void 0 || y2AxisMax !== void 0) {
|
|
1752
|
+
y2Config.y2.range = (u, dataMin, dataMax) => {
|
|
1753
|
+
const min = y2AxisMin != null ? y2AxisMin : dataMin;
|
|
1754
|
+
const max = y2AxisMax != null ? y2AxisMax : dataMax;
|
|
1755
|
+
return [min, max];
|
|
1756
|
+
};
|
|
1757
|
+
}
|
|
1708
1758
|
return y2Config;
|
|
1709
1759
|
};
|
|
1710
|
-
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay) => {
|
|
1760
|
+
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
|
|
1711
1761
|
const seriesConfig = {};
|
|
1712
1762
|
let spanGaps;
|
|
1713
1763
|
let replaceNullsWithZero;
|
|
@@ -1734,6 +1784,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
1734
1784
|
);
|
|
1735
1785
|
if (shouldAssignToY2) {
|
|
1736
1786
|
seriesConfig[field].overrides.scale = "y2";
|
|
1787
|
+
} else {
|
|
1788
|
+
seriesConfig[field].overrides.scale = "y";
|
|
1737
1789
|
}
|
|
1738
1790
|
}
|
|
1739
1791
|
if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
|
|
@@ -1742,12 +1794,92 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
1742
1794
|
if (markerDisplay !== void 0) {
|
|
1743
1795
|
seriesConfig[field].markerDisplay = markerDisplay;
|
|
1744
1796
|
}
|
|
1797
|
+
const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
|
|
1798
|
+
if (fieldDashStyle) {
|
|
1799
|
+
seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
1800
|
+
}
|
|
1801
|
+
const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
|
|
1802
|
+
const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
|
|
1803
|
+
if (fieldStepPosition && fieldStepPosition !== "off") {
|
|
1804
|
+
seriesConfig[field].stepPosition = fieldStepPosition;
|
|
1805
|
+
}
|
|
1745
1806
|
if (replaceNullsWithZero !== void 0) {
|
|
1746
1807
|
seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
|
|
1747
1808
|
}
|
|
1748
1809
|
});
|
|
1749
1810
|
return seriesConfig;
|
|
1750
1811
|
};
|
|
1812
|
+
var findRangeIndices = (xData, startValue, endValue) => {
|
|
1813
|
+
let startXIndex = -1;
|
|
1814
|
+
let endXIndex = -1;
|
|
1815
|
+
const xDataEpoch = xData.map((val) => {
|
|
1816
|
+
if (typeof val === "string") {
|
|
1817
|
+
return new Date(val).getTime() / 1e3;
|
|
1818
|
+
}
|
|
1819
|
+
return val;
|
|
1820
|
+
});
|
|
1821
|
+
for (let i = 0; i < xDataEpoch.length; i += 1) {
|
|
1822
|
+
if (xDataEpoch[i] >= startValue) {
|
|
1823
|
+
startXIndex = i;
|
|
1824
|
+
break;
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
if (startXIndex === -1 && xDataEpoch.length > 0) {
|
|
1828
|
+
startXIndex = xDataEpoch.length - 1;
|
|
1829
|
+
}
|
|
1830
|
+
for (let i = xDataEpoch.length - 1; i >= 0; i -= 1) {
|
|
1831
|
+
if (xDataEpoch[i] <= endValue) {
|
|
1832
|
+
endXIndex = i;
|
|
1833
|
+
break;
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
if (endXIndex === -1 && xDataEpoch.length > 0) {
|
|
1837
|
+
endXIndex = 0;
|
|
1838
|
+
}
|
|
1839
|
+
return { startXIndex, endXIndex };
|
|
1840
|
+
};
|
|
1841
|
+
|
|
1842
|
+
// src/common/hooks/useTrellisEnabled.ts
|
|
1843
|
+
var useTrellisFeatureFlagOn = () => {
|
|
1844
|
+
const context = (0, react_exports.useContext)(FeatureFlagContext_default);
|
|
1845
|
+
return Boolean(context == null ? void 0 : context.visualizations_enableTrellis);
|
|
1846
|
+
};
|
|
1847
|
+
var useTrellisEnabled = (layoutType = visualization_schemas_exports.LAYOUT_TYPE.Off) => {
|
|
1848
|
+
const trellisFeatureEnabled = useTrellisFeatureFlagOn();
|
|
1849
|
+
return trellisFeatureEnabled && layoutType === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
1850
|
+
};
|
|
1851
|
+
|
|
1852
|
+
// src/common/components/TrellisTitle.tsx
|
|
1853
|
+
var TRELLIS_TITLE_HEIGHT = 28;
|
|
1854
|
+
var TrellisTitleText = styled_components_default.div`
|
|
1855
|
+
margin-left: 10px;
|
|
1856
|
+
margin-right: 10px;
|
|
1857
|
+
padding-top: 8px;
|
|
1858
|
+
text-overflow: ellipsis;
|
|
1859
|
+
white-space: nowrap;
|
|
1860
|
+
overflow: hidden;
|
|
1861
|
+
`;
|
|
1862
|
+
var TrellisTitleDiv = styled_components_default.div`
|
|
1863
|
+
height: ${TRELLIS_TITLE_HEIGHT}px;
|
|
1864
|
+
font-size: 14px;
|
|
1865
|
+
font-weight: 700;
|
|
1866
|
+
color: ${(props) => props.fontColor};
|
|
1867
|
+
background-color: ${(props) => props.backgroundColor};
|
|
1868
|
+
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.
|
|
1869
|
+
`;
|
|
1870
|
+
var TrellisTitle = (props) => {
|
|
1871
|
+
const titleText = String(props.trellisKey).toString();
|
|
1872
|
+
return /* @__PURE__ */ react_exports.createElement(
|
|
1873
|
+
TrellisTitleDiv,
|
|
1874
|
+
{
|
|
1875
|
+
fontColor: props.fontColor,
|
|
1876
|
+
backgroundColor: props.backgroundColor,
|
|
1877
|
+
"data-test": "trellis-title",
|
|
1878
|
+
title: titleText
|
|
1879
|
+
},
|
|
1880
|
+
/* @__PURE__ */ react_exports.createElement(TrellisTitleText, null, titleText)
|
|
1881
|
+
);
|
|
1882
|
+
};
|
|
1751
1883
|
|
|
1752
1884
|
// src/common/TimeSeriesChartWrapper.tsx
|
|
1753
1885
|
var TimeSeriesChartContainer = styled_components_default.div`
|
|
@@ -1758,38 +1890,123 @@ var TimeSeriesChartContainer = styled_components_default.div`
|
|
|
1758
1890
|
position: absolute !important; // This is needed for canvas element export pdf/png to work correctly
|
|
1759
1891
|
}
|
|
1760
1892
|
`;
|
|
1761
|
-
var
|
|
1893
|
+
var appendTrellisToPayload = (payload, trellisKey, trellisSplitBy) => {
|
|
1894
|
+
const result = __spreadValues({}, payload);
|
|
1895
|
+
if (trellisSplitBy) {
|
|
1896
|
+
result["trellis.name"] = trellisSplitBy;
|
|
1897
|
+
}
|
|
1898
|
+
if (trellisKey) {
|
|
1899
|
+
result["trellis.value"] = trellisKey;
|
|
1900
|
+
}
|
|
1901
|
+
return result;
|
|
1902
|
+
};
|
|
1903
|
+
var hasMouseoverPayloadChanged = (currentPayload, previousPayload) => {
|
|
1904
|
+
if (!previousPayload) {
|
|
1905
|
+
return true;
|
|
1906
|
+
}
|
|
1907
|
+
if (currentPayload.index !== previousPayload.index) {
|
|
1908
|
+
return true;
|
|
1909
|
+
}
|
|
1910
|
+
if (currentPayload.seriesIndex !== previousPayload.seriesIndex) {
|
|
1911
|
+
return true;
|
|
1912
|
+
}
|
|
1913
|
+
if (currentPayload["trellis.name"] !== previousPayload["trellis.name"]) {
|
|
1914
|
+
return true;
|
|
1915
|
+
}
|
|
1916
|
+
if (currentPayload["trellis.value"] !== previousPayload["trellis.value"]) {
|
|
1917
|
+
return true;
|
|
1918
|
+
}
|
|
1919
|
+
return false;
|
|
1920
|
+
};
|
|
1921
|
+
var handleClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
|
|
1762
1922
|
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(chartEvent, "value", "seriesKey")), {
|
|
1763
1923
|
name: chartEvent.seriesKey
|
|
1764
1924
|
});
|
|
1765
1925
|
delete payload.seriesKey;
|
|
1766
1926
|
if (chartEvent.rowContext) {
|
|
1767
|
-
Object.
|
|
1768
|
-
payload
|
|
1769
|
-
|
|
1927
|
+
Object.assign(
|
|
1928
|
+
payload,
|
|
1929
|
+
Object.keys(chartEvent.rowContext).reduce((acc, fieldName) => {
|
|
1930
|
+
acc[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
|
|
1931
|
+
return acc;
|
|
1932
|
+
}, {})
|
|
1933
|
+
);
|
|
1770
1934
|
}
|
|
1935
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1771
1936
|
if (onClick) {
|
|
1772
1937
|
onClick({
|
|
1773
1938
|
type: "point.click",
|
|
1774
1939
|
originalEvent: chartEvent,
|
|
1775
|
-
payload
|
|
1940
|
+
payload: updatedPayload
|
|
1776
1941
|
});
|
|
1777
1942
|
}
|
|
1778
1943
|
};
|
|
1779
|
-
var handleLegendClick = (chartEvent, onClick) => {
|
|
1944
|
+
var handleLegendClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
|
|
1780
1945
|
const payload = {
|
|
1781
1946
|
name: chartEvent
|
|
1782
1947
|
};
|
|
1948
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1783
1949
|
if (onClick) {
|
|
1784
1950
|
onClick({
|
|
1785
1951
|
type: "legend.click",
|
|
1786
1952
|
originalEvent: chartEvent,
|
|
1787
|
-
payload
|
|
1953
|
+
payload: updatedPayload
|
|
1954
|
+
});
|
|
1955
|
+
}
|
|
1956
|
+
};
|
|
1957
|
+
var handleRangeSelection = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
|
|
1958
|
+
var _a;
|
|
1959
|
+
if (!rangeEvent) {
|
|
1960
|
+
return;
|
|
1961
|
+
}
|
|
1962
|
+
const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
|
|
1963
|
+
const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
|
|
1964
|
+
const payload = {
|
|
1965
|
+
startXIndex,
|
|
1966
|
+
startXValue: rangeEvent.start,
|
|
1967
|
+
endXIndex,
|
|
1968
|
+
endXValue: rangeEvent.end
|
|
1969
|
+
};
|
|
1970
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1971
|
+
if (onSelect) {
|
|
1972
|
+
onSelect({
|
|
1973
|
+
type: "range.selectBeforeZoom",
|
|
1974
|
+
originalEvent: rangeEvent,
|
|
1975
|
+
payload: updatedPayload
|
|
1788
1976
|
});
|
|
1789
1977
|
}
|
|
1790
1978
|
};
|
|
1979
|
+
var handleRangeZoom = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
|
|
1980
|
+
var _a;
|
|
1981
|
+
const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
|
|
1982
|
+
const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
|
|
1983
|
+
const payload = {
|
|
1984
|
+
startXIndex,
|
|
1985
|
+
startXValue: rangeEvent.start,
|
|
1986
|
+
endXIndex,
|
|
1987
|
+
endXValue: rangeEvent.end
|
|
1988
|
+
};
|
|
1989
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1990
|
+
if (onSelect) {
|
|
1991
|
+
onSelect({
|
|
1992
|
+
type: "range.select",
|
|
1993
|
+
originalEvent: rangeEvent,
|
|
1994
|
+
payload: updatedPayload
|
|
1995
|
+
});
|
|
1996
|
+
}
|
|
1997
|
+
};
|
|
1998
|
+
var parseArrayOption = (value) => {
|
|
1999
|
+
if (Array.isArray(value)) {
|
|
2000
|
+
return value;
|
|
2001
|
+
}
|
|
2002
|
+
if (value) {
|
|
2003
|
+
return JSON.parse(value);
|
|
2004
|
+
}
|
|
2005
|
+
return void 0;
|
|
2006
|
+
};
|
|
1791
2007
|
var TimeSeriesChartWrapper = (props) => {
|
|
1792
|
-
|
|
2008
|
+
var _b, _c, _d;
|
|
2009
|
+
const _a = props, {
|
|
1793
2010
|
width,
|
|
1794
2011
|
height,
|
|
1795
2012
|
chartData,
|
|
@@ -1802,12 +2019,57 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1802
2019
|
markerDisplay,
|
|
1803
2020
|
onClick,
|
|
1804
2021
|
onPointMouseOver,
|
|
1805
|
-
onPointMouseOut
|
|
1806
|
-
|
|
1807
|
-
|
|
2022
|
+
onPointMouseOut,
|
|
2023
|
+
onSelect,
|
|
2024
|
+
splitByLayout,
|
|
2025
|
+
trellisKey,
|
|
2026
|
+
trellisSplitBy,
|
|
1808
2027
|
backgroundColor,
|
|
2028
|
+
defaultFontColor,
|
|
2029
|
+
additionalTooltipValues,
|
|
2030
|
+
xAxisLineVisibility: xAxisLineVisibility,
|
|
2031
|
+
yAxisLineVisibility,
|
|
2032
|
+
y2AxisLineVisibility,
|
|
2033
|
+
showYAxisWithZero: showYAxisWithZeroFromProps,
|
|
2034
|
+
showY2AxisWithZero: showY2AxisWithZeroFromProps
|
|
2035
|
+
} = _a, otherOptions = __objRest(_a, [
|
|
2036
|
+
"width",
|
|
2037
|
+
"height",
|
|
2038
|
+
"chartData",
|
|
2039
|
+
"options",
|
|
2040
|
+
"userLocale",
|
|
2041
|
+
"annotationX",
|
|
2042
|
+
"annotationLabel",
|
|
2043
|
+
"annotationColor",
|
|
2044
|
+
"legendDisplay",
|
|
2045
|
+
"markerDisplay",
|
|
2046
|
+
"onClick",
|
|
2047
|
+
"onPointMouseOver",
|
|
2048
|
+
"onPointMouseOut",
|
|
2049
|
+
"onSelect",
|
|
2050
|
+
"splitByLayout",
|
|
2051
|
+
"trellisKey",
|
|
2052
|
+
"trellisSplitBy",
|
|
2053
|
+
"backgroundColor",
|
|
2054
|
+
"defaultFontColor",
|
|
2055
|
+
"additionalTooltipValues",
|
|
2056
|
+
// Extract axis line visibility options from props
|
|
2057
|
+
"xAxisLineVisibility",
|
|
2058
|
+
"yAxisLineVisibility",
|
|
2059
|
+
"y2AxisLineVisibility",
|
|
2060
|
+
// Extract showYAxisWithZero directly from props for accelerated render mode
|
|
2061
|
+
"showYAxisWithZero",
|
|
2062
|
+
"showY2AxisWithZero"
|
|
2063
|
+
]);
|
|
2064
|
+
const { eventHandlers, xField: xFieldFromProps } = otherOptions;
|
|
2065
|
+
const trellisEnabled = useTrellisEnabled(splitByLayout);
|
|
2066
|
+
const {
|
|
2067
|
+
backgroundColor: bgColorFromOptions,
|
|
1809
2068
|
seriesColors: seriesColorsStr,
|
|
1810
2069
|
fieldColors,
|
|
2070
|
+
legendLabels: legendLabelsStr,
|
|
2071
|
+
legendMode,
|
|
2072
|
+
legendTruncation,
|
|
1811
2073
|
"axisTitleX.text": xAxisTitleText,
|
|
1812
2074
|
"axisTitleY.text": yAxisTitleText,
|
|
1813
2075
|
"axisTitleY2.text": y2AxisTitleText,
|
|
@@ -1815,8 +2077,12 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1815
2077
|
"axisTitleY.visibility": yAxisTitleVisibility,
|
|
1816
2078
|
"axisTitleY2.visibility": y2AxisTitleVisibility,
|
|
1817
2079
|
"axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
|
|
2080
|
+
"axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
|
|
2081
|
+
"axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
|
|
1818
2082
|
"axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
|
|
2083
|
+
"axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
|
|
1819
2084
|
"axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
|
|
2085
|
+
"axisLabelsY2.majorUnit": y2AxisMajorUnitFromSimpleXML,
|
|
1820
2086
|
"axisY.abbreviation": yAxisAbbreviation,
|
|
1821
2087
|
"axisY.scale": yAxisScale,
|
|
1822
2088
|
"axisY2.abbreviation": y2AxisAbbreviation,
|
|
@@ -1826,10 +2092,73 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1826
2092
|
"axisLabelsY2.integerUnits": y2IntegerUnits,
|
|
1827
2093
|
"chart.overlayFields": overlayFieldsStr,
|
|
1828
2094
|
"chart.nullValueMode": nullValueMode,
|
|
1829
|
-
|
|
2095
|
+
"chart.showDataLabels": showDataLabels,
|
|
2096
|
+
lineWidth,
|
|
2097
|
+
lineDashStyle,
|
|
2098
|
+
fieldDashStyles: lineDashStylesByFieldStr,
|
|
2099
|
+
stepPosition,
|
|
2100
|
+
fieldStepPositions: stepPositionsByFieldStr,
|
|
2101
|
+
yAxisMin: yAxisMinRaw,
|
|
2102
|
+
yAxisMax: yAxisMaxRaw,
|
|
2103
|
+
y2AxisMin: y2AxisMinRaw,
|
|
2104
|
+
y2AxisMax: y2AxisMaxRaw,
|
|
2105
|
+
showXMajorGridLines,
|
|
2106
|
+
showYMajorGridLines,
|
|
2107
|
+
showY2MajorGridLines,
|
|
2108
|
+
showYMinorGridLines,
|
|
2109
|
+
showY2MinorGridLines,
|
|
2110
|
+
showLineSmoothing,
|
|
2111
|
+
xAxisMajorTickVisibility,
|
|
2112
|
+
xAxisMajorTickSize,
|
|
2113
|
+
yAxisMajorTickVisibility,
|
|
2114
|
+
y2AxisMajorTickVisibility,
|
|
2115
|
+
yAxisMajorTickSize,
|
|
2116
|
+
y2AxisMajorTickSize,
|
|
2117
|
+
yAxisMajorTickInterval,
|
|
2118
|
+
y2AxisMajorTickInterval,
|
|
2119
|
+
yAxisMinorTickVisibility,
|
|
2120
|
+
y2AxisMinorTickVisibility,
|
|
2121
|
+
yAxisMinorTickSize,
|
|
2122
|
+
y2AxisMinorTickSize,
|
|
2123
|
+
showYAxisWithZero: showYAxisWithZeroFromOptions,
|
|
2124
|
+
showY2AxisWithZero: showY2AxisWithZeroFromOptions
|
|
1830
2125
|
} = options;
|
|
2126
|
+
const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
|
|
2127
|
+
const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
|
|
2128
|
+
const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
|
|
2129
|
+
const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
|
|
2130
|
+
const showYMajorTicks = yAxisMajorTickVisibility === "show";
|
|
2131
|
+
const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
|
|
2132
|
+
const showYMinorTicks = yAxisMinorTickVisibility === "show";
|
|
2133
|
+
const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
|
|
2134
|
+
const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
|
|
2135
|
+
const showYAxisLine = yAxisLineVisibility === "show";
|
|
2136
|
+
const showY2AxisLine = y2AxisLineVisibility === "show";
|
|
2137
|
+
const yAxisMin = parseAxisValue(yAxisMinRaw);
|
|
2138
|
+
const yAxisMax = parseAxisValue(yAxisMaxRaw);
|
|
2139
|
+
const y2AxisMin = parseAxisValue(y2AxisMinRaw);
|
|
2140
|
+
const y2AxisMax = parseAxisValue(y2AxisMaxRaw);
|
|
2141
|
+
const parseTickInterval = (simpleXMLValue, canvasValue) => {
|
|
2142
|
+
if (simpleXMLValue) return Number(simpleXMLValue);
|
|
2143
|
+
if (canvasValue) return Number(canvasValue);
|
|
2144
|
+
return void 0;
|
|
2145
|
+
};
|
|
2146
|
+
const yAxisMajorTickIntervalNum = parseTickInterval(yAxisMajorUnitFromSimpleXML, yAxisMajorTickInterval);
|
|
2147
|
+
const y2AxisMajorTickIntervalNum = parseTickInterval(
|
|
2148
|
+
y2AxisMajorUnitFromSimpleXML,
|
|
2149
|
+
y2AxisMajorTickInterval
|
|
2150
|
+
);
|
|
2151
|
+
const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
|
|
2152
|
+
const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
|
|
2153
|
+
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
|
|
2154
|
+
const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
|
|
2155
|
+
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
|
|
1831
2156
|
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
1832
2157
|
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
2158
|
+
const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
|
|
2159
|
+
const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
|
|
2160
|
+
const legendLabels = parseArrayOption(legendLabelsStr);
|
|
2161
|
+
const bgColor = backgroundColor || bgColorFromOptions;
|
|
1833
2162
|
const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
|
|
1834
2163
|
const [containerHeight, setContainerHeight] = react_exports.useState(Number(props.height));
|
|
1835
2164
|
const cachedHandleResize = react_exports.useCallback((w, h) => {
|
|
@@ -1840,31 +2169,64 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1840
2169
|
fields: chartData.fields,
|
|
1841
2170
|
columns: chartData.seriesList
|
|
1842
2171
|
});
|
|
1843
|
-
const xField =
|
|
2172
|
+
const xField = getFieldName2(filteredChartData.fields[0]);
|
|
1844
2173
|
const yFields = getFieldNames(
|
|
1845
2174
|
filteredChartData.fields.length > 1 ? filteredChartData.fields.slice(1) : []
|
|
1846
2175
|
);
|
|
1847
|
-
const y2Fields =
|
|
1848
|
-
|
|
2176
|
+
const y2Fields = (0, react_exports.useMemo)(
|
|
2177
|
+
() => y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [],
|
|
2178
|
+
[y2FieldsStr]
|
|
2179
|
+
);
|
|
2180
|
+
const overlayFields = (0, react_exports.useMemo)(
|
|
2181
|
+
() => overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [],
|
|
2182
|
+
[overlayFieldsStr]
|
|
2183
|
+
);
|
|
1849
2184
|
let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
|
|
1850
2185
|
xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
|
|
1851
|
-
|
|
2186
|
+
const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
|
|
2187
|
+
let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility);
|
|
1852
2188
|
yAxisTitle = ellipsisAxisTitle(yAxisTitle, containerHeight);
|
|
1853
2189
|
const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
|
|
1854
2190
|
let y2AxisTitle = getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility);
|
|
1855
2191
|
y2AxisTitle = ellipsisAxisTitle(y2AxisTitle, containerHeight);
|
|
1856
|
-
const xScaleConfig =
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
2192
|
+
const xScaleConfig = (0, react_exports.useMemo)(
|
|
2193
|
+
() => getXScaleConfig(xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation),
|
|
2194
|
+
[xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation]
|
|
2195
|
+
);
|
|
2196
|
+
const yScaleConfig = (0, react_exports.useMemo)(
|
|
2197
|
+
() => getYScaleConfig(
|
|
2198
|
+
yAxisTitle,
|
|
2199
|
+
yAxisAbbreviation,
|
|
2200
|
+
yAxisScale,
|
|
2201
|
+
yAxisLabelVisibility,
|
|
2202
|
+
yAxisMin,
|
|
2203
|
+
yAxisMax
|
|
2204
|
+
),
|
|
2205
|
+
[yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax]
|
|
2206
|
+
);
|
|
2207
|
+
const y2ScaleConfig = (0, react_exports.useMemo)(() => {
|
|
2208
|
+
if (y2Enabled) {
|
|
2209
|
+
return getY2ScaleConfig(
|
|
2210
|
+
y2AxisTitle,
|
|
2211
|
+
y2AxisAbbreviation,
|
|
2212
|
+
y2AxisScale,
|
|
2213
|
+
y2IntegerUnits,
|
|
2214
|
+
y2AxisLabelVisibility,
|
|
2215
|
+
y2AxisMin,
|
|
2216
|
+
y2AxisMax
|
|
2217
|
+
);
|
|
2218
|
+
}
|
|
2219
|
+
return {};
|
|
2220
|
+
}, [
|
|
2221
|
+
y2Enabled,
|
|
2222
|
+
y2AxisTitle,
|
|
2223
|
+
y2AxisAbbreviation,
|
|
2224
|
+
y2AxisScale,
|
|
2225
|
+
y2IntegerUnits,
|
|
2226
|
+
y2AxisLabelVisibility,
|
|
2227
|
+
y2AxisMin,
|
|
2228
|
+
y2AxisMax
|
|
2229
|
+
]);
|
|
1868
2230
|
const uplotContainerElement = (0, react_exports.useRef)(null);
|
|
1869
2231
|
const seriesDataFormatted = [
|
|
1870
2232
|
filteredChartData.columns[0],
|
|
@@ -1880,9 +2242,25 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1880
2242
|
overlayFields,
|
|
1881
2243
|
y2Enabled,
|
|
1882
2244
|
nullValueMode,
|
|
1883
|
-
markerDisplay
|
|
2245
|
+
markerDisplay,
|
|
2246
|
+
lineDashStyle,
|
|
2247
|
+
lineDashStylesByField,
|
|
2248
|
+
stepPosition,
|
|
2249
|
+
stepPositionsByField
|
|
1884
2250
|
),
|
|
1885
|
-
[
|
|
2251
|
+
[
|
|
2252
|
+
yFields,
|
|
2253
|
+
y2Fields,
|
|
2254
|
+
lineWidth,
|
|
2255
|
+
overlayFields,
|
|
2256
|
+
y2Enabled,
|
|
2257
|
+
nullValueMode,
|
|
2258
|
+
markerDisplay,
|
|
2259
|
+
lineDashStyle,
|
|
2260
|
+
lineDashStylesByField,
|
|
2261
|
+
stepPosition,
|
|
2262
|
+
stepPositionsByField
|
|
2263
|
+
]
|
|
1886
2264
|
);
|
|
1887
2265
|
const chartingEventAnnotations = (0, react_exports.useMemo)(
|
|
1888
2266
|
() => getAnnotationsForCanvas({
|
|
@@ -1896,25 +2274,59 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1896
2274
|
() => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
|
|
1897
2275
|
[xScaleConfig, yScaleConfig, y2ScaleConfig]
|
|
1898
2276
|
);
|
|
1899
|
-
const
|
|
2277
|
+
const isSeriesCompare = legendMode === "seriesCompare";
|
|
2278
|
+
const legend = (0, react_exports.useMemo)(
|
|
2279
|
+
() => getLegend({
|
|
2280
|
+
legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
|
|
2281
|
+
isSeriesCompare,
|
|
2282
|
+
legendTruncation
|
|
2283
|
+
}),
|
|
2284
|
+
[legendDisplay, isSeriesCompare, legendTruncation]
|
|
2285
|
+
);
|
|
1900
2286
|
const handleChartClick = react_exports.useCallback(
|
|
1901
2287
|
(event) => {
|
|
1902
2288
|
if (onClick) {
|
|
1903
|
-
handleClick(event, onClick);
|
|
2289
|
+
handleClick(event, onClick, trellisKey, trellisSplitBy);
|
|
1904
2290
|
}
|
|
1905
2291
|
},
|
|
1906
|
-
[onClick]
|
|
2292
|
+
[onClick, trellisKey, trellisSplitBy]
|
|
1907
2293
|
);
|
|
1908
2294
|
const handleChartLegendClick = react_exports.useCallback(
|
|
1909
2295
|
(event) => {
|
|
1910
2296
|
if (onClick) {
|
|
1911
|
-
handleLegendClick(event, onClick);
|
|
2297
|
+
handleLegendClick(event, onClick, trellisKey, trellisSplitBy);
|
|
1912
2298
|
}
|
|
1913
2299
|
},
|
|
1914
|
-
[onClick]
|
|
2300
|
+
[onClick, trellisKey, trellisSplitBy]
|
|
2301
|
+
);
|
|
2302
|
+
const handleChartRangeSelection = react_exports.useCallback(
|
|
2303
|
+
(range2) => {
|
|
2304
|
+
if (onSelect) {
|
|
2305
|
+
handleRangeSelection(range2, onSelect, chartData, trellisKey, trellisSplitBy);
|
|
2306
|
+
}
|
|
2307
|
+
},
|
|
2308
|
+
[onSelect, chartData, trellisKey, trellisSplitBy]
|
|
2309
|
+
);
|
|
2310
|
+
const handleChartRangeZoom = react_exports.useCallback(
|
|
2311
|
+
(range2) => {
|
|
2312
|
+
if (onSelect) {
|
|
2313
|
+
handleRangeZoom(range2, onSelect, chartData, trellisKey, trellisSplitBy);
|
|
2314
|
+
}
|
|
2315
|
+
},
|
|
2316
|
+
[onSelect, chartData, trellisKey, trellisSplitBy]
|
|
2317
|
+
);
|
|
2318
|
+
const xFieldToUse = xFieldFromProps || xField;
|
|
2319
|
+
const enableSearchZoom = react_exports.useMemo(
|
|
2320
|
+
() => shouldEnableSearchZoom(eventHandlers, xFieldToUse),
|
|
2321
|
+
[eventHandlers, xFieldToUse]
|
|
1915
2322
|
);
|
|
1916
2323
|
const lastPayloadRef = react_exports.useRef(null);
|
|
1917
2324
|
const lastOriginalEventRef = react_exports.useRef(null);
|
|
2325
|
+
const previousMouseoverPayloadRef = react_exports.useRef(null);
|
|
2326
|
+
const additionalTooltipValuesRef = react_exports.useRef(additionalTooltipValues);
|
|
2327
|
+
react_exports.useEffect(() => {
|
|
2328
|
+
additionalTooltipValuesRef.current = additionalTooltipValues;
|
|
2329
|
+
}, [additionalTooltipValues]);
|
|
1918
2330
|
const handleChartCrosshairChange = react_exports.useCallback(
|
|
1919
2331
|
(event) => {
|
|
1920
2332
|
if (onPointMouseOver || onPointMouseOut) {
|
|
@@ -1926,6 +2338,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1926
2338
|
payload: lastPayloadRef.current
|
|
1927
2339
|
});
|
|
1928
2340
|
}
|
|
2341
|
+
previousMouseoverPayloadRef.current = null;
|
|
1929
2342
|
return;
|
|
1930
2343
|
}
|
|
1931
2344
|
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
|
|
@@ -1933,25 +2346,36 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1933
2346
|
});
|
|
1934
2347
|
delete payload.seriesKey;
|
|
1935
2348
|
if (event.rowContext) {
|
|
1936
|
-
Object.
|
|
1937
|
-
payload
|
|
1938
|
-
|
|
2349
|
+
Object.assign(
|
|
2350
|
+
payload,
|
|
2351
|
+
Object.keys(event.rowContext).reduce((acc, fieldName) => {
|
|
2352
|
+
acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
|
|
2353
|
+
return acc;
|
|
2354
|
+
}, {})
|
|
2355
|
+
);
|
|
2356
|
+
}
|
|
2357
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
2358
|
+
if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
|
|
2359
|
+
return;
|
|
1939
2360
|
}
|
|
1940
|
-
lastPayloadRef.current =
|
|
2361
|
+
lastPayloadRef.current = updatedPayload;
|
|
1941
2362
|
lastOriginalEventRef.current = event;
|
|
2363
|
+
previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
|
|
1942
2364
|
if (onPointMouseOver) {
|
|
1943
2365
|
onPointMouseOver({
|
|
1944
2366
|
type: "point.mouseover",
|
|
1945
2367
|
originalEvent: event,
|
|
1946
|
-
payload
|
|
2368
|
+
payload: updatedPayload
|
|
1947
2369
|
});
|
|
1948
2370
|
}
|
|
1949
2371
|
}
|
|
1950
2372
|
},
|
|
1951
|
-
[onPointMouseOver, onPointMouseOut]
|
|
2373
|
+
[onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy]
|
|
1952
2374
|
);
|
|
1953
|
-
const
|
|
1954
|
-
|
|
2375
|
+
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}`;
|
|
2376
|
+
const memoizedChart = (0, react_exports.useMemo)(() => {
|
|
2377
|
+
const computedOnRangeZoom = onSelect ? handleChartRangeZoom : void 0;
|
|
2378
|
+
return /* @__PURE__ */ react_exports.createElement(visualization_canvas_exports.RangeSelectionProvider, { key: dataKey }, /* @__PURE__ */ react_exports.createElement(
|
|
1955
2379
|
visualization_canvas_exports.TimeSeriesChart,
|
|
1956
2380
|
{
|
|
1957
2381
|
data: chartData,
|
|
@@ -1961,49 +2385,121 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1961
2385
|
seriesColorsByField,
|
|
1962
2386
|
seriesConfig: seriesOverrides,
|
|
1963
2387
|
legend,
|
|
2388
|
+
legendLabels,
|
|
2389
|
+
legendTruncation,
|
|
2390
|
+
isSeriesCompare: legendMode === "seriesCompare",
|
|
2391
|
+
maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
|
|
1964
2392
|
scaleConfig,
|
|
1965
2393
|
timestampFormat: "expanded",
|
|
1966
2394
|
onCrosshairClick: onClick ? handleChartClick : void 0,
|
|
1967
2395
|
onCrosshairChange: onPointMouseOver || onPointMouseOut ? handleChartCrosshairChange : void 0,
|
|
1968
2396
|
onSeriesClick: onClick ? handleChartLegendClick : void 0,
|
|
2397
|
+
onRangeSelection: handleChartRangeSelection,
|
|
2398
|
+
onRangeZoom: computedOnRangeZoom,
|
|
2399
|
+
serverSideZoom: enableSearchZoom,
|
|
1969
2400
|
userLocale,
|
|
1970
2401
|
events: chartingEventAnnotations,
|
|
1971
|
-
eventsConfig: { renderer: triangleEventAnnotationRenderer }
|
|
2402
|
+
eventsConfig: { renderer: triangleEventAnnotationRenderer },
|
|
2403
|
+
additionalTooltipValuesRef,
|
|
2404
|
+
showXMajorGridLines,
|
|
2405
|
+
showYMajorGridLines,
|
|
2406
|
+
showY2MajorGridLines,
|
|
2407
|
+
showYMinorGridLines,
|
|
2408
|
+
showY2MinorGridLines,
|
|
2409
|
+
showLineSmoothing,
|
|
2410
|
+
dataValuesDisplay,
|
|
2411
|
+
showXMajorTicks,
|
|
2412
|
+
xAxisMajorTickSize: xAxisMajorTickSizeNum,
|
|
2413
|
+
showYMajorTicks,
|
|
2414
|
+
showY2MajorTicks,
|
|
2415
|
+
yAxisMajorTickSize: yAxisMajorTickSizeNum,
|
|
2416
|
+
y2AxisMajorTickSize: y2AxisMajorTickSizeNum,
|
|
2417
|
+
yAxisMajorTickInterval: yAxisMajorTickIntervalNum,
|
|
2418
|
+
y2AxisMajorTickInterval: y2AxisMajorTickIntervalNum,
|
|
2419
|
+
showYMinorTicks,
|
|
2420
|
+
showY2MinorTicks,
|
|
2421
|
+
yAxisMinorTickSize: yAxisMinorTickSizeNum,
|
|
2422
|
+
y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
|
|
2423
|
+
showYAxisWithZero,
|
|
2424
|
+
showY2AxisWithZero,
|
|
2425
|
+
showXAxisLine,
|
|
2426
|
+
showYAxisLine,
|
|
2427
|
+
showY2AxisLine,
|
|
2428
|
+
xAxisMaxLabelParts
|
|
1972
2429
|
}
|
|
1973
|
-
)
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
2430
|
+
));
|
|
2431
|
+
}, [
|
|
2432
|
+
onSelect,
|
|
2433
|
+
handleChartRangeZoom,
|
|
2434
|
+
dataKey,
|
|
2435
|
+
chartData,
|
|
2436
|
+
containerWidth,
|
|
2437
|
+
containerHeight,
|
|
2438
|
+
seriesColors,
|
|
2439
|
+
seriesColorsByField,
|
|
2440
|
+
seriesOverrides,
|
|
2441
|
+
legend,
|
|
2442
|
+
legendLabels,
|
|
2443
|
+
legendTruncation,
|
|
2444
|
+
scaleConfig,
|
|
2445
|
+
onClick,
|
|
2446
|
+
handleChartClick,
|
|
2447
|
+
onPointMouseOver,
|
|
2448
|
+
onPointMouseOut,
|
|
2449
|
+
handleChartCrosshairChange,
|
|
2450
|
+
handleChartLegendClick,
|
|
2451
|
+
handleChartRangeSelection,
|
|
2452
|
+
enableSearchZoom,
|
|
2453
|
+
userLocale,
|
|
2454
|
+
chartingEventAnnotations,
|
|
2455
|
+
showXMajorGridLines,
|
|
2456
|
+
showYMajorGridLines,
|
|
2457
|
+
showY2MajorGridLines,
|
|
2458
|
+
showYMinorGridLines,
|
|
2459
|
+
showY2MinorGridLines,
|
|
2460
|
+
showLineSmoothing,
|
|
2461
|
+
dataValuesDisplay,
|
|
2462
|
+
showXMajorTicks,
|
|
2463
|
+
xAxisMajorTickSizeNum,
|
|
2464
|
+
showYMajorTicks,
|
|
2465
|
+
showY2MajorTicks,
|
|
2466
|
+
yAxisMajorTickSizeNum,
|
|
2467
|
+
y2AxisMajorTickSizeNum,
|
|
2468
|
+
yAxisMajorTickIntervalNum,
|
|
2469
|
+
y2AxisMajorTickIntervalNum,
|
|
2470
|
+
showYMinorTicks,
|
|
2471
|
+
showY2MinorTicks,
|
|
2472
|
+
yAxisMinorTickSizeNum,
|
|
2473
|
+
y2AxisMinorTickSizeNum,
|
|
2474
|
+
showYAxisWithZero,
|
|
2475
|
+
showY2AxisWithZero,
|
|
2476
|
+
showXAxisLine,
|
|
2477
|
+
showYAxisLine,
|
|
2478
|
+
showY2AxisLine,
|
|
2479
|
+
legendMode,
|
|
2480
|
+
xAxisMaxLabelParts
|
|
2481
|
+
]);
|
|
1993
2482
|
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
1994
|
-
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor }, memoizedChart);
|
|
1995
|
-
}, [
|
|
1996
|
-
return /* @__PURE__ */ react_exports.createElement(
|
|
2483
|
+
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
|
|
2484
|
+
}, [bgColor, memoizedChart]);
|
|
2485
|
+
return /* @__PURE__ */ react_exports.createElement(react_exports.Fragment, null, trellisEnabled && /* @__PURE__ */ react_exports.createElement(
|
|
2486
|
+
TrellisTitle,
|
|
2487
|
+
{
|
|
2488
|
+
trellisKey,
|
|
2489
|
+
backgroundColor: bgColor,
|
|
2490
|
+
fontColor: defaultFontColor
|
|
2491
|
+
}
|
|
2492
|
+
), /* @__PURE__ */ react_exports.createElement(
|
|
1997
2493
|
TimeSeriesChartContainer,
|
|
1998
2494
|
{
|
|
1999
|
-
height,
|
|
2495
|
+
height: trellisEnabled ? Number(height) - TRELLIS_TITLE_HEIGHT : height,
|
|
2000
2496
|
width,
|
|
2001
2497
|
ref: uplotContainerElement,
|
|
2002
2498
|
"data-test": "timeseries-chart-wrapper"
|
|
2003
2499
|
},
|
|
2004
2500
|
/* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }),
|
|
2005
2501
|
memoizedVisualization
|
|
2006
|
-
);
|
|
2502
|
+
));
|
|
2007
2503
|
};
|
|
2008
2504
|
var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
|
|
2009
2505
|
|
|
@@ -2298,18 +2794,18 @@ var propUtils_exports = {};
|
|
|
2298
2794
|
__export(propUtils_exports, {
|
|
2299
2795
|
default: () => propUtils_default
|
|
2300
2796
|
});
|
|
2301
|
-
var
|
|
2797
|
+
var defaultImport31 = __toESM(require("@splunk/visualizations-shared/propUtils"));
|
|
2302
2798
|
__reExport(propUtils_exports, require("@splunk/visualizations-shared/propUtils"));
|
|
2303
|
-
var propUtils_default = "default" in
|
|
2799
|
+
var propUtils_default = "default" in defaultImport31 ? defaultImport31.default : defaultImport31;
|
|
2304
2800
|
|
|
2305
2801
|
// esm-externals:@splunk/react-ui/ScreenReaderContent
|
|
2306
2802
|
var ScreenReaderContent_exports = {};
|
|
2307
2803
|
__export(ScreenReaderContent_exports, {
|
|
2308
2804
|
default: () => ScreenReaderContent_default
|
|
2309
2805
|
});
|
|
2310
|
-
var
|
|
2806
|
+
var defaultImport32 = __toESM(require("@splunk/react-ui/ScreenReaderContent"));
|
|
2311
2807
|
__reExport(ScreenReaderContent_exports, require("@splunk/react-ui/ScreenReaderContent"));
|
|
2312
|
-
var ScreenReaderContent_default = "default" in
|
|
2808
|
+
var ScreenReaderContent_default = "default" in defaultImport32 ? defaultImport32.default : defaultImport32;
|
|
2313
2809
|
|
|
2314
2810
|
// src/common/shapeUtils.tsx
|
|
2315
2811
|
var shapeOptionsMapping = {
|
|
@@ -2337,7 +2833,7 @@ var getStyledShape = (shape4) => styled_components_default(shape4)`
|
|
|
2337
2833
|
`;
|
|
2338
2834
|
function ClickableShape({ children, onClick, shape: shape4 }) {
|
|
2339
2835
|
const descriptionId = (0, react_exports.useMemo)(() => (0, id_exports.createDOMID)("clickable-svg-description"), []);
|
|
2340
|
-
return /* @__PURE__ */ react_default.createElement(
|
|
2836
|
+
return /* @__PURE__ */ react_default.createElement(react_default.Fragment, null, /* @__PURE__ */ react_default.createElement(ScreenReaderContent_default, { id: descriptionId }, (0, i18n_exports._)("Click to trigger interaction")), /* @__PURE__ */ react_default.createElement(
|
|
2341
2837
|
StyledButton,
|
|
2342
2838
|
{
|
|
2343
2839
|
onClick,
|
|
@@ -2348,16 +2844,7 @@ function ClickableShape({ children, onClick, shape: shape4 }) {
|
|
|
2348
2844
|
children
|
|
2349
2845
|
));
|
|
2350
2846
|
}
|
|
2351
|
-
var
|
|
2352
|
-
display: inline-grid;
|
|
2353
|
-
grid-template: 1fr / 1fr;
|
|
2354
|
-
|
|
2355
|
-
& > * {
|
|
2356
|
-
grid-row-start: 1;
|
|
2357
|
-
grid-column-start: 1;
|
|
2358
|
-
}
|
|
2359
|
-
`;
|
|
2360
|
-
var StyledButton = styled_components_default.button`
|
|
2847
|
+
var StyledButton = styled_components_default.button.attrs({ type: "button" })`
|
|
2361
2848
|
padding: 0;
|
|
2362
2849
|
border: 0;
|
|
2363
2850
|
background: transparent;
|
|
@@ -2366,21 +2853,15 @@ var StyledButton = styled_components_default.button`
|
|
|
2366
2853
|
outline: none;
|
|
2367
2854
|
${(props) => props.shape === "rect" ? styled_components_exports.css`
|
|
2368
2855
|
box-shadow: ${variables_default.focusShadow};
|
|
2369
|
-
` :
|
|
2370
|
-
|
|
2371
|
-
styled_components_exports.css`
|
|
2372
|
-
svg:has(+ &) > ellipse {
|
|
2856
|
+
` : styled_components_exports.css`
|
|
2857
|
+
& > svg > ellipse {
|
|
2373
2858
|
filter: drop-shadow(2px 0px 1px ${variables_default.focusColor})
|
|
2374
2859
|
drop-shadow(-2px 0px 1px ${variables_default.focusColor})
|
|
2375
2860
|
drop-shadow(0px 2px 1px ${variables_default.focusColor})
|
|
2376
2861
|
drop-shadow(0px -2px 1px ${variables_default.focusColor});
|
|
2377
2862
|
}
|
|
2378
|
-
`
|
|
2379
|
-
)}
|
|
2863
|
+
`}
|
|
2380
2864
|
}
|
|
2381
|
-
${(props) => props.shape === "ellipse" && `
|
|
2382
|
-
clip-path: ellipse(50% 50% at 50% 50%);
|
|
2383
|
-
`}
|
|
2384
2865
|
`;
|
|
2385
2866
|
|
|
2386
2867
|
// src/Ellipse/Ellipse.tsx
|