@splunk/visualizations 27.4.0 → 27.5.1

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.
Files changed (71) hide show
  1. package/Area.config.js +7 -0
  2. package/Area.config.js.map +2 -2
  3. package/Area.js +36 -6
  4. package/Area.js.map +2 -2
  5. package/Bar.config.js +7 -0
  6. package/Bar.config.js.map +2 -2
  7. package/Bar.js +37 -8
  8. package/Bar.js.map +2 -2
  9. package/Bubble.config.js +7 -0
  10. package/Bubble.config.js.map +2 -2
  11. package/Bubble.js +16 -5
  12. package/Bubble.js.map +2 -2
  13. package/CHANGELOG.external.md +36 -7
  14. package/ChoroplethSvg.js +2 -2
  15. package/Column.config.js +7 -0
  16. package/Column.config.js.map +2 -2
  17. package/Column.js +36 -6
  18. package/Column.js.map +2 -2
  19. package/Ellipse.js +65 -7
  20. package/Ellipse.js.map +4 -4
  21. package/Events.js +11 -6
  22. package/Events.js.map +2 -2
  23. package/FEATUREFLAGS.md +2 -0
  24. package/FillerGauge.js +2 -2
  25. package/Image.js +2 -2
  26. package/Line.config.js +7 -0
  27. package/Line.config.js.map +2 -2
  28. package/Line.js +36 -6
  29. package/Line.js.map +2 -2
  30. package/LinkGraph.js +2 -2
  31. package/Map.config.js +11 -0
  32. package/Map.config.js.map +2 -2
  33. package/Map.js +227 -101
  34. package/Map.js.map +4 -4
  35. package/Markdown.js +2 -2
  36. package/MarkerGauge.js +2 -2
  37. package/ParallelCoordinates.js +2 -2
  38. package/ParallelCoordinates.js.map +1 -1
  39. package/Pie.js +9 -5
  40. package/Pie.js.map +2 -2
  41. package/Punchcard.js +3 -3
  42. package/Punchcard.js.map +2 -2
  43. package/Rectangle.js +64 -7
  44. package/Rectangle.js.map +4 -4
  45. package/Sankey.js +36 -35
  46. package/Sankey.js.map +3 -3
  47. package/Scatter.config.js +7 -0
  48. package/Scatter.config.js.map +2 -2
  49. package/Scatter.js +16 -5
  50. package/Scatter.js.map +2 -2
  51. package/SingleValue.js +3 -3
  52. package/SingleValue.js.map +2 -2
  53. package/SingleValueBasic.js.map +1 -1
  54. package/SingleValueIcon.js +3 -3
  55. package/SingleValueIcon.js.map +2 -2
  56. package/SingleValueRadial.js +3 -3
  57. package/SingleValueRadial.js.map +2 -2
  58. package/Table.js +2 -2
  59. package/Timeline.js +2 -2
  60. package/common/Charting.js +7 -3
  61. package/common/Charting.js.map +2 -2
  62. package/common/chartingUtils.js +11 -0
  63. package/common/chartingUtils.js.map +2 -2
  64. package/common/shapeUtils.js +85 -3
  65. package/common/shapeUtils.js.map +4 -4
  66. package/common/utils/mapUtils.js +156 -43
  67. package/common/utils/mapUtils.js.map +4 -4
  68. package/common/utils/singleValueUtils.js +1 -1
  69. package/common/utils/singleValueUtils.js.map +2 -2
  70. package/common/withDashboardViz.js +2 -2
  71. package/package.json +16 -16
