@splunk/visualizations 27.3.0 → 27.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/Area.config.js +24 -3
  2. package/Area.config.js.map +2 -2
  3. package/Area.js +53 -9
  4. package/Area.js.map +2 -2
  5. package/Bar.config.js +24 -3
  6. package/Bar.config.js.map +3 -3
  7. package/Bar.js +54 -11
  8. package/Bar.js.map +3 -3
  9. package/Bubble.config.js +8 -1
  10. package/Bubble.config.js.map +2 -2
  11. package/Bubble.js +17 -6
  12. package/Bubble.js.map +2 -2
  13. package/CHANGELOG.external.md +1629 -0
  14. package/ChoroplethSvg.js +2 -2
  15. package/Column.config.js +24 -3
  16. package/Column.config.js.map +3 -3
  17. package/Column.js +53 -9
  18. package/Column.js.map +3 -3
  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.config.js +8 -28
  25. package/FillerGauge.config.js.map +2 -2
  26. package/FillerGauge.js +10 -30
  27. package/FillerGauge.js.map +2 -2
  28. package/Image.js +2 -2
  29. package/Line.config.js +24 -3
  30. package/Line.config.js.map +3 -3
  31. package/Line.js +53 -9
  32. package/Line.js.map +3 -3
  33. package/LinkGraph.js +2 -2
  34. package/Map.config.js +22 -0
  35. package/Map.config.js.map +2 -2
  36. package/Map.js +284 -121
  37. package/Map.js.map +4 -4
  38. package/Markdown.js +2 -2
  39. package/MarkerGauge.config.js +8 -25
  40. package/MarkerGauge.config.js.map +2 -2
  41. package/MarkerGauge.js +10 -27
  42. package/MarkerGauge.js.map +2 -2
  43. package/ParallelCoordinates.js +2 -2
  44. package/ParallelCoordinates.js.map +1 -1
  45. package/Pie.config.js +123 -3
  46. package/Pie.config.js.map +3 -3
  47. package/Pie.js +743 -19
  48. package/Pie.js.map +4 -4
  49. package/Punchcard.js +2 -2
  50. package/Punchcard.js.map +1 -1
  51. package/Rectangle.js +64 -7
  52. package/Rectangle.js.map +4 -4
  53. package/Sankey.js +36 -35
  54. package/Sankey.js.map +3 -3
  55. package/Scatter.config.js +320 -113
  56. package/Scatter.config.js.map +4 -4
  57. package/Scatter.js +936 -128
  58. package/Scatter.js.map +4 -4
  59. package/SingleValue.js +3 -3
  60. package/SingleValue.js.map +2 -2
  61. package/SingleValueBasic.js.map +1 -1
  62. package/SingleValueIcon.js +3 -3
  63. package/SingleValueIcon.js.map +2 -2
  64. package/SingleValueRadial.js +3 -3
  65. package/SingleValueRadial.js.map +2 -2
  66. package/TRELLIS.md +12 -3
  67. package/Table.js +2 -2
  68. package/Timeline.js +81 -63
  69. package/Timeline.js.map +4 -4
  70. package/common/Charting.js +7 -3
  71. package/common/Charting.js.map +2 -2
  72. package/common/chartingUtils.js +11 -0
  73. package/common/chartingUtils.js.map +2 -2
  74. package/common/shapeUtils.js +85 -3
  75. package/common/shapeUtils.js.map +4 -4
  76. package/common/utils/mapUtils.js +169 -48
  77. package/common/utils/mapUtils.js.map +4 -4
  78. package/common/utils/singleValueUtils.js +1 -1
  79. package/common/utils/singleValueUtils.js.map +2 -2
  80. package/common/withDashboardViz.js +2 -2
  81. package/package.json +18 -18
package/Rectangle.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.3.0 - bd2e687fd",
488
+ "data-splunk-visualization-version": "27.5.0 - 5cfbc7064",
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.3.0 - bd2e687fd"
554
+ "data-splunk-visualization-version": "27.5.0 - 5cfbc7064"
555
555
  })`
556
556
  position: relative;
557
557
  width: 100%;
@@ -1798,7 +1798,16 @@ var defaultImport30 = __toESM(require("@splunk/visualizations-shared/propUtils")
1798
1798
  __reExport(propUtils_exports, require("@splunk/visualizations-shared/propUtils"));
1799
1799
  var propUtils_default = "default" in defaultImport30 ? defaultImport30.default : defaultImport30;
1800
1800
 
1801
- // src/common/shapeUtils.ts
1801
+ // esm-externals:@splunk/react-ui/ScreenReaderContent
1802
+ var ScreenReaderContent_exports = {};
1803
+ __export(ScreenReaderContent_exports, {
1804
+ default: () => ScreenReaderContent_default
1805
+ });
1806
+ var defaultImport31 = __toESM(require("@splunk/react-ui/ScreenReaderContent"));
1807
+ __reExport(ScreenReaderContent_exports, require("@splunk/react-ui/ScreenReaderContent"));
1808
+ var ScreenReaderContent_default = "default" in defaultImport31 ? defaultImport31.default : defaultImport31;
1809
+
1810
+ // src/common/shapeUtils.tsx
1802
1811
  var shapeOptionsMapping = {
1803
1812
  fillColor: "fill",
1804
1813
  strokeColor: "stroke",
@@ -1821,7 +1830,52 @@ var getStyledShape = (shape4) => styled_components_default(shape4)`
1821
1830
  },
