@splunk/visualizations 26.3.0 → 26.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.
Files changed (104) hide show
  1. package/Area.config.js +1 -1
  2. package/Area.config.js.map +1 -1
  3. package/Area.js +288 -288
  4. package/Area.js.map +1 -1
  5. package/Bar.config.js +1 -1
  6. package/Bar.config.js.map +1 -1
  7. package/Bar.js +291 -291
  8. package/Bar.js.map +1 -1
  9. package/Bubble.config.js +1 -1
  10. package/Bubble.config.js.map +1 -1
  11. package/Bubble.js +280 -280
  12. package/Bubble.js.map +1 -1
  13. package/ChoroplethSvg.config.js +1 -1
  14. package/ChoroplethSvg.config.js.map +1 -1
  15. package/ChoroplethSvg.js +262 -260
  16. package/ChoroplethSvg.js.map +1 -1
  17. package/Column.config.js +1 -1
  18. package/Column.config.js.map +1 -1
  19. package/Column.js +291 -291
  20. package/Column.js.map +1 -1
  21. package/Ellipse.js +220 -218
  22. package/Ellipse.js.map +1 -1
  23. package/Events.config.js +1 -1
  24. package/Events.config.js.map +1 -1
  25. package/Events.js +285 -283
  26. package/Events.js.map +1 -1
  27. package/FillerGauge.config.js +1 -1
  28. package/FillerGauge.config.js.map +1 -1
  29. package/FillerGauge.js +250 -248
  30. package/FillerGauge.js.map +1 -1
  31. package/Image.js +212 -210
  32. package/Image.js.map +1 -1
  33. package/Line.config.js +1 -1
  34. package/Line.config.js.map +1 -1
  35. package/Line.js +289 -289
  36. package/Line.js.map +1 -1
  37. package/LinkGraph.config.js +1 -1
  38. package/LinkGraph.config.js.map +1 -1
  39. package/LinkGraph.js +1725 -17201
  40. package/LinkGraph.js.map +1 -1
  41. package/MIGRATION.md +6 -0
  42. package/Map.config.js +1 -1
  43. package/Map.config.js.map +1 -1
  44. package/Map.js +465 -406
  45. package/Map.js.map +1 -1
  46. package/Markdown.config.js +1 -1
  47. package/Markdown.config.js.map +1 -1
  48. package/Markdown.js +281 -277
  49. package/Markdown.js.map +1 -1
  50. package/MarkerGauge.config.js +1 -1
  51. package/MarkerGauge.config.js.map +1 -1
  52. package/MarkerGauge.js +926 -922
  53. package/MarkerGauge.js.map +1 -1
  54. package/ParallelCoordinates.config.js +1 -1
  55. package/ParallelCoordinates.config.js.map +1 -1
  56. package/ParallelCoordinates.js +336 -320
  57. package/ParallelCoordinates.js.map +1 -1
  58. package/Pie.config.js +5 -1
  59. package/Pie.config.js.map +1 -1
  60. package/Pie.js +362 -330
  61. package/Pie.js.map +1 -1
  62. package/Punchcard.config.js +1 -1
  63. package/Punchcard.config.js.map +1 -1
  64. package/Punchcard.js +342 -338
  65. package/Punchcard.js.map +1 -1
  66. package/Rectangle.js +260 -256
  67. package/Rectangle.js.map +1 -1
  68. package/Sankey.config.js +1 -1
  69. package/Sankey.config.js.map +1 -1
  70. package/Sankey.js +339 -335
  71. package/Sankey.js.map +1 -1
  72. package/Scatter.config.js +1 -1
  73. package/Scatter.config.js.map +1 -1
  74. package/Scatter.js +339 -337
  75. package/Scatter.js.map +1 -1
  76. package/SingleValue.config.js +10 -2
  77. package/SingleValue.config.js.map +1 -1
  78. package/SingleValue.js +455 -427
  79. package/SingleValue.js.map +1 -1
  80. package/SingleValueBasic.js +65 -53
  81. package/SingleValueBasic.js.map +1 -1
  82. package/SingleValueIcon.config.js +10 -2
  83. package/SingleValueIcon.config.js.map +1 -1
  84. package/SingleValueIcon.js +449 -421
  85. package/SingleValueIcon.js.map +1 -1
  86. package/SingleValueRadial.config.js +11 -3
  87. package/SingleValueRadial.config.js.map +1 -1
  88. package/SingleValueRadial.js +1580 -1552
  89. package/SingleValueRadial.js.map +1 -1
  90. package/SparkLine.js +33 -33
  91. package/SparkLine.js.map +1 -1
  92. package/Table.config.js +8 -0
  93. package/Table.config.js.map +1 -1
  94. package/Table.js +366 -357
  95. package/Table.js.map +1 -1
  96. package/common/Charting.js +15 -23
  97. package/common/Charting.js.map +1 -1
  98. package/common/utils/dataUtils.js +12 -18
  99. package/common/utils/dataUtils.js.map +1 -1
  100. package/common/utils/singleValueUtils.js +23 -11
  101. package/common/utils/singleValueUtils.js.map +1 -1
  102. package/common/withDashboardViz.js +31 -27
  103. package/common/withDashboardViz.js.map +1 -1
  104. package/package.json +17 -16
package/Map.js CHANGED
@@ -87,7 +87,7 @@ module.exports =
87
87
  /******/
88
88
  /******/
89
89
  /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 428);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 420);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
@@ -95,25 +95,25 @@ module.exports =
95
95
  /***/ 0:
96
96
  /***/ (function(module, exports) {
97
97
 
98
- module.exports = require("react");
98
+ module.exports = require("prop-types");
99
99
 
100
100
  /***/ }),
101
101
 
102
102
  /***/ 1:
103
103
  /***/ (function(module, exports) {
104
104
 
105
- module.exports = require("prop-types");
105
+ module.exports = require("react");
106
106
 
107
107
  /***/ }),
108
108
 
109
109
  /***/ 10:
110
110
  /***/ (function(module, exports) {
111
111
 
112
- module.exports = require("@splunk/visualization-schemas");
112
+ module.exports = require("@splunk/visualizations-shared/numberUtils");
113
113
 
114
114
  /***/ }),
115
115
 
