@splunk/visualizations 25.13.1 → 26.1.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 +318 -234
  2. package/Area.config.js.map +1 -1
  3. package/Area.js +1131 -766
  4. package/Area.js.map +1 -1
  5. package/Bar.config.js +317 -233
  6. package/Bar.config.js.map +1 -1
  7. package/Bar.js +1007 -594
  8. package/Bar.js.map +1 -1
  9. package/Bubble.config.js +234 -160
  10. package/Bubble.config.js.map +1 -1
  11. package/Bubble.js +912 -509
  12. package/Bubble.js.map +1 -1
  13. package/ChoroplethSvg.config.js +80 -29
  14. package/ChoroplethSvg.config.js.map +1 -1
  15. package/ChoroplethSvg.js +691 -319
  16. package/ChoroplethSvg.js.map +1 -1
  17. package/Column.config.js +308 -223
  18. package/Column.config.js.map +1 -1
  19. package/Column.js +1011 -587
  20. package/Column.js.map +1 -1
  21. package/Ellipse.config.js +127 -62
  22. package/Ellipse.config.js.map +1 -1
  23. package/Ellipse.js +576 -286
  24. package/Ellipse.js.map +1 -1
  25. package/Events.config.js +111 -29
  26. package/Events.config.js.map +1 -1
  27. package/Events.js +998 -527
  28. package/Events.js.map +1 -1
  29. package/FillerGauge.config.js +142 -73
  30. package/FillerGauge.config.js.map +1 -1
  31. package/FillerGauge.js +962 -572
  32. package/FillerGauge.js.map +1 -1
  33. package/Image.config.js +70 -26
  34. package/Image.config.js.map +1 -1
  35. package/Image.js +524 -253
  36. package/Image.js.map +1 -1
  37. package/Line.config.js +326 -242
  38. package/Line.config.js.map +1 -1
  39. package/Line.js +1022 -606
  40. package/Line.js.map +1 -1
  41. package/LinkGraph.config.js +99 -49
  42. package/LinkGraph.config.js.map +1 -1
  43. package/LinkGraph.js +1184 -762
  44. package/LinkGraph.js.map +1 -1
  45. package/MIGRATION.md +1082 -0
  46. package/Map.config.js +311 -167
  47. package/Map.config.js.map +1 -1
  48. package/Map.js +1479 -873
  49. package/Map.js.map +1 -1
  50. package/Markdown.config.js +93 -43
  51. package/Markdown.config.js.map +1 -1
  52. package/Markdown.js +603 -332
  53. package/Markdown.js.map +1 -1
  54. package/MarkerGauge.config.js +163 -105
  55. package/MarkerGauge.config.js.map +1 -1
  56. package/MarkerGauge.js +1025 -628
  57. package/MarkerGauge.js.map +1 -1
  58. package/ParallelCoordinates.config.js +95 -41
  59. package/ParallelCoordinates.config.js.map +1 -1
  60. package/ParallelCoordinates.js +993 -622
  61. package/ParallelCoordinates.js.map +1 -1
  62. package/Pie.config.js +99 -46
  63. package/Pie.config.js.map +1 -1
  64. package/Pie.js +847 -442
  65. package/Pie.js.map +1 -1
  66. package/Punchcard.config.js +114 -62
  67. package/Punchcard.config.js.map +1 -1
  68. package/Punchcard.js +1097 -633
  69. package/Punchcard.js.map +1 -1
  70. package/Rectangle.config.js +131 -65
  71. package/Rectangle.config.js.map +1 -1
  72. package/Rectangle.js +580 -288
  73. package/Rectangle.js.map +1 -1
  74. package/Sankey.config.js +103 -41
  75. package/Sankey.config.js.map +1 -1
  76. package/Sankey.js +1128 -586
  77. package/Sankey.js.map +1 -1
  78. package/Scatter.config.js +231 -157
  79. package/Scatter.config.js.map +1 -1
  80. package/Scatter.js +904 -504
  81. package/Scatter.js.map +1 -1
  82. package/SingleValue.config.js +212 -142
  83. package/SingleValue.config.js.map +1 -1
  84. package/SingleValue.js +1506 -956
  85. package/SingleValue.js.map +1 -1
  86. package/SingleValueBasic.js +294 -233
  87. package/SingleValueBasic.js.map +1 -1
  88. package/SingleValueIcon.config.js +208 -138
  89. package/SingleValueIcon.config.js.map +1 -1
  90. package/SingleValueIcon.js +1375 -914
  91. package/SingleValueIcon.js.map +1 -1
  92. package/SingleValueRadial.config.js +252 -137
  93. package/SingleValueRadial.config.js.map +1 -1
  94. package/SingleValueRadial.js +2194 -1069
  95. package/SingleValueRadial.js.map +1 -1
  96. package/SparkLine.js +172 -83
  97. package/SparkLine.js.map +1 -1
  98. package/Table.config.js +123 -70
  99. package/Table.config.js.map +1 -1
  100. package/Table.js +1094 -590
  101. package/Table.js.map +1 -1
  102. package/common/Charting.js +147 -75
  103. package/common/Charting.js.map +1 -1
  104. package/common/ChartingApi.js +18 -7
  105. package/common/ChartingApi.js.map +1 -1
  106. package/common/EventsDoc.js +91 -36
  107. package/common/EventsDoc.js.map +1 -1
  108. package/common/GaugeMajorTicks.js +70 -60
  109. package/common/GaugeMajorTicks.js.map +1 -1
  110. package/common/GaugeValueMarker.js +45 -36
  111. package/common/GaugeValueMarker.js.map +1 -1
  112. package/common/OptionsDoc.js +177 -86
  113. package/common/OptionsDoc.js.map +1 -1
  114. package/common/OverviewDoc.js +65 -32
  115. package/common/OverviewDoc.js.map +1 -1
  116. package/common/SplunkVisualization.js +34 -7
  117. package/common/SplunkVisualization.js.map +1 -1
  118. package/common/SplunkVisualizationApi.js +10 -4
  119. package/common/SplunkVisualizationApi.js.map +1 -1
  120. package/common/ThemesDoc.js +41 -28
  121. package/common/ThemesDoc.js.map +1 -1
  122. package/common/chartingUtils.js +56 -24
  123. package/common/chartingUtils.js.map +1 -1
  124. package/common/docUtils.js +15 -5
  125. package/common/docUtils.js.map +1 -1
  126. package/common/gaugeUtils.js +238 -155
  127. package/common/gaugeUtils.js.map +1 -1
  128. package/common/shapeUtils.js +34 -16
  129. package/common/shapeUtils.js.map +1 -1
  130. package/common/utils/configUtils.js +59 -23
  131. package/common/utils/configUtils.js.map +1 -1
  132. package/common/utils/dataUtils.js +9 -4
  133. package/common/utils/dataUtils.js.map +1 -1
  134. package/common/utils/hocUtils.js +5 -3
  135. package/common/utils/hocUtils.js.map +1 -1
  136. package/common/utils/layoutUtils.js +3 -2
  137. package/common/utils/layoutUtils.js.map +1 -1
  138. package/common/utils/mapUtils.js +370 -206
  139. package/common/utils/mapUtils.js.map +1 -1
  140. package/common/utils/singleValueUtils.js +243 -198
  141. package/common/utils/singleValueUtils.js.map +1 -1
  142. package/common/utils/testHelper.js +36 -9
  143. package/common/utils/testHelper.js.map +1 -1
  144. package/common/utils/trellisUtils.js +87 -26
  145. package/common/utils/trellisUtils.js.map +1 -1
  146. package/common/utils/urlUtils.js +4 -2
  147. package/common/utils/urlUtils.js.map +1 -1
  148. package/common/withDashboardViz.js +375 -193
  149. package/common/withDashboardViz.js.map +1 -1
  150. package/package.json +25 -27
package/Rectangle.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 = 452);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 455);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
@@ -120,7 +120,7 @@ module.exports = require("@splunk/themes/variables");
120
120
 
121
121
  /***/ }),
122
122
 
123
- /***/ 113:
123
+ /***/ 114:
124
124
  /***/ (function(module, exports, __webpack_require__) {
125
125
 
126
126
  "use strict";
@@ -130,49 +130,53 @@ Object.defineProperty(exports, "__esModule", {
130
130
  value: true
131
131
  });
132
132
  exports.getDynamicFillColorEditor = void 0;
133
+
133
134
  var i18n_1 = __webpack_require__(2);
135
+
134
136
  var configUtils_1 = __webpack_require__(22);
137
+
135
138
  var getDynamicFillColorEditor = function getDynamicFillColorEditor(_ref) {
136
139
  var defaultContext = _ref.defaultContext,
137
- defaultPalettesConfig = _ref.defaultPalettesConfig;
140
+ defaultPalettesConfig = _ref.defaultPalettesConfig;
138
141
  return {
139
- label: i18n_1._('Fill'),
142
+ label: (0, i18n_1._)('Fill'),
140
143
  option: 'fillColor',
141
144
  context: 'fillColorEditorConfig',
142
145
  editor: 'editor.dynamicColor',
143
146
  showEditor: function showEditor(_ref2) {
144
147
  var options = _ref2.options;
145
- return configUtils_1.isDynamicOption(options.fillColor);
148
+ return (0, configUtils_1.isDynamicOption)(options.fillColor);
146
149
  },
147
150
  editorProps: {
148
151
  labelPosition: 'top',
149
- flyoutTitle: i18n_1._('Dynamic coloring: fill'),
152
+ flyoutTitle: (0, i18n_1._)('Dynamic coloring: fill'),
150
153
  formatters: [{
151
- label: i18n_1._('Ranges'),
154
+ label: (0, i18n_1._)('Ranges'),
152
155
  value: 'rangeValue',
153
156
  defaults: {
154
157
  fillDataValue: defaultContext.fillColorConfig
155
158
  }
156
159
  }, {
157
- label: i18n_1._('Matches'),
160
+ label: (0, i18n_1._)('Matches'),
158
161
  value: 'matchValue',
159
162
  defaults: {
160
163
  fillDataValue: defaultContext.fillColorMatchConfig
161
164
  }
162
165
  }],
163
166
  dataSelectors: [{
164
- label: i18n_1._('Fill'),
167
+ label: (0, i18n_1._)('Fill'),
165
168
  value: 'fillDataValue'
166
169
  }],
167
170
  defaultPalettesConfig: defaultPalettesConfig
168
171
  }
169
172
  };
170
173
  };
174
+
171
175
  exports.getDynamicFillColorEditor = getDynamicFillColorEditor;
172
176
 
173
177
  /***/ }),
174
178
 
175
- /***/ 114:
179
+ /***/ 115:
176
180
  /***/ (function(module, exports, __webpack_require__) {
177
181
 
178
182
  "use strict";
@@ -182,49 +186,53 @@ Object.defineProperty(exports, "__esModule", {
182
186
  value: true
183
187
  });
184
188
  exports.getDynamicStrokeColorEditor = void 0;
189
+
185
190
  var i18n_1 = __webpack_require__(2);
191
+
186
192
  var configUtils_1 = __webpack_require__(22);
193
+
187
194
  var getDynamicStrokeColorEditor = function getDynamicStrokeColorEditor(_ref) {
188
195
  var defaultContext = _ref.defaultContext,
189
- defaultPalettesConfig = _ref.defaultPalettesConfig;
196
+ defaultPalettesConfig = _ref.defaultPalettesConfig;
190
197
  return {
191
- label: i18n_1._('Stroke'),
198
+ label: (0, i18n_1._)('Stroke'),
192
199
  option: 'strokeColor',
193
200
  context: 'strokeColorEditorConfig',
194
201
  editor: 'editor.dynamicColor',
195
202
  showEditor: function showEditor(_ref2) {
196
203
  var options = _ref2.options;
197
- return configUtils_1.isDynamicOption(options.strokeColor);
204
+ return (0, configUtils_1.isDynamicOption)(options.strokeColor);
198
205
  },
199
206
  editorProps: {
200
207
  labelPosition: 'top',
201
- flyoutTitle: i18n_1._('Dynamic coloring: stroke'),
208
+ flyoutTitle: (0, i18n_1._)('Dynamic coloring: stroke'),
202
209
  formatters: [{
203
- label: i18n_1._('Ranges'),
210
+ label: (0, i18n_1._)('Ranges'),
204
211
  value: 'rangeValue',
205
212
  defaults: {
206
213
  strokeDataValue: defaultContext.strokeColorConfig
207
214
  }
208
215
  }, {
209
- label: i18n_1._('Matches'),
216
+ label: (0, i18n_1._)('Matches'),
210
217
  value: 'matchValue',
211
218
  defaults: {
212
219
  strokeDataValue: defaultContext.strokeColorMatchConfig
213
220
  }
214
221
  }],
215
222
  dataSelectors: [{
216
- label: i18n_1._('Stroke'),
223
+ label: (0, i18n_1._)('Stroke'),
217
224
  value: 'strokeDataValue'
218
225
  }],
219
226
  defaultPalettesConfig: defaultPalettesConfig
220
227
  }
221
228
  };
222
229
  };
230
+
223
231
  exports.getDynamicStrokeColorEditor = getDynamicStrokeColorEditor;
224
232
 
225
233
  /***/ }),
