@splunk/visualizations 26.0.0 → 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 +102 -18
  2. package/Area.config.js.map +1 -1
  3. package/Area.js +618 -221
  4. package/Area.js.map +1 -1
  5. package/Bar.config.js +104 -20
  6. package/Bar.config.js.map +1 -1
  7. package/Bar.js +624 -219
  8. package/Bar.js.map +1 -1
  9. package/Bubble.config.js +94 -20
  10. package/Bubble.config.js.map +1 -1
  11. package/Bubble.js +606 -211
  12. package/Bubble.js.map +1 -1
  13. package/ChoroplethSvg.config.js +65 -14
  14. package/ChoroplethSvg.config.js.map +1 -1
  15. package/ChoroplethSvg.js +550 -183
  16. package/ChoroplethSvg.js.map +1 -1
  17. package/Column.config.js +103 -18
  18. package/Column.config.js.map +1 -1
  19. package/Column.js +637 -221
  20. package/Column.js.map +1 -1
  21. package/Ellipse.config.js +82 -17
  22. package/Ellipse.config.js.map +1 -1
  23. package/Ellipse.js +425 -148
  24. package/Ellipse.js.map +1 -1
  25. package/Events.config.js +100 -18
  26. package/Events.config.js.map +1 -1
  27. package/Events.js +752 -293
  28. package/Events.js.map +1 -1
  29. package/FillerGauge.config.js +96 -27
  30. package/FillerGauge.config.js.map +1 -1
  31. package/FillerGauge.js +759 -374
  32. package/FillerGauge.js.map +1 -1
  33. package/Image.config.js +62 -18
  34. package/Image.config.js.map +1 -1
  35. package/Image.js +419 -154
  36. package/Image.js.map +1 -1
  37. package/Line.config.js +106 -22
  38. package/Line.config.js.map +1 -1
  39. package/Line.js +631 -223
  40. package/Line.js.map +1 -1
  41. package/LinkGraph.config.js +72 -22
  42. package/LinkGraph.config.js.map +1 -1
  43. package/LinkGraph.js +632 -219
  44. package/LinkGraph.js.map +1 -1
  45. package/MIGRATION.md +1082 -0
  46. package/Map.config.js +241 -97
  47. package/Map.config.js.map +1 -1
  48. package/Map.js +1195 -595
  49. package/Map.js.map +1 -1
  50. package/Markdown.config.js +70 -20
  51. package/Markdown.config.js.map +1 -1
  52. package/Markdown.js +460 -195
  53. package/Markdown.js.map +1 -1
  54. package/MarkerGauge.config.js +79 -21
  55. package/MarkerGauge.config.js.map +1 -1
  56. package/MarkerGauge.js +802 -411
  57. package/MarkerGauge.js.map +1 -1
  58. package/ParallelCoordinates.config.js +72 -18
  59. package/ParallelCoordinates.config.js.map +1 -1
  60. package/ParallelCoordinates.js +853 -484
  61. package/ParallelCoordinates.js.map +1 -1
  62. package/Pie.config.js +75 -22
  63. package/Pie.config.js.map +1 -1
  64. package/Pie.js +612 -212
  65. package/Pie.js.map +1 -1
  66. package/Punchcard.config.js +81 -29
  67. package/Punchcard.config.js.map +1 -1
  68. package/Punchcard.js +844 -379
  69. package/Punchcard.js.map +1 -1
  70. package/Rectangle.config.js +85 -19
  71. package/Rectangle.config.js.map +1 -1
  72. package/Rectangle.js +432 -152
  73. package/Rectangle.js.map +1 -1
  74. package/Sankey.config.js +84 -22
  75. package/Sankey.config.js.map +1 -1
  76. package/Sankey.js +878 -342
  77. package/Sankey.js.map +1 -1
  78. package/Scatter.config.js +96 -22
  79. package/Scatter.config.js.map +1 -1
  80. package/Scatter.js +607 -212
  81. package/Scatter.js.map +1 -1
  82. package/SingleValue.config.js +94 -24
  83. package/SingleValue.config.js.map +1 -1
  84. package/SingleValue.js +1182 -650
  85. package/SingleValue.js.map +1 -1
  86. package/SingleValueBasic.js +286 -225
  87. package/SingleValueBasic.js.map +1 -1
  88. package/SingleValueIcon.config.js +92 -22
  89. package/SingleValueIcon.config.js.map +1 -1
  90. package/SingleValueIcon.js +965 -506
  91. package/SingleValueIcon.js.map +1 -1
  92. package/SingleValueRadial.config.js +99 -26
  93. package/SingleValueRadial.config.js.map +1 -1
  94. package/SingleValueRadial.js +1167 -616
  95. package/SingleValueRadial.js.map +1 -1
  96. package/SparkLine.js +126 -67
  97. package/SparkLine.js.map +1 -1
  98. package/Table.config.js +73 -20
  99. package/Table.config.js.map +1 -1
  100. package/Table.js +810 -322
  101. package/Table.js.map +1 -1
  102. package/common/Charting.js +107 -35
  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 +76 -22
  107. package/common/EventsDoc.js.map +1 -1
  108. package/common/GaugeMajorTicks.js +68 -58
  109. package/common/GaugeMajorTicks.js.map +1 -1
  110. package/common/GaugeValueMarker.js +43 -34
  111. package/common/GaugeValueMarker.js.map +1 -1
  112. package/common/OptionsDoc.js +156 -65
  113. package/common/OptionsDoc.js.map +1 -1
  114. package/common/OverviewDoc.js +33 -5
  115. package/common/OverviewDoc.js.map +1 -1
  116. package/common/SplunkVisualization.js +31 -4
  117. package/common/SplunkVisualization.js.map +1 -1
  118. package/common/SplunkVisualizationApi.js +8 -2
  119. package/common/SplunkVisualizationApi.js.map +1 -1
  120. package/common/ThemesDoc.js +27 -14
  121. package/common/ThemesDoc.js.map +1 -1
  122. package/common/chartingUtils.js +44 -12
  123. package/common/chartingUtils.js.map +1 -1
  124. package/common/docUtils.js +11 -1
  125. package/common/docUtils.js.map +1 -1
  126. package/common/gaugeUtils.js +173 -90
  127. package/common/gaugeUtils.js.map +1 -1
  128. package/common/shapeUtils.js +14 -2
  129. package/common/shapeUtils.js.map +1 -1
  130. package/common/utils/configUtils.js +49 -14
  131. package/common/utils/configUtils.js.map +1 -1
  132. package/common/utils/dataUtils.js +7 -2
  133. package/common/utils/dataUtils.js.map +1 -1
  134. package/common/utils/hocUtils.js +3 -1
  135. package/common/utils/hocUtils.js.map +1 -1
  136. package/common/utils/layoutUtils.js +1 -0
  137. package/common/utils/layoutUtils.js.map +1 -1
  138. package/common/utils/mapUtils.js +287 -127
  139. package/common/utils/mapUtils.js.map +1 -1
  140. package/common/utils/singleValueUtils.js +241 -196
  141. package/common/utils/singleValueUtils.js.map +1 -1
  142. package/common/utils/testHelper.js +9 -0
  143. package/common/utils/testHelper.js.map +1 -1
  144. package/common/utils/trellisUtils.js +61 -0
  145. package/common/utils/trellisUtils.js.map +1 -1
  146. package/common/utils/urlUtils.js +2 -0
  147. package/common/utils/urlUtils.js.map +1 -1
  148. package/common/withDashboardViz.js +274 -95
  149. package/common/withDashboardViz.js.map +1 -1
  150. package/package.json +16 -18
package/Pie.js CHANGED
@@ -136,11 +136,17 @@ module.exports = require("@splunk/visualizations-shared/colorUtils");
136
136
  Object.defineProperty(exports, "__esModule", {
137
137
  value: true
138
138
  });
139
+
139
140
  var React = __webpack_require__(1);
141
+
140
142
  var styled_components_1 = __webpack_require__(4);
143
+
141
144
  var SizeAwareWrapper_1 = __webpack_require__(19);
145
+
142
146
  var style_1 = __webpack_require__(14);
147
+
143
148
  var colorUtils_1 = __webpack_require__(12);
149
+
144
150
  var Item = styled_components_1.default.div.attrs(function (_ref) {
145
151
  var width = _ref.width;
146
152
  return {
@@ -153,11 +159,11 @@ var Item = styled_components_1.default.div.attrs(function (_ref) {
153
159
  componentId: "sc-1yhgpod-0"
154
160
  })(["position:relative;background-color:", "};"], function (props) {
155
161
  return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
156
- });
157
- // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
162
+ }); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
163
+
158
164
  var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
159
165
  var width = _ref2.width,
160
- height = _ref2.height;
166
+ height = _ref2.height;
161
167
  return {
162
168
  style: Object.assign(Object.assign({}, width && {
163
169
  width: (0, style_1.toPx)(width)
@@ -179,11 +185,13 @@ var FixSizeItemContent = styled_components_1.default.div.withConfig({
179
185
  displayName: "FixedSizeContainer__FixSizeItemContent",
180
186
  componentId: "sc-1yhgpod-3"
181
187
  })(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
188
+
182
189
  var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
183
190
  var FixedSizeContainer = function FixedSizeContainer(props) {
184
191
  var width = props.width,
185
- height = props.height,
186
- backgroundColor = props.backgroundColor;
192
+ height = props.height,
193
+ backgroundColor = props.backgroundColor;
194
+
187
195
  if (!height) {
188
196
  return React.createElement(Item, {
189
197
  "data-test": "item",
@@ -191,24 +199,27 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
191
199
  backgroundColor: backgroundColor
192
200
  }, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
193
201
  }
202
+
194
203
  return React.createElement(FixSizeItem, {
195
204
  "data-test": "fix-size-item",
196
- "data-splunk-visualization-version": "26.0.0 - 2f7458907",
205
+ "data-splunk-visualization-version": "26.1.0 - fc8bf8d77",
197
206
  width: width,
198
207
  height: height,
199
208
  backgroundColor: backgroundColor
200
209
  }, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
201
210
  var newWidth = _ref3.width,
202
- newHeight = _ref3.height;
211
+ newHeight = _ref3.height;
203
212
  return React.createElement(Viz, Object.assign({}, props, {
204
213
  width: newWidth,
205
214
  height: newHeight
206
215
  }));
207
216
  })));
208
217
  };
218
+
209
219
  FixedSizeContainer.displayName = 'withFixedSizeContainer';
210
220
  return FixedSizeContainer;
211
221
  };
222
+
212
223
  exports.default = withFixedSizeContainer;
213
224
 
214
225
  /***/ }),
@@ -243,9 +254,10 @@ exports.extendStaticWrapperProps = void 0;
243
254
  * @param {DashboardVizType} props.Wrapper
244
255
  * @param {DashboardVizType} props.Visualization
245
256
  */
257
+
246
258
  var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
247
259
  var Wrapper = _ref.Wrapper,
248
- Visualization = _ref.Visualization;
260
+ Visualization = _ref.Visualization;
249
261
  var extendProperties = ['propTypes', 'defaultProps', 'config'];
250
262
  extendProperties.forEach(function (prop) {
251
263
  if (Visualization[prop]) {
@@ -254,6 +266,7 @@ var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
254
266
  }
255
267
  });
256
268
  };
269
+
257
270
  exports.extendStaticWrapperProps = extendStaticWrapperProps;
258
271
 
259
272
  /***/ }),
@@ -273,46 +286,63 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
273
286
 
274
287
  var __rest = this && this.__rest || function (s, e) {
275
288
  var t = {};
289
+
276
290
  for (var p in s) {
277
291
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
278
292
  }
293
+
279
294
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
280
295
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
281
296
  }
282
297
  return t;
283
298
  };
299
+
284
300
  Object.defineProperty(exports, "__esModule", {
285
301
  value: true
286
302
  });
287
303
  exports.config = exports.themes = exports.showPlaceHolderIcon = exports.computeVizProps = exports.PieInnerSize = void 0;
288
- var lodash_1 = __webpack_require__(3);
289
- // Charting imports i18n which needs to be run to instantiate window globals in the
304
+
305
+ var lodash_1 = __webpack_require__(3); // Charting imports i18n which needs to be run to instantiate window globals in the
290
306
  // eslint-disable-next-line import/order
307
+
308
+
291
309
  var Charting_1 = __webpack_require__(65);
310
+
292
311
  var charting_bundle_1 = __webpack_require__(55);
312
+
293
313
  var simpleXMLOptions_1 = __webpack_require__(70);
314
+
294
315
  var config_1 = __webpack_require__(441);
316
+
295
317
  exports.config = config_1.default;
296
- var withDashboardViz_1 = __webpack_require__(36);
318
+
319
+ var withDashboardViz_1 = __webpack_require__(37);
320
+
297
321
  var pieUtils_1 = __webpack_require__(443);
322
+
298
323
  var chartingUtils_1 = __webpack_require__(56);
324
+
299
325
  var IconPlaceholder_1 = __webpack_require__(32);
326
+
300
327
  var validOptions = Object.keys(config_1.default.optionsSchema);
301
328
  exports.PieInnerSize = 0.7;