116
- /***/ 104:
116
+ /***/ 103:
117
117
  /***/ (function(module, exports) {
118
118
 
119
119
  module.exports = require("@splunk/visualization-encoding/utils/types");
@@ -123,47 +123,54 @@ module.exports = require("@splunk/visualization-encoding/utils/types");
123
123
  /***/ 11:
124
124
  /***/ (function(module, exports) {
125
125
 
126
- module.exports = require("@splunk/visualizations-shared/numberUtils");
126
+ module.exports = require("@splunk/visualizations-shared/Message");
127
127
 
128
128
  /***/ }),
129
129
 
130
- /***/ 113:
130
+ /***/ 112:
131
131
  /***/ (function(module, exports) {
132
132
 
133
133
  module.exports = require("d3-scale");
134
134
 
135
135
  /***/ }),
136
136
 
137
+ /***/ 117:
138
+ /***/ (function(module, exports) {
139
+
140
+ module.exports = require("@splunk/react-ui/Button");
141
+
142
+ /***/ }),
143
+
137
144
  /***/ 119:
138
145
  /***/ (function(module, exports, __webpack_require__) {
139
146
 
140
147
  "use strict";
141
148
 
142
149
 
143
- var _defineProperty = __webpack_require__(13);
150
+ var _defineProperty = __webpack_require__(12);
144
151
 
145
- var _slicedToArray = __webpack_require__(6);
152
+ var _slicedToArray = __webpack_require__(5);
146
153
 
147
- var _toConsumableArray = __webpack_require__(7);
154
+ var _toConsumableArray = __webpack_require__(6);
148
155
 
149
156
  Object.defineProperty(exports, "__esModule", {
150
157
  value: true
151
158
  });
152
159
  exports.formatMetadata = exports.compareBaseStyles = exports.getScaledOpacities = exports.getGlobalLayerBoundaries = exports.isValidLatLon = exports.bakeBubbleData = exports.sanitizeValues = exports.transposeArray = exports.matchBubbleSize = exports.getStaticColors = exports.getZoomLevelFromGeobin = exports.getZoomConstraintsFromTileConfig = exports.getMapStyle = exports.getTilePreset = exports.DEFAULT_OPACITY = exports.MAX_BUBBLE_RADIUS = exports.MIN_BUBBLE_RADIUS = exports.MAP_STYLE_VERSION_NUMBER = exports.DEFAULT_SERIES_COLORS = exports.DEFAULT_CLUSTER_COLOR = exports.DEFAULT_RESULT_LIMIT = exports.MIN_LONGITUDE = exports.MAX_LONGITUDE = exports.MIN_LATITUDE = exports.MAX_LATITUDE = void 0;
153
160
 
154
- var lodash_1 = __webpack_require__(3);
161
+ var lodash_1 = __webpack_require__(2);
155
162
 
156
- var d3_scale_1 = __webpack_require__(113);
163
+ var d3_scale_1 = __webpack_require__(112);
157
164
 
158
- var chroma = __webpack_require__(178);
165
+ var chroma = __webpack_require__(176);
159
166
 
160
- var colorUtils_1 = __webpack_require__(16);
167
+ var colorUtils_1 = __webpack_require__(15);
161
168
 
162
- var visualization_color_palettes_1 = __webpack_require__(75);
169
+ var visualization_color_palettes_1 = __webpack_require__(74);
163
170
 
164
- var types_1 = __webpack_require__(104);
171
+ var types_1 = __webpack_require__(103);
165
172
 
166
- var visualization_schemas_1 = __webpack_require__(10);
173
+ var visualization_schemas_1 = __webpack_require__(9);
167
174
 
168
175
  exports.MAX_LATITUDE = 90;
169
176
  exports.MIN_LATITUDE = -90;
@@ -699,25 +706,18 @@ exports.formatMetadata = formatMetadata;
699
706
  /***/ 12:
700
707
  /***/ (function(module, exports) {
701
708
 
702
- module.exports = require("@splunk/visualizations-shared/Message");
703
-
704
- /***/ }),
705
-
706
- /***/ 13:
707
- /***/ (function(module, exports) {
708
-
709
709
  module.exports = require("@babel/runtime/helpers/defineProperty");
710
710
 
711
711
  /***/ }),
712
712
 
713
- /***/ 14:
713
+ /***/ 13:
714
714
  /***/ (function(module, exports) {
715
715
 
716
716
  module.exports = require("@splunk/themes/variables");
717
717
 
718
718
  /***/ }),
719
719
 
720
- /***/ 15:
720
+ /***/ 14:
721
721
  /***/ (function(module, exports, __webpack_require__) {
722
722
 
723
723
  "use strict";
@@ -728,9 +728,9 @@ Object.defineProperty(exports, "__esModule", {
728
728
  });
729
729
  exports.downsampleDataSources = exports.calculateDownsamplingThreshold = exports.calculateThresholdOnRangeSelect = exports.isDownsamplingEnabledForViz = exports.convertToArrOfObjects = void 0;
730
730
 
731
- var numberUtils_1 = __webpack_require__(11);
731
+ var numberUtils_1 = __webpack_require__(10);
732
732
 
733
- var interfaces_1 = __webpack_require__(40); // TODO: utilize this fn in ParallelCoordinates
733
+ var interfaces_1 = __webpack_require__(39); // TODO: utilize this fn in ParallelCoordinates
734
734
 
735
735
 
736
736
  var convertToArrOfObjects = function convertToArrOfObjects(columns, fields) {
@@ -865,19 +865,21 @@ var largestTriangleThreeBuckets = function largestTriangleThreeBuckets(data, thr
865
865
  */
866
866
 
867
867
 
868
- var strictlyCoerceYColumn = function strictlyCoerceYColumn(column) {
869
- // Splunk charting allows for numbers in formats such as negative hex that
868
+ var strictlyCoerceYColumn = function strictlyCoerceYColumn(column, options) {
869
+ var isNullCoercionEnabled = options.nullValueDisplay === 'zero'; // Splunk charting allows for numbers in formats such as negative hex that
870
870
  // Number() does not support and also allows loose coercion of hex numbers (but not other formats)
871
871
  // We want to identify columns which contain at least one value that can be loosely coerced
872
+
872
873
  var canLooselyCoerceSomeValues = column.findIndex(function (value) {
873
- return (0, numberUtils_1.startsWithNumber)("".concat(value));
874
+ return (0, numberUtils_1.startsWithNumber)("".concat(value)) || isNullCoercionEnabled && value === null;
874
875
  }) >= 0; // If not all values in column can be strictly coerced to a number, we do not downsample
875
876
 
876
877
  var coercedColumn = [];
877
878
  var canDownsampleColumn = !column.some(function (value) {
878
- var coercedValue = Number(value); // if it can't be parsed or isn't safe, fail
879
+ var coercedValue = Number(value);
880
+ var coerceValueToZero = isNullCoercionEnabled && value === null; // if it can't be parsed or isn't safe, fail
879
881
 
880
- if (Number.isNaN(coercedValue) || coercedValue <= Number.MIN_SAFE_INTEGER || coercedValue >= Number.MAX_SAFE_INTEGER || typeof value !== 'string' && typeof value !== 'number') {
882
+ if (Number.isNaN(coercedValue) || coercedValue <= Number.MIN_SAFE_INTEGER || coercedValue >= Number.MAX_SAFE_INTEGER || typeof value !== 'string' && typeof value !== 'number' && !coerceValueToZero) {
881
883
  return true;
882
884
  } // save value and continue to next
883
885
 
@@ -958,8 +960,7 @@ var calculateDownsamplingThreshold = function calculateDownsamplingThreshold(_re
958
960
  dataSources = _ref3.dataSources,
959
961
  selectChartEvent = _ref3.selectChartEvent,
960
962
  width = _ref3.width,
961
- xField = _ref3.xField,
962
- y2Fields = _ref3.y2Fields;
963
+ xField = _ref3.xField;
963
964
 
964
965
  var _a, _b, _c;
965
966
 
@@ -996,14 +997,7 @@ var calculateDownsamplingThreshold = function calculateDownsamplingThreshold(_re
996
997
  });
997
998
  var lastIndex = fullSeries.findIndex(function (x) {
998
999
  return downsampledSeries[endXIndex] === x;
999
- }); // For charts with categorical x-axis (charts with an xField that isn't _time), do not support
1000
- // re-calculating downsampling threshold if the chart is zoomed in until SPL-259458 is fixed
1001
- // Also do not support re-calculating downsampling threshold for zoomed-in charts with y2
1002
- // until SPL-259611 is fixed
1003
-
1004
- if (xField !== '_time' || (y2Fields === null || y2Fields === void 0 ? void 0 : y2Fields.length)) {
1005
- return firstIndex === 0 && lastIndex === fullSeries.length - 1 ? width : null;
1006
- }
1000
+ });
1007
1001
 
1008
1002
  if (firstIndex >= 0 && lastIndex >= 0 && firstIndex <= lastIndex) {
1009
1003
  return (0, exports.calculateThresholdOnRangeSelect)({
@@ -1053,7 +1047,7 @@ var isColumnStrictlyIncreasing = function isColumnStrictlyIncreasing(column, fie
1053
1047
  */
1054
1048
 
1055
1049
 
1056
- var tryToCoerceAllDisplayedFields = function tryToCoerceAllDisplayedFields(ds, xField, yFields, fieldTypes) {
1050
+ var tryToCoerceAllDisplayedFields = function tryToCoerceAllDisplayedFields(ds, xField, yFields, fieldTypes, options) {
1057
1051
  var xColumn = [];
1058
1052
  var yColumns = [];
1059
1053
  var canDownsample = !ds.data.fields.some(function (field, index) {
@@ -1067,7 +1061,7 @@ var tryToCoerceAllDisplayedFields = function tryToCoerceAllDisplayedFields(ds, x
1067
1061
  if (fieldName === xField) {
1068
1062
  xColumn = strictlyCoerceXColumn(column, fieldType);
1069
1063
  } else if (yFields.has(fieldName)) {
1070
- var _strictlyCoerceYColum = strictlyCoerceYColumn(ds.data.columns[index]),
1064
+ var _strictlyCoerceYColum = strictlyCoerceYColumn(ds.data.columns[index], options),
1071
1065
  coercedColumn = _strictlyCoerceYColum.coercedColumn,
1072
1066
  canLooselyCoerceSomeValues = _strictlyCoerceYColum.canLooselyCoerceSomeValues,
1073
1067
  canDownsampleColumn = _strictlyCoerceYColum.canDownsampleColumn; // do not perform downsampling if a column can possibly be displayed but cannot
@@ -1157,7 +1151,7 @@ var downsampleDataSources = function downsampleDataSources(_ref4) {
1157
1151
  return dataSources;
1158
1152
  }
1159
1153
 
1160
- var _tryToCoerceAllDispla = tryToCoerceAllDisplayedFields(primaryDS, xField, nonInternalYFields, fieldTypes),
1154
+ var _tryToCoerceAllDispla = tryToCoerceAllDisplayedFields(primaryDS, xField, nonInternalYFields, fieldTypes, options),
1161
1155
  xColumn = _tryToCoerceAllDispla.xColumn,
1162
1156
  yColumns = _tryToCoerceAllDispla.yColumns;
1163
1157
 
@@ -1194,19 +1188,19 @@ exports.downsampleDataSources = downsampleDataSources;
1194
1188
 
1195
1189
  /***/ }),
1196
1190
 
1197
- /***/ 151:
1191
+ /***/ 149:
1198
1192
  /***/ (function(module, exports, __webpack_require__) {
1199
1193
 
1200
1194
  "use strict";
1201
1195
 
1202
1196
 
1203
- var _slicedToArray = __webpack_require__(6);
1197
+ var _slicedToArray = __webpack_require__(5);
1204
1198
 
1205
- var _defineProperty = __webpack_require__(13);
1199
+ var _defineProperty = __webpack_require__(12);
1206
1200
 
1207
- var _toConsumableArray = __webpack_require__(7);
1201
+ var _toConsumableArray = __webpack_require__(6);
1208
1202
 
1209
- var _taggedTemplateLiteral = __webpack_require__(79);
1203
+ var _taggedTemplateLiteral = __webpack_require__(78);
1210
1204
 
1211
1205
  var _templateObject;
1212
1206
 
@@ -1215,17 +1209,17 @@ Object.defineProperty(exports, "__esModule", {
1215
1209
  });
1216
1210
  exports.Bubble = exports.PieSegment = exports.GEO_LAT_AND_LONG_FIELD = exports.GEO_BOUND_PREFIX = void 0;
1217
1211
 
1218
- var React = __webpack_require__(0);
1212
+ var React = __webpack_require__(1);
1219
1213
 
1220
1214
  var styled_components_1 = __webpack_require__(4);
1221
1215
 
1222
- var lodash_1 = __webpack_require__(3);
1216
+ var lodash_1 = __webpack_require__(2);
1223
1217
 
1224
- var colorUtils_1 = __webpack_require__(16);
1218
+ var colorUtils_1 = __webpack_require__(15);
1225
1219
 
1226
1220
  var MapUtils_1 = __webpack_require__(119);
1227
1221
 
1228
- var MarkerWrapper_1 = __webpack_require__(152);
1222
+ var MarkerWrapper_1 = __webpack_require__(150);
1229
1223
 
1230
1224
  exports.GEO_BOUND_PREFIX = '_geo_bounds_';
1231
1225
  exports.GEO_LAT_AND_LONG_FIELD = ['_geo_long_field', '_geo_lat_field'];
@@ -1466,13 +1460,20 @@ exports.default = BubbleLayer;
1466
1460
 
1467
1461
  /***/ }),
1468
1462
 
1469
- /***/ 152:
1463
+ /***/ 15:
1464
+ /***/ (function(module, exports) {
1465
+
1466
+ module.exports = require("@splunk/visualizations-shared/colorUtils");
1467
+
1468
+ /***/ }),
1469
+
1470
+ /***/ 150:
1470
1471
  /***/ (function(module, exports, __webpack_require__) {
1471
1472
 
1472
1473
  "use strict";
1473
1474
 
1474
1475
 
1475
- var _slicedToArray = __webpack_require__(6);
1476
+ var _slicedToArray = __webpack_require__(5);
1476
1477
 
1477
1478
  var __rest = this && this.__rest || function (s, e) {
1478
1479
  var t = {};
@@ -1491,11 +1492,11 @@ Object.defineProperty(exports, "__esModule", {
1491
1492
  value: true
1492
1493
  });
1493
1494
 
1494
- var maplibre_gl_1 = __webpack_require__(179);
1495
+ var maplibre_gl_1 = __webpack_require__(177);
1495
1496
 
1496
- var React = __webpack_require__(0);
1497
+ var React = __webpack_require__(1);
1497
1498
 
1498
- var Tooltip_1 = __webpack_require__(434);
1499
+ var Tooltip_1 = __webpack_require__(426);
1499
1500
 
1500
1501
  var MarkerWrapper = function MarkerWrapper(_a) {
1501
1502
  var longitude = _a.longitude,
@@ -1580,7 +1581,7 @@ exports.default = MarkerWrapper;
1580
1581
 
1581
1582
  /***/ }),
1582
1583
 
1583
- /***/ 153:
1584
+ /***/ 151:
1584
1585
  /***/ (function(module, exports) {
1585
1586
 
1586
1587
  module.exports = require("@splunk/visualization-encoding/utils/dsl");
@@ -1590,52 +1591,31 @@ module.exports = require("@splunk/visualization-encoding/utils/dsl");
1590
1591
  /***/ 16:
1591
1592
  /***/ (function(module, exports) {
1592
1593
 
1593
- module.exports = require("@splunk/visualizations-shared/colorUtils");
1594
-
1595
- /***/ }),
1596
-
1597
- /***/ 17:
1598
- /***/ (function(module, exports) {
1599
-
1600
1594
  module.exports = require("@splunk/visualization-encoding/Options");
1601
1595
 
1602
1596
  /***/ }),
1603
1597
 
1604
- /***/ 178:
1605
- /***/ (function(module, exports) {
1606
-
1607
- module.exports = require("chroma-js");
1608
-
1609
- /***/ }),
1610
-
1611
- /***/ 179:
1612
- /***/ (function(module, exports) {
1613
-
1614
- module.exports = require("maplibre-gl");
1615
-
1616
- /***/ }),
1617
-
1618
- /***/ 18:
1598
+ /***/ 17:
1619
1599
  /***/ (function(module, exports, __webpack_require__) {
1620
1600
 
1621
1601
  "use strict";
1622
1602
 
1623
1603
 
1624
- var _slicedToArray = __webpack_require__(6);
1604
+ var _slicedToArray = __webpack_require__(5);
1625
1605
 
1626
1606
  Object.defineProperty(exports, "__esModule", {
1627
1607
  value: true
1628
1608
  });
1629
1609
 
1630
- var React = __webpack_require__(0);
1610
+ var React = __webpack_require__(1);
1631
1611
 
1632
1612
  var styled_components_1 = __webpack_require__(4);
1633
1613
 
1634
- var style_1 = __webpack_require__(19);
1614
+ var style_1 = __webpack_require__(18);
1635
1615
 
1636
- var colorUtils_1 = __webpack_require__(16);
1616
+ var colorUtils_1 = __webpack_require__(15);
1637
1617
 
1638
- var SizeAwareWrapper_1 = __webpack_require__(26);
1618
+ var SizeAwareWrapper_1 = __webpack_require__(25);
1639
1619
 
1640
1620
  var Item = styled_components_1.default.div.attrs(function (_ref) {
1641
1621
  var width = _ref.width;
@@ -1706,7 +1686,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
1706
1686
 
1707
1687
  return React.createElement(FixSizeItem, {
1708
1688
  "data-test": "fix-size-item",
1709
- "data-splunk-visualization-version": "26.3.0 - a1ef240a6",
1689
+ "data-splunk-visualization-version": "26.4.0 - 04078274d",
1710
1690
  width: width,
1711
1691
  height: height,
1712
1692
  backgroundColor: backgroundColor
@@ -1728,26 +1708,40 @@ exports.default = withFixedSizeContainer;
1728
1708
 
1729
1709
  /***/ }),
1730
1710
 
1731
- /***/ 180:
1711
+ /***/ 176:
1712
+ /***/ (function(module, exports) {
1713
+
1714
+ module.exports = require("chroma-js");
1715
+
1716
+ /***/ }),
1717
+
1718
+ /***/ 177:
1719
+ /***/ (function(module, exports) {
1720
+
1721
+ module.exports = require("maplibre-gl");
1722
+
1723
+ /***/ }),
1724
+
1725
+ /***/ 178:
1732
1726
  /***/ (function(module, exports, __webpack_require__) {
1733
1727
 
1734
1728
  "use strict";
1735
1729
 
1736
1730
 
1737
- var _slicedToArray = __webpack_require__(6);
1731
+ var _slicedToArray = __webpack_require__(5);
1738
1732
 
1739
1733
  Object.defineProperty(exports, "__esModule", {
1740
1734
  value: true
1741
1735
  });
1742
1736
  exports.Choropleth = exports.cleanupChoropleth = exports.compareChoropleth = exports.compareGeom = void 0;
1743
1737
 
1744
- var React = __webpack_require__(0);
1738
+ var React = __webpack_require__(1);
1745
1739
 
1746
- var lodash_1 = __webpack_require__(3);
1740
+ var lodash_1 = __webpack_require__(2);
1747
1741
 
1748
1742
  var MapUtils_1 = __webpack_require__(119);
1749
1743
 
1750
- var MarkerWrapper_1 = __webpack_require__(152);
1744
+ var MarkerWrapper_1 = __webpack_require__(150);
1751
1745
 
1752
1746
  var getShapeId = function getShapeId(id) {
1753
1747
  return "shape-".concat(id);
@@ -2002,7 +1996,7 @@ exports.default = ChoroplethLayer;
2002
1996
 
2003
1997
  /***/ }),
2004
1998
 
2005
- /***/ 19:
1999
+ /***/ 18:
2006
2000
  /***/ (function(module, exports) {
2007
2001
 
2008
2002
  module.exports = require("@splunk/visualizations-shared/style");
@@ -2012,11 +2006,11 @@ module.exports = require("@splunk/visualizations-shared/style");
2012
2006
  /***/ 2:
2013
2007
  /***/ (function(module, exports) {
2014
2008
 
2015
- module.exports = require("@splunk/ui-utils/i18n");
2009
+ module.exports = require("lodash");
2016
2010
 
2017
2011
  /***/ }),
2018
2012
 
2019
- /***/ 21:
2013
+ /***/ 20:
2020
2014
  /***/ (function(module, exports, __webpack_require__) {
2021
2015
 
2022
2016
  "use strict";
@@ -2031,15 +2025,15 @@ exports.validOutputModes = ['json_cols', 'json'];
2031
2025
 
2032
2026
  /***/ }),
2033
2027
 
2034
- /***/ 22:
2028
+ /***/ 21:
2035
2029
  /***/ (function(module, exports, __webpack_require__) {
2036
2030
 
2037
2031
  "use strict";
2038
2032
 
2039
2033
 
2040
- var _classCallCheck = __webpack_require__(9);
2034
+ var _classCallCheck = __webpack_require__(8);
2041
2035
 
2042
- var _createClass = __webpack_require__(25);
2036
+ var _createClass = __webpack_require__(24);
2043
2037
 
2044
2038
  Object.defineProperty(exports, "__esModule", {
2045
2039
  value: true
@@ -2069,7 +2063,7 @@ exports.DefaultVizActionHandler = DefaultVizActionHandler;
2069
2063
 
2070
2064
  /***/ }),
2071
2065
 
2072
- /***/ 23:
2066
+ /***/ 22:
2073
2067
  /***/ (function(module, exports, __webpack_require__) {
2074
2068
 
2075
2069
  "use strict";
@@ -2098,7 +2092,7 @@ var VizCategory;
2098
2092
 
2099
2093
  /***/ }),
2100
2094
 
2101
- /***/ 24:
2095
+ /***/ 23:
2102
2096
  /***/ (function(module, exports, __webpack_require__) {
2103
2097
 
2104
2098
  "use strict";
@@ -2131,37 +2125,37 @@ exports.extendStaticWrapperProps = extendStaticWrapperProps;
2131
2125
 
2132
2126
  /***/ }),
2133
2127
 
2134
- /***/ 25:
2128
+ /***/ 24:
2135
2129
  /***/ (function(module, exports) {
2136
2130
 
2137
2131
  module.exports = require("@babel/runtime/helpers/createClass");
2138
2132
 
2139
2133
  /***/ }),
2140
2134
 
2141
- /***/ 26:
2135
+ /***/ 25:
2142
2136
  /***/ (function(module, exports) {
2143
2137
 
2144
2138
  module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
2145
2139
 
2146
2140
  /***/ }),
2147
2141
 
2148
- /***/ 27:
2142
+ /***/ 26:
2149
2143
  /***/ (function(module, exports, __webpack_require__) {
2150
2144
 
2151
2145
  "use strict";
2152
2146
 
2153
2147
 
2154
- var _toConsumableArray = __webpack_require__(7);
2148
+ var _toConsumableArray = __webpack_require__(6);
2155
2149
 
2156
2150
  Object.defineProperty(exports, "__esModule", {
2157
2151
  value: true
2158
2152
  });
2159
2153
  exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceConfig = exports.enhanceOptionsSchemaWithDynamicOptions = void 0;
2160
2154
 
2161
- var lodash_1 = __webpack_require__(3); // included for backwards compatibility
2155
+ var lodash_1 = __webpack_require__(2); // included for backwards compatibility
2162
2156
 
2163
2157
 
2164
- var visualization_schemas_1 = __webpack_require__(10);
2158
+ var visualization_schemas_1 = __webpack_require__(9);
2165
2159
 
2166
2160
  Object.defineProperty(exports, "enhanceOptionsSchemaWithDynamicOptions", {
2167
2161
  enumerable: true,
@@ -2302,7 +2296,7 @@ exports.insertLayout = insertLayout;
2302
2296
 
2303
2297
  /***/ }),
2304
2298
 
2305
- /***/ 28:
2299
+ /***/ 27:
2306
2300
  /***/ (function(module, exports) {
2307
2301
 
2308
2302
  module.exports = require("@splunk/visualization-context/FeatureFlagContext");
@@ -2312,25 +2306,25 @@ module.exports = require("@splunk/visualization-context/FeatureFlagContext");
2312
2306
  /***/ 3:
2313
2307
  /***/ (function(module, exports) {
2314
2308
 
2315
- module.exports = require("lodash");
2309
+ module.exports = require("@splunk/ui-utils/i18n");
2316
2310
 
2317
2311
  /***/ }),
2318
2312
 
2319
- /***/ 31:
2313
+ /***/ 30:
2320
2314
  /***/ (function(module, exports) {
2321
2315
 
2322
2316
  module.exports = require("@splunk/ui-utils/id");
2323
2317
 
2324
2318
  /***/ }),
2325
2319
 
2326
- /***/ 32:
2320
+ /***/ 31:
2327
2321
  /***/ (function(module, exports) {
2328
2322
 
2329
2323
  module.exports = require("@splunk/visualization-context/TimezoneContext");
2330
2324
 
2331
2325
  /***/ }),
2332
2326
 
2333
- /***/ 33:
2327
+ /***/ 32:
2334
2328
  /***/ (function(module, exports, __webpack_require__) {
2335
2329
 
2336
2330
  "use strict";
@@ -2340,7 +2334,7 @@ Object.defineProperty(exports, "__esModule", {
2340
2334
  value: true
2341
2335
  });
2342
2336
 
2343
- var react_1 = __webpack_require__(0);
2337
+ var react_1 = __webpack_require__(1);
2344
2338
 
2345
2339
  function usePrevious(value) {
2346
2340
  var ref = (0, react_1.useRef)();
@@ -2354,21 +2348,21 @@ exports.default = usePrevious;
2354
2348
 
2355
2349
  /***/ }),
2356
2350
 
2357
- /***/ 34:
2351
+ /***/ 33:
2358
2352
  /***/ (function(module, exports) {
2359
2353
 
2360
2354
  module.exports = require("@splunk/visualizations-shared/hocUtils");
2361
2355
 
2362
2356
  /***/ }),
2363
2357
 
2364
- /***/ 35:
2358
+ /***/ 34:
2365
2359
  /***/ (function(module, exports) {
2366
2360
 
2367
2361
  module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
2368
2362
 
2369
2363
  /***/ }),
2370
2364
 
2371
- /***/ 37:
2365
+ /***/ 36:
2372
2366
  /***/ (function(module, exports, __webpack_require__) {
2373
2367
 
2374
2368
  "use strict";
@@ -2379,17 +2373,17 @@ Object.defineProperty(exports, "__esModule", {
2379
2373
  });
2380
2374
  exports.shouldShowIconPlaceholder = void 0;
2381
2375
 
2382
- var React = __webpack_require__(0);
2376
+ var React = __webpack_require__(1);
2383
2377
 
2384
- var T = __webpack_require__(1);
2378
+ var T = __webpack_require__(0);
2385
2379
 
2386
- var lodash_1 = __webpack_require__(3);
2380
+ var lodash_1 = __webpack_require__(2);
2387
2381
 
2388
- var i18n_1 = __webpack_require__(2);
2382
+ var i18n_1 = __webpack_require__(3);
2389
2383
 
2390
- var Message_1 = __webpack_require__(12);
2384
+ var Message_1 = __webpack_require__(11);
2391
2385
 
2392
- var FixedSizeContainer_1 = __webpack_require__(18);
2386
+ var FixedSizeContainer_1 = __webpack_require__(17);
2393
2387
  /**
2394
2388
  * @method shouldShowIconPlaceholder
2395
2389
  * @param {object} dataSources
@@ -2461,24 +2455,24 @@ exports.default = (0, FixedSizeContainer_1.default)(IconPlaceholder);
2461
2455
 
2462
2456
  /***/ }),
2463
2457
 
2464
- /***/ 38:
2458
+ /***/ 37:
2465
2459
  /***/ (function(module, exports, __webpack_require__) {
2466
2460
 
2467
2461
  "use strict";
2468
2462
 
2469
2463
 
2470
- var _defineProperty = __webpack_require__(13);
2464
+ var _defineProperty = __webpack_require__(12);
2471
2465
 
2472
2466
  Object.defineProperty(exports, "__esModule", {
2473
2467
  value: true
2474
2468
  });
2475
2469
  exports.getSortingParams = exports.SortParamsPropTypes = void 0;
2476
2470
 
2477
- var T = __webpack_require__(1);
2471
+ var T = __webpack_require__(0);
2478
2472
 
2479
- var lodash_1 = __webpack_require__(3);
2473
+ var lodash_1 = __webpack_require__(2);
2480
2474
 
2481
- var DataSource_1 = __webpack_require__(21);
2475
+ var DataSource_1 = __webpack_require__(20);
2482
2476
 
2483
2477
  exports.SortParamsPropTypes = T.shape({
2484
2478
  currentSortKey: T.string,
@@ -2532,7 +2526,7 @@ exports.getSortingParams = getSortingParams;
2532
2526
 
2533
2527
  /***/ }),
2534
2528
 
2535
- /***/ 39:
2529
+ /***/ 38:
2536
2530
  /***/ (function(module, exports, __webpack_require__) {
2537
2531
 
2538
2532
  "use strict";
@@ -2543,9 +2537,9 @@ Object.defineProperty(exports, "__esModule", {
2543
2537
  });
2544
2538
  exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
2545
2539
 
2546
- var T = __webpack_require__(1);
2540
+ var T = __webpack_require__(0);
2547
2541
 
2548
- var lodash_1 = __webpack_require__(3);
2542
+ var lodash_1 = __webpack_require__(2);
2549
2543
 
2550
2544
  exports.PaginatorParamsPropTypes = T.shape({
2551
2545
  isPaging: T.bool,
@@ -2597,14 +2591,7 @@ exports.getPaginationParams = getPaginationParams;
2597
2591
 
2598
2592
  /***/ }),
2599
2593
 
2600
- /***/ 4:
2601
- /***/ (function(module, exports) {
2602
-
2603
- module.exports = require("styled-components");
2604
-
2605
- /***/ }),
2606
-
2607
- /***/ 40:
2594
+ /***/ 39:
2608
2595
  /***/ (function(module, exports, __webpack_require__) {
2609
2596
 
2610
2597
  "use strict";
@@ -2639,11 +2626,13 @@ Object.defineProperty(exports, "__esModule", {
2639
2626
  value: true
2640
2627
  });
2641
2628
 
2629
+ __exportStar(__webpack_require__(40), exports);
2630
+
2642
2631
  __exportStar(__webpack_require__(41), exports);
2643
2632
 
2644
- __exportStar(__webpack_require__(42), exports);
2633
+ __exportStar(__webpack_require__(20), exports);
2645
2634
 
2646
- __exportStar(__webpack_require__(21), exports);
2635
+ __exportStar(__webpack_require__(42), exports);
2647
2636
 
2648
2637
  __exportStar(__webpack_require__(43), exports);
2649
2638
 
@@ -2655,13 +2644,13 @@ __exportStar(__webpack_require__(46), exports);
2655
2644
 
2656
2645
  __exportStar(__webpack_require__(47), exports);
2657
2646
 
2658
- __exportStar(__webpack_require__(48), exports);
2647
+ __exportStar(__webpack_require__(21), exports);
2659
2648
 
2660
- __exportStar(__webpack_require__(22), exports);
2649
+ __exportStar(__webpack_require__(7), exports);
2661
2650
 
2662
- __exportStar(__webpack_require__(8), exports);
2651
+ __exportStar(__webpack_require__(22), exports);
2663
2652
 
2664
- __exportStar(__webpack_require__(23), exports);
2653
+ __exportStar(__webpack_require__(48), exports);
2665
2654
 
2666
2655
  __exportStar(__webpack_require__(49), exports);
2667
2656
 
@@ -2673,11 +2662,16 @@ __exportStar(__webpack_require__(52), exports);
2673
2662
 
2674
2663
  __exportStar(__webpack_require__(53), exports);
2675
2664
 
2676
- __exportStar(__webpack_require__(54), exports);
2665
+ /***/ }),
2666
+
2667
+ /***/ 4:
2668
+ /***/ (function(module, exports) {
2669
+
2670
+ module.exports = require("styled-components");
2677
2671
 
2678
2672
  /***/ }),
2679
2673
 
2680
- /***/ 41:
2674
+ /***/ 40:
2681
2675
  /***/ (function(module, exports, __webpack_require__) {
2682
2676
 
2683
2677
  "use strict";
@@ -2689,7 +2683,7 @@ Object.defineProperty(exports, "__esModule", {
2689
2683
 
2690
2684
  /***/ }),
2691
2685
 
2692
- /***/ 42:
2686
+ /***/ 41:
2693
2687
  /***/ (function(module, exports, __webpack_require__) {
2694
2688
 
2695
2689
  "use strict";
@@ -2704,7 +2698,19 @@ Object.defineProperty(exports, "__esModule", {
2704
2698
 
2705
2699
  /***/ }),
2706
2700
 
2707
- /***/ 428:
2701
+ /***/ 42:
2702
+ /***/ (function(module, exports, __webpack_require__) {
2703
+
2704
+ "use strict";
2705
+
2706
+
2707
+ Object.defineProperty(exports, "__esModule", {
2708
+ value: true
2709
+ });
2710
+
2711
+ /***/ }),
2712
+
2713
+ /***/ 420:
2708
2714
  /***/ (function(module, exports, __webpack_require__) {
2709
2715
 
2710
2716
  "use strict";
@@ -2729,29 +2735,29 @@ Object.defineProperty(exports, "__esModule", {
2729
2735
  exports.PureMap = exports.config = exports.themes = exports.useIconPlaceholder = exports.computeVizProps = void 0;
2730
2736
  /* eslint-disable no-sequences */
2731
2737
 
2732
- var React = __webpack_require__(0);
2738
+ var React = __webpack_require__(1);
2733
2739
 
2734
- var colorUtils_1 = __webpack_require__(16);
2740
+ var colorUtils_1 = __webpack_require__(15);
2735
2741
 
2736
- var hocUtils_1 = __webpack_require__(34);
2742
+ var hocUtils_1 = __webpack_require__(33);
2737
2743
 
2738
- var JSONSchemaUtils_1 = __webpack_require__(35);
2744
+ var JSONSchemaUtils_1 = __webpack_require__(34);
2739
2745
 
2740
- var PureMap_1 = __webpack_require__(429);
2746
+ var PureMap_1 = __webpack_require__(421);
2741
2747
 
2742
2748
  exports.PureMap = PureMap_1.default;
2743
2749
 
2744
- var config_1 = __webpack_require__(439);
2750
+ var config_1 = __webpack_require__(431);
2745
2751
 
2746
2752
  exports.config = config_1.default;
2747
2753
 
2748
- var withDashboardViz_1 = __webpack_require__(55);
2754
+ var withDashboardViz_1 = __webpack_require__(54);
2749
2755
 
2750
- var mapUtils_1 = __webpack_require__(440);
2756
+ var mapUtils_1 = __webpack_require__(432);
2751
2757
 
2752
- var BubbleLayer_1 = __webpack_require__(151);
2758
+ var BubbleLayer_1 = __webpack_require__(149);
2753
2759
 
2754
- var dataUtils_1 = __webpack_require__(15);
2760
+ var dataUtils_1 = __webpack_require__(14);
2755
2761
 
2756
2762
  var formatLayer = function formatLayer(l, dataFields, dataSourceData, transformedData) {
2757
2763
  // add key `geobin` to the layer object if the data is returned from geostats commands
@@ -2971,46 +2977,54 @@ exports.default = Map;
2971
2977
 
2972
2978
  /***/ }),
2973
2979
 
2974
- /***/ 429:
2980
+ /***/ 421:
2975
2981
  /***/ (function(module, exports, __webpack_require__) {
2976
2982
 
2977
2983
  "use strict";
2978
2984
 
2979
2985
 
2980
- var _slicedToArray = __webpack_require__(6);
2986
+ var _slicedToArray = __webpack_require__(5);
2987
+
2988
+ var _taggedTemplateLiteral = __webpack_require__(78);
2989
+
2990
+ var _templateObject;
2981
2991
 
2982
2992
  Object.defineProperty(exports, "__esModule", {
2983
2993
  value: true
2984
2994
  });
2985
2995
  exports.isLatLng = exports.formatColor = exports.DEFAULT_ZOOM = exports.DEFAULT_SHOW_BASELAYER = exports.DEFAULT_SHOW_ZOOM_CONTROLS = exports.DEFAULT_SHOW_SCALE = exports.DEFAULT_SCALE_UNIT = exports.DEFAULT_CONTROL_FOREGROUND_COLOR = exports.DEFAULT_CONTROL_BACKGROUND_COLOR = exports.DEFAULT_CENTER = void 0;
2986
2996
 
2987
- var React = __webpack_require__(0);
2997
+ var React = __webpack_require__(1);
2998
+
2999
+ var styled_components_1 = __webpack_require__(4);
3000
+
3001
+ var lodash_1 = __webpack_require__(2);
2988
3002
 
2989
- var lodash_1 = __webpack_require__(3);
3003
+ var react_1 = __webpack_require__(1);
2990
3004
 
2991
- var react_1 = __webpack_require__(0);
3005
+ var T = __webpack_require__(0);
2992
3006
 
2993
- var T = __webpack_require__(1);
3007
+ var chroma = __webpack_require__(176);
2994
3008
 
2995
- var chroma = __webpack_require__(178);
3009
+ var maplibre_gl_1 = __webpack_require__(177);
2996
3010
 
2997
- var maplibre_gl_1 = __webpack_require__(179);
3011
+ var i18n_1 = __webpack_require__(3);
2998
3012
 
2999
- var i18n_1 = __webpack_require__(2);
3013
+ var Button_1 = __webpack_require__(117);
3000
3014
 
3001
- var MapContext_1 = __webpack_require__(430);
3015
+ var MapContext_1 = __webpack_require__(422);
3002
3016
 
3003
- var visualization_schemas_1 = __webpack_require__(10);
3017
+ var visualization_schemas_1 = __webpack_require__(9);
3004
3018
 
3005
- var PureMapContainer_1 = __webpack_require__(431);
3019
+ var PureMapContainer_1 = __webpack_require__(423);
3006
3020
 
3007
3021
  var MapUtils_1 = __webpack_require__(119);
3008
3022
 
3009
- var ClusterLayer_1 = __webpack_require__(433);
3023
+ var ClusterLayer_1 = __webpack_require__(425);
3010
3024
 
3011
- var ChoroplethLayer_1 = __webpack_require__(180);
3025
+ var ChoroplethLayer_1 = __webpack_require__(178);
3012
3026
 
3013
- var LocalChoroplethLayer_1 = __webpack_require__(436);
3027
+ var LocalChoroplethLayer_1 = __webpack_require__(428);
3014
3028
 
3015
3029
  exports.DEFAULT_CENTER = [0, 0];
3016
3030
  exports.DEFAULT_CONTROL_BACKGROUND_COLOR = '#2b3033';
@@ -3030,6 +3044,15 @@ var formatColor = function formatColor(color) {
3030
3044
  };
3031
3045
 
3032
3046
  exports.formatColor = formatColor;
3047
+ var StyledFitToDataButton = (0, styled_components_1.default)(Button_1.default).attrs({
3048
+ 'data-test': 'fit-to-data-button'
3049
+ })(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 115px;\n left: 16px;\n z-index: 3;\n width: 40px !important;\n height: 40px;\n border-radius: 4px;\n border: none;\n box-shadow: 0px 26px 103px rgba(0, 0, 0, 0.64), 0px 11px 18px rgba(0, 0, 0, 0.32),\n 0px 3px 6px rgba(0, 0, 0, 0.3) !important;\n background-color: ", " !important;\n background-repeat: no-repeat;\n background-position: center;\n background-image: url('data:image/svg+xml;charset=UTF-8,<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"", "\" stroke-width=\"2\" stroke-linecap=\"round\"/><path d=\"M12 3.5V6.5M12 20.5V17.5M3.5 12H6.5M20.5 12H17.5\" stroke=\"", "\" stroke-width=\"2\" stroke-linecap=\"round\"/></svg>');\n"])), function (props) {
3050
+ return props.controlBackgroundColor;
3051
+ }, function (props) {
3052
+ return props.controlIconColorEncoded.color;
3053
+ }, function (props) {
3054
+ return props.controlIconColorEncoded.color;
3055
+ });
3033
3056
  PureMapContainer_1.default.displayName = 'PureMapContainer';
3034
3057
 
3035
3058
  var PureMap = function PureMap(props) {
@@ -3052,7 +3075,6 @@ var PureMap = function PureMap(props) {
3052
3075
  onMapLoad = props.onMapLoad,
3053
3076
  onMapClick = props.onMapClick,
3054
3077
  onOptionsChange = props.onOptionsChange,
3055
- mode = props.mode,
3056
3078
  title = props.title;
3057
3079
 
3058
3080
  var _ref = (0, react_1.useContext)(MapContext_1.default),
@@ -3063,6 +3085,7 @@ var PureMap = function PureMap(props) {
3063
3085
  var map = (0, react_1.useRef)(null);
3064
3086
  var scaleControl = (0, react_1.useRef)(null);
3065
3087
  var zoomControl = (0, react_1.useRef)(null);
3088
+ var fitToDataButtonClickedRef = (0, react_1.useRef)(false);
3066
3089
 
3067
3090
  var _ref2 = (0, react_1.useMemo)(function () {
3068
3091
  return (0, MapUtils_1.getTilePreset)({
@@ -3138,31 +3161,35 @@ var PureMap = function PureMap(props) {
3138
3161
  };
3139
3162
 
3140
3163
  var onOptionsChangeProxy = (0, react_1.useCallback)(function (e) {
3141
- if (mode === 'edit') {
3142
- onOptionsChange(e);
3143
- }
3144
- }, [onOptionsChange, mode]);
3164
+ onOptionsChange(e);
3165
+ }, [onOptionsChange]);
3145
3166
  var fitMapToContent = (0, react_1.useCallback)(function () {
3146
3167
  var lngLatBounds = (0, MapUtils_1.getGlobalLayerBoundaries)([layers[0]]);
3147
3168
  map.current.fitBounds(lngLatBounds, {
3148
3169
  padding: MapUtils_1.MAX_BUBBLE_RADIUS + 5,
3149
3170
  animate: false
3171
+ }, {
3172
+ triggeredFromFitBounds: true
3150
3173
  });
3151
3174
  }, [layers]);
3152
- var initializeMap = (0, react_1.useCallback)(function (mapStyle) {
3153
- var addZoomEndEventListener = function addZoomEndEventListener() {
3154
- // register event listener - zoom
3155
- map.current.on('zoomend', function () {
3156
- var mapZoomLevel = map.current.getZoom();
3175
+ var addZoomEndEventListener = (0, react_1.useCallback)(function () {
3176
+ // register event listener - zoom
3177
+ map.current.on('zoomend', function (event) {
3178
+ var mapZoomLevel = map.current.getZoom();
3157
3179
 
3158
- if (mapZoomLevel < mapMinZoomRef.current) {
3159
- setMapMinZoom(mapZoomLevel);
3160
- }
3180
+ if (mapZoomLevel < mapMinZoomRef.current) {
3181
+ setMapMinZoom(mapZoomLevel);
3182
+ } // @ts-ignore
3161
3183
 
3162
- setCurrentZoomLevel(mapZoomLevel);
3163
- });
3164
- };
3165
3184
 
3185
+ if (event === null || event === void 0 ? void 0 : event.triggeredFromFitBounds) {
3186
+ return;
3187
+ }
3188
+
3189
+ setCurrentZoomLevel(mapZoomLevel);
3190
+ });
3191
+ }, []);
3192
+ var initializeMap = (0, react_1.useCallback)(function (mapStyle) {
3166
3193
  map.current = new maplibre_gl_1.Map(Object.assign({
3167
3194
  container: basemapContainer.current,
3168
3195
  preserveDrawingBuffer: true,
@@ -3305,6 +3332,10 @@ var PureMap = function PureMap(props) {
3305
3332
  }, [showBaseLayer, tilePreset, initializeMap, initializeScale, updateScale, defaultTileLight, defaultTileDark, baseLayerTileServer, baseLayerTileServerType, themeColorScheme]);
3306
3333
  (0, react_1.useEffect)(function () {
3307
3334
  if (map.current) {
3335
+ if (fitToDataButtonClickedRef.current) {
3336
+ return;
3337
+ }
3338
+
3308
3339
  map.current.flyTo({
3309
3340
  center: lngLatCenter,
3310
3341
  // Make sure we are not flying to a zoom value smaller than the mapMinZoom
@@ -3322,9 +3353,26 @@ var PureMap = function PureMap(props) {
3322
3353
  }, []);
3323
3354
 
3324
3355
  var _layers = _slicedToArray(layers, 1),
3325
- layer = _layers[0];
3356
+ layer = _layers[0]; // when datasource changes or fit to data button clicked, we want to auto zoom if zoom is undefined
3326
3357
 
3327
- return React.createElement(React.Fragment, null, React.createElement(PureMapContainer_1.default, {
3358
+
3359
+ (0, react_1.useEffect)(function () {
3360
+ if (isMapLoaded && layer && zoom === undefined && center === undefined) {
3361
+ fitMapToContent();
3362
+ fitToDataButtonClickedRef.current = false;
3363
+ }
3364
+ }, [layer === null || layer === void 0 ? void 0 : layer.resultLimit, layer === null || layer === void 0 ? void 0 : layer.latitude, layer === null || layer === void 0 ? void 0 : layer.longitude, layer === null || layer === void 0 ? void 0 : layer.areaIds, zoom, center]);
3365
+ var showResetButton = (0, react_1.useCallback)(function () {
3366
+ return center !== undefined || zoom !== undefined;
3367
+ }, [center, zoom]);
3368
+ var handleResetClick = (0, react_1.useCallback)(function () {
3369
+ fitToDataButtonClickedRef.current = true;
3370
+ onOptionsChangeProxy({
3371
+ center: undefined,
3372
+ zoom: undefined
3373
+ });
3374
+ }, [onOptionsChangeProxy]);
3375
+ return React.createElement(PureMapContainer_1.default, {
3328
3376
  "aria-label": title || (0, i18n_1._)('Map'),
3329
3377
  className: "puremap",
3330
3378
  width: width,
@@ -3336,7 +3384,13 @@ var PureMap = function PureMap(props) {
3336
3384
  ref: basemapContainer,
3337
3385
  showScale: showScale,
3338
3386
  showZoomControls: showZoomControls
3339
- }, isMapLoaded && layer && (layer.type === visualization_schemas_1.LAYER_TYPE.Bubble || layer.type === visualization_schemas_1.LAYER_TYPE.Marker) && React.createElement(ClusterLayer_1.default, {
3387
+ }, showResetButton() && React.createElement(StyledFitToDataButton, {
3388
+ onClick: handleResetClick,
3389
+ title: (0, i18n_1._)('Fit to data'),
3390
+ controlBackgroundColor: controlBackgroundColor,
3391
+ controlForegroundColor: controlForegroundColor,
3392
+ controlIconColorEncoded: (0, exports.formatColor)(controlForegroundColor)
3393
+ }), isMapLoaded && layer && (layer.type === visualization_schemas_1.LAYER_TYPE.Bubble || layer.type === visualization_schemas_1.LAYER_TYPE.Marker) && React.createElement(ClusterLayer_1.default, {
3340
3394
  clusterLayer: layer,
3341
3395
  themeColorScheme: themeColorScheme,
3342
3396
  map: map,
@@ -3356,7 +3410,7 @@ var PureMap = function PureMap(props) {
3356
3410
  isThemeChanged: isThemeChanged,
3357
3411
  setIsThemeChanged: setIsThemeChangedCallback,
3358
3412
  onMapClick: onMapClick
3359
- })));
3413
+ }));
3360
3414
  };
3361
3415
 
3362
3416
  var isLatLng = function isLatLng(props, propName, componentName) {
@@ -3437,26 +3491,14 @@ exports.default = PureMap;
3437
3491
 
3438
3492
  /***/ }),
3439
3493
 
3440
- /***/ 43:
3441
- /***/ (function(module, exports, __webpack_require__) {
3442
-
3443
- "use strict";
3444
-
3445
-
3446
- Object.defineProperty(exports, "__esModule", {
3447
- value: true
3448
- });
3449
-
3450
- /***/ }),
3451
-
3452
- /***/ 430:
3494
+ /***/ 422:
3453
3495
  /***/ (function(module, exports) {
3454
3496
 
3455
3497
  module.exports = require("@splunk/visualization-context/MapContext");
3456
3498
 
3457
3499
  /***/ }),
3458
3500
 
3459
- /***/ 431:
3501
+ /***/ 423:
3460
3502
  /***/ (function(module, exports, __webpack_require__) {
3461
3503
 
3462
3504
  "use strict";
@@ -3468,11 +3510,11 @@ Object.defineProperty(exports, "__esModule", {
3468
3510
 
3469
3511
  var styled_components_1 = __webpack_require__(4);
3470
3512
 
3471
- var lodash_1 = __webpack_require__(3);
3513
+ var lodash_1 = __webpack_require__(2);
3472
3514
 
3473
- var style_1 = __webpack_require__(19);
3515
+ var style_1 = __webpack_require__(18);
3474
3516
 
3475
- var maplibre_gl_css_1 = __webpack_require__(432);
3517
+ var maplibre_gl_css_1 = __webpack_require__(424);
3476
3518
 
3477
3519
  var PureMapContainer = styled_components_1.default.div.attrs({
3478
3520
  'data-test': 'puremap-container'
@@ -3510,7 +3552,7 @@ exports.default = PureMapContainer;
3510
3552
 
3511
3553
  /***/ }),
3512
3554
 
3513
- /***/ 432:
3555
+ /***/ 424:
3514
3556
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3515
3557
 
3516
3558
  "use strict";
@@ -3519,7 +3561,7 @@ __webpack_require__.r(__webpack_exports__);
3519
3561
 
3520
3562
  /***/ }),
3521
3563
 
3522
- /***/ 433:
3564
+ /***/ 425:
3523
3565
  /***/ (function(module, exports, __webpack_require__) {
3524
3566
 
3525
3567
  "use strict";
@@ -3529,13 +3571,13 @@ Object.defineProperty(exports, "__esModule", {
3529
3571
  value: true
3530
3572
  });
3531
3573
 
3532
- var React = __webpack_require__(0);
3574
+ var React = __webpack_require__(1);
3533
3575
 
3534
- var visualization_schemas_1 = __webpack_require__(10);
3576
+ var visualization_schemas_1 = __webpack_require__(9);
3535
3577
 
3536
- var BubbleLayer_1 = __webpack_require__(151);
3578
+ var BubbleLayer_1 = __webpack_require__(149);
3537
3579
 
3538
- var MarkerLayer_1 = __webpack_require__(435);
3580
+ var MarkerLayer_1 = __webpack_require__(427);
3539
3581
 
3540
3582
  var ClusterLayer = function ClusterLayer(_ref) {
3541
3583
  var clusterLayer = _ref.clusterLayer,
@@ -3574,13 +3616,13 @@ exports.default = ClusterLayer;
3574
3616
 
3575
3617
  /***/ }),
3576
3618
 
3577
- /***/ 434:
3619
+ /***/ 426:
3578
3620
  /***/ (function(module, exports, __webpack_require__) {
3579
3621
 
3580
3622
  "use strict";
3581
3623
 
3582
3624
 
3583
- var _taggedTemplateLiteral = __webpack_require__(79);
3625
+ var _taggedTemplateLiteral = __webpack_require__(78);
3584
3626
 
3585
3627
  var _templateObject;
3586
3628
 
@@ -3589,13 +3631,13 @@ Object.defineProperty(exports, "__esModule", {
3589
3631
  });
3590
3632
  exports.convertDegToDMS = void 0;
3591
3633
 
3592
- var React = __webpack_require__(0);
3634
+ var React = __webpack_require__(1);
3593
3635
 
3594
3636
  var styled_components_1 = __webpack_require__(4);
3595
3637
 
3596
- var Popover_1 = __webpack_require__(82);
3638
+ var Popover_1 = __webpack_require__(81);
3597
3639
 
3598
- var i18n_1 = __webpack_require__(2);
3640
+ var i18n_1 = __webpack_require__(3);
3599
3641
 
3600
3642
  var StyledPopover = (0, styled_components_1.default)(Popover_1.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 250px;\n font-size: 12px;\n"])));
3601
3643
  var StyledTable = styled_components_1.default.table.withConfig({
@@ -3698,15 +3740,15 @@ exports.default = Tooltip;
3698
3740
 
3699
3741
  /***/ }),
3700
3742
 
3701
- /***/ 435:
3743
+ /***/ 427:
3702
3744
  /***/ (function(module, exports, __webpack_require__) {
3703
3745
 
3704
3746
  "use strict";
3705
3747
 
3706
3748
 
3707
- var _defineProperty = __webpack_require__(13);
3749
+ var _defineProperty = __webpack_require__(12);
3708
3750
 
3709
- var _taggedTemplateLiteral = __webpack_require__(79);
3751
+ var _taggedTemplateLiteral = __webpack_require__(78);
3710
3752
 
3711
3753
  var _templateObject;
3712
3754
 
@@ -3730,15 +3772,15 @@ exports.generateMarkerWrapperProps = exports.MarkerIcon = void 0;
3730
3772
 
3731
3773
  var styled_components_1 = __webpack_require__(4);
3732
3774
 
3733
- var React = __webpack_require__(0);
3775
+ var React = __webpack_require__(1);
3734
3776
 
3735
- var colorUtils_1 = __webpack_require__(16);
3777
+ var colorUtils_1 = __webpack_require__(15);
3736
3778
 
3737
- var lodash_1 = __webpack_require__(3);
3779
+ var lodash_1 = __webpack_require__(2);
3738
3780
 
3739
3781
  var MapUtils_1 = __webpack_require__(119);
3740
3782
 
3741
- var MarkerWrapper_1 = __webpack_require__(152);
3783
+ var MarkerWrapper_1 = __webpack_require__(150);
3742
3784
 
3743
3785
  var MarkerIcon = function MarkerIcon(_a) {
3744
3786
  var theme = _a.theme,
@@ -3864,29 +3906,29 @@ exports.default = MarkerLayer;
3864
3906
 
3865
3907
  /***/ }),
3866
3908
 
3867
- /***/ 436:
3909
+ /***/ 428:
3868
3910
  /***/ (function(module, exports, __webpack_require__) {
3869
3911
 
3870
3912
  "use strict";
3871
3913
 
3872
3914
 
3873
- var _slicedToArray = __webpack_require__(6);
3915
+ var _slicedToArray = __webpack_require__(5);
3874
3916
 
3875
3917
  Object.defineProperty(exports, "__esModule", {
3876
3918
  value: true
3877
3919
  });
3878
3920
 
3879
- var React = __webpack_require__(0);
3921
+ var React = __webpack_require__(1);
3880
3922
 
3881
- var Message_1 = __webpack_require__(12);
3923
+ var Message_1 = __webpack_require__(11);
3882
3924
 
3883
- var GeoRegistry_1 = __webpack_require__(437);
3925
+ var GeoRegistry_1 = __webpack_require__(429);
3884
3926
 
3885
- var GeoJsonProvider_1 = __webpack_require__(438);
3927
+ var GeoJsonProvider_1 = __webpack_require__(430);
3886
3928
 
3887
3929
  var MapUtils_1 = __webpack_require__(119);
3888
3930
 
3889
- var ChoroplethLayer_1 = __webpack_require__(180);
3931
+ var ChoroplethLayer_1 = __webpack_require__(178);
3890
3932
 
3891
3933
  var LocalChoroplethLayer = function LocalChoroplethLayer(props) {
3892
3934
  var _a, _b;
@@ -4076,21 +4118,33 @@ exports.default = LocalChoroplethLayer;
4076
4118
 
4077
4119
  /***/ }),
4078
4120
 
4079
- /***/ 437:
4121
+ /***/ 429:
4080
4122
  /***/ (function(module, exports) {
4081
4123
 
4082
4124
  module.exports = require("@splunk/visualization-context/GeoRegistry");
4083
4125
 
4084
4126
  /***/ }),
4085
4127
 
4086
- /***/ 438:
4128
+ /***/ 43:
4129
+ /***/ (function(module, exports, __webpack_require__) {
4130
+
4131
+ "use strict";
4132
+
4133
+
4134
+ Object.defineProperty(exports, "__esModule", {
4135
+ value: true
4136
+ });
4137
+
4138
+ /***/ }),
4139
+
4140
+ /***/ 430:
4087
4141
  /***/ (function(module, exports) {
4088
4142
 
4089
4143
  module.exports = require("@splunk/visualization-context/GeoJsonProvider");
4090
4144
 
4091
4145
  /***/ }),
4092
4146
 
4093
- /***/ 439:
4147
+ /***/ 431:
4094
4148
  /***/ (function(module, exports, __webpack_require__) {
4095
4149
 
4096
4150
  "use strict";
@@ -4100,23 +4154,23 @@ Object.defineProperty(exports, "__esModule", {
4100
4154
  value: true
4101
4155
  });
4102
4156
 
4103
- var visualization_icons_1 = __webpack_require__(72);
4157
+ var visualization_icons_1 = __webpack_require__(71);
4104
4158
 
4105
- var placeholders_1 = __webpack_require__(71);
4159
+ var placeholders_1 = __webpack_require__(70);
4106
4160
 
4107
- var visualization_schemas_1 = __webpack_require__(10);
4161
+ var visualization_schemas_1 = __webpack_require__(9);
4108
4162
 
4109
- var themes_1 = __webpack_require__(80);
4163
+ var themes_1 = __webpack_require__(79);
4110
4164
 
4111
- var i18n_1 = __webpack_require__(2);
4165
+ var i18n_1 = __webpack_require__(3);
4112
4166
 
4113
- var VizBehavior_1 = __webpack_require__(8);
4167
+ var VizBehavior_1 = __webpack_require__(7);
4114
4168
 
4115
- var VizCategory_1 = __webpack_require__(23);
4169
+ var VizCategory_1 = __webpack_require__(22);
4116
4170
 
4117
- var configUtils_1 = __webpack_require__(27);
4171
+ var configUtils_1 = __webpack_require__(26);
4118
4172
 
4119
- var BackgroundColor_1 = __webpack_require__(73);
4173
+ var BackgroundColor_1 = __webpack_require__(72);
4120
4174
 
4121
4175
  var defaultContext = {
4122
4176
  colorRangeConfig: [{
@@ -4535,19 +4589,7 @@ exports.default = (0, configUtils_1.enhanceConfig)(config);
4535
4589
 
4536
4590
  /***/ }),
4537
4591
 
4538
- /***/ 44:
4539
- /***/ (function(module, exports, __webpack_require__) {
4540
-
4541
- "use strict";
4542
-
4543
-
4544
- Object.defineProperty(exports, "__esModule", {
4545
- value: true
4546
- });
4547
-
4548
- /***/ }),
4549
-
4550
- /***/ 440:
4592
+ /***/ 432:
4551
4593
  /***/ (function(module, exports, __webpack_require__) {
4552
4594
 
4553
4595
  "use strict";
@@ -4558,15 +4600,15 @@ Object.defineProperty(exports, "__esModule", {
4558
4600
  });
4559
4601
  exports.columnsNullToZeros = void 0;
4560
4602
 
4561
- var types_1 = __webpack_require__(104);
4603
+ var types_1 = __webpack_require__(103);
4562
4604
 
4563
- var dsl_1 = __webpack_require__(153);
4605
+ var dsl_1 = __webpack_require__(151);
4564
4606
 
4565
- var hocUtils_1 = __webpack_require__(34);
4607
+ var hocUtils_1 = __webpack_require__(33);
4566
4608
 
4567
- var JSONSchemaUtils_1 = __webpack_require__(35);
4609
+ var JSONSchemaUtils_1 = __webpack_require__(34);
4568
4610
 
4569
- var BubbleLayer_1 = __webpack_require__(151);
4611
+ var BubbleLayer_1 = __webpack_require__(149);
4570
4612
 
4571
4613
  var columnsNullToZeros = function columnsNullToZeros(config, dataSources, options) {
4572
4614
  var _a, _b;
@@ -4617,7 +4659,7 @@ exports.columnsNullToZeros = columnsNullToZeros;
4617
4659
 
4618
4660
  /***/ }),
4619
4661
 
4620
- /***/ 45:
4662
+ /***/ 44:
4621
4663
  /***/ (function(module, exports, __webpack_require__) {
4622
4664
 
4623
4665
  "use strict";
@@ -4629,7 +4671,7 @@ Object.defineProperty(exports, "__esModule", {
4629
4671
 
4630
4672
  /***/ }),
4631
4673
 
4632
- /***/ 46:
4674
+ /***/ 45:
4633
4675
  /***/ (function(module, exports, __webpack_require__) {
4634
4676
 
4635
4677
  "use strict";
@@ -4641,7 +4683,7 @@ Object.defineProperty(exports, "__esModule", {
4641
4683
 
4642
4684
  /***/ }),
4643
4685
 
4644
- /***/ 47:
4686
+ /***/ 46:
4645
4687
  /***/ (function(module, exports, __webpack_require__) {
4646
4688
 
4647
4689
  "use strict";
@@ -4653,7 +4695,7 @@ Object.defineProperty(exports, "__esModule", {
4653
4695
 
4654
4696
  /***/ }),
4655
4697
 
4656
- /***/ 48:
4698
+ /***/ 47:
4657
4699
  /***/ (function(module, exports, __webpack_require__) {
4658
4700
 
4659
4701
  "use strict";
@@ -4665,7 +4707,7 @@ Object.defineProperty(exports, "__esModule", {
4665
4707
 
4666
4708
  /***/ }),
4667
4709
 
4668
- /***/ 49:
4710
+ /***/ 48:
4669
4711
  /***/ (function(module, exports, __webpack_require__) {
4670
4712
 
4671
4713
  "use strict";
@@ -4677,7 +4719,7 @@ Object.defineProperty(exports, "__esModule", {
4677
4719
 
4678
4720
  /***/ }),
4679
4721
 
4680
- /***/ 50:
4722
+ /***/ 49:
4681
4723
  /***/ (function(module, exports, __webpack_require__) {
4682
4724
 
4683
4725
  "use strict";
@@ -4689,7 +4731,14 @@ Object.defineProperty(exports, "__esModule", {
4689
4731
 
4690
4732
  /***/ }),
4691
4733
 
4692
- /***/ 51:
4734
+ /***/ 5:
4735
+ /***/ (function(module, exports) {
4736
+
4737
+ module.exports = require("@babel/runtime/helpers/slicedToArray");
4738
+
4739
+ /***/ }),
4740
+
4741
+ /***/ 50:
4693
4742
  /***/ (function(module, exports, __webpack_require__) {
4694
4743
 
4695
4744
  "use strict";
@@ -4701,7 +4750,7 @@ Object.defineProperty(exports, "__esModule", {
4701
4750
 
4702
4751
  /***/ }),
4703
4752
 
4704
- /***/ 52:
4753
+ /***/ 51:
4705
4754
  /***/ (function(module, exports, __webpack_require__) {
4706
4755
 
4707
4756
  "use strict";
@@ -4713,7 +4762,7 @@ Object.defineProperty(exports, "__esModule", {
4713
4762
 
4714
4763
  /***/ }),
4715
4764
 
4716
- /***/ 53:
4765
+ /***/ 52:
4717
4766
  /***/ (function(module, exports, __webpack_require__) {
4718
4767
 
4719
4768
  "use strict";
@@ -4725,7 +4774,7 @@ Object.defineProperty(exports, "__esModule", {
4725
4774
 
4726
4775
  /***/ }),
4727
4776
 
4728
- /***/ 54:
4777
+ /***/ 53:
4729
4778
  /***/ (function(module, exports, __webpack_require__) {
4730
4779
 
4731
4780
  "use strict";
@@ -4737,65 +4786,65 @@ Object.defineProperty(exports, "__esModule", {
4737
4786
 
4738
4787
  /***/ }),
4739
4788
 
4740
- /***/ 55:
4789
+ /***/ 54:
4741
4790
  /***/ (function(module, exports, __webpack_require__) {
4742
4791
 
4743
4792
  "use strict";
4744
4793
 
4745
4794
 
4746
- var _slicedToArray = __webpack_require__(6);
4795
+ var _slicedToArray = __webpack_require__(5);
4747
4796
 
4748
4797
  Object.defineProperty(exports, "__esModule", {
4749
4798
  value: true
4750
4799
  });
4751
4800
 
4752
- var React = __webpack_require__(0);
4801
+ var React = __webpack_require__(1);
4753
4802
 
4754
- var lodash_1 = __webpack_require__(3);
4803
+ var lodash_1 = __webpack_require__(2);
4755
4804
 
4756
- var getSettingsFromThemedProps_1 = __webpack_require__(56);
4805
+ var getSettingsFromThemedProps_1 = __webpack_require__(55);
4757
4806
 
4758
- var Options_1 = __webpack_require__(17);
4807
+ var Options_1 = __webpack_require__(16);
4759
4808
 
4760
- var SanitizeProps_1 = __webpack_require__(57);
4809
+ var SanitizeProps_1 = __webpack_require__(56);
4761
4810
 
4762
- var TimezoneContext_1 = __webpack_require__(32);
4811
+ var TimezoneContext_1 = __webpack_require__(31);
4763
4812
 
4764
- var moment_1 = __webpack_require__(58);
4813
+ var moment_1 = __webpack_require__(57);
4765
4814
 
4766
- var FeatureFlagContext_1 = __webpack_require__(28);
4815
+ var FeatureFlagContext_1 = __webpack_require__(27);
4767
4816
 
4768
4817
  var styled_components_1 = __webpack_require__(4);
4769
4818
 
4770
- var hocUtils_1 = __webpack_require__(34);
4819
+ var hocUtils_1 = __webpack_require__(33);
4771
4820
 
4772
- var JSONSchemaUtils_1 = __webpack_require__(35);
4821
+ var JSONSchemaUtils_1 = __webpack_require__(34);
4773
4822
 
4774
- var async_dynamic_options_evaluator_1 = __webpack_require__(59);
4823
+ var async_dynamic_options_evaluator_1 = __webpack_require__(58);
4775
4824
 
4776
- var id_1 = __webpack_require__(31);
4825
+ var id_1 = __webpack_require__(30);
4777
4826
 
4778
- var SplunkVisualization_1 = __webpack_require__(60);
4827
+ var SplunkVisualization_1 = __webpack_require__(59);
4779
4828
 
4780
- var VizBehavior_1 = __webpack_require__(8);
4829
+ var VizBehavior_1 = __webpack_require__(7);
4781
4830
 
4782
- var getSorting_1 = __webpack_require__(38);
4831
+ var getSorting_1 = __webpack_require__(37);
4783
4832
 
4784
- var getPagination_1 = __webpack_require__(39);
4833
+ var getPagination_1 = __webpack_require__(38);
4785
4834
 
4786
- var useDeepMemo_1 = __webpack_require__(61);
4835
+ var useDeepMemo_1 = __webpack_require__(60);
4787
4836
 
4788
- var MissingPropsMessage_1 = __webpack_require__(62);
4837
+ var MissingPropsMessage_1 = __webpack_require__(61);
4789
4838
 
4790
- var withEditModeCover_1 = __webpack_require__(63);
4839
+ var withEditModeCover_1 = __webpack_require__(62);
4791
4840
 
4792
- var withPlaceholder_1 = __webpack_require__(64);
4841
+ var withPlaceholder_1 = __webpack_require__(63);
4793
4842
 
4794
- var useDownsampleDataSources_1 = __webpack_require__(65);
4843
+ var useDownsampleDataSources_1 = __webpack_require__(64);
4795
4844
 
4796
- var dataUtils_1 = __webpack_require__(15);
4845
+ var dataUtils_1 = __webpack_require__(14);
4797
4846
 
4798
- var featureFlagUtils_1 = __webpack_require__(67);
4847
+ var featureFlagUtils_1 = __webpack_require__(66);
4799
4848
  /**
4800
4849
  * hoc that wraps a pure react visualization in a Dashboard visualization
4801
4850
  * @param {DashboardVizOpts} opts
@@ -5128,48 +5177,41 @@ exports.default = withDashboardViz;
5128
5177
 
5129
5178
  /***/ }),
5130
5179
 
5131
- /***/ 56:
5180
+ /***/ 55:
5132
5181
  /***/ (function(module, exports) {
5133
5182
 
5134
5183
  module.exports = require("@splunk/themes/getSettingsFromThemedProps");
5135
5184
 
5136
5185
  /***/ }),
5137
5186
 
5138
- /***/ 57:
5187
+ /***/ 56:
5139
5188
  /***/ (function(module, exports) {
5140
5189
 
5141
5190
  module.exports = require("@splunk/visualizations-shared/SanitizeProps");
5142
5191
 
5143
5192
  /***/ }),
5144
5193
 
5145
- /***/ 58:
5194
+ /***/ 57:
5146
5195
  /***/ (function(module, exports) {
5147
5196
 
5148
5197
  module.exports = require("@splunk/moment");
5149
5198
 
5150
5199
  /***/ }),
5151
5200
 
5152
- /***/ 59:
5201
+ /***/ 58:
5153
5202
  /***/ (function(module, exports) {
5154
5203
 
5155
5204
  module.exports = require("@splunk/async-dynamic-options-evaluator");
5156
5205
 
5157
5206
  /***/ }),
5158
5207
 
5159
- /***/ 6:
5160
- /***/ (function(module, exports) {
5161
-
5162
- module.exports = require("@babel/runtime/helpers/slicedToArray");
5163
-
5164
- /***/ }),
5165
-
5166
- /***/ 60:
5208
+ /***/ 59:
5167
5209
  /***/ (function(module, exports, __webpack_require__) {
5168
5210
 
5169
5211
  "use strict";
5170
5212
 
5171
5213
 
5172
- var _classCallCheck = __webpack_require__(9);
5214
+ var _classCallCheck = __webpack_require__(8);
5173
5215
 
5174
5216
  Object.defineProperty(exports, "__esModule", {
5175
5217
  value: true
@@ -5177,11 +5219,11 @@ Object.defineProperty(exports, "__esModule", {
5177
5219
  exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
5178
5220
  /* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
5179
5221
 
5180
- var T = __webpack_require__(1);
5222
+ var T = __webpack_require__(0);
5181
5223
 
5182
- var lodash_1 = __webpack_require__(3);
5224
+ var lodash_1 = __webpack_require__(2);
5183
5225
 
5184
- var VizActionHandler_1 = __webpack_require__(22); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
5226
+ var VizActionHandler_1 = __webpack_require__(21); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
5185
5227
 
5186
5228
 
5187
5229
  exports.INITIAL_WIDTH = 250;
@@ -5315,7 +5357,14 @@ exports.default = SplunkVisualization;
5315
5357
 
5316
5358
  /***/ }),
5317
5359
 
5318
- /***/ 61:
5360
+ /***/ 6:
5361
+ /***/ (function(module, exports) {
5362
+
5363
+ module.exports = require("@babel/runtime/helpers/toConsumableArray");
5364
+
5365
+ /***/ }),
5366
+
5367
+ /***/ 60:
5319
5368
  /***/ (function(module, exports, __webpack_require__) {
5320
5369
 
5321
5370
  "use strict";
@@ -5326,9 +5375,9 @@ Object.defineProperty(exports, "__esModule", {
5326
5375
  });
5327
5376
  exports.useDeepMemo = void 0;
5328
5377
 
5329
- var react_1 = __webpack_require__(0);
5378
+ var react_1 = __webpack_require__(1);
5330
5379
 
5331
- var lodash_1 = __webpack_require__(3);
5380
+ var lodash_1 = __webpack_require__(2);
5332
5381
  /**
5333
5382
  * This hook evaluates and stores the result of a passed function and only
5334
5383
  * re-evaluates the function when passed dependencies change.
@@ -5361,7 +5410,7 @@ exports.useDeepMemo = useDeepMemo;
5361
5410
 
5362
5411
  /***/ }),
5363
5412
 
5364
- /***/ 62:
5413
+ /***/ 61:
5365
5414
  /***/ (function(module, exports, __webpack_require__) {
5366
5415
 
5367
5416
  "use strict";
@@ -5372,15 +5421,15 @@ Object.defineProperty(exports, "__esModule", {
5372
5421
  });
5373
5422
  exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
5374
5423
 
5375
- var React = __webpack_require__(0);
5424
+ var React = __webpack_require__(1);
5376
5425
 
5377
- var T = __webpack_require__(1);
5426
+ var T = __webpack_require__(0);
5378
5427
 
5379
- var i18n_1 = __webpack_require__(2);
5428
+ var i18n_1 = __webpack_require__(3);
5380
5429
 
5381
- var Message_1 = __webpack_require__(12);
5430
+ var Message_1 = __webpack_require__(11);
5382
5431
 
5383
- var FixedSizeContainer_1 = __webpack_require__(18);
5432
+ var FixedSizeContainer_1 = __webpack_require__(17);
5384
5433
  /**
5385
5434
  * @method isMissing
5386
5435
  * @param {any} v
@@ -5442,7 +5491,7 @@ exports.default = (0, FixedSizeContainer_1.default)(exports.MissingPropsMessage)
5442
5491
 
5443
5492
  /***/ }),
5444
5493
 
5445
- /***/ 63:
5494
+ /***/ 62:
5446
5495
  /***/ (function(module, exports, __webpack_require__) {
5447
5496
 
5448
5497
  "use strict";
@@ -5452,18 +5501,18 @@ Object.defineProperty(exports, "__esModule", {
5452
5501
  value: true
5453
5502
  });
5454
5503
 
5455
- var React = __webpack_require__(0);
5504
+ var React = __webpack_require__(1);
5456
5505
 
5457
5506
  var styled_components_1 = __webpack_require__(4);
5458
5507
 
5459
- var hocUtils_1 = __webpack_require__(24);
5508
+ var hocUtils_1 = __webpack_require__(23);
5460
5509
 
5461
5510
  var Cover = styled_components_1.default.div.withConfig({
5462
5511
  displayName: "withEditModeCover__Cover",
5463
5512
  componentId: "sc-1gsbnxb-0"
5464
5513
  })(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
5465
5514
  var Blocker = styled_components_1.default.div.attrs({
5466
- 'data-splunk-visualization-version': "26.3.0 - a1ef240a6"
5515
+ 'data-splunk-visualization-version': "26.4.0 - 04078274d"
5467
5516
  }).withConfig({
5468
5517
  displayName: "withEditModeCover__Blocker",
5469
5518
  componentId: "sc-1gsbnxb-1"
@@ -5495,7 +5544,7 @@ exports.default = withEditModeCover;
5495
5544
 
5496
5545
  /***/ }),
5497
5546
 
5498
- /***/ 64:
5547
+ /***/ 63:
5499
5548
  /***/ (function(module, exports, __webpack_require__) {
5500
5549
 
5501
5550
  "use strict";
@@ -5505,17 +5554,17 @@ Object.defineProperty(exports, "__esModule", {
5505
5554
  value: true
5506
5555
  });
5507
5556
 
5508
- var React = __webpack_require__(0);
5557
+ var React = __webpack_require__(1);
5509
5558
 
5510
- var colorUtils_1 = __webpack_require__(16);
5559
+ var colorUtils_1 = __webpack_require__(15);
5511
5560
 
5512
- var variables_1 = __webpack_require__(14);
5561
+ var variables_1 = __webpack_require__(13);
5513
5562
 
5514
- var IconPlaceholder_1 = __webpack_require__(37);
5563
+ var IconPlaceholder_1 = __webpack_require__(36);
5515
5564
 
5516
- var VizBehavior_1 = __webpack_require__(8);
5565
+ var VizBehavior_1 = __webpack_require__(7);
5517
5566
 
5518
- var hocUtils_1 = __webpack_require__(24);
5567
+ var hocUtils_1 = __webpack_require__(23);
5519
5568
 
5520
5569
  var withPlaceholder = function withPlaceholder(Visualization) {
5521
5570
  var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
@@ -5560,27 +5609,30 @@ exports.default = withPlaceholder;
5560
5609
 
5561
5610
  /***/ }),
5562
5611
 
5563
- /***/ 65:
5612
+ /***/ 64:
5564
5613
  /***/ (function(module, exports, __webpack_require__) {
5565
5614
 
5566
5615
  "use strict";
5567
5616
 
5568
5617
 
5569
- var _slicedToArray = __webpack_require__(6);
5618
+ var _slicedToArray = __webpack_require__(5);
5570
5619
 
5571
5620
  Object.defineProperty(exports, "__esModule", {
5572
5621
  value: true
5573
5622
  });
5574
5623
 
5575
- var react_1 = __webpack_require__(0);
5624
+ var react_1 = __webpack_require__(1);
5625
+
5626
+ var lodash_1 = __webpack_require__(2);
5627
+
5628
+ var dataUtils_1 = __webpack_require__(14);
5576
5629
 
5577
- var lodash_1 = __webpack_require__(3);
5630
+ var usePrevious_1 = __webpack_require__(32);
5578
5631
 
5579
- var dataUtils_1 = __webpack_require__(15);
5632
+ var useGetXAndYFields_1 = __webpack_require__(65); // Options properties which impact/require re-downsample on change.
5580
5633
 
5581
- var usePrevious_1 = __webpack_require__(33);
5582
5634
 
5583
- var useGetXAndYFields_1 = __webpack_require__(66);
5635
+ var downsampleVizOptionProperties = ['nullValueDisplay'];
5584
5636
 
5585
5637
  var useDownsampleDataSources = function useDownsampleDataSources(_ref) {
5586
5638
  var dataSources = _ref.dataSources,
@@ -5594,8 +5646,15 @@ var useDownsampleDataSources = function useDownsampleDataSources(_ref) {
5594
5646
  options: options,
5595
5647
  context: context,
5596
5648
  dataSources: dataSources
5597
- });
5598
- var previousXAndYFieldsWithTypes = (0, usePrevious_1.default)(xAndYFieldsWithTypes);
5649
+ }); // Extract viz options that impact downsampling.
5650
+
5651
+ var downsampleVizOptions = (0, react_1.useMemo)(function () {
5652
+ return (0, lodash_1.pick)(options, downsampleVizOptionProperties);
5653
+ }, [options]);
5654
+ var downsampleDSOptions = (0, react_1.useMemo)(function () {
5655
+ return Object.assign(Object.assign({}, downsampleVizOptions), xAndYFieldsWithTypes);
5656
+ }, [xAndYFieldsWithTypes, downsampleVizOptions]);
5657
+ var previousDownsampleDSOptions = (0, usePrevious_1.default)(downsampleDSOptions);
5599
5658
  var previousDataSources = (0, usePrevious_1.default)(dataSources);
5600
5659
  var previousThreshold = (0, usePrevious_1.default)(threshold);
5601
5660
 
@@ -5603,7 +5662,7 @@ var useDownsampleDataSources = function useDownsampleDataSources(_ref) {
5603
5662
  return isDownsamplingEnabled ? (0, dataUtils_1.downsampleDataSources)({
5604
5663
  dataSources: dataSources,
5605
5664
  threshold: threshold,
5606
- options: xAndYFieldsWithTypes
5665
+ options: downsampleDSOptions
5607
5666
  }) : dataSources;
5608
5667
  }),
5609
5668
  _ref3 = _slicedToArray(_ref2, 2),
@@ -5631,7 +5690,7 @@ var useDownsampleDataSources = function useDownsampleDataSources(_ref) {
5631
5690
  return;
5632
5691
  }
5633
5692
 
5634
- if ((0, lodash_1.isEqual)(previousXAndYFieldsWithTypes, xAndYFieldsWithTypes) && previousDataSources === dataSources && previousThreshold === threshold) {
5693
+ if ((0, lodash_1.isEqual)(previousDownsampleDSOptions, downsampleDSOptions) && previousDataSources === dataSources && previousThreshold === threshold) {
5635
5694
  return;
5636
5695
  } // Debounce the downsampling so we don't have to downsample and execute DSL multiple times
5637
5696
  // while the viz is being resized
@@ -5639,10 +5698,10 @@ var useDownsampleDataSources = function useDownsampleDataSources(_ref) {
5639
5698
 
5640
5699
  debouncedDownsampleDataSources({
5641
5700
  dataSources: dataSources,
5642
- options: xAndYFieldsWithTypes,
5701
+ options: downsampleDSOptions,
5643
5702
  threshold: threshold
5644
5703
  }); // need to detect if this runs as part of the initial render
5645
- }, [dataSources, debouncedDownsampleDataSources, xAndYFieldsWithTypes, threshold, isDownsamplingEnabled, previousXAndYFieldsWithTypes, previousDataSources, previousThreshold]);
5704
+ }, [dataSources, downsampleDSOptions, debouncedDownsampleDataSources, xAndYFieldsWithTypes, threshold, isDownsamplingEnabled, previousDataSources, previousThreshold, previousDownsampleDSOptions]);
5646
5705
  return downsampledDataSources;
5647
5706
  };
5648
5707
 
@@ -5650,21 +5709,21 @@ exports.default = useDownsampleDataSources;
5650
5709
 
5651
5710
  /***/ }),
5652
5711
 
5653
- /***/ 66:
5712
+ /***/ 65:
5654
5713
  /***/ (function(module, exports, __webpack_require__) {
5655
5714
 
5656
5715
  "use strict";
5657
5716
 
5658
5717
 
5659
- var _toConsumableArray = __webpack_require__(7);
5718
+ var _toConsumableArray = __webpack_require__(6);
5660
5719
 
5661
5720
  Object.defineProperty(exports, "__esModule", {
5662
5721
  value: true
5663
5722
  });
5664
5723
 
5665
- var react_1 = __webpack_require__(0);
5724
+ var react_1 = __webpack_require__(1);
5666
5725
 
5667
- var Options_1 = __webpack_require__(17);
5726
+ var Options_1 = __webpack_require__(16);
5668
5727
  /**
5669
5728
  * Hook that evaluates the DSL for subset of a viz's options needed to determine
5670
5729
  * its x and y fields as well as the types of all its fields.
@@ -5765,7 +5824,7 @@ exports.default = useGetXAndYFields;
5765
5824
 
5766
5825
  /***/ }),
5767
5826
 
5768
- /***/ 67:
5827
+ /***/ 66:
5769
5828
  /***/ (function(module, exports, __webpack_require__) {
5770
5829
 
5771
5830
  "use strict";
@@ -5776,7 +5835,7 @@ Object.defineProperty(exports, "__esModule", {
5776
5835
  });
5777
5836
  exports.getFeatureFlag = void 0;
5778
5837
 
5779
- var FeatureFlags_1 = __webpack_require__(68);
5838
+ var FeatureFlags_1 = __webpack_require__(67);
5780
5839
 
5781
5840
  var getFeatureFlag = function getFeatureFlag(context, flagName) {
5782
5841
  // look for feature flag in context first
@@ -5801,7 +5860,7 @@ exports.getFeatureFlag = getFeatureFlag;
5801
5860
 
5802
5861
  /***/ }),
5803
5862
 
5804
- /***/ 68:
5863
+ /***/ 67:
5805
5864
  /***/ (function(module, exports) {
5806
5865
 
5807
5866
  module.exports = require("@splunk/visualization-context/FeatureFlags");
@@ -5809,27 +5868,60 @@ module.exports = require("@splunk/visualization-context/FeatureFlags");
5809
5868
  /***/ }),
5810
5869
 
5811
5870
  /***/ 7:
5812
- /***/ (function(module, exports) {
5871
+ /***/ (function(module, exports, __webpack_require__) {
5813
5872
 
5814
- module.exports = require("@babel/runtime/helpers/toConsumableArray");
5873
+ "use strict";
5874
+
5875
+
5876
+ Object.defineProperty(exports, "__esModule", {
5877
+ value: true
5878
+ });
5879
+ exports.VizBehavior = void 0;
5880
+ var VizBehavior;
5881
+
5882
+ (function (VizBehavior) {
5883
+ /**
5884
+ * Dynamic Options Behavior.
5885
+ * This allows visualization options to be powered by data
5886
+ *
5887
+ * **Example**
5888
+ *
5889
+ * sparklineValues: ">primary|seriesByIndex(0)"
5890
+ * would configure sparklineValues with an array of data points
5891
+ * coming from the first series in the primary datasource
5892
+ *
5893
+ */
5894
+ VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
5895
+ VizBehavior["EVENTS"] = "events";
5896
+ VizBehavior["DOWNSAMPLING"] = "downsampling";
5897
+ /**
5898
+ * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
5899
+ * missing.
5900
+ * @type {string}
5901
+ */
5902
+
5903
+ VizBehavior["PLACEHOLDER"] = "placeholder";
5904
+ VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
5905
+ VizBehavior["TRELLIS"] = "trellis";
5906
+ })(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
5815
5907
 
5816
5908
  /***/ }),
5817
5909
 
5818
- /***/ 71:
5910
+ /***/ 70:
5819
5911
  /***/ (function(module, exports) {
5820
5912
 
5821
5913
  module.exports = require("@splunk/visualization-icons/placeholders");
5822
5914
 
5823
5915
  /***/ }),
5824
5916
 
5825
- /***/ 72:
5917
+ /***/ 71:
5826
5918
  /***/ (function(module, exports) {
5827
5919
 
5828
5920
  module.exports = require("@splunk/visualization-icons");
5829
5921
 
5830
5922
  /***/ }),
5831
5923
 
5832
- /***/ 73:
5924
+ /***/ 72:
5833
5925
  /***/ (function(module, exports, __webpack_require__) {
5834
5926
 
5835
5927
  "use strict";
@@ -5839,14 +5931,14 @@ Object.defineProperty(exports, "__esModule", {
5839
5931
  value: true
5840
5932
  });
5841
5933
 
5842
- var i18n_1 = __webpack_require__(2);
5934
+ var i18n_1 = __webpack_require__(3);
5843
5935
 
5844
5936
  var background = function background(_ref) {
5845
5937
  var label = _ref.label,
5846
5938
  themes = _ref.themes,
5847
5939
  labelPosition = _ref.labelPosition;
5848
5940
  return [{
5849
- label: (0, i18n_1._)(label || 'Background'),
5941
+ label: (0, i18n_1._)(label || 'Background color'),
5850
5942
  option: 'backgroundColor',
5851
5943
  editor: 'editor.color',
5852
5944
  editorProps: {
@@ -5860,68 +5952,35 @@ exports.default = background;
5860
5952
 
5861
5953
  /***/ }),
5862
5954
 
5863
- /***/ 75:
5955
+ /***/ 74:
5864
5956
  /***/ (function(module, exports) {
5865
5957
 
5866
5958
  module.exports = require("@splunk/visualization-color-palettes");
5867
5959
 
5868
5960
  /***/ }),
5869
5961
 
5870
- /***/ 79:
5962
+ /***/ 78:
5871
5963
  /***/ (function(module, exports) {
5872
5964
 
5873
5965
  module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
5874
5966
 
5875
5967
  /***/ }),
5876
5968
 
5877
- /***/ 8:
5878
- /***/ (function(module, exports, __webpack_require__) {
5879
-
5880
- "use strict";
5881
-
5882
-
5883
- Object.defineProperty(exports, "__esModule", {
5884
- value: true
5885
- });
5886
- exports.VizBehavior = void 0;
5887
- var VizBehavior;
5888
-
5889
- (function (VizBehavior) {
5890
- /**
5891
- * Dynamic Options Behavior.
5892
- * This allows visualization options to be powered by data
5893
- *
5894
- * **Example**
5895
- *
5896
- * sparklineValues: ">primary|seriesByIndex(0)"
5897
- * would configure sparklineValues with an array of data points
5898
- * coming from the first series in the primary datasource
5899
- *
5900
- */
5901
- VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
5902
- VizBehavior["EVENTS"] = "events";
5903
- VizBehavior["DOWNSAMPLING"] = "downsampling";
5904
- /**
5905
- * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
5906
- * missing.
5907
- * @type {string}
5908
- */
5969
+ /***/ 79:
5970
+ /***/ (function(module, exports) {
5909
5971
 
5910
- VizBehavior["PLACEHOLDER"] = "placeholder";
5911
- VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
5912
- VizBehavior["TRELLIS"] = "trellis";
5913
- })(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
5972
+ module.exports = require("@splunk/themes");
5914
5973
 
5915
5974
  /***/ }),
5916
5975
 
5917
- /***/ 80:
5976
+ /***/ 8:
5918
5977
  /***/ (function(module, exports) {
5919
5978
 
5920
- module.exports = require("@splunk/themes");
5979
+ module.exports = require("@babel/runtime/helpers/classCallCheck");
5921
5980
 
5922
5981
  /***/ }),
5923
5982
 
5924
- /***/ 82:
5983
+ /***/ 81:
5925
5984
  /***/ (function(module, exports) {
5926
5985
 
5927
5986
  module.exports = require("@splunk/react-ui/Popover");
@@ -5931,7 +5990,7 @@ module.exports = require("@splunk/react-ui/Popover");
5931
5990
  /***/ 9:
5932
5991
  /***/ (function(module, exports) {
5933
5992
 
5934
- module.exports = require("@babel/runtime/helpers/classCallCheck");
5993
+ module.exports = require("@splunk/visualization-schemas");
5935
5994
 
5936
5995
  /***/ })
5937
5996