226
234
 
227
- /***/ 115:
235
+ /***/ 116:
228
236
  /***/ (function(module, exports, __webpack_require__) {
229
237
 
230
238
  "use strict";
@@ -233,22 +241,25 @@ exports.getDynamicStrokeColorEditor = getDynamicStrokeColorEditor;
233
241
  Object.defineProperty(exports, "__esModule", {
234
242
  value: true
235
243
  });
244
+
236
245
  var i18n_1 = __webpack_require__(2);
246
+
237
247
  var configUtils_1 = __webpack_require__(22);
248
+
238
249
  var StaticFillColorEditor = {
239
- label: i18n_1._('Fill'),
250
+ label: (0, i18n_1._)('Fill'),
240
251
  option: 'fillColor',
241
252
  editor: 'editor.color',
242
253
  showEditor: function showEditor(_ref) {
243
254
  var options = _ref.options;
244
- return !configUtils_1.isDynamicOption(options.fillColor);
255
+ return !(0, configUtils_1.isDynamicOption)(options.fillColor);
245
256
  }
246
257
  };
247
258
  exports.default = StaticFillColorEditor;
248
259
 
249
260
  /***/ }),
250
261
 
251
- /***/ 116:
262
+ /***/ 117:
252
263
  /***/ (function(module, exports, __webpack_require__) {
253
264
 
254
265
  "use strict";
@@ -257,37 +268,50 @@ exports.default = StaticFillColorEditor;
257
268
  Object.defineProperty(exports, "__esModule", {
258
269
  value: true
259
270
  });
271
+
260
272
  var i18n_1 = __webpack_require__(2);
273
+
261
274
  var configUtils_1 = __webpack_require__(22);
275
+
262
276
  var StaticStrokeColorEditor = {
263
- label: i18n_1._('Stroke'),
277
+ label: (0, i18n_1._)('Stroke'),
264
278
  option: 'strokeColor',
265
279
  editor: 'editor.color',
266
280
  showEditor: function showEditor(_ref) {
267
281
  var options = _ref.options;
268
- return !configUtils_1.isDynamicOption(options.strokeColor);
282
+ return !(0, configUtils_1.isDynamicOption)(options.strokeColor);
269
283
  }
270
284
  };
271
285
  exports.default = StaticStrokeColorEditor;
272
286
 
273
287
  /***/ }),
274
288
 