329
+
302
330
  var computeVizProps = function computeVizProps(_a) {
303
331
  var dataSources = _a.dataSources,
304
- onEventTrigger = _a.onEventTrigger,
305
- label = _a.label,
306
- value = _a.value,
307
- showDonutHole = _a.showDonutHole,
308
- visualizationApiRef = _a.visualizationApiRef,
309
- otherOptions = __rest(_a, ["dataSources", "onEventTrigger", "label", "value", "showDonutHole", "visualizationApiRef"]); // options to be passed as props
332
+ onEventTrigger = _a.onEventTrigger,
333
+ label = _a.label,
334
+ value = _a.value,
335
+ showDonutHole = _a.showDonutHole,
336
+ visualizationApiRef = _a.visualizationApiRef,
337
+ otherOptions = __rest(_a, ["dataSources", "onEventTrigger", "label", "value", "showDonutHole", "visualizationApiRef"]); // options to be passed as props
338
+
339
+
310
340
  var computedProps = {
311
341
  visualizationApiRef: visualizationApiRef
312
342
  };
313
343
  var labelField = otherOptions.labelField,
314
- valueField = otherOptions.valueField,
315
- hasEventHandlers = otherOptions.hasEventHandlers;
344
+ valueField = otherOptions.valueField,
345
+ hasEventHandlers = otherOptions.hasEventHandlers;
316
346
  computedProps.options = (0, lodash_1.chain)(otherOptions).pick(validOptions).thru(pieUtils_1.convertToPieSCProperties).thru(function (options) {
317
347
  return Object.assign(Object.assign({}, (0, simpleXMLOptions_1.getSimpleXMLOptionsForProps)(options)), {
318
348
  chart: 'pie'
@@ -327,33 +357,42 @@ var computeVizProps = function computeVizProps(_a) {
327
357
  }, {
328
358
  name: valueField
329
359
  }];
360
+
330
361
  if (!value) {
331
362
  primaryData.columns = [label, []];
332
363
  }
364
+
333
365
  primaryData.columns.forEach(function (column, index) {
334
366
  if (column) {
335
367
  primaryData.columns[index] = column.map(String);
336
368
  }
337
369
  });
370
+
338
371
  if (truncationLimit) {
339
372
  primaryData = (0, chartingUtils_1.truncateData)(primaryData, truncationLimit);
340
373
  }
374
+
341
375
  computedProps.chartData = charting_bundle_1.default.extractChartReadyData(Object.assign({}, primaryData));
376
+
342
377
  if (showDonutHole) {
343
378
  computedProps.options['chart.pieInnerSize'] = exports.PieInnerSize;
344
379
  } else {
345
380
  computedProps.options['chart.pieInnerSize'] = 0;
346
381
  }
382
+
347
383
  if (hasEventHandlers) {
348
384
  computedProps.onClick = onEventTrigger;
349
385
  }
386
+
350
387
  return computedProps;
351
388
  };
352
- exports.computeVizProps = computeVizProps;
353
- // Returns true to display the placeholder icon, if invalid datasource condition or invalid data value/labels condition is met
389
+
390
+ exports.computeVizProps = computeVizProps; // Returns true to display the placeholder icon, if invalid datasource condition or invalid data value/labels condition is met
391
+
354
392
  var showPlaceHolderIcon = function showPlaceHolderIcon(dataSources, loading, options) {
355
393
  return (0, IconPlaceholder_1.shouldShowIconPlaceholder)(dataSources, loading) || (0, pieUtils_1.invalidOptionField)('value', dataSources, options, config_1.default) || (0, pieUtils_1.invalidOptionField)('label', dataSources, options, config_1.default) || (0, pieUtils_1.allInvalidDataValues)(dataSources, options, config_1.default);
356
394
  };
395
+
357
396
  exports.showPlaceHolderIcon = showPlaceHolderIcon;
358
397
  var Pie = (0, withDashboardViz_1.default)({
359
398
  ReactViz: Charting_1.default,
@@ -404,24 +443,33 @@ module.exports = require("@splunk/ui-utils/i18n");
404
443
 
405
444
 
406
445
  var _toConsumableArray = __webpack_require__(8);
446
+
407
447
  var _defineProperty = __webpack_require__(7);
448
+
408
449
  var __rest = this && this.__rest || function (s, e) {
409
450
  var t = {};
451
+
410
452
  for (var p in s) {
411
453
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
412
454
  }
455
+
413
456
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
414
457
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
415
458
  }
416
459
  return t;
417
460
  };
461
+
418
462
  Object.defineProperty(exports, "__esModule", {
419
463
  value: true
420
464
  });
421
465
  exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
466
+
422
467
  var lodash_1 = __webpack_require__(3);
468
+
423
469
  var schemaUtils_1 = __webpack_require__(16);
470
+
424
471
  var VizBehavior_1 = __webpack_require__(6);
472
+
425
473
  var dynamicOptionsDSLType = {
426
474
  type: 'string',
427
475
  pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
@@ -431,20 +479,22 @@ var dynamicOptionsDSLType = {
431
479
  * @param optionsSchema a visualization's options schema
432
480
  * @returns an updated options schema that additionally allows strings starting with > for each option
433
481
  */
482
+
434
483
  function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
435
484
  var enhancedOptionsSchema = {};
436
485
  Object.keys(optionsSchema).forEach(function (key) {
437
486
  var _a = optionsSchema[key],
438
- title = _a.title,
439
- description = _a.description,
440
- readOnly = _a.readOnly,
441
- writeOnly = _a.writeOnly,
442
- examples = _a.examples,
443
- defaultValue = _a.default,
444
- type = _a.type,
445
- properties = _a.properties,
446
- patternProperties = _a.patternProperties,
447
- remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
487
+ title = _a.title,
488
+ description = _a.description,
489
+ readOnly = _a.readOnly,
490
+ writeOnly = _a.writeOnly,
491
+ examples = _a.examples,
492
+ defaultValue = _a.default,
493
+ type = _a.type,
494
+ properties = _a.properties,
495
+ patternProperties = _a.patternProperties,
496
+ remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
497
+
448
498
  var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
449
499
  title: title
450
500
  }), description !== undefined && {
@@ -458,12 +508,14 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
458
508
  }), defaultValue !== undefined && {
459
509
  default: defaultValue
460
510
  });
511
+
461
512
  if (type === 'object') {
462
513
  enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
463
514
  type: type
464
515
  }), properties && {
465
516
  properties: enhanceOptionsSchemaWithDynamicOptions(properties)
466
517
  });
518
+
467
519
  if (patternProperties) {
468
520
  var enhancedPatternProperties = {};
469
521
  Object.keys(patternProperties).forEach(function (opt) {
@@ -481,6 +533,7 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
481
533
  });
482
534
  return enhancedOptionsSchema;
483
535
  }
536
+
484
537
  exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
485
538
  /**
486
539
  * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
@@ -489,11 +542,14 @@ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamic
489
542
  * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
490
543
  * and containing `open: false` for all editor panels in editorConfig
491
544
  */
545
+
492
546
  function enhanceConfig(vizConfig) {
493
547
  var enhancedConfig = Object.assign({}, vizConfig);
548
+
494
549
  if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
495
550
  enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
496
551
  }
552
+
497
553
  enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
498
554
  return Object.assign(Object.assign({}, config), {
499
555
  open: config.open || false
@@ -501,6 +557,7 @@ function enhanceConfig(vizConfig) {
501
557
  });
502
558
  return enhancedConfig;
503
559
  }
560
+
504
561
  exports.enhanceConfig = enhanceConfig;
505
562
  /**
506
563
  * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
@@ -508,6 +565,7 @@ exports.enhanceConfig = enhanceConfig;
508
565
  * @param vizConfig a Visualization Config
509
566
  * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
510
567
  */
568
+
511
569
  function uncollapseEditorConfig(vizConfig) {
512
570
  var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
513
571
  editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
@@ -517,13 +575,16 @@ function uncollapseEditorConfig(vizConfig) {
517
575
  });
518
576
  return editorPanelUncollapsedConfig;
519
577
  }
578
+
520
579
  exports.uncollapseEditorConfig = uncollapseEditorConfig;
580
+
521
581
  function isDynamicOption(option) {
522
582
  return option && typeof option === 'string' && option.trim().startsWith('>') || false;
523
583
  }
524
- exports.isDynamicOption = isDynamicOption;
525
- // private helpers to improve readability of getInitialPreset
584
+
585
+ exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
526
586
  // this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
587
+
527
588
  /**
528
589
  * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
529
590
  * 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
@@ -532,6 +593,7 @@ exports.isDynamicOption = isDynamicOption;
532
593
  *
533
594
  * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
534
595
  */
596
+
535
597
  function hasCompatibleContexts(vizContext, presetContext) {
536
598
  var presetContextKeys = Object.keys(presetContext);
537
599
  return presetContextKeys.every(function (contextKey) {
@@ -541,6 +603,8 @@ function hasCompatibleContexts(vizContext, presetContext) {
541
603
  /**
542
604
  * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
543
605
  */
606
+
607
+
544
608
  function hasCompatibleOptions(vizOptions, presetOptions) {
545
609
  var presetOptionKeys = Object.keys(presetOptions);
546
610
  return presetOptionKeys.every(function (optionKey) {
@@ -555,18 +619,21 @@ function hasCompatibleOptions(vizOptions, presetOptions) {
555
619
  * @param {Object} vizOptions - the current vizOptions definition
556
620
  * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
557
621
  */
622
+
623
+
558
624
  function getInitialPreset(vizContext, vizOptions, presets) {
559
625
  return presets.find(function (preset) {
560
626
  var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
561
627
  var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
562
628
  var presetContextKeys = Object.keys(presetContext);
563
- var presetOptionKeys = Object.keys(presetOptions);
564
- // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
629
+ var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
565
630
  // if not, then the preset is invalid in config.ts
631
+
566
632
  if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
567
633
  return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
568
634
  });
569
635
  }
636
+
570
637
  exports.getInitialPreset = getInitialPreset;
571
638
  /**
572
639
  * generates number precision values for a Select editor
@@ -574,6 +641,7 @@ exports.getInitialPreset = getInitialPreset;
574
641
  * @param {Number} numPrecisionValues - number of integer precision values to generate
575
642
  * @returns {{ label: string; value; string }[]} array of { label, value } tuples
576
643
  */
644
+
577
645
  function generatePrecisionValues(numPrecisionValues) {
578
646
  return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
579
647
  return {
@@ -582,6 +650,7 @@ function generatePrecisionValues(numPrecisionValues) {
582
650
  };
583
651
  });
584
652
  }
653
+
585
654
  exports.generatePrecisionValues = generatePrecisionValues;
586
655
  /**
587
656
  * insert layout in layout array, return a new layout array instead of updating the original
@@ -591,12 +660,15 @@ exports.generatePrecisionValues = generatePrecisionValues;
591
660
  * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
592
661
  * @returns {EditorLayoutConfig[][]} new editor layout with insertion
593
662
  */
663
+
594
664
  var insertLayout = function insertLayout(layout, index) {
595
665
  for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
596
666
  layoutItems[_key - 2] = arguments[_key];
597
667
  }
668
+
598
669
  return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
599
670
  };
671
+
600
672
  exports.insertLayout = insertLayout;
601
673
 
602
674
  /***/ }),
@@ -674,11 +746,17 @@ Object.defineProperty(exports, "__esModule", {
674
746
  value: true
675
747
  });
676
748
  exports.shouldShowIconPlaceholder = void 0;
749
+
677
750
  var React = __webpack_require__(1);
751
+
678
752
  var T = __webpack_require__(0);
753
+
679
754
  var lodash_1 = __webpack_require__(3);
755
+
680
756
  var i18n_1 = __webpack_require__(2);
757
+
681
758
  var Message_1 = __webpack_require__(10);
759
+
682
760
  var FixedSizeContainer_1 = __webpack_require__(13);
683
761
  /**
684
762
  * @method shouldShowIconPlaceholder
@@ -686,6 +764,8 @@ var FixedSizeContainer_1 = __webpack_require__(13);
686
764
  * @param {boolean} loading
687
765
  * @returns {boolean}
688
766
  */
767
+
768
+
689
769
  var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
690
770
  var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
691
771
  var data = (0, lodash_1.get)(dataSources, 'primary.data.columns[0]', undefined);
@@ -694,6 +774,7 @@ var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources)
694
774
  var noFields = fields === undefined;
695
775
  return loading || noData || noFields;
696
776
  };
777
+
697
778
  exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
698
779
  var propTypes = {
699
780
  icon: T.func,
@@ -708,11 +789,13 @@ var propTypes = {
708
789
  * @param {IconPlaceholderProps} props
709
790
  * @returns {React.ReactElement}
710
791
  */
792
+
711
793
  var IconPlaceholder = function IconPlaceholder(props) {
712
794
  var width = props.width,
713
- height = props.height,
714
- icon = props.icon,
715
- iconColor = props.iconColor;
795
+ height = props.height,
796
+ icon = props.icon,
797
+ iconColor = props.iconColor;
798
+
716
799
  if (icon) {
717
800
  return React.createElement(icon, {
718
801
  style: {
@@ -727,6 +810,7 @@ var IconPlaceholder = function IconPlaceholder(props) {
727
810
  height: '50%'
728
811
  });
729
812
  }
813
+
730
814
  return React.createElement(Message_1.default, {
731
815
  width: width,
732
816
  height: height,
@@ -734,6 +818,7 @@ var IconPlaceholder = function IconPlaceholder(props) {
734
818
  message: (0, i18n_1._)('No DataSource Connected')
735
819
  });
736
820
  };
821
+
737
822
  IconPlaceholder.propTypes = propTypes;
738
823
  IconPlaceholder.defaultProps = {
739
824
  width: '100%',
@@ -750,21 +835,27 @@ exports.default = (0, FixedSizeContainer_1.default)(IconPlaceholder);
750
835
 
751
836
 
752
837
  var _defineProperty = __webpack_require__(7);
838
+
753
839
  Object.defineProperty(exports, "__esModule", {
754
840
  value: true
755
841
  });
756
842
  exports.getSortingParams = exports.SortParamsPropTypes = void 0;
843
+
757
844
  var T = __webpack_require__(0);
845
+
758
846
  var lodash_1 = __webpack_require__(3);
759
- var DataSource_1 = __webpack_require__(43);
847
+
848
+ var DataSource_1 = __webpack_require__(34);
849
+
760
850
  exports.SortParamsPropTypes = T.shape({
761
851
  currentSortKey: T.string,
762
852
  currentSortDir: T.oneOf(DataSource_1.validSortDirs),
763
853
  onSort: T.func
764
854
  });
855
+
765
856
  var getSortingParams = function getSortingParams(_ref) {
766
857
  var requestParams = _ref.requestParams,
767
- onRequestParamsChange = _ref.onRequestParamsChange;
858
+ onRequestParamsChange = _ref.onRequestParamsChange;
768
859
  var currentSortKey;
769
860
  var currentSortDir;
770
861
  var nextSortDirMap = {
@@ -773,15 +864,18 @@ var getSortingParams = function getSortingParams(_ref) {
773
864
  none: 'asc'
774
865
  };
775
866
  var onSort;
867
+
776
868
  if (typeof onRequestParamsChange === 'function') {
777
869
  if (requestParams && (0, lodash_1.has)(requestParams, 'sort')) {
778
870
  currentSortKey = Object.keys(requestParams.sort).shift();
779
871
  currentSortDir = requestParams.sort[currentSortKey];
780
- }
781
- // undid memoization since there is a dependency on requestParams, which is a deeply nested object
872
+ } // undid memoization since there is a dependency on requestParams, which is a deeply nested object
873
+
874
+
782
875
  onSort = function onSort(e, _ref2) {
783
876
  var sortKey = _ref2.sortKey,
784
- sortDir = _ref2.sortDir;
877
+ sortDir = _ref2.sortDir;
878
+
785
879
  if (typeof sortKey === 'string') {
786
880
  var nextSortDir = (0, lodash_1.has)(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
787
881
  onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
@@ -793,12 +887,14 @@ var getSortingParams = function getSortingParams(_ref) {
793
887
  }
794
888
  };
795
889
  }
890
+
796
891
  return {
797
892
  currentSortKey: currentSortKey,
798
893
  currentSortDir: currentSortDir,
799
894
  onSort: onSort
800
895
  };
801
896
  };
897
+
802
898
  exports.getSortingParams = getSortingParams;
803
899
 
804
900
  /***/ }),
@@ -809,43 +905,69 @@ exports.getSortingParams = getSortingParams;
809
905
  "use strict";
810
906
 
811
907
 
908
+ Object.defineProperty(exports, "__esModule", {
909
+ value: true
910
+ });
911
+ exports.validOutputModes = exports.validSegmentationModes = exports.validSortDirs = void 0;
912
+ exports.validSortDirs = ['asc', 'desc', 'none'];
913
+ exports.validSegmentationModes = ['none', 'inner'];
914
+ exports.validOutputModes = ['json_cols', 'json'];
915
+
916
+ /***/ }),
917
+
918
+ /***/ 35:
919
+ /***/ (function(module, exports, __webpack_require__) {
920
+
921
+ "use strict";
922
+
923
+
812
924
  Object.defineProperty(exports, "__esModule", {
813
925
  value: true
814
926
  });
815
927
  exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
928
+
816
929
  var T = __webpack_require__(0);
930
+
817
931
  var lodash_1 = __webpack_require__(3);
932
+
818
933
  exports.PaginatorParamsPropTypes = T.shape({
819
934
  isPaging: T.bool,
820
935
  current: T.number,
821
936
  totalPages: T.number,
822
937
  onChange: T.func
823
938
  });
939
+
824
940
  var getPaginationParams = function getPaginationParams(_ref) {
825
941
  var requestParams = _ref.requestParams,
826
- meta = _ref.meta,
827
- onRequestParamsChange = _ref.onRequestParamsChange;
942
+ meta = _ref.meta,
943
+ onRequestParamsChange = _ref.onRequestParamsChange;
828
944
  var totalCount = meta && meta.totalCount || 0;
829
945
  var offset = requestParams && requestParams.offset || 0;
830
946
  var count = requestParams && requestParams.count;
831
947
  var totalPages = typeof count === 'number' && count > 0 ? Math.ceil(totalCount / count) : 0;
832
948
  var current = typeof count === 'number' && count > 0 ? Math.floor(offset / count) + 1 : 0;
833
949
  var isPaging = totalPages > 1 && typeof onRequestParamsChange === 'function';
950
+
834
951
  var onChangeHandler = function onChangeHandler(e, _ref2) {
835
952
  var page = _ref2.page,
836
- countArg = _ref2.count;
953
+ countArg = _ref2.count;
837
954
  var newParams = (0, lodash_1.cloneDeep)(requestParams);
955
+
838
956
  if (typeof countArg === 'number') {
839
957
  newParams.count = countArg;
840
958
  newParams.offset = 0;
841
959
  }
960
+
842
961
  var pageCount = typeof newParams.count === 'number' ? newParams.count : 10;
962
+
843
963
  if (typeof page === 'number' && page > 0) {
844
964
  newParams.count = pageCount;
845
965
  newParams.offset = (page - 1) * pageCount;
846
966
  }
967
+
847
968
  onRequestParamsChange(newParams);
848
969
  };
970
+
849
971
  return {
850
972
  isPaging: isPaging,
851
973
  current: current,
@@ -853,11 +975,12 @@ var getPaginationParams = function getPaginationParams(_ref) {
853
975
  onChange: typeof onRequestParamsChange === 'function' ? onChangeHandler : lodash_1.noop
854
976
  };
855
977
  };
978
+
856
979
  exports.getPaginationParams = getPaginationParams;
857
980
 
858
981
  /***/ }),
859
982
 
860
- /***/ 35:
983
+ /***/ 36:
861
984
  /***/ (function(module, exports, __webpack_require__) {
862
985
 
863
986
  "use strict";
@@ -868,6 +991,7 @@ Object.defineProperty(exports, "__esModule", {
868
991
  });
869
992
  exports.VizCategory = void 0;
870
993
  var VizCategory;
994
+
871
995
  (function (VizCategory) {
872
996
  VizCategory["SINGLE_VALUE"] = "Single Value";
873
997
  VizCategory["TRENDS"] = "Trends";
@@ -885,67 +1009,96 @@ var VizCategory;
885
1009
 
886
1010
  /***/ }),
887
1011
 
888
- /***/ 36:
1012
+ /***/ 37:
889
1013
  /***/ (function(module, exports, __webpack_require__) {
890
1014
 
891
1015
  "use strict";
892
1016
 
893
1017
 
894
1018
  var _slicedToArray = __webpack_require__(17);
1019
+
895
1020
  Object.defineProperty(exports, "__esModule", {
896
1021
  value: true
897
1022
  });
1023
+
898
1024
  var React = __webpack_require__(1);
1025
+
899
1026
  var lodash_1 = __webpack_require__(3);
900
- var getSettingsFromThemedProps_1 = __webpack_require__(37);
1027
+
1028
+ var getSettingsFromThemedProps_1 = __webpack_require__(38);
1029
+
901
1030
  var Options_1 = __webpack_require__(30);
902
- var SanitizeProps_1 = __webpack_require__(38);
1031
+
1032
+ var SanitizeProps_1 = __webpack_require__(39);
1033
+
903
1034
  var TimezoneContext_1 = __webpack_require__(26);
904
- var moment_1 = __webpack_require__(39);
1035
+
1036
+ var moment_1 = __webpack_require__(40);
1037
+
905
1038
  var FeatureFlagContext_1 = __webpack_require__(21);
1039
+
906
1040
  var styled_components_1 = __webpack_require__(4);
1041
+
907
1042
  var hocUtils_1 = __webpack_require__(27);
1043
+
908
1044
  var JSONSchemaUtils_1 = __webpack_require__(28);
909
- var async_dynamic_options_evaluator_1 = __webpack_require__(40);
1045
+
1046
+ var async_dynamic_options_evaluator_1 = __webpack_require__(41);
1047
+
910
1048
  var id_1 = __webpack_require__(25);
911
- var SplunkVisualization_1 = __webpack_require__(41);
1049
+
1050
+ var SplunkVisualization_1 = __webpack_require__(42);
1051
+
912
1052
  var VizBehavior_1 = __webpack_require__(6);
1053
+
913
1054
  var getSorting_1 = __webpack_require__(33);
914
- var getPagination_1 = __webpack_require__(34);
1055
+
1056
+ var getPagination_1 = __webpack_require__(35);
1057
+
915
1058
  var useDeepMemo_1 = __webpack_require__(44);
1059
+
916
1060
  var MissingPropsMessage_1 = __webpack_require__(45);
1061
+
917
1062
  var withEditModeCover_1 = __webpack_require__(46);
1063
+
918
1064
  var withPlaceholder_1 = __webpack_require__(47);
919
1065
  /**
920
1066
  * hoc that wraps a pure react visualization in a Dashboard visualization
921
1067
  * @param {DashboardVizOpts} opts
922
1068
  * @returns {HOC}
923
1069
  */
1070
+
1071
+
924
1072
  var withDashboardViz = function withDashboardViz(opts) {
925
1073
  var ReactViz = opts.ReactViz,
926
- vizConfig = opts.vizConfig,
927
- _opts$computeVizProps = opts.computeVizProps,
928
- computeVizProps = _opts$computeVizProps === void 0 ? function () {} : _opts$computeVizProps,
929
- disableEditModeCover = opts.disableEditModeCover,
930
- useIconPlaceholder = opts.useIconPlaceholder; // sanitizing props before sending them to reactviz.
1074
+ vizConfig = opts.vizConfig,
1075
+ _opts$computeVizProps = opts.computeVizProps,
1076
+ computeVizProps = _opts$computeVizProps === void 0 ? function () {} : _opts$computeVizProps,
1077
+ disableEditModeCover = opts.disableEditModeCover,
1078
+ useIconPlaceholder = opts.useIconPlaceholder; // sanitizing props before sending them to reactviz.
1079
+
931
1080
  var SanitizedReactViz = (0, SanitizeProps_1.withSanitizedProps)(ReactViz);
932
1081
  var defaultOptions = (0, JSONSchemaUtils_1.pickFieldFromJSONSchema)(vizConfig.optionsSchema, 'default');
1082
+
933
1083
  var DashboardViz = function DashboardViz(props) {
934
1084
  var _a;
1085
+
935
1086
  var mode = props.mode,
936
- hasEventHandlers = props.hasEventHandlers,
937
- dataSources = props.dataSources,
938
- options = props.options,
939
- _props$context = props.context,
940
- context = _props$context === void 0 ? {} : _props$context,
941
- width = props.width,
942
- height = props.height,
943
- onComputedProps = props.onComputedProps,
944
- onEventTrigger = props.onEventTrigger,
945
- theme = props.theme,
946
- onRequestParamsChange = props.onRequestParamsChange;
1087
+ hasEventHandlers = props.hasEventHandlers,
1088
+ dataSources = props.dataSources,
1089
+ options = props.options,
1090
+ _props$context = props.context,
1091
+ context = _props$context === void 0 ? {} : _props$context,
1092
+ width = props.width,
1093
+ height = props.height,
1094
+ onComputedProps = props.onComputedProps,
1095
+ onEventTrigger = props.onEventTrigger,
1096
+ theme = props.theme,
1097
+ onRequestParamsChange = props.onRequestParamsChange;
1098
+
947
1099
  var _React$useContext = React.useContext(TimezoneContext_1.default),
948
- serializedTimezone = _React$useContext.serializedTimezone;
1100
+ serializedTimezone = _React$useContext.serializedTimezone;
1101
+
949
1102
  if (serializedTimezone) {
950
1103
  /*
951
1104
  @splunk/moment currently does not allow us to customize the timezone on a per visualization basis.
@@ -959,38 +1112,51 @@ var withDashboardViz = function withDashboardViz(opts) {
959
1112
  moment_1.default.setDefaultSplunkTimezone(serializedTimezone);
960
1113
  }
961
1114
  }
1115
+
962
1116
  var themeFunc = function themeFunc(themeVar) {
963
1117
  var _a, _b;
1118
+
964
1119
  return (_b = (_a = vizConfig.themes)[themeVar]) === null || _b === void 0 ? void 0 : _b.call(_a, props);
965
1120
  };
1121
+
966
1122
  var bgColorFromTheme = themeFunc('defaultBackgroundColor');
1123
+
967
1124
  var _ref = (0, getSettingsFromThemedProps_1.default)({
968
- theme: theme
969
- }),
970
- currentThemeFamily = _ref.family,
971
- currentThemeColorScheme = _ref.colorScheme,
972
- currentThemeDensity = _ref.density;
1125
+ theme: theme
1126
+ }),
1127
+ currentThemeFamily = _ref.family,
1128
+ currentThemeColorScheme = _ref.colorScheme,
1129
+ currentThemeDensity = _ref.density;
1130
+
973
1131
  var evaluatedOptions = {}; // evaluatedOptions need to be initialized as an empty object
1132
+
974
1133
  var _React$useState = React.useState({}),
975
- _React$useState2 = _slicedToArray(_React$useState, 2),
976
- evaluatedOptionsAsync = _React$useState2[0],
977
- setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
1134
+ _React$useState2 = _slicedToArray(_React$useState, 2),
1135
+ evaluatedOptionsAsync = _React$useState2[0],
1136
+ setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
1137
+
1138
+
978
1139
  var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
1140
+
979
1141
  var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat((0, id_1.createGUID)())),
980
- _React$useState4 = _slicedToArray(_React$useState3, 1),
981
- visualizationID = _React$useState4[0];
1142
+ _React$useState4 = _slicedToArray(_React$useState3, 1),
1143
+ visualizationID = _React$useState4[0];
1144
+
982
1145
  var _React$useState5 = React.useState({}),
983
- _React$useState6 = _slicedToArray(_React$useState5, 2),
984
- dataSourcesInState = _React$useState6[0],
985
- setDataSourcesInState = _React$useState6[1];
1146
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
1147
+ dataSourcesInState = _React$useState6[0],
1148
+ setDataSourcesInState = _React$useState6[1];
1149
+
986
1150
  var _React$useState7 = React.useState(),
987
- _React$useState8 = _slicedToArray(_React$useState7, 2),
988
- dataFramesInState = _React$useState8[0],
989
- setDataFramesInState = _React$useState8[1];
1151
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
1152
+ dataFramesInState = _React$useState8[0],
1153
+ setDataFramesInState = _React$useState8[1];
1154
+
990
1155
  var _React$useState9 = React.useState(Boolean(featureFlagContext === null || featureFlagContext === void 0 ? void 0 : featureFlagContext.visualizations_useWebWorkersForDSL)),
991
- _React$useState10 = _slicedToArray(_React$useState9, 2),
992
- useAsyncEvaluatedOptions = _React$useState10[0],
993
- setUseAsyncEvaluatedOptions = _React$useState10[1];
1156
+ _React$useState10 = _slicedToArray(_React$useState9, 2),
1157
+ useAsyncEvaluatedOptions = _React$useState10[0],
1158
+ setUseAsyncEvaluatedOptions = _React$useState10[1];
1159
+
994
1160
  var isMounted = React.useRef(true);
995
1161
  evaluatedOptions = (0, useDeepMemo_1.useDeepMemo)(function () {
996
1162
  try {
@@ -1015,11 +1181,13 @@ var withDashboardViz = function withDashboardViz(opts) {
1015
1181
  });
1016
1182
  } else {
1017
1183
  var dataFrames = dataFramesInState;
1184
+
1018
1185
  if (dataSources !== dataSourcesInState) {
1019
1186
  setDataSourcesInState(dataSources);
1020
1187
  dataFrames = Options_1.Options.dataFrameFromDataSource(dataSources);
1021
1188
  setDataFramesInState(dataFrames);
1022
1189
  }
1190
+
1023
1191
  return Options_1.Options.evaluate({
1024
1192
  context: (0, lodash_1.defaultsDeep)({}, context, vizConfig.defaultContext),
1025
1193
  options: (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, defaultOptions)
@@ -1030,21 +1198,24 @@ var withDashboardViz = function withDashboardViz(opts) {
1030
1198
  console.error("unexpected error evaluating options: ".concat(e.message));
1031
1199
  return {};
1032
1200
  }
1201
+
1033
1202
  return {};
1034
1203
  }, [currentThemeFamily, currentThemeColorScheme, currentThemeDensity, options, context, dataSources, serializedTimezone, useAsyncEvaluatedOptions]);
1035
- var evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync;
1036
- // trellis specific backgroundColor update for onComputedProps
1204
+ var evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync; // trellis specific backgroundColor update for onComputedProps
1037
1205
  // 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
1038
1206
  // onComputedProps api should return back trellisBackgroundColor value for backgroundColor option to support coloring of sibling panels (for eg:- title/ description on UDF side)
1207
+
1039
1208
  var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
1040
1209
  var clonedEvaluatedOptions = evaluatedOptionsToUse;
1210
+
1041
1211
  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) {
1042
1212
  clonedEvaluatedOptions = Object.assign(Object.assign({}, evaluatedOptionsToUse), {
1043
1213
  backgroundColor: clonedEvaluatedOptions === null || clonedEvaluatedOptions === void 0 ? void 0 : clonedEvaluatedOptions.trellisBackgroundColor
1044
1214
  });
1045
- }
1046
- // useEffect hook needs to be initialized before any early returns
1215
+ } // useEffect hook needs to be initialized before any early returns
1047
1216
  // this is in accordance with the order of hook calls being the same on each render https://reactjs.org/docs/hooks-rules.html#explanation
1217
+
1218
+
1048
1219
  React.useEffect(function () {
1049
1220
  onComputedProps(clonedEvaluatedOptions);
1050
1221
  });
@@ -1054,44 +1225,49 @@ var withDashboardViz = function withDashboardViz(opts) {
1054
1225
  isMounted.current = false;
1055
1226
  async_dynamic_options_evaluator_1.default.reset(visualizationID);
1056
1227
  }
1057
- };
1058
- // eslint-disable-next-line react-hooks/exhaustive-deps
1059
- }, []);
1060
- // present warning message if any required props are missing
1228
+ }; // eslint-disable-next-line react-hooks/exhaustive-deps
1229
+ }, []); // present warning message if any required props are missing
1230
+
1061
1231
  var _vizConfig$requiredPr = vizConfig.requiredProps,
1062
- requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
1063
- supports = vizConfig.supports;
1232
+ requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
1233
+ supports = vizConfig.supports;
1064
1234
  var missing = (0, MissingPropsMessage_1.missingKeys)(requiredProps, evaluatedOptionsToUse);
1235
+
1065
1236
  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
1066
1237
  ) {
1067
- return React.createElement(MissingPropsMessage_1.default, {
1068
- "data-test": "missing-props-message",
1069
- width: width,
1070
- height: height,
1071
- missingProps: missing,
1072
- backgroundColor: bgColorFromTheme
1073
- });
1074
- }
1075
- // events
1238
+ return React.createElement(MissingPropsMessage_1.default, {
1239
+ "data-test": "missing-props-message",
1240
+ width: width,
1241
+ height: height,
1242
+ missingProps: missing,
1243
+ backgroundColor: bgColorFromTheme
1244
+ });
1245
+ } // events
1246
+
1247
+
1076
1248
  var eventCallbackProps = {};
1249
+
1077
1250
  if (hasEventHandlers && mode === 'view' && vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.EVENTS) > -1) {
1078
1251
  var supportedEvents = vizConfig.events;
1079
1252
  Object.keys(supportedEvents).forEach(function (eventName) {
1080
1253
  var eventCallbackPropName = (0, lodash_1.camelCase)("on.".concat(eventName));
1081
- eventCallbackProps[eventCallbackPropName] = null;
1082
- // todo: refactor single value and single value icon to send payload from viz
1254
+ eventCallbackProps[eventCallbackPropName] = null; // todo: refactor single value and single value icon to send payload from viz
1083
1255
  // then remove these lines
1256
+
1084
1257
  var payloadKeys = supportedEvents[eventName].payloadKeys;
1085
1258
  var payload = {};
1259
+
1086
1260
  if (Array.isArray(payloadKeys) && payloadKeys.length) {
1087
1261
  payloadKeys.forEach(function (p) {
1088
1262
  payload[p] = evaluatedOptionsToUse[p];
1089
1263
  });
1090
1264
  }
1265
+
1091
1266
  eventCallbackProps[eventCallbackPropName] = function (ev) {
1092
1267
  if (ev && ev.payload) {
1093
1268
  payload = ev.payload;
1094
1269
  }
1270
+
1095
1271
  return onEventTrigger({
1096
1272
  originalEvent: ev,
1097
1273
  payload: payload,
@@ -1099,8 +1275,9 @@ var withDashboardViz = function withDashboardViz(opts) {
1099
1275
  });
1100
1276
  };
1101
1277
  });
1102
- }
1103
- // compute pure viz props which are not from options
1278
+ } // compute pure viz props which are not from options
1279
+
1280
+
1104
1281
  var computedVizProps = computeVizProps(Object.assign(Object.assign(Object.assign(Object.assign({}, props), evaluatedOptionsToUse), eventCallbackProps), {
1105
1282
  themeFunc: themeFunc
1106
1283
  }));
@@ -1118,15 +1295,19 @@ var withDashboardViz = function withDashboardViz(opts) {
1118
1295
  * In future, we could automatically detect which all datasources are being used
1119
1296
  * and bind those magically to pagination/sorting behavior.
1120
1297
  */
1298
+
1121
1299
  var dataSourceMetadata = {};
1122
1300
  var OptionKey = 'paginateDataSourceKey';
1123
1301
  var paginateDataSourceKey = (0, lodash_1.has)(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
1302
+
1124
1303
  if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && (0, lodash_1.has)(dataSources, paginateDataSourceKey)) {
1125
1304
  var requestParams = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'requestParams'], {});
1126
1305
  var meta = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'meta'], {});
1306
+
1127
1307
  var handleRequestParamsChange = function handleRequestParamsChange(payload) {
1128
1308
  return onRequestParamsChange(paginateDataSourceKey, payload);
1129
1309
  };
1310
+
1130
1311
  var sortParams = (0, getSorting_1.getSortingParams)({
1131
1312
  requestParams: requestParams,
1132
1313
  meta: meta,
@@ -1141,115 +1322,132 @@ var withDashboardViz = function withDashboardViz(opts) {
1141
1322
  sortParams: sortParams,
1142
1323
  paginatorParams: paginatorParams
1143
1324
  };
1144
- }
1145
- // if were using webworkers and this is the first render we dont want to show a viz with missing data so we return null
1325
+ } // if were using webworkers and this is the first render we dont want to show a viz with missing data so we return null
1326
+
1327
+
1146
1328
  if (useAsyncEvaluatedOptions && Object.keys(evaluatedOptionsToUse).length === 0) {
1147
1329
  return null;
1148
1330
  }
1331
+
1149
1332
  return React.createElement(SanitizedReactViz, Object.assign({
1150
1333
  mode: mode,
1151
1334
  width: width,
1152
1335
  height: height
1153
1336
  }, evaluatedOptionsToUse, computedVizProps, eventCallbackProps, dataSourceMetadata));
1154
1337
  };
1338
+
1155
1339
  DashboardViz.propTypes = Object.assign(Object.assign({}, SplunkVisualization_1.default.propTypes), ReactViz.propTypes);
1156
1340
  DashboardViz.defaultProps = Object.assign(Object.assign(Object.assign({}, SplunkVisualization_1.default.defaultProps), ReactViz.defaultProps), {
1157
1341
  // using withTheme requires component to receive theme prop. In case the consumer did not provide ThemeProvider, a default empty object will prevent warnings.
1158
1342
  theme: {}
1159
- });
1160
- // attach viz config
1161
- DashboardViz.config = vizConfig;
1162
- // @ts-ignore: TODO fix sc upgrade TS issues
1343
+ }); // attach viz config
1344
+
1345
+ DashboardViz.config = vizConfig; // @ts-ignore: TODO fix sc upgrade TS issues
1346
+
1163
1347
  return (0, styled_components_1.withTheme)((0, withPlaceholder_1.default)((0, withEditModeCover_1.default)(DashboardViz, disableEditModeCover), useIconPlaceholder));
1164
1348
  };
1349
+
1165
1350
  exports.default = withDashboardViz;
1166
1351
 
1167
1352
  /***/ }),
1168
1353
 
1169
- /***/ 37:
1354
+ /***/ 38:
1170
1355
  /***/ (function(module, exports) {
1171
1356
 
1172
1357
  module.exports = require("@splunk/themes/getSettingsFromThemedProps");
1173
1358
 
1174
1359
  /***/ }),
1175
1360
 
1176
- /***/ 38:
1361
+ /***/ 39:
1177
1362
  /***/ (function(module, exports) {
1178
1363
 
1179
1364
  module.exports = require("@splunk/visualizations-shared/SanitizeProps");
1180
1365
 
1181
1366
  /***/ }),
1182
1367
 
1183
- /***/ 39:
1368
+ /***/ 4:
1184
1369
  /***/ (function(module, exports) {
1185
1370
 
1186
- module.exports = require("@splunk/moment");
1371
+ module.exports = require("styled-components");
1187
1372
 
1188
1373
  /***/ }),
1189
1374
 
1190
- /***/ 4:
1375
+ /***/ 40:
1191
1376
  /***/ (function(module, exports) {
1192
1377
 
1193
- module.exports = require("styled-components");
1378
+ module.exports = require("@splunk/moment");
1194
1379
 
1195
1380
  /***/ }),
1196
1381
 
1197
- /***/ 40:
1382
+ /***/ 41:
1198
1383
  /***/ (function(module, exports) {
1199
1384
 
1200
1385
  module.exports = require("@splunk/async-dynamic-options-evaluator");
1201
1386
 
1202
1387
  /***/ }),
1203
1388
 
1204
- /***/ 41:
1389
+ /***/ 42:
1205
1390
  /***/ (function(module, exports, __webpack_require__) {
1206
1391
 
1207
1392
  "use strict";
1208
1393
 
1209
1394
 
1210
1395
  var _classCallCheck = __webpack_require__(9);
1396
+
1211
1397
  Object.defineProperty(exports, "__esModule", {
1212
1398
  value: true
1213
1399
  });
1214
1400
  exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
1215
1401
  /* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
1402
+
1216
1403
  var T = __webpack_require__(0);
1404
+
1217
1405
  var lodash_1 = __webpack_require__(3);
1218
- var VizActionHandler_1 = __webpack_require__(42);
1219
- // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
1406
+
1407
+ var VizActionHandler_1 = __webpack_require__(43); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
1408
+
1409
+
1220
1410
  exports.INITIAL_WIDTH = 250;
1221
1411
  exports.INITIAL_HEIGHT = 250;
1222
1412
  /**
1223
1413
  * A Splunk visualization
1224
1414
  */
1415
+
1225
1416
  var SplunkVisualization = function SplunkVisualization() {
1226
1417
  _classCallCheck(this, SplunkVisualization);
1227
1418
  };
1419
+
1228
1420
  SplunkVisualization.propTypes = {
1229
1421
  /**
1230
1422
  * display mode
1231
1423
  */
1232
1424
  mode: T.oneOf(['view', 'edit', 'export']).isRequired,
1425
+
1233
1426
  /**
1234
1427
  * width in pixel or string, defaults to 100%
1235
1428
  */
1236
1429
  width: T.oneOfType([T.string, T.number]).isRequired,
1430
+
1237
1431
  /**
1238
1432
  * height in pixel or string
1239
1433
  */
1240
1434
  height: T.oneOfType([T.string, T.number]).isRequired,
1435
+
1241
1436
  /**
1242
1437
  * visualization context used for dynamic option evaluation
1243
1438
  */
1244
1439
  context: T.object,
1440
+
1245
1441
  /**
1246
1442
  * visualization formatting options
1247
1443
  */
1248
1444
  options: T.object,
1445
+
1249
1446
  /**
1250
1447
  * A callback to update formatting options
1251
1448
  */
1252
1449
  onOptionsChange: T.func,
1450
+
1253
1451
  /**
1254
1452
  * datasource state which include data and request params, object key indicate the datasource type.
1255
1453
  */
@@ -1258,6 +1456,7 @@ SplunkVisualization.propTypes = {
1258
1456
  * current request params
1259
1457
  */
1260
1458
  requestParams: T.object,
1459
+
1261
1460
  /**
1262
1461
  * current dataset
1263
1462
  */
@@ -1265,6 +1464,7 @@ SplunkVisualization.propTypes = {
1265
1464
  fields: T.array,
1266
1465
  columns: T.array
1267
1466
  }),
1467
+
1268
1468
  /**
1269
1469
  * error
1270
1470
  */
@@ -1272,29 +1472,35 @@ SplunkVisualization.propTypes = {
1272
1472
  level: T.string,
1273
1473
  message: T.string
1274
1474
  }),
1475
+
1275
1476
  /**
1276
1477
  * meta data that came with the dataset
1277
1478
  */
1278
1479
  meta: T.object
1279
1480
  })),
1481
+
1280
1482
  /**
1281
1483
  * A callback to trigger event
1282
1484
  */
1283
1485
  onEventTrigger: T.func,
1486
+
1284
1487
  /**
1285
1488
  * Inform viz if there are handlers listening to events
1286
1489
  */
1287
1490
  hasEventHandlers: T.bool,
1491
+
1288
1492
  /**
1289
1493
  * A callback to communicate computed props to a consumer
1290
1494
  */
1291
1495
  onComputedProps: T.func,
1496
+
1292
1497
  /**
1293
1498
  * A callback to obtain visualization api
1294
1499
  */
1295
1500
  vizActionHandlerRef: T.func,
1296
1501
  loading: T.bool,
1297
1502
  theme: T.object,
1503
+
1298
1504
  /**
1299
1505
  * A callback to request new data with updated request params
1300
1506
  */
@@ -1303,6 +1509,7 @@ SplunkVisualization.propTypes = {
1303
1509
  /**
1304
1510
  *
1305
1511
  */
1512
+
1306
1513
  SplunkVisualization.defaultProps = {
1307
1514
  // BaseVisualization in dashboard-visualizations uses 100% for width but 250 for height
1308
1515
  width: '100%',
@@ -1331,26 +1538,29 @@ exports.default = SplunkVisualization;
1331
1538
 
1332
1539
  /***/ }),
1333
1540
 
1334
- /***/ 42:
1541
+ /***/ 43:
1335
1542
  /***/ (function(module, exports, __webpack_require__) {
1336
1543
 
1337
1544
  "use strict";
1338
1545
 
1339
1546
 
1340
1547
  var _classCallCheck = __webpack_require__(9);
1548
+
1341
1549
  var _createClass = __webpack_require__(18);
1550
+
1342
1551
  Object.defineProperty(exports, "__esModule", {
1343
1552
  value: true
1344
1553
  });
1345
1554
  exports.DefaultVizActionHandler = void 0;
1555
+
1346
1556
  var DefaultVizActionHandler = /*#__PURE__*/function () {
1347
1557
  function DefaultVizActionHandler() {
1348
1558
  _classCallCheck(this, DefaultVizActionHandler);
1349
1559
  }
1560
+
1350
1561
  _createClass(DefaultVizActionHandler, [{
1351
1562
  key: "focus",
1352
- value: function focus() {
1353
- // noop
1563
+ value: function focus() {// noop
1354
1564
  }
1355
1565
  }, {
1356
1566
  key: "snapshot",
@@ -1358,23 +1568,11 @@ var DefaultVizActionHandler = /*#__PURE__*/function () {
1358
1568
  return null; // noop
1359
1569
  }
1360
1570
  }]);
1571
+
1361
1572
  return DefaultVizActionHandler;
1362
1573
  }();
1363
- exports.DefaultVizActionHandler = DefaultVizActionHandler;
1364
-
1365
- /***/ }),
1366
-
1367
- /***/ 43:
1368
- /***/ (function(module, exports, __webpack_require__) {
1369
1574
 
1370
- "use strict";
1371
-
1372
-
1373
- Object.defineProperty(exports, "__esModule", {
1374
- value: true
1375
- });
1376
- exports.validSortDirs = void 0;
1377
- exports.validSortDirs = ['asc', 'desc', 'none'];
1575
+ exports.DefaultVizActionHandler = DefaultVizActionHandler;
1378
1576
 
1379
1577
  /***/ }),
1380
1578
 
@@ -1388,7 +1586,9 @@ Object.defineProperty(exports, "__esModule", {
1388
1586
  value: true
1389
1587
  });
1390
1588
  exports.useDeepMemo = void 0;
1589
+
1391
1590
  var react_1 = __webpack_require__(1);
1591
+
1392
1592
  var lodash_1 = __webpack_require__(3);
1393
1593
  /**
1394
1594
  * This hook evaluates and stores the result of a passed function and only
@@ -1403,16 +1603,21 @@ var lodash_1 = __webpack_require__(3);
1403
1603
  * @param fn the function to be executed and
1404
1604
  * @param dependencies an array of dependencies
1405
1605
  */
1606
+
1607
+
1406
1608
  var useDeepMemo = function useDeepMemo(fn, dependencies) {
1407
1609
  var ref = (0, react_1.useRef)();
1610
+
1408
1611
  if (!ref.current || !(0, lodash_1.isEqual)(dependencies, ref.current.dependencies)) {
1409
1612
  ref.current = {
1410
1613
  dependencies: dependencies,
1411
1614
  value: fn()
1412
1615
  };
1413
1616
  }
1617
+
1414
1618
  return ref.current.value;
1415
1619
  };
1620
+
1416
1621
  exports.useDeepMemo = useDeepMemo;
1417
1622
 
1418
1623
  /***/ }),
@@ -1426,6 +1631,7 @@ exports.useDeepMemo = useDeepMemo;
1426
1631
  var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
1427
1632
  if (k2 === undefined) k2 = k;
1428
1633
  var desc = Object.getOwnPropertyDescriptor(m, k);
1634
+
1429
1635
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1430
1636
  desc = {
1431
1637
  enumerable: true,
@@ -1434,22 +1640,28 @@ var __createBinding = this && this.__createBinding || (Object.create ? function
1434
1640
  }
1435
1641
  };
1436
1642
  }
1643
+
1437
1644
  Object.defineProperty(o, k2, desc);
1438
1645
  } : function (o, m, k, k2) {
1439
1646
  if (k2 === undefined) k2 = k;
1440
1647
  o[k2] = m[k];
1441
1648
  });
1649
+
1442
1650
  var __exportStar = this && this.__exportStar || function (m, exports) {
1443
1651
  for (var p in m) {
1444
1652
  if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1445
1653
  }
1446
1654
  };
1655
+
1447
1656
  Object.defineProperty(exports, "__esModule", {
1448
1657
  value: true
1449
1658
  });
1450
1659
  exports.default = void 0;
1660
+
1451
1661
  __exportStar(__webpack_require__(164), exports);
1662
+
1452
1663
  var Pie_1 = __webpack_require__(164);
1664
+
1453
1665
  Object.defineProperty(exports, "default", {
1454
1666
  enumerable: true,
1455
1667
  get: function get() {
@@ -1468,24 +1680,35 @@ Object.defineProperty(exports, "default", {
1468
1680
  Object.defineProperty(exports, "__esModule", {
1469
1681
  value: true
1470
1682
  });
1683
+
1471
1684
  var ChartPie_1 = __webpack_require__(442);
1685
+
1472
1686
  var placeholders_1 = __webpack_require__(50);
1687
+
1473
1688
  var i18n_1 = __webpack_require__(2);
1689
+
1474
1690
  var schemaUtils_1 = __webpack_require__(16);
1691
+
1475
1692
  var visualization_color_palettes_1 = __webpack_require__(51);
1693
+
1476
1694
  var pick_1 = __webpack_require__(23);
1695
+
1477
1696
  var variables_1 = __webpack_require__(11);
1697
+
1478
1698
  var VizBehavior_1 = __webpack_require__(6);
1479
- var VizCategory_1 = __webpack_require__(35);
1699
+
1700
+ var VizCategory_1 = __webpack_require__(36);
1701
+
1480
1702
  var configUtils_1 = __webpack_require__(20);
1703
+
1481
1704
  var BackgroundColor_1 = __webpack_require__(53);
1705
+
1482
1706
  var dataContract = {
1483
1707
  requiredDataSources: [{
1484
1708
  name: 'primary',
1485
1709
  description: 'DataSource that powers the visualization'
1486
1710
  }],
1487
- optionalDataSources: [
1488
- // Note: SCP-14090 disable ui for optional datasources. We may need to add it back later
1711
+ optionalDataSources: [// Note: SCP-14090 disable ui for optional datasources. We may need to add it back later
1489
1712
  // {
1490
1713
  // name: 'annotation',
1491
1714
  // description: 'DataSource that populate event annotations',
@@ -1663,16 +1886,19 @@ var editorConfig = [{
1663
1886
  /**
1664
1887
  * visualization configuration
1665
1888
  */
1889
+
1666
1890
  var config = {
1667
1891
  /**
1668
1892
  * unique viz key
1669
1893
  */
1670
1894
  key: 'splunk.pie',
1895
+
1671
1896
  /**
1672
1897
  * viz name
1673
1898
  */
1674
1899
  name: (0, i18n_1._)('Pie'),
1675
1900
  category: VizCategory_1.VizCategory.COMPARISONS,
1901
+
1676
1902
  /**
1677
1903
  * viz icon
1678
1904
  */
@@ -1710,25 +1936,34 @@ module.exports = require("@splunk/react-icons/enterprise/ChartPie");
1710
1936
 
1711
1937
  var __rest = this && this.__rest || function (s, e) {
1712
1938
  var t = {};
1939
+
1713
1940
  for (var p in s) {
1714
1941
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
1715
1942
  }
1943
+
1716
1944
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1717
1945
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
1718
1946
  }
1719
1947
  return t;
1720
1948
  };
1949
+
1721
1950
  Object.defineProperty(exports, "__esModule", {
1722
1951
  value: true
1723
1952
  });
1724
1953
  exports.allInvalidDataValues = exports.invalidOptionField = exports.getPieOptionFieldIndex = exports.getPieMergedOptions = exports.convertToPieSCProperties = exports.mapToOldKey = exports.mapLabelDisplay = exports.convertToStringValues = void 0;
1954
+
1725
1955
  var lodash_1 = __webpack_require__(3);
1956
+
1726
1957
  var propUtils_1 = __webpack_require__(29);
1958
+
1727
1959
  var dsl_1 = __webpack_require__(133);
1960
+
1728
1961
  var hocUtils_1 = __webpack_require__(27);
1729
- var JSONSchemaUtils_1 = __webpack_require__(28);
1730
- // CONVERT THIS TO PIE THEN ADD TO Pie.TSX
1962
+
1963
+ var JSONSchemaUtils_1 = __webpack_require__(28); // CONVERT THIS TO PIE THEN ADD TO Pie.TSX
1731
1964
  // map for key names which are either new or not present in SimpleXML options mapping
1965
+
1966
+
1732
1967
  var pieOptionsSCMapping = {
1733
1968
  resultLimit: 'resultTruncationLimit',
1734
1969
  seriesColorsByField: 'fieldColors',
@@ -1742,6 +1977,7 @@ var pieOptionsSCMapping = {
1742
1977
  * @param {Object} options
1743
1978
  * @returns {Object}
1744
1979
  */
1980
+
1745
1981
  var convertToStringValues = function convertToStringValues(options) {
1746
1982
  var updatedOptions = (0, propUtils_1.convertPropsToString)({
1747
1983
  vizProps: options,
@@ -1749,6 +1985,7 @@ var convertToStringValues = function convertToStringValues(options) {
1749
1985
  });
1750
1986
  return Object.assign(Object.assign({}, options), updatedOptions);
1751
1987
  };
1988
+
1752
1989
  exports.convertToStringValues = convertToStringValues;
1753
1990
  /**
1754
1991
  * Helper method to map labelDisplay options to jsCharting options
@@ -1756,21 +1993,26 @@ exports.convertToStringValues = convertToStringValues;
1756
1993
  * @param {Object} options
1757
1994
  * @returns {Object}
1758
1995
  */
1996
+
1759
1997
  var mapLabelDisplay = function mapLabelDisplay(_a) {
1760
1998
  var labelDisplay = _a.labelDisplay,
1761
- options = __rest(_a, ["labelDisplay"]);
1999
+ options = __rest(_a, ["labelDisplay"]);
2000
+
1762
2001
  var convertedOptions = Object.assign(Object.assign({}, options), {
1763
2002
  // default for labelDisplay option is 'values'
1764
2003
  'chart.showLabels': true,
1765
2004
  'chart.showPercent': false
1766
2005
  });
2006
+
1767
2007
  if (labelDisplay === 'valuesAndPercentage') {
1768
2008
  convertedOptions['chart.showPercent'] = true;
1769
2009
  } else if (labelDisplay === 'off') {
1770
2010
  convertedOptions['chart.showLabels'] = false;
1771
2011
  }
2012
+
1772
2013
  return convertedOptions;
1773
2014
  };
2015
+
1774
2016
  exports.mapLabelDisplay = mapLabelDisplay;
1775
2017
  /**
1776
2018
  * Helper method to update the option names which can be mapped to SimpleXML options or
@@ -1779,11 +2021,13 @@ exports.mapLabelDisplay = mapLabelDisplay;
1779
2021
  * @param {Object} options
1780
2022
  * @returns {Object}
1781
2023
  */
2024
+
1782
2025
  var mapToOldKey = function mapToOldKey(options) {
1783
2026
  return (0, lodash_1.mapKeys)(options, function (val, key) {
1784
2027
  return pieOptionsSCMapping[key] ? pieOptionsSCMapping[key] : key;
1785
2028
  });
1786
2029
  };
2030
+
1787
2031
  exports.mapToOldKey = mapToOldKey;
1788
2032
  /**
1789
2033
  * Chained helper for mapping the option properties (and values) we expose in config.ts into property values that splunk-charting accepts
@@ -1793,9 +2037,11 @@ exports.mapToOldKey = mapToOldKey;
1793
2037
  * @param {Object} originalOptions
1794
2038
  * @returns {Object}
1795
2039
  */
2040
+
1796
2041
  var convertToPieSCProperties = function convertToPieSCProperties(originalOptions) {
1797
2042
  return (0, lodash_1.chain)((0, exports.mapToOldKey)(originalOptions)).thru(exports.convertToStringValues).thru(exports.mapLabelDisplay).value();
1798
2043
  };
2044
+
1799
2045
  exports.convertToPieSCProperties = convertToPieSCProperties;
1800
2046
  /**
1801
2047
  * Return all merged options (default + config) using vizConfig and options
@@ -1803,9 +2049,11 @@ exports.convertToPieSCProperties = convertToPieSCProperties;
1803
2049
  * @param vizConfig
1804
2050
  * @returns
1805
2051
  */
2052
+
1806
2053
  var getPieMergedOptions = function getPieMergedOptions(options, vizConfig) {
1807
2054
  return (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, (0, JSONSchemaUtils_1.pickFieldFromJSONSchema)(vizConfig.optionsSchema, 'default'));
1808
2055
  };
2056
+
1809
2057
  exports.getPieMergedOptions = getPieMergedOptions;
1810
2058
  /**
1811
2059
  * Returns option's field index. If not found returns -1
@@ -1815,16 +2063,19 @@ exports.getPieMergedOptions = getPieMergedOptions;
1815
2063
  * @param vizConfig
1816
2064
  * @returns
1817
2065
  */
2066
+
1818
2067
  var getPieOptionFieldIndex = function getPieOptionFieldIndex(optionName, dataSources, options, vizConfig) {
1819
- var mergedOptions = (0, exports.getPieMergedOptions)(options, vizConfig);
1820
- // find the field name configured for pie "value"
2068
+ var mergedOptions = (0, exports.getPieMergedOptions)(options, vizConfig); // find the field name configured for pie "value"
2069
+
1821
2070
  var fieldName = (0, dsl_1.getFieldsFromDSL)(mergedOptions[optionName], dataSources)[0];
1822
2071
  var fields = dataSources.primary.data.fields; // find the field index configured for pie "value"
2072
+
1823
2073
  var fieldIndex = fields.findIndex(function (field) {
1824
2074
  return (typeof field === 'string' ? field : field.name.toString()) === fieldName;
1825
2075
  });
1826
2076
  return fieldIndex;
1827
2077
  };
2078
+
1828
2079
  exports.getPieOptionFieldIndex = getPieOptionFieldIndex;
1829
2080
  /**
1830
2081
  * Returns true if columns data has invalid data format for specified option (label or value)
@@ -1834,29 +2085,37 @@ exports.getPieOptionFieldIndex = getPieOptionFieldIndex;
1834
2085
  * @param vizConfig
1835
2086
  * @returns
1836
2087
  */
2088
+
1837
2089
  var invalidOptionField = function invalidOptionField(optionName, dataSources, options, vizConfig) {
1838
2090
  var columns = dataSources.primary.data.columns;
1839
2091
  var fieldIndex = (0, exports.getPieOptionFieldIndex)(optionName, dataSources, options, vizConfig);
2092
+
1840
2093
  if (fieldIndex === -1 || !columns[fieldIndex] || !Array.isArray(columns[fieldIndex]) || Array.isArray(columns[fieldIndex]) && !columns[fieldIndex].length) {
1841
2094
  return true;
1842
2095
  }
2096
+
1843
2097
  return false;
1844
2098
  };
2099
+
1845
2100
  exports.invalidOptionField = invalidOptionField;
1846
2101
  /**
1847
2102
  * Helper function to evaluate if all data values are invalid (zero or negative)
1848
2103
  */
2104
+
1849
2105
  var allInvalidDataValues = function allInvalidDataValues(dataSources, options, vizConfig) {
1850
2106
  var columns = dataSources.primary.data.columns; // find the field index configured for pie "value"
1851
- var valueFieldIndex = (0, exports.getPieOptionFieldIndex)('value', dataSources, options, vizConfig);
1852
- // check if all values are invalid
2107
+
2108
+ var valueFieldIndex = (0, exports.getPieOptionFieldIndex)('value', dataSources, options, vizConfig); // check if all values are invalid
2109
+
1853
2110
  if (Array.isArray(columns) && columns[valueFieldIndex] && Array.isArray(columns[valueFieldIndex])) {
1854
2111
  return !columns[valueFieldIndex].some(function (value) {
1855
2112
  return +value > 0;
1856
2113
  });
1857
2114
  }
2115
+
1858
2116
  return false;
1859
2117
  };
2118
+
1860
2119
  exports.allInvalidDataValues = allInvalidDataValues;
1861
2120
 
1862
2121
  /***/ }),
@@ -1871,19 +2130,27 @@ Object.defineProperty(exports, "__esModule", {
1871
2130
  value: true
1872
2131
  });
1873
2132
  exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
2133
+
1874
2134
  var React = __webpack_require__(1);
2135
+
1875
2136
  var T = __webpack_require__(0);
2137
+
1876
2138
  var i18n_1 = __webpack_require__(2);
2139
+
1877
2140
  var Message_1 = __webpack_require__(10);
2141
+
1878
2142
  var FixedSizeContainer_1 = __webpack_require__(13);
1879
2143
  /**
1880
2144
  * @method isMissing
1881
2145
  * @param {any} v
1882
2146
  * @returns {boolean} true if the input value === null or undefined
1883
2147
  */
2148
+
2149
+
1884
2150
  var isMissing = function isMissing(v) {
1885
2151
  return v === null || v === undefined;
1886
2152
  };
2153
+
1887
2154
  exports.isMissing = isMissing;
1888
2155
  /**
1889
2156
  * @method misskingKeys
@@ -1891,11 +2158,13 @@ exports.isMissing = isMissing;
1891
2158
  * @param {object} target
1892
2159
  * @returns {string[]} the keys of missing required props
1893
2160
  */
2161
+
1894
2162
  var missingKeys = function missingKeys(keys, target) {
1895
2163
  return keys.filter(function (k) {
1896
2164
  return (0, exports.isMissing)(target[k]);
1897
2165
  });
1898
2166
  };
2167
+
1899
2168
  exports.missingKeys = missingKeys;
1900
2169
  var propTypes = {
1901
2170
  width: T.oneOfType([T.string, T.number]),
@@ -1909,10 +2178,11 @@ var propTypes = {
1909
2178
  * @param {MissingPropsProps} props
1910
2179
  * @returns {React.ReactElement}
1911
2180
  */
2181
+
1912
2182
  var MissingPropsMessage = function MissingPropsMessage(props) {
1913
2183
  var width = props.width,
1914
- height = props.height,
1915
- missingProps = props.missingProps;
2184
+ height = props.height,
2185
+ missingProps = props.missingProps;
1916
2186
  return React.createElement(Message_1.default, {
1917
2187
  "data-test": "message",
1918
2188
  width: width,
@@ -1920,6 +2190,7 @@ var MissingPropsMessage = function MissingPropsMessage(props) {
1920
2190
  message: (0, i18n_1._)("Missing property: ".concat(missingProps.join(', ')))
1921
2191
  });
1922
2192
  };
2193
+
1923
2194
  exports.MissingPropsMessage = MissingPropsMessage;
1924
2195
  exports.MissingPropsMessage.propTypes = propTypes;
1925
2196
  exports.MissingPropsMessage.defaultProps = {
@@ -1939,15 +2210,19 @@ exports.default = (0, FixedSizeContainer_1.default)(exports.MissingPropsMessage)
1939
2210
  Object.defineProperty(exports, "__esModule", {
1940
2211
  value: true
1941
2212
  });
2213
+
1942
2214
  var React = __webpack_require__(1);
2215
+
1943
2216
  var styled_components_1 = __webpack_require__(4);
2217
+
1944
2218
  var hocUtils_1 = __webpack_require__(15);
2219
+
1945
2220
  var Cover = styled_components_1.default.div.withConfig({
1946
2221
  displayName: "withEditModeCover__Cover",
1947
2222
  componentId: "sc-1gsbnxb-0"
1948
2223
  })(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
1949
2224
  var Blocker = styled_components_1.default.div.attrs({
1950
- 'data-splunk-visualization-version': "26.0.0 - 2f7458907"
2225
+ 'data-splunk-visualization-version': "26.1.0 - fc8bf8d77"
1951
2226
  }).withConfig({
1952
2227
  displayName: "withEditModeCover__Blocker",
1953
2228
  componentId: "sc-1gsbnxb-1"
@@ -1958,6 +2233,7 @@ var Blocker = styled_components_1.default.div.attrs({
1958
2233
  * @param {ExtendedDashViz} Visualization
1959
2234
  * @returns {ExtendedDashViz} Wrapper
1960
2235
  */
2236
+
1961
2237
  var withEditModeCover = function withEditModeCover(Visualization, disableEditModeCover) {
1962
2238
  var Wrapper = function Wrapper(props) {
1963
2239
  var mode = props.mode;
@@ -1966,12 +2242,14 @@ var withEditModeCover = function withEditModeCover(Visualization, disableEditMod
1966
2242
  "data-test": "edit-mode-cover"
1967
2243
  }));
1968
2244
  };
2245
+
1969
2246
  (0, hocUtils_1.extendStaticWrapperProps)({
1970
2247
  Wrapper: Wrapper,
1971
2248
  Visualization: Visualization
1972
2249
  });
1973
2250
  return Wrapper;
1974
2251
  };
2252
+
1975
2253
  exports.default = withEditModeCover;
1976
2254
 
1977
2255
  /***/ }),
@@ -1985,27 +2263,37 @@ exports.default = withEditModeCover;
1985
2263
  Object.defineProperty(exports, "__esModule", {
1986
2264
  value: true
1987
2265
  });
2266
+
1988
2267
  var React = __webpack_require__(1);
2268
+
1989
2269
  var colorUtils_1 = __webpack_require__(12);
2270
+
1990
2271
  var variables_1 = __webpack_require__(11);
2272
+
1991
2273
  var IconPlaceholder_1 = __webpack_require__(32);
2274
+
1992
2275
  var VizBehavior_1 = __webpack_require__(6);
2276
+
1993
2277
  var hocUtils_1 = __webpack_require__(15);
2278
+
1994
2279
  var withPlaceholder = function withPlaceholder(Visualization) {
1995
2280
  var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
1996
2281
  var config = Visualization.config;
1997
2282
  var themes = config.themes;
2283
+
1998
2284
  var Wrapper = function Wrapper(props) {
1999
2285
  var _a, _b;
2286
+
2000
2287
  var dataSources = props.dataSources,
2001
- loading = props.loading,
2002
- options = props.options,
2003
- height = props.height,
2004
- width = props.width;
2288
+ loading = props.loading,
2289
+ options = props.options,
2290
+ height = props.height,
2291
+ width = props.width;
2005
2292
  var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
2006
2293
  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);
2007
2294
  var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
2008
2295
  var iconColor = variables_1.default.contentColorActive(props);
2296
+
2009
2297
  if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
2010
2298
  return React.createElement(IconPlaceholder_1.default, {
2011
2299
  "data-test": "icon-placeholder",
@@ -2016,14 +2304,17 @@ var withPlaceholder = function withPlaceholder(Visualization) {
2016
2304
  iconColor: iconColor
2017
2305
  });
2018
2306
  }
2307
+
2019
2308
  return React.createElement(Visualization, Object.assign({}, props));
2020
2309
  };
2310
+
2021
2311
  (0, hocUtils_1.extendStaticWrapperProps)({
2022
2312
  Wrapper: Wrapper,
2023
2313
  Visualization: Visualization
2024
2314
  });
2025
2315
  return Wrapper;
2026
2316
  };
2317
+
2027
2318
  exports.default = withPlaceholder;
2028
2319
 
2029
2320
  /***/ }),
@@ -2051,11 +2342,13 @@ module.exports = require("@splunk/visualization-color-palettes");
2051
2342
  Object.defineProperty(exports, "__esModule", {
2052
2343
  value: true
2053
2344
  });
2345
+
2054
2346
  var i18n_1 = __webpack_require__(2);
2347
+
2055
2348
  var background = function background(_ref) {
2056
2349
  var label = _ref.label,
2057
- themes = _ref.themes,
2058
- labelPosition = _ref.labelPosition;
2350
+ themes = _ref.themes,
2351
+ labelPosition = _ref.labelPosition;
2059
2352
  return [{
2060
2353
  label: (0, i18n_1._)(label || 'Background'),
2061
2354
  option: 'backgroundColor',
@@ -2066,6 +2359,7 @@ var background = function background(_ref) {
2066
2359
  }
2067
2360
  }];
2068
2361
  };
2362
+
2069
2363
  exports.default = background;
2070
2364
 
2071
2365
  /***/ }),
@@ -2084,20 +2378,25 @@ module.exports = require("@splunk/charting-bundle");
2084
2378
 
2085
2379
 
2086
2380
  var _toConsumableArray = __webpack_require__(8);
2381
+
2087
2382
  var __rest = this && this.__rest || function (s, e) {
2088
2383
  var t = {};
2384
+
2089
2385
  for (var p in s) {
2090
2386
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
2091
2387
  }
2388
+
2092
2389
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2093
2390
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
2094
2391
  }
2095
2392
  return t;
2096
2393
  };
2394
+
2097
2395
  Object.defineProperty(exports, "__esModule", {
2098
2396
  value: true
2099
2397
  });
2100
2398
  exports.constructFieldsAndColumns = exports.toArrayForSeries = exports.isMultiSeriesData = exports.convertOverlayFields = exports.convertY2AxisOptions = exports.mapToValues = exports.truncateData = exports.getAnnotations = void 0;
2399
+
2101
2400
  var lodash_1 = __webpack_require__(3);
2102
2401
  /**
2103
2402
  * Get formatted annotations
@@ -2108,10 +2407,12 @@ var lodash_1 = __webpack_require__(3);
2108
2407
  * @param {Array} options.annotationLabel
2109
2408
  * @returns {Array}
2110
2409
  */
2410
+
2411
+
2111
2412
  var getAnnotations = function getAnnotations(_ref) {
2112
2413
  var annotationX = _ref.annotationX,
2113
- annotationColor = _ref.annotationColor,
2114
- annotationLabel = _ref.annotationLabel;
2414
+ annotationColor = _ref.annotationColor,
2415
+ annotationLabel = _ref.annotationLabel;
2115
2416
  return annotationX && annotationX.length ? annotationX.map(function (timestamp, i) {
2116
2417
  return {
2117
2418
  color: annotationColor && annotationColor[i],
@@ -2120,6 +2421,7 @@ var getAnnotations = function getAnnotations(_ref) {
2120
2421
  };
2121
2422
  }) : [];
2122
2423
  };
2424
+
2123
2425
  exports.getAnnotations = getAnnotations;
2124
2426
  /**
2125
2427
  * Truncate the result set to given limit
@@ -2128,20 +2430,25 @@ exports.getAnnotations = getAnnotations;
2128
2430
  * @param {Number|String} truncationLimit - options['chart.resultTruncationLimit']
2129
2431
  * @returns {Object}
2130
2432
  */
2433
+
2131
2434
  var truncateData = function truncateData(dataSet, truncationLimit) {
2132
2435
  if (!dataSet) {
2133
2436
  return null;
2134
2437
  }
2438
+
2135
2439
  var limit = parseInt(truncationLimit, 10);
2440
+
2136
2441
  if (!limit || limit <= 0) {
2137
2442
  return dataSet;
2138
2443
  }
2444
+
2139
2445
  var truncatedData = Object.assign({}, dataSet);
2140
2446
  truncatedData.columns = truncatedData.columns.map(function (columnData) {
2141
2447
  return columnData && Array.isArray(columnData) ? columnData.slice(0, limit) : columnData;
2142
2448
  });
2143
2449
  return truncatedData;
2144
2450
  };
2451
+
2145
2452
  exports.truncateData = truncateData;
2146
2453
  /**
2147
2454
  * Helper method to update the option values into the values that SC accepts
@@ -2149,12 +2456,14 @@ exports.truncateData = truncateData;
2149
2456
  * @param {Object} options
2150
2457
  * @returns {Object}
2151
2458
  */
2459
+
2152
2460
  var mapToValues = function mapToValues(optionValuesSCMapping) {
2153
2461
  return function (options) {
2154
2462
  var convertedOptions = Object.assign({}, options);
2155
2463
  Object.keys(optionValuesSCMapping).forEach(function (key) {
2156
2464
  if ((0, lodash_1.has)(options, key)) {
2157
2465
  var updatedValue = optionValuesSCMapping[key][options[key]];
2466
+
2158
2467
  if (!(0, lodash_1.isUndefined)(updatedValue)) {
2159
2468
  convertedOptions[key] = updatedValue;
2160
2469
  }
@@ -2163,6 +2472,7 @@ var mapToValues = function mapToValues(optionValuesSCMapping) {
2163
2472
  return convertedOptions;
2164
2473
  };
2165
2474
  };
2475
+
2166
2476
  exports.mapToValues = mapToValues;
2167
2477
  /**
2168
2478
  * Helper method to process options related to y2Fields
@@ -2170,18 +2480,23 @@ exports.mapToValues = mapToValues;
2170
2480
  * @param {Object} originalOptions
2171
2481
  * @returns {Object}
2172
2482
  */
2483
+
2173
2484
  var convertY2AxisOptions = function convertY2AxisOptions(_a) {
2174
2485
  var y2Fields = _a.y2Fields,
2175
- originalOptions = __rest(_a, ["y2Fields"]);
2486
+ originalOptions = __rest(_a, ["y2Fields"]);
2487
+
2176
2488
  var convertedOptions = Object.assign({}, originalOptions);
2489
+
2177
2490
  if (y2Fields) {
2178
2491
  convertedOptions['axisY2.enabled'] = true;
2179
2492
  convertedOptions['axisY2.fields'] = (0, lodash_1.isArray)(y2Fields) ? y2Fields.filter(function (name) {
2180
2493
  return name;
2181
2494
  }).join(',') : y2Fields;
2182
2495
  }
2496
+
2183
2497
  return convertedOptions;
2184
2498
  };
2499
+
2185
2500
  exports.convertY2AxisOptions = convertY2AxisOptions;
2186
2501
  /**
2187
2502
  * Helper method to format value for overlayFields
@@ -2189,9 +2504,11 @@ exports.convertY2AxisOptions = convertY2AxisOptions;
2189
2504
  * @param {Object} originalOptions
2190
2505
  * @returns {Object}
2191
2506
  */
2507
+
2192
2508
  var convertOverlayFields = function convertOverlayFields(originalOptions) {
2193
2509
  var convertedOptions = Object.assign({}, originalOptions);
2194
2510
  var overlayFields = originalOptions.overlayFields;
2511
+
2195
2512
  if (overlayFields) {
2196
2513
  convertedOptions.overlayFields = Array.isArray(overlayFields) ? overlayFields.filter(function (field) {
2197
2514
  return field;
@@ -2199,17 +2516,21 @@ var convertOverlayFields = function convertOverlayFields(originalOptions) {
2199
2516
  return field.trim();
2200
2517
  }).join(',') : overlayFields;
2201
2518
  }
2519
+
2202
2520
  return convertedOptions;
2203
2521
  };
2522
+
2204
2523
  exports.convertOverlayFields = convertOverlayFields;
2205
2524
  /**
2206
2525
  * checks whether data is multi series data
2207
2526
  * @param {array} data array
2208
2527
  * @return {Boolean}
2209
2528
  */
2529
+
2210
2530
  var isMultiSeriesData = function isMultiSeriesData(data) {
2211
2531
  return Array.isArray(data) && Array.isArray(data[0]);
2212
2532
  };
2533
+
2213
2534
  exports.isMultiSeriesData = isMultiSeriesData;
2214
2535
  /**
2215
2536
  * checks whether data is multi series data and returns value as array
@@ -2217,19 +2538,22 @@ exports.isMultiSeriesData = isMultiSeriesData;
2217
2538
  * @param {*} value to return as array
2218
2539
  * @return {array}
2219
2540
  */
2541
+
2220
2542
  var toArrayForSeries = function toArrayForSeries(data, value) {
2221
2543
  return (0, exports.isMultiSeriesData)(data) ? value : [value];
2222
2544
  };
2545
+
2223
2546
  exports.toArrayForSeries = toArrayForSeries;
2547
+
2224
2548
  var constructFieldsAndColumns = function constructFieldsAndColumns(_ref2) {
2225
2549
  var _ref2$x = _ref2.x,
2226
- x = _ref2$x === void 0 ? [] : _ref2$x,
2227
- _ref2$y = _ref2.y,
2228
- y = _ref2$y === void 0 ? [] : _ref2$y,
2229
- xField = _ref2.xField,
2230
- yFields = _ref2.yFields,
2231
- y2 = _ref2.y2,
2232
- y2Fields = _ref2.y2Fields;
2550
+ x = _ref2$x === void 0 ? [] : _ref2$x,
2551
+ _ref2$y = _ref2.y,
2552
+ y = _ref2$y === void 0 ? [] : _ref2$y,
2553
+ xField = _ref2.xField,
2554
+ yFields = _ref2.yFields,
2555
+ y2 = _ref2.y2,
2556
+ y2Fields = _ref2.y2Fields;
2233
2557
  var columns = [x.map(String)].concat(_toConsumableArray((0, exports.toArrayForSeries)(y, y).map(function (series) {
2234
2558
  return series.map(String);
2235
2559
  })));
@@ -2240,10 +2564,10 @@ var constructFieldsAndColumns = function constructFieldsAndColumns(_ref2) {
2240
2564
  return {
2241
2565
  name: field
2242
2566
  };
2243
- })));
2244
- // splunk-charting requires y2 to be part of columns
2567
+ }))); // splunk-charting requires y2 to be part of columns
2245
2568
  // when y & y2 options are configured with different (mutually exclusive) series
2246
2569
  // y2 columns need to be added to columns
2570
+
2247
2571
  if (y2Fields) {
2248
2572
  var y2FieldsArray = (0, exports.toArrayForSeries)(y2, y2Fields);
2249
2573
  var y2AsArray = (0, exports.toArrayForSeries)(y2, y2).map(function (series) {
@@ -2258,11 +2582,13 @@ var constructFieldsAndColumns = function constructFieldsAndColumns(_ref2) {
2258
2582
  }
2259
2583
  });
2260
2584
  }
2585
+
2261
2586
  return {
2262
2587
  columns: columns,
2263
2588
  fields: fields
2264
2589
  };
2265
2590
  };
2591
+
2266
2592
  exports.constructFieldsAndColumns = constructFieldsAndColumns;
2267
2593
 
2268
2594
  /***/ }),
@@ -2285,6 +2611,7 @@ Object.defineProperty(exports, "__esModule", {
2285
2611
  });
2286
2612
  exports.VizBehavior = void 0;
2287
2613
  var VizBehavior;
2614
+
2288
2615
  (function (VizBehavior) {
2289
2616
  /**
2290
2617
  * Dynamic Options Behavior.
@@ -2304,6 +2631,7 @@ var VizBehavior;
2304
2631
  * missing.
2305
2632
  * @type {string}
2306
2633
  */
2634
+
2307
2635
  VizBehavior["PLACEHOLDER"] = "placeholder";
2308
2636
  VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
2309
2637
  VizBehavior["TRELLIS"] = "trellis";
@@ -2322,23 +2650,42 @@ Object.defineProperty(exports, "__esModule", {
2322
2650
  });
2323
2651
  exports.updateRowPayload = exports.canUpdateInPlace = exports.changedOptions = exports.NO_INPLACE_PROPS = void 0;
2324
2652
  /* eslint-disable react/no-unused-prop-types */
2653
+
2325
2654
  var lodash_1 = __webpack_require__(3);
2655
+
2326
2656
  var i18n_1 = __webpack_require__(2);
2657
+
2327
2658
  var visualization_color_palettes_1 = __webpack_require__(51);
2659
+
2328
2660
  var react_1 = __webpack_require__(1);
2661
+
2329
2662
  var React = __webpack_require__(1);
2663
+
2330
2664
  var T = __webpack_require__(0);
2665
+
2331
2666
  var react_event_listener_1 = __webpack_require__(66);
2667
+
2332
2668
  __webpack_require__(67); // fixme, @splunk/charting should be refactor to use locale & timezone instead of i18n functions
2669
+
2670
+
2333
2671
  var charting_bundle_1 = __webpack_require__(55);
2672
+
2334
2673
  var TimezoneContext_1 = __webpack_require__(26);
2674
+
2335
2675
  var style_1 = __webpack_require__(14);
2676
+
2336
2677
  var styled_components_1 = __webpack_require__(4);
2678
+
2337
2679
  var Message_1 = __webpack_require__(10);
2680
+
2338
2681
  var useSplunkTheme_1 = __webpack_require__(57);
2682
+
2339
2683
  var themeUtils_1 = __webpack_require__(68);
2684
+
2340
2685
  var ChartingApi_1 = __webpack_require__(69);
2686
+
2341
2687
  exports.NO_INPLACE_PROPS = ['chart', 'chart.orientation', 'layout.splitSeries', 'chart.style', 'legend.placement'];
2688
+
2342
2689
  var changedOptions = function changedOptions(curOptions, nextOptions) {
2343
2690
  return Object.keys(curOptions).filter(function (key) {
2344
2691
  return !(key in nextOptions);
@@ -2346,7 +2693,9 @@ var changedOptions = function changedOptions(curOptions, nextOptions) {
2346
2693
  return !(key in curOptions) || curOptions[key] !== nextOptions[key];
2347
2694
  }));
2348
2695
  };
2696
+
2349
2697
  exports.changedOptions = changedOptions;
2698
+
2350
2699
  function usePrevious(value) {
2351
2700
  var ref = (0, react_1.useRef)();
2352
2701
  (0, react_1.useEffect)(function () {
@@ -2354,21 +2703,24 @@ function usePrevious(value) {
2354
2703
  });
2355
2704
  return ref.current;
2356
2705
  }
2706
+
2357
2707
  var canUpdateInPlace = function canUpdateInPlace(curOptions, nextOptions) {
2358
2708
  // if either of the options are undefined
2359
2709
  // it cannot update in place.
2360
2710
  if (!curOptions || !nextOptions) {
2361
2711
  return false;
2362
2712
  }
2713
+
2363
2714
  return !exports.NO_INPLACE_PROPS.some(function (p) {
2364
2715
  return curOptions[p] !== nextOptions[p];
2365
2716
  }) && !(0, exports.changedOptions)(curOptions, nextOptions).some(function (p) {
2366
2717
  return p.toLowerCase().endsWith('color');
2367
2718
  });
2368
2719
  };
2369
- exports.canUpdateInPlace = canUpdateInPlace;
2370
- // create 'row' payloads from 'rowContext' in the flattened format:
2720
+
2721
+ exports.canUpdateInPlace = canUpdateInPlace; // create 'row' payloads from 'rowContext' in the flattened format:
2371
2722
  // row.<fieldname>.value
2723
+
2372
2724
  var updateRowPayload = function updateRowPayload(chartEventRowContext, payload) {
2373
2725
  Object.keys(chartEventRowContext || {}).forEach(function (key) {
2374
2726
  // eslint-disable-next-line no-param-reassign
@@ -2376,18 +2728,21 @@ var updateRowPayload = function updateRowPayload(chartEventRowContext, payload)
2376
2728
  });
2377
2729
  return payload;
2378
2730
  };
2731
+
2379
2732
  exports.updateRowPayload = updateRowPayload;
2380
2733
  var VizChartEventType;
2734
+
2381
2735
  (function (VizChartEventType) {
2382
2736
  VizChartEventType["POINT_CLICK"] = "point.click";
2383
2737
  VizChartEventType["POINT_MOUSE_OUT"] = "point.mouseout";
2384
2738
  VizChartEventType["POINT_MOUSE_OVER"] = "point.mouseover";
2385
2739
  VizChartEventType["LEGEND_CLICK"] = "legend.click";
2386
- })(VizChartEventType || (VizChartEventType = {}));
2387
- // @TODO(pwied): remove after HC upgrade to 8+
2740
+ })(VizChartEventType || (VizChartEventType = {})); // @TODO(pwied): remove after HC upgrade to 8+
2388
2741
  // .highcharts-a11y-proxy-container rule addresses a HighCharts < 8 bug
2389
2742
  // caused by the accessibility plugin
2390
2743
  // https://github.com/highcharts/highcharts/issues/12883
2744
+
2745
+
2391
2746
  var ChartingContainer = styled_components_1.default.div.attrs(function (props) {
2392
2747
  return {
2393
2748
  'data-test': 'charting-container',
@@ -2415,6 +2770,7 @@ var propTypes = {
2415
2770
  visualizationApiRef: T.func,
2416
2771
  themeKey: T.string
2417
2772
  };
2773
+
2418
2774
  var Charting = function Charting(props) {
2419
2775
  var container = (0, react_1.useRef)(null);
2420
2776
  var needsInit = (0, react_1.useRef)(true);
@@ -2422,6 +2778,7 @@ var Charting = function Charting(props) {
2422
2778
  var needsRedraw = (0, react_1.useRef)(true);
2423
2779
  var api = (0, react_1.useRef)(new ChartingApi_1.ChartingApiFunctional(chart));
2424
2780
  var timezone = (0, react_1.useContext)(TimezoneContext_1.default);
2781
+
2425
2782
  var computeChartingSize = function computeChartingSize() {
2426
2783
  if (container.current) {
2427
2784
  var rect = container.current.getBoundingClientRect();
@@ -2430,48 +2787,56 @@ var Charting = function Charting(props) {
2430
2787
  width: rect.width
2431
2788
  };
2432
2789
  }
2790
+
2433
2791
  return {};
2434
2792
  };
2793
+
2435
2794
  var splunkTheme = (0, useSplunkTheme_1.default)();
2436
2795
  var themeKey = props.themeKey ? props.themeKey : (0, themeUtils_1.getChartingThemeKey)({
2437
2796
  splunkThemeV1: splunkTheme
2438
2797
  });
2439
2798
  var width = props.width,
2440
- height = props.height,
2441
- style = props.style,
2442
- chartData = props.chartData,
2443
- options = props.options,
2444
- colorPalette = props.colorPalette,
2445
- onClick = props.onClick,
2446
- onSelect = props.onSelect,
2447
- onPointMouseOut = props.onPointMouseOut,
2448
- onPointMouseOver = props.onPointMouseOver,
2449
- onEventTrigger = props.onEventTrigger;
2799
+ height = props.height,
2800
+ style = props.style,
2801
+ chartData = props.chartData,
2802
+ options = props.options,
2803
+ colorPalette = props.colorPalette,
2804
+ onClick = props.onClick,
2805
+ onSelect = props.onSelect,
2806
+ onPointMouseOut = props.onPointMouseOut,
2807
+ onPointMouseOver = props.onPointMouseOver,
2808
+ onEventTrigger = props.onEventTrigger;
2450
2809
  var prevOptions = usePrevious(options);
2451
2810
  var prevTimezone = usePrevious(timezone);
2811
+
2452
2812
  var handleClick = function handleClick(chartEvent, type) {
2453
2813
  var payload = (0, lodash_1.pick)(chartEvent, 'name2', 'value2', '_span', 'modifierKey');
2454
2814
  payload.name = payload.name2;
2455
2815
  delete payload.name2;
2816
+
2456
2817
  if (type === VizChartEventType.POINT_CLICK) {
2457
2818
  payload.value = payload.value2;
2458
2819
  delete payload.value2;
2459
2820
  payload = (0, exports.updateRowPayload)(chartEvent.rowContext, payload);
2460
2821
  }
2822
+
2461
2823
  onClick({
2462
2824
  type: type,
2463
2825
  originalEvent: chartEvent,
2464
2826
  payload: payload
2465
2827
  });
2466
2828
  };
2829
+
2467
2830
  var destroyChart = function destroyChart() {
2468
2831
  if (chart.current) {
2469
2832
  chart.current.destroy();
2470
2833
  chart.current = null;
2471
2834
  }
2835
+
2472
2836
  needsRedraw.current = true;
2473
2837
  needsInit.current = true;
2474
2838
  };
2839
+
2475
2840
  var handleSelect = function handleSelect(chartEvent) {
2476
2841
  // todo: need change this after breaking all visualizations
2477
2842
  if (onSelect && typeof onSelect === 'function') {
@@ -2481,14 +2846,16 @@ var Charting = function Charting(props) {
2481
2846
  payload: (0, lodash_1.pick)(chartEvent, 'startXIndex', 'endXIndex', 'startXValue', 'endXValue')
2482
2847
  });
2483
2848
  return;
2484
- }
2485
- // the chartEvent here is a jQuery event
2849
+ } // the chartEvent here is a jQuery event
2850
+
2851
+
2486
2852
  onEventTrigger({
2487
2853
  type: 'range.select',
2488
2854
  originalEvent: chartEvent,
2489
2855
  payload: (0, lodash_1.pick)(chartEvent, 'startXIndex', 'endXIndex', 'startXValue', 'endXValue')
2490
2856
  });
2491
2857
  };
2858
+
2492
2859
  var handlePointMouseOut = function handlePointMouseOut(chartEvent, type) {
2493
2860
  var payload = (0, lodash_1.pick)(chartEvent, 'name2', 'value2', '_span', 'modifierKey', 'tooltipContext');
2494
2861
  payload.name = payload.name2;
@@ -2502,6 +2869,7 @@ var Charting = function Charting(props) {
2502
2869
  payload: payload
2503
2870
  });
2504
2871
  };
2872
+
2505
2873
  var handlePointMouseOver = function handlePointMouseOver(chartEvent, type) {
2506
2874
  var payload = (0, lodash_1.pick)(chartEvent, 'name2', 'value2', '_span', 'modifierKey', 'tooltipContext');
2507
2875
  payload.name = payload.name2;
@@ -2515,6 +2883,7 @@ var Charting = function Charting(props) {
2515
2883
  payload: payload
2516
2884
  });
2517
2885
  };
2886
+
2518
2887
  var drawChart = function drawChart() {
2519
2888
  var updatedOptions = Object.assign(Object.assign({}, options), {
2520
2889
  shouldColorizeTooltipData: false
@@ -2525,15 +2894,18 @@ var Charting = function Charting(props) {
2525
2894
  var serializedTimezone = timezone === null || timezone === void 0 ? void 0 : timezone.serializedTimezone;
2526
2895
  var ianaTimezone = timezone === null || timezone === void 0 ? void 0 : timezone.ianaTimezone;
2527
2896
  var utcOffset = timezone === null || timezone === void 0 ? void 0 : timezone.utcOffset;
2897
+
2528
2898
  if (!computedWidth || !computedHeight) {
2529
2899
  return;
2530
2900
  }
2901
+
2531
2902
  if (!chartData || !Object.keys(chartData).length) {
2532
2903
  return;
2533
- }
2534
- // splunk-charting layers configuration option updates.
2904
+ } // splunk-charting layers configuration option updates.
2535
2905
  // when an option is removed it needs to be set to an empty string
2536
2906
  // to override the previous configuration
2907
+
2908
+
2537
2909
  if (prevOptions) {
2538
2910
  Object.keys(prevOptions).forEach(function (key) {
2539
2911
  if (updatedOptions[key] === undefined) {
@@ -2541,13 +2913,16 @@ var Charting = function Charting(props) {
2541
2913
  }
2542
2914
  });
2543
2915
  }
2916
+
2544
2917
  try {
2545
2918
  if (needsInit.current) {
2546
2919
  destroyChart();
2547
2920
  charting_bundle_1.default.setTheme(themeKey);
2921
+
2548
2922
  if (colorPalette.length > 0) {
2549
2923
  charting_bundle_1.default.setColorPalette(colorPalette);
2550
2924
  }
2925
+
2551
2926
  chart.current = charting_bundle_1.default.createChart(container.current, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, updatedOptions), {
2552
2927
  drilldown: 'all'
2553
2928
  }), typeof serializedTimezone === 'string' && {
@@ -2556,8 +2931,8 @@ var Charting = function Charting(props) {
2556
2931
  'time.ianaTimezone': ianaTimezone
2557
2932
  }), typeof utcOffset === 'number' && {
2558
2933
  'time.timezoneOffset': utcOffset
2559
- }));
2560
- // bind event handlers
2934
+ })); // bind event handlers
2935
+
2561
2936
  chart.current.on('pointClick', function (e) {
2562
2937
  handleClick(e, VizChartEventType.POINT_CLICK);
2563
2938
  });
@@ -2572,29 +2947,37 @@ var Charting = function Charting(props) {
2572
2947
  });
2573
2948
  chart.current.on('chartRangeSelect', handleSelect);
2574
2949
  }
2950
+
2575
2951
  if (needsRedraw.current) {
2576
2952
  charting_bundle_1.default.setTheme(themeKey);
2953
+
2577
2954
  if (colorPalette.length > 0) {
2578
2955
  charting_bundle_1.default.setColorPalette(colorPalette);
2579
2956
  }
2957
+
2580
2958
  chart.current.prepareAndDraw(chartData, updatedOptions, function () {});
2581
2959
  }
2960
+
2582
2961
  if (chart.current) {
2583
2962
  if (Math.round(chart.current.height) !== Math.round(computedHeight) || Math.round(chart.current.width) !== Math.round(computedWidth)) {
2584
2963
  chart.current.resize(computedWidth, computedHeight);
2585
2964
  }
2586
2965
  }
2966
+
2587
2967
  needsInit.current = false;
2588
2968
  needsRedraw.current = false;
2589
2969
  } catch (e) {
2590
2970
  window.console.error('Caught error rendering chart:', e);
2591
2971
  }
2592
2972
  };
2973
+
2593
2974
  var debouncedDrawChart = (0, lodash_1.debounce)(drawChart, 5);
2975
+
2594
2976
  var onContainerMount = function onContainerMount(chartingContainer) {
2595
2977
  container.current = chartingContainer;
2596
2978
  debouncedDrawChart();
2597
2979
  };
2980
+
2598
2981
  var prevTheme = usePrevious(themeKey);
2599
2982
  var prevOnClick = usePrevious(onClick);
2600
2983
  (0, react_1.useEffect)(function () {
@@ -2608,14 +2991,14 @@ var Charting = function Charting(props) {
2608
2991
  (0, react_1.useEffect)(function () {
2609
2992
  // TODO: figure out why re-init is needed for functional components (i.e. PlatformViz) when changing theme
2610
2993
  // seems like redraw doesn't suffice to update the background colors
2611
- if (!chart.current || !(0, exports.canUpdateInPlace)(prevOptions, options) ||
2612
- // timezone is a simple object so this comparison should be fast
2994
+ if (!chart.current || !(0, exports.canUpdateInPlace)(prevOptions, options) || // timezone is a simple object so this comparison should be fast
2613
2995
  JSON.stringify(prevTimezone) !== JSON.stringify(timezone) || !props.themeKey && prevTheme !== themeKey || prevOnClick !== onClick) {
2614
2996
  needsInit.current = true;
2615
2997
  }
2616
- needsRedraw.current = true;
2617
- // need to immediately call drawChart upon an option or chartData change
2998
+
2999
+ needsRedraw.current = true; // need to immediately call drawChart upon an option or chartData change
2618
3000
  // otherwise a noop would occur if the onContainerMount drawChart is re-invoked when dimensions change
3001
+
2619
3002
  drawChart();
2620
3003
  }, [JSON.stringify(options), JSON.stringify(chartData.toJSON()), JSON.stringify(chartData.annotations), timezone === null || timezone === void 0 ? void 0 : timezone.ianaTimezone, timezone === null || timezone === void 0 ? void 0 : timezone.utcOffset, timezone === null || timezone === void 0 ? void 0 : timezone.serializedTimezone, themeKey, onClick]);
2621
3004
  return React.createElement(ChartingContainer, {
@@ -2628,6 +3011,7 @@ var Charting = function Charting(props) {
2628
3011
  onResize: debouncedDrawChart
2629
3012
  }));
2630
3013
  };
3014
+
2631
3015
  var defaultProps = {
2632
3016
  width: '100%',
2633
3017
  height: 250,
@@ -2645,31 +3029,36 @@ var defaultProps = {
2645
3029
  themeKey: null
2646
3030
  };
2647
3031
  Charting.propTypes = propTypes;
2648
- Charting.defaultProps = defaultProps;
2649
- // allow for early return in case of empty chartData while still following hook rules
3032
+ Charting.defaultProps = defaultProps; // allow for early return in case of empty chartData while still following hook rules
3033
+
2650
3034
  var withEmptyChartMessage = function withEmptyChartMessage(Chart) {
2651
3035
  var Wrapper = function Wrapper(props) {
2652
3036
  var chartData = props.chartData;
3037
+
2653
3038
  if (!chartData) {
2654
3039
  return React.createElement(Message_1.default, {
2655
3040
  message: (0, i18n_1._)('No DataSource'),
2656
3041
  level: "warning"
2657
3042
  });
2658
3043
  }
3044
+
2659
3045
  if (chartData && !Object.keys(chartData).length) {
2660
3046
  return React.createElement(Message_1.default, {
2661
3047
  message: (0, i18n_1._)('No Result'),
2662
3048
  level: "info"
2663
3049
  });
2664
3050
  }
3051
+
2665
3052
  return React.createElement(Chart, Object.assign({}, props));
2666
3053
  };
3054
+
2667
3055
  Wrapper.displayName = 'ChartingWrapper';
2668
3056
  Wrapper.propTypes = propTypes;
2669
3057
  Wrapper.defaultProps = defaultProps;
2670
3058
  return Wrapper;
2671
- };
2672
- // export default Charting;
3059
+ }; // export default Charting;
3060
+
3061
+
2673
3062
  exports.default = withEmptyChartMessage(Charting);
2674
3063
 
2675
3064
  /***/ }),
@@ -2702,15 +3091,19 @@ module.exports = require("@splunk/visualizations-shared/themeUtils");
2702
3091
 
2703
3092
 
2704
3093
  var _classCallCheck = __webpack_require__(9);
3094
+
2705
3095
  var _createClass = __webpack_require__(18);
3096
+
2706
3097
  Object.defineProperty(exports, "__esModule", {
2707
3098
  value: true
2708
3099
  });
2709
3100
  exports.ChartingApiFunctional = void 0;
3101
+
2710
3102
  var ChartingApiFunctional = /*#__PURE__*/function () {
2711
3103
  // eslint-disable-next-line no-useless-constructor
2712
3104
  function ChartingApiFunctional(chartRef) {
2713
3105
  _classCallCheck(this, ChartingApiFunctional);
3106
+
2714
3107
  this.chartRef = chartRef;
2715
3108
  }
2716
3109
  /**
@@ -2718,15 +3111,18 @@ var ChartingApiFunctional = /*#__PURE__*/function () {
2718
3111
  *
2719
3112
  * @memberof ChartingApiFunctional
2720
3113
  */
3114
+
3115
+
2721
3116
  _createClass(ChartingApiFunctional, [{
2722
3117
  key: "highlight",
2723
3118
  value: function highlight() {
2724
3119
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
2725
- xValue: '',
2726
- seriesName: ''
2727
- },
2728
- xValue = _ref.xValue,
2729
- seriesName = _ref.seriesName;
3120
+ xValue: '',
3121
+ seriesName: ''
3122
+ },
3123
+ xValue = _ref.xValue,
3124
+ seriesName = _ref.seriesName;
3125
+
2730
3126
  this.getChart().highlight(xValue, seriesName);
2731
3127
  }
2732
3128
  /**
@@ -2734,21 +3130,25 @@ var ChartingApiFunctional = /*#__PURE__*/function () {
2734
3130
  *
2735
3131
  * @memberof ChartingApiFunctional
2736
3132
  */
3133
+
2737
3134
  }, {
2738
3135
  key: "unHighlight",
2739
3136
  value: function unHighlight() {
2740
3137
  this.getChart().unHighlight();
2741
- }
2742
- // returns chart object
3138
+ } // returns chart object
3139
+
2743
3140
  }, {
2744
3141
  key: "getChart",
2745
3142
  value: function getChart() {
2746
3143
  var _a;
3144
+
2747
3145
  return (_a = this.chartRef) === null || _a === void 0 ? void 0 : _a.current;
2748
3146
  }
2749
3147
  }]);
3148
+
2750
3149
  return ChartingApiFunctional;
2751
3150
  }();
3151
+
2752
3152
  exports.ChartingApiFunctional = ChartingApiFunctional;
2753
3153
 
2754
3154
  /***/ }),