1822
1831
  prisma: variables_default.neutral500
1823
1832
  })(props)};
1824
- cursor: ${(props) => props.onClick ? "pointer" : "inherit"};
1833
+ `;
1834
+ function ClickableShape({ children, onClick, shape: shape4 }) {
1835
+ const descriptionId = (0, react_exports.useMemo)(() => (0, id_exports.createDOMID)("clickable-svg-description"), []);
1836
+ return /* @__PURE__ */ react_default.createElement(StyledDiv, null, /* @__PURE__ */ react_default.createElement(ScreenReaderContent_default, { id: descriptionId }, (0, i18n_exports._)("Click to trigger interaction")), children, /* @__PURE__ */ react_default.createElement(
1837
+ StyledButton,
1838
+ {
1839
+ onClick,
1840
+ "aria-label": shape4 === "rect" ? (0, i18n_exports._)("Rectangle visualization") : (0, i18n_exports._)("Ellipse visualization"),
1841
+ "aria-describedby": descriptionId,
1842
+ shape: shape4
1843
+ }
1844
+ ));
1845
+ }
1846
+ var StyledDiv = styled_components_default.div`
1847
+ display: inline-grid;
1848
+ grid-template: 1fr / 1fr;
1849
+
1850
+ & > * {
1851
+ grid-row-start: 1;
1852
+ grid-column-start: 1;
1853
+ }
1854
+ `;
1855
+ var StyledButton = styled_components_default.button`
1856
+ padding: 0;
1857
+ border: none;
1858
+ background: none;
1859
+ cursor: pointer;
1860
+ &:focus {
1861
+ outline: none;
1862
+ ${(props) => props.shape === "rect" ? styled_components_exports.css`
1863
+ box-shadow: ${variables_default.focusShadow};
1864
+ ` : (
1865
+ // clip-path would clip the shadow for ellipse, so we use drop-shadow filters to simulate it
1866
+ styled_components_exports.css`
1867
+ svg:has(+ &) > ellipse {
1868
+ filter: drop-shadow(2px 0px 1px ${variables_default.focusColor})
1869
+ drop-shadow(-2px 0px 1px ${variables_default.focusColor})
1870
+ drop-shadow(0px 2px 1px ${variables_default.focusColor})
1871
+ drop-shadow(0px -2px 1px ${variables_default.focusColor});
1872
+ }
1873
+ `
1874
+ )}
1875
+ }
1876
+ ${(props) => props.shape === "ellipse" && `
1877
+ clip-path: ellipse(50% 50% at 50% 50%);
1878
+ `}
1825
1879
  `;
1826
1880
 
1827
1881
  // src/Rectangle/Rectangle.tsx
@@ -1843,7 +1897,7 @@ var RectangleViz = (props) => {
1843
1897
  let { rx, ry } = options;
1844
1898
  rx = rx || 0;
1845
1899
  ry = ry || 0;
1846
- return /* @__PURE__ */ react_exports.createElement(SVGContainer, { width, height }, /* @__PURE__ */ react_exports.createElement(
1900
+ const svgContent = /* @__PURE__ */ react_exports.createElement(SVGContainer, { width, height }, /* @__PURE__ */ react_exports.createElement(
1847
1901
  RectangleShape,
1848
1902
  __spreadProps(__spreadValues({}, options), {
1849
1903
  rx,
@@ -1852,10 +1906,13 @@ var RectangleViz = (props) => {
1852
1906
  y: `${strokeWidth / 2}px`,
1853
1907
  vectorEffect: "non-scaling-stroke",
1854
1908
  width: `${width - strokeWidth}px`,
1855
- height: `${height - strokeWidth}px`,
1856
- onClick: onRectangleClick
1909
+ height: `${height - strokeWidth}px`
1857
1910
  })
1858
1911
  ));
1912
+ if (typeof onRectangleClick === "function") {
1913
+ return /* @__PURE__ */ react_exports.createElement(ClickableShape, { shape: "rect", onClick: onRectangleClick }, svgContent);
1914
+ }
1915
+ return svgContent;
1859
1916
  };
1860
1917
  var validOptions = Object.keys(config_default.optionsSchema);
1861
1918
  var computeVizProps = (props) => {