275
- /***/ 117:
289
+ /***/ 118:
276
290
  /***/ (function(module, exports, __webpack_require__) {
277
291
 
278
292
  "use strict";
279
293
 
280
294
 
295
+ var _taggedTemplateLiteral = __webpack_require__(59);
296
+
297
+ var _templateObject;
298
+
281
299
  Object.defineProperty(exports, "__esModule", {
282
300
  value: true
283
301
  });
284
302
  exports.getStyledShape = exports.mapToOldKey = void 0;
303
+
285
304
  var lodash_1 = __webpack_require__(3);
305
+
286
306
  var styled_components_1 = __webpack_require__(4);
307
+
287
308
  var pick_1 = __webpack_require__(23);
309
+
288
310
  var variables_1 = __webpack_require__(11);
289
- var propUtils_1 = __webpack_require__(28);
290
- // map for new options names to old option names
311
+
312
+ var propUtils_1 = __webpack_require__(29); // map for new options names to old option names
313
+
314
+
291
315
  var shapeOptionsMapping = {
292
316
  fillColor: 'fill',
293
317
  strokeColor: 'stroke',
@@ -300,23 +324,23 @@ var shapeOptionsMapping = {
300
324
  * @param {Object} options
301
325
  * @returns {Object}
302
326
  */
327
+
303
328
  var mapToOldKey = function mapToOldKey(options) {
304
- return lodash_1.mapKeys(options, function (val, key) {
329
+ return (0, lodash_1.mapKeys)(options, function (val, key) {
305
330
  return shapeOptionsMapping[key] ? shapeOptionsMapping[key] : key;
306
331
  });
307
332
  };
333
+
308
334
  exports.mapToOldKey = mapToOldKey;
309
335
  /**
310
336
  * Helper method to get styled component for ellipse or rectangle
311
337
  * @method mapToOldKey
312
338
  * @param {Shape} shape
313
339
  */
340
+
314
341
  var getStyledShape = function getStyledShape(shape) {
315
- return styled_components_1.default(shape).withConfig({
316
- displayName: "shapeUtils",
317
- componentId: "sc-1myvp5h-0"
318
- })(["fill:", ";stroke:", ";cursor:", ";"], function (props) {
319
- return props.fill && propUtils_1.formatColor(props.fill) || pick_1.default({
342
+ return (0, styled_components_1.default)(shape)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fill: ", ";\n stroke: ", ";\n cursor: ", ";\n"])), function (props) {
343
+ return props.fill && (0, propUtils_1.formatColor)(props.fill) || (0, pick_1.default)({
320
344
  enterprise: {
321
345
  light: variables_1.default.gray80,
322
346
  dark: variables_1.default.gray25
@@ -324,7 +348,7 @@ var getStyledShape = function getStyledShape(shape) {
324
348
  prisma: variables_1.default.backgroundColorSidebar
325
349
  })(props);
326
350
  }, function (props) {
327
- return props.stroke && propUtils_1.formatColor(props.stroke) || pick_1.default({
351
+ return props.stroke && (0, propUtils_1.formatColor)(props.stroke) || (0, pick_1.default)({
328
352
  enterprise: {
329
353
  dark: variables_1.default.gray80,
330
354
  light: variables_1.default.textColor
@@ -335,6 +359,7 @@ var getStyledShape = function getStyledShape(shape) {
335
359
  return props.onClick ? 'pointer' : 'inherit';
336
360
  });
337
361
  };
362
+
338
363
  exports.getStyledShape = getStyledShape;
339
364
 
340
365
  /***/ }),
@@ -355,40 +380,46 @@ module.exports = require("@splunk/visualizations-shared/colorUtils");
355
380
  Object.defineProperty(exports, "__esModule", {
356
381
  value: true
357
382
  });
383
+
358
384
  var React = __webpack_require__(1);
385
+
359
386
  var styled_components_1 = __webpack_require__(4);
387
+
360
388
  var SizeAwareWrapper_1 = __webpack_require__(19);
389
+
361
390
  var style_1 = __webpack_require__(14);
391
+
362
392
  var colorUtils_1 = __webpack_require__(12);
393
+
363
394
  var Item = styled_components_1.default.div.attrs(function (_ref) {
364
395
  var width = _ref.width;
365
396
  return {
366
397
  style: {
367
- width: style_1.toPx(width)
398
+ width: (0, style_1.toPx)(width)
368
399
  }
369
400
  };
370
401
  }).withConfig({
371
402
  displayName: "FixedSizeContainer__Item",
372
403
  componentId: "sc-1yhgpod-0"
373
404
  })(["position:relative;background-color:", "};"], function (props) {
374
- return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
375
- });
376
- // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
405
+ return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
406
+ }); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
407
+
377
408
  var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
378
409
  var width = _ref2.width,
379
- height = _ref2.height;
410
+ height = _ref2.height;
380
411
  return {
381
412
  style: Object.assign(Object.assign({}, width && {
382
- width: style_1.toPx(width)
413
+ width: (0, style_1.toPx)(width)
383
414
  }), height && {
384
- height: style_1.toPx(height)
415
+ height: (0, style_1.toPx)(height)
385
416
  })
386
417
  };
387
418
  }).withConfig({
388
419
  displayName: "FixedSizeContainer__FixSizeItem",
389
420
  componentId: "sc-1yhgpod-1"
390
421
  })(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
391
- return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
422
+ return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
392
423
  });
393
424
  var ItemContent = styled_components_1.default.div.withConfig({
394
425
  displayName: "FixedSizeContainer__ItemContent",
@@ -398,11 +429,13 @@ var FixSizeItemContent = styled_components_1.default.div.withConfig({
398
429
  displayName: "FixedSizeContainer__FixSizeItemContent",
399
430
  componentId: "sc-1yhgpod-3"
400
431
  })(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
432
+
401
433
  var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
402
434
  var FixedSizeContainer = function FixedSizeContainer(props) {
403
435
  var width = props.width,
404
- height = props.height,
405
- backgroundColor = props.backgroundColor;
436
+ height = props.height,
437
+ backgroundColor = props.backgroundColor;
438
+
406
439
  if (!height) {
407
440
  return React.createElement(Item, {
408
441
  "data-test": "item",
@@ -410,24 +443,27 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
410
443
  backgroundColor: backgroundColor
411
444
  }, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
412
445
  }
446
+
413
447
  return React.createElement(FixSizeItem, {
414
448
  "data-test": "fix-size-item",
415
- "data-splunk-visualization-version": "25.13.1 - ea48ec41e",
449
+ "data-splunk-visualization-version": "26.1.0 - fc8bf8d77",
416
450
  width: width,
417
451
  height: height,
418
452
  backgroundColor: backgroundColor
419
453
  }, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
420
454
  var newWidth = _ref3.width,
421
- newHeight = _ref3.height;
455
+ newHeight = _ref3.height;
422
456
  return React.createElement(Viz, Object.assign({}, props, {
423
457
  width: newWidth,
424
458
  height: newHeight
425
459
  }));
426
460
  })));
427
461
  };
462
+
428
463
  FixedSizeContainer.displayName = 'withFixedSizeContainer';
429
464
  return FixedSizeContainer;
430
465
  };
466
+
431
467
  exports.default = withFixedSizeContainer;
432
468
 
433
469
  /***/ }),
@@ -455,9 +491,10 @@ exports.extendStaticWrapperProps = void 0;
455
491
  * @param {DashboardVizType} props.Wrapper
456
492
  * @param {DashboardVizType} props.Visualization
457
493
  */
494
+
458
495
  var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
459
496
  var Wrapper = _ref.Wrapper,
460
- Visualization = _ref.Visualization;
497
+ Visualization = _ref.Visualization;
461
498
  var extendProperties = ['propTypes', 'defaultProps', 'config'];
462
499
  extendProperties.forEach(function (prop) {
463
500
  if (Visualization[prop]) {
@@ -466,6 +503,7 @@ var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
466
503
  }
467
504
  });
468
505
  };
506
+
469
507
  exports.extendStaticWrapperProps = extendStaticWrapperProps;
470
508
 
471
509
  /***/ }),
@@ -477,7 +515,7 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
477
515
 
478
516
  /***/ }),
479
517
 
480
- /***/ 162:
518
+ /***/ 165:
481
519
  /***/ (function(module, exports, __webpack_require__) {
482
520
 
483
521
  "use strict";
@@ -485,26 +523,38 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
485
523
 
486
524
  var __rest = this && this.__rest || function (s, e) {
487
525
  var t = {};
526
+
488
527
  for (var p in s) {
489
528
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
490
529
  }
530
+
491
531
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
492
532
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
493
533
  }
494
534
  return t;
495
535
  };
536
+
496
537
  Object.defineProperty(exports, "__esModule", {
497
538
  value: true
498
539
  });
499
540
  exports.config = exports.computeVizProps = void 0;
541
+
500
542
  var React = __webpack_require__(1);
543
+
501
544
  var styled_components_1 = __webpack_require__(4);
545
+
502
546
  var lodash_1 = __webpack_require__(3);
547
+
503
548
  var T = __webpack_require__(0);
504
- var withDashboardViz_1 = __webpack_require__(36);
505
- var config_1 = __webpack_require__(453);
549
+
550
+ var withDashboardViz_1 = __webpack_require__(37);
551
+
552
+ var config_1 = __webpack_require__(456);
553
+
506
554
  exports.config = config_1.default;
507
- var shapeUtils_1 = __webpack_require__(117);
555
+
556
+ var shapeUtils_1 = __webpack_require__(118);
557
+
508
558
  var SVGContainer = styled_components_1.default.svg.withConfig({
509
559
  displayName: "Rectangle__SVGContainer",
510
560
  componentId: "iwvil2-0"
@@ -520,15 +570,17 @@ var propTypes = {
520
570
  mode: T.string,
521
571
  onRectangleClick: T.func
522
572
  };
523
- var RectangleShape = shapeUtils_1.getStyledShape('rect');
573
+ var RectangleShape = (0, shapeUtils_1.getStyledShape)('rect');
574
+
524
575
  var RectangleViz = function RectangleViz(props) {
525
576
  var width = props.width,
526
- height = props.height,
527
- options = props.options,
528
- onRectangleClick = props.onRectangleClick;
577
+ height = props.height,
578
+ options = props.options,
579
+ onRectangleClick = props.onRectangleClick;
529
580
  var strokeWidth = options.strokeWidth;
530
581
  var rx = options.rx,
531
- ry = options.ry; // If either radius value is NaN/undefined, sets value to 0.
582
+ ry = options.ry; // If either radius value is NaN/undefined, sets value to 0.
583
+
532
584
  rx = rx || 0;
533
585
  ry = ry || 0;
534
586
  return React.createElement(SVGContainer, {
@@ -545,24 +597,28 @@ var RectangleViz = function RectangleViz(props) {
545
597
  onClick: onRectangleClick
546
598
  })));
547
599
  };
600
+
548
601
  var validOptions = Object.keys(config_1.default.optionsSchema);
602
+
549
603
  var computeVizProps = function computeVizProps(props) {
550
604
  var dataSources = props.dataSources,
551
- otherOptions = __rest(props, ["dataSources"]);
605
+ otherOptions = __rest(props, ["dataSources"]);
606
+
552
607
  var computedProps = {
553
608
  dataSources: dataSources,
554
609
  options: null
555
610
  };
556
- computedProps.options = lodash_1.chain(otherOptions).pick(validOptions).thru(shapeUtils_1.mapToOldKey).value();
611
+ computedProps.options = (0, lodash_1.chain)(otherOptions).pick(validOptions).thru(shapeUtils_1.mapToOldKey).value();
557
612
  return computedProps;
558
613
  };
614
+
559
615
  exports.computeVizProps = computeVizProps;
560
616
  RectangleViz.propTypes = propTypes;
561
617
  RectangleViz.defaultProps = {
562
618
  width: 250,
563
619
  height: 300
564
620
  };
565
- var Rectangle = withDashboardViz_1.default({
621
+ var Rectangle = (0, withDashboardViz_1.default)({
566
622
  ReactViz: RectangleViz,
567
623
  computeVizProps: exports.computeVizProps,
568
624
  vizConfig: config_1.default
@@ -606,24 +662,33 @@ module.exports = require("@splunk/ui-utils/i18n");
606
662
 
607
663
 
608
664
  var _toConsumableArray = __webpack_require__(8);
665
+
609
666
  var _defineProperty = __webpack_require__(7);
667
+
610
668
  var __rest = this && this.__rest || function (s, e) {
611
669
  var t = {};
670
+
612
671
  for (var p in s) {
613
672
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
614
673
  }
674
+
615
675
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
616
676
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
617
677
  }
618
678
  return t;
619
679
  };
680
+
620
681
  Object.defineProperty(exports, "__esModule", {
621
682
  value: true
622
683
  });
623
684
  exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
685
+
624
686
  var lodash_1 = __webpack_require__(3);
687
+
625
688
  var schemaUtils_1 = __webpack_require__(16);
689
+
626
690
  var VizBehavior_1 = __webpack_require__(6);
691
+
627
692
  var dynamicOptionsDSLType = {
628
693
  type: 'string',
629
694
  pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
@@ -633,20 +698,22 @@ var dynamicOptionsDSLType = {
633
698
  * @param optionsSchema a visualization's options schema
634
699
  * @returns an updated options schema that additionally allows strings starting with > for each option
635
700
  */
701
+
636
702
  function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
637
703
  var enhancedOptionsSchema = {};
638
704
  Object.keys(optionsSchema).forEach(function (key) {
639
705
  var _a = optionsSchema[key],
640
- title = _a.title,
641
- description = _a.description,
642
- readOnly = _a.readOnly,
643
- writeOnly = _a.writeOnly,
644
- examples = _a.examples,
645
- defaultValue = _a.default,
646
- type = _a.type,
647
- properties = _a.properties,
648
- patternProperties = _a.patternProperties,
649
- remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
706
+ title = _a.title,
707
+ description = _a.description,
708
+ readOnly = _a.readOnly,
709
+ writeOnly = _a.writeOnly,
710
+ examples = _a.examples,
711
+ defaultValue = _a.default,
712
+ type = _a.type,
713
+ properties = _a.properties,
714
+ patternProperties = _a.patternProperties,
715
+ remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
716
+
650
717
  var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
651
718
  title: title
652
719
  }), description !== undefined && {
@@ -660,12 +727,14 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
660
727
  }), defaultValue !== undefined && {
661
728
  default: defaultValue
662
729
  });
730
+
663
731
  if (type === 'object') {
664
732
  enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
665
733
  type: type
666
734
  }), properties && {
667
735
  properties: enhanceOptionsSchemaWithDynamicOptions(properties)
668
736
  });
737
+
669
738
  if (patternProperties) {
670
739
  var enhancedPatternProperties = {};
671
740
  Object.keys(patternProperties).forEach(function (opt) {
@@ -683,6 +752,7 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
683
752
  });
684
753
  return enhancedOptionsSchema;
685
754
  }
755
+
686
756
  exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
687
757
  /**
688
758
  * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
@@ -691,11 +761,14 @@ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamic
691
761
  * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
692
762
  * and containing `open: false` for all editor panels in editorConfig
693
763
  */
764
+
694
765
  function enhanceConfig(vizConfig) {
695
766
  var enhancedConfig = Object.assign({}, vizConfig);
767
+
696
768
  if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
697
769
  enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
698
770
  }
771
+
699
772
  enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
700
773
  return Object.assign(Object.assign({}, config), {
701
774
  open: config.open || false
@@ -703,6 +776,7 @@ function enhanceConfig(vizConfig) {
703
776
  });
704
777
  return enhancedConfig;
705
778
  }
779
+
706
780
  exports.enhanceConfig = enhanceConfig;
707
781
  /**
708
782
  * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
@@ -710,6 +784,7 @@ exports.enhanceConfig = enhanceConfig;
710
784
  * @param vizConfig a Visualization Config
711
785
  * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
712
786
  */
787
+
713
788
  function uncollapseEditorConfig(vizConfig) {
714
789
  var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
715
790
  editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
@@ -719,13 +794,16 @@ function uncollapseEditorConfig(vizConfig) {
719
794
  });
720
795
  return editorPanelUncollapsedConfig;
721
796
  }
797
+
722
798
  exports.uncollapseEditorConfig = uncollapseEditorConfig;
799
+
723
800
  function isDynamicOption(option) {
724
801
  return option && typeof option === 'string' && option.trim().startsWith('>') || false;
725
802
  }
726
- exports.isDynamicOption = isDynamicOption;
727
- // private helpers to improve readability of getInitialPreset
803
+
804
+ exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
728
805
  // this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
806
+
729
807
  /**
730
808
  * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
731
809
  * if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset
@@ -734,6 +812,7 @@ exports.isDynamicOption = isDynamicOption;
734
812
  *
735
813
  * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
736
814
  */
815
+
737
816
  function hasCompatibleContexts(vizContext, presetContext) {
738
817
  var presetContextKeys = Object.keys(presetContext);
739
818
  return presetContextKeys.every(function (contextKey) {
@@ -743,6 +822,8 @@ function hasCompatibleContexts(vizContext, presetContext) {
743
822
  /**
744
823
  * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
745
824
  */
825
+
826
+
746
827
  function hasCompatibleOptions(vizOptions, presetOptions) {
747
828
  var presetOptionKeys = Object.keys(presetOptions);
748
829
  return presetOptionKeys.every(function (optionKey) {
@@ -757,18 +838,21 @@ function hasCompatibleOptions(vizOptions, presetOptions) {
757
838
  * @param {Object} vizOptions - the current vizOptions definition
758
839
  * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
759
840
  */
841
+
842
+
760
843
  function getInitialPreset(vizContext, vizOptions, presets) {
761
844
  return presets.find(function (preset) {
762
- var presetContext = lodash_1.get(preset, ['value', 'context'], {});
763
- var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
845
+ var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
846
+ var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
764
847
  var presetContextKeys = Object.keys(presetContext);
765
- var presetOptionKeys = Object.keys(presetOptions);
766
- // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
848
+ var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
767
849
  // if not, then the preset is invalid in config.ts
850
+
768
851
  if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
769
852
  return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
770
853
  });
771
854
  }
855
+
772
856
  exports.getInitialPreset = getInitialPreset;
773
857
  /**
774
858
  * generates number precision values for a Select editor
@@ -776,14 +860,16 @@ exports.getInitialPreset = getInitialPreset;
776
860
  * @param {Number} numPrecisionValues - number of integer precision values to generate
777
861
  * @returns {{ label: string; value; string }[]} array of { label, value } tuples
778
862
  */
863
+
779
864
  function generatePrecisionValues(numPrecisionValues) {
780
- return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
865
+ return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
781
866
  return {
782
867
  label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
783
868
  value: i
784
869
  };
785
870
  });
786
871
  }
872
+
787
873
  exports.generatePrecisionValues = generatePrecisionValues;
788
874
  /**
789
875
  * insert layout in layout array, return a new layout array instead of updating the original
@@ -793,12 +879,15 @@ exports.generatePrecisionValues = generatePrecisionValues;
793
879
  * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
794
880
  * @returns {EditorLayoutConfig[][]} new editor layout with insertion
795
881
  */
882
+
796
883
  var insertLayout = function insertLayout(layout, index) {
797
884
  for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
798
885
  layoutItems[_key - 2] = arguments[_key];
799
886
  }
887
+
800
888
  return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
801
889
  };
890
+
802
891
  exports.insertLayout = insertLayout;
803
892
 
804
893
  /***/ }),
@@ -827,35 +916,35 @@ module.exports = require("@splunk/themes/pick");
827
916
  /***/ 25:
828
917
  /***/ (function(module, exports) {
829
918
 
830
- module.exports = require("@splunk/visualization-context/TimezoneContext");
919
+ module.exports = require("@splunk/ui-utils/id");
831
920
 
832
921
  /***/ }),
833
922
 
834
923
  /***/ 26:
835
924
  /***/ (function(module, exports) {
836
925
 
837
- module.exports = require("@splunk/visualizations-shared/hocUtils");
926
+ module.exports = require("@splunk/visualization-context/TimezoneContext");
838
927
 
839
928
  /***/ }),
840
929
 
841
930
  /***/ 27:
842
931
  /***/ (function(module, exports) {
843
932
 
844
- module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
933
+ module.exports = require("@splunk/visualizations-shared/hocUtils");
845
934
 
846
935
  /***/ }),
847
936
 
848
937
  /***/ 28:
849
938
  /***/ (function(module, exports) {
850
939
 
851
- module.exports = require("@splunk/visualizations-shared/propUtils");
940
+ module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
852
941
 
853
942
  /***/ }),
854
943
 
855
944
  /***/ 29:
856
945
  /***/ (function(module, exports) {
857
946
 
858
- module.exports = require("@splunk/visualization-encoding/Options");
947
+ module.exports = require("@splunk/visualizations-shared/propUtils");
859
948
 
860
949
  /***/ }),
861
950
 
@@ -866,7 +955,14 @@ module.exports = require("lodash");
866
955
 
867
956
  /***/ }),
868
957
 
869
- /***/ 31:
958
+ /***/ 30:
959
+ /***/ (function(module, exports) {
960
+
961
+ module.exports = require("@splunk/visualization-encoding/Options");
962
+
963
+ /***/ }),
964
+
965
+ /***/ 32:
870
966
  /***/ (function(module, exports, __webpack_require__) {
871
967
 
872
968
  "use strict";
@@ -876,11 +972,17 @@ Object.defineProperty(exports, "__esModule", {
876
972
  value: true
877
973
  });
878
974
  exports.shouldShowIconPlaceholder = void 0;
975
+
879
976
  var React = __webpack_require__(1);
977
+
880
978
  var T = __webpack_require__(0);
979
+
881
980
  var lodash_1 = __webpack_require__(3);
981
+
882
982
  var i18n_1 = __webpack_require__(2);
983
+
883
984
  var Message_1 = __webpack_require__(10);
985
+
884
986
  var FixedSizeContainer_1 = __webpack_require__(13);
885
987
  /**
886
988
  * @method shouldShowIconPlaceholder
@@ -888,14 +990,17 @@ var FixedSizeContainer_1 = __webpack_require__(13);
888
990
  * @param {boolean} loading
889
991
  * @returns {boolean}
890
992
  */
993
+
994
+
891
995
  var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
892
996
  var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
893
- var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
997
+ var data = (0, lodash_1.get)(dataSources, 'primary.data.columns[0]', undefined);
894
998
  var noData = data === undefined;
895
- var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
999
+ var fields = (0, lodash_1.get)(dataSources, 'primary.data.fields[0]', undefined);
896
1000
  var noFields = fields === undefined;
897
1001
  return loading || noData || noFields;
898
1002
  };
1003
+
899
1004
  exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
900
1005
  var propTypes = {
901
1006
  icon: T.func,
@@ -910,11 +1015,13 @@ var propTypes = {
910
1015
  * @param {IconPlaceholderProps} props
911
1016
  * @returns {React.ReactElement}
912
1017
  */
1018
+
913
1019
  var IconPlaceholder = function IconPlaceholder(props) {
914
1020
  var width = props.width,
915
- height = props.height,
916
- icon = props.icon,
917
- iconColor = props.iconColor;
1021
+ height = props.height,
1022
+ icon = props.icon,
1023
+ iconColor = props.iconColor;
1024
+
918
1025
  if (icon) {
919
1026
  return React.createElement(icon, {
920
1027
  style: {
@@ -929,26 +1036,21 @@ var IconPlaceholder = function IconPlaceholder(props) {
929
1036
  height: '50%'
930
1037
  });
931
1038
  }
1039
+
932
1040
  return React.createElement(Message_1.default, {
933
1041
  width: width,
934
1042
  height: height,
935
1043
  level: "warning",
936
- message: i18n_1._('No DataSource Connected')
1044
+ message: (0, i18n_1._)('No DataSource Connected')
937
1045
  });
938
1046
  };
1047
+
939
1048
  IconPlaceholder.propTypes = propTypes;
940
1049
  IconPlaceholder.defaultProps = {
941
1050
  width: '100%',
942
1051
  height: 250
943
1052
  };
944
- exports.default = FixedSizeContainer_1.default(IconPlaceholder);
945
-
946
- /***/ }),
947
-
948
- /***/ 32:
949
- /***/ (function(module, exports) {
950
-
951
- module.exports = require("@splunk/ui-utils/id");
1053
+ exports.default = (0, FixedSizeContainer_1.default)(IconPlaceholder);
952
1054
 
953
1055
  /***/ }),
954
1056
 
@@ -959,21 +1061,27 @@ module.exports = require("@splunk/ui-utils/id");
959
1061
 
960
1062
 
961
1063
  var _defineProperty = __webpack_require__(7);
1064
+
962
1065
  Object.defineProperty(exports, "__esModule", {
963
1066
  value: true
964
1067
  });
965
1068
  exports.getSortingParams = exports.SortParamsPropTypes = void 0;
1069
+
966
1070
  var T = __webpack_require__(0);
1071
+
967
1072
  var lodash_1 = __webpack_require__(3);
968
- var DataSource_1 = __webpack_require__(43);
1073
+
1074
+ var DataSource_1 = __webpack_require__(34);
1075
+
969
1076
  exports.SortParamsPropTypes = T.shape({
970
1077
  currentSortKey: T.string,
971
1078
  currentSortDir: T.oneOf(DataSource_1.validSortDirs),
972
1079
  onSort: T.func
973
1080
  });
1081
+
974
1082
  var getSortingParams = function getSortingParams(_ref) {
975
1083
  var requestParams = _ref.requestParams,
976
- onRequestParamsChange = _ref.onRequestParamsChange;
1084
+ onRequestParamsChange = _ref.onRequestParamsChange;
977
1085
  var currentSortKey;
978
1086
  var currentSortDir;
979
1087
  var nextSortDirMap = {
@@ -982,17 +1090,20 @@ var getSortingParams = function getSortingParams(_ref) {
982
1090
  none: 'asc'
983
1091
  };
984
1092
  var onSort;
1093
+
985
1094
  if (typeof onRequestParamsChange === 'function') {
986
- if (requestParams && lodash_1.has(requestParams, 'sort')) {
1095
+ if (requestParams && (0, lodash_1.has)(requestParams, 'sort')) {
987
1096
  currentSortKey = Object.keys(requestParams.sort).shift();
988
1097
  currentSortDir = requestParams.sort[currentSortKey];
989
- }
990
- // undid memoization since there is a dependency on requestParams, which is a deeply nested object
1098
+ } // undid memoization since there is a dependency on requestParams, which is a deeply nested object
1099
+
1100
+
991
1101
  onSort = function onSort(e, _ref2) {
992
1102
  var sortKey = _ref2.sortKey,
993
- sortDir = _ref2.sortDir;
1103
+ sortDir = _ref2.sortDir;
1104
+
994
1105
  if (typeof sortKey === 'string') {
995
- var nextSortDir = lodash_1.has(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
1106
+ var nextSortDir = (0, lodash_1.has)(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
996
1107
  onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
997
1108
  offset: 0,
998
1109
  sort: _defineProperty({}, sortKey, nextSortDir)
@@ -1002,12 +1113,14 @@ var getSortingParams = function getSortingParams(_ref) {
1002
1113
  }
1003
1114
  };
1004
1115
  }
1116
+
1005
1117
  return {
1006
1118
  currentSortKey: currentSortKey,
1007
1119
  currentSortDir: currentSortDir,
1008
1120
  onSort: onSort
1009
1121
  };
1010
1122
  };
1123
+
1011
1124
  exports.getSortingParams = getSortingParams;
1012
1125
 
1013
1126
  /***/ }),
@@ -1018,43 +1131,69 @@ exports.getSortingParams = getSortingParams;
1018
1131
  "use strict";
1019
1132
 
1020
1133
 
1134
+ Object.defineProperty(exports, "__esModule", {
1135
+ value: true
1136
+ });
1137
+ exports.validOutputModes = exports.validSegmentationModes = exports.validSortDirs = void 0;
1138
+ exports.validSortDirs = ['asc', 'desc', 'none'];
1139
+ exports.validSegmentationModes = ['none', 'inner'];
1140
+ exports.validOutputModes = ['json_cols', 'json'];
1141
+
1142
+ /***/ }),
1143
+
1144
+ /***/ 35:
1145
+ /***/ (function(module, exports, __webpack_require__) {
1146
+
1147
+ "use strict";
1148
+
1149
+
1021
1150
  Object.defineProperty(exports, "__esModule", {
1022
1151
  value: true
1023
1152
  });
1024
1153
  exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
1154
+
1025
1155
  var T = __webpack_require__(0);
1156
+
1026
1157
  var lodash_1 = __webpack_require__(3);
1158
+
1027
1159
  exports.PaginatorParamsPropTypes = T.shape({
1028
1160
  isPaging: T.bool,
1029
1161
  current: T.number,
1030
1162
  totalPages: T.number,
1031
1163
  onChange: T.func
1032
1164
  });
1165
+
1033
1166
  var getPaginationParams = function getPaginationParams(_ref) {
1034
1167
  var requestParams = _ref.requestParams,
1035
- meta = _ref.meta,
1036
- onRequestParamsChange = _ref.onRequestParamsChange;
1168
+ meta = _ref.meta,
1169
+ onRequestParamsChange = _ref.onRequestParamsChange;
1037
1170
  var totalCount = meta && meta.totalCount || 0;
1038
1171
  var offset = requestParams && requestParams.offset || 0;
1039
1172
  var count = requestParams && requestParams.count;
1040
1173
  var totalPages = typeof count === 'number' && count > 0 ? Math.ceil(totalCount / count) : 0;
1041
1174
  var current = typeof count === 'number' && count > 0 ? Math.floor(offset / count) + 1 : 0;
1042
1175
  var isPaging = totalPages > 1 && typeof onRequestParamsChange === 'function';
1176
+
1043
1177
  var onChangeHandler = function onChangeHandler(e, _ref2) {
1044
1178
  var page = _ref2.page,
1045
- countArg = _ref2.count;
1046
- var newParams = lodash_1.cloneDeep(requestParams);
1179
+ countArg = _ref2.count;
1180
+ var newParams = (0, lodash_1.cloneDeep)(requestParams);
1181
+
1047
1182
  if (typeof countArg === 'number') {
1048
1183
  newParams.count = countArg;
1049
1184
  newParams.offset = 0;
1050
1185
  }
1186
+
1051
1187
  var pageCount = typeof newParams.count === 'number' ? newParams.count : 10;
1188
+
1052
1189
  if (typeof page === 'number' && page > 0) {
1053
1190
  newParams.count = pageCount;
1054
1191
  newParams.offset = (page - 1) * pageCount;
1055
1192
  }
1193
+
1056
1194
  onRequestParamsChange(newParams);
1057
1195
  };
1196
+
1058
1197
  return {
1059
1198
  isPaging: isPaging,
1060
1199
  current: current,
@@ -1062,11 +1201,12 @@ var getPaginationParams = function getPaginationParams(_ref) {
1062
1201
  onChange: typeof onRequestParamsChange === 'function' ? onChangeHandler : lodash_1.noop
1063
1202
  };
1064
1203
  };
1204
+
1065
1205
  exports.getPaginationParams = getPaginationParams;
1066
1206
 
1067
1207
  /***/ }),
1068
1208
 
1069
- /***/ 35:
1209
+ /***/ 36:
1070
1210
  /***/ (function(module, exports, __webpack_require__) {
1071
1211
 
1072
1212
  "use strict";
@@ -1077,6 +1217,7 @@ Object.defineProperty(exports, "__esModule", {
1077
1217
  });
1078
1218
  exports.VizCategory = void 0;
1079
1219
  var VizCategory;
1220
+
1080
1221
  (function (VizCategory) {
1081
1222
  VizCategory["SINGLE_VALUE"] = "Single Value";
1082
1223
  VizCategory["TRENDS"] = "Trends";
@@ -1094,67 +1235,96 @@ var VizCategory;
1094
1235
 
1095
1236
  /***/ }),
1096
1237
 
1097
- /***/ 36:
1238
+ /***/ 37:
1098
1239
  /***/ (function(module, exports, __webpack_require__) {
1099
1240
 
1100
1241
  "use strict";
1101
1242
 
1102
1243
 
1103
1244
  var _slicedToArray = __webpack_require__(17);
1245
+
1104
1246
  Object.defineProperty(exports, "__esModule", {
1105
1247
  value: true
1106
1248
  });
1249
+
1107
1250
  var React = __webpack_require__(1);
1251
+
1108
1252
  var lodash_1 = __webpack_require__(3);
1109
- var getSettingsFromThemedProps_1 = __webpack_require__(37);
1110
- var Options_1 = __webpack_require__(29);
1111
- var SanitizeProps_1 = __webpack_require__(38);
1112
- var TimezoneContext_1 = __webpack_require__(25);
1113
- var moment_1 = __webpack_require__(39);
1253
+
1254
+ var getSettingsFromThemedProps_1 = __webpack_require__(38);
1255
+
1256
+ var Options_1 = __webpack_require__(30);
1257
+
1258
+ var SanitizeProps_1 = __webpack_require__(39);
1259
+
1260
+ var TimezoneContext_1 = __webpack_require__(26);
1261
+
1262
+ var moment_1 = __webpack_require__(40);
1263
+
1114
1264
  var FeatureFlagContext_1 = __webpack_require__(21);
1265
+
1115
1266
  var styled_components_1 = __webpack_require__(4);
1116
- var hocUtils_1 = __webpack_require__(26);
1117
- var JSONSchemaUtils_1 = __webpack_require__(27);
1118
- var async_dynamic_options_evaluator_1 = __webpack_require__(40);
1119
- var id_1 = __webpack_require__(32);
1120
- var SplunkVisualization_1 = __webpack_require__(41);
1267
+
1268
+ var hocUtils_1 = __webpack_require__(27);
1269
+
1270
+ var JSONSchemaUtils_1 = __webpack_require__(28);
1271
+
1272
+ var async_dynamic_options_evaluator_1 = __webpack_require__(41);
1273
+
1274
+ var id_1 = __webpack_require__(25);
1275
+
1276
+ var SplunkVisualization_1 = __webpack_require__(42);
1277
+
1121
1278
  var VizBehavior_1 = __webpack_require__(6);
1279
+
1122
1280
  var getSorting_1 = __webpack_require__(33);
1123
- var getPagination_1 = __webpack_require__(34);
1281
+
1282
+ var getPagination_1 = __webpack_require__(35);
1283
+
1124
1284
  var useDeepMemo_1 = __webpack_require__(44);
1285
+
1125
1286
  var MissingPropsMessage_1 = __webpack_require__(45);
1287
+
1126
1288
  var withEditModeCover_1 = __webpack_require__(46);
1289
+
1127
1290
  var withPlaceholder_1 = __webpack_require__(47);
1128
1291
  /**
1129
1292
  * hoc that wraps a pure react visualization in a Dashboard visualization
1130
1293
  * @param {DashboardVizOpts} opts
1131
1294
  * @returns {HOC}
1132
1295
  */
1296
+
1297
+
1133
1298
  var withDashboardViz = function withDashboardViz(opts) {
1134
1299
  var ReactViz = opts.ReactViz,
1135
- vizConfig = opts.vizConfig,
1136
- _opts$computeVizProps = opts.computeVizProps,
1137
- computeVizProps = _opts$computeVizProps === void 0 ? function () {} : _opts$computeVizProps,
1138
- disableEditModeCover = opts.disableEditModeCover,
1139
- useIconPlaceholder = opts.useIconPlaceholder; // sanitizing props before sending them to reactviz.
1140
- var SanitizedReactViz = SanitizeProps_1.withSanitizedProps(ReactViz);
1141
- var defaultOptions = JSONSchemaUtils_1.pickFieldFromJSONSchema(vizConfig.optionsSchema, 'default');
1300
+ vizConfig = opts.vizConfig,
1301
+ _opts$computeVizProps = opts.computeVizProps,
1302
+ computeVizProps = _opts$computeVizProps === void 0 ? function () {} : _opts$computeVizProps,
1303
+ disableEditModeCover = opts.disableEditModeCover,
1304
+ useIconPlaceholder = opts.useIconPlaceholder; // sanitizing props before sending them to reactviz.
1305
+
1306
+ var SanitizedReactViz = (0, SanitizeProps_1.withSanitizedProps)(ReactViz);
1307
+ var defaultOptions = (0, JSONSchemaUtils_1.pickFieldFromJSONSchema)(vizConfig.optionsSchema, 'default');
1308
+
1142
1309
  var DashboardViz = function DashboardViz(props) {
1143
1310
  var _a;
1311
+
1144
1312
  var mode = props.mode,
1145
- hasEventHandlers = props.hasEventHandlers,
1146
- dataSources = props.dataSources,
1147
- options = props.options,
1148
- _props$context = props.context,
1149
- context = _props$context === void 0 ? {} : _props$context,
1150
- width = props.width,
1151
- height = props.height,
1152
- onComputedProps = props.onComputedProps,
1153
- onEventTrigger = props.onEventTrigger,
1154
- theme = props.theme,
1155
- onRequestParamsChange = props.onRequestParamsChange;
1313
+ hasEventHandlers = props.hasEventHandlers,
1314
+ dataSources = props.dataSources,
1315
+ options = props.options,
1316
+ _props$context = props.context,
1317
+ context = _props$context === void 0 ? {} : _props$context,
1318
+ width = props.width,
1319
+ height = props.height,
1320
+ onComputedProps = props.onComputedProps,
1321
+ onEventTrigger = props.onEventTrigger,
1322
+ theme = props.theme,
1323
+ onRequestParamsChange = props.onRequestParamsChange;
1324
+
1156
1325
  var _React$useContext = React.useContext(TimezoneContext_1.default),
1157
- serializedTimezone = _React$useContext.serializedTimezone;
1326
+ serializedTimezone = _React$useContext.serializedTimezone;
1327
+
1158
1328
  if (serializedTimezone) {
1159
1329
  /*
1160
1330
  @splunk/moment currently does not allow us to customize the timezone on a per visualization basis.
@@ -1168,44 +1338,58 @@ var withDashboardViz = function withDashboardViz(opts) {
1168
1338
  moment_1.default.setDefaultSplunkTimezone(serializedTimezone);
1169
1339
  }
1170
1340
  }
1341
+
1171
1342
  var themeFunc = function themeFunc(themeVar) {
1172
1343
  var _a, _b;
1344
+
1173
1345
  return (_b = (_a = vizConfig.themes)[themeVar]) === null || _b === void 0 ? void 0 : _b.call(_a, props);
1174
1346
  };
1347
+
1175
1348
  var bgColorFromTheme = themeFunc('defaultBackgroundColor');
1176
- var _getSettingsFromTheme = getSettingsFromThemedProps_1.default({
1177
- theme: theme
1178
- }),
1179
- currentThemeFamily = _getSettingsFromTheme.family,
1180
- currentThemeColorScheme = _getSettingsFromTheme.colorScheme,
1181
- currentThemeDensity = _getSettingsFromTheme.density;
1349
+
1350
+ var _ref = (0, getSettingsFromThemedProps_1.default)({
1351
+ theme: theme
1352
+ }),
1353
+ currentThemeFamily = _ref.family,
1354
+ currentThemeColorScheme = _ref.colorScheme,
1355
+ currentThemeDensity = _ref.density;
1356
+
1182
1357
  var evaluatedOptions = {}; // evaluatedOptions need to be initialized as an empty object
1358
+
1183
1359
  var _React$useState = React.useState({}),
1184
- _React$useState2 = _slicedToArray(_React$useState, 2),
1185
- evaluatedOptionsAsync = _React$useState2[0],
1186
- setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
1360
+ _React$useState2 = _slicedToArray(_React$useState, 2),
1361
+ evaluatedOptionsAsync = _React$useState2[0],
1362
+ setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
1363
+
1364
+
1187
1365
  var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
1188
- var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat(id_1.createGUID())),
1189
- _React$useState4 = _slicedToArray(_React$useState3, 1),
1190
- visualizationID = _React$useState4[0];
1366
+
1367
+ var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat((0, id_1.createGUID)())),
1368
+ _React$useState4 = _slicedToArray(_React$useState3, 1),
1369
+ visualizationID = _React$useState4[0];
1370
+
1191
1371
  var _React$useState5 = React.useState({}),
1192
- _React$useState6 = _slicedToArray(_React$useState5, 2),
1193
- dataSourcesInState = _React$useState6[0],
1194
- setDataSourcesInState = _React$useState6[1];
1372
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
1373
+ dataSourcesInState = _React$useState6[0],
1374
+ setDataSourcesInState = _React$useState6[1];
1375
+
1195
1376
  var _React$useState7 = React.useState(),
1196
- _React$useState8 = _slicedToArray(_React$useState7, 2),
1197
- dataFramesInState = _React$useState8[0],
1198
- setDataFramesInState = _React$useState8[1];
1199
- var _React$useState9 = React.useState(Boolean(featureFlagContext && featureFlagContext.visualizations_useWebWorkersForDSL && typeof Worker !== 'undefined')),
1200
- _React$useState10 = _slicedToArray(_React$useState9, 2),
1201
- useAsyncEvaluatedOptions = _React$useState10[0],
1202
- setUseAsyncEvaluatedOptions = _React$useState10[1];
1203
- evaluatedOptions = useDeepMemo_1.useDeepMemo(function () {
1377
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
1378
+ dataFramesInState = _React$useState8[0],
1379
+ setDataFramesInState = _React$useState8[1];
1380
+
1381
+ var _React$useState9 = React.useState(Boolean(featureFlagContext === null || featureFlagContext === void 0 ? void 0 : featureFlagContext.visualizations_useWebWorkersForDSL)),
1382
+ _React$useState10 = _slicedToArray(_React$useState9, 2),
1383
+ useAsyncEvaluatedOptions = _React$useState10[0],
1384
+ setUseAsyncEvaluatedOptions = _React$useState10[1];
1385
+
1386
+ var isMounted = React.useRef(true);
1387
+ evaluatedOptions = (0, useDeepMemo_1.useDeepMemo)(function () {
1204
1388
  try {
1205
1389
  if (useAsyncEvaluatedOptions) {
1206
1390
  var optionsToEvaluate = {
1207
- context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
1208
- options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
1391
+ context: (0, lodash_1.defaultsDeep)({}, context, vizConfig.defaultContext),
1392
+ options: (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, defaultOptions)
1209
1393
  };
1210
1394
  var asyncDynamicOptionsEvaluatorParams = {
1211
1395
  visualizationID: visualizationID,
@@ -1216,21 +1400,23 @@ var withDashboardViz = function withDashboardViz(opts) {
1216
1400
  };
1217
1401
  async_dynamic_options_evaluator_1.default.evaluate(asyncDynamicOptionsEvaluatorParams).then(function (results) {
1218
1402
  setEvaluatedOptionsAsync(results.results);
1219
- }).catch(function (e) {
1220
- // eslint-disable-next-line no-console
1221
- console.error("unexpected error evaluating options - async: ".concat(e.message));
1222
- setUseAsyncEvaluatedOptions(false);
1403
+ }).catch(function () {
1404
+ if (isMounted.current) {
1405
+ setUseAsyncEvaluatedOptions(false);
1406
+ }
1223
1407
  });
1224
1408
  } else {
1225
1409
  var dataFrames = dataFramesInState;
1410
+
1226
1411
  if (dataSources !== dataSourcesInState) {
1227
1412
  setDataSourcesInState(dataSources);
1228
1413
  dataFrames = Options_1.Options.dataFrameFromDataSource(dataSources);
1229
1414
  setDataFramesInState(dataFrames);
1230
1415
  }
1416
+
1231
1417
  return Options_1.Options.evaluate({
1232
- context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
1233
- options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
1418
+ context: (0, lodash_1.defaultsDeep)({}, context, vizConfig.defaultContext),
1419
+ options: (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, defaultOptions)
1234
1420
  }, dataSources, themeFunc, dataFrames);
1235
1421
  }
1236
1422
  } catch (e) {
@@ -1238,67 +1424,76 @@ var withDashboardViz = function withDashboardViz(opts) {
1238
1424
  console.error("unexpected error evaluating options: ".concat(e.message));
1239
1425
  return {};
1240
1426
  }
1427
+
1241
1428
  return {};
1242
1429
  }, [currentThemeFamily, currentThemeColorScheme, currentThemeDensity, options, context, dataSources, serializedTimezone, useAsyncEvaluatedOptions]);
1243
- var evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync;
1244
- // trellis specific backgroundColor update for onComputedProps
1430
+ var evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync; // trellis specific backgroundColor update for onComputedProps
1245
1431
  // if trellis is enabled following these three criteria - 1) trellis feature flag is enabled 2) vizConfig supports array has 'trellis' 3) option 'splitByLayout' is set to 'trellis
1246
1432
  // onComputedProps api should return back trellisBackgroundColor value for backgroundColor option to support coloring of sibling panels (for eg:- title/ description on UDF side)
1433
+
1247
1434
  var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
1248
1435
  var clonedEvaluatedOptions = evaluatedOptionsToUse;
1436
+
1249
1437
  if (isTrellisFeatureFlagOn && ((_a = vizConfig === null || vizConfig === void 0 ? void 0 : vizConfig.supports) === null || _a === void 0 ? void 0 : _a.includes(VizBehavior_1.VizBehavior.TRELLIS)) && (clonedEvaluatedOptions === null || clonedEvaluatedOptions === void 0 ? void 0 : clonedEvaluatedOptions.splitByLayout) === VizBehavior_1.VizBehavior.TRELLIS) {
1250
1438
  clonedEvaluatedOptions = Object.assign(Object.assign({}, evaluatedOptionsToUse), {
1251
1439
  backgroundColor: clonedEvaluatedOptions === null || clonedEvaluatedOptions === void 0 ? void 0 : clonedEvaluatedOptions.trellisBackgroundColor
1252
1440
  });
1253
- }
1254
- // useEffect hook needs to be initialized before any early returns
1441
+ } // useEffect hook needs to be initialized before any early returns
1255
1442
  // this is in accordance with the order of hook calls being the same on each render https://reactjs.org/docs/hooks-rules.html#explanation
1443
+
1444
+
1256
1445
  React.useEffect(function () {
1257
1446
  onComputedProps(clonedEvaluatedOptions);
1258
1447
  });
1259
1448
  React.useEffect(function () {
1260
1449
  return function () {
1261
1450
  if (useAsyncEvaluatedOptions) {
1451
+ isMounted.current = false;
1262
1452
  async_dynamic_options_evaluator_1.default.reset(visualizationID);
1263
1453
  }
1264
- };
1265
- // eslint-disable-next-line react-hooks/exhaustive-deps
1266
- }, []);
1267
- // present warning message if any required props are missing
1454
+ }; // eslint-disable-next-line react-hooks/exhaustive-deps
1455
+ }, []); // present warning message if any required props are missing
1456
+
1268
1457
  var _vizConfig$requiredPr = vizConfig.requiredProps,
1269
- requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
1270
- supports = vizConfig.supports;
1271
- var missing = MissingPropsMessage_1.missingKeys(requiredProps, evaluatedOptionsToUse);
1458
+ requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
1459
+ supports = vizConfig.supports;
1460
+ var missing = (0, MissingPropsMessage_1.missingKeys)(requiredProps, evaluatedOptionsToUse);
1461
+
1272
1462
  if (missing.length > 0 && supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && vizConfig.key !== 'splunk.singlevalue' // For SV missing props msg is not displayed if required props majorValue is missing, instead this will be handled from the component, instead handled within component
1273
1463
  ) {
1274
- return React.createElement(MissingPropsMessage_1.default, {
1275
- "data-test": "missing-props-message",
1276
- width: width,
1277
- height: height,
1278
- missingProps: missing,
1279
- backgroundColor: bgColorFromTheme
1280
- });
1281
- }
1282
- // events
1464
+ return React.createElement(MissingPropsMessage_1.default, {
1465
+ "data-test": "missing-props-message",
1466
+ width: width,
1467
+ height: height,
1468
+ missingProps: missing,
1469
+ backgroundColor: bgColorFromTheme
1470
+ });
1471
+ } // events
1472
+
1473
+
1283
1474
  var eventCallbackProps = {};
1475
+
1284
1476
  if (hasEventHandlers && mode === 'view' && vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.EVENTS) > -1) {
1285
1477
  var supportedEvents = vizConfig.events;
1286
1478
  Object.keys(supportedEvents).forEach(function (eventName) {
1287
- var eventCallbackPropName = lodash_1.camelCase("on.".concat(eventName));
1288
- eventCallbackProps[eventCallbackPropName] = null;
1289
- // todo: refactor single value and single value icon to send payload from viz
1479
+ var eventCallbackPropName = (0, lodash_1.camelCase)("on.".concat(eventName));
1480
+ eventCallbackProps[eventCallbackPropName] = null; // todo: refactor single value and single value icon to send payload from viz
1290
1481
  // then remove these lines
1482
+
1291
1483
  var payloadKeys = supportedEvents[eventName].payloadKeys;
1292
1484
  var payload = {};
1485
+
1293
1486
  if (Array.isArray(payloadKeys) && payloadKeys.length) {
1294
1487
  payloadKeys.forEach(function (p) {
1295
1488
  payload[p] = evaluatedOptionsToUse[p];
1296
1489
  });
1297
1490
  }
1491
+
1298
1492
  eventCallbackProps[eventCallbackPropName] = function (ev) {
1299
1493
  if (ev && ev.payload) {
1300
1494
  payload = ev.payload;
1301
1495
  }
1496
+
1302
1497
  return onEventTrigger({
1303
1498
  originalEvent: ev,
1304
1499
  payload: payload,
@@ -1306,8 +1501,9 @@ var withDashboardViz = function withDashboardViz(opts) {
1306
1501
  });
1307
1502
  };
1308
1503
  });
1309
- }
1310
- // compute pure viz props which are not from options
1504
+ } // compute pure viz props which are not from options
1505
+
1506
+
1311
1507
  var computedVizProps = computeVizProps(Object.assign(Object.assign(Object.assign(Object.assign({}, props), evaluatedOptionsToUse), eventCallbackProps), {
1312
1508
  themeFunc: themeFunc
1313
1509
  }));
@@ -1325,21 +1521,25 @@ var withDashboardViz = function withDashboardViz(opts) {
1325
1521
  * In future, we could automatically detect which all datasources are being used
1326
1522
  * and bind those magically to pagination/sorting behavior.
1327
1523
  */
1524
+
1328
1525
  var dataSourceMetadata = {};
1329
1526
  var OptionKey = 'paginateDataSourceKey';
1330
- var paginateDataSourceKey = lodash_1.has(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
1331
- if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && lodash_1.has(dataSources, paginateDataSourceKey)) {
1332
- var requestParams = lodash_1.get(dataSources, [paginateDataSourceKey, 'requestParams'], {});
1333
- var meta = lodash_1.get(dataSources, [paginateDataSourceKey, 'meta'], {});
1527
+ var paginateDataSourceKey = (0, lodash_1.has)(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
1528
+
1529
+ if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && (0, lodash_1.has)(dataSources, paginateDataSourceKey)) {
1530
+ var requestParams = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'requestParams'], {});
1531
+ var meta = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'meta'], {});
1532
+
1334
1533
  var handleRequestParamsChange = function handleRequestParamsChange(payload) {
1335
1534
  return onRequestParamsChange(paginateDataSourceKey, payload);
1336
1535
  };
1337
- var sortParams = getSorting_1.getSortingParams({
1536
+
1537
+ var sortParams = (0, getSorting_1.getSortingParams)({
1338
1538
  requestParams: requestParams,
1339
1539
  meta: meta,
1340
1540
  onRequestParamsChange: handleRequestParamsChange
1341
1541
  });
1342
- var paginatorParams = getPagination_1.getPaginationParams({
1542
+ var paginatorParams = (0, getPagination_1.getPaginationParams)({
1343
1543
  requestParams: requestParams,
1344
1544
  meta: meta,
1345
1545
  onRequestParamsChange: handleRequestParamsChange
@@ -1348,115 +1548,132 @@ var withDashboardViz = function withDashboardViz(opts) {
1348
1548
  sortParams: sortParams,
1349
1549
  paginatorParams: paginatorParams
1350
1550
  };
1351
- }
1352
- // if were using webworkers and this is the first render we dont want to show a viz with missing data so we return null
1551
+ } // if were using webworkers and this is the first render we dont want to show a viz with missing data so we return null
1552
+
1553
+
1353
1554
  if (useAsyncEvaluatedOptions && Object.keys(evaluatedOptionsToUse).length === 0) {
1354
1555
  return null;
1355
1556
  }
1557
+
1356
1558
  return React.createElement(SanitizedReactViz, Object.assign({
1357
1559
  mode: mode,
1358
1560
  width: width,
1359
1561
  height: height
1360
1562
  }, evaluatedOptionsToUse, computedVizProps, eventCallbackProps, dataSourceMetadata));
1361
1563
  };
1564
+
1362
1565
  DashboardViz.propTypes = Object.assign(Object.assign({}, SplunkVisualization_1.default.propTypes), ReactViz.propTypes);
1363
1566
  DashboardViz.defaultProps = Object.assign(Object.assign(Object.assign({}, SplunkVisualization_1.default.defaultProps), ReactViz.defaultProps), {
1364
1567
  // using withTheme requires component to receive theme prop. In case the consumer did not provide ThemeProvider, a default empty object will prevent warnings.
1365
1568
  theme: {}
1366
- });
1367
- // attach viz config
1368
- DashboardViz.config = vizConfig;
1369
- // @ts-ignore: TODO fix sc upgrade TS issues
1370
- return styled_components_1.withTheme(withPlaceholder_1.default(withEditModeCover_1.default(DashboardViz, disableEditModeCover), useIconPlaceholder));
1569
+ }); // attach viz config
1570
+
1571
+ DashboardViz.config = vizConfig; // @ts-ignore: TODO fix sc upgrade TS issues
1572
+
1573
+ return (0, styled_components_1.withTheme)((0, withPlaceholder_1.default)((0, withEditModeCover_1.default)(DashboardViz, disableEditModeCover), useIconPlaceholder));
1371
1574
  };
1575
+
1372
1576
  exports.default = withDashboardViz;
1373
1577
 
1374
1578
  /***/ }),
1375
1579
 
1376
- /***/ 37:
1580
+ /***/ 38:
1377
1581
  /***/ (function(module, exports) {
1378
1582
 
1379
1583
  module.exports = require("@splunk/themes/getSettingsFromThemedProps");
1380
1584
 
1381
1585
  /***/ }),
1382
1586
 
1383
- /***/ 38:
1587
+ /***/ 39:
1384
1588
  /***/ (function(module, exports) {
1385
1589
 
1386
1590
  module.exports = require("@splunk/visualizations-shared/SanitizeProps");
1387
1591
 
1388
1592
  /***/ }),
1389
1593
 
1390
- /***/ 39:
1594
+ /***/ 4:
1391
1595
  /***/ (function(module, exports) {
1392
1596
 
1393
- module.exports = require("@splunk/moment");
1597
+ module.exports = require("styled-components");
1394
1598
 
1395
1599
  /***/ }),
1396
1600
 
1397
- /***/ 4:
1601
+ /***/ 40:
1398
1602
  /***/ (function(module, exports) {
1399
1603
 
1400
- module.exports = require("styled-components");
1604
+ module.exports = require("@splunk/moment");
1401
1605
 
1402
1606
  /***/ }),
1403
1607
 
1404
- /***/ 40:
1608
+ /***/ 41:
1405
1609
  /***/ (function(module, exports) {
1406
1610
 
1407
1611
  module.exports = require("@splunk/async-dynamic-options-evaluator");
1408
1612
 
1409
1613
  /***/ }),
1410
1614
 
1411
- /***/ 41:
1615
+ /***/ 42:
1412
1616
  /***/ (function(module, exports, __webpack_require__) {
1413
1617
 
1414
1618
  "use strict";
1415
1619
 
1416
1620
 
1417
1621
  var _classCallCheck = __webpack_require__(9);
1622
+
1418
1623
  Object.defineProperty(exports, "__esModule", {
1419
1624
  value: true
1420
1625
  });
1421
1626
  exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
1422
1627
  /* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
1628
+
1423
1629
  var T = __webpack_require__(0);
1630
+
1424
1631
  var lodash_1 = __webpack_require__(3);
1425
- var VizActionHandler_1 = __webpack_require__(42);
1426
- // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
1632
+
1633
+ var VizActionHandler_1 = __webpack_require__(43); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
1634
+
1635
+
1427
1636
  exports.INITIAL_WIDTH = 250;
1428
1637
  exports.INITIAL_HEIGHT = 250;
1429
1638
  /**
1430
1639
  * A Splunk visualization
1431
1640
  */
1641
+
1432
1642
  var SplunkVisualization = function SplunkVisualization() {
1433
1643
  _classCallCheck(this, SplunkVisualization);
1434
1644
  };
1645
+
1435
1646
  SplunkVisualization.propTypes = {
1436
1647
  /**
1437
1648
  * display mode
1438
1649
  */
1439
1650
  mode: T.oneOf(['view', 'edit', 'export']).isRequired,
1651
+
1440
1652
  /**
1441
1653
  * width in pixel or string, defaults to 100%
1442
1654
  */
1443
1655
  width: T.oneOfType([T.string, T.number]).isRequired,
1656
+
1444
1657
  /**
1445
1658
  * height in pixel or string
1446
1659
  */
1447
1660
  height: T.oneOfType([T.string, T.number]).isRequired,
1661
+
1448
1662
  /**
1449
1663
  * visualization context used for dynamic option evaluation
1450
1664
  */
1451
1665
  context: T.object,
1666
+
1452
1667
  /**
1453
1668
  * visualization formatting options
1454
1669
  */
1455
1670
  options: T.object,
1671
+
1456
1672
  /**
1457
1673
  * A callback to update formatting options
1458
1674
  */
1459
1675
  onOptionsChange: T.func,
1676
+
1460
1677
  /**
1461
1678
  * datasource state which include data and request params, object key indicate the datasource type.
1462
1679
  */
@@ -1465,6 +1682,7 @@ SplunkVisualization.propTypes = {
1465
1682
  * current request params
1466
1683
  */
1467
1684
  requestParams: T.object,
1685
+
1468
1686
  /**
1469
1687
  * current dataset
1470
1688
  */
@@ -1472,6 +1690,7 @@ SplunkVisualization.propTypes = {
1472
1690
  fields: T.array,
1473
1691
  columns: T.array
1474
1692
  }),
1693
+
1475
1694
  /**
1476
1695
  * error
1477
1696
  */
@@ -1479,29 +1698,35 @@ SplunkVisualization.propTypes = {
1479
1698
  level: T.string,
1480
1699
  message: T.string
1481
1700
  }),
1701
+
1482
1702
  /**
1483
1703
  * meta data that came with the dataset
1484
1704
  */
1485
1705
  meta: T.object
1486
1706
  })),
1707
+
1487
1708
  /**
1488
1709
  * A callback to trigger event
1489
1710
  */
1490
1711
  onEventTrigger: T.func,
1712
+
1491
1713
  /**
1492
1714
  * Inform viz if there are handlers listening to events
1493
1715
  */
1494
1716
  hasEventHandlers: T.bool,
1717
+
1495
1718
  /**
1496
1719
  * A callback to communicate computed props to a consumer
1497
1720
  */
1498
1721
  onComputedProps: T.func,
1722
+
1499
1723
  /**
1500
1724
  * A callback to obtain visualization api
1501
1725
  */
1502
1726
  vizActionHandlerRef: T.func,
1503
1727
  loading: T.bool,
1504
1728
  theme: T.object,
1729
+
1505
1730
  /**
1506
1731
  * A callback to request new data with updated request params
1507
1732
  */
@@ -1510,6 +1735,7 @@ SplunkVisualization.propTypes = {
1510
1735
  /**
1511
1736
  *
1512
1737
  */
1738
+
1513
1739
  SplunkVisualization.defaultProps = {
1514
1740
  // BaseVisualization in dashboard-visualizations uses 100% for width but 250 for height
1515
1741
  width: '100%',
@@ -1538,26 +1764,29 @@ exports.default = SplunkVisualization;
1538
1764
 
1539
1765
  /***/ }),
1540
1766
 
1541
- /***/ 42:
1767
+ /***/ 43:
1542
1768
  /***/ (function(module, exports, __webpack_require__) {
1543
1769
 
1544
1770
  "use strict";
1545
1771
 
1546
1772
 
1547
1773
  var _classCallCheck = __webpack_require__(9);
1774
+
1548
1775
  var _createClass = __webpack_require__(18);
1776
+
1549
1777
  Object.defineProperty(exports, "__esModule", {
1550
1778
  value: true
1551
1779
  });
1552
1780
  exports.DefaultVizActionHandler = void 0;
1781
+
1553
1782
  var DefaultVizActionHandler = /*#__PURE__*/function () {
1554
1783
  function DefaultVizActionHandler() {
1555
1784
  _classCallCheck(this, DefaultVizActionHandler);
1556
1785
  }
1786
+
1557
1787
  _createClass(DefaultVizActionHandler, [{
1558
1788
  key: "focus",
1559
- value: function focus() {
1560
- // noop
1789
+ value: function focus() {// noop
1561
1790
  }
1562
1791
  }, {
1563
1792
  key: "snapshot",
@@ -1565,23 +1794,11 @@ var DefaultVizActionHandler = /*#__PURE__*/function () {
1565
1794
  return null; // noop
1566
1795
  }
1567
1796
  }]);
1797
+
1568
1798
  return DefaultVizActionHandler;
1569
1799
  }();
1570
- exports.DefaultVizActionHandler = DefaultVizActionHandler;
1571
-
1572
- /***/ }),
1573
-
1574
- /***/ 43:
1575
- /***/ (function(module, exports, __webpack_require__) {
1576
-
1577
- "use strict";
1578
1800
 
1579
-
1580
- Object.defineProperty(exports, "__esModule", {
1581
- value: true
1582
- });
1583
- exports.validSortDirs = void 0;
1584
- exports.validSortDirs = ['asc', 'desc', 'none'];
1801
+ exports.DefaultVizActionHandler = DefaultVizActionHandler;
1585
1802
 
1586
1803
  /***/ }),
1587
1804
 
@@ -1595,7 +1812,9 @@ Object.defineProperty(exports, "__esModule", {
1595
1812
  value: true
1596
1813
  });
1597
1814
  exports.useDeepMemo = void 0;
1815
+
1598
1816
  var react_1 = __webpack_require__(1);
1817
+
1599
1818
  var lodash_1 = __webpack_require__(3);
1600
1819
  /**
1601
1820
  * This hook evaluates and stores the result of a passed function and only
@@ -1610,16 +1829,21 @@ var lodash_1 = __webpack_require__(3);
1610
1829
  * @param fn the function to be executed and
1611
1830
  * @param dependencies an array of dependencies
1612
1831
  */
1832
+
1833
+
1613
1834
  var useDeepMemo = function useDeepMemo(fn, dependencies) {
1614
- var ref = react_1.useRef();
1615
- if (!ref.current || !lodash_1.isEqual(dependencies, ref.current.dependencies)) {
1835
+ var ref = (0, react_1.useRef)();
1836
+
1837
+ if (!ref.current || !(0, lodash_1.isEqual)(dependencies, ref.current.dependencies)) {
1616
1838
  ref.current = {
1617
1839
  dependencies: dependencies,
1618
1840
  value: fn()
1619
1841
  };
1620
1842
  }
1843
+
1621
1844
  return ref.current.value;
1622
1845
  };
1846
+
1623
1847
  exports.useDeepMemo = useDeepMemo;
1624
1848
 
1625
1849
  /***/ }),
@@ -1634,19 +1858,27 @@ Object.defineProperty(exports, "__esModule", {
1634
1858
  value: true
1635
1859
  });
1636
1860
  exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
1861
+
1637
1862
  var React = __webpack_require__(1);
1863
+
1638
1864
  var T = __webpack_require__(0);
1865
+
1639
1866
  var i18n_1 = __webpack_require__(2);
1867
+
1640
1868
  var Message_1 = __webpack_require__(10);
1869
+
1641
1870
  var FixedSizeContainer_1 = __webpack_require__(13);
1642
1871
  /**
1643
1872
  * @method isMissing
1644
1873
  * @param {any} v
1645
1874
  * @returns {boolean} true if the input value === null or undefined
1646
1875
  */
1876
+
1877
+
1647
1878
  var isMissing = function isMissing(v) {
1648
1879
  return v === null || v === undefined;
1649
1880
  };
1881
+
1650
1882
  exports.isMissing = isMissing;
1651
1883
  /**
1652
1884
  * @method misskingKeys
@@ -1654,11 +1886,13 @@ exports.isMissing = isMissing;
1654
1886
  * @param {object} target
1655
1887
  * @returns {string[]} the keys of missing required props
1656
1888
  */
1889
+
1657
1890
  var missingKeys = function missingKeys(keys, target) {
1658
1891
  return keys.filter(function (k) {
1659
- return exports.isMissing(target[k]);
1892
+ return (0, exports.isMissing)(target[k]);
1660
1893
  });
1661
1894
  };
1895
+
1662
1896
  exports.missingKeys = missingKeys;
1663
1897
  var propTypes = {
1664
1898
  width: T.oneOfType([T.string, T.number]),
@@ -1672,28 +1906,30 @@ var propTypes = {
1672
1906
  * @param {MissingPropsProps} props
1673
1907
  * @returns {React.ReactElement}
1674
1908
  */
1909
+
1675
1910
  var MissingPropsMessage = function MissingPropsMessage(props) {
1676
1911
  var width = props.width,
1677
- height = props.height,
1678
- missingProps = props.missingProps;
1912
+ height = props.height,
1913
+ missingProps = props.missingProps;
1679
1914
  return React.createElement(Message_1.default, {
1680
1915
  "data-test": "message",
1681
1916
  width: width,
1682
1917
  height: height,
1683
- message: i18n_1._("Missing property: ".concat(missingProps.join(', ')))
1918
+ message: (0, i18n_1._)("Missing property: ".concat(missingProps.join(', ')))
1684
1919
  });
1685
1920
  };
1921
+
1686
1922
  exports.MissingPropsMessage = MissingPropsMessage;
1687
1923
  exports.MissingPropsMessage.propTypes = propTypes;
1688
1924
  exports.MissingPropsMessage.defaultProps = {
1689
1925
  width: '100%',
1690
1926
  height: 250
1691
1927
  };
1692
- exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
1928
+ exports.default = (0, FixedSizeContainer_1.default)(exports.MissingPropsMessage);
1693
1929
 
1694
1930
  /***/ }),
1695
1931
 
1696
- /***/ 452:
1932
+ /***/ 455:
1697
1933
  /***/ (function(module, exports, __webpack_require__) {
1698
1934
 
1699
1935
  "use strict";
@@ -1701,27 +1937,38 @@ exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
1701
1937
 
1702
1938
  var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
1703
1939
  if (k2 === undefined) k2 = k;
1704
- Object.defineProperty(o, k2, {
1705
- enumerable: true,
1706
- get: function get() {
1707
- return m[k];
1708
- }
1709
- });
1940
+ var desc = Object.getOwnPropertyDescriptor(m, k);
1941
+
1942
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1943
+ desc = {
1944
+ enumerable: true,
1945
+ get: function get() {
1946
+ return m[k];
1947
+ }
1948
+ };
1949
+ }
1950
+
1951
+ Object.defineProperty(o, k2, desc);
1710
1952
  } : function (o, m, k, k2) {
1711
1953
  if (k2 === undefined) k2 = k;
1712
1954
  o[k2] = m[k];
1713
1955
  });
1956
+
1714
1957
  var __exportStar = this && this.__exportStar || function (m, exports) {
1715
1958
  for (var p in m) {
1716
1959
  if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1717
1960
  }
1718
1961
  };
1962
+
1719
1963
  Object.defineProperty(exports, "__esModule", {
1720
1964
  value: true
1721
1965
  });
1722
1966
  exports.default = void 0;
1723
- __exportStar(__webpack_require__(162), exports);
1724
- var Rectangle_1 = __webpack_require__(162);
1967
+
1968
+ __exportStar(__webpack_require__(165), exports);
1969
+
1970
+ var Rectangle_1 = __webpack_require__(165);
1971
+
1725
1972
  Object.defineProperty(exports, "default", {
1726
1973
  enumerable: true,
1727
1974
  get: function get() {
@@ -1731,7 +1978,7 @@ Object.defineProperty(exports, "default", {
1731
1978
 
1732
1979
  /***/ }),
1733
1980
 
1734
- /***/ 453:
1981
+ /***/ 456:
1735
1982
  /***/ (function(module, exports, __webpack_require__) {
1736
1983
 
1737
1984
  "use strict";
@@ -1741,18 +1988,31 @@ Object.defineProperty(exports, "__esModule", {
1741
1988
  value: true
1742
1989
  });
1743
1990
  exports.optionsSchema = void 0;
1991
+
1744
1992
  var visualization_icons_1 = __webpack_require__(52);
1993
+
1745
1994
  var schemaUtils_1 = __webpack_require__(16);
1995
+
1746
1996
  var i18n_1 = __webpack_require__(2);
1747
- var PresetPalettes_1 = __webpack_require__(60);
1748
- var themes_1 = __webpack_require__(59);
1997
+
1998
+ var PresetPalettes_1 = __webpack_require__(61);
1999
+
2000
+ var themes_1 = __webpack_require__(60);
2001
+
1749
2002
  var VizBehavior_1 = __webpack_require__(6);
1750
- var VizCategory_1 = __webpack_require__(35);
2003
+
2004
+ var VizCategory_1 = __webpack_require__(36);
2005
+
1751
2006
  var configUtils_1 = __webpack_require__(20);
1752
- var DynamicFillColorEditor_1 = __webpack_require__(113);
1753
- var DynamicStrokeColorEditor_1 = __webpack_require__(114);
1754
- var StaticFillColorEditor_1 = __webpack_require__(115);
1755
- var StaticStrokeColorEditor_1 = __webpack_require__(116);
2007
+
2008
+ var DynamicFillColorEditor_1 = __webpack_require__(114);
2009
+
2010
+ var DynamicStrokeColorEditor_1 = __webpack_require__(115);
2011
+
2012
+ var StaticFillColorEditor_1 = __webpack_require__(116);
2013
+
2014
+ var StaticStrokeColorEditor_1 = __webpack_require__(117);
2015
+
1756
2016
  var dataContract = {
1757
2017
  requiredDataSources: [],
1758
2018
  optionalDataSources: [{
@@ -1869,7 +2129,7 @@ exports.optionsSchema = {
1869
2129
  description: 'Specifies the shape to be used at the corners of paths when they are joined.',
1870
2130
  type: 'string',
1871
2131
  default: 'miter',
1872
- pattern: schemaUtils_1.getPattern(['arcs', 'bevel', 'miter', 'miter-clip', 'round'])
2132
+ pattern: (0, schemaUtils_1.getPattern)(['arcs', 'bevel', 'miter', 'miter-clip', 'round'])
1873
2133
  },
1874
2134
  strokeOpacity: {
1875
2135
  description: 'Specify the opacity of the stroke. Choose a number in the range of 0 - 1 (inclusive). You can also express the value as a percentage. For example, "0.80" in source or "80%" in UI.',
@@ -1884,7 +2144,7 @@ exports.optionsSchema = {
1884
2144
  };
1885
2145
  var themes = {
1886
2146
  defaultFillColor: function defaultFillColor(props) {
1887
- return themes_1.pick({
2147
+ return (0, themes_1.pick)({
1888
2148
  enterprise: {
1889
2149
  dark: themes_1.variables.gray25(props),
1890
2150
  light: themes_1.variables.gray80(props)
@@ -1893,7 +2153,7 @@ var themes = {
1893
2153
  })(props);
1894
2154
  },
1895
2155
  defaultStrokeColor: function defaultStrokeColor(props) {
1896
- return themes_1.pick({
2156
+ return (0, themes_1.pick)({
1897
2157
  enterprise: {
1898
2158
  dark: themes_1.variables.gray80(props),
1899
2159
  light: themes_1.variables.gray30(props)
@@ -1912,14 +2172,14 @@ var basePresetOptions = {
1912
2172
  };
1913
2173
  var presets = [{
1914
2174
  // dummy context variables to allow for resetting of unused context states
1915
- label: i18n_1._('None'),
2175
+ label: (0, i18n_1._)('None'),
1916
2176
  name: 'rectangle.none',
1917
2177
  value: {
1918
2178
  context: Object.assign({}, basePresetContext),
1919
2179
  options: Object.assign({}, basePresetOptions)
1920
2180
  }
1921
2181
  }, {
1922
- label: i18n_1._('Fill'),
2182
+ label: (0, i18n_1._)('Fill'),
1923
2183
  name: 'rectangle.fill',
1924
2184
  value: {
1925
2185
  context: Object.assign(Object.assign({}, basePresetContext), {
@@ -1931,7 +2191,7 @@ var presets = [{
1931
2191
  })
1932
2192
  }
1933
2193
  }, {
1934
- label: i18n_1._('Stroke'),
2194
+ label: (0, i18n_1._)('Stroke'),
1935
2195
  name: 'rectangle.stroke',
1936
2196
  value: {
1937
2197
  context: Object.assign(Object.assign({}, basePresetContext), {
@@ -1943,7 +2203,7 @@ var presets = [{
1943
2203
  })
1944
2204
  }
1945
2205
  }, {
1946
- label: i18n_1._('Fill and Stroke'),
2206
+ label: (0, i18n_1._)('Fill and Stroke'),
1947
2207
  name: 'rectangle.fillAndStroke',
1948
2208
  value: {
1949
2209
  context: Object.assign(Object.assign({}, basePresetContext), {
@@ -1959,17 +2219,17 @@ var presets = [{
1959
2219
  }
1960
2220
  }];
1961
2221
  var editorConfig = [{
1962
- label: i18n_1._('Color and style'),
2222
+ label: (0, i18n_1._)('Color and style'),
1963
2223
  layout: [[{
1964
- label: i18n_1._('Dynamic elements'),
2224
+ label: (0, i18n_1._)('Dynamic elements'),
1965
2225
  key: 'presetSelector',
1966
2226
  editor: 'editor.presetSelector',
1967
2227
  editorProps: {
1968
2228
  presets: presets,
1969
2229
  value: function value(_ref) {
1970
2230
  var context = _ref.context,
1971
- options = _ref.options;
1972
- var initialPreset = configUtils_1.getInitialPreset(context, options, presets);
2231
+ options = _ref.options;
2232
+ var initialPreset = (0, configUtils_1.getInitialPreset)(context, options, presets);
1973
2233
  return initialPreset && initialPreset.label || null;
1974
2234
  }
1975
2235
  }
@@ -1977,46 +2237,46 @@ var editorConfig = [{
1977
2237
  editorProps: {
1978
2238
  themes: themes
1979
2239
  }
1980
- })], [DynamicFillColorEditor_1.getDynamicFillColorEditor({
2240
+ })], [(0, DynamicFillColorEditor_1.getDynamicFillColorEditor)({
1981
2241
  defaultContext: defaultContext,
1982
2242
  defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
1983
2243
  })], [Object.assign(Object.assign({}, StaticStrokeColorEditor_1.default), {
1984
2244
  editorProps: {
1985
2245
  themes: themes
1986
2246
  }
1987
- })], [DynamicStrokeColorEditor_1.getDynamicStrokeColorEditor({
2247
+ })], [(0, DynamicStrokeColorEditor_1.getDynamicStrokeColorEditor)({
1988
2248
  defaultContext: defaultContext,
1989
2249
  defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
1990
2250
  })], [{
1991
- label: i18n_1._('Fill opacity (%)'),
2251
+ label: (0, i18n_1._)('Fill opacity (%)'),
1992
2252
  option: 'fillOpacity',
1993
2253
  editor: 'editor.percent',
1994
2254
  editorProps: {
1995
2255
  min: 0
1996
2256
  }
1997
2257
  }, {
1998
- label: i18n_1._('Stroke opacity (%)'),
2258
+ label: (0, i18n_1._)('Stroke opacity (%)'),
1999
2259
  option: 'strokeOpacity',
2000
2260
  editor: 'editor.percent',
2001
2261
  editorProps: {
2002
2262
  min: 0
2003
2263
  }
2004
2264
  }], [{
2005
- label: i18n_1._('Stroke width'),
2265
+ label: (0, i18n_1._)('Stroke width'),
2006
2266
  option: 'strokeWidth',
2007
2267
  editor: 'editor.number',
2008
2268
  editorProps: {
2009
2269
  min: 0
2010
2270
  }
2011
2271
  }, {
2012
- label: i18n_1._('Stroke dash style'),
2272
+ label: (0, i18n_1._)('Stroke dash style'),
2013
2273
  option: 'strokeDashStyle',
2014
2274
  editor: 'editor.number',
2015
2275
  editorProps: {
2016
2276
  min: 0
2017
2277
  }
2018
2278
  }], [{
2019
- label: i18n_1._('Radius (px)'),
2279
+ label: (0, i18n_1._)('Radius (px)'),
2020
2280
  option: 'rx',
2021
2281
  editor: 'editor.number',
2022
2282
  editorProps: {
@@ -2027,16 +2287,19 @@ var editorConfig = [{
2027
2287
  /**
2028
2288
  * visualization configuration
2029
2289
  */
2290
+
2030
2291
  var config = {
2031
2292
  /**
2032
2293
  * unique viz key
2033
2294
  */
2034
2295
  key: 'splunk.rectangle',
2296
+
2035
2297
  /**
2036
2298
  * viz name
2037
2299
  */
2038
- name: i18n_1._('Rectangle'),
2300
+ name: (0, i18n_1._)('Rectangle'),
2039
2301
  category: VizCategory_1.VizCategory.SHAPES,
2302
+
2040
2303
  /**
2041
2304
  * viz icon
2042
2305
  */
@@ -2055,7 +2318,7 @@ var config = {
2055
2318
  }
2056
2319
  }
2057
2320
  };
2058
- exports.default = configUtils_1.enhanceConfig(config);
2321
+ exports.default = (0, configUtils_1.enhanceConfig)(config);
2059
2322
 
2060
2323
  /***/ }),
2061
2324
 
@@ -2068,15 +2331,19 @@ exports.default = configUtils_1.enhanceConfig(config);
2068
2331
  Object.defineProperty(exports, "__esModule", {
2069
2332
  value: true
2070
2333
  });
2334
+
2071
2335
  var React = __webpack_require__(1);
2336
+
2072
2337
  var styled_components_1 = __webpack_require__(4);
2338
+
2073
2339
  var hocUtils_1 = __webpack_require__(15);
2340
+
2074
2341
  var Cover = styled_components_1.default.div.withConfig({
2075
2342
  displayName: "withEditModeCover__Cover",
2076
2343
  componentId: "sc-1gsbnxb-0"
2077
2344
  })(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
2078
2345
  var Blocker = styled_components_1.default.div.attrs({
2079
- 'data-splunk-visualization-version': "25.13.1 - ea48ec41e"
2346
+ 'data-splunk-visualization-version': "26.1.0 - fc8bf8d77"
2080
2347
  }).withConfig({
2081
2348
  displayName: "withEditModeCover__Blocker",
2082
2349
  componentId: "sc-1gsbnxb-1"
@@ -2087,6 +2354,7 @@ var Blocker = styled_components_1.default.div.attrs({
2087
2354
  * @param {ExtendedDashViz} Visualization
2088
2355
  * @returns {ExtendedDashViz} Wrapper
2089
2356
  */
2357
+
2090
2358
  var withEditModeCover = function withEditModeCover(Visualization, disableEditModeCover) {
2091
2359
  var Wrapper = function Wrapper(props) {
2092
2360
  var mode = props.mode;
@@ -2095,12 +2363,14 @@ var withEditModeCover = function withEditModeCover(Visualization, disableEditMod
2095
2363
  "data-test": "edit-mode-cover"
2096
2364
  }));
2097
2365
  };
2098
- hocUtils_1.extendStaticWrapperProps({
2366
+
2367
+ (0, hocUtils_1.extendStaticWrapperProps)({
2099
2368
  Wrapper: Wrapper,
2100
2369
  Visualization: Visualization
2101
2370
  });
2102
2371
  return Wrapper;
2103
2372
  };
2373
+
2104
2374
  exports.default = withEditModeCover;
2105
2375
 
2106
2376
  /***/ }),
@@ -2114,27 +2384,37 @@ exports.default = withEditModeCover;
2114
2384
  Object.defineProperty(exports, "__esModule", {
2115
2385
  value: true
2116
2386
  });
2387
+
2117
2388
  var React = __webpack_require__(1);
2389
+
2118
2390
  var colorUtils_1 = __webpack_require__(12);
2391
+
2119
2392
  var variables_1 = __webpack_require__(11);
2120
- var IconPlaceholder_1 = __webpack_require__(31);
2393
+
2394
+ var IconPlaceholder_1 = __webpack_require__(32);
2395
+
2121
2396
  var VizBehavior_1 = __webpack_require__(6);
2397
+
2122
2398
  var hocUtils_1 = __webpack_require__(15);
2399
+
2123
2400
  var withPlaceholder = function withPlaceholder(Visualization) {
2124
2401
  var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
2125
2402
  var config = Visualization.config;
2126
2403
  var themes = config.themes;
2404
+
2127
2405
  var Wrapper = function Wrapper(props) {
2128
2406
  var _a, _b;
2407
+
2129
2408
  var dataSources = props.dataSources,
2130
- loading = props.loading,
2131
- options = props.options,
2132
- height = props.height,
2133
- width = props.width;
2409
+ loading = props.loading,
2410
+ options = props.options,
2411
+ height = props.height,
2412
+ width = props.width;
2134
2413
  var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
2135
- var bgColorFromTheme = colorUtils_1.isColor(options === null || options === void 0 ? void 0 : options.backgroundColor) ? options === null || options === void 0 ? void 0 : options.backgroundColor : (_a = themes === null || themes === void 0 ? void 0 : themes.defaultBackgroundColor) === null || _a === void 0 ? void 0 : _a.call(themes, props);
2414
+ var bgColorFromTheme = (0, colorUtils_1.isColor)(options === null || options === void 0 ? void 0 : options.backgroundColor) ? options === null || options === void 0 ? void 0 : options.backgroundColor : (_a = themes === null || themes === void 0 ? void 0 : themes.defaultBackgroundColor) === null || _a === void 0 ? void 0 : _a.call(themes, props);
2136
2415
  var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
2137
2416
  var iconColor = variables_1.default.contentColorActive(props);
2417
+
2138
2418
  if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
2139
2419
  return React.createElement(IconPlaceholder_1.default, {
2140
2420
  "data-test": "icon-placeholder",
@@ -2145,14 +2425,17 @@ var withPlaceholder = function withPlaceholder(Visualization) {
2145
2425
  iconColor: iconColor
2146
2426
  });
2147
2427
  }
2428
+
2148
2429
  return React.createElement(Visualization, Object.assign({}, props));
2149
2430
  };
2150
- hocUtils_1.extendStaticWrapperProps({
2431
+
2432
+ (0, hocUtils_1.extendStaticWrapperProps)({
2151
2433
  Wrapper: Wrapper,
2152
2434
  Visualization: Visualization
2153
2435
  });
2154
2436
  return Wrapper;
2155
2437
  };
2438
+
2156
2439
  exports.default = withPlaceholder;
2157
2440
 
2158
2441
  /***/ }),
@@ -2167,7 +2450,7 @@ module.exports = require("@splunk/visualization-icons");
2167
2450
  /***/ 59:
2168
2451
  /***/ (function(module, exports) {
2169
2452
 
2170
- module.exports = require("@splunk/themes");
2453
+ module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
2171
2454
 
2172
2455
  /***/ }),
2173
2456
 
@@ -2182,6 +2465,7 @@ Object.defineProperty(exports, "__esModule", {
2182
2465
  });
2183
2466
  exports.VizBehavior = void 0;
2184
2467
  var VizBehavior;
2468
+
2185
2469
  (function (VizBehavior) {
2186
2470
  /**
2187
2471
  * Dynamic Options Behavior.
@@ -2201,6 +2485,7 @@ var VizBehavior;
2201
2485
  * missing.
2202
2486
  * @type {string}
2203
2487
  */
2488
+
2204
2489
  VizBehavior["PLACEHOLDER"] = "placeholder";
2205
2490
  VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
2206
2491
  VizBehavior["TRELLIS"] = "trellis";
@@ -2211,6 +2496,13 @@ var VizBehavior;
2211
2496
  /***/ 60:
2212
2497
  /***/ (function(module, exports) {
2213
2498
 
2499
+ module.exports = require("@splunk/themes");
2500
+
2501
+ /***/ }),
2502
+
2503
+ /***/ 61:
2504
+ /***/ (function(module, exports) {
2505
+
2214
2506
  module.exports = require("@splunk/visualization-color-palettes/editors/PresetPalettes");
2215
2507
 
2216
2508
  /***/ }),