package/Sankey.js CHANGED
@@ -485,7 +485,7 @@ var withFixedSizeContainer = (Viz) => {
485
485
  FixSizeItem,
486
486
  {
487
487
  "data-test": "fix-size-item",
488
- "data-splunk-visualization-version": "27.4.0 - 92ef39d5c",
488
+ "data-splunk-visualization-version": "27.5.1 - 8ecd94150",
489
489
  width,
490
490
  height,
491
491
  backgroundColor
@@ -551,7 +551,7 @@ var Cover = styled_components_default.div`
551
551
  bottom: 0;
552
552
  `;
553
553
  var Blocker = styled_components_default.div.attrs({
554
- "data-splunk-visualization-version": "27.4.0 - 92ef39d5c"
554
+ "data-splunk-visualization-version": "27.5.1 - 8ecd94150"
555
555
  })`
556
556
  position: relative;
557
557
  width: 100%;
@@ -1368,7 +1368,7 @@ var d3_collection_default = "default" in defaultImport28 ? defaultImport28.defau
1368
1368
 
1369
1369
  // src/Sankey/PureSankey/lib/sankey.js
1370
1370
  var d3_sankey = function() {
1371
- var sankey = {}, nodeWidth = 24, nodePadding = 8, size2 = [1, 1], nodes = [], links = [], components = [];
1371
+ let sankey = {}, nodeWidth = 24, nodePadding = 8, size2 = [1, 1], nodes = [], links = [], components = [];
1372
1372
  sankey.nodeWidth = function(_7) {
1373
1373
  if (!arguments.length) return nodeWidth;
1374
1374
  nodeWidth = +_7;
@@ -1408,9 +1408,9 @@ var d3_sankey = function() {
1408
1408
  return sankey;
1409
1409
  };
1410
1410
  sankey.reversibleLink = function() {
1411
- var curvature = 0.5;
1411
+ let curvature = 0.5;
1412
1412
  function forwardLink(part, d) {
1413
- var x0 = d.source.x + d.source.dx, x1 = d.target.x, xi = (0, d3_interpolate_exports.interpolateNumber)(x0, x1), x2 = xi(curvature), x3 = xi(1 - curvature), y0 = d.source.y + d.sy, y1 = d.target.y + d.ty, y2 = d.source.y + d.sy + d.dy, y3 = d.target.y + d.ty + d.dy;
1413
+ let x0 = d.source.x + d.source.dx, x1 = d.target.x, xi = (0, d3_interpolate_exports.interpolateNumber)(x0, x1), x2 = xi(curvature), x3 = xi(1 - curvature), y0 = d.source.y + d.sy, y1 = d.target.y + d.ty, y2 = d.source.y + d.sy + d.dy, y3 = d.target.y + d.ty + d.dy;
1414
1414
  switch (part) {
1415
1415
  case 0:
1416
1416
  return "M" + x0 + "," + y0 + "L" + x0 + "," + (y0 + d.dy);
@@ -1421,15 +1421,15 @@ var d3_sankey = function() {
1421
1421
  }
1422
1422
  }
1423
1423
  function backwardLink(part, d) {
1424
- var curveExtension = 30;
1425
- var curveDepth = 15;
1424
+ let curveExtension = 30;
1425
+ let curveDepth = 15;
1426
1426
  function getDir(d2) {
1427
1427
  return d2.source.y + d2.sy > d2.target.y + d2.ty ? -1 : 1;
1428
1428
  }
1429
1429
  function p(x, y) {
1430
1430
  return x + "," + y + " ";
1431
1431
  }
1432
- var dt = getDir(d) * curveDepth, x0 = d.source.x + d.source.dx, y0 = d.source.y + d.sy, x1 = d.target.x, y1 = d.target.y + d.ty;
1432
+ let dt = getDir(d) * curveDepth, x0 = d.source.x + d.source.dx, y0 = d.source.y + d.sy, x1 = d.target.x, y1 = d.target.y + d.ty;
1433
1433
  switch (part) {
1434
1434
  case 0:
1435
1435
  return "M" + p(x0, y0) + "C" + p(x0, y0) + p(x0 + curveExtension, y0) + p(x0 + curveExtension, y0 + dt) + "L" + p(x0 + curveExtension, y0 + dt + d.dy) + "C" + p(x0 + curveExtension, y0 + d.dy) + p(x0, y0 + d.dy) + p(x0, y0 + d.dy) + "Z";
@@ -1450,9 +1450,9 @@ var d3_sankey = function() {
1450
1450
  };
1451
1451
  };
1452
1452
  sankey.link = function() {
1453
- var curvature = 0.5;
1453
+ let curvature = 0.5;
1454
1454
  function link(d) {
1455
- var x0 = d.source.x + d.source.dx, x1 = d.target.x, xi = (0, d3_interpolate_exports.interpolateNumber)(x0, x1), x2 = xi(curvature), x3 = xi(1 - curvature), y0 = d.source.y + d.sy + d.dy / 2, y1 = d.target.y + d.ty + d.dy / 2;
1455
+ let x0 = d.source.x + d.source.dx, x1 = d.target.x, xi = (0, d3_interpolate_exports.interpolateNumber)(x0, x1), x2 = xi(curvature), x3 = xi(1 - curvature), y0 = d.source.y + d.sy + d.dy / 2, y1 = d.target.y + d.ty + d.dy / 2;
1456
1456
  return "M" + x0 + "," + y0 + "C" + x2 + "," + y0 + " " + x3 + "," + y1 + " " + x1 + "," + y1;
1457
1457
  }
1458
1458
  link.curvature = function(_7) {
@@ -1468,7 +1468,7 @@ var d3_sankey = function() {
1468
1468
  node.targetLinks = [];
1469
1469
  });
1470
1470
  links.forEach(function(link) {
1471
- var source = link.source, target = link.target;
1471
+ let source = link.source, target = link.target;
1472
1472
  if (typeof source === "number") source = link.source = nodes[link.source];
1473
1473
  if (typeof target === "number") target = link.target = nodes[link.target];
1474
1474
  source.sourceLinks.push(link);
@@ -1482,7 +1482,7 @@ var d3_sankey = function() {
1482
1482
  });
1483
1483
  }
1484
1484
  function computeNodeStructure() {
1485
- var nodeStack = [], index = 0;
1485
+ let nodeStack = [], index = 0;
1486
1486
  nodes.forEach(function(node) {
1487
1487
  if (!node.index) {
1488
1488
  connect(node);
@@ -1495,7 +1495,7 @@ var d3_sankey = function() {
1495
1495
  nodeStack.push(node);
1496
1496
  if (node.sourceLinks) {
1497
1497
  node.sourceLinks.forEach(function(sourceLink) {
1498
- var target = sourceLink.target;
1498
+ let target = sourceLink.target;
1499
1499
  if (!target.hasOwnProperty("index")) {
1500
1500
  connect(target);
1501
1501
  node.lowIndex = Math.min(node.lowIndex, target.lowIndex);
@@ -1504,7 +1504,7 @@ var d3_sankey = function() {
1504
1504
  }
1505
1505
  });
1506
1506
  if (node.lowIndex === node.index) {
1507
- var component = [], currentNode;
1507
+ let component = [], currentNode;
1508
1508
  do {
1509
1509
  currentNode = nodeStack.pop();
1510
1510
  currentNode.onStack = false;
@@ -1528,7 +1528,7 @@ var d3_sankey = function() {
1528
1528
  layerComponents();
1529
1529
  components.forEach(function(component, i) {
1530
1530
  bfs(component.root, function(node) {
1531
- var result = node.sourceLinks.filter(function(sourceLink) {
1531
+ let result = node.sourceLinks.filter(function(sourceLink) {
1532
1532
  return sourceLink.target.component == i;
1533
1533
  }).map(function(sourceLink) {
1534
1534
  return sourceLink.target;
@@ -1536,13 +1536,14 @@ var d3_sankey = function() {
1536
1536
  return result;
1537
1537
  });
1538
1538
  });
1539
- var max = 0;
1540
- var componentsByBreadth = (0, d3_collection_exports.nest)().key(function(d) {
1539
+ let max = 0;
1540
+ let componentsByBreadth = (0, d3_collection_exports.nest)().key(function(d) {
1541
1541
  return d.x;
1542
1542
  }).sortKeys(d3_array_exports.ascending).entries(components).map(function(d) {
1543
1543
  return d.values;
1544
1544
  });
1545
- var max = -1, nextMax = -1;
1545
+ max = -1;
1546
+ let nextMax = -1;
1546
1547
  componentsByBreadth.forEach(function(c) {
1547
1548
  c.forEach(function(component) {
1548
1549
  component.x = max + 1;
@@ -1555,7 +1556,7 @@ var d3_sankey = function() {
1555
1556
  max = nextMax;
1556
1557
  });
1557
1558
  nodes.filter(function(node) {
1558
- var outLinks = node.sourceLinks.filter(function(link) {
1559
+ let outLinks = node.sourceLinks.filter(function(link) {
1559
1560
  return link.source.name != link.target.name;
1560
1561
  });
1561
1562
  return outLinks.length == 0;
@@ -1567,7 +1568,7 @@ var d3_sankey = function() {
1567
1568
  return [].concat.apply([], a);
1568
1569
  }
1569
1570
  function layerComponents() {
1570
- var remainingComponents = components, nextComponents, visitedIndex, x = 0;
1571
+ let remainingComponents = components, nextComponents, visitedIndex, x = 0;
1571
1572
  while (remainingComponents.length) {
1572
1573
  nextComponents = [];
1573
1574
  visitedIndex = {};
@@ -1587,15 +1588,15 @@ var d3_sankey = function() {
1587
1588
  }
1588
1589
  }
1589
1590
  function bfs(node, extractTargets) {
1590
- var queue = [node], currentCount = 1, nextCount = 0;
1591
- var x = 0;
1591
+ let queue = [node], currentCount = 1, nextCount = 0;
1592
+ let x = 0;
1592
1593
  while (currentCount > 0) {
1593
- var currentNode = queue.shift();
1594
+ let currentNode = queue.shift();
1594
1595
  currentCount--;
1595
1596
  if (!currentNode.hasOwnProperty("x")) {
1596
1597
  currentNode.x = x;
1597
1598
  currentNode.dx = nodeWidth;
1598
- var targets = extractTargets(currentNode);
1599
+ let targets = extractTargets(currentNode);
1599
1600
  queue = queue.concat(targets);
1600
1601
  nextCount += targets.length;
1601
1602
  }
@@ -1629,21 +1630,21 @@ var d3_sankey = function() {
1629
1630
  });
1630
1631
  }
1631
1632
  function computeNodeDepths(iterations) {
1632
- var nodesByBreadth = (0, d3_collection_exports.nest)().key(function(d) {
1633
+ let nodesByBreadth = (0, d3_collection_exports.nest)().key(function(d) {
1633
1634
  return d.x;
1634
1635
  }).sortKeys(d3_array_exports.ascending).entries(nodes).map(function(d) {
1635
1636
  return d.values;
1636
1637
  });
1637
1638
  initializeNodeDepth();
1638
1639
  resolveCollisions();
1639
- for (var alpha = 1; iterations > 0; --iterations) {
1640
+ for (let alpha = 1; iterations > 0; --iterations) {
1640
1641
  relaxRightToLeft(alpha *= 0.99);
1641
1642
  resolveCollisions();
1642
1643
  relaxLeftToRight(alpha);
1643
1644
  resolveCollisions();
1644
1645
  }
1645
1646
  function initializeNodeDepth() {
1646
- var ky = (0, d3_array_exports.min)(nodesByBreadth, function(nodes2) {
1647
+ let ky = (0, d3_array_exports.min)(nodesByBreadth, function(nodes2) {
1647
1648
  return (size2[1] - (nodes2.length - 1) * nodePadding) / (0, d3_array_exports.sum)(nodes2, value);
1648
1649
  });
1649
1650
  nodesByBreadth.forEach(function(nodes2) {
@@ -1656,12 +1657,12 @@ var d3_sankey = function() {
1656
1657
  link.dy = link.value * ky;
1657
1658
  });
1658
1659
  }
1659
- function relaxLeftToRight(alpha2) {
1660
+ function relaxLeftToRight(alpha) {
1660
1661
  nodesByBreadth.forEach(function(nodes2, breadth) {
1661
1662
  nodes2.forEach(function(node) {
1662
1663
  if (node.targetLinks.length) {
1663
- var y = (0, d3_array_exports.sum)(node.targetLinks, weightedSource) / (0, d3_array_exports.sum)(node.targetLinks, value);
1664
- node.y += (y - center(node)) * alpha2;
1664
+ let y = (0, d3_array_exports.sum)(node.targetLinks, weightedSource) / (0, d3_array_exports.sum)(node.targetLinks, value);
1665
+ node.y += (y - center(node)) * alpha;
1665
1666
  }
1666
1667
  });
1667
1668
  });
@@ -1669,12 +1670,12 @@ var d3_sankey = function() {
1669
1670
  return center(link.source) * link.value;
1670
1671
  }
1671
1672
  }
1672
- function relaxRightToLeft(alpha2) {
1673
+ function relaxRightToLeft(alpha) {
1673
1674
  nodesByBreadth.slice().reverse().forEach(function(nodes2) {
1674
1675
  nodes2.forEach(function(node) {
1675
1676
  if (node.sourceLinks.length) {
1676
- var y = (0, d3_array_exports.sum)(node.sourceLinks, weightedTarget) / (0, d3_array_exports.sum)(node.sourceLinks, value);
1677
- node.y += (y - center(node)) * alpha2;
1677
+ let y = (0, d3_array_exports.sum)(node.sourceLinks, weightedTarget) / (0, d3_array_exports.sum)(node.sourceLinks, value);
1678
+ node.y += (y - center(node)) * alpha;
1678
1679
  }
1679
1680
  });
1680
1681
  });
@@ -1684,7 +1685,7 @@ var d3_sankey = function() {
1684
1685
  }
1685
1686
  function resolveCollisions() {
1686
1687
  nodesByBreadth.forEach(function(nodes2) {
1687
- var node, dy, y0 = 0, n = nodes2.length, i;
1688
+ let node, dy, y0 = 0, n = nodes2.length, i;
1688
1689
  nodes2.sort(ascendingDepth);
1689
1690
  for (i = 0; i < n; ++i) {
1690
1691
  node = nodes2[i];
@@ -1718,7 +1719,7 @@ var d3_sankey = function() {
1718
1719
  node.targetLinks.sort(ascendingSourceDepth);
1719
1720
  });
1720
1721
  nodes.forEach(function(node) {
1721
- var sy = 0, ty = 0;
1722
+ let sy = 0, ty = 0;
1722
1723
  node.sourceLinks.forEach(function(link) {
1723
1724
  link.sy = sy;
1724
1725
  sy += link.dy;