@splunk/visualizations 25.12.0 → 25.13.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 (62) hide show
  1. package/Area.js +114 -113
  2. package/Area.js.map +1 -1
  3. package/Bar.js +114 -113
  4. package/Bar.js.map +1 -1
  5. package/Bubble.js +103 -102
  6. package/Bubble.js.map +1 -1
  7. package/ChoroplethSvg.js +207 -123
  8. package/ChoroplethSvg.js.map +1 -1
  9. package/Column.js +116 -113
  10. package/Column.js.map +1 -1
  11. package/Ellipse.js +72 -69
  12. package/Ellipse.js.map +1 -1
  13. package/Events.config.js +1 -1
  14. package/Events.config.js.map +1 -1
  15. package/Events.js +168 -134
  16. package/Events.js.map +1 -1
  17. package/FillerGauge.js +95 -92
  18. package/FillerGauge.js.map +1 -1
  19. package/Image.js +98 -98
  20. package/Image.js.map +1 -1
  21. package/Line.js +116 -113
  22. package/Line.js.map +1 -1
  23. package/LinkGraph.js +659 -656
  24. package/LinkGraph.js.map +1 -1
  25. package/Map.js +342 -333
  26. package/Map.js.map +1 -1
  27. package/Markdown.js +104 -104
  28. package/Markdown.js.map +1 -1
  29. package/MarkerGauge.js +88 -88
  30. package/MarkerGauge.js.map +1 -1
  31. package/ParallelCoordinates.js +110 -110
  32. package/ParallelCoordinates.js.map +1 -1
  33. package/Pie.js +125 -125
  34. package/Pie.js.map +1 -1
  35. package/Punchcard.js +228 -228
  36. package/Punchcard.js.map +1 -1
  37. package/Rectangle.js +111 -111
  38. package/Rectangle.js.map +1 -1
  39. package/Sankey.js +178 -177
  40. package/Sankey.js.map +1 -1
  41. package/Scatter.js +151 -151
  42. package/Scatter.js.map +1 -1
  43. package/SingleValue.js +954 -350
  44. package/SingleValue.js.map +1 -1
  45. package/SingleValueBasic.js +43 -27
  46. package/SingleValueBasic.js.map +1 -1
  47. package/SingleValueIcon.js +432 -431
  48. package/SingleValueIcon.js.map +1 -1
  49. package/SingleValueRadial.js +421 -411
  50. package/SingleValueRadial.js.map +1 -1
  51. package/SparkLine.js +754 -0
  52. package/SparkLine.js.map +1 -0
  53. package/Table.js +726 -122
  54. package/Table.js.map +1 -1
  55. package/common/utils/dataUtils.js +1 -1
  56. package/common/utils/dataUtils.js.map +1 -1
  57. package/common/utils/mapUtils.js +7 -4
  58. package/common/utils/mapUtils.js.map +1 -1
  59. package/common/utils/urlUtils.js +118 -0
  60. package/common/utils/urlUtils.js.map +1 -0
  61. package/common/withDashboardViz.js +2 -2
  62. package/package.json +11 -12
package/ChoroplethSvg.js CHANGED
@@ -87,20 +87,20 @@ module.exports =
87
87
  /******/
88
88
  /******/
