@splunk/visualizations 27.5.0 → 27.5.2

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/LinkGraph.js CHANGED
@@ -3048,7 +3048,7 @@ var withFixedSizeContainer = (Viz) => {
3048
3048
  FixSizeItem,
3049
3049
  {
3050
3050
  "data-test": "fix-size-item",
3051
- "data-splunk-visualization-version": "27.5.0 - 5cfbc7064",
3051
+ "data-splunk-visualization-version": "27.5.2 - 942186e5f",
3052
3052
  width,
3053
3053
  height,
3054
3054
  backgroundColor
@@ -3118,7 +3118,7 @@ var Cover = styled_components_default.div`
3118
3118
  bottom: 0;
3119
3119
  `;
3120
3120
  var Blocker = styled_components_default.div.attrs({
3121
- "data-splunk-visualization-version": "27.5.0 - 5cfbc7064"
3121
+ "data-splunk-visualization-version": "27.5.2 - 942186e5f"
3122
3122
  })`
3123
3123
  position: relative;
3124
3124
  width: 100%;
package/Map.js CHANGED
@@ -496,10 +496,11 @@ var sortByValuesField = (bubbleLayer) => {
496
496
  bubbleLayer.bubbleSize.unshift(bubbleLayer.bubbleSize.splice(index, 1)[0]);
497
497
  };
498
498
  var bakeBubbleData = (layer) => {
499
- var _a;
500
- if (!layer || !((_a = layer.bubbleSize) == null ? void 0 : _a.length) || !layer.geobin || !layer.geobin.length || !layer.latitude || !layer.latitude.length || !layer.longitude || !layer.longitude.length) {
499
+ var _a, _b, _c;
500
+ if (!((_a = layer == null ? void 0 : layer.bubbleSize) == null ? void 0 : _a.length) || !((_b = layer == null ? void 0 : layer.latitude) == null ? void 0 : _b.length) || !((_c = layer == null ? void 0 : layer.longitude) == null ? void 0 : _c.length)) {
501
501
  return null;
502
502
  }
503
+ const hasGeobinData = Array.isArray(layer.geobin) && layer.geobin.length > 0;
503
504
  const sanitizedBubbleSize = sanitizeValues(layer.bubbleSize);
504
505
  let transposedBubbleSize;
505
506
  let transposedSanitizedBubbleSize;
@@ -521,14 +522,14 @@ var bakeBubbleData = (layer) => {
521
522
  return null;
522
523
  }
523
524
  const data = layer.latitude.map((lat, i) => ({
524
- zoom: getZoomLevelFromGeobin(layer.geobin[i]),
525
+ zoom: hasGeobinData ? getZoomLevelFromGeobin(layer.geobin[i]) : null,
525
526
  values: transposedBubbleSize[i],
526
527
  sanitizedValues: transposedSanitizedBubbleSize[i],
527
528
  coordinates: [layer.longitude[i], lat],
528
529
  metadata: layer.metadata ? layer.metadata[i] : {}
529
530
  })).filter((d) => Boolean(d.values));
530
531
  let min = (0, lodash_exports.sum)(transposedSanitizedBubbleSize[0]);
531
- let max = (0, lodash_exports.sum)(transposedSanitizedBubbleSize[1]);
532
+ let max = min;
532
533
  transposedSanitizedBubbleSize.forEach((row) => {
533
534
  const bubbleSize = (0, lodash_exports.sum)(row);
534
535
  max = bubbleSize > max ? bubbleSize : max;
@@ -1047,7 +1048,8 @@ var BubbleLayer = (props) => {
1047
1048
  const dynamicColors = bubbleLayer.dataColors;
1048
1049
  const dataToRender = react_exports.useMemo(
1049
1050
  () => data.reduce((acc, datum, i) => {
1050
- if (datum.zoom === roundedZoom) {
1051
+ const shouldRender = datum.zoom === null || datum.zoom === void 0 || datum.zoom === roundedZoom;
1052
+ if (shouldRender) {
1051
1053
  acc.push({ data: datum, idx: i });
1052
1054
  }
1053
1055
  return acc;
@@ -1262,7 +1264,7 @@ var ClusterLayer = ({
1262
1264
  }
1263
1265
  );
1264
1266
  }
1265
- if ((clusterLayer == null ? void 0 : clusterLayer.type) === visualization_schemas_exports.LAYER_TYPE.Bubble && "geobin" in clusterLayer && "bubbleSize" in clusterLayer) {
1267
+ if ((clusterLayer == null ? void 0 : clusterLayer.type) === visualization_schemas_exports.LAYER_TYPE.Bubble && Array.isArray(clusterLayer.bubbleSize)) {
1266
1268
  return /* @__PURE__ */ react_exports.createElement(
1267
1269
  BubbleLayer_default,
1268
1270
  {
@@ -2870,7 +2872,7 @@ var withFixedSizeContainer = (Viz) => {
2870
2872
  FixSizeItem,
2871
2873
  {
2872
2874
  "data-test": "fix-size-item",
2873
- "data-splunk-visualization-version": "27.5.0 - 5cfbc7064",
2875
+ "data-splunk-visualization-version": "27.5.2 - 942186e5f",
2874
2876
  width,
2875
2877
  height,
2876
2878
  backgroundColor
@@ -2936,7 +2938,7 @@ var Cover = styled_components_default.div`
2936
2938
  bottom: 0;
2937
2939
  `;
2938
2940
  var Blocker = styled_components_default.div.attrs({
2939
- "data-splunk-visualization-version": "27.5.0 - 5cfbc7064"
2941
+ "data-splunk-visualization-version": "27.5.2 - 942186e5f"
2940
2942
  })`
2941
2943
  position: relative;
2942
2944
  width: 100%;