@splunk/visualizations 26.2.1 → 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 (150) hide show
  1. package/Area.config.js +92 -595
  2. package/Area.config.js.map +1 -1
  3. package/Area.js +296 -801
  4. package/Area.js.map +1 -1
  5. package/Bar.config.js +93 -562
  6. package/Bar.config.js.map +1 -1
  7. package/Bar.js +299 -770
  8. package/Bar.js.map +1 -1
  9. package/Bubble.config.js +84 -483
  10. package/Bubble.config.js.map +1 -1
  11. package/Bubble.js +286 -687
  12. package/Bubble.js.map +1 -1
  13. package/ChoroplethSvg.config.js +77 -202
  14. package/ChoroplethSvg.config.js.map +1 -1
  15. package/ChoroplethSvg.js +272 -400
  16. package/ChoroplethSvg.js.map +1 -1
  17. package/Column.config.js +93 -600
  18. package/Column.config.js.map +1 -1
  19. package/Column.js +299 -808
  20. package/Column.js.map +1 -1
  21. package/Ellipse.config.js +82 -200
  22. package/Ellipse.config.js.map +1 -1
  23. package/Ellipse.js +233 -356
  24. package/Ellipse.js.map +1 -1
  25. package/Events.config.js +62 -283
  26. package/Events.config.js.map +1 -1
  27. package/Events.js +326 -530
  28. package/Events.js.map +1 -1
  29. package/FillerGauge.config.js +91 -220
  30. package/FillerGauge.config.js.map +1 -1
  31. package/FillerGauge.js +267 -401
  32. package/FillerGauge.js.map +1 -1
  33. package/Image.config.js +61 -157
  34. package/Image.config.js.map +1 -1
  35. package/Image.js +217 -327
  36. package/Image.js.map +1 -1
  37. package/Line.config.js +92 -607
  38. package/Line.config.js.map +1 -1
  39. package/Line.js +297 -814
  40. package/Line.js.map +1 -1
  41. package/LinkGraph.config.js +75 -257
  42. package/LinkGraph.config.js.map +1 -1
  43. package/LinkGraph.js +1755 -17415
  44. package/LinkGraph.js.map +1 -1
  45. package/MIGRATION.md +6 -0
  46. package/Map.config.js +128 -1123
  47. package/Map.config.js.map +1 -1
  48. package/Map.js +470 -782
  49. package/Map.js.map +1 -1
  50. package/Markdown.config.js +62 -189
  51. package/Markdown.config.js.map +1 -1
  52. package/Markdown.js +272 -401
  53. package/Markdown.js.map +1 -1
  54. package/MarkerGauge.config.js +138 -298
  55. package/MarkerGauge.config.js.map +1 -1
  56. package/MarkerGauge.js +309 -470
  57. package/MarkerGauge.js.map +1 -1
  58. package/ParallelCoordinates.config.js +72 -192
  59. package/ParallelCoordinates.config.js.map +1 -1
  60. package/ParallelCoordinates.js +333 -442
  61. package/ParallelCoordinates.js.map +1 -1
  62. package/Pie.config.js +77 -241
  63. package/Pie.config.js.map +1 -1
  64. package/Pie.js +336 -471
  65. package/Pie.js.map +1 -1
  66. package/Punchcard.config.js +72 -306
  67. package/Punchcard.config.js.map +1 -1
  68. package/Punchcard.js +356 -583
  69. package/Punchcard.js.map +1 -1
  70. package/Rectangle.config.js +211 -347
  71. package/Rectangle.config.js.map +1 -1
  72. package/Rectangle.js +371 -509
  73. package/Rectangle.js.map +1 -1
  74. package/Sankey.config.js +72 -214
  75. package/Sankey.config.js.map +1 -1
  76. package/Sankey.js +343 -475
  77. package/Sankey.js.map +1 -1
  78. package/Scatter.config.js +86 -464
  79. package/Scatter.config.js.map +1 -1
  80. package/Scatter.js +1118 -1493
  81. package/Scatter.js.map +1 -1
  82. package/SingleValue.config.js +124 -411
  83. package/SingleValue.config.js.map +1 -1
  84. package/SingleValue.js +522 -789
  85. package/SingleValue.js.map +1 -1
  86. package/SingleValueBasic.js +73 -61
  87. package/SingleValueBasic.js.map +1 -1
  88. package/SingleValueIcon.config.js +123 -380
  89. package/SingleValueIcon.config.js.map +1 -1
  90. package/SingleValueIcon.js +508 -745
  91. package/SingleValueIcon.js.map +1 -1
  92. package/SingleValueRadial.config.js +121 -385
  93. package/SingleValueRadial.config.js.map +1 -1
  94. package/SingleValueRadial.js +1642 -1885
  95. package/SingleValueRadial.js.map +1 -1
  96. package/SparkLine.js +39 -39
  97. package/SparkLine.js.map +1 -1
  98. package/Table.config.js +82 -496
  99. package/Table.config.js.map +1 -1
  100. package/Table.js +416 -825
  101. package/Table.js.map +1 -1
  102. package/common/Charting.js +37 -57
  103. package/common/Charting.js.map +1 -1
  104. package/common/DocExampleWithVizSandbox.js +21 -21
  105. package/common/DocExampleWithVizSandbox.js.map +1 -1
  106. package/common/EventsDoc.js +18 -18
  107. package/common/EventsDoc.js.map +1 -1
  108. package/common/GaugeMajorTicks.js +4 -4
  109. package/common/GaugeMajorTicks.js.map +1 -1
  110. package/common/GaugeValueMarker.js +2 -2
  111. package/common/GaugeValueMarker.js.map +1 -1
  112. package/common/OptionsDoc.js +4 -4
  113. package/common/OptionsDoc.js.map +1 -1
  114. package/common/OverviewDoc.js +39 -40
  115. package/common/OverviewDoc.js.map +1 -1
  116. package/common/SplunkVisualization.js +2 -2
  117. package/common/SplunkVisualization.js.map +1 -1
  118. package/common/SplunkVisualizationApi.js +2 -2
  119. package/common/SplunkVisualizationApi.js.map +1 -1
  120. package/common/ThemesDoc.js +19 -19
  121. package/common/ThemesDoc.js.map +1 -1
  122. package/common/chartingUtils.js +2 -2
  123. package/common/chartingUtils.js.map +1 -1
  124. package/common/gaugeUtils.js +10 -10
  125. package/common/gaugeUtils.js.map +1 -1
  126. package/common/shapeUtils.js +10 -10
  127. package/common/shapeUtils.js.map +1 -1
  128. package/common/utils/configUtils.js +25 -155
  129. package/common/utils/configUtils.js.map +1 -1
  130. package/common/utils/dataUtils.js +87 -105
  131. package/common/utils/dataUtils.js.map +1 -1
  132. package/common/utils/featureFlagUtils.js +4 -4
  133. package/common/utils/featureFlagUtils.js.map +1 -1
  134. package/common/utils/hocUtils.js +2 -2
  135. package/common/utils/hocUtils.js.map +1 -1
  136. package/common/utils/mapUtils.js +51 -54
  137. package/common/utils/mapUtils.js.map +1 -1
  138. package/common/utils/singleValueUtils.js +30 -18
  139. package/common/utils/singleValueUtils.js.map +1 -1
  140. package/common/utils/testHelper.js +7 -36
  141. package/common/utils/testHelper.js.map +1 -1
  142. package/common/utils/trellisUtils.js +7 -6
  143. package/common/utils/trellisUtils.js.map +1 -1
  144. package/common/utils/urlUtils.js +2 -2
  145. package/common/utils/urlUtils.js.map +1 -1
  146. package/common/withDashboardViz.js +93 -101
  147. package/common/withDashboardViz.js.map +1 -1
  148. package/package.json +48 -50
  149. package/common/utils/layoutUtils.js +0 -115
  150. package/common/utils/layoutUtils.js.map +0 -1
package/Image.js CHANGED
@@ -87,32 +87,32 @@ module.exports =
87
87
  /******/
88
88
  /******/