89
89
  /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 181);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 182);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ([
94
94
  /* 0 */
95
95
  /***/ (function(module, exports) {
96
96
 
97
- module.exports = require("react");
97
+ module.exports = require("prop-types");
98
98
 
99
99
  /***/ }),
100
100
  /* 1 */
101
101
  /***/ (function(module, exports) {
102
102
 
103
- module.exports = require("prop-types");
103
+ module.exports = require("react");
104
104
 
105
105
  /***/ }),
106
106
  /* 2 */
@@ -161,31 +161,31 @@ var VizBehavior;
161
161
  /* 7 */
162
162
  /***/ (function(module, exports) {
163
163
 
164
- module.exports = require("@babel/runtime/helpers/toConsumableArray");
164
+ module.exports = require("@babel/runtime/helpers/defineProperty");
165
165
 
166
166
  /***/ }),
167
167
  /* 8 */
168
168
  /***/ (function(module, exports) {
169
169
 
170
- module.exports = require("@babel/runtime/helpers/defineProperty");
170
+ module.exports = require("@babel/runtime/helpers/toConsumableArray");
171
171
 
172
172
  /***/ }),
173
173
  /* 9 */
174
174
  /***/ (function(module, exports) {
175
175
 
176
- module.exports = require("@splunk/visualizations-shared/Message");
176
+ module.exports = require("@babel/runtime/helpers/classCallCheck");
177
177
 
178
178
  /***/ }),
179
179
  /* 10 */
180
180
  /***/ (function(module, exports) {
181
181
 
182
- module.exports = require("@splunk/themes/variables");
182
+ module.exports = require("@splunk/visualizations-shared/Message");
183
183
 
184
184
  /***/ }),
185
185
  /* 11 */
186
186
  /***/ (function(module, exports) {
187
187
 
188
- module.exports = require("@babel/runtime/helpers/classCallCheck");
188
+ module.exports = require("@splunk/themes/variables");
189
189
 
190
190
  /***/ }),
191
191
  /* 12 */
@@ -203,9 +203,9 @@ module.exports = require("@splunk/visualizations-shared/colorUtils");
203
203
  Object.defineProperty(exports, "__esModule", {
204
204
  value: true
205
205
  });
206
- var React = __webpack_require__(0);
206
+ var React = __webpack_require__(1);
207
207
  var styled_components_1 = __webpack_require__(4);
208
- var SizeAwareWrapper_1 = __webpack_require__(18);
208
+ var SizeAwareWrapper_1 = __webpack_require__(19);
209
209
  var style_1 = __webpack_require__(14);
210
210
  var colorUtils_1 = __webpack_require__(12);
211
211
  var Item = styled_components_1.default.div.attrs(function (_ref) {
@@ -260,7 +260,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
260
260
  }
261
261
  return React.createElement(FixSizeItem, {
262
262
  "data-test": "fix-size-item",
263
- "data-splunk-visualization-version": "25.12.0 - d7a0fecdf",
263
+ "data-splunk-visualization-version": "25.13.1 - ea48ec41e",
264
264
  width: width,
265
265
  height: height,
266
266
  backgroundColor: backgroundColor
@@ -330,17 +330,23 @@ module.exports = require("@babel/runtime/helpers/slicedToArray");
330
330
  /* 18 */
331
331
  /***/ (function(module, exports) {
332
332
 
333
- module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
333
+ module.exports = require("@babel/runtime/helpers/createClass");
334
334
 
335
335
  /***/ }),
336
336
  /* 19 */
337
+ /***/ (function(module, exports) {
338
+
339
+ module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
340
+
341
+ /***/ }),
342
+ /* 20 */
337
343
  /***/ (function(module, exports, __webpack_require__) {
338
344
 
339
345
  "use strict";
340
346
 
341
347
 
342
- var _toConsumableArray = __webpack_require__(7);
343
- var _defineProperty = __webpack_require__(8);
348
+ var _toConsumableArray = __webpack_require__(8);
349
+ var _defineProperty = __webpack_require__(7);
344
350
  var __rest = this && this.__rest || function (s, e) {
345
351
  var t = {};
346
352
  for (var p in s) {
@@ -535,23 +541,17 @@ var insertLayout = function insertLayout(layout, index) {
535
541
  };
536
542
  exports.insertLayout = insertLayout;
537
543
 
538
- /***/ }),
539
- /* 20 */
540
- /***/ (function(module, exports) {
541
-
542
- module.exports = require("@splunk/visualization-context/FeatureFlagContext");
543
-
544
544
  /***/ }),
545
545
  /* 21 */
546
546
  /***/ (function(module, exports) {
547
547
 
548
- module.exports = require("@splunk/visualizations-shared/configUtils");
548
+ module.exports = require("@splunk/visualization-context/FeatureFlagContext");
549
549
 
550
550
  /***/ }),
551
551
  /* 22 */
552
552
  /***/ (function(module, exports) {
553
553
 
554
- module.exports = require("@babel/runtime/helpers/createClass");
554
+ module.exports = require("@splunk/visualizations-shared/configUtils");
555
555
 
556
556
  /***/ }),
557
557
  /* 23 */
@@ -597,11 +597,11 @@ Object.defineProperty(exports, "__esModule", {
597
597
  value: true
598
598
  });
599
599
  exports.shouldShowIconPlaceholder = void 0;
600
- var React = __webpack_require__(0);
601
- var T = __webpack_require__(1);
600
+ var React = __webpack_require__(1);
601
+ var T = __webpack_require__(0);
602
602
  var lodash_1 = __webpack_require__(3);
603
603
  var i18n_1 = __webpack_require__(2);
604
- var Message_1 = __webpack_require__(9);
604
+ var Message_1 = __webpack_require__(10);
605
605
  var FixedSizeContainer_1 = __webpack_require__(13);
606
606
  /**
607
607
  * @method shouldShowIconPlaceholder
@@ -677,12 +677,12 @@ module.exports = require("@splunk/ui-utils/id");
677
677
  "use strict";
678
678
 
679
679
 
680
- var _defineProperty = __webpack_require__(8);
680
+ var _defineProperty = __webpack_require__(7);
681
681
  Object.defineProperty(exports, "__esModule", {
682
682
  value: true
683
683
  });
684
684
  exports.getSortingParams = exports.SortParamsPropTypes = void 0;
685
- var T = __webpack_require__(1);
685
+ var T = __webpack_require__(0);
686
686
  var lodash_1 = __webpack_require__(3);
687
687
  var DataSource_1 = __webpack_require__(43);
688
688
  exports.SortParamsPropTypes = T.shape({
@@ -740,7 +740,7 @@ Object.defineProperty(exports, "__esModule", {
740
740
  value: true
741
741
  });
742
742
  exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
743
- var T = __webpack_require__(1);
743
+ var T = __webpack_require__(0);
744
744
  var lodash_1 = __webpack_require__(3);
745
745
  exports.PaginatorParamsPropTypes = T.shape({
746
746
  isPaging: T.bool,
@@ -820,14 +820,14 @@ var _slicedToArray = __webpack_require__(17);
820
820
  Object.defineProperty(exports, "__esModule", {
821
821
  value: true
822
822
  });
823
- var React = __webpack_require__(0);
823
+ var React = __webpack_require__(1);
824
824
  var lodash_1 = __webpack_require__(3);
825
825
  var getSettingsFromThemedProps_1 = __webpack_require__(37);
826
826
  var Options_1 = __webpack_require__(29);
827
827
  var SanitizeProps_1 = __webpack_require__(38);
828
828
  var TimezoneContext_1 = __webpack_require__(25);
829
829
  var moment_1 = __webpack_require__(39);
830
- var FeatureFlagContext_1 = __webpack_require__(20);
830
+ var FeatureFlagContext_1 = __webpack_require__(21);
831
831
  var styled_components_1 = __webpack_require__(4);
832
832
  var hocUtils_1 = __webpack_require__(26);
833
833
  var JSONSchemaUtils_1 = __webpack_require__(27);
@@ -1118,13 +1118,13 @@ module.exports = require("@splunk/async-dynamic-options-evaluator");
1118
1118
  "use strict";
1119
1119
 
1120
1120
 
1121
- var _classCallCheck = __webpack_require__(11);
1121
+ var _classCallCheck = __webpack_require__(9);
1122
1122
  Object.defineProperty(exports, "__esModule", {
1123
1123
  value: true
1124
1124
  });
1125
1125
  exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
1126
1126
  /* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
1127
- var T = __webpack_require__(1);
1127
+ var T = __webpack_require__(0);
1128
1128
  var lodash_1 = __webpack_require__(3);
1129
1129
  var VizActionHandler_1 = __webpack_require__(42);
1130
1130
  // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
@@ -1247,8 +1247,8 @@ exports.default = SplunkVisualization;
1247
1247
  "use strict";
1248
1248
 
1249
1249
 
1250
- var _classCallCheck = __webpack_require__(11);
1251
- var _createClass = __webpack_require__(22);
1250
+ var _classCallCheck = __webpack_require__(9);
1251
+ var _createClass = __webpack_require__(18);
1252
1252
  Object.defineProperty(exports, "__esModule", {
1253
1253
  value: true
1254
1254
  });
@@ -1296,7 +1296,7 @@ Object.defineProperty(exports, "__esModule", {
1296
1296
  value: true
1297
1297
  });
1298
1298
  exports.useDeepMemo = void 0;
1299
- var react_1 = __webpack_require__(0);
1299
+ var react_1 = __webpack_require__(1);
1300
1300
  var lodash_1 = __webpack_require__(3);
1301
1301
  /**
1302
1302
  * This hook evaluates and stores the result of a passed function and only
@@ -1334,10 +1334,10 @@ Object.defineProperty(exports, "__esModule", {
1334
1334
  value: true
1335
1335
  });
1336
1336
  exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
1337
- var React = __webpack_require__(0);
1338
- var T = __webpack_require__(1);
1337
+ var React = __webpack_require__(1);
1338
+ var T = __webpack_require__(0);
1339
1339
  var i18n_1 = __webpack_require__(2);
1340
- var Message_1 = __webpack_require__(9);
1340
+ var Message_1 = __webpack_require__(10);
1341
1341
  var FixedSizeContainer_1 = __webpack_require__(13);
1342
1342
  /**
1343
1343
  * @method isMissing
@@ -1401,7 +1401,7 @@ exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
1401
1401
  Object.defineProperty(exports, "__esModule", {
1402
1402
  value: true
1403
1403
  });
1404
- var React = __webpack_require__(0);
1404
+ var React = __webpack_require__(1);
1405
1405
  var styled_components_1 = __webpack_require__(4);
1406
1406
  var hocUtils_1 = __webpack_require__(15);
1407
1407
  var Cover = styled_components_1.default.div.withConfig({
@@ -1409,7 +1409,7 @@ var Cover = styled_components_1.default.div.withConfig({
1409
1409
  componentId: "sc-1gsbnxb-0"
1410
1410
  })(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
1411
1411
  var Blocker = styled_components_1.default.div.attrs({
1412
- 'data-splunk-visualization-version': "25.12.0 - d7a0fecdf"
1412
+ 'data-splunk-visualization-version': "25.13.1 - ea48ec41e"
1413
1413
  }).withConfig({
1414
1414
  displayName: "withEditModeCover__Blocker",
1415
1415
  componentId: "sc-1gsbnxb-1"
@@ -1446,9 +1446,9 @@ exports.default = withEditModeCover;
1446
1446
  Object.defineProperty(exports, "__esModule", {
1447
1447
  value: true
1448
1448
  });
1449
- var React = __webpack_require__(0);
1449
+ var React = __webpack_require__(1);
1450
1450
  var colorUtils_1 = __webpack_require__(12);
1451
- var variables_1 = __webpack_require__(10);
1451
+ var variables_1 = __webpack_require__(11);
1452
1452
  var IconPlaceholder_1 = __webpack_require__(31);
1453
1453
  var VizBehavior_1 = __webpack_require__(6);
1454
1454
  var hocUtils_1 = __webpack_require__(15);
@@ -1488,21 +1488,21 @@ var withPlaceholder = function withPlaceholder(Visualization) {
1488
1488
  exports.default = withPlaceholder;
1489
1489
 
1490
1490
  /***/ }),
1491
- /* 48 */
1491
+ /* 48 */,
1492
+ /* 49 */
1492
1493
  /***/ (function(module, exports) {
1493
1494
 
1494
1495
  module.exports = require("@splunk/visualization-icons/placeholders");
1495
1496
 
1496
1497
  /***/ }),
1497
- /* 49 */,
1498
1498
  /* 50 */,
1499
- /* 51 */
1499
+ /* 51 */,
1500
+ /* 52 */
1500
1501
  /***/ (function(module, exports) {
1501
1502
 
1502
1503
  module.exports = require("@splunk/visualization-icons");
1503
1504
 
1504
1505
  /***/ }),
1505
- /* 52 */,
1506
1506
  /* 53 */,
1507
1507
  /* 54 */,
1508
1508
  /* 55 */,
@@ -1517,13 +1517,32 @@ module.exports = require("@splunk/visualization-color-palettes/editors/PresetPal
1517
1517
 
1518
1518
  /***/ }),
1519
1519
  /* 61 */,
1520
- /* 62 */,
1520
+ /* 62 */
1521
+ /***/ (function(module, exports) {
1522
+
1523
+ module.exports = require("@babel/runtime/helpers/getPrototypeOf");
1524
+
1525
+ /***/ }),
1521
1526
  /* 63 */,
1522
1527
  /* 64 */,
1523
1528
  /* 65 */,
1524
1529
  /* 66 */,
1525
1530
  /* 67 */,
1526
- /* 68 */
1531
+ /* 68 */,
1532
+ /* 69 */,
1533
+ /* 70 */
1534
+ /***/ (function(module, exports) {
1535
+
1536
+ module.exports = require("@babel/runtime/helpers/inherits");
1537
+
1538
+ /***/ }),
1539
+ /* 71 */
1540
+ /***/ (function(module, exports) {
1541
+
1542
+ module.exports = require("@babel/runtime/helpers/possibleConstructorReturn");
1543
+
1544
+ /***/ }),
1545
+ /* 72 */
1527
1546
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1528
1547
 
1529
1548
  "use strict";
@@ -1534,7 +1553,8 @@ __webpack_require__.r(__webpack_exports__);
1534
1553
  var VizStyleWrapper = styled_components__WEBPACK_IMPORTED_MODULE_0___default.a.div.attrs(function (_ref) {
1535
1554
  var dataTestKey = _ref.dataTestKey;
1536
1555
  return {
1537
- 'data-test': dataTestKey
1556
+ 'data-test': dataTestKey,
1557
+ 'data-testid': dataTestKey
1538
1558
  };
1539
1559
  }).withConfig({
1540
1560
  displayName: "VizStyleWrapper",
@@ -1546,10 +1566,6 @@ VizStyleWrapper.displayName = 'VizStyleWrapper';
1546
1566
  /* harmony default export */ __webpack_exports__["default"] = (VizStyleWrapper);
1547
1567
 
1548
1568
  /***/ }),
1549
- /* 69 */,
1550
- /* 70 */,
1551
- /* 71 */,
1552
- /* 72 */,
1553
1569
  /* 73 */,
1554
1570
  /* 74 */,
1555
1571
  /* 75 */,
@@ -1561,14 +1577,19 @@ VizStyleWrapper.displayName = 'VizStyleWrapper';
1561
1577
  /* 81 */,
1562
1578
  /* 82 */,
1563
1579
  /* 83 */,
1564
- /* 84 */
1580
+ /* 84 */,
1581
+ /* 85 */,
1582
+ /* 86 */,
1583
+ /* 87 */,
1584
+ /* 88 */,
1585
+ /* 89 */
1565
1586
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1566
1587
 
1567
1588
  "use strict";
1568
1589
  __webpack_require__.r(__webpack_exports__);
1569
1590
  /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
1570
1591
  /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
1571
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
1592
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22);
1572
1593
  /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
1573
1594
 
1574
1595
 
@@ -1584,11 +1605,6 @@ var StaticBackgroundColorEditor = {
1584
1605
  /* harmony default export */ __webpack_exports__["default"] = (StaticBackgroundColorEditor);
1585
1606
 
1586
1607
  /***/ }),
1587
- /* 85 */,
1588
- /* 86 */,
1589
- /* 87 */,
1590
- /* 88 */,
1591
- /* 89 */,
1592
1608
  /* 90 */,
1593
1609
  /* 91 */,
1594
1610
  /* 92 */,
@@ -1608,24 +1624,9 @@ var StaticBackgroundColorEditor = {
1608
1624
  /* 106 */,
1609
1625
  /* 107 */,
1610
1626
  /* 108 */,
1611
- /* 109 */
1612
- /***/ (function(module, exports) {
1613
-
1614
- module.exports = require("@babel/runtime/helpers/inherits");
1615
-
1616
- /***/ }),
1617
- /* 110 */
1618
- /***/ (function(module, exports) {
1619
-
1620
- module.exports = require("@babel/runtime/helpers/possibleConstructorReturn");
1621
-
1622
- /***/ }),
1623
- /* 111 */
1624
- /***/ (function(module, exports) {
1625
-
1626
- module.exports = require("@babel/runtime/helpers/getPrototypeOf");
1627
-
1628
- /***/ }),
1627
+ /* 109 */,
1628
+ /* 110 */,
1629
+ /* 111 */,
1629
1630
  /* 112 */,
1630
1631
  /* 113 */,
1631
1632
  /* 114 */,
@@ -1657,25 +1658,26 @@ module.exports = require("@babel/runtime/helpers/getPrototypeOf");
1657
1658
  /* 140 */,
1658
1659
  /* 141 */,
1659
1660
  /* 142 */,
1660
- /* 143 */
1661
+ /* 143 */,
1662
+ /* 144 */
1661
1663
  /***/ (function(module, exports, __webpack_require__) {
1662
1664
 
1663
1665
  "use strict";
1664
1666
 
1665
1667
 
1666
- var _classCallCheck = __webpack_require__(11);
1667
- var _createClass = __webpack_require__(22);
1668
- var _inherits = __webpack_require__(109);
1669
- var _possibleConstructorReturn = __webpack_require__(110);
1670
- var _getPrototypeOf = __webpack_require__(111);
1668
+ var _classCallCheck = __webpack_require__(9);
1669
+ var _createClass = __webpack_require__(18);
1670
+ var _inherits = __webpack_require__(70);
1671
+ var _possibleConstructorReturn = __webpack_require__(71);
1672
+ var _getPrototypeOf = __webpack_require__(62);
1671
1673
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
1672
1674
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
1673
1675
  Object.defineProperty(exports, "__esModule", {
1674
1676
  value: true
1675
1677
  });
1676
- var React = __webpack_require__(0);
1678
+ var React = __webpack_require__(1);
1677
1679
  var lodash_1 = __webpack_require__(3);
1678
- var SvgMutator_1 = __webpack_require__(186);
1680
+ var SvgMutator_1 = __webpack_require__(187);
1679
1681
  /**
1680
1682
  * This react component simply take an SVG document, and mutates it by applying data to the document according to
1681
1683
  * dataBindings. The data (data prop) is processed by performing the mutation once for each 'row' of the data even though the data is formatted as columns.
@@ -1784,7 +1786,6 @@ SvgChoroplethDynamic.defaultProps = {
1784
1786
  };
1785
1787
 
1786
1788
  /***/ }),
1787
- /* 144 */,
1788
1789
  /* 145 */,
1789
1790
  /* 146 */,
1790
1791
  /* 147 */,
@@ -1821,7 +1822,8 @@ SvgChoroplethDynamic.defaultProps = {
1821
1822
  /* 178 */,
1822
1823
  /* 179 */,
1823
1824
  /* 180 */,
1824
- /* 181 */
1825
+ /* 181 */,
1826
+ /* 182 */
1825
1827
  /***/ (function(module, exports, __webpack_require__) {
1826
1828
 
1827
1829
  "use strict";
@@ -1841,18 +1843,20 @@ Object.defineProperty(exports, "__esModule", {
1841
1843
  value: true
1842
1844
  });
1843
1845
  exports.useIconPlaceholder = exports.createProtocolHandlers = exports.PureSvgChoroplethDynamic = exports.PureChoroplethSvg = exports.config = void 0;
1844
- var React = __webpack_require__(0);
1845
- var T = __webpack_require__(1);
1846
+ var React = __webpack_require__(1);
1847
+ var T = __webpack_require__(0);
1846
1848
  var lodash_1 = __webpack_require__(3);
1847
- var FeatureFlagContext_1 = __webpack_require__(20);
1848
- var ImageContext_1 = __webpack_require__(182);
1849
- var FileDownloader_1 = __webpack_require__(183);
1850
- var Downloader_1 = __webpack_require__(184);
1849
+ var FeatureFlagContext_1 = __webpack_require__(21);
1850
+ var ImageContext_1 = __webpack_require__(183);
1851
+ var FileDownloader_1 = __webpack_require__(184);
1852
+ var Downloader_1 = __webpack_require__(185);
1851
1853
  var withDashboardViz_1 = __webpack_require__(36);
1852
- var PureChoroplethSvg_1 = __webpack_require__(185);
1853
- var SvgChoroplethDynamic_1 = __webpack_require__(143);
1854
- var config_1 = __webpack_require__(190);
1854
+ var PureChoroplethSvg_1 = __webpack_require__(186);
1855
+ var SvgChoroplethDynamic_1 = __webpack_require__(144);
1856
+ var config_1 = __webpack_require__(191);
1855
1857
  var IconPlaceholder_1 = __webpack_require__(31);
1858
+ var urlUtils_1 = __webpack_require__(192);
1859
+ var ErrorMessage_1 = __webpack_require__(193);
1856
1860
  exports.config = config_1.default;
1857
1861
  exports.PureChoroplethSvg = PureChoroplethSvg_1.default;
1858
1862
  // todo: need remove when deleting @splunk/react-visualizations package
@@ -1887,18 +1891,37 @@ var createProtocolHandlers = function createProtocolHandlers() {
1887
1891
  exports.createProtocolHandlers = createProtocolHandlers;
1888
1892
  var ChoroplethSvg = function ChoroplethSvg(_a) {
1889
1893
  var props = __rest(_a, []);
1890
- var svg = props.svg; // note that the FileDownloader will just immediately pass through literal (non-url) content in the case that
1894
+ var svg = props.svg;
1895
+ var url = React.useMemo(function () {
1896
+ if (!svg) {
1897
+ return svg;
1898
+ }
1899
+ var trimmed = svg.trim();
1900
+ if (urlUtils_1.isValidUrl(trimmed)) {
1901
+ return trimmed;
1902
+ }
1903
+ if (/.*<svg.*/i.test(trimmed)) {
1904
+ return trimmed;
1905
+ }
1906
+ return "".concat(window.location.origin, "/").concat(trimmed);
1907
+ }, [svg]);
1908
+ // note that the FileDownloader will just immediately pass through literal (non-url) content in the case that
1891
1909
  // the svg argument is not a url.
1892
1910
  return React.createElement(ImageContext_1.default.Consumer, null, function (imageContext) {
1893
1911
  return React.createElement(FeatureFlagContext_1.default.Consumer, null, function (featureFlagContext) {
1894
1912
  return React.createElement(FileDownloader_1.FileDownloader, {
1895
- url: svg,
1913
+ url: url,
1896
1914
  protocolHandlers: exports.createProtocolHandlers(featureFlagContext, imageContext),
1897
1915
  renderContent: function renderContent(svgString) {
1898
1916
  var pureVizProps = Object.assign(Object.assign({}, props), {
1899
1917
  svg: svgString
1900
1918
  });
1901
1919
  return React.createElement(exports.PureChoroplethSvg, Object.assign({}, pureVizProps));
1920
+ },
1921
+ renderError: function renderError(error) {
1922
+ return React.createElement(ErrorMessage_1.default, {
1923
+ error: error
1924
+ });
1902
1925
  }
1903
1926
  });
1904
1927
  });
@@ -1923,25 +1946,25 @@ var platformViz = withDashboardViz_1.default({
1923
1946
  exports.default = platformViz;
1924
1947
 
1925
1948
  /***/ }),
1926
- /* 182 */
1949
+ /* 183 */
1927
1950
  /***/ (function(module, exports) {
1928
1951
 
1929
1952
  module.exports = require("@splunk/visualization-context/ImageContext");
1930
1953
 
1931
1954
  /***/ }),
1932
- /* 183 */
1955
+ /* 184 */
1933
1956
  /***/ (function(module, exports) {
1934
1957
 
1935
1958
  module.exports = require("@splunk/visualizations-shared/FileDownloader");
1936
1959
 
1937
1960
  /***/ }),
1938
- /* 184 */
1961
+ /* 185 */
1939
1962
  /***/ (function(module, exports) {
1940
1963
 
1941
1964
  module.exports = require("@splunk/visualizations-shared/Downloader");
1942
1965
 
1943
1966
  /***/ }),
1944
- /* 185 */
1967
+ /* 186 */
1945
1968
  /***/ (function(module, exports, __webpack_require__) {
1946
1969
 
1947
1970
  "use strict";
@@ -1961,13 +1984,13 @@ Object.defineProperty(exports, "__esModule", {
1961
1984
  value: true
1962
1985
  });
1963
1986
  exports.computeSvgDynamicProps = void 0;
1964
- var React = __webpack_require__(0);
1987
+ var React = __webpack_require__(1);
1965
1988
  var styled_components_1 = __webpack_require__(4);
1966
1989
  var lodash_1 = __webpack_require__(3);
1967
1990
  var style_1 = __webpack_require__(14);
1968
- var SizeAwareWrapper_1 = __webpack_require__(18);
1969
- var SvgChoroplethDynamic_1 = __webpack_require__(143);
1970
- var VizStyleWrapper_1 = __webpack_require__(68);
1991
+ var SizeAwareWrapper_1 = __webpack_require__(19);
1992
+ var SvgChoroplethDynamic_1 = __webpack_require__(144);
1993
+ var VizStyleWrapper_1 = __webpack_require__(72);
1971
1994
  var Container = styled_components_1.default.div.withConfig({
1972
1995
  displayName: "PureChoroplethSvg__Container",
1973
1996
  componentId: "m24jrf-0"
@@ -2028,23 +2051,23 @@ PureChoroplethSvg.defaultProps = {
2028
2051
  exports.default = styled_components_1.withTheme(PureChoroplethSvg);
2029
2052
 
2030
2053
  /***/ }),
2031
- /* 186 */
2054
+ /* 187 */
2032
2055
  /***/ (function(module, exports, __webpack_require__) {
2033
2056
 
2034
2057
  "use strict";
2035
2058
 
2036
2059
 
2037
- var _classCallCheck = __webpack_require__(11);
2038
- var _createClass = __webpack_require__(22);
2060
+ var _classCallCheck = __webpack_require__(9);
2061
+ var _createClass = __webpack_require__(18);
2039
2062
  Object.defineProperty(exports, "__esModule", {
2040
2063
  value: true
2041
2064
  });
2042
2065
  exports.SvgMutator = exports.ERROR_NON_ATTRIBUTE_MUTATION = void 0;
2043
2066
  /* eslint-disable no-param-reassign */
2044
- var React = __webpack_require__(0);
2045
- var XPath = __webpack_require__(187);
2046
- var xmldom_1 = __webpack_require__(188);
2047
- var jexl = __webpack_require__(189);
2067
+ var React = __webpack_require__(1);
2068
+ var XPath = __webpack_require__(188);
2069
+ var xmldom_1 = __webpack_require__(189);
2070
+ var jexl = __webpack_require__(190);
2048
2071
  /**
2049
2072
  * An error message indicating that a mutation has attempted to target anything other than SVG attribute(s)
2050
2073
  * @type {string}
@@ -2406,25 +2429,25 @@ exports.SvgMutator = SvgMutator;
2406
2429
  SvgMutator.serializer = new xmldom_1.XMLSerializer();
2407
2430
 
2408
2431
  /***/ }),
2409
- /* 187 */
2432
+ /* 188 */
2410
2433
  /***/ (function(module, exports) {
2411
2434
 
2412
2435
  module.exports = require("xpath");
2413
2436
 
2414
2437
  /***/ }),
2415
- /* 188 */
2438
+ /* 189 */
2416
2439
  /***/ (function(module, exports) {
2417
2440
 
2418
2441
  module.exports = require("@xmldom/xmldom");
2419
2442
 
2420
2443
  /***/ }),
2421
- /* 189 */
2444
+ /* 190 */
2422
2445
  /***/ (function(module, exports) {
2423
2446
 
2424
2447
  module.exports = require("jexl");
2425
2448
 
2426
2449
  /***/ }),
2427
- /* 190 */
2450
+ /* 191 */
2428
2451
  /***/ (function(module, exports, __webpack_require__) {
2429
2452
 
2430
2453
  "use strict";
@@ -2435,15 +2458,15 @@ Object.defineProperty(exports, "__esModule", {
2435
2458
  });
2436
2459
  var i18n_1 = __webpack_require__(2);
2437
2460
  var pick_1 = __webpack_require__(23);
2438
- var variables_1 = __webpack_require__(10);
2461
+ var variables_1 = __webpack_require__(11);
2439
2462
  var schemaUtils_1 = __webpack_require__(16);
2440
2463
  var PresetPalettes_1 = __webpack_require__(60);
2441
- var visualization_icons_1 = __webpack_require__(51);
2442
- var placeholders_1 = __webpack_require__(48);
2464
+ var visualization_icons_1 = __webpack_require__(52);
2465
+ var placeholders_1 = __webpack_require__(49);
2443
2466
  var VizBehavior_1 = __webpack_require__(6);
2444
- var configUtils_1 = __webpack_require__(19);
2467
+ var configUtils_1 = __webpack_require__(20);
2445
2468
  var VizCategory_1 = __webpack_require__(35);
2446
- var StaticBackgroundColorEditor_1 = __webpack_require__(84);
2469
+ var StaticBackgroundColorEditor_1 = __webpack_require__(89);
2447
2470
  var dataContract = {
2448
2471
  requiredDataSources: [],
2449
2472
  optionalDataSources: [{
@@ -2638,6 +2661,67 @@ var config = {
2638
2661
  };
2639
2662
  exports.default = configUtils_1.enhanceConfig(config);
2640
2663
 
2664
+ /***/ }),
2665
+ /* 192 */
2666
+ /***/ (function(module, exports, __webpack_require__) {
2667
+
2668
+ "use strict";
2669
+
2670
+
2671
+ Object.defineProperty(exports, "__esModule", {
2672
+ value: true
2673
+ });
2674
+ exports.isValidUrl = void 0;
2675
+ var isValidUrl = function isValidUrl(value) {
2676
+ try {
2677
+ var url = new URL(value);
2678
+ return !!url.protocol;
2679
+ } catch (err) {
2680
+ return false;
2681
+ }
2682
+ };
2683
+ exports.isValidUrl = isValidUrl;
2684
+
2685
+ /***/ }),
2686
+ /* 193 */
2687
+ /***/ (function(module, exports, __webpack_require__) {
2688
+
2689
+ "use strict";
2690
+
2691
+
2692
+ var __rest = this && this.__rest || function (s, e) {
2693
+ var t = {};
2694
+ for (var p in s) {
2695
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
2696
+ }
2697
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2698
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
2699
+ }
2700
+ return t;
2701
+ };
2702
+ Object.defineProperty(exports, "__esModule", {
2703
+ value: true
2704
+ });
2705
+ var React = __webpack_require__(1);
2706
+ var styled_components_1 = __webpack_require__(4);
2707
+ var visualization_icons_1 = __webpack_require__(52);
2708
+ var Container = styled_components_1.default.div.withConfig({
2709
+ displayName: "ErrorMessage__Container",
2710
+ componentId: "sc-190iqnz-0"
2711
+ })(["height:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:16px;gap:8px;color:#808080;> svg{width:24px;height:24px;}"]);
2712
+ var Message = styled_components_1.default.div.withConfig({
2713
+ displayName: "ErrorMessage__Message",
2714
+ componentId: "sc-190iqnz-1"
2715
+ })(["width:100%;word-break:break-all;"]);
2716
+ var ErrorMessage = function ErrorMessage(_a) {
2717
+ var props = __rest(_a, []);
2718
+ var error = props.error;
2719
+ return React.createElement(Container, null, React.createElement(visualization_icons_1.Image, {
2720
+ "data-testid": "image-icon"
2721
+ }), React.createElement(Message, null, error));
2722
+ };
2723
+ exports.default = styled_components_1.withTheme(ErrorMessage);
2724
+
2641
2725
  /***/ })
2642
2726
  /******/ ]);
2643
2727
  //# sourceMappingURL=ChoroplethSvg.js.map