@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/Rectangle.js
CHANGED
|
@@ -476,7 +476,7 @@ var Cover = styled_components_default.div`
|
|
|
476
476
|
bottom: 0;
|
|
477
477
|
`;
|
|
478
478
|
var Blocker = styled_components_default.div.attrs({
|
|
479
|
-
"data-splunk-visualization-version": "28.
|
|
479
|
+
"data-splunk-visualization-version": "28.4.0 - 002bd482f"
|
|
480
480
|
})`
|
|
481
481
|
position: relative;
|
|
482
482
|
width: 100%;
|
|
@@ -575,7 +575,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
575
575
|
FixSizeItem,
|
|
576
576
|
{
|
|
577
577
|
"data-test": "fix-size-item",
|
|
578
|
-
"data-splunk-visualization-version": "28.
|
|
578
|
+
"data-splunk-visualization-version": "28.4.0 - 002bd482f",
|
|
579
579
|
width,
|
|
580
580
|
height,
|
|
581
581
|
backgroundColor
|
|
@@ -671,6 +671,7 @@ __reExport(numberUtils_exports, require("@splunk/visualizations-shared/numberUti
|
|
|
671
671
|
var numberUtils_default = "default" in defaultImport21 ? defaultImport21.default : defaultImport21;
|
|
672
672
|
|
|
673
673
|
// src/common/utils/dataUtils.ts
|
|
674
|
+
var getFieldName = (field) => typeof field === "string" ? field : field.name;
|
|
674
675
|
var largestTriangleThreeBuckets = (data, threshold, preferredDownsampleIndices) => {
|
|
675
676
|
const dataLength = data.length;
|
|
676
677
|
const downsampledIndices = [];
|
|
@@ -787,9 +788,9 @@ var tryToCoerceAllDisplayedFields = (ds, xField, yFields, fieldTypes, options) =
|
|
|
787
788
|
let xColumn = [];
|
|
788
789
|
const yColumns = [];
|
|
789
790
|
const canDownsample = !ds.data.fields.some((field, index) => {
|
|
790
|
-
var _a
|
|
791
|
-
const fieldName = (
|
|
792
|
-
const fieldType = (
|
|
791
|
+
var _a;
|
|
792
|
+
const fieldName = getFieldName(field);
|
|
793
|
+
const fieldType = (_a = fieldTypes[index]) != null ? _a : "unknown";
|
|
793
794
|
const column = ds.data.columns[index];
|
|
794
795
|
let hasDisplayedColumnThatCantBeDownsampled = false;
|
|
795
796
|
if (fieldName === xField) {
|
|
@@ -1142,6 +1143,16 @@ var triangleEventAnnotationRenderer = ({
|
|
|
1142
1143
|
eventColor: eventWithColor.color
|
|
1143
1144
|
});
|
|
1144
1145
|
};
|
|
1146
|
+
var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
|
|
1147
|
+
const rangeSelectEventHandler = eventHandlers.find(
|
|
1148
|
+
(eventHandler) => {
|
|
1149
|
+
var _a;
|
|
1150
|
+
return (_a = eventHandler.options.events) == null ? void 0 : _a.includes("range.select");
|
|
1151
|
+
}
|
|
1152
|
+
);
|
|
1153
|
+
const xAxisIsTime = xField === "_time";
|
|
1154
|
+
return !!rangeSelectEventHandler && xAxisIsTime;
|
|
1155
|
+
};
|
|
1145
1156
|
var canvasSupportedTimeSeriesCharts = ["splunk.line"];
|
|
1146
1157
|
var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
|
|
1147
1158
|
return canvasSupportedTimeSeriesCharts.indexOf(vizConfigKey) > -1;
|
|
@@ -1162,16 +1173,31 @@ var filterChartDataFromInternalFields = (chartData) => {
|
|
|
1162
1173
|
var convert2DArrayToNumbers = (arr) => {
|
|
1163
1174
|
return arr.map((subArray) => subArray.map((element) => parseFloat(element)));
|
|
1164
1175
|
};
|
|
1176
|
+
var parseAxisValue = (val) => {
|
|
1177
|
+
if (val === void 0 || val === null || val === "auto" || val === "") {
|
|
1178
|
+
return void 0;
|
|
1179
|
+
}
|
|
1180
|
+
const num = typeof val === "number" ? val : Number.parseFloat(val);
|
|
1181
|
+
return Number.isNaN(num) ? void 0 : num;
|
|
1182
|
+
};
|
|
1165
1183
|
var SideLegendWidth = 75;
|
|
1166
|
-
var
|
|
1184
|
+
var SeriesCompareLegendWidth = 200;
|
|
1167
1185
|
var getLegend = (props) => {
|
|
1168
1186
|
const legendPlacement = props == null ? void 0 : props.legendDisplay;
|
|
1187
|
+
const { isSeriesCompare } = props;
|
|
1188
|
+
const commonLegendProps = {
|
|
1189
|
+
center: true,
|
|
1190
|
+
fontSize: 12,
|
|
1191
|
+
largerTiles: true,
|
|
1192
|
+
hideSeriesValue: !isSeriesCompare
|
|
1193
|
+
// Show values if in seriesCompare mode
|
|
1194
|
+
};
|
|
1169
1195
|
switch (legendPlacement) {
|
|
1170
1196
|
case "off":
|
|
1171
1197
|
return false;
|
|
1172
1198
|
case "left":
|
|
1173
1199
|
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
|
|
1174
|
-
width: SideLegendWidth
|
|
1200
|
+
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
1175
1201
|
}, commonLegendProps));
|
|
1176
1202
|
case "bottom":
|
|
1177
1203
|
return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
|
|
@@ -1183,7 +1209,7 @@ var getLegend = (props) => {
|
|
|
1183
1209
|
}, commonLegendProps));
|
|
1184
1210
|
default:
|
|
1185
1211
|
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
|
|
1186
|
-
width: SideLegendWidth
|
|
1212
|
+
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
1187
1213
|
}, commonLegendProps));
|
|
1188
1214
|
}
|
|
1189
1215
|
};
|
|
@@ -1219,22 +1245,25 @@ var ellipsisAxisTitle = (axisTitle, containerSpacing, fontSize = 12) => {
|
|
|
1219
1245
|
const end = axisTitle.slice(-halfChars);
|
|
1220
1246
|
return `${start}...${end}`;
|
|
1221
1247
|
};
|
|
1222
|
-
var
|
|
1248
|
+
var getFieldName2 = (field) => {
|
|
1223
1249
|
const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
|
|
1224
1250
|
return fieldName;
|
|
1225
1251
|
};
|
|
1226
1252
|
var getFieldNames = (fields) => {
|
|
1227
|
-
return fields.map((field) =>
|
|
1253
|
+
return fields.map((field) => getFieldName2(field));
|
|
1228
1254
|
};
|
|
1229
|
-
var getXScaleConfig = (label, xAxisLabelVisibility) => {
|
|
1255
|
+
var getXScaleConfig = (label, xAxisLabelVisibility, xAxisLabelRotation) => {
|
|
1230
1256
|
const xConfig = { x: {} };
|
|
1231
1257
|
xConfig.x.label = label;
|
|
1232
1258
|
if (xAxisLabelVisibility === "hide") {
|
|
1233
1259
|
xConfig.x.hideLabels = true;
|
|
1234
1260
|
}
|
|
1261
|
+
if (xAxisLabelRotation !== void 0) {
|
|
1262
|
+
xConfig.x.labelRotation = xAxisLabelRotation;
|
|
1263
|
+
}
|
|
1235
1264
|
return xConfig;
|
|
1236
1265
|
};
|
|
1237
|
-
var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility) => {
|
|
1266
|
+
var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax) => {
|
|
1238
1267
|
const scaleType = yAxisScale != null ? yAxisScale : "linear";
|
|
1239
1268
|
const yConfig = { y: {} };
|
|
1240
1269
|
yConfig.y.label = label;
|
|
@@ -1250,14 +1279,20 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
|
|
|
1250
1279
|
if (yAxisLabelVisibility === "hide") {
|
|
1251
1280
|
yConfig.y.hideLabels = true;
|
|
1252
1281
|
}
|
|
1282
|
+
if (yAxisMin !== void 0 || yAxisMax !== void 0) {
|
|
1283
|
+
yConfig.y.range = (u, dataMin, dataMax) => {
|
|
1284
|
+
const min = yAxisMin != null ? yAxisMin : dataMin;
|
|
1285
|
+
const max = yAxisMax != null ? yAxisMax : dataMax;
|
|
1286
|
+
return [min, max];
|
|
1287
|
+
};
|
|
1288
|
+
}
|
|
1253
1289
|
return yConfig;
|
|
1254
1290
|
};
|
|
1255
|
-
var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility) => {
|
|
1291
|
+
var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility, y2AxisMin, y2AxisMax) => {
|
|
1256
1292
|
const y2Config = { y2: {} };
|
|
1257
1293
|
const scaleType = axisScale != null ? axisScale : "linear";
|
|
1258
1294
|
y2Config.y2.label = label;
|
|
1259
1295
|
y2Config.y2.side = "right";
|
|
1260
|
-
y2Config.y2.showGrid = false;
|
|
1261
1296
|
y2Config.y2.type = scaleType;
|
|
1262
1297
|
if (axisAbbreviation !== "none") {
|
|
1263
1298
|
y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
|
|
@@ -1267,9 +1302,16 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
1267
1302
|
if (y2AxisLabelVisibility === "hide") {
|
|
1268
1303
|
y2Config.y2.hideLabels = true;
|
|
1269
1304
|
}
|
|
1305
|
+
if (y2AxisMin !== void 0 || y2AxisMax !== void 0) {
|
|
1306
|
+
y2Config.y2.range = (u, dataMin, dataMax) => {
|
|
1307
|
+
const min = y2AxisMin != null ? y2AxisMin : dataMin;
|
|
1308
|
+
const max = y2AxisMax != null ? y2AxisMax : dataMax;
|
|
1309
|
+
return [min, max];
|
|
1310
|
+
};
|
|
1311
|
+
}
|
|
1270
1312
|
return y2Config;
|
|
1271
1313
|
};
|
|
1272
|
-
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay) => {
|
|
1314
|
+
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField) => {
|
|
1273
1315
|
const seriesConfig = {};
|
|
1274
1316
|
let spanGaps;
|
|
1275
1317
|
let replaceNullsWithZero;
|
|
@@ -1304,12 +1346,96 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
1304
1346
|
if (markerDisplay !== void 0) {
|
|
1305
1347
|
seriesConfig[field].markerDisplay = markerDisplay;
|
|
1306
1348
|
}
|
|
1349
|
+
const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
|
|
1350
|
+
if (fieldDashStyle) {
|
|
1351
|
+
seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
1352
|
+
}
|
|
1307
1353
|
if (replaceNullsWithZero !== void 0) {
|
|
1308
1354
|
seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
|
|
1309
1355
|
}
|
|
1310
1356
|
});
|
|
1311
1357
|
return seriesConfig;
|
|
1312
1358
|
};
|
|
1359
|
+
var findRangeIndices = (xData, startValue, endValue) => {
|
|
1360
|
+
let startXIndex = -1;
|
|
1361
|
+
let endXIndex = -1;
|
|
1362
|
+
const xDataEpoch = xData.map((val) => {
|
|
1363
|
+
if (typeof val === "string") {
|
|
1364
|
+
return new Date(val).getTime() / 1e3;
|
|
1365
|
+
}
|
|
1366
|
+
return val;
|
|
1367
|
+
});
|
|
1368
|
+
for (let i = 0; i < xDataEpoch.length; i += 1) {
|
|
1369
|
+
if (xDataEpoch[i] >= startValue) {
|
|
1370
|
+
startXIndex = i;
|
|
1371
|
+
break;
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
if (startXIndex === -1 && xDataEpoch.length > 0) {
|
|
1375
|
+
startXIndex = xDataEpoch.length - 1;
|
|
1376
|
+
}
|
|
1377
|
+
for (let i = xDataEpoch.length - 1; i >= 0; i -= 1) {
|
|
1378
|
+
if (xDataEpoch[i] <= endValue) {
|
|
1379
|
+
endXIndex = i;
|
|
1380
|
+
break;
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
if (endXIndex === -1 && xDataEpoch.length > 0) {
|
|
1384
|
+
endXIndex = 0;
|
|
1385
|
+
}
|
|
1386
|
+
return { startXIndex, endXIndex };
|
|
1387
|
+
};
|
|
1388
|
+
|
|
1389
|
+
// esm-externals:@splunk/visualization-schemas
|
|
1390
|
+
var visualization_schemas_exports = {};
|
|
1391
|
+
__export(visualization_schemas_exports, {
|
|
1392
|
+
default: () => visualization_schemas_default
|
|
1393
|
+
});
|
|
1394
|
+
var defaultImport26 = __toESM(require("@splunk/visualization-schemas"));
|
|
1395
|
+
__reExport(visualization_schemas_exports, require("@splunk/visualization-schemas"));
|
|
1396
|
+
var visualization_schemas_default = "default" in defaultImport26 ? defaultImport26.default : defaultImport26;
|
|
1397
|
+
|
|
1398
|
+
// src/common/hooks/useTrellisEnabled.ts
|
|
1399
|
+
var useTrellisFeatureFlagOn = () => {
|
|
1400
|
+
const context = (0, react_exports.useContext)(FeatureFlagContext_default);
|
|
1401
|
+
return Boolean(context == null ? void 0 : context.visualizations_enableTrellis);
|
|
1402
|
+
};
|
|
1403
|
+
var useTrellisEnabled = (layoutType = visualization_schemas_exports.LAYOUT_TYPE.Off) => {
|
|
1404
|
+
const trellisFeatureEnabled = useTrellisFeatureFlagOn();
|
|
1405
|
+
return trellisFeatureEnabled && layoutType === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
// src/common/components/TrellisTitle.tsx
|
|
1409
|
+
var TRELLIS_TITLE_HEIGHT = 28;
|
|
1410
|
+
var TrellisTitleText = styled_components_default.div`
|
|
1411
|
+
margin-left: 10px;
|
|
1412
|
+
margin-right: 10px;
|
|
1413
|
+
padding-top: 8px;
|
|
1414
|
+
text-overflow: ellipsis;
|
|
1415
|
+
white-space: nowrap;
|
|
1416
|
+
overflow: hidden;
|
|
1417
|
+
`;
|
|
1418
|
+
var TrellisTitleDiv = styled_components_default.div`
|
|
1419
|
+
height: ${TRELLIS_TITLE_HEIGHT}px;
|
|
1420
|
+
font-size: 14px;
|
|
1421
|
+
font-weight: 700;
|
|
1422
|
+
color: ${(props) => props.fontColor};
|
|
1423
|
+
background-color: ${(props) => props.backgroundColor};
|
|
1424
|
+
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.
|
|
1425
|
+
`;
|
|
1426
|
+
var TrellisTitle = (props) => {
|
|
1427
|
+
const titleText = String(props.trellisKey).toString();
|
|
1428
|
+
return /* @__PURE__ */ react_exports.createElement(
|
|
1429
|
+
TrellisTitleDiv,
|
|
1430
|
+
{
|
|
1431
|
+
fontColor: props.fontColor,
|
|
1432
|
+
backgroundColor: props.backgroundColor,
|
|
1433
|
+
"data-test": "trellis-title",
|
|
1434
|
+
title: titleText
|
|
1435
|
+
},
|
|
1436
|
+
/* @__PURE__ */ react_exports.createElement(TrellisTitleText, null, titleText)
|
|
1437
|
+
);
|
|
1438
|
+
};
|
|
1313
1439
|
|
|
1314
1440
|
// src/common/TimeSeriesChartWrapper.tsx
|
|
1315
1441
|
var TimeSeriesChartContainer = styled_components_default.div`
|
|
@@ -1320,38 +1446,123 @@ var TimeSeriesChartContainer = styled_components_default.div`
|
|
|
1320
1446
|
position: absolute !important; // This is needed for canvas element export pdf/png to work correctly
|
|
1321
1447
|
}
|
|
1322
1448
|
`;
|
|
1323
|
-
var
|
|
1449
|
+
var appendTrellisToPayload = (payload, trellisKey, trellisSplitBy) => {
|
|
1450
|
+
const result = __spreadValues({}, payload);
|
|
1451
|
+
if (trellisSplitBy) {
|
|
1452
|
+
result["trellis.name"] = trellisSplitBy;
|
|
1453
|
+
}
|
|
1454
|
+
if (trellisKey) {
|
|
1455
|
+
result["trellis.value"] = trellisKey;
|
|
1456
|
+
}
|
|
1457
|
+
return result;
|
|
1458
|
+
};
|
|
1459
|
+
var hasMouseoverPayloadChanged = (currentPayload, previousPayload) => {
|
|
1460
|
+
if (!previousPayload) {
|
|
1461
|
+
return true;
|
|
1462
|
+
}
|
|
1463
|
+
if (currentPayload.index !== previousPayload.index) {
|
|
1464
|
+
return true;
|
|
1465
|
+
}
|
|
1466
|
+
if (currentPayload.seriesIndex !== previousPayload.seriesIndex) {
|
|
1467
|
+
return true;
|
|
1468
|
+
}
|
|
1469
|
+
if (currentPayload["trellis.name"] !== previousPayload["trellis.name"]) {
|
|
1470
|
+
return true;
|
|
1471
|
+
}
|
|
1472
|
+
if (currentPayload["trellis.value"] !== previousPayload["trellis.value"]) {
|
|
1473
|
+
return true;
|
|
1474
|
+
}
|
|
1475
|
+
return false;
|
|
1476
|
+
};
|
|
1477
|
+
var handleClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
|
|
1324
1478
|
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(chartEvent, "value", "seriesKey")), {
|
|
1325
1479
|
name: chartEvent.seriesKey
|
|
1326
1480
|
});
|
|
1327
1481
|
delete payload.seriesKey;
|
|
1328
1482
|
if (chartEvent.rowContext) {
|
|
1329
|
-
Object.
|
|
1330
|
-
payload
|
|
1331
|
-
|
|
1483
|
+
Object.assign(
|
|
1484
|
+
payload,
|
|
1485
|
+
Object.keys(chartEvent.rowContext).reduce((acc, fieldName) => {
|
|
1486
|
+
acc[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
|
|
1487
|
+
return acc;
|
|
1488
|
+
}, {})
|
|
1489
|
+
);
|
|
1332
1490
|
}
|
|
1491
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1333
1492
|
if (onClick) {
|
|
1334
1493
|
onClick({
|
|
1335
1494
|
type: "point.click",
|
|
1336
1495
|
originalEvent: chartEvent,
|
|
1337
|
-
payload
|
|
1496
|
+
payload: updatedPayload
|
|
1338
1497
|
});
|
|
1339
1498
|
}
|
|
1340
1499
|
};
|
|
1341
|
-
var handleLegendClick = (chartEvent, onClick) => {
|
|
1500
|
+
var handleLegendClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
|
|
1342
1501
|
const payload = {
|
|
1343
1502
|
name: chartEvent
|
|
1344
1503
|
};
|
|
1504
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1345
1505
|
if (onClick) {
|
|
1346
1506
|
onClick({
|
|
1347
1507
|
type: "legend.click",
|
|
1348
1508
|
originalEvent: chartEvent,
|
|
1349
|
-
payload
|
|
1509
|
+
payload: updatedPayload
|
|
1350
1510
|
});
|
|
1351
1511
|
}
|
|
1352
1512
|
};
|
|
1513
|
+
var handleRangeSelection = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
|
|
1514
|
+
var _a;
|
|
1515
|
+
if (!rangeEvent) {
|
|
1516
|
+
return;
|
|
1517
|
+
}
|
|
1518
|
+
const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
|
|
1519
|
+
const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
|
|
1520
|
+
const payload = {
|
|
1521
|
+
startXIndex,
|
|
1522
|
+
startXValue: rangeEvent.start,
|
|
1523
|
+
endXIndex,
|
|
1524
|
+
endXValue: rangeEvent.end
|
|
1525
|
+
};
|
|
1526
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1527
|
+
if (onSelect) {
|
|
1528
|
+
onSelect({
|
|
1529
|
+
type: "range.selectBeforeZoom",
|
|
1530
|
+
originalEvent: rangeEvent,
|
|
1531
|
+
payload: updatedPayload
|
|
1532
|
+
});
|
|
1533
|
+
}
|
|
1534
|
+
};
|
|
1535
|
+
var handleRangeZoom = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
|
|
1536
|
+
var _a;
|
|
1537
|
+
const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
|
|
1538
|
+
const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
|
|
1539
|
+
const payload = {
|
|
1540
|
+
startXIndex,
|
|
1541
|
+
startXValue: rangeEvent.start,
|
|
1542
|
+
endXIndex,
|
|
1543
|
+
endXValue: rangeEvent.end
|
|
1544
|
+
};
|
|
1545
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1546
|
+
if (onSelect) {
|
|
1547
|
+
onSelect({
|
|
1548
|
+
type: "range.select",
|
|
1549
|
+
originalEvent: rangeEvent,
|
|
1550
|
+
payload: updatedPayload
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1553
|
+
};
|
|
1554
|
+
var parseArrayOption = (value) => {
|
|
1555
|
+
if (Array.isArray(value)) {
|
|
1556
|
+
return value;
|
|
1557
|
+
}
|
|
1558
|
+
if (value) {
|
|
1559
|
+
return JSON.parse(value);
|
|
1560
|
+
}
|
|
1561
|
+
return void 0;
|
|
1562
|
+
};
|
|
1353
1563
|
var TimeSeriesChartWrapper = (props) => {
|
|
1354
|
-
|
|
1564
|
+
var _b, _c, _d;
|
|
1565
|
+
const _a = props, {
|
|
1355
1566
|
width,
|
|
1356
1567
|
height,
|
|
1357
1568
|
chartData,
|
|
@@ -1364,12 +1575,49 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1364
1575
|
markerDisplay,
|
|
1365
1576
|
onClick,
|
|
1366
1577
|
onPointMouseOver,
|
|
1367
|
-
onPointMouseOut
|
|
1368
|
-
|
|
1369
|
-
|
|
1578
|
+
onPointMouseOut,
|
|
1579
|
+
onSelect,
|
|
1580
|
+
splitByLayout,
|
|
1581
|
+
trellisKey,
|
|
1582
|
+
trellisSplitBy,
|
|
1370
1583
|
backgroundColor,
|
|
1584
|
+
defaultFontColor,
|
|
1585
|
+
additionalTooltipValues,
|
|
1586
|
+
showYAxisWithZero: showYAxisWithZeroFromProps,
|
|
1587
|
+
showY2AxisWithZero: showY2AxisWithZeroFromProps
|
|
1588
|
+
} = _a, otherOptions = __objRest(_a, [
|
|
1589
|
+
"width",
|
|
1590
|
+
"height",
|
|
1591
|
+
"chartData",
|
|
1592
|
+
"options",
|
|
1593
|
+
"userLocale",
|
|
1594
|
+
"annotationX",
|
|
1595
|
+
"annotationLabel",
|
|
1596
|
+
"annotationColor",
|
|
1597
|
+
"legendDisplay",
|
|
1598
|
+
"markerDisplay",
|
|
1599
|
+
"onClick",
|
|
1600
|
+
"onPointMouseOver",
|
|
1601
|
+
"onPointMouseOut",
|
|
1602
|
+
"onSelect",
|
|
1603
|
+
"splitByLayout",
|
|
1604
|
+
"trellisKey",
|
|
1605
|
+
"trellisSplitBy",
|
|
1606
|
+
"backgroundColor",
|
|
1607
|
+
"defaultFontColor",
|
|
1608
|
+
"additionalTooltipValues",
|
|
1609
|
+
// Extract showYAxisWithZero directly from props for accelerated render mode
|
|
1610
|
+
"showYAxisWithZero",
|
|
1611
|
+
"showY2AxisWithZero"
|
|
1612
|
+
]);
|
|
1613
|
+
const { eventHandlers, xField: xFieldFromProps } = otherOptions;
|
|
1614
|
+
const trellisEnabled = useTrellisEnabled(splitByLayout);
|
|
1615
|
+
const {
|
|
1616
|
+
backgroundColor: bgColorFromOptions,
|
|
1371
1617
|
seriesColors: seriesColorsStr,
|
|
1372
1618
|
fieldColors,
|
|
1619
|
+
legendLabels: legendLabelsStr,
|
|
1620
|
+
legendMode,
|
|
1373
1621
|
"axisTitleX.text": xAxisTitleText,
|
|
1374
1622
|
"axisTitleY.text": yAxisTitleText,
|
|
1375
1623
|
"axisTitleY2.text": y2AxisTitleText,
|
|
@@ -1377,8 +1625,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1377
1625
|
"axisTitleY.visibility": yAxisTitleVisibility,
|
|
1378
1626
|
"axisTitleY2.visibility": y2AxisTitleVisibility,
|
|
1379
1627
|
"axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
|
|
1628
|
+
"axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
|
|
1380
1629
|
"axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
|
|
1630
|
+
"axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
|
|
1381
1631
|
"axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
|
|
1632
|
+
"axisLabelsY2.majorUnit": y2AxisMajorUnitFromSimpleXML,
|
|
1382
1633
|
"axisY.abbreviation": yAxisAbbreviation,
|
|
1383
1634
|
"axisY.scale": yAxisScale,
|
|
1384
1635
|
"axisY2.abbreviation": y2AxisAbbreviation,
|
|
@@ -1388,10 +1639,63 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1388
1639
|
"axisLabelsY2.integerUnits": y2IntegerUnits,
|
|
1389
1640
|
"chart.overlayFields": overlayFieldsStr,
|
|
1390
1641
|
"chart.nullValueMode": nullValueMode,
|
|
1391
|
-
|
|
1642
|
+
"chart.showDataLabels": showDataLabels,
|
|
1643
|
+
lineWidth,
|
|
1644
|
+
lineDashStyle,
|
|
1645
|
+
fieldDashStyles: lineDashStylesByFieldStr,
|
|
1646
|
+
yAxisMin: yAxisMinRaw,
|
|
1647
|
+
yAxisMax: yAxisMaxRaw,
|
|
1648
|
+
y2AxisMin: y2AxisMinRaw,
|
|
1649
|
+
y2AxisMax: y2AxisMaxRaw,
|
|
1650
|
+
showXMajorGridLines,
|
|
1651
|
+
showYMajorGridLines,
|
|
1652
|
+
showY2MajorGridLines,
|
|
1653
|
+
showYMinorGridLines,
|
|
1654
|
+
showY2MinorGridLines,
|
|
1655
|
+
showLineSmoothing,
|
|
1656
|
+
yAxisMajorTickVisibility,
|
|
1657
|
+
y2AxisMajorTickVisibility,
|
|
1658
|
+
yAxisMajorTickSize,
|
|
1659
|
+
y2AxisMajorTickSize,
|
|
1660
|
+
yAxisMajorTickInterval,
|
|
1661
|
+
y2AxisMajorTickInterval,
|
|
1662
|
+
yAxisMinorTickVisibility,
|
|
1663
|
+
y2AxisMinorTickVisibility,
|
|
1664
|
+
yAxisMinorTickSize,
|
|
1665
|
+
y2AxisMinorTickSize,
|
|
1666
|
+
showYAxisWithZero: showYAxisWithZeroFromOptions,
|
|
1667
|
+
showY2AxisWithZero: showY2AxisWithZeroFromOptions
|
|
1392
1668
|
} = options;
|
|
1669
|
+
const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
|
|
1670
|
+
const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
|
|
1671
|
+
const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
|
|
1672
|
+
const showYMajorTicks = yAxisMajorTickVisibility === "show";
|
|
1673
|
+
const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
|
|
1674
|
+
const showYMinorTicks = yAxisMinorTickVisibility === "show";
|
|
1675
|
+
const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
|
|
1676
|
+
const yAxisMin = parseAxisValue(yAxisMinRaw);
|
|
1677
|
+
const yAxisMax = parseAxisValue(yAxisMaxRaw);
|
|
1678
|
+
const y2AxisMin = parseAxisValue(y2AxisMinRaw);
|
|
1679
|
+
const y2AxisMax = parseAxisValue(y2AxisMaxRaw);
|
|
1680
|
+
const parseTickInterval = (simpleXMLValue, canvasValue) => {
|
|
1681
|
+
if (simpleXMLValue) return Number(simpleXMLValue);
|
|
1682
|
+
if (canvasValue) return Number(canvasValue);
|
|
1683
|
+
return void 0;
|
|
1684
|
+
};
|
|
1685
|
+
const yAxisMajorTickIntervalNum = parseTickInterval(yAxisMajorUnitFromSimpleXML, yAxisMajorTickInterval);
|
|
1686
|
+
const y2AxisMajorTickIntervalNum = parseTickInterval(
|
|
1687
|
+
y2AxisMajorUnitFromSimpleXML,
|
|
1688
|
+
y2AxisMajorTickInterval
|
|
1689
|
+
);
|
|
1690
|
+
const yAxisMajorTickSizeNum = yAxisMajorTickSize ? Number(yAxisMajorTickSize) : void 0;
|
|
1691
|
+
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize ? Number(y2AxisMajorTickSize) : void 0;
|
|
1692
|
+
const yAxisMinorTickSizeNum = yAxisMinorTickSize ? Number(yAxisMinorTickSize) : void 0;
|
|
1693
|
+
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize ? Number(y2AxisMinorTickSize) : void 0;
|
|
1393
1694
|
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
1394
1695
|
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
1696
|
+
const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
|
|
1697
|
+
const legendLabels = parseArrayOption(legendLabelsStr);
|
|
1698
|
+
const bgColor = backgroundColor || bgColorFromOptions;
|
|
1395
1699
|
const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
|
|
1396
1700
|
const [containerHeight, setContainerHeight] = react_exports.useState(Number(props.height));
|
|
1397
1701
|
const cachedHandleResize = react_exports.useCallback((w, h) => {
|
|
@@ -1402,31 +1706,64 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1402
1706
|
fields: chartData.fields,
|
|
1403
1707
|
columns: chartData.seriesList
|
|
1404
1708
|
});
|
|
1405
|
-
const xField =
|
|
1709
|
+
const xField = getFieldName2(filteredChartData.fields[0]);
|
|
1406
1710
|
const yFields = getFieldNames(
|
|
1407
1711
|
filteredChartData.fields.length > 1 ? filteredChartData.fields.slice(1) : []
|
|
1408
1712
|
);
|
|
1409
|
-
const y2Fields =
|
|
1410
|
-
|
|
1713
|
+
const y2Fields = (0, react_exports.useMemo)(
|
|
1714
|
+
() => y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [],
|
|
1715
|
+
[y2FieldsStr]
|
|
1716
|
+
);
|
|
1717
|
+
const overlayFields = (0, react_exports.useMemo)(
|
|
1718
|
+
() => overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [],
|
|
1719
|
+
[overlayFieldsStr]
|
|
1720
|
+
);
|
|
1411
1721
|
let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
|
|
1412
1722
|
xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
|
|
1413
|
-
|
|
1723
|
+
const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
|
|
1724
|
+
let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility);
|
|
1414
1725
|
yAxisTitle = ellipsisAxisTitle(yAxisTitle, containerHeight);
|
|
1415
1726
|
const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
|
|
1416
1727
|
let y2AxisTitle = getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility);
|
|
1417
1728
|
y2AxisTitle = ellipsisAxisTitle(y2AxisTitle, containerHeight);
|
|
1418
|
-
const xScaleConfig =
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1729
|
+
const xScaleConfig = (0, react_exports.useMemo)(
|
|
1730
|
+
() => getXScaleConfig(xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation),
|
|
1731
|
+
[xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation]
|
|
1732
|
+
);
|
|
1733
|
+
const yScaleConfig = (0, react_exports.useMemo)(
|
|
1734
|
+
() => getYScaleConfig(
|
|
1735
|
+
yAxisTitle,
|
|
1736
|
+
yAxisAbbreviation,
|
|
1737
|
+
yAxisScale,
|
|
1738
|
+
yAxisLabelVisibility,
|
|
1739
|
+
yAxisMin,
|
|
1740
|
+
yAxisMax
|
|
1741
|
+
),
|
|
1742
|
+
[yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax]
|
|
1743
|
+
);
|
|
1744
|
+
const y2ScaleConfig = (0, react_exports.useMemo)(() => {
|
|
1745
|
+
if (y2Enabled) {
|
|
1746
|
+
return getY2ScaleConfig(
|
|
1747
|
+
y2AxisTitle,
|
|
1748
|
+
y2AxisAbbreviation,
|
|
1749
|
+
y2AxisScale,
|
|
1750
|
+
y2IntegerUnits,
|
|
1751
|
+
y2AxisLabelVisibility,
|
|
1752
|
+
y2AxisMin,
|
|
1753
|
+
y2AxisMax
|
|
1754
|
+
);
|
|
1755
|
+
}
|
|
1756
|
+
return {};
|
|
1757
|
+
}, [
|
|
1758
|
+
y2Enabled,
|
|
1759
|
+
y2AxisTitle,
|
|
1760
|
+
y2AxisAbbreviation,
|
|
1761
|
+
y2AxisScale,
|
|
1762
|
+
y2IntegerUnits,
|
|
1763
|
+
y2AxisLabelVisibility,
|
|
1764
|
+
y2AxisMin,
|
|
1765
|
+
y2AxisMax
|
|
1766
|
+
]);
|
|
1430
1767
|
const uplotContainerElement = (0, react_exports.useRef)(null);
|
|
1431
1768
|
const seriesDataFormatted = [
|
|
1432
1769
|
filteredChartData.columns[0],
|
|
@@ -1442,9 +1779,21 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1442
1779
|
overlayFields,
|
|
1443
1780
|
y2Enabled,
|
|
1444
1781
|
nullValueMode,
|
|
1445
|
-
markerDisplay
|
|
1782
|
+
markerDisplay,
|
|
1783
|
+
lineDashStyle,
|
|
1784
|
+
lineDashStylesByField
|
|
1446
1785
|
),
|
|
1447
|
-
[
|
|
1786
|
+
[
|
|
1787
|
+
yFields,
|
|
1788
|
+
y2Fields,
|
|
1789
|
+
lineWidth,
|
|
1790
|
+
overlayFields,
|
|
1791
|
+
y2Enabled,
|
|
1792
|
+
nullValueMode,
|
|
1793
|
+
markerDisplay,
|
|
1794
|
+
lineDashStyle,
|
|
1795
|
+
lineDashStylesByField
|
|
1796
|
+
]
|
|
1448
1797
|
);
|
|
1449
1798
|
const chartingEventAnnotations = (0, react_exports.useMemo)(
|
|
1450
1799
|
() => getAnnotationsForCanvas({
|
|
@@ -1458,25 +1807,54 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1458
1807
|
() => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
|
|
1459
1808
|
[xScaleConfig, yScaleConfig, y2ScaleConfig]
|
|
1460
1809
|
);
|
|
1461
|
-
const legend = (0, react_exports.useMemo)(
|
|
1810
|
+
const legend = (0, react_exports.useMemo)(
|
|
1811
|
+
() => getLegend({ legendDisplay, isSeriesCompare: legendMode === "seriesCompare" }),
|
|
1812
|
+
[legendDisplay, legendMode]
|
|
1813
|
+
);
|
|
1462
1814
|
const handleChartClick = react_exports.useCallback(
|
|
1463
1815
|
(event) => {
|
|
1464
1816
|
if (onClick) {
|
|
1465
|
-
handleClick(event, onClick);
|
|
1817
|
+
handleClick(event, onClick, trellisKey, trellisSplitBy);
|
|
1466
1818
|
}
|
|
1467
1819
|
},
|
|
1468
|
-
[onClick]
|
|
1820
|
+
[onClick, trellisKey, trellisSplitBy]
|
|
1469
1821
|
);
|
|
1470
1822
|
const handleChartLegendClick = react_exports.useCallback(
|
|
1471
1823
|
(event) => {
|
|
1472
1824
|
if (onClick) {
|
|
1473
|
-
handleLegendClick(event, onClick);
|
|
1825
|
+
handleLegendClick(event, onClick, trellisKey, trellisSplitBy);
|
|
1826
|
+
}
|
|
1827
|
+
},
|
|
1828
|
+
[onClick, trellisKey, trellisSplitBy]
|
|
1829
|
+
);
|
|
1830
|
+
const handleChartRangeSelection = react_exports.useCallback(
|
|
1831
|
+
(range2) => {
|
|
1832
|
+
if (onSelect) {
|
|
1833
|
+
handleRangeSelection(range2, onSelect, chartData, trellisKey, trellisSplitBy);
|
|
1834
|
+
}
|
|
1835
|
+
},
|
|
1836
|
+
[onSelect, chartData, trellisKey, trellisSplitBy]
|
|
1837
|
+
);
|
|
1838
|
+
const handleChartRangeZoom = react_exports.useCallback(
|
|
1839
|
+
(range2) => {
|
|
1840
|
+
if (onSelect) {
|
|
1841
|
+
handleRangeZoom(range2, onSelect, chartData, trellisKey, trellisSplitBy);
|
|
1474
1842
|
}
|
|
1475
1843
|
},
|
|
1476
|
-
[
|
|
1844
|
+
[onSelect, chartData, trellisKey, trellisSplitBy]
|
|
1845
|
+
);
|
|
1846
|
+
const xFieldToUse = xFieldFromProps || xField;
|
|
1847
|
+
const enableSearchZoom = react_exports.useMemo(
|
|
1848
|
+
() => shouldEnableSearchZoom(eventHandlers, xFieldToUse),
|
|
1849
|
+
[eventHandlers, xFieldToUse]
|
|
1477
1850
|
);
|
|
1478
1851
|
const lastPayloadRef = react_exports.useRef(null);
|
|
1479
1852
|
const lastOriginalEventRef = react_exports.useRef(null);
|
|
1853
|
+
const previousMouseoverPayloadRef = react_exports.useRef(null);
|
|
1854
|
+
const additionalTooltipValuesRef = react_exports.useRef(additionalTooltipValues);
|
|
1855
|
+
react_exports.useEffect(() => {
|
|
1856
|
+
additionalTooltipValuesRef.current = additionalTooltipValues;
|
|
1857
|
+
}, [additionalTooltipValues]);
|
|
1480
1858
|
const handleChartCrosshairChange = react_exports.useCallback(
|
|
1481
1859
|
(event) => {
|
|
1482
1860
|
if (onPointMouseOver || onPointMouseOut) {
|
|
@@ -1488,6 +1866,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1488
1866
|
payload: lastPayloadRef.current
|
|
1489
1867
|
});
|
|
1490
1868
|
}
|
|
1869
|
+
previousMouseoverPayloadRef.current = null;
|
|
1491
1870
|
return;
|
|
1492
1871
|
}
|
|
1493
1872
|
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
|
|
@@ -1495,25 +1874,36 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1495
1874
|
});
|
|
1496
1875
|
delete payload.seriesKey;
|
|
1497
1876
|
if (event.rowContext) {
|
|
1498
|
-
Object.
|
|
1499
|
-
payload
|
|
1500
|
-
|
|
1877
|
+
Object.assign(
|
|
1878
|
+
payload,
|
|
1879
|
+
Object.keys(event.rowContext).reduce((acc, fieldName) => {
|
|
1880
|
+
acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
|
|
1881
|
+
return acc;
|
|
1882
|
+
}, {})
|
|
1883
|
+
);
|
|
1501
1884
|
}
|
|
1502
|
-
|
|
1885
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1886
|
+
if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
|
|
1887
|
+
return;
|
|
1888
|
+
}
|
|
1889
|
+
lastPayloadRef.current = updatedPayload;
|
|
1503
1890
|
lastOriginalEventRef.current = event;
|
|
1891
|
+
previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
|
|
1504
1892
|
if (onPointMouseOver) {
|
|
1505
1893
|
onPointMouseOver({
|
|
1506
1894
|
type: "point.mouseover",
|
|
1507
1895
|
originalEvent: event,
|
|
1508
|
-
payload
|
|
1896
|
+
payload: updatedPayload
|
|
1509
1897
|
});
|
|
1510
1898
|
}
|
|
1511
1899
|
}
|
|
1512
1900
|
},
|
|
1513
|
-
[onPointMouseOver, onPointMouseOut]
|
|
1901
|
+
[onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy]
|
|
1514
1902
|
);
|
|
1515
|
-
const
|
|
1516
|
-
|
|
1903
|
+
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}`;
|
|
1904
|
+
const memoizedChart = (0, react_exports.useMemo)(() => {
|
|
1905
|
+
const computedOnRangeZoom = onSelect ? handleChartRangeZoom : void 0;
|
|
1906
|
+
return /* @__PURE__ */ react_exports.createElement(visualization_canvas_exports.RangeSelectionProvider, { key: dataKey }, /* @__PURE__ */ react_exports.createElement(
|
|
1517
1907
|
visualization_canvas_exports.TimeSeriesChart,
|
|
1518
1908
|
{
|
|
1519
1909
|
data: chartData,
|
|
@@ -1523,49 +1913,107 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1523
1913
|
seriesColorsByField,
|
|
1524
1914
|
seriesConfig: seriesOverrides,
|
|
1525
1915
|
legend,
|
|
1916
|
+
legendLabels,
|
|
1917
|
+
isSeriesCompare: legendMode === "seriesCompare",
|
|
1918
|
+
maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
|
|
1526
1919
|
scaleConfig,
|
|
1527
1920
|
timestampFormat: "expanded",
|
|
1528
1921
|
onCrosshairClick: onClick ? handleChartClick : void 0,
|
|
1529
1922
|
onCrosshairChange: onPointMouseOver || onPointMouseOut ? handleChartCrosshairChange : void 0,
|
|
1530
1923
|
onSeriesClick: onClick ? handleChartLegendClick : void 0,
|
|
1924
|
+
onRangeSelection: handleChartRangeSelection,
|
|
1925
|
+
onRangeZoom: computedOnRangeZoom,
|
|
1926
|
+
serverSideZoom: enableSearchZoom,
|
|
1531
1927
|
userLocale,
|
|
1532
1928
|
events: chartingEventAnnotations,
|
|
1533
|
-
eventsConfig: { renderer: triangleEventAnnotationRenderer }
|
|
1929
|
+
eventsConfig: { renderer: triangleEventAnnotationRenderer },
|
|
1930
|
+
additionalTooltipValuesRef,
|
|
1931
|
+
showXMajorGridLines,
|
|
1932
|
+
showYMajorGridLines,
|
|
1933
|
+
showY2MajorGridLines,
|
|
1934
|
+
showYMinorGridLines,
|
|
1935
|
+
showY2MinorGridLines,
|
|
1936
|
+
showLineSmoothing,
|
|
1937
|
+
dataValuesDisplay,
|
|
1938
|
+
showYMajorTicks,
|
|
1939
|
+
showY2MajorTicks,
|
|
1940
|
+
yAxisMajorTickSize: yAxisMajorTickSizeNum,
|
|
1941
|
+
y2AxisMajorTickSize: y2AxisMajorTickSizeNum,
|
|
1942
|
+
yAxisMajorTickInterval: yAxisMajorTickIntervalNum,
|
|
1943
|
+
y2AxisMajorTickInterval: y2AxisMajorTickIntervalNum,
|
|
1944
|
+
showYMinorTicks,
|
|
1945
|
+
showY2MinorTicks,
|
|
1946
|
+
yAxisMinorTickSize: yAxisMinorTickSizeNum,
|
|
1947
|
+
y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
|
|
1948
|
+
showYAxisWithZero,
|
|
1949
|
+
showY2AxisWithZero
|
|
1534
1950
|
}
|
|
1535
|
-
)
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1951
|
+
));
|
|
1952
|
+
}, [
|
|
1953
|
+
onSelect,
|
|
1954
|
+
handleChartRangeZoom,
|
|
1955
|
+
dataKey,
|
|
1956
|
+
chartData,
|
|
1957
|
+
containerWidth,
|
|
1958
|
+
containerHeight,
|
|
1959
|
+
seriesColors,
|
|
1960
|
+
seriesColorsByField,
|
|
1961
|
+
seriesOverrides,
|
|
1962
|
+
legend,
|
|
1963
|
+
legendLabels,
|
|
1964
|
+
scaleConfig,
|
|
1965
|
+
onClick,
|
|
1966
|
+
handleChartClick,
|
|
1967
|
+
onPointMouseOver,
|
|
1968
|
+
onPointMouseOut,
|
|
1969
|
+
handleChartCrosshairChange,
|
|
1970
|
+
handleChartLegendClick,
|
|
1971
|
+
handleChartRangeSelection,
|
|
1972
|
+
enableSearchZoom,
|
|
1973
|
+
userLocale,
|
|
1974
|
+
chartingEventAnnotations,
|
|
1975
|
+
showXMajorGridLines,
|
|
1976
|
+
showYMajorGridLines,
|
|
1977
|
+
showY2MajorGridLines,
|
|
1978
|
+
showYMinorGridLines,
|
|
1979
|
+
showY2MinorGridLines,
|
|
1980
|
+
showLineSmoothing,
|
|
1981
|
+
dataValuesDisplay,
|
|
1982
|
+
showYMajorTicks,
|
|
1983
|
+
showY2MajorTicks,
|
|
1984
|
+
yAxisMajorTickSizeNum,
|
|
1985
|
+
y2AxisMajorTickSizeNum,
|
|
1986
|
+
yAxisMajorTickIntervalNum,
|
|
1987
|
+
y2AxisMajorTickIntervalNum,
|
|
1988
|
+
showYMinorTicks,
|
|
1989
|
+
showY2MinorTicks,
|
|
1990
|
+
yAxisMinorTickSizeNum,
|
|
1991
|
+
y2AxisMinorTickSizeNum,
|
|
1992
|
+
showYAxisWithZero,
|
|
1993
|
+
showY2AxisWithZero,
|
|
1994
|
+
legendMode
|
|
1995
|
+
]);
|
|
1555
1996
|
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
1556
|
-
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor }, memoizedChart);
|
|
1557
|
-
}, [
|
|
1558
|
-
return /* @__PURE__ */ react_exports.createElement(
|
|
1997
|
+
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
|
|
1998
|
+
}, [bgColor, memoizedChart]);
|
|
1999
|
+
return /* @__PURE__ */ react_exports.createElement(react_exports.Fragment, null, trellisEnabled && /* @__PURE__ */ react_exports.createElement(
|
|
2000
|
+
TrellisTitle,
|
|
2001
|
+
{
|
|
2002
|
+
trellisKey,
|
|
2003
|
+
backgroundColor: bgColor,
|
|
2004
|
+
fontColor: defaultFontColor
|
|
2005
|
+
}
|
|
2006
|
+
), /* @__PURE__ */ react_exports.createElement(
|
|
1559
2007
|
TimeSeriesChartContainer,
|
|
1560
2008
|
{
|
|
1561
|
-
height,
|
|
2009
|
+
height: trellisEnabled ? Number(height) - TRELLIS_TITLE_HEIGHT : height,
|
|
1562
2010
|
width,
|
|
1563
2011
|
ref: uplotContainerElement,
|
|
1564
2012
|
"data-test": "timeseries-chart-wrapper"
|
|
1565
2013
|
},
|
|
1566
2014
|
/* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }),
|
|
1567
2015
|
memoizedVisualization
|
|
1568
|
-
);
|
|
2016
|
+
));
|
|
1569
2017
|
};
|
|
1570
2018
|
var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
|
|
1571
2019
|
|
|
@@ -1855,15 +2303,6 @@ var withDashboardViz = (opts) => {
|
|
|
1855
2303
|
};
|
|
1856
2304
|
var withDashboardViz_default = withDashboardViz;
|
|
1857
2305
|
|
|
1858
|
-
// esm-externals:@splunk/visualization-schemas
|
|
1859
|
-
var visualization_schemas_exports = {};
|
|
1860
|
-
__export(visualization_schemas_exports, {
|
|
1861
|
-
default: () => visualization_schemas_default
|
|
1862
|
-
});
|
|
1863
|
-
var defaultImport26 = __toESM(require("@splunk/visualization-schemas"));
|
|
1864
|
-
__reExport(visualization_schemas_exports, require("@splunk/visualization-schemas"));
|
|
1865
|
-
var visualization_schemas_default = "default" in defaultImport26 ? defaultImport26.default : defaultImport26;
|
|
1866
|
-
|
|
1867
2306
|
// esm-externals:@splunk/visualization-color-palettes/editors/PresetPalettes
|
|
1868
2307
|
var PresetPalettes_exports = {};
|
|
1869
2308
|
__export(PresetPalettes_exports, {
|
|
@@ -2357,7 +2796,7 @@ var getStyledShape = (shape4) => styled_components_default(shape4)`
|
|
|
2357
2796
|
`;
|
|
2358
2797
|
function ClickableShape({ children, onClick, shape: shape4 }) {
|
|
2359
2798
|
const descriptionId = (0, react_exports.useMemo)(() => (0, id_exports.createDOMID)("clickable-svg-description"), []);
|
|
2360
|
-
return /* @__PURE__ */ react_default.createElement(
|
|
2799
|
+
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(
|
|
2361
2800
|
StyledButton,
|
|
2362
2801
|
{
|
|
2363
2802
|
onClick,
|
|
@@ -2368,16 +2807,7 @@ function ClickableShape({ children, onClick, shape: shape4 }) {
|
|
|
2368
2807
|
children
|
|
2369
2808
|
));
|
|
2370
2809
|
}
|
|
2371
|
-
var
|
|
2372
|
-
display: inline-grid;
|
|
2373
|
-
grid-template: 1fr / 1fr;
|
|
2374
|
-
|
|
2375
|
-
& > * {
|
|
2376
|
-
grid-row-start: 1;
|
|
2377
|
-
grid-column-start: 1;
|
|
2378
|
-
}
|
|
2379
|
-
`;
|
|
2380
|
-
var StyledButton = styled_components_default.button`
|
|
2810
|
+
var StyledButton = styled_components_default.button.attrs({ type: "button" })`
|
|
2381
2811
|
padding: 0;
|
|
2382
2812
|
border: 0;
|
|
2383
2813
|
background: transparent;
|
|
@@ -2386,21 +2816,15 @@ var StyledButton = styled_components_default.button`
|
|
|
2386
2816
|
outline: none;
|
|
2387
2817
|
${(props) => props.shape === "rect" ? styled_components_exports.css`
|
|
2388
2818
|
box-shadow: ${variables_default.focusShadow};
|
|
2389
|
-
` :
|
|
2390
|
-
|
|
2391
|
-
styled_components_exports.css`
|
|
2392
|
-
svg:has(+ &) > ellipse {
|
|
2819
|
+
` : styled_components_exports.css`
|
|
2820
|
+
& > svg > ellipse {
|
|
2393
2821
|
filter: drop-shadow(2px 0px 1px ${variables_default.focusColor})
|
|
2394
2822
|
drop-shadow(-2px 0px 1px ${variables_default.focusColor})
|
|
2395
2823
|
drop-shadow(0px 2px 1px ${variables_default.focusColor})
|
|
2396
2824
|
drop-shadow(0px -2px 1px ${variables_default.focusColor});
|
|
2397
2825
|
}
|
|
2398
|
-
`
|
|
2399
|
-
)}
|
|
2826
|
+
`}
|
|
2400
2827
|
}
|
|
2401
|
-
${(props) => props.shape === "ellipse" && `
|
|
2402
|
-
clip-path: ellipse(50% 50% at 50% 50%);
|
|
2403
|
-
`}
|
|
2404
2828
|
`;
|
|
2405
2829
|
|
|
2406
2830
|
// src/Rectangle/Rectangle.tsx
|