89
89
  /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 243);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 237);
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 */
107
107
  /***/ (function(module, exports) {
108
108
 
109
- module.exports = require("@splunk/ui-utils/i18n");
109
+ module.exports = require("lodash");
110
110
 
111
111
  /***/ }),
112
112
  /* 3 */
113
113
  /***/ (function(module, exports) {
114
114
 
115
- module.exports = require("lodash");
115
+ module.exports = require("@splunk/ui-utils/i18n");
116
116
 
117
117
  /***/ }),
118
118
  /* 4 */
@@ -121,8 +121,19 @@ module.exports = require("lodash");
121
121
  module.exports = require("styled-components");
122
122
 
123
123
  /***/ }),
124
- /* 5 */,
124
+ /* 5 */
125
+ /***/ (function(module, exports) {
126
+
127
+ module.exports = require("@babel/runtime/helpers/slicedToArray");
128
+
129
+ /***/ }),
125
130
  /* 6 */
131
+ /***/ (function(module, exports) {
132
+
133
+ module.exports = require("@babel/runtime/helpers/toConsumableArray");
134
+
135
+ /***/ }),
136
+ /* 7 */
126
137
  /***/ (function(module, exports, __webpack_require__) {
127
138
 
128
139
  "use strict";
@@ -160,41 +171,35 @@ var VizBehavior;
160
171
  VizBehavior["TRELLIS"] = "trellis";
161
172
  })(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
162
173
 
163
- /***/ }),
164
- /* 7 */
165
- /***/ (function(module, exports) {
166
-
167
- module.exports = require("@babel/runtime/helpers/slicedToArray");
168
-
169
174
  /***/ }),
170
175
  /* 8 */
171
176
  /***/ (function(module, exports) {
172
177
 
173
- module.exports = require("@babel/runtime/helpers/toConsumableArray");
178
+ module.exports = require("@babel/runtime/helpers/classCallCheck");
174
179
 
175
180
  /***/ }),
176
181
  /* 9 */
177
182
  /***/ (function(module, exports) {
178
183
 
179
- module.exports = require("@babel/runtime/helpers/defineProperty");
184
+ module.exports = require("@splunk/visualization-schemas");
180
185
 
181
186
  /***/ }),
182
187
  /* 10 */
183
188
  /***/ (function(module, exports) {
184
189
 
185
- module.exports = require("@babel/runtime/helpers/classCallCheck");
190
+ module.exports = require("@splunk/visualizations-shared/numberUtils");
186
191
 
187
192
  /***/ }),
188
193
  /* 11 */
189
194
  /***/ (function(module, exports) {
190
195
 
191
- module.exports = require("@splunk/visualizations-shared/numberUtils");
196
+ module.exports = require("@splunk/visualizations-shared/Message");
192
197
 
193
198
  /***/ }),
194
199
  /* 12 */
195
200
  /***/ (function(module, exports) {
196
201
 
197
- module.exports = require("@splunk/visualizations-shared/Message");
202
+ module.exports = require("@babel/runtime/helpers/defineProperty");
198
203
 
199
204
  /***/ }),
200
205
  /* 13 */
@@ -214,9 +219,9 @@ Object.defineProperty(exports, "__esModule", {
214
219
  });
215
220
  exports.downsampleDataSources = exports.calculateDownsamplingThreshold = exports.calculateThresholdOnRangeSelect = exports.isDownsamplingEnabledForViz = exports.convertToArrOfObjects = void 0;
216
221
 
217
- var numberUtils_1 = __webpack_require__(11);
222
+ var numberUtils_1 = __webpack_require__(10);
218
223
 
219
- var interfaces_1 = __webpack_require__(40); // TODO: utilize this fn in ParallelCoordinates
224
+ var interfaces_1 = __webpack_require__(39); // TODO: utilize this fn in ParallelCoordinates
220
225
 
221
226
 
