@splunk/visualizations 28.3.0 → 28.4.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 +0 -1
- package/Area.config.js.map +2 -2
- package/Area.js +495 -99
- package/Area.js.map +3 -3
- package/Bar/Bar.d.ts.map +1 -1
- package/Bar.config.js +0 -1
- package/Bar.config.js.map +2 -2
- package/Bar.js +505 -99
- package/Bar.js.map +3 -3
- package/Bubble.config.js +0 -1
- package/Bubble.config.js.map +2 -2
- package/Bubble.js +494 -86
- package/Bubble.js.map +3 -3
- package/CHANGELOG.external.md +76 -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 +539 -103
- package/ChoroplethSvg.js.map +4 -4
- package/Column/Column.d.ts.map +1 -1
- package/Column.config.js +0 -1
- package/Column.config.js.map +2 -2
- package/Column.js +495 -99
- package/Column.js.map +3 -3
- package/Ellipse.js +528 -104
- package/Ellipse.js.map +4 -4
- package/Events/PureEvents/PureEvents.d.ts.map +1 -1
- package/Events.js +612 -149
- 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 +535 -140
- package/FillerGauge.js.map +4 -4
- package/Image/Image.d.ts.map +1 -1
- package/Image.js +564 -108
- 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 +59 -0
- package/Line/mockdata/LineData.d.ts.map +1 -1
- package/Line.config.js +0 -1
- package/Line.config.js.map +2 -2
- package/Line.js +601 -100
- 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 +1355 -654
- 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/LocalChoroplethLayer.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 +738 -228
- package/Map.js.map +4 -4
- package/Markdown/Markdown.d.ts.map +1 -1
- package/Markdown.js +548 -95
- 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 +1318 -142
- 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/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 +123 -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 +6793 -0
- package/NetworkGraph.js.map +7 -0
- package/ParallelCoordinates.js +532 -93
- package/ParallelCoordinates.js.map +4 -4
- package/Pie/Pie.d.ts.map +1 -1
- package/Pie/pieUtils.d.ts.map +1 -1
- package/Pie.js +510 -101
- package/Pie.js.map +3 -3
- package/Punchcard.js +523 -84
- package/Punchcard.js.map +4 -4
- package/Rectangle.js +537 -113
- package/Rectangle.js.map +4 -4
- package/Sankey/PureSankey/SankeyTooltip.d.ts.map +1 -1
- package/Sankey.js +562 -111
- package/Sankey.js.map +4 -4
- package/Scatter/Scatter.d.ts.map +1 -1
- package/Scatter.config.js +0 -1
- package/Scatter.config.js.map +2 -2
- package/Scatter.js +505 -99
- package/Scatter.js.map +3 -3
- 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 +656 -173
- 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 +0 -1
- package/SingleValueIcon.config.js.map +2 -2
- package/SingleValueIcon.js +512 -124
- package/SingleValueIcon.js.map +3 -3
- 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 +517 -124
- 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/cells/SparklineCell.d.ts.map +1 -1
- package/Table/config.d.ts.map +1 -1
- package/Table/hooks.d.ts +4 -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 +760 -223
- package/Table.js.map +4 -4
- package/Timeline/PureTimeline/src/CursorPlugin.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelineLegend.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 +649 -211
- 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/OptionsDoc.js.map +1 -1
- 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 +561 -83
- package/common/TimeSeriesChartWrapper.js.map +4 -4
- package/common/chartingUtils.d.ts +45 -5
- package/common/chartingUtils.d.ts.map +1 -1
- package/common/chartingUtils.js +102 -8
- package/common/chartingUtils.js.map +3 -3
- package/common/editorConfig/AxesChartDataConfig.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/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 +12 -14
- package/common/utils/trellisUtils.js.map +2 -2
- package/common/withDashboardViz.d.ts.map +1 -1
- package/common/withDashboardViz.js +544 -84
- package/common/withDashboardViz.js.map +4 -4
- package/package.json +33 -26
- 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/Map.js
CHANGED
|
@@ -59,6 +59,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
59
59
|
mod
|
|
60
60
|
));
|
|
61
61
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
62
|
+
var __async = (__this, __arguments, generator) => {
|
|
63
|
+
return new Promise((resolve, reject) => {
|
|
64
|
+
var fulfilled = (value) => {
|
|
65
|
+
try {
|
|
66
|
+
step(generator.next(value));
|
|
67
|
+
} catch (e) {
|
|
68
|
+
reject(e);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
var rejected = (value) => {
|
|
72
|
+
try {
|
|
73
|
+
step(generator.throw(value));
|
|
74
|
+
} catch (e) {
|
|
75
|
+
reject(e);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
79
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
80
|
+
});
|
|
81
|
+
};
|
|
62
82
|
|
|
63
83
|
// src/Map/index.ts
|
|
64
84
|
var Map_exports = {};
|
|
@@ -207,113 +227,68 @@ var defaultImport15 = __toESM(require("maplibre-gl/dist/maplibre-gl.css"));
|
|
|
207
227
|
__reExport(maplibre_gl_exports2, require("maplibre-gl/dist/maplibre-gl.css"));
|
|
208
228
|
var maplibre_gl_default2 = "default" in defaultImport15 ? defaultImport15.default : defaultImport15;
|
|
209
229
|
|
|
210
|
-
//
|
|
211
|
-
var
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
background-color: ${(props) => props.backgroundColor};
|
|
219
|
-
${(props) => (0, style_exports.toDimension)((0, lodash_exports.pick)(props, ["width", "height"]))};
|
|
220
|
-
|
|
221
|
-
// keep zoom control on top of cooperative gesture layer
|
|
222
|
-
.maplibregl-cooperative-gesture-screen {
|
|
223
|
-
z-index: 0;
|
|
224
|
-
}
|
|
230
|
+
// esm-externals:@splunk/visualizations-shared/iconUtils
|
|
231
|
+
var iconUtils_exports = {};
|
|
232
|
+
__export(iconUtils_exports, {
|
|
233
|
+
default: () => iconUtils_default
|
|
234
|
+
});
|
|
235
|
+
var defaultImport16 = __toESM(require("@splunk/visualizations-shared/iconUtils"));
|
|
236
|
+
__reExport(iconUtils_exports, require("@splunk/visualizations-shared/iconUtils"));
|
|
237
|
+
var iconUtils_default = "default" in defaultImport16 ? defaultImport16.default : defaultImport16;
|
|
225
238
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
height: 87px !important;
|
|
235
|
-
border-radius: 4px;
|
|
236
|
-
margin: 8px 0px;
|
|
237
|
-
background-color: ${(props) => props.controlBackgroundColor};
|
|
238
|
-
box-shadow:
|
|
239
|
-
0px 26px 103px rgba(0, 0, 0, 0.64),
|
|
240
|
-
0px 11px 18px rgba(0, 0, 0, 0.32),
|
|
241
|
-
0px 3px 6px rgba(0, 0, 0, 0.3);
|
|
242
|
-
& button {
|
|
243
|
-
width: 40px;
|
|
244
|
-
height: 43px;
|
|
245
|
-
border-top: 0;
|
|
246
|
-
}
|
|
247
|
-
.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {
|
|
248
|
-
background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M9 1C9 0.447715 8.55229 0 8 0C7.44772 0 7 0.447715 7 1V7H1C0.447715 7 0 7.44772 0 8C0 8.55229 0.447715 9 1 9H7V15C7 15.5523 7.44772 16 8 16C8.55229 16 9 15.5523 9 15V9H15C15.5523 9 16 8.55229 16 8C16 7.44772 15.5523 7 15 7H9V1Z" fill="${(props) => props.controlIconColorEncoded.color}" fill-opacity="${(props) => props.controlIconColorEncoded.opacity}" /></svg>');
|
|
249
|
-
}
|
|
239
|
+
// esm-externals:@splunk/visualizations-shared/RemoteIcon
|
|
240
|
+
var RemoteIcon_exports = {};
|
|
241
|
+
__export(RemoteIcon_exports, {
|
|
242
|
+
default: () => RemoteIcon_default
|
|
243
|
+
});
|
|
244
|
+
var defaultImport17 = __toESM(require("@splunk/visualizations-shared/RemoteIcon"));
|
|
245
|
+
__reExport(RemoteIcon_exports, require("@splunk/visualizations-shared/RemoteIcon"));
|
|
246
|
+
var RemoteIcon_default = "default" in defaultImport17 ? defaultImport17.default : defaultImport17;
|
|
250
247
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
248
|
+
// esm-externals:@splunk/visualization-context/FeatureFlagContext
|
|
249
|
+
var FeatureFlagContext_exports = {};
|
|
250
|
+
__export(FeatureFlagContext_exports, {
|
|
251
|
+
default: () => FeatureFlagContext_default
|
|
252
|
+
});
|
|
253
|
+
var defaultImport18 = __toESM(require("@splunk/visualization-context/FeatureFlagContext"));
|
|
254
|
+
__reExport(FeatureFlagContext_exports, require("@splunk/visualization-context/FeatureFlagContext"));
|
|
255
|
+
var FeatureFlagContext_default = "default" in defaultImport18 ? defaultImport18.default : defaultImport18;
|
|
256
256
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
height: 29px;
|
|
266
|
-
border-radius: 4px;
|
|
267
|
-
margin: 0;
|
|
268
|
-
background-color: ${(props) => props.controlBackgroundColor};
|
|
269
|
-
box-shadow:
|
|
270
|
-
0px 26px 103px rgba(0, 0, 0, 0.13),
|
|
271
|
-
0px 11px 18px rgba(0, 0, 0, 0.06),
|
|
272
|
-
0px 3px 6px rgba(0, 0, 0, 0.06);
|
|
273
|
-
.maplibregl-ctrl-scale {
|
|
274
|
-
background-color: ${(props) => props.controlBackgroundColor};
|
|
275
|
-
color: ${(props) => props.controlForegroundColor};
|
|
276
|
-
border: 2px solid ${(props) => props.controlForegroundColor};
|
|
277
|
-
border-top: 0;
|
|
278
|
-
border-left: 0;
|
|
279
|
-
border-right: 0;
|
|
280
|
-
padding: 0;
|
|
281
|
-
margin: 6px 8px 8px 8px;
|
|
282
|
-
line-height: 13px;
|
|
283
|
-
letter-spacing: 0.02em;
|
|
284
|
-
font-family: sans-serif;
|
|
285
|
-
font-size: 10px;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
`;
|
|
289
|
-
var PureMapContainer_default = PureMapContainer;
|
|
257
|
+
// esm-externals:@splunk/ui-utils/id
|
|
258
|
+
var id_exports = {};
|
|
259
|
+
__export(id_exports, {
|
|
260
|
+
default: () => id_default
|
|
261
|
+
});
|
|
262
|
+
var defaultImport19 = __toESM(require("@splunk/ui-utils/id"));
|
|
263
|
+
__reExport(id_exports, require("@splunk/ui-utils/id"));
|
|
264
|
+
var id_default = "default" in defaultImport19 ? defaultImport19.default : defaultImport19;
|
|
290
265
|
|
|
291
266
|
// esm-externals:d3-scale
|
|
292
267
|
var d3_scale_exports = {};
|
|
293
268
|
__export(d3_scale_exports, {
|
|
294
269
|
default: () => d3_scale_default
|
|
295
270
|
});
|
|
296
|
-
var
|
|
271
|
+
var defaultImport20 = __toESM(require("d3-scale"));
|
|
297
272
|
__reExport(d3_scale_exports, require("d3-scale"));
|
|
298
|
-
var d3_scale_default = "default" in
|
|
273
|
+
var d3_scale_default = "default" in defaultImport20 ? defaultImport20.default : defaultImport20;
|
|
299
274
|
|
|
300
275
|
// esm-externals:@splunk/visualization-color-palettes
|
|
301
276
|
var visualization_color_palettes_exports = {};
|
|
302
277
|
__export(visualization_color_palettes_exports, {
|
|
303
278
|
default: () => visualization_color_palettes_default
|
|
304
279
|
});
|
|
305
|
-
var
|
|
280
|
+
var defaultImport21 = __toESM(require("@splunk/visualization-color-palettes"));
|
|
306
281
|
__reExport(visualization_color_palettes_exports, require("@splunk/visualization-color-palettes"));
|
|
307
|
-
var visualization_color_palettes_default = "default" in
|
|
282
|
+
var visualization_color_palettes_default = "default" in defaultImport21 ? defaultImport21.default : defaultImport21;
|
|
308
283
|
|
|
309
284
|
// esm-externals:@splunk/visualization-encoding/utils/types
|
|
310
285
|
var types_exports = {};
|
|
311
286
|
__export(types_exports, {
|
|
312
287
|
default: () => types_default
|
|
313
288
|
});
|
|
314
|
-
var
|
|
289
|
+
var defaultImport22 = __toESM(require("@splunk/visualization-encoding/utils/types"));
|
|
315
290
|
__reExport(types_exports, require("@splunk/visualization-encoding/utils/types"));
|
|
316
|
-
var types_default = "default" in
|
|
291
|
+
var types_default = "default" in defaultImport22 ? defaultImport22.default : defaultImport22;
|
|
317
292
|
|
|
318
293
|
// src/Map/PureMap/MapUtils.ts
|
|
319
294
|
var MAX_LATITUDE = 90;
|
|
@@ -674,42 +649,6 @@ var formatMetadata = (choroplethLayer, i) => {
|
|
|
674
649
|
}, base);
|
|
675
650
|
};
|
|
676
651
|
|
|
677
|
-
// esm-externals:@splunk/visualizations-shared/iconUtils
|
|
678
|
-
var iconUtils_exports = {};
|
|
679
|
-
__export(iconUtils_exports, {
|
|
680
|
-
default: () => iconUtils_default
|
|
681
|
-
});
|
|
682
|
-
var defaultImport19 = __toESM(require("@splunk/visualizations-shared/iconUtils"));
|
|
683
|
-
__reExport(iconUtils_exports, require("@splunk/visualizations-shared/iconUtils"));
|
|
684
|
-
var iconUtils_default = "default" in defaultImport19 ? defaultImport19.default : defaultImport19;
|
|
685
|
-
|
|
686
|
-
// esm-externals:@splunk/visualizations-shared/RemoteIcon
|
|
687
|
-
var RemoteIcon_exports = {};
|
|
688
|
-
__export(RemoteIcon_exports, {
|
|
689
|
-
default: () => RemoteIcon_default
|
|
690
|
-
});
|
|
691
|
-
var defaultImport20 = __toESM(require("@splunk/visualizations-shared/RemoteIcon"));
|
|
692
|
-
__reExport(RemoteIcon_exports, require("@splunk/visualizations-shared/RemoteIcon"));
|
|
693
|
-
var RemoteIcon_default = "default" in defaultImport20 ? defaultImport20.default : defaultImport20;
|
|
694
|
-
|
|
695
|
-
// esm-externals:@splunk/visualization-context/FeatureFlagContext
|
|
696
|
-
var FeatureFlagContext_exports = {};
|
|
697
|
-
__export(FeatureFlagContext_exports, {
|
|
698
|
-
default: () => FeatureFlagContext_default
|
|
699
|
-
});
|
|
700
|
-
var defaultImport21 = __toESM(require("@splunk/visualization-context/FeatureFlagContext"));
|
|
701
|
-
__reExport(FeatureFlagContext_exports, require("@splunk/visualization-context/FeatureFlagContext"));
|
|
702
|
-
var FeatureFlagContext_default = "default" in defaultImport21 ? defaultImport21.default : defaultImport21;
|
|
703
|
-
|
|
704
|
-
// esm-externals:@splunk/ui-utils/id
|
|
705
|
-
var id_exports = {};
|
|
706
|
-
__export(id_exports, {
|
|
707
|
-
default: () => id_default
|
|
708
|
-
});
|
|
709
|
-
var defaultImport22 = __toESM(require("@splunk/ui-utils/id"));
|
|
710
|
-
__reExport(id_exports, require("@splunk/ui-utils/id"));
|
|
711
|
-
var id_default = "default" in defaultImport22 ? defaultImport22.default : defaultImport22;
|
|
712
|
-
|
|
713
652
|
// esm-externals:@splunk/react-ui/Popover
|
|
714
653
|
var Popover_exports = {};
|
|
715
654
|
__export(Popover_exports, {
|
|
@@ -730,19 +669,24 @@ var themes_default = "default" in defaultImport24 ? defaultImport24.default : de
|
|
|
730
669
|
|
|
731
670
|
// src/Map/PureMap/Tooltip.tsx
|
|
732
671
|
var StyledPopover = styled_components_default(Popover_default)`
|
|
733
|
-
width: 250px;
|
|
672
|
+
min-width: 250px;
|
|
673
|
+
max-width: 332px;
|
|
674
|
+
max-width: fit-content;
|
|
734
675
|
font-size: 12px;
|
|
735
676
|
`;
|
|
736
677
|
var StyledTable = styled_components_default.table`
|
|
737
678
|
margin: 2px 6px 2px 6px;
|
|
738
|
-
table-layout: fixed;
|
|
739
679
|
width: calc(100% - 12px);
|
|
740
680
|
`;
|
|
741
681
|
var StyledTitleColumn = styled_components_default.td`
|
|
742
682
|
opacity: 0.85;
|
|
683
|
+
word-break: break-all;
|
|
684
|
+
vertical-align: top;
|
|
743
685
|
`;
|
|
744
686
|
var StyledValueColumn = styled_components_default.td`
|
|
745
687
|
text-align: right;
|
|
688
|
+
word-break: break-all;
|
|
689
|
+
vertical-align: top;
|
|
746
690
|
`;
|
|
747
691
|
var StyledColorBlock = styled_components_default.div`
|
|
748
692
|
background-color: ${(props) => props.color};
|
|
@@ -753,10 +697,6 @@ var StyledColorBlock = styled_components_default.div`
|
|
|
753
697
|
height: 11px;
|
|
754
698
|
transform: translateY(1px);
|
|
755
699
|
`;
|
|
756
|
-
var StyledFieldLabel = styled_components_default.span`
|
|
757
|
-
display: inline-block;
|
|
758
|
-
white-space: nowrap;
|
|
759
|
-
`;
|
|
760
700
|
var StyledIconWrapper = styled_components_default.span`
|
|
761
701
|
margin-left: 4px;
|
|
762
702
|
display: inline-block;
|
|
@@ -823,7 +763,7 @@ var Tooltip = ({
|
|
|
823
763
|
"data-test": "map-marker-tooltip",
|
|
824
764
|
defaultPlacement: "above"
|
|
825
765
|
},
|
|
826
|
-
/* @__PURE__ */ react_exports.createElement(StyledTable, null, tooltipHeader && /* @__PURE__ */ react_exports.createElement(StyledTooltipHeader, { "data-test": "tooltip-header" }, /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement("th", { colSpan: 2 }, /* @__PURE__ */ react_exports.createElement("span", { "data-test": "tooltip-header-value" }, tooltipHeader)))), /* @__PURE__ */ react_exports.createElement("tbody", null, areaId && areaValue && /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, { "data-test": "area-id" }, areaId), /* @__PURE__ */ react_exports.createElement(StyledValueColumn, { "data-test": "area-value" }, areaValue)), Boolean(showCoordinates && latitude) && /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, null, (0, i18n_exports._)("Latitude")), /* @__PURE__ */ react_exports.createElement(StyledValueColumn, { "data-test": "latitude" }, convertDegToDMS(latitude, "latitude"))), Boolean(showCoordinates && longitude) && /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, null, (0, i18n_exports._)("Longitude")), /* @__PURE__ */ react_exports.createElement(StyledValueColumn, { "data-test": "longitude" }, convertDegToDMS(longitude, "longitude"))), additionalFields.filter(({ value }) => value && String(value) !== "0").map(({ name, value, color, icon }) => /* @__PURE__ */ react_exports.createElement("tr", { key: (0, id_exports.createDOMID)() }, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, { "data-test": "field-title" }, color ? /* @__PURE__ */ react_exports.createElement(StyledColorBlock, { "data-test": "field-color", color }) : null, /* @__PURE__ */ react_exports.createElement(
|
|
766
|
+
/* @__PURE__ */ react_exports.createElement(StyledTable, null, tooltipHeader && /* @__PURE__ */ react_exports.createElement(StyledTooltipHeader, { "data-test": "tooltip-header" }, /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement("th", { colSpan: 2 }, /* @__PURE__ */ react_exports.createElement("span", { "data-test": "tooltip-header-value" }, tooltipHeader)))), /* @__PURE__ */ react_exports.createElement("tbody", null, Boolean(areaId && areaValue) && /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, { "data-test": "area-id" }, areaId), /* @__PURE__ */ react_exports.createElement(StyledValueColumn, { "data-test": "area-value" }, areaValue)), Boolean(showCoordinates && latitude) && /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, null, (0, i18n_exports._)("Latitude")), /* @__PURE__ */ react_exports.createElement(StyledValueColumn, { "data-test": "latitude" }, convertDegToDMS(latitude, "latitude"))), Boolean(showCoordinates && longitude) && /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, null, (0, i18n_exports._)("Longitude")), /* @__PURE__ */ react_exports.createElement(StyledValueColumn, { "data-test": "longitude" }, convertDegToDMS(longitude, "longitude"))), additionalFields.filter(({ value }) => value && String(value) !== "0").map(({ name, value, color, icon }) => /* @__PURE__ */ react_exports.createElement("tr", { key: (0, id_exports.createDOMID)() }, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, { "data-test": "field-title" }, color ? /* @__PURE__ */ react_exports.createElement(StyledColorBlock, { "data-test": "field-color", color }) : null, /* @__PURE__ */ react_exports.createElement("span", null, name, isTooltipIconFlagEnabled && icon && ((0, iconUtils_exports.isRemoteIcon)(icon) || (0, iconUtils_exports.isDataURI)(icon)) ? /* @__PURE__ */ react_exports.createElement(StyledIconWrapper, { "data-test": "field-icon" }, /* @__PURE__ */ react_exports.createElement(RemoteIcon_default, { iconURL: icon, width: 16, height: 16 })) : null)), /* @__PURE__ */ react_exports.createElement(StyledValueColumn, { "data-test": "field-value" }, value)))))
|
|
827
767
|
);
|
|
828
768
|
};
|
|
829
769
|
var Tooltip_default = Tooltip;
|
|
@@ -939,8 +879,9 @@ var PieSegment = react_exports.memo(
|
|
|
939
879
|
);
|
|
940
880
|
if (end - start === 1) {
|
|
941
881
|
return /* @__PURE__ */ react_exports.createElement(
|
|
942
|
-
|
|
882
|
+
BubbleSegment,
|
|
943
883
|
{
|
|
884
|
+
as: "circle",
|
|
944
885
|
onClick: handleSegmentClick,
|
|
945
886
|
cx: radius,
|
|
946
887
|
cy: radius,
|
|
@@ -960,8 +901,9 @@ var PieSegment = react_exports.memo(
|
|
|
960
901
|
const y1 = Math.sin(a1);
|
|
961
902
|
const arc = end - start > 0.5 ? 1 : 0;
|
|
962
903
|
return /* @__PURE__ */ react_exports.createElement(
|
|
963
|
-
|
|
904
|
+
BubbleSegment,
|
|
964
905
|
{
|
|
906
|
+
as: "path",
|
|
965
907
|
onClick: handleSegmentClick,
|
|
966
908
|
d: `M ${radius} ${radius} L ${radius + radius * x0} ${radius + radius * y0} A ${radius} ${radius} 0 ${arc} 1 ${radius + radius * x1} ${radius + radius * y1} L ${radius} ${radius} A 0 0 0 ${arc} 0 ${radius} ${radius}`,
|
|
967
909
|
fill: color,
|
|
@@ -974,6 +916,14 @@ var PieSegment = react_exports.memo(
|
|
|
974
916
|
}
|
|
975
917
|
);
|
|
976
918
|
PieSegment.displayName = "MapBubblePieSegment";
|
|
919
|
+
var BubbleSegment = styled_components_default.path`
|
|
920
|
+
transition: 0.2s ease-in-out;
|
|
921
|
+
transition-property: fill, stroke;
|
|
922
|
+
`;
|
|
923
|
+
var BUBBLE_SEGMENT_DIMMED_STYLES = {
|
|
924
|
+
fill: "rgba(150, 150, 150, 0.3)",
|
|
925
|
+
stroke: "rgba(200, 200, 200, 0.4)"
|
|
926
|
+
};
|
|
977
927
|
var StyledMarkerWrapper = styled_components_default(MarkerWrapper_default)`
|
|
978
928
|
cursor: pointer;
|
|
979
929
|
`;
|
|
@@ -1172,6 +1122,92 @@ var BubbleLayer = (props) => {
|
|
|
1172
1122
|
};
|
|
1173
1123
|
var BubbleLayer_default = BubbleLayer;
|
|
1174
1124
|
|
|
1125
|
+
// src/Map/PureMap/PureMapContainer.tsx
|
|
1126
|
+
var PureMapContainer = styled_components_default.div.attrs({
|
|
1127
|
+
"data-test": "puremap-container"
|
|
1128
|
+
})`
|
|
1129
|
+
${maplibre_gl_default2}
|
|
1130
|
+
overflow: hidden;
|
|
1131
|
+
position: relative;
|
|
1132
|
+
z-index: 0;
|
|
1133
|
+
background-color: ${(props) => props.backgroundColor};
|
|
1134
|
+
${(props) => (0, style_exports.toDimension)((0, lodash_exports.pick)(props, ["width", "height"]))};
|
|
1135
|
+
|
|
1136
|
+
// keep zoom control on top of cooperative gesture layer
|
|
1137
|
+
.maplibregl-cooperative-gesture-screen {
|
|
1138
|
+
z-index: 0;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
// overwrite maplibregl zoom control styles
|
|
1142
|
+
.maplibregl-ctrl-top-left {
|
|
1143
|
+
display: ${(props) => props.showZoomControls ? "block" : "none"};
|
|
1144
|
+
position: absolute;
|
|
1145
|
+
top: 12px;
|
|
1146
|
+
left: 16px;
|
|
1147
|
+
.maplibregl-ctrl-group {
|
|
1148
|
+
width: 40px !important;
|
|
1149
|
+
height: 87px !important;
|
|
1150
|
+
border-radius: 4px;
|
|
1151
|
+
margin: 8px 0px;
|
|
1152
|
+
background-color: ${(props) => props.controlBackgroundColor};
|
|
1153
|
+
box-shadow:
|
|
1154
|
+
0px 26px 103px rgba(0, 0, 0, 0.64),
|
|
1155
|
+
0px 11px 18px rgba(0, 0, 0, 0.32),
|
|
1156
|
+
0px 3px 6px rgba(0, 0, 0, 0.3);
|
|
1157
|
+
& button {
|
|
1158
|
+
width: 40px;
|
|
1159
|
+
height: 43px;
|
|
1160
|
+
border-top: 0;
|
|
1161
|
+
}
|
|
1162
|
+
.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {
|
|
1163
|
+
background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M9 1C9 0.447715 8.55229 0 8 0C7.44772 0 7 0.447715 7 1V7H1C0.447715 7 0 7.44772 0 8C0 8.55229 0.447715 9 1 9H7V15C7 15.5523 7.44772 16 8 16C8.55229 16 9 15.5523 9 15V9H15C15.5523 9 16 8.55229 16 8C16 7.44772 15.5523 7 15 7H9V1Z" fill="${(props) => props.controlIconColorEncoded.color}" fill-opacity="${(props) => props.controlIconColorEncoded.opacity}" /></svg>');
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {
|
|
1167
|
+
background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="14" height="3" viewBox="0 0 14 3" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.99707C0 1.44479 0.447715 0.99707 1 0.99707H13C13.5523 0.99707 14 1.44479 14 1.99707C14 2.54936 13.5523 2.99707 13 2.99707H1C0.447715 2.99707 0 2.54936 0 1.99707Z" fill="${(props) => props.controlIconColorEncoded.color}" fill-opacity="${(props) => props.controlIconColorEncoded.opacity}" /></svg>');
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
// overwrite maplibregl scale styles
|
|
1173
|
+
.maplibregl-ctrl-bottom-left {
|
|
1174
|
+
display: ${(props) => props.showScale ? "block" : "none"};
|
|
1175
|
+
position: absolute;
|
|
1176
|
+
z-index: 0;
|
|
1177
|
+
bottom: 16px;
|
|
1178
|
+
left: 12px;
|
|
1179
|
+
width: 86px;
|
|
1180
|
+
height: 29px;
|
|
1181
|
+
border-radius: 4px;
|
|
1182
|
+
margin: 0;
|
|
1183
|
+
background-color: ${(props) => props.controlBackgroundColor};
|
|
1184
|
+
box-shadow:
|
|
1185
|
+
0px 26px 103px rgba(0, 0, 0, 0.13),
|
|
1186
|
+
0px 11px 18px rgba(0, 0, 0, 0.06),
|
|
1187
|
+
0px 3px 6px rgba(0, 0, 0, 0.06);
|
|
1188
|
+
.maplibregl-ctrl-scale {
|
|
1189
|
+
background-color: ${(props) => props.controlBackgroundColor};
|
|
1190
|
+
color: ${(props) => props.controlForegroundColor};
|
|
1191
|
+
border: 2px solid ${(props) => props.controlForegroundColor};
|
|
1192
|
+
border-top: 0;
|
|
1193
|
+
border-left: 0;
|
|
1194
|
+
border-right: 0;
|
|
1195
|
+
padding: 0;
|
|
1196
|
+
margin: 6px 8px 8px 8px;
|
|
1197
|
+
line-height: 13px;
|
|
1198
|
+
letter-spacing: 0.02em;
|
|
1199
|
+
font-family: sans-serif;
|
|
1200
|
+
font-size: 10px;
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
:has(${BubbleSegment}:hover) ${BubbleSegment}:not(:hover) {
|
|
1205
|
+
fill: ${BUBBLE_SEGMENT_DIMMED_STYLES.fill};
|
|
1206
|
+
stroke: ${BUBBLE_SEGMENT_DIMMED_STYLES.stroke};
|
|
1207
|
+
}
|
|
1208
|
+
`;
|
|
1209
|
+
var PureMapContainer_default = PureMapContainer;
|
|
1210
|
+
|
|
1175
1211
|
// src/Map/PureMap/MarkerLayer.tsx
|
|
1176
1212
|
var MarkerIcon = (_a) => {
|
|
1177
1213
|
var _b = _a, { theme, color } = _b, otherProps = __objRest(_b, ["theme", "color"]);
|
|
@@ -1579,17 +1615,29 @@ var LocalChoroplethLayer = (props) => {
|
|
|
1579
1615
|
message: ""
|
|
1580
1616
|
});
|
|
1581
1617
|
react_exports.useEffect(() => {
|
|
1582
|
-
let
|
|
1618
|
+
let isMounted = true;
|
|
1583
1619
|
const geoRegistry = GeoRegistry_default.create();
|
|
1584
1620
|
geoRegistry.addDefaultProvider(new GeoJsonProvider_default());
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1621
|
+
const loadGeoJson = () => __async(void 0, null, function* () {
|
|
1622
|
+
try {
|
|
1623
|
+
const geoJsonData = yield geoRegistry.getByURL(choroplethLayer.source);
|
|
1624
|
+
if (!isMounted) {
|
|
1625
|
+
return;
|
|
1626
|
+
}
|
|
1627
|
+
setGeoJson(geoJsonData);
|
|
1628
|
+
setValidGeoJson(true);
|
|
1629
|
+
} catch (e) {
|
|
1630
|
+
if (!isMounted) {
|
|
1631
|
+
return;
|
|
1632
|
+
}
|
|
1633
|
+
setGeoJsonError(e);
|
|
1634
|
+
setValidGeoJson(false);
|
|
1635
|
+
}
|
|
1636
|
+
});
|
|
1637
|
+
loadGeoJson();
|
|
1638
|
+
return () => {
|
|
1639
|
+
isMounted = false;
|
|
1640
|
+
};
|
|
1593
1641
|
}, [choroplethLayer.source]);
|
|
1594
1642
|
const updatedPropertyFormat = react_exports.useMemo(() => {
|
|
1595
1643
|
let propertyFormat = "name";
|
|
@@ -1760,6 +1808,7 @@ var PureMap = (props) => {
|
|
|
1760
1808
|
const scaleControl = (0, react_exports.useRef)(null);
|
|
1761
1809
|
const zoomControl = (0, react_exports.useRef)(null);
|
|
1762
1810
|
const fitToDataButtonClickedRef = (0, react_exports.useRef)(false);
|
|
1811
|
+
const isUserInteractingRef = (0, react_exports.useRef)(false);
|
|
1763
1812
|
const { tilePreset, defaultTileLight, defaultTileDark } = (0, react_exports.useMemo)(
|
|
1764
1813
|
() => getTilePreset({ defaultTileConfig, customTileConfig }),
|
|
1765
1814
|
[defaultTileConfig, customTileConfig]
|
|
@@ -1843,7 +1892,7 @@ var PureMap = (props) => {
|
|
|
1843
1892
|
map.current.on("load", () => {
|
|
1844
1893
|
if ((layers == null ? void 0 : layers.length) > 0 && center === void 0 && zoom === void 0) {
|
|
1845
1894
|
setMapMinZoom(map.current.getZoom());
|
|
1846
|
-
map.current.
|
|
1895
|
+
map.current.once("zoomend", () => {
|
|
1847
1896
|
addZoomEndEventListener();
|
|
1848
1897
|
});
|
|
1849
1898
|
fitMapToContent();
|
|
@@ -1868,6 +1917,26 @@ var PureMap = (props) => {
|
|
|
1868
1917
|
zoom: map.current.getZoom()
|
|
1869
1918
|
});
|
|
1870
1919
|
});
|
|
1920
|
+
map.current.on("dragstart", () => {
|
|
1921
|
+
isUserInteractingRef.current = true;
|
|
1922
|
+
});
|
|
1923
|
+
map.current.on("dragend", () => {
|
|
1924
|
+
setTimeout(() => {
|
|
1925
|
+
if (isUserInteractingRef) {
|
|
1926
|
+
isUserInteractingRef.current = false;
|
|
1927
|
+
}
|
|
1928
|
+
}, 100);
|
|
1929
|
+
});
|
|
1930
|
+
map.current.on("zoomstart", () => {
|
|
1931
|
+
isUserInteractingRef.current = true;
|
|
1932
|
+
});
|
|
1933
|
+
map.current.on("zoomend", () => {
|
|
1934
|
+
setTimeout(() => {
|
|
1935
|
+
if (isUserInteractingRef) {
|
|
1936
|
+
isUserInteractingRef.current = false;
|
|
1937
|
+
}
|
|
1938
|
+
}, 100);
|
|
1939
|
+
});
|
|
1871
1940
|
map.current.on("resize", () => {
|
|
1872
1941
|
const mapZoomLevel = map.current.getZoom();
|
|
1873
1942
|
if (currentZoomLevelRef.current <= mapMinZoomRef.current && mapZoomLevel !== mapMinZoomRef.current) {
|
|
@@ -1963,6 +2032,9 @@ var PureMap = (props) => {
|
|
|
1963
2032
|
if (fitToDataButtonClickedRef.current) {
|
|
1964
2033
|
return;
|
|
1965
2034
|
}
|
|
2035
|
+
if (isUserInteractingRef.current) {
|
|
2036
|
+
return;
|
|
2037
|
+
}
|
|
1966
2038
|
map.current.flyTo({
|
|
1967
2039
|
center: lngLatCenter,
|
|
1968
2040
|
// Make sure we are not flying to a zoom value smaller than the mapMinZoom
|
|
@@ -2641,7 +2713,6 @@ var editorConfig = [
|
|
|
2641
2713
|
}
|
|
2642
2714
|
}
|
|
2643
2715
|
],
|
|
2644
|
-
// TODO: add support for seriesColorsByField option
|
|
2645
2716
|
// [
|
|
2646
2717
|
// {
|
|
2647
2718
|
// label: _('Series colors by field name'),
|
|
@@ -3035,7 +3106,7 @@ var Cover = styled_components_default.div`
|
|
|
3035
3106
|
bottom: 0;
|
|
3036
3107
|
`;
|
|
3037
3108
|
var Blocker = styled_components_default.div.attrs({
|
|
3038
|
-
"data-splunk-visualization-version": "28.
|
|
3109
|
+
"data-splunk-visualization-version": "28.4.0 - 002bd482f"
|
|
3039
3110
|
})`
|
|
3040
3111
|
position: relative;
|
|
3041
3112
|
width: 100%;
|
|
@@ -3107,7 +3178,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
3107
3178
|
FixSizeItem,
|
|
3108
3179
|
{
|
|
3109
3180
|
"data-test": "fix-size-item",
|
|
3110
|
-
"data-splunk-visualization-version": "28.
|
|
3181
|
+
"data-splunk-visualization-version": "28.4.0 - 002bd482f",
|
|
3111
3182
|
width,
|
|
3112
3183
|
height,
|
|
3113
3184
|
backgroundColor
|
|
@@ -3209,7 +3280,7 @@ var convertToArrOfObjects = (columns, fields) => {
|
|
|
3209
3280
|
for (let i = 0; i < columns[0].length; i += 1) {
|
|
3210
3281
|
const newObj = {};
|
|
3211
3282
|
fields.forEach((field, index) => {
|
|
3212
|
-
const fieldName =
|
|
3283
|
+
const fieldName = getFieldName(field);
|
|
3213
3284
|
if (columns[index][i] === "") {
|
|
3214
3285
|
newObj[fieldName] = null;
|
|
3215
3286
|
} else {
|
|
@@ -3220,6 +3291,7 @@ var convertToArrOfObjects = (columns, fields) => {
|
|
|
3220
3291
|
}
|
|
3221
3292
|
return data;
|
|
3222
3293
|
};
|
|
3294
|
+
var getFieldName = (field) => typeof field === "string" ? field : field.name;
|
|
3223
3295
|
var largestTriangleThreeBuckets = (data, threshold, preferredDownsampleIndices) => {
|
|
3224
3296
|
const dataLength = data.length;
|
|
3225
3297
|
const downsampledIndices = [];
|
|
@@ -3336,9 +3408,9 @@ var tryToCoerceAllDisplayedFields = (ds, xField, yFields, fieldTypes, options) =
|
|
|
3336
3408
|
let xColumn = [];
|
|
3337
3409
|
const yColumns = [];
|
|
3338
3410
|
const canDownsample = !ds.data.fields.some((field, index) => {
|
|
3339
|
-
var _a
|
|
3340
|
-
const fieldName = (
|
|
3341
|
-
const fieldType = (
|
|
3411
|
+
var _a;
|
|
3412
|
+
const fieldName = getFieldName(field);
|
|
3413
|
+
const fieldType = (_a = fieldTypes[index]) != null ? _a : "unknown";
|
|
3342
3414
|
const column = ds.data.columns[index];
|
|
3343
3415
|
let hasDisplayedColumnThatCantBeDownsampled = false;
|
|
3344
3416
|
if (fieldName === xField) {
|
|
@@ -3691,6 +3763,16 @@ var triangleEventAnnotationRenderer = ({
|
|
|
3691
3763
|
eventColor: eventWithColor.color
|
|
3692
3764
|
});
|
|
3693
3765
|
};
|
|
3766
|
+
var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
|
|
3767
|
+
const rangeSelectEventHandler = eventHandlers.find(
|
|
3768
|
+
(eventHandler) => {
|
|
3769
|
+
var _a;
|
|
3770
|
+
return (_a = eventHandler.options.events) == null ? void 0 : _a.includes("range.select");
|
|
3771
|
+
}
|
|
3772
|
+
);
|
|
3773
|
+
const xAxisIsTime = xField === "_time";
|
|
3774
|
+
return !!rangeSelectEventHandler && xAxisIsTime;
|
|
3775
|
+
};
|
|
3694
3776
|
var canvasSupportedTimeSeriesCharts = ["splunk.line"];
|
|
3695
3777
|
var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
|
|
3696
3778
|
return canvasSupportedTimeSeriesCharts.indexOf(vizConfigKey) > -1;
|
|
@@ -3711,16 +3793,31 @@ var filterChartDataFromInternalFields = (chartData) => {
|
|
|
3711
3793
|
var convert2DArrayToNumbers = (arr) => {
|
|
3712
3794
|
return arr.map((subArray) => subArray.map((element) => parseFloat(element)));
|
|
3713
3795
|
};
|
|
3796
|
+
var parseAxisValue = (val) => {
|
|
3797
|
+
if (val === void 0 || val === null || val === "auto" || val === "") {
|
|
3798
|
+
return void 0;
|
|
3799
|
+
}
|
|
3800
|
+
const num = typeof val === "number" ? val : Number.parseFloat(val);
|
|
3801
|
+
return Number.isNaN(num) ? void 0 : num;
|
|
3802
|
+
};
|
|
3714
3803
|
var SideLegendWidth = 75;
|
|
3715
|
-
var
|
|
3804
|
+
var SeriesCompareLegendWidth = 200;
|
|
3716
3805
|
var getLegend = (props) => {
|
|
3717
3806
|
const legendPlacement = props == null ? void 0 : props.legendDisplay;
|
|
3807
|
+
const { isSeriesCompare } = props;
|
|
3808
|
+
const commonLegendProps = {
|
|
3809
|
+
center: true,
|
|
3810
|
+
fontSize: 12,
|
|
3811
|
+
largerTiles: true,
|
|
3812
|
+
hideSeriesValue: !isSeriesCompare
|
|
3813
|
+
// Show values if in seriesCompare mode
|
|
3814
|
+
};
|
|
3718
3815
|
switch (legendPlacement) {
|
|
3719
3816
|
case "off":
|
|
3720
3817
|
return false;
|
|
3721
3818
|
case "left":
|
|
3722
3819
|
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
|
|
3723
|
-
width: SideLegendWidth
|
|
3820
|
+
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
3724
3821
|
}, commonLegendProps));
|
|
3725
3822
|
case "bottom":
|
|
3726
3823
|
return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
|
|
@@ -3732,7 +3829,7 @@ var getLegend = (props) => {
|
|
|
3732
3829
|
}, commonLegendProps));
|
|
3733
3830
|
default:
|
|
3734
3831
|
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
|
|
3735
|
-
width: SideLegendWidth
|
|
3832
|
+
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
3736
3833
|
}, commonLegendProps));
|
|
3737
3834
|
}
|
|
3738
3835
|
};
|
|
@@ -3768,22 +3865,25 @@ var ellipsisAxisTitle = (axisTitle, containerSpacing, fontSize = 12) => {
|
|
|
3768
3865
|
const end = axisTitle.slice(-halfChars);
|
|
3769
3866
|
return `${start}...${end}`;
|
|
3770
3867
|
};
|
|
3771
|
-
var
|
|
3868
|
+
var getFieldName2 = (field) => {
|
|
3772
3869
|
const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
|
|
3773
3870
|
return fieldName;
|
|
3774
3871
|
};
|
|
3775
3872
|
var getFieldNames = (fields) => {
|
|
3776
|
-
return fields.map((field) =>
|
|
3873
|
+
return fields.map((field) => getFieldName2(field));
|
|
3777
3874
|
};
|
|
3778
|
-
var getXScaleConfig = (label, xAxisLabelVisibility) => {
|
|
3875
|
+
var getXScaleConfig = (label, xAxisLabelVisibility, xAxisLabelRotation) => {
|
|
3779
3876
|
const xConfig = { x: {} };
|
|
3780
3877
|
xConfig.x.label = label;
|
|
3781
3878
|
if (xAxisLabelVisibility === "hide") {
|
|
3782
3879
|
xConfig.x.hideLabels = true;
|
|
3783
3880
|
}
|
|
3881
|
+
if (xAxisLabelRotation !== void 0) {
|
|
3882
|
+
xConfig.x.labelRotation = xAxisLabelRotation;
|
|
3883
|
+
}
|
|
3784
3884
|
return xConfig;
|
|
3785
3885
|
};
|
|
3786
|
-
var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility) => {
|
|
3886
|
+
var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax) => {
|
|
3787
3887
|
const scaleType = yAxisScale != null ? yAxisScale : "linear";
|
|
3788
3888
|
const yConfig = { y: {} };
|
|
3789
3889
|
yConfig.y.label = label;
|
|
@@ -3799,14 +3899,20 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
|
|
|
3799
3899
|
if (yAxisLabelVisibility === "hide") {
|
|
3800
3900
|
yConfig.y.hideLabels = true;
|
|
3801
3901
|
}
|
|
3902
|
+
if (yAxisMin !== void 0 || yAxisMax !== void 0) {
|
|
3903
|
+
yConfig.y.range = (u, dataMin, dataMax) => {
|
|
3904
|
+
const min = yAxisMin != null ? yAxisMin : dataMin;
|
|
3905
|
+
const max = yAxisMax != null ? yAxisMax : dataMax;
|
|
3906
|
+
return [min, max];
|
|
3907
|
+
};
|
|
3908
|
+
}
|
|
3802
3909
|
return yConfig;
|
|
3803
3910
|
};
|
|
3804
|
-
var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility) => {
|
|
3911
|
+
var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility, y2AxisMin, y2AxisMax) => {
|
|
3805
3912
|
const y2Config = { y2: {} };
|
|
3806
3913
|
const scaleType = axisScale != null ? axisScale : "linear";
|
|
3807
3914
|
y2Config.y2.label = label;
|
|
3808
3915
|
y2Config.y2.side = "right";
|
|
3809
|
-
y2Config.y2.showGrid = false;
|
|
3810
3916
|
y2Config.y2.type = scaleType;
|
|
3811
3917
|
if (axisAbbreviation !== "none") {
|
|
3812
3918
|
y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
|
|
@@ -3816,9 +3922,16 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
3816
3922
|
if (y2AxisLabelVisibility === "hide") {
|
|
3817
3923
|
y2Config.y2.hideLabels = true;
|
|
3818
3924
|
}
|
|
3925
|
+
if (y2AxisMin !== void 0 || y2AxisMax !== void 0) {
|
|
3926
|
+
y2Config.y2.range = (u, dataMin, dataMax) => {
|
|
3927
|
+
const min = y2AxisMin != null ? y2AxisMin : dataMin;
|
|
3928
|
+
const max = y2AxisMax != null ? y2AxisMax : dataMax;
|
|
3929
|
+
return [min, max];
|
|
3930
|
+
};
|
|
3931
|
+
}
|
|
3819
3932
|
return y2Config;
|
|
3820
3933
|
};
|
|
3821
|
-
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay) => {
|
|
3934
|
+
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField) => {
|
|
3822
3935
|
const seriesConfig = {};
|
|
3823
3936
|
let spanGaps;
|
|
3824
3937
|
let replaceNullsWithZero;
|
|
@@ -3853,12 +3966,87 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
3853
3966
|
if (markerDisplay !== void 0) {
|
|
3854
3967
|
seriesConfig[field].markerDisplay = markerDisplay;
|
|
3855
3968
|
}
|
|
3969
|
+
const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
|
|
3970
|
+
if (fieldDashStyle) {
|
|
3971
|
+
seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
3972
|
+
}
|
|
3856
3973
|
if (replaceNullsWithZero !== void 0) {
|
|
3857
3974
|
seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
|
|
3858
3975
|
}
|
|
3859
3976
|
});
|
|
3860
3977
|
return seriesConfig;
|
|
3861
3978
|
};
|
|
3979
|
+
var findRangeIndices = (xData, startValue, endValue) => {
|
|
3980
|
+
let startXIndex = -1;
|
|
3981
|
+
let endXIndex = -1;
|
|
3982
|
+
const xDataEpoch = xData.map((val) => {
|
|
3983
|
+
if (typeof val === "string") {
|
|
3984
|
+
return new Date(val).getTime() / 1e3;
|
|
3985
|
+
}
|
|
3986
|
+
return val;
|
|
3987
|
+
});
|
|
3988
|
+
for (let i = 0; i < xDataEpoch.length; i += 1) {
|
|
3989
|
+
if (xDataEpoch[i] >= startValue) {
|
|
3990
|
+
startXIndex = i;
|
|
3991
|
+
break;
|
|
3992
|
+
}
|
|
3993
|
+
}
|
|
3994
|
+
if (startXIndex === -1 && xDataEpoch.length > 0) {
|
|
3995
|
+
startXIndex = xDataEpoch.length - 1;
|
|
3996
|
+
}
|
|
3997
|
+
for (let i = xDataEpoch.length - 1; i >= 0; i -= 1) {
|
|
3998
|
+
if (xDataEpoch[i] <= endValue) {
|
|
3999
|
+
endXIndex = i;
|
|
4000
|
+
break;
|
|
4001
|
+
}
|
|
4002
|
+
}
|
|
4003
|
+
if (endXIndex === -1 && xDataEpoch.length > 0) {
|
|
4004
|
+
endXIndex = 0;
|
|
4005
|
+
}
|
|
4006
|
+
return { startXIndex, endXIndex };
|
|
4007
|
+
};
|
|
4008
|
+
|
|
4009
|
+
// src/common/hooks/useTrellisEnabled.ts
|
|
4010
|
+
var useTrellisFeatureFlagOn = () => {
|
|
4011
|
+
const context = (0, react_exports.useContext)(FeatureFlagContext_default);
|
|
4012
|
+
return Boolean(context == null ? void 0 : context.visualizations_enableTrellis);
|
|
4013
|
+
};
|
|
4014
|
+
var useTrellisEnabled = (layoutType = visualization_schemas_exports.LAYOUT_TYPE.Off) => {
|
|
4015
|
+
const trellisFeatureEnabled = useTrellisFeatureFlagOn();
|
|
4016
|
+
return trellisFeatureEnabled && layoutType === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
4017
|
+
};
|
|
4018
|
+
|
|
4019
|
+
// src/common/components/TrellisTitle.tsx
|
|
4020
|
+
var TRELLIS_TITLE_HEIGHT = 28;
|
|
4021
|
+
var TrellisTitleText = styled_components_default.div`
|
|
4022
|
+
margin-left: 10px;
|
|
4023
|
+
margin-right: 10px;
|
|
4024
|
+
padding-top: 8px;
|
|
4025
|
+
text-overflow: ellipsis;
|
|
4026
|
+
white-space: nowrap;
|
|
4027
|
+
overflow: hidden;
|
|
4028
|
+
`;
|
|
4029
|
+
var TrellisTitleDiv = styled_components_default.div`
|
|
4030
|
+
height: ${TRELLIS_TITLE_HEIGHT}px;
|
|
4031
|
+
font-size: 14px;
|
|
4032
|
+
font-weight: 700;
|
|
4033
|
+
color: ${(props) => props.fontColor};
|
|
4034
|
+
background-color: ${(props) => props.backgroundColor};
|
|
4035
|
+
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.
|
|
4036
|
+
`;
|
|
4037
|
+
var TrellisTitle = (props) => {
|
|
4038
|
+
const titleText = String(props.trellisKey).toString();
|
|
4039
|
+
return /* @__PURE__ */ react_exports.createElement(
|
|
4040
|
+
TrellisTitleDiv,
|
|
4041
|
+
{
|
|
4042
|
+
fontColor: props.fontColor,
|
|
4043
|
+
backgroundColor: props.backgroundColor,
|
|
4044
|
+
"data-test": "trellis-title",
|
|
4045
|
+
title: titleText
|
|
4046
|
+
},
|
|
4047
|
+
/* @__PURE__ */ react_exports.createElement(TrellisTitleText, null, titleText)
|
|
4048
|
+
);
|
|
4049
|
+
};
|
|
3862
4050
|
|
|
3863
4051
|
// src/common/TimeSeriesChartWrapper.tsx
|
|
3864
4052
|
var TimeSeriesChartContainer = styled_components_default.div`
|
|
@@ -3869,38 +4057,123 @@ var TimeSeriesChartContainer = styled_components_default.div`
|
|
|
3869
4057
|
position: absolute !important; // This is needed for canvas element export pdf/png to work correctly
|
|
3870
4058
|
}
|
|
3871
4059
|
`;
|
|
3872
|
-
var
|
|
4060
|
+
var appendTrellisToPayload = (payload, trellisKey, trellisSplitBy) => {
|
|
4061
|
+
const result = __spreadValues({}, payload);
|
|
4062
|
+
if (trellisSplitBy) {
|
|
4063
|
+
result["trellis.name"] = trellisSplitBy;
|
|
4064
|
+
}
|
|
4065
|
+
if (trellisKey) {
|
|
4066
|
+
result["trellis.value"] = trellisKey;
|
|
4067
|
+
}
|
|
4068
|
+
return result;
|
|
4069
|
+
};
|
|
4070
|
+
var hasMouseoverPayloadChanged = (currentPayload, previousPayload) => {
|
|
4071
|
+
if (!previousPayload) {
|
|
4072
|
+
return true;
|
|
4073
|
+
}
|
|
4074
|
+
if (currentPayload.index !== previousPayload.index) {
|
|
4075
|
+
return true;
|
|
4076
|
+
}
|
|
4077
|
+
if (currentPayload.seriesIndex !== previousPayload.seriesIndex) {
|
|
4078
|
+
return true;
|
|
4079
|
+
}
|
|
4080
|
+
if (currentPayload["trellis.name"] !== previousPayload["trellis.name"]) {
|
|
4081
|
+
return true;
|
|
4082
|
+
}
|
|
4083
|
+
if (currentPayload["trellis.value"] !== previousPayload["trellis.value"]) {
|
|
4084
|
+
return true;
|
|
4085
|
+
}
|
|
4086
|
+
return false;
|
|
4087
|
+
};
|
|
4088
|
+
var handleClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
|
|
3873
4089
|
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(chartEvent, "value", "seriesKey")), {
|
|
3874
4090
|
name: chartEvent.seriesKey
|
|
3875
4091
|
});
|
|
3876
4092
|
delete payload.seriesKey;
|
|
3877
4093
|
if (chartEvent.rowContext) {
|
|
3878
|
-
Object.
|
|
3879
|
-
payload
|
|
3880
|
-
|
|
4094
|
+
Object.assign(
|
|
4095
|
+
payload,
|
|
4096
|
+
Object.keys(chartEvent.rowContext).reduce((acc, fieldName) => {
|
|
4097
|
+
acc[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
|
|
4098
|
+
return acc;
|
|
4099
|
+
}, {})
|
|
4100
|
+
);
|
|
3881
4101
|
}
|
|
4102
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
3882
4103
|
if (onClick) {
|
|
3883
4104
|
onClick({
|
|
3884
4105
|
type: "point.click",
|
|
3885
4106
|
originalEvent: chartEvent,
|
|
3886
|
-
payload
|
|
4107
|
+
payload: updatedPayload
|
|
3887
4108
|
});
|
|
3888
4109
|
}
|
|
3889
4110
|
};
|
|
3890
|
-
var handleLegendClick = (chartEvent, onClick) => {
|
|
4111
|
+
var handleLegendClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
|
|
3891
4112
|
const payload = {
|
|
3892
4113
|
name: chartEvent
|
|
3893
4114
|
};
|
|
4115
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
3894
4116
|
if (onClick) {
|
|
3895
4117
|
onClick({
|
|
3896
4118
|
type: "legend.click",
|
|
3897
4119
|
originalEvent: chartEvent,
|
|
3898
|
-
payload
|
|
4120
|
+
payload: updatedPayload
|
|
3899
4121
|
});
|
|
3900
4122
|
}
|
|
3901
4123
|
};
|
|
4124
|
+
var handleRangeSelection = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
|
|
4125
|
+
var _a;
|
|
4126
|
+
if (!rangeEvent) {
|
|
4127
|
+
return;
|
|
4128
|
+
}
|
|
4129
|
+
const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
|
|
4130
|
+
const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
|
|
4131
|
+
const payload = {
|
|
4132
|
+
startXIndex,
|
|
4133
|
+
startXValue: rangeEvent.start,
|
|
4134
|
+
endXIndex,
|
|
4135
|
+
endXValue: rangeEvent.end
|
|
4136
|
+
};
|
|
4137
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
4138
|
+
if (onSelect) {
|
|
4139
|
+
onSelect({
|
|
4140
|
+
type: "range.selectBeforeZoom",
|
|
4141
|
+
originalEvent: rangeEvent,
|
|
4142
|
+
payload: updatedPayload
|
|
4143
|
+
});
|
|
4144
|
+
}
|
|
4145
|
+
};
|
|
4146
|
+
var handleRangeZoom = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
|
|
4147
|
+
var _a;
|
|
4148
|
+
const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
|
|
4149
|
+
const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
|
|
4150
|
+
const payload = {
|
|
4151
|
+
startXIndex,
|
|
4152
|
+
startXValue: rangeEvent.start,
|
|
4153
|
+
endXIndex,
|
|
4154
|
+
endXValue: rangeEvent.end
|
|
4155
|
+
};
|
|
4156
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
4157
|
+
if (onSelect) {
|
|
4158
|
+
onSelect({
|
|
4159
|
+
type: "range.select",
|
|
4160
|
+
originalEvent: rangeEvent,
|
|
4161
|
+
payload: updatedPayload
|
|
4162
|
+
});
|
|
4163
|
+
}
|
|
4164
|
+
};
|
|
4165
|
+
var parseArrayOption = (value) => {
|
|
4166
|
+
if (Array.isArray(value)) {
|
|
4167
|
+
return value;
|
|
4168
|
+
}
|
|
4169
|
+
if (value) {
|
|
4170
|
+
return JSON.parse(value);
|
|
4171
|
+
}
|
|
4172
|
+
return void 0;
|
|
4173
|
+
};
|
|
3902
4174
|
var TimeSeriesChartWrapper = (props) => {
|
|
3903
|
-
|
|
4175
|
+
var _b, _c, _d;
|
|
4176
|
+
const _a = props, {
|
|
3904
4177
|
width,
|
|
3905
4178
|
height,
|
|
3906
4179
|
chartData,
|
|
@@ -3913,12 +4186,49 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3913
4186
|
markerDisplay,
|
|
3914
4187
|
onClick,
|
|
3915
4188
|
onPointMouseOver,
|
|
3916
|
-
onPointMouseOut
|
|
3917
|
-
|
|
3918
|
-
|
|
4189
|
+
onPointMouseOut,
|
|
4190
|
+
onSelect,
|
|
4191
|
+
splitByLayout,
|
|
4192
|
+
trellisKey,
|
|
4193
|
+
trellisSplitBy,
|
|
3919
4194
|
backgroundColor,
|
|
4195
|
+
defaultFontColor,
|
|
4196
|
+
additionalTooltipValues,
|
|
4197
|
+
showYAxisWithZero: showYAxisWithZeroFromProps,
|
|
4198
|
+
showY2AxisWithZero: showY2AxisWithZeroFromProps
|
|
4199
|
+
} = _a, otherOptions = __objRest(_a, [
|
|
4200
|
+
"width",
|
|
4201
|
+
"height",
|
|
4202
|
+
"chartData",
|
|
4203
|
+
"options",
|
|
4204
|
+
"userLocale",
|
|
4205
|
+
"annotationX",
|
|
4206
|
+
"annotationLabel",
|
|
4207
|
+
"annotationColor",
|
|
4208
|
+
"legendDisplay",
|
|
4209
|
+
"markerDisplay",
|
|
4210
|
+
"onClick",
|
|
4211
|
+
"onPointMouseOver",
|
|
4212
|
+
"onPointMouseOut",
|
|
4213
|
+
"onSelect",
|
|
4214
|
+
"splitByLayout",
|
|
4215
|
+
"trellisKey",
|
|
4216
|
+
"trellisSplitBy",
|
|
4217
|
+
"backgroundColor",
|
|
4218
|
+
"defaultFontColor",
|
|
4219
|
+
"additionalTooltipValues",
|
|
4220
|
+
// Extract showYAxisWithZero directly from props for accelerated render mode
|
|
4221
|
+
"showYAxisWithZero",
|
|
4222
|
+
"showY2AxisWithZero"
|
|
4223
|
+
]);
|
|
4224
|
+
const { eventHandlers, xField: xFieldFromProps } = otherOptions;
|
|
4225
|
+
const trellisEnabled = useTrellisEnabled(splitByLayout);
|
|
4226
|
+
const {
|
|
4227
|
+
backgroundColor: bgColorFromOptions,
|
|
3920
4228
|
seriesColors: seriesColorsStr,
|
|
3921
4229
|
fieldColors,
|
|
4230
|
+
legendLabels: legendLabelsStr,
|
|
4231
|
+
legendMode,
|
|
3922
4232
|
"axisTitleX.text": xAxisTitleText,
|
|
3923
4233
|
"axisTitleY.text": yAxisTitleText,
|
|
3924
4234
|
"axisTitleY2.text": y2AxisTitleText,
|
|
@@ -3926,8 +4236,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3926
4236
|
"axisTitleY.visibility": yAxisTitleVisibility,
|
|
3927
4237
|
"axisTitleY2.visibility": y2AxisTitleVisibility,
|
|
3928
4238
|
"axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
|
|
4239
|
+
"axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
|
|
3929
4240
|
"axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
|
|
4241
|
+
"axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
|
|
3930
4242
|
"axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
|
|
4243
|
+
"axisLabelsY2.majorUnit": y2AxisMajorUnitFromSimpleXML,
|
|
3931
4244
|
"axisY.abbreviation": yAxisAbbreviation,
|
|
3932
4245
|
"axisY.scale": yAxisScale,
|
|
3933
4246
|
"axisY2.abbreviation": y2AxisAbbreviation,
|
|
@@ -3937,10 +4250,63 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3937
4250
|
"axisLabelsY2.integerUnits": y2IntegerUnits,
|
|
3938
4251
|
"chart.overlayFields": overlayFieldsStr,
|
|
3939
4252
|
"chart.nullValueMode": nullValueMode,
|
|
3940
|
-
|
|
4253
|
+
"chart.showDataLabels": showDataLabels,
|
|
4254
|
+
lineWidth,
|
|
4255
|
+
lineDashStyle,
|
|
4256
|
+
fieldDashStyles: lineDashStylesByFieldStr,
|
|
4257
|
+
yAxisMin: yAxisMinRaw,
|
|
4258
|
+
yAxisMax: yAxisMaxRaw,
|
|
4259
|
+
y2AxisMin: y2AxisMinRaw,
|
|
4260
|
+
y2AxisMax: y2AxisMaxRaw,
|
|
4261
|
+
showXMajorGridLines,
|
|
4262
|
+
showYMajorGridLines,
|
|
4263
|
+
showY2MajorGridLines,
|
|
4264
|
+
showYMinorGridLines,
|
|
4265
|
+
showY2MinorGridLines,
|
|
4266
|
+
showLineSmoothing,
|
|
4267
|
+
yAxisMajorTickVisibility,
|
|
4268
|
+
y2AxisMajorTickVisibility,
|
|
4269
|
+
yAxisMajorTickSize,
|
|
4270
|
+
y2AxisMajorTickSize,
|
|
4271
|
+
yAxisMajorTickInterval,
|
|
4272
|
+
y2AxisMajorTickInterval,
|
|
4273
|
+
yAxisMinorTickVisibility,
|
|
4274
|
+
y2AxisMinorTickVisibility,
|
|
4275
|
+
yAxisMinorTickSize,
|
|
4276
|
+
y2AxisMinorTickSize,
|
|
4277
|
+
showYAxisWithZero: showYAxisWithZeroFromOptions,
|
|
4278
|
+
showY2AxisWithZero: showY2AxisWithZeroFromOptions
|
|
3941
4279
|
} = options;
|
|
4280
|
+
const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
|
|
4281
|
+
const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
|
|
4282
|
+
const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
|
|
4283
|
+
const showYMajorTicks = yAxisMajorTickVisibility === "show";
|
|
4284
|
+
const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
|
|
4285
|
+
const showYMinorTicks = yAxisMinorTickVisibility === "show";
|
|
4286
|
+
const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
|
|
4287
|
+
const yAxisMin = parseAxisValue(yAxisMinRaw);
|
|
4288
|
+
const yAxisMax = parseAxisValue(yAxisMaxRaw);
|
|
4289
|
+
const y2AxisMin = parseAxisValue(y2AxisMinRaw);
|
|
4290
|
+
const y2AxisMax = parseAxisValue(y2AxisMaxRaw);
|
|
4291
|
+
const parseTickInterval = (simpleXMLValue, canvasValue) => {
|
|
4292
|
+
if (simpleXMLValue) return Number(simpleXMLValue);
|
|
4293
|
+
if (canvasValue) return Number(canvasValue);
|
|
4294
|
+
return void 0;
|
|
4295
|
+
};
|
|
4296
|
+
const yAxisMajorTickIntervalNum = parseTickInterval(yAxisMajorUnitFromSimpleXML, yAxisMajorTickInterval);
|
|
4297
|
+
const y2AxisMajorTickIntervalNum = parseTickInterval(
|
|
4298
|
+
y2AxisMajorUnitFromSimpleXML,
|
|
4299
|
+
y2AxisMajorTickInterval
|
|
4300
|
+
);
|
|
4301
|
+
const yAxisMajorTickSizeNum = yAxisMajorTickSize ? Number(yAxisMajorTickSize) : void 0;
|
|
4302
|
+
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize ? Number(y2AxisMajorTickSize) : void 0;
|
|
4303
|
+
const yAxisMinorTickSizeNum = yAxisMinorTickSize ? Number(yAxisMinorTickSize) : void 0;
|
|
4304
|
+
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize ? Number(y2AxisMinorTickSize) : void 0;
|
|
3942
4305
|
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
3943
4306
|
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
4307
|
+
const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
|
|
4308
|
+
const legendLabels = parseArrayOption(legendLabelsStr);
|
|
4309
|
+
const bgColor = backgroundColor || bgColorFromOptions;
|
|
3944
4310
|
const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
|
|
3945
4311
|
const [containerHeight, setContainerHeight] = react_exports.useState(Number(props.height));
|
|
3946
4312
|
const cachedHandleResize = react_exports.useCallback((w, h) => {
|
|
@@ -3951,31 +4317,64 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3951
4317
|
fields: chartData.fields,
|
|
3952
4318
|
columns: chartData.seriesList
|
|
3953
4319
|
});
|
|
3954
|
-
const xField =
|
|
4320
|
+
const xField = getFieldName2(filteredChartData.fields[0]);
|
|
3955
4321
|
const yFields = getFieldNames(
|
|
3956
4322
|
filteredChartData.fields.length > 1 ? filteredChartData.fields.slice(1) : []
|
|
3957
4323
|
);
|
|
3958
|
-
const y2Fields =
|
|
3959
|
-
|
|
4324
|
+
const y2Fields = (0, react_exports.useMemo)(
|
|
4325
|
+
() => y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [],
|
|
4326
|
+
[y2FieldsStr]
|
|
4327
|
+
);
|
|
4328
|
+
const overlayFields = (0, react_exports.useMemo)(
|
|
4329
|
+
() => overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [],
|
|
4330
|
+
[overlayFieldsStr]
|
|
4331
|
+
);
|
|
3960
4332
|
let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
|
|
3961
4333
|
xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
|
|
3962
|
-
|
|
4334
|
+
const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
|
|
4335
|
+
let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility);
|
|
3963
4336
|
yAxisTitle = ellipsisAxisTitle(yAxisTitle, containerHeight);
|
|
3964
4337
|
const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
|
|
3965
4338
|
let y2AxisTitle = getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility);
|
|
3966
4339
|
y2AxisTitle = ellipsisAxisTitle(y2AxisTitle, containerHeight);
|
|
3967
|
-
const xScaleConfig =
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
4340
|
+
const xScaleConfig = (0, react_exports.useMemo)(
|
|
4341
|
+
() => getXScaleConfig(xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation),
|
|
4342
|
+
[xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation]
|
|
4343
|
+
);
|
|
4344
|
+
const yScaleConfig = (0, react_exports.useMemo)(
|
|
4345
|
+
() => getYScaleConfig(
|
|
4346
|
+
yAxisTitle,
|
|
4347
|
+
yAxisAbbreviation,
|
|
4348
|
+
yAxisScale,
|
|
4349
|
+
yAxisLabelVisibility,
|
|
4350
|
+
yAxisMin,
|
|
4351
|
+
yAxisMax
|
|
4352
|
+
),
|
|
4353
|
+
[yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax]
|
|
4354
|
+
);
|
|
4355
|
+
const y2ScaleConfig = (0, react_exports.useMemo)(() => {
|
|
4356
|
+
if (y2Enabled) {
|
|
4357
|
+
return getY2ScaleConfig(
|
|
4358
|
+
y2AxisTitle,
|
|
4359
|
+
y2AxisAbbreviation,
|
|
4360
|
+
y2AxisScale,
|
|
4361
|
+
y2IntegerUnits,
|
|
4362
|
+
y2AxisLabelVisibility,
|
|
4363
|
+
y2AxisMin,
|
|
4364
|
+
y2AxisMax
|
|
4365
|
+
);
|
|
4366
|
+
}
|
|
4367
|
+
return {};
|
|
4368
|
+
}, [
|
|
4369
|
+
y2Enabled,
|
|
4370
|
+
y2AxisTitle,
|
|
4371
|
+
y2AxisAbbreviation,
|
|
4372
|
+
y2AxisScale,
|
|
4373
|
+
y2IntegerUnits,
|
|
4374
|
+
y2AxisLabelVisibility,
|
|
4375
|
+
y2AxisMin,
|
|
4376
|
+
y2AxisMax
|
|
4377
|
+
]);
|
|
3979
4378
|
const uplotContainerElement = (0, react_exports.useRef)(null);
|
|
3980
4379
|
const seriesDataFormatted = [
|
|
3981
4380
|
filteredChartData.columns[0],
|
|
@@ -3991,9 +4390,21 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3991
4390
|
overlayFields,
|
|
3992
4391
|
y2Enabled,
|
|
3993
4392
|
nullValueMode,
|
|
3994
|
-
markerDisplay
|
|
4393
|
+
markerDisplay,
|
|
4394
|
+
lineDashStyle,
|
|
4395
|
+
lineDashStylesByField
|
|
3995
4396
|
),
|
|
3996
|
-
[
|
|
4397
|
+
[
|
|
4398
|
+
yFields,
|
|
4399
|
+
y2Fields,
|
|
4400
|
+
lineWidth,
|
|
4401
|
+
overlayFields,
|
|
4402
|
+
y2Enabled,
|
|
4403
|
+
nullValueMode,
|
|
4404
|
+
markerDisplay,
|
|
4405
|
+
lineDashStyle,
|
|
4406
|
+
lineDashStylesByField
|
|
4407
|
+
]
|
|
3997
4408
|
);
|
|
3998
4409
|
const chartingEventAnnotations = (0, react_exports.useMemo)(
|
|
3999
4410
|
() => getAnnotationsForCanvas({
|
|
@@ -4007,25 +4418,54 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4007
4418
|
() => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
|
|
4008
4419
|
[xScaleConfig, yScaleConfig, y2ScaleConfig]
|
|
4009
4420
|
);
|
|
4010
|
-
const legend = (0, react_exports.useMemo)(
|
|
4421
|
+
const legend = (0, react_exports.useMemo)(
|
|
4422
|
+
() => getLegend({ legendDisplay, isSeriesCompare: legendMode === "seriesCompare" }),
|
|
4423
|
+
[legendDisplay, legendMode]
|
|
4424
|
+
);
|
|
4011
4425
|
const handleChartClick = react_exports.useCallback(
|
|
4012
4426
|
(event) => {
|
|
4013
4427
|
if (onClick) {
|
|
4014
|
-
handleClick(event, onClick);
|
|
4428
|
+
handleClick(event, onClick, trellisKey, trellisSplitBy);
|
|
4015
4429
|
}
|
|
4016
4430
|
},
|
|
4017
|
-
[onClick]
|
|
4431
|
+
[onClick, trellisKey, trellisSplitBy]
|
|
4018
4432
|
);
|
|
4019
4433
|
const handleChartLegendClick = react_exports.useCallback(
|
|
4020
4434
|
(event) => {
|
|
4021
4435
|
if (onClick) {
|
|
4022
|
-
handleLegendClick(event, onClick);
|
|
4436
|
+
handleLegendClick(event, onClick, trellisKey, trellisSplitBy);
|
|
4437
|
+
}
|
|
4438
|
+
},
|
|
4439
|
+
[onClick, trellisKey, trellisSplitBy]
|
|
4440
|
+
);
|
|
4441
|
+
const handleChartRangeSelection = react_exports.useCallback(
|
|
4442
|
+
(range2) => {
|
|
4443
|
+
if (onSelect) {
|
|
4444
|
+
handleRangeSelection(range2, onSelect, chartData, trellisKey, trellisSplitBy);
|
|
4445
|
+
}
|
|
4446
|
+
},
|
|
4447
|
+
[onSelect, chartData, trellisKey, trellisSplitBy]
|
|
4448
|
+
);
|
|
4449
|
+
const handleChartRangeZoom = react_exports.useCallback(
|
|
4450
|
+
(range2) => {
|
|
4451
|
+
if (onSelect) {
|
|
4452
|
+
handleRangeZoom(range2, onSelect, chartData, trellisKey, trellisSplitBy);
|
|
4023
4453
|
}
|
|
4024
4454
|
},
|
|
4025
|
-
[
|
|
4455
|
+
[onSelect, chartData, trellisKey, trellisSplitBy]
|
|
4456
|
+
);
|
|
4457
|
+
const xFieldToUse = xFieldFromProps || xField;
|
|
4458
|
+
const enableSearchZoom = react_exports.useMemo(
|
|
4459
|
+
() => shouldEnableSearchZoom(eventHandlers, xFieldToUse),
|
|
4460
|
+
[eventHandlers, xFieldToUse]
|
|
4026
4461
|
);
|
|
4027
4462
|
const lastPayloadRef = react_exports.useRef(null);
|
|
4028
4463
|
const lastOriginalEventRef = react_exports.useRef(null);
|
|
4464
|
+
const previousMouseoverPayloadRef = react_exports.useRef(null);
|
|
4465
|
+
const additionalTooltipValuesRef = react_exports.useRef(additionalTooltipValues);
|
|
4466
|
+
react_exports.useEffect(() => {
|
|
4467
|
+
additionalTooltipValuesRef.current = additionalTooltipValues;
|
|
4468
|
+
}, [additionalTooltipValues]);
|
|
4029
4469
|
const handleChartCrosshairChange = react_exports.useCallback(
|
|
4030
4470
|
(event) => {
|
|
4031
4471
|
if (onPointMouseOver || onPointMouseOut) {
|
|
@@ -4037,6 +4477,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4037
4477
|
payload: lastPayloadRef.current
|
|
4038
4478
|
});
|
|
4039
4479
|
}
|
|
4480
|
+
previousMouseoverPayloadRef.current = null;
|
|
4040
4481
|
return;
|
|
4041
4482
|
}
|
|
4042
4483
|
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
|
|
@@ -4044,25 +4485,36 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4044
4485
|
});
|
|
4045
4486
|
delete payload.seriesKey;
|
|
4046
4487
|
if (event.rowContext) {
|
|
4047
|
-
Object.
|
|
4048
|
-
payload
|
|
4049
|
-
|
|
4488
|
+
Object.assign(
|
|
4489
|
+
payload,
|
|
4490
|
+
Object.keys(event.rowContext).reduce((acc, fieldName) => {
|
|
4491
|
+
acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
|
|
4492
|
+
return acc;
|
|
4493
|
+
}, {})
|
|
4494
|
+
);
|
|
4495
|
+
}
|
|
4496
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
4497
|
+
if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
|
|
4498
|
+
return;
|
|
4050
4499
|
}
|
|
4051
|
-
lastPayloadRef.current =
|
|
4500
|
+
lastPayloadRef.current = updatedPayload;
|
|
4052
4501
|
lastOriginalEventRef.current = event;
|
|
4502
|
+
previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
|
|
4053
4503
|
if (onPointMouseOver) {
|
|
4054
4504
|
onPointMouseOver({
|
|
4055
4505
|
type: "point.mouseover",
|
|
4056
4506
|
originalEvent: event,
|
|
4057
|
-
payload
|
|
4507
|
+
payload: updatedPayload
|
|
4058
4508
|
});
|
|
4059
4509
|
}
|
|
4060
4510
|
}
|
|
4061
4511
|
},
|
|
4062
|
-
[onPointMouseOver, onPointMouseOut]
|
|
4512
|
+
[onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy]
|
|
4063
4513
|
);
|
|
4064
|
-
const
|
|
4065
|
-
|
|
4514
|
+
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}`;
|
|
4515
|
+
const memoizedChart = (0, react_exports.useMemo)(() => {
|
|
4516
|
+
const computedOnRangeZoom = onSelect ? handleChartRangeZoom : void 0;
|
|
4517
|
+
return /* @__PURE__ */ react_exports.createElement(visualization_canvas_exports.RangeSelectionProvider, { key: dataKey }, /* @__PURE__ */ react_exports.createElement(
|
|
4066
4518
|
visualization_canvas_exports.TimeSeriesChart,
|
|
4067
4519
|
{
|
|
4068
4520
|
data: chartData,
|
|
@@ -4072,49 +4524,107 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4072
4524
|
seriesColorsByField,
|
|
4073
4525
|
seriesConfig: seriesOverrides,
|
|
4074
4526
|
legend,
|
|
4527
|
+
legendLabels,
|
|
4528
|
+
isSeriesCompare: legendMode === "seriesCompare",
|
|
4529
|
+
maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
|
|
4075
4530
|
scaleConfig,
|
|
4076
4531
|
timestampFormat: "expanded",
|
|
4077
4532
|
onCrosshairClick: onClick ? handleChartClick : void 0,
|
|
4078
4533
|
onCrosshairChange: onPointMouseOver || onPointMouseOut ? handleChartCrosshairChange : void 0,
|
|
4079
4534
|
onSeriesClick: onClick ? handleChartLegendClick : void 0,
|
|
4535
|
+
onRangeSelection: handleChartRangeSelection,
|
|
4536
|
+
onRangeZoom: computedOnRangeZoom,
|
|
4537
|
+
serverSideZoom: enableSearchZoom,
|
|
4080
4538
|
userLocale,
|
|
4081
4539
|
events: chartingEventAnnotations,
|
|
4082
|
-
eventsConfig: { renderer: triangleEventAnnotationRenderer }
|
|
4540
|
+
eventsConfig: { renderer: triangleEventAnnotationRenderer },
|
|
4541
|
+
additionalTooltipValuesRef,
|
|
4542
|
+
showXMajorGridLines,
|
|
4543
|
+
showYMajorGridLines,
|
|
4544
|
+
showY2MajorGridLines,
|
|
4545
|
+
showYMinorGridLines,
|
|
4546
|
+
showY2MinorGridLines,
|
|
4547
|
+
showLineSmoothing,
|
|
4548
|
+
dataValuesDisplay,
|
|
4549
|
+
showYMajorTicks,
|
|
4550
|
+
showY2MajorTicks,
|
|
4551
|
+
yAxisMajorTickSize: yAxisMajorTickSizeNum,
|
|
4552
|
+
y2AxisMajorTickSize: y2AxisMajorTickSizeNum,
|
|
4553
|
+
yAxisMajorTickInterval: yAxisMajorTickIntervalNum,
|
|
4554
|
+
y2AxisMajorTickInterval: y2AxisMajorTickIntervalNum,
|
|
4555
|
+
showYMinorTicks,
|
|
4556
|
+
showY2MinorTicks,
|
|
4557
|
+
yAxisMinorTickSize: yAxisMinorTickSizeNum,
|
|
4558
|
+
y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
|
|
4559
|
+
showYAxisWithZero,
|
|
4560
|
+
showY2AxisWithZero
|
|
4083
4561
|
}
|
|
4084
|
-
)
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4562
|
+
));
|
|
4563
|
+
}, [
|
|
4564
|
+
onSelect,
|
|
4565
|
+
handleChartRangeZoom,
|
|
4566
|
+
dataKey,
|
|
4567
|
+
chartData,
|
|
4568
|
+
containerWidth,
|
|
4569
|
+
containerHeight,
|
|
4570
|
+
seriesColors,
|
|
4571
|
+
seriesColorsByField,
|
|
4572
|
+
seriesOverrides,
|
|
4573
|
+
legend,
|
|
4574
|
+
legendLabels,
|
|
4575
|
+
scaleConfig,
|
|
4576
|
+
onClick,
|
|
4577
|
+
handleChartClick,
|
|
4578
|
+
onPointMouseOver,
|
|
4579
|
+
onPointMouseOut,
|
|
4580
|
+
handleChartCrosshairChange,
|
|
4581
|
+
handleChartLegendClick,
|
|
4582
|
+
handleChartRangeSelection,
|
|
4583
|
+
enableSearchZoom,
|
|
4584
|
+
userLocale,
|
|
4585
|
+
chartingEventAnnotations,
|
|
4586
|
+
showXMajorGridLines,
|
|
4587
|
+
showYMajorGridLines,
|
|
4588
|
+
showY2MajorGridLines,
|
|
4589
|
+
showYMinorGridLines,
|
|
4590
|
+
showY2MinorGridLines,
|
|
4591
|
+
showLineSmoothing,
|
|
4592
|
+
dataValuesDisplay,
|
|
4593
|
+
showYMajorTicks,
|
|
4594
|
+
showY2MajorTicks,
|
|
4595
|
+
yAxisMajorTickSizeNum,
|
|
4596
|
+
y2AxisMajorTickSizeNum,
|
|
4597
|
+
yAxisMajorTickIntervalNum,
|
|
4598
|
+
y2AxisMajorTickIntervalNum,
|
|
4599
|
+
showYMinorTicks,
|
|
4600
|
+
showY2MinorTicks,
|
|
4601
|
+
yAxisMinorTickSizeNum,
|
|
4602
|
+
y2AxisMinorTickSizeNum,
|
|
4603
|
+
showYAxisWithZero,
|
|
4604
|
+
showY2AxisWithZero,
|
|
4605
|
+
legendMode
|
|
4606
|
+
]);
|
|
4104
4607
|
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
4105
|
-
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor }, memoizedChart);
|
|
4106
|
-
}, [
|
|
4107
|
-
return /* @__PURE__ */ react_exports.createElement(
|
|
4608
|
+
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
|
|
4609
|
+
}, [bgColor, memoizedChart]);
|
|
4610
|
+
return /* @__PURE__ */ react_exports.createElement(react_exports.Fragment, null, trellisEnabled && /* @__PURE__ */ react_exports.createElement(
|
|
4611
|
+
TrellisTitle,
|
|
4612
|
+
{
|
|
4613
|
+
trellisKey,
|
|
4614
|
+
backgroundColor: bgColor,
|
|
4615
|
+
fontColor: defaultFontColor
|
|
4616
|
+
}
|
|
4617
|
+
), /* @__PURE__ */ react_exports.createElement(
|
|
4108
4618
|
TimeSeriesChartContainer,
|
|
4109
4619
|
{
|
|
4110
|
-
height,
|
|
4620
|
+
height: trellisEnabled ? Number(height) - TRELLIS_TITLE_HEIGHT : height,
|
|
4111
4621
|
width,
|
|
4112
4622
|
ref: uplotContainerElement,
|
|
4113
4623
|
"data-test": "timeseries-chart-wrapper"
|
|
4114
4624
|
},
|
|
4115
4625
|
/* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }),
|
|
4116
4626
|
memoizedVisualization
|
|
4117
|
-
);
|
|
4627
|
+
));
|
|
4118
4628
|
};
|
|
4119
4629
|
var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
|
|
4120
4630
|
|
|
@@ -4477,10 +4987,10 @@ var formatLayer = (l, dataFields, dataSourceData, transformedData) => {
|
|
|
4477
4987
|
return typeof geomItem === "string" ? JSON.parse(geomItem) : geomItem;
|
|
4478
4988
|
});
|
|
4479
4989
|
}
|
|
4480
|
-
if (Object.
|
|
4990
|
+
if (Object.hasOwn(layer, "seriesColors")) {
|
|
4481
4991
|
layer.seriesColors = Array.isArray(layer.seriesColors) ? (0, colorUtils_exports.sanitizeArrayOfColors)(layer.seriesColors) : void 0;
|
|
4482
4992
|
}
|
|
4483
|
-
if (Object.
|
|
4993
|
+
if (Object.hasOwn(layer, "dataColors")) {
|
|
4484
4994
|
layer.dataColors = Array.isArray(layer.dataColors) ? (0, colorUtils_exports.sanitizeArrayOfColors)(layer.dataColors) : void 0;
|
|
4485
4995
|
}
|
|
4486
4996
|
layer.metadata = transformedData;
|
|
@@ -4595,7 +5105,7 @@ var withNullToZeros = (Viz) => {
|
|
|
4595
5105
|
function useIconPlaceholder(dataSources, loading) {
|
|
4596
5106
|
return loading;
|
|
4597
5107
|
}
|
|
4598
|
-
var
|
|
5108
|
+
var MapVisualization = withoutInternalFields(
|
|
4599
5109
|
withTooltipFields(
|
|
4600
5110
|
withNullToZeros(
|
|
4601
5111
|
withDashboardViz_default({
|
|
@@ -4609,5 +5119,5 @@ var Map2 = withoutInternalFields(
|
|
|
4609
5119
|
)
|
|
4610
5120
|
);
|
|
4611
5121
|
var { themes: themes2 } = config_default;
|
|
4612
|
-
var Map_default =
|
|
5122
|
+
var Map_default = MapVisualization;
|
|
4613
5123
|
//# sourceMappingURL=Map.js.map
|