222
227
  var convertToArrOfObjects = function convertToArrOfObjects(columns, fields) {
@@ -351,19 +356,21 @@ var largestTriangleThreeBuckets = function largestTriangleThreeBuckets(data, thr
351
356
  */
352
357
 
353
358
 
354
- var strictlyCoerceYColumn = function strictlyCoerceYColumn(column) {
355
- // Splunk charting allows for numbers in formats such as negative hex that
359
+ var strictlyCoerceYColumn = function strictlyCoerceYColumn(column, options) {
360
+ var isNullCoercionEnabled = options.nullValueDisplay === 'zero'; // Splunk charting allows for numbers in formats such as negative hex that
356
361
  // Number() does not support and also allows loose coercion of hex numbers (but not other formats)
357
362
  // We want to identify columns which contain at least one value that can be loosely coerced
363
+
358
364
  var canLooselyCoerceSomeValues = column.findIndex(function (value) {
359
- return (0, numberUtils_1.startsWithNumber)("".concat(value));
365
+ return (0, numberUtils_1.startsWithNumber)("".concat(value)) || isNullCoercionEnabled && value === null;
360
366
  }) >= 0; // If not all values in column can be strictly coerced to a number, we do not downsample
361
367
 
362
368
  var coercedColumn = [];
363
369
  var canDownsampleColumn = !column.some(function (value) {
364
- var coercedValue = Number(value); // if it can't be parsed or isn't safe, fail
370
+ var coercedValue = Number(value);
371
+ var coerceValueToZero = isNullCoercionEnabled && value === null; // if it can't be parsed or isn't safe, fail
365
372
 
366
- if (Number.isNaN(coercedValue) || coercedValue <= Number.MIN_SAFE_INTEGER || coercedValue >= Number.MAX_SAFE_INTEGER || typeof value !== 'string' && typeof value !== 'number') {
373
+ if (Number.isNaN(coercedValue) || coercedValue <= Number.MIN_SAFE_INTEGER || coercedValue >= Number.MAX_SAFE_INTEGER || typeof value !== 'string' && typeof value !== 'number' && !coerceValueToZero) {
367
374
  return true;
368
375
  } // save value and continue to next
369
376
 
@@ -444,8 +451,7 @@ var calculateDownsamplingThreshold = function calculateDownsamplingThreshold(_re
444
451
  dataSources = _ref3.dataSources,
445
452
  selectChartEvent = _ref3.selectChartEvent,
446
453
  width = _ref3.width,
447
- xField = _ref3.xField,
448
- y2Fields = _ref3.y2Fields;
454
+ xField = _ref3.xField;
449
455
 
450
456
  var _a, _b, _c;
451
457
 
@@ -482,14 +488,7 @@ var calculateDownsamplingThreshold = function calculateDownsamplingThreshold(_re
482
488
  });
483
489
  var lastIndex = fullSeries.findIndex(function (x) {
484
490
  return downsampledSeries[endXIndex] === x;
485
- }); // For charts with categorical x-axis (charts with an xField that isn't _time), do not support
486
- // re-calculating downsampling threshold if the chart is zoomed in until SPL-259458 is fixed
487
- // Also do not support re-calculating downsampling threshold for zoomed-in charts with y2
488
- // until SPL-259611 is fixed
489
-
490
- if (xField !== '_time' || (y2Fields === null || y2Fields === void 0 ? void 0 : y2Fields.length)) {
491
- return firstIndex === 0 && lastIndex === fullSeries.length - 1 ? width : null;
492
- }
491
+ });
493
492
 
494
493
  if (firstIndex >= 0 && lastIndex >= 0 && firstIndex <= lastIndex) {
495
494
  return (0, exports.calculateThresholdOnRangeSelect)({
@@ -500,6 +499,7 @@ var calculateDownsamplingThreshold = function calculateDownsamplingThreshold(_re
500
499
  });
501
500
  }
502
501
  } catch (e) {
502
+ // eslint-disable-next-line no-console
503
503
  console.error('Error occurred while setting downsample threshold on range select event', e);
504
504
  }
505
505
 
@@ -538,7 +538,7 @@ var isColumnStrictlyIncreasing = function isColumnStrictlyIncreasing(column, fie
538
538
  */
539
539
 
540
540
 
541
- var tryToCoerceAllDisplayedFields = function tryToCoerceAllDisplayedFields(ds, xField, yFields, fieldTypes) {
541
+ var tryToCoerceAllDisplayedFields = function tryToCoerceAllDisplayedFields(ds, xField, yFields, fieldTypes, options) {
542
542
  var xColumn = [];
543
543
  var yColumns = [];
544
544
  var canDownsample = !ds.data.fields.some(function (field, index) {
@@ -552,7 +552,7 @@ var tryToCoerceAllDisplayedFields = function tryToCoerceAllDisplayedFields(ds, x
552
552
  if (fieldName === xField) {
553
553
  xColumn = strictlyCoerceXColumn(column, fieldType);
554
554
  } else if (yFields.has(fieldName)) {
555
- var _strictlyCoerceYColum = strictlyCoerceYColumn(ds.data.columns[index]),
555
+ var _strictlyCoerceYColum = strictlyCoerceYColumn(ds.data.columns[index], options),
556
556
  coercedColumn = _strictlyCoerceYColum.coercedColumn,
557
557
  canLooselyCoerceSomeValues = _strictlyCoerceYColum.canLooselyCoerceSomeValues,
558
558
  canDownsampleColumn = _strictlyCoerceYColum.canDownsampleColumn; // do not perform downsampling if a column can possibly be displayed but cannot
@@ -642,7 +642,7 @@ var downsampleDataSources = function downsampleDataSources(_ref4) {
642
642
  return dataSources;
643
643
  }
644
644
 
645
- var _tryToCoerceAllDispla = tryToCoerceAllDisplayedFields(primaryDS, xField, nonInternalYFields, fieldTypes),
645
+ var _tryToCoerceAllDispla = tryToCoerceAllDisplayedFields(primaryDS, xField, nonInternalYFields, fieldTypes, options),
646
646
  xColumn = _tryToCoerceAllDispla.xColumn,
647
647
  yColumns = _tryToCoerceAllDispla.yColumns;
648
648
 
@@ -666,6 +666,7 @@ var downsampleDataSources = function downsampleDataSources(_ref4) {
666
666
  return downsampledIndices.add(downsampleIndex);
667
667
  });
668
668
  } catch (e) {
669
+ // eslint-disable-next-line no-console
669
670
  console.error("Error occurred while downsampling column ".concat(columnIndex), e);
670
671
  }
671
672
  }); // update data columns with downsampled columns
@@ -695,13 +696,13 @@ module.exports = require("@splunk/visualization-encoding/Options");
695
696
  "use strict";
696
697
 
697
698
 
698
- var _slicedToArray = __webpack_require__(7);
699
+ var _slicedToArray = __webpack_require__(5);
699
700
 
700
701
  Object.defineProperty(exports, "__esModule", {
701
702
  value: true
702
703
  });
703
704
 
704
- var React = __webpack_require__(0);
705
+ var React = __webpack_require__(1);
705
706
 
706
707
  var styled_components_1 = __webpack_require__(4);
707
708
 
@@ -709,7 +710,7 @@ var style_1 = __webpack_require__(18);
709
710
 
710
711
  var colorUtils_1 = __webpack_require__(15);
711
712
 
712
- var SizeAwareWrapper_1 = __webpack_require__(26);
713
+ var SizeAwareWrapper_1 = __webpack_require__(25);
713
714
 
714
715
  var Item = styled_components_1.default.div.attrs(function (_ref) {
715
716
  var width = _ref.width;
@@ -780,7 +781,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
780
781
 
781
782
  return React.createElement(FixSizeItem, {
782
783
  "data-test": "fix-size-item",
783
- "data-splunk-visualization-version": "26.2.1 - 714383dbb",
784
+ "data-splunk-visualization-version": "26.4.0 - 04078274d",
784
785
  width: width,
785
786
  height: height,
786
787
  backgroundColor: backgroundColor
@@ -807,7 +808,8 @@ exports.default = withFixedSizeContainer;
807
808
  module.exports = require("@splunk/visualizations-shared/style");
808
809
 
809
810
  /***/ }),
810
- /* 19 */
811
+ /* 19 */,
812
+ /* 20 */
811
813
  /***/ (function(module, exports, __webpack_require__) {
812
814
 
813
815
  "use strict";
@@ -816,22 +818,20 @@ module.exports = require("@splunk/visualizations-shared/style");
816
818
  Object.defineProperty(exports, "__esModule", {
817
819
  value: true
818
820
  });
819
- exports.validOutputModes = exports.validSegmentationModes = exports.validSortDirs = void 0;
821
+ exports.validOutputModes = exports.validSortDirs = void 0;
820
822
  exports.validSortDirs = ['asc', 'desc', 'none'];
821
- exports.validSegmentationModes = ['none', 'inner'];
822
823
  exports.validOutputModes = ['json_cols', 'json'];
823
824
 
824
825
  /***/ }),
825
- /* 20 */,
826
826
  /* 21 */
827
827
  /***/ (function(module, exports, __webpack_require__) {
828
828
 
829
829
  "use strict";
830
830
 
831
831
 
832
- var _classCallCheck = __webpack_require__(10);
832
+ var _classCallCheck = __webpack_require__(8);
833
833
 
834
- var _createClass = __webpack_require__(25);
834
+ var _createClass = __webpack_require__(24);
835
835
 
836
836
  Object.defineProperty(exports, "__esModule", {
837
837
  value: true
@@ -923,120 +923,39 @@ exports.extendStaticWrapperProps = extendStaticWrapperProps;
923
923
  /* 24 */
924
924
  /***/ (function(module, exports) {
925
925
 
926
- module.exports = require("@splunk/visualizations-shared/schemaUtils");
927
-
928
- /***/ }),
929
- /* 25 */
930
- /***/ (function(module, exports) {
931
-
932
926
  module.exports = require("@babel/runtime/helpers/createClass");
933
927
 
934
928
  /***/ }),
935
- /* 26 */
929
+ /* 25 */
936
930
  /***/ (function(module, exports) {
937
931
 
938
932
  module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
939
933
 
940
934
  /***/ }),
941
- /* 27 */
935
+ /* 26 */
942
936
  /***/ (function(module, exports, __webpack_require__) {
943
937
 
944
938
  "use strict";
945
939
 
946
940
 
947
- var _toConsumableArray = __webpack_require__(8);
948
-
949
- var _defineProperty = __webpack_require__(9);
950
-
951
- var __rest = this && this.__rest || function (s, e) {
952
- var t = {};
953
-
954
- for (var p in s) {
955
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
956
- }
957
-
958
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
959
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
960
- }
961
- return t;
962
- };
941
+ var _toConsumableArray = __webpack_require__(6);
963
942
 
964
943
  Object.defineProperty(exports, "__esModule", {
965
944
  value: true
966
945
  });
967
- exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
946
+ exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceConfig = exports.enhanceOptionsSchemaWithDynamicOptions = void 0;
968
947
 
969
- var lodash_1 = __webpack_require__(3);
948
+ var lodash_1 = __webpack_require__(2); // included for backwards compatibility
970
949
 
971
- var schemaUtils_1 = __webpack_require__(24);
972
950
 
973
- var VizBehavior_1 = __webpack_require__(6);
974
-
975
- var dynamicOptionsDSLType = {
976
- type: 'string',
977
- pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
978
- };
979
- /**
980
- * Helper function to extend an options schema with dynamic options DSL
981
- * @param optionsSchema a visualization's options schema
982
- * @returns an updated options schema that additionally allows strings starting with > for each option
983
- */
984
-
985
- function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
986
- var enhancedOptionsSchema = {};
987
- Object.keys(optionsSchema).forEach(function (key) {
988
- var _a = optionsSchema[key],
989
- title = _a.title,
990
- description = _a.description,
991
- readOnly = _a.readOnly,
992
- writeOnly = _a.writeOnly,
993
- examples = _a.examples,
994
- defaultValue = _a.default,
995
- type = _a.type,
996
- properties = _a.properties,
997
- patternProperties = _a.patternProperties,
998
- remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
999
-
1000
- var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
1001
- title: title
1002
- }), description !== undefined && {
1003
- description: description
1004
- }), readOnly !== undefined && {
1005
- readOnly: readOnly
1006
- }), writeOnly !== undefined && {
1007
- writeOnly: writeOnly
1008
- }), examples !== undefined && {
1009
- examples: examples
1010
- }), defaultValue !== undefined && {
1011
- default: defaultValue
1012
- });
1013
-
1014
- if (type === 'object') {
1015
- enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
1016
- type: type
1017
- }), properties && {
1018
- properties: enhanceOptionsSchemaWithDynamicOptions(properties)
1019
- });
1020
-
1021
- if (patternProperties) {
1022
- var enhancedPatternProperties = {};
1023
- Object.keys(patternProperties).forEach(function (opt) {
1024
- enhancedPatternProperties = Object.assign(Object.assign({}, enhancedPatternProperties), enhanceOptionsSchemaWithDynamicOptions(_defineProperty({}, opt, patternProperties[opt])));
1025
- });
1026
- enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;
1027
- }
1028
- } else {
1029
- enhancedOptionsSchema[key] = Object.assign(Object.assign({}, annotations), {
1030
- anyOf: [Object.assign(Object.assign({}, type !== undefined && {
1031
- type: type
1032
- }), remainingSchemaEntry), dynamicOptionsDSLType]
1033
- });
1034
- }
1035
- });
1036
- return enhancedOptionsSchema;
1037
- }
951
+ var visualization_schemas_1 = __webpack_require__(9);
1038
952
 
1039
- exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
953
+ Object.defineProperty(exports, "enhanceOptionsSchemaWithDynamicOptions", {
954
+ enumerable: true,
955
+ get: function get() {
956
+ return visualization_schemas_1.enhanceOptionsSchemaWithDynamicOptions;
957
+ }
958
+ });
1040
959
  /**
1041
960
  * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
1042
961
  * this function also collapse all editor panels
@@ -1047,11 +966,6 @@ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamic
1047
966
 
1048
967
  function enhanceConfig(vizConfig) {
1049
968
  var enhancedConfig = Object.assign({}, vizConfig);
1050
-
1051
- if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
1052
- enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
1053
- }
1054
-
1055
969
  enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
1056
970
  return Object.assign(Object.assign({}, config), {
1057
971
  open: config.open || false
@@ -1174,27 +1088,27 @@ var insertLayout = function insertLayout(layout, index) {
1174
1088
  exports.insertLayout = insertLayout;
1175
1089
 
1176
1090
  /***/ }),
1177
- /* 28 */
1091
+ /* 27 */
1178
1092
  /***/ (function(module, exports) {
1179
1093
 
1180
1094
  module.exports = require("@splunk/visualization-context/FeatureFlagContext");
1181
1095
 
1182
1096
  /***/ }),
1097
+ /* 28 */,
1183
1098
  /* 29 */,
1184
- /* 30 */,
1185
- /* 31 */
1099
+ /* 30 */
1186
1100
  /***/ (function(module, exports) {
1187
1101
 
1188
1102
  module.exports = require("@splunk/ui-utils/id");
1189
1103
 
1190
1104
  /***/ }),
1191
- /* 32 */
1105
+ /* 31 */
1192
1106
  /***/ (function(module, exports) {
1193
1107
 
1194
1108
  module.exports = require("@splunk/visualization-context/TimezoneContext");
1195
1109
 
1196
1110
  /***/ }),
1197
- /* 33 */
1111
+ /* 32 */
1198
1112
  /***/ (function(module, exports, __webpack_require__) {
1199
1113
 
1200
1114
  "use strict";
@@ -1204,7 +1118,7 @@ Object.defineProperty(exports, "__esModule", {
1204
1118
  value: true
1205
1119
  });
1206
1120
 
1207
- var react_1 = __webpack_require__(0);
1121
+ var react_1 = __webpack_require__(1);
1208
1122
 
1209
1123
  function usePrevious(value) {
1210
1124
  var ref = (0, react_1.useRef)();
@@ -1217,20 +1131,20 @@ function usePrevious(value) {
1217
1131
  exports.default = usePrevious;
1218
1132
 
1219
1133
  /***/ }),
1220
- /* 34 */
1134
+ /* 33 */
1221
1135
  /***/ (function(module, exports) {
1222
1136
 
1223
1137
  module.exports = require("@splunk/visualizations-shared/hocUtils");
1224
1138
 
1225
1139
  /***/ }),
1226
- /* 35 */
1140
+ /* 34 */
1227
1141
  /***/ (function(module, exports) {
1228
1142
 
1229
1143
  module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
1230
1144
 
1231
1145
  /***/ }),
1232
- /* 36 */,
1233
- /* 37 */
1146
+ /* 35 */,
1147
+ /* 36 */
1234
1148
  /***/ (function(module, exports, __webpack_require__) {
1235
1149
 
1236
1150
  "use strict";
@@ -1241,15 +1155,15 @@ Object.defineProperty(exports, "__esModule", {
1241
1155
  });
1242
1156
  exports.shouldShowIconPlaceholder = void 0;
1243
1157
 
1244
- var React = __webpack_require__(0);
1158
+ var React = __webpack_require__(1);
1245
1159
 
1246
- var T = __webpack_require__(1);
1160
+ var T = __webpack_require__(0);
1247
1161
 
1248
- var lodash_1 = __webpack_require__(3);
1162
+ var lodash_1 = __webpack_require__(2);
1249
1163
 
1250
- var i18n_1 = __webpack_require__(2);
1164
+ var i18n_1 = __webpack_require__(3);
1251
1165
 
1252
- var Message_1 = __webpack_require__(12);
1166
+ var Message_1 = __webpack_require__(11);
1253
1167
 
1254
1168
  var FixedSizeContainer_1 = __webpack_require__(17);
1255
1169
  /**
@@ -1322,24 +1236,24 @@ IconPlaceholder.defaultProps = {
1322
1236
  exports.default = (0, FixedSizeContainer_1.default)(IconPlaceholder);
1323
1237
 
1324
1238
  /***/ }),
1325
- /* 38 */
1239
+ /* 37 */
1326
1240
  /***/ (function(module, exports, __webpack_require__) {
1327
1241
 
1328
1242
  "use strict";
1329
1243
 
1330
1244
 
1331
- var _defineProperty = __webpack_require__(9);
1245
+ var _defineProperty = __webpack_require__(12);
1332
1246
 
1333
1247
  Object.defineProperty(exports, "__esModule", {
1334
1248
  value: true
1335
1249
  });
1336
1250
  exports.getSortingParams = exports.SortParamsPropTypes = void 0;
1337
1251
 
1338
- var T = __webpack_require__(1);
1252
+ var T = __webpack_require__(0);
1339
1253
 
1340
- var lodash_1 = __webpack_require__(3);
1254
+ var lodash_1 = __webpack_require__(2);
1341
1255
 
1342
- var DataSource_1 = __webpack_require__(19);
1256
+ var DataSource_1 = __webpack_require__(20);
1343
1257
 
1344
1258
  exports.SortParamsPropTypes = T.shape({
1345
1259
  currentSortKey: T.string,
@@ -1392,7 +1306,7 @@ var getSortingParams = function getSortingParams(_ref) {
1392
1306
  exports.getSortingParams = getSortingParams;
1393
1307
 
1394
1308
  /***/ }),
1395
- /* 39 */
1309
+ /* 38 */
1396
1310
  /***/ (function(module, exports, __webpack_require__) {
1397
1311
 
1398
1312
  "use strict";
@@ -1403,9 +1317,9 @@ Object.defineProperty(exports, "__esModule", {
1403
1317
  });
1404
1318
  exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
1405
1319
 
1406
- var T = __webpack_require__(1);
1320
+ var T = __webpack_require__(0);
1407
1321
 
1408
- var lodash_1 = __webpack_require__(3);
1322
+ var lodash_1 = __webpack_require__(2);
1409
1323
 
1410
1324
  exports.PaginatorParamsPropTypes = T.shape({
1411
1325
  isPaging: T.bool,
@@ -1456,7 +1370,7 @@ var getPaginationParams = function getPaginationParams(_ref) {
1456
1370
  exports.getPaginationParams = getPaginationParams;
1457
1371
 
1458
1372
  /***/ }),
1459
- /* 40 */
1373
+ /* 39 */
1460
1374
  /***/ (function(module, exports, __webpack_require__) {
1461
1375
 
1462
1376
  "use strict";
@@ -1491,11 +1405,13 @@ Object.defineProperty(exports, "__esModule", {
1491
1405
  value: true
1492
1406
  });
1493
1407
 
1408
+ __exportStar(__webpack_require__(40), exports);
1409
+
1494
1410
  __exportStar(__webpack_require__(41), exports);
1495
1411
 
1496
- __exportStar(__webpack_require__(42), exports);
1412
+ __exportStar(__webpack_require__(20), exports);
1497
1413
 
1498
- __exportStar(__webpack_require__(19), exports);
1414
+ __exportStar(__webpack_require__(42), exports);
1499
1415
 
1500
1416
  __exportStar(__webpack_require__(43), exports);
1501
1417
 
@@ -1507,16 +1423,16 @@ __exportStar(__webpack_require__(46), exports);
1507
1423
 
1508
1424
  __exportStar(__webpack_require__(47), exports);
1509
1425
 
1510
- __exportStar(__webpack_require__(48), exports);
1511
-
1512
- __exportStar(__webpack_require__(49), exports);
1513
-
1514
1426
  __exportStar(__webpack_require__(21), exports);
1515
1427
 
1516
- __exportStar(__webpack_require__(6), exports);
1428
+ __exportStar(__webpack_require__(7), exports);
1517
1429
 
1518
1430
  __exportStar(__webpack_require__(22), exports);
1519
1431
 
1432
+ __exportStar(__webpack_require__(48), exports);
1433
+
1434
+ __exportStar(__webpack_require__(49), exports);
1435
+
1520
1436
  __exportStar(__webpack_require__(50), exports);
1521
1437
 
1522
1438
  __exportStar(__webpack_require__(51), exports);
@@ -1525,9 +1441,16 @@ __exportStar(__webpack_require__(52), exports);
1525
1441
 
1526
1442
  __exportStar(__webpack_require__(53), exports);
1527
1443
 
1528
- __exportStar(__webpack_require__(54), exports);
1444
+ /***/ }),
1445
+ /* 40 */
1446
+ /***/ (function(module, exports, __webpack_require__) {
1447
+
1448
+ "use strict";
1449
+
1529
1450
 
1530
- __exportStar(__webpack_require__(55), exports);
1451
+ Object.defineProperty(exports, "__esModule", {
1452
+ value: true
1453
+ });
1531
1454
 
1532
1455
  /***/ }),
1533
1456
  /* 41 */
@@ -1535,6 +1458,9 @@ __exportStar(__webpack_require__(55), exports);
1535
1458
 
1536
1459
  "use strict";
1537
1460
 
1461
+ /**
1462
+ * A data structure used at runtime to wire up a visualization.
1463
+ */
1538
1464
 
1539
1465
  Object.defineProperty(exports, "__esModule", {
1540
1466
  value: true
@@ -1546,9 +1472,6 @@ Object.defineProperty(exports, "__esModule", {
1546
1472
 
1547
1473
  "use strict";
1548
1474
 
1549
- /**
1550
- * A data structure used at runtime to wire up a visualization.
1551
- */
1552
1475
 
1553
1476
  Object.defineProperty(exports, "__esModule", {
1554
1477
  value: true
@@ -1682,81 +1605,59 @@ Object.defineProperty(exports, "__esModule", {
1682
1605
  "use strict";
1683
1606
 
1684
1607
 
1685
- Object.defineProperty(exports, "__esModule", {
1686
- value: true
1687
- });
1688
-
1689
- /***/ }),
1690
- /* 55 */
1691
- /***/ (function(module, exports, __webpack_require__) {
1692
-
1693
- "use strict";
1694
-
1695
-
1696
- Object.defineProperty(exports, "__esModule", {
1697
- value: true
1698
- });
1699
-
1700
- /***/ }),
1701
- /* 56 */
1702
- /***/ (function(module, exports, __webpack_require__) {
1703
-
1704
- "use strict";
1705
-
1706
-
1707
- var _slicedToArray = __webpack_require__(7);
1608
+ var _slicedToArray = __webpack_require__(5);
1708
1609
 
1709
1610
  Object.defineProperty(exports, "__esModule", {
1710
1611
  value: true
1711
1612
  });
1712
1613
 
1713
- var React = __webpack_require__(0);
1614
+ var React = __webpack_require__(1);
1714
1615
 
1715
- var lodash_1 = __webpack_require__(3);
1616
+ var lodash_1 = __webpack_require__(2);
1716
1617
 
1717
- var getSettingsFromThemedProps_1 = __webpack_require__(57);
1618
+ var getSettingsFromThemedProps_1 = __webpack_require__(55);
1718
1619
 
1719
1620
  var Options_1 = __webpack_require__(16);
1720
1621
 
1721
- var SanitizeProps_1 = __webpack_require__(58);
1622
+ var SanitizeProps_1 = __webpack_require__(56);
1722
1623
 
1723
- var TimezoneContext_1 = __webpack_require__(32);
1624
+ var TimezoneContext_1 = __webpack_require__(31);
1724
1625
 
1725
- var moment_1 = __webpack_require__(59);
1626
+ var moment_1 = __webpack_require__(57);
1726
1627
 
1727
- var FeatureFlagContext_1 = __webpack_require__(28);
1628
+ var FeatureFlagContext_1 = __webpack_require__(27);
1728
1629
 
1729
1630
  var styled_components_1 = __webpack_require__(4);
1730
1631
 
1731
- var hocUtils_1 = __webpack_require__(34);
1632
+ var hocUtils_1 = __webpack_require__(33);
1732
1633
 
1733
- var JSONSchemaUtils_1 = __webpack_require__(35);
1634
+ var JSONSchemaUtils_1 = __webpack_require__(34);
1734
1635
 
1735
- var async_dynamic_options_evaluator_1 = __webpack_require__(60);
1636
+ var async_dynamic_options_evaluator_1 = __webpack_require__(58);
1736
1637
 
1737
- var id_1 = __webpack_require__(31);
1638
+ var id_1 = __webpack_require__(30);
1738
1639
 
1739
- var SplunkVisualization_1 = __webpack_require__(61);
1640
+ var SplunkVisualization_1 = __webpack_require__(59);
1740
1641
 
1741
- var VizBehavior_1 = __webpack_require__(6);
1642
+ var VizBehavior_1 = __webpack_require__(7);
1742
1643
 
1743
- var getSorting_1 = __webpack_require__(38);
1644
+ var getSorting_1 = __webpack_require__(37);
1744
1645
 
1745
- var getPagination_1 = __webpack_require__(39);
1646
+ var getPagination_1 = __webpack_require__(38);
1746
1647
 
1747
- var useDeepMemo_1 = __webpack_require__(62);
1648
+ var useDeepMemo_1 = __webpack_require__(60);
1748
1649
 
1749
- var MissingPropsMessage_1 = __webpack_require__(63);
1650
+ var MissingPropsMessage_1 = __webpack_require__(61);
1750
1651
 
1751
- var withEditModeCover_1 = __webpack_require__(64);
1652
+ var withEditModeCover_1 = __webpack_require__(62);
1752
1653
 
1753
- var withPlaceholder_1 = __webpack_require__(65);
1654
+ var withPlaceholder_1 = __webpack_require__(63);
1754
1655
 
1755
- var useDownsampleDataSources_1 = __webpack_require__(66);
1656
+ var useDownsampleDataSources_1 = __webpack_require__(64);
1756
1657
 
1757
1658
  var dataUtils_1 = __webpack_require__(14);
1758
1659
 
1759
- var featureFlagUtils_1 = __webpack_require__(68);
1660
+ var featureFlagUtils_1 = __webpack_require__(66);
1760
1661
  /**
1761
1662
  * hoc that wraps a pure react visualization in a Dashboard visualization
1762
1663
  * @param {DashboardVizOpts} opts
@@ -2088,37 +1989,37 @@ var withDashboardViz = function withDashboardViz(opts) {
2088
1989
  exports.default = withDashboardViz;
2089
1990
 
2090
1991
  /***/ }),
2091
- /* 57 */
1992
+ /* 55 */
2092
1993
  /***/ (function(module, exports) {
2093
1994
 
2094
1995
  module.exports = require("@splunk/themes/getSettingsFromThemedProps");
2095
1996
 
2096
1997
  /***/ }),
2097
- /* 58 */
1998
+ /* 56 */
2098
1999
  /***/ (function(module, exports) {
2099
2000
 
2100
2001
  module.exports = require("@splunk/visualizations-shared/SanitizeProps");
2101
2002
 
2102
2003
  /***/ }),
2103
- /* 59 */
2004
+ /* 57 */
2104
2005
  /***/ (function(module, exports) {
2105
2006
 
2106
2007
  module.exports = require("@splunk/moment");
2107
2008
 
2108
2009
  /***/ }),
2109
- /* 60 */
2010
+ /* 58 */
2110
2011
  /***/ (function(module, exports) {
2111
2012
 
2112
2013
  module.exports = require("@splunk/async-dynamic-options-evaluator");
2113
2014
 
2114
2015
  /***/ }),
2115
- /* 61 */
2016
+ /* 59 */
2116
2017
  /***/ (function(module, exports, __webpack_require__) {
2117
2018
 
2118
2019
  "use strict";
2119
2020
 
2120
2021
 
2121
- var _classCallCheck = __webpack_require__(10);
2022
+ var _classCallCheck = __webpack_require__(8);
2122
2023
 
2123
2024
  Object.defineProperty(exports, "__esModule", {
2124
2025
  value: true
@@ -2126,9 +2027,9 @@ Object.defineProperty(exports, "__esModule", {
2126
2027
  exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
2127
2028
  /* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
2128
2029
 
2129
- var T = __webpack_require__(1);
2030
+ var T = __webpack_require__(0);
2130
2031
 
2131
- var lodash_1 = __webpack_require__(3);
2032
+ var lodash_1 = __webpack_require__(2);
2132
2033
 
2133
2034
  var VizActionHandler_1 = __webpack_require__(21); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
2134
2035
 
@@ -2263,7 +2164,7 @@ SplunkVisualization.defaultProps = {
2263
2164
  exports.default = SplunkVisualization;
2264
2165
 
2265
2166
  /***/ }),
2266
- /* 62 */
2167
+ /* 60 */
2267
2168
  /***/ (function(module, exports, __webpack_require__) {
2268
2169
 
2269
2170
  "use strict";
@@ -2274,9 +2175,9 @@ Object.defineProperty(exports, "__esModule", {
2274
2175
  });
2275
2176
  exports.useDeepMemo = void 0;
2276
2177
 
2277
- var react_1 = __webpack_require__(0);
2178
+ var react_1 = __webpack_require__(1);
2278
2179
 
2279
- var lodash_1 = __webpack_require__(3);
2180
+ var lodash_1 = __webpack_require__(2);
2280
2181
  /**
2281
2182
  * This hook evaluates and stores the result of a passed function and only
2282
2183
  * re-evaluates the function when passed dependencies change.
@@ -2308,7 +2209,7 @@ var useDeepMemo = function useDeepMemo(fn, dependencies) {
2308
2209
  exports.useDeepMemo = useDeepMemo;
2309
2210
 
2310
2211
  /***/ }),
2311
- /* 63 */
2212
+ /* 61 */
2312
2213
  /***/ (function(module, exports, __webpack_require__) {
2313
2214
 
2314
2215
  "use strict";
@@ -2319,13 +2220,13 @@ Object.defineProperty(exports, "__esModule", {
2319
2220
  });
2320
2221
  exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
2321
2222
 
2322
- var React = __webpack_require__(0);
2223
+ var React = __webpack_require__(1);
2323
2224
 
2324
- var T = __webpack_require__(1);
2225
+ var T = __webpack_require__(0);
2325
2226
 
2326
- var i18n_1 = __webpack_require__(2);
2227
+ var i18n_1 = __webpack_require__(3);
2327
2228
 
2328
- var Message_1 = __webpack_require__(12);
2229
+ var Message_1 = __webpack_require__(11);
2329
2230
 
2330
2231
  var FixedSizeContainer_1 = __webpack_require__(17);
2331
2232
  /**
@@ -2388,7 +2289,7 @@ exports.MissingPropsMessage.defaultProps = {
2388
2289
  exports.default = (0, FixedSizeContainer_1.default)(exports.MissingPropsMessage);
2389
2290
 
2390
2291
  /***/ }),
2391
- /* 64 */
2292
+ /* 62 */
2392
2293
  /***/ (function(module, exports, __webpack_require__) {
2393
2294
 
2394
2295
  "use strict";
@@ -2398,7 +2299,7 @@ Object.defineProperty(exports, "__esModule", {
2398
2299
  value: true
2399
2300
  });
2400
2301
 
2401
- var React = __webpack_require__(0);
2302
+ var React = __webpack_require__(1);
2402
2303
 
2403
2304
  var styled_components_1 = __webpack_require__(4);
2404
2305
 
@@ -2409,7 +2310,7 @@ var Cover = styled_components_1.default.div.withConfig({
2409
2310
  componentId: "sc-1gsbnxb-0"
2410
2311
  })(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
2411
2312
  var Blocker = styled_components_1.default.div.attrs({
2412
- 'data-splunk-visualization-version': "26.2.1 - 714383dbb"
2313
+ 'data-splunk-visualization-version': "26.4.0 - 04078274d"
2413
2314
  }).withConfig({
2414
2315
  displayName: "withEditModeCover__Blocker",
2415
2316
  componentId: "sc-1gsbnxb-1"
@@ -2440,7 +2341,7 @@ var withEditModeCover = function withEditModeCover(Visualization, disableEditMod
2440
2341
  exports.default = withEditModeCover;
2441
2342
 
2442
2343
  /***/ }),
2443
- /* 65 */
2344
+ /* 63 */
2444
2345
  /***/ (function(module, exports, __webpack_require__) {
2445
2346
 
2446
2347
  "use strict";
@@ -2450,15 +2351,15 @@ Object.defineProperty(exports, "__esModule", {
2450
2351
  value: true
2451
2352
  });
2452
2353
 
2453
- var React = __webpack_require__(0);
2354
+ var React = __webpack_require__(1);
2454
2355
 
2455
2356
  var colorUtils_1 = __webpack_require__(15);
2456
2357
 
2457
2358
  var variables_1 = __webpack_require__(13);
2458
2359
 
2459
- var IconPlaceholder_1 = __webpack_require__(37);
2360
+ var IconPlaceholder_1 = __webpack_require__(36);
2460
2361
 
2461
- var VizBehavior_1 = __webpack_require__(6);
2362
+ var VizBehavior_1 = __webpack_require__(7);
2462
2363
 
2463
2364
  var hocUtils_1 = __webpack_require__(23);
2464
2365
 
@@ -2504,27 +2405,30 @@ var withPlaceholder = function withPlaceholder(Visualization) {
2504
2405
  exports.default = withPlaceholder;
2505
2406
 
2506
2407
  /***/ }),
2507
- /* 66 */
2408
+ /* 64 */
2508
2409
  /***/ (function(module, exports, __webpack_require__) {
2509
2410
 
2510
2411
  "use strict";
2511
2412
 
2512
2413
 
2513
- var _slicedToArray = __webpack_require__(7);
2414
+ var _slicedToArray = __webpack_require__(5);
2514
2415
 
2515
2416
  Object.defineProperty(exports, "__esModule", {
2516
2417
  value: true
2517
2418
  });
2518
2419
 
2519
- var react_1 = __webpack_require__(0);
2420
+ var react_1 = __webpack_require__(1);
2520
2421
 
2521
- var lodash_1 = __webpack_require__(3);
2422
+ var lodash_1 = __webpack_require__(2);
2522
2423
 
2523
2424
  var dataUtils_1 = __webpack_require__(14);
2524
2425
 
2525
- var usePrevious_1 = __webpack_require__(33);
2426
+ var usePrevious_1 = __webpack_require__(32);
2427
+
2428
+ var useGetXAndYFields_1 = __webpack_require__(65); // Options properties which impact/require re-downsample on change.
2429
+
2526
2430
 
2527
- var useGetXAndYFields_1 = __webpack_require__(67);
2431
+ var downsampleVizOptionProperties = ['nullValueDisplay'];
2528
2432
 
2529
2433
  var useDownsampleDataSources = function useDownsampleDataSources(_ref) {
2530
2434
  var dataSources = _ref.dataSources,
@@ -2538,8 +2442,15 @@ var useDownsampleDataSources = function useDownsampleDataSources(_ref) {
2538
2442
  options: options,
2539
2443
  context: context,
2540
2444
  dataSources: dataSources
2541
- });
2542
- var previousXAndYFieldsWithTypes = (0, usePrevious_1.default)(xAndYFieldsWithTypes);
2445
+ }); // Extract viz options that impact downsampling.
2446
+
2447
+ var downsampleVizOptions = (0, react_1.useMemo)(function () {
2448
+ return (0, lodash_1.pick)(options, downsampleVizOptionProperties);
2449
+ }, [options]);
2450
+ var downsampleDSOptions = (0, react_1.useMemo)(function () {
2451
+ return Object.assign(Object.assign({}, downsampleVizOptions), xAndYFieldsWithTypes);
2452
+ }, [xAndYFieldsWithTypes, downsampleVizOptions]);
2453
+ var previousDownsampleDSOptions = (0, usePrevious_1.default)(downsampleDSOptions);
2543
2454
  var previousDataSources = (0, usePrevious_1.default)(dataSources);
2544
2455
  var previousThreshold = (0, usePrevious_1.default)(threshold);
2545
2456
 
@@ -2547,7 +2458,7 @@ var useDownsampleDataSources = function useDownsampleDataSources(_ref) {
2547
2458
  return isDownsamplingEnabled ? (0, dataUtils_1.downsampleDataSources)({
2548
2459
  dataSources: dataSources,
2549
2460
  threshold: threshold,
2550
- options: xAndYFieldsWithTypes
2461
+ options: downsampleDSOptions
2551
2462
  }) : dataSources;
2552
2463
  }),
2553
2464
  _ref3 = _slicedToArray(_ref2, 2),
@@ -2575,7 +2486,7 @@ var useDownsampleDataSources = function useDownsampleDataSources(_ref) {
2575
2486
  return;
2576
2487
  }
2577
2488
 
2578
- if ((0, lodash_1.isEqual)(previousXAndYFieldsWithTypes, xAndYFieldsWithTypes) && previousDataSources === dataSources && previousThreshold === threshold) {
2489
+ if ((0, lodash_1.isEqual)(previousDownsampleDSOptions, downsampleDSOptions) && previousDataSources === dataSources && previousThreshold === threshold) {
2579
2490
  return;
2580
2491
  } // Debounce the downsampling so we don't have to downsample and execute DSL multiple times
2581
2492
  // while the viz is being resized
@@ -2583,29 +2494,29 @@ var useDownsampleDataSources = function useDownsampleDataSources(_ref) {
2583
2494
 
2584
2495
  debouncedDownsampleDataSources({
2585
2496
  dataSources: dataSources,
2586
- options: xAndYFieldsWithTypes,
2497
+ options: downsampleDSOptions,
2587
2498
  threshold: threshold
2588
2499
  }); // need to detect if this runs as part of the initial render
2589
- }, [dataSources, debouncedDownsampleDataSources, xAndYFieldsWithTypes, threshold, isDownsamplingEnabled, previousXAndYFieldsWithTypes, previousDataSources, previousThreshold]);
2500
+ }, [dataSources, downsampleDSOptions, debouncedDownsampleDataSources, xAndYFieldsWithTypes, threshold, isDownsamplingEnabled, previousDataSources, previousThreshold, previousDownsampleDSOptions]);
2590
2501
  return downsampledDataSources;
2591
2502
  };
2592
2503
 
2593
2504
  exports.default = useDownsampleDataSources;
2594
2505
 
2595
2506
  /***/ }),
2596
- /* 67 */
2507
+ /* 65 */
2597
2508
  /***/ (function(module, exports, __webpack_require__) {
2598
2509
 
2599
2510
  "use strict";
2600
2511
 
2601
2512
 
2602
- var _toConsumableArray = __webpack_require__(8);
2513
+ var _toConsumableArray = __webpack_require__(6);
2603
2514
 
2604
2515
  Object.defineProperty(exports, "__esModule", {
2605
2516
  value: true
2606
2517
  });
2607
2518
 
2608
- var react_1 = __webpack_require__(0);
2519
+ var react_1 = __webpack_require__(1);
2609
2520
 
2610
2521
  var Options_1 = __webpack_require__(16);
2611
2522
  /**
@@ -2707,7 +2618,7 @@ var useGetXAndYFields = function useGetXAndYFields(_ref) {
2707
2618
  exports.default = useGetXAndYFields;
2708
2619
 
2709
2620
  /***/ }),
2710
- /* 68 */
2621
+ /* 66 */
2711
2622
  /***/ (function(module, exports, __webpack_require__) {
2712
2623
 
2713
2624
  "use strict";
@@ -2718,7 +2629,7 @@ Object.defineProperty(exports, "__esModule", {
2718
2629
  });
2719
2630
  exports.getFeatureFlag = void 0;
2720
2631
 
2721
- var FeatureFlags_1 = __webpack_require__(69);
2632
+ var FeatureFlags_1 = __webpack_require__(67);
2722
2633
 
2723
2634
  var getFeatureFlag = function getFeatureFlag(context, flagName) {
2724
2635
  // look for feature flag in context first
@@ -2742,22 +2653,24 @@ var getFeatureFlag = function getFeatureFlag(context, flagName) {
2742
2653
  exports.getFeatureFlag = getFeatureFlag;
2743
2654
 
2744
2655
  /***/ }),
2745
- /* 69 */
2656
+ /* 67 */
2746
2657
  /***/ (function(module, exports) {
2747
2658
 
2748
2659
  module.exports = require("@splunk/visualization-context/FeatureFlags");
2749
2660
 
2750
2661
  /***/ }),
2662
+ /* 68 */,
2663
+ /* 69 */,
2751
2664
  /* 70 */,
2752
- /* 71 */,
2753
- /* 72 */,
2754
- /* 73 */,
2755
- /* 74 */
2665
+ /* 71 */
2756
2666
  /***/ (function(module, exports) {
2757
2667
 
2758
2668
  module.exports = require("@splunk/visualization-icons");
2759
2669
 
2760
2670
  /***/ }),
2671
+ /* 72 */,
2672
+ /* 73 */,
2673
+ /* 74 */,
2761
2674
  /* 75 */,
2762
2675
  /* 76 */,
2763
2676
  /* 77 */,
@@ -2853,12 +2766,7 @@ module.exports = require("@splunk/visualization-icons");
2853
2766
  /* 167 */,
2854
2767
  /* 168 */,
2855
2768
  /* 169 */,
2856
- /* 170 */,
2857
- /* 171 */,
2858
- /* 172 */,
2859
- /* 173 */,
2860
- /* 174 */,
2861
- /* 175 */
2769
+ /* 170 */
2862
2770
  /***/ (function(module, exports, __webpack_require__) {
2863
2771
 
2864
2772
  "use strict";
@@ -2882,27 +2790,27 @@ Object.defineProperty(exports, "__esModule", {
2882
2790
  });
2883
2791
  exports.config = exports.themes = exports.toImageDimensions = exports.shouldShowPlaceholder = void 0;
2884
2792
 
2885
- var lodash_1 = __webpack_require__(3);
2793
+ var lodash_1 = __webpack_require__(2);
2886
2794
 
2887
- var React = __webpack_require__(0);
2795
+ var React = __webpack_require__(1);
2888
2796
 
2889
- var i18n_1 = __webpack_require__(2);
2797
+ var i18n_1 = __webpack_require__(3);
2890
2798
 
2891
2799
  var style_1 = __webpack_require__(18);
2892
2800
 
2893
- var RemoteImage_1 = __webpack_require__(176);
2801
+ var RemoteImage_1 = __webpack_require__(171);
2894
2802
 
2895
2803
  var styled_components_1 = __webpack_require__(4);
2896
2804
 
2897
- var T = __webpack_require__(1);
2805
+ var T = __webpack_require__(0);
2898
2806
 
2899
- var config_1 = __webpack_require__(244);
2807
+ var config_1 = __webpack_require__(238);
2900
2808
 
2901
2809
  exports.config = config_1.default;
2902
2810
 
2903
- var withDashboardViz_1 = __webpack_require__(56);
2811
+ var withDashboardViz_1 = __webpack_require__(54);
2904
2812
 
2905
- var ImageApi_1 = __webpack_require__(245);
2813
+ var ImageApi_1 = __webpack_require__(239);
2906
2814
 
2907
2815
  var useEffect = React.useEffect,
2908
2816
  useRef = React.useRef;
@@ -2913,7 +2821,7 @@ var Container = styled_components_1.default.div.attrs(function () {
2913
2821
  };
2914
2822
  }).withConfig({
2915
2823
  displayName: "Image__Container",
2916
- componentId: "kplb09-0"
2824
+ componentId: "sc-kplb09-0"
2917
2825
  })(["position:relative;box-sizing:border-box;display:flex;justify-content:center;align-items:center;cursor:", ";", ";"], function (props) {
2918
2826
  return props.onClick ? 'pointer' : 'inherit';
2919
2827
  }, function (props) {
@@ -2941,7 +2849,7 @@ var toImageDimensions = function toImageDimensions(props) {
2941
2849
  exports.toImageDimensions = toImageDimensions;
2942
2850
  var StyledImage = styled_components_1.default.img.withConfig({
2943
2851
  displayName: "Image__StyledImage",
2944
- componentId: "kplb09-1"
2852
+ componentId: "sc-kplb09-1"
2945
2853
  })(["display:block;", ";"], function (props) {
2946
2854
  return (0, exports.toImageDimensions)(props);
2947
2855
  });
@@ -3038,12 +2946,17 @@ exports.themes = themes;
3038
2946
  exports.default = Image;
3039
2947
 
3040
2948
  /***/ }),
3041
- /* 176 */
2949
+ /* 171 */
3042
2950
  /***/ (function(module, exports) {
3043
2951
 
3044
2952
  module.exports = require("@splunk/visualizations-shared/RemoteImage");
3045
2953
 
3046
2954
  /***/ }),
2955
+ /* 172 */,
2956
+ /* 173 */,
2957
+ /* 174 */,
2958
+ /* 175 */,
2959
+ /* 176 */,
3047
2960
  /* 177 */,
3048
2961
  /* 178 */,
3049
2962
  /* 179 */,
@@ -3104,13 +3017,7 @@ module.exports = require("@splunk/visualizations-shared/RemoteImage");
3104
3017
  /* 234 */,
3105
3018
  /* 235 */,
3106
3019
  /* 236 */,
3107
- /* 237 */,
3108
- /* 238 */,
3109
- /* 239 */,
3110
- /* 240 */,
3111
- /* 241 */,
3112
- /* 242 */,
3113
- /* 243 */
3020
+ /* 237 */
3114
3021
  /***/ (function(module, exports, __webpack_require__) {
3115
3022
 
3116
3023
  "use strict";
@@ -3146,9 +3053,9 @@ Object.defineProperty(exports, "__esModule", {
3146
3053
  });
3147
3054
  exports.default = void 0;
3148
3055
 
3149
- __exportStar(__webpack_require__(175), exports);
3056
+ __exportStar(__webpack_require__(170), exports);
3150
3057
 
3151
- var Image_1 = __webpack_require__(175);
3058
+ var Image_1 = __webpack_require__(170);
3152
3059
 
3153
3060
  Object.defineProperty(exports, "default", {
3154
3061
  enumerable: true,
@@ -3158,7 +3065,7 @@ Object.defineProperty(exports, "default", {
3158
3065
  });
3159
3066
 
3160
3067
  /***/ }),
3161
- /* 244 */
3068
+ /* 238 */
3162
3069
  /***/ (function(module, exports, __webpack_require__) {
3163
3070
 
3164
3071
  "use strict";
@@ -3168,15 +3075,17 @@ Object.defineProperty(exports, "__esModule", {
3168
3075
  value: true
3169
3076
  });
3170
3077
 
3171
- var i18n_1 = __webpack_require__(2);
3078
+ var i18n_1 = __webpack_require__(3);
3172
3079
 
3173
- var visualization_icons_1 = __webpack_require__(74);
3080
+ var visualization_schemas_1 = __webpack_require__(9);
3174
3081
 
3175
- var VizBehavior_1 = __webpack_require__(6);
3082
+ var visualization_icons_1 = __webpack_require__(71);
3083
+
3084
+ var VizBehavior_1 = __webpack_require__(7);
3176
3085
 
3177
3086
  var VizCategory_1 = __webpack_require__(22);
3178
3087
 
3179
- var configUtils_1 = __webpack_require__(27);
3088
+ var configUtils_1 = __webpack_require__(26);
3180
3089
 
3181
3090
  var dataContract = {
3182
3091
  requiredDataSources: [],
@@ -3193,17 +3102,6 @@ var size = {
3193
3102
  initialHeight: 300
3194
3103
  };
3195
3104
  var defaultContext = {};
3196
- var optionsSchema = {
3197
- src: {
3198
- description: 'URL of an image file. All browser-supported image formats are acceptable.',
3199
- type: 'string'
3200
- },
3201
- preserveAspectRatio: {
3202
- default: false,
3203
- description: 'Set to true to maintain the aspect ratio of an image when the screen is resized.',
3204
- type: 'boolean'
3205
- }
3206
- };
3207
3105
  var editorConfig = [{
3208
3106
  label: (0, i18n_1._)('Image content'),
3209
3107
  layout: [[{
@@ -3244,7 +3142,7 @@ var config = {
3244
3142
  dataContract: dataContract,
3245
3143
  size: size,
3246
3144
  defaultContext: defaultContext,
3247
- optionsSchema: optionsSchema,
3145
+ optionsSchema: visualization_schemas_1.imageOptionsSchema,
3248
3146
  editorConfig: editorConfig,
3249
3147
  supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.PLACEHOLDER, VizBehavior_1.VizBehavior.EVENTS],
3250
3148
  themes: themes,
@@ -3257,23 +3155,23 @@ var config = {
3257
3155
  exports.default = (0, configUtils_1.enhanceConfig)(config);
3258
3156
 
3259
3157
  /***/ }),
3260
- /* 245 */
3158
+ /* 239 */
3261
3159
  /***/ (function(module, exports, __webpack_require__) {
3262
3160
 
3263
3161
  "use strict";
3264
3162
 
3265
3163
 
3266
- var _classCallCheck = __webpack_require__(10);
3164
+ var _classCallCheck = __webpack_require__(8);
3267
3165
 
3268
- var _createClass = __webpack_require__(25);
3166
+ var _createClass = __webpack_require__(24);
3269
3167
 
3270
3168
  Object.defineProperty(exports, "__esModule", {
3271
3169
  value: true
3272
3170
  });
3273
3171
 
3274
- var lodash_1 = __webpack_require__(3);
3172
+ var lodash_1 = __webpack_require__(2);
3275
3173
 
3276
- var RemoteImage_1 = __webpack_require__(176);
3174
+ var RemoteImage_1 = __webpack_require__(171);
3277
3175
  /**
3278
3176
  * Image Api
3279
3177
  */
@@ -3286,19 +3184,11 @@ var ImageApi = /*#__PURE__*/function () {
3286
3184
  this.viz = viz;
3287
3185
  }
3288
3186
  /**
3289
- * put focus on the visualization
3187
+ * return snapshot of that includes inlined image
3290
3188
  */
3291
- // eslint-disable-next-line class-methods-use-this
3292
3189
 
3293
3190
 
3294
3191
  _createClass(ImageApi, [{
3295
- key: "focus",
3296
- value: function focus() {}
3297
- /**
3298
- * return snapshot of that includes inlined image
3299
- */
3300
-
3301
- }, {
3302
3192
  key: "snapshot",
3303
3193
  value: function snapshot() {
3304
3194
  var srcFromOptions = (0, lodash_1.get)(this.viz.options, 'src', '');