@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/LinkGraph.js CHANGED
@@ -138,6 +138,7 @@ Object.defineProperty(exports, "__esModule", {
138
138
  });
139
139
  exports.VizBehavior = void 0;
140
140
  var VizBehavior;
141
+
141
142
  (function (VizBehavior) {
142
143
  /**
143
144
  * Dynamic Options Behavior.
@@ -157,6 +158,7 @@ var VizBehavior;
157
158
  * missing.
158
159
  * @type {string}
159
160
  */
161
+
160
162
  VizBehavior["PLACEHOLDER"] = "placeholder";
161
163
  VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
162
164
  VizBehavior["TRELLIS"] = "trellis";
@@ -208,11 +210,17 @@ module.exports = require("@splunk/visualizations-shared/colorUtils");
208
210
  Object.defineProperty(exports, "__esModule", {
209
211
  value: true
210
212
  });
213
+
211
214
  var React = __webpack_require__(1);
215
+
212
216
  var styled_components_1 = __webpack_require__(4);
217
+
213
218
  var SizeAwareWrapper_1 = __webpack_require__(19);
219
+
214
220
  var style_1 = __webpack_require__(14);
221
+
215
222
  var colorUtils_1 = __webpack_require__(12);
223
+
216
224
  var Item = styled_components_1.default.div.attrs(function (_ref) {
217
225
  var width = _ref.width;
218
226
  return {
@@ -225,11 +233,11 @@ var Item = styled_components_1.default.div.attrs(function (_ref) {
225
233
  componentId: "sc-1yhgpod-0"
226
234
  })(["position:relative;background-color:", "};"], function (props) {
227
235
  return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
228
- });
229
- // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
236
+ }); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
237
+
230
238
  var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
231
239
  var width = _ref2.width,
232
- height = _ref2.height;
240
+ height = _ref2.height;
233
241
  return {
234
242
  style: Object.assign(Object.assign({}, width && {
235
243
  width: (0, style_1.toPx)(width)
@@ -251,11 +259,13 @@ var FixSizeItemContent = styled_components_1.default.div.withConfig({
251
259
  displayName: "FixedSizeContainer__FixSizeItemContent",
252
260
  componentId: "sc-1yhgpod-3"
253
261
  })(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
262
+
254
263
  var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
255
264
  var FixedSizeContainer = function FixedSizeContainer(props) {
256
265
  var width = props.width,
257
- height = props.height,
258
- backgroundColor = props.backgroundColor;
266
+ height = props.height,
267
+ backgroundColor = props.backgroundColor;
268
+
259
269
  if (!height) {
260
270
  return React.createElement(Item, {
261
271
  "data-test": "item",
@@ -263,24 +273,27 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
263
273
  backgroundColor: backgroundColor
264
274
  }, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
265
275
  }
276
+
266
277
  return React.createElement(FixSizeItem, {
267
278
  "data-test": "fix-size-item",
268
- "data-splunk-visualization-version": "26.0.0 - 2f7458907",
279
+ "data-splunk-visualization-version": "26.1.0 - fc8bf8d77",
269
280
  width: width,
270
281
  height: height,
271
282
  backgroundColor: backgroundColor
272
283
  }, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
273
284
  var newWidth = _ref3.width,
274
- newHeight = _ref3.height;
285
+ newHeight = _ref3.height;
275
286
  return React.createElement(Viz, Object.assign({}, props, {
276
287
  width: newWidth,
277
288
  height: newHeight
278
289
  }));
279
290
  })));
280
291
  };
292
+
281
293
  FixedSizeContainer.displayName = 'withFixedSizeContainer';
282
294
  return FixedSizeContainer;
283
295
  };
296
+
284
297
  exports.default = withFixedSizeContainer;
285
298
 
286
299
  /***/ }),
@@ -306,9 +319,10 @@ exports.extendStaticWrapperProps = void 0;
306
319
  * @param {DashboardVizType} props.Wrapper
307
320
  * @param {DashboardVizType} props.Visualization
308
321
  */
322
+
309
323
  var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
310
324
  var Wrapper = _ref.Wrapper,
311
- Visualization = _ref.Visualization;
325
+ Visualization = _ref.Visualization;
312
326
  var extendProperties = ['propTypes', 'defaultProps', 'config'];
313
327
  extendProperties.forEach(function (prop) {
314
328
  if (Visualization[prop]) {
@@ -317,6 +331,7 @@ var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
317
331
  }
318
332
  });
319
333
  };
334
+
320
335
  exports.extendStaticWrapperProps = extendStaticWrapperProps;
321
336
 
322
337
  /***/ }),
@@ -351,24 +366,33 @@ module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
351
366
 
352
367
 
353
368
  var _toConsumableArray = __webpack_require__(8);
369
+
354
370
  var _defineProperty = __webpack_require__(7);
371
+
355
372
  var __rest = this && this.__rest || function (s, e) {
356
373
  var t = {};
374
+
357
375
  for (var p in s) {
358
376
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
359
377
  }
378
+
360
379
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
361
380
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
362
381
  }
363
382
  return t;
364
383
  };
384
+
365
385
  Object.defineProperty(exports, "__esModule", {
366
386
  value: true
367
387
  });
368
388
  exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
389
+
369
390
  var lodash_1 = __webpack_require__(3);
391
+
370
392
  var schemaUtils_1 = __webpack_require__(16);
393
+
371
394
  var VizBehavior_1 = __webpack_require__(6);
395
+
372
396
  var dynamicOptionsDSLType = {
373
397
  type: 'string',
374
398
  pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
@@ -378,20 +402,22 @@ var dynamicOptionsDSLType = {
378
402
  * @param optionsSchema a visualization's options schema
379
403
  * @returns an updated options schema that additionally allows strings starting with > for each option
380
404
  */
405
+
381
406
  function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
382
407
  var enhancedOptionsSchema = {};
383
408
  Object.keys(optionsSchema).forEach(function (key) {
384
409
  var _a = optionsSchema[key],
385
- title = _a.title,
386
- description = _a.description,
387
- readOnly = _a.readOnly,
388
- writeOnly = _a.writeOnly,
389
- examples = _a.examples,
390
- defaultValue = _a.default,
391
- type = _a.type,
392
- properties = _a.properties,
393
- patternProperties = _a.patternProperties,
394
- remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
410
+ title = _a.title,
411
+ description = _a.description,
412
+ readOnly = _a.readOnly,
413
+ writeOnly = _a.writeOnly,
414
+ examples = _a.examples,
415
+ defaultValue = _a.default,
416
+ type = _a.type,
417
+ properties = _a.properties,
418
+ patternProperties = _a.patternProperties,
419
+ remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
420
+
395
421
  var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
396
422
  title: title
397
423
  }), description !== undefined && {
@@ -405,12 +431,14 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
405
431
  }), defaultValue !== undefined && {
406
432
  default: defaultValue
407
433
  });
434
+
408
435
  if (type === 'object') {
409
436
  enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
410
437
  type: type
411
438
  }), properties && {
412
439
  properties: enhanceOptionsSchemaWithDynamicOptions(properties)
413
440
  });
441
+
414
442
  if (patternProperties) {
415
443
  var enhancedPatternProperties = {};
416
444
  Object.keys(patternProperties).forEach(function (opt) {
@@ -428,6 +456,7 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
428
456
  });
429
457
  return enhancedOptionsSchema;
430
458
  }
459
+
431
460
  exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
432
461
  /**
433
462
  * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
@@ -436,11 +465,14 @@ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamic
436
465
  * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
437
466
  * and containing `open: false` for all editor panels in editorConfig
438
467
  */
468
+
439
469
  function enhanceConfig(vizConfig) {
440
470
  var enhancedConfig = Object.assign({}, vizConfig);
471
+
441
472
  if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
442
473
  enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
443
474
  }
475
+
444
476
  enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
445
477
  return Object.assign(Object.assign({}, config), {
446
478
  open: config.open || false
@@ -448,6 +480,7 @@ function enhanceConfig(vizConfig) {
448
480
  });
449
481
  return enhancedConfig;
450
482
  }
483
+
451
484
  exports.enhanceConfig = enhanceConfig;
452
485
  /**
453
486
  * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
@@ -455,6 +488,7 @@ exports.enhanceConfig = enhanceConfig;
455
488
  * @param vizConfig a Visualization Config
456
489
  * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
457
490
  */
491
+
458
492
  function uncollapseEditorConfig(vizConfig) {
459
493
  var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
460
494
  editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
@@ -464,13 +498,16 @@ function uncollapseEditorConfig(vizConfig) {
464
498
  });
465
499
  return editorPanelUncollapsedConfig;
466
500
  }
501
+
467
502
  exports.uncollapseEditorConfig = uncollapseEditorConfig;
503
+
468
504
  function isDynamicOption(option) {
469
505
  return option && typeof option === 'string' && option.trim().startsWith('>') || false;
470
506
  }
471
- exports.isDynamicOption = isDynamicOption;
472
- // private helpers to improve readability of getInitialPreset
507
+
508
+ exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
473
509
  // this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
510
+
474
511
  /**
475
512
  * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
476
513
  * 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
@@ -479,6 +516,7 @@ exports.isDynamicOption = isDynamicOption;
479
516
  *
480
517
  * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
481
518
  */
519
+
482
520
  function hasCompatibleContexts(vizContext, presetContext) {
483
521
  var presetContextKeys = Object.keys(presetContext);
484
522
  return presetContextKeys.every(function (contextKey) {
@@ -488,6 +526,8 @@ function hasCompatibleContexts(vizContext, presetContext) {
488
526
  /**
489
527
  * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
490
528
  */
529
+
530
+
491
531
  function hasCompatibleOptions(vizOptions, presetOptions) {
492
532
  var presetOptionKeys = Object.keys(presetOptions);
493
533
  return presetOptionKeys.every(function (optionKey) {
@@ -502,18 +542,21 @@ function hasCompatibleOptions(vizOptions, presetOptions) {
502
542
  * @param {Object} vizOptions - the current vizOptions definition
503
543
  * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
504
544
  */
545
+
546
+
505
547
  function getInitialPreset(vizContext, vizOptions, presets) {
506
548
  return presets.find(function (preset) {
507
549
  var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
508
550
  var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
509
551
  var presetContextKeys = Object.keys(presetContext);
510
- var presetOptionKeys = Object.keys(presetOptions);
511
- // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
552
+ var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
512
553
  // if not, then the preset is invalid in config.ts
554
+
513
555
  if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
514
556
  return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
515
557
  });
516
558
  }
559
+
517
560
  exports.getInitialPreset = getInitialPreset;
518
561
  /**
519
562
  * generates number precision values for a Select editor
@@ -521,6 +564,7 @@ exports.getInitialPreset = getInitialPreset;
521
564
  * @param {Number} numPrecisionValues - number of integer precision values to generate
522
565
  * @returns {{ label: string; value; string }[]} array of { label, value } tuples
523
566
  */
567
+
524
568
  function generatePrecisionValues(numPrecisionValues) {
525
569
  return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
526
570
  return {
@@ -529,6 +573,7 @@ function generatePrecisionValues(numPrecisionValues) {
529
573
  };
530
574
  });
531
575
  }
576
+
532
577
  exports.generatePrecisionValues = generatePrecisionValues;
533
578
  /**
534
579
  * insert layout in layout array, return a new layout array instead of updating the original
@@ -538,12 +583,15 @@ exports.generatePrecisionValues = generatePrecisionValues;
538
583
  * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
539
584
  * @returns {EditorLayoutConfig[][]} new editor layout with insertion
540
585
  */
586
+
541
587
  var insertLayout = function insertLayout(layout, index) {
542
588
  for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
543
589
  layoutItems[_key - 2] = arguments[_key];
544
590
  }
591
+
545
592
  return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
546
593
  };
594
+
547
595
  exports.insertLayout = insertLayout;
548
596
 
549
597
  /***/ }),
@@ -603,11 +651,17 @@ Object.defineProperty(exports, "__esModule", {
603
651
  value: true
604
652
  });
605
653
  exports.shouldShowIconPlaceholder = void 0;
654
+
606
655
  var React = __webpack_require__(1);
656
+
607
657
  var T = __webpack_require__(0);
658
+
608
659
  var lodash_1 = __webpack_require__(3);
660
+
609
661
  var i18n_1 = __webpack_require__(2);
662
+
610
663
  var Message_1 = __webpack_require__(10);
664
+
611
665
  var FixedSizeContainer_1 = __webpack_require__(13);
612
666
  /**
613
667
  * @method shouldShowIconPlaceholder
@@ -615,6 +669,8 @@ var FixedSizeContainer_1 = __webpack_require__(13);
615
669
  * @param {boolean} loading
616
670
  * @returns {boolean}
617
671
  */
672
+
673
+
618
674
  var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
619
675
  var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
620
676
  var data = (0, lodash_1.get)(dataSources, 'primary.data.columns[0]', undefined);
@@ -623,6 +679,7 @@ var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources)
623
679
  var noFields = fields === undefined;
624
680
  return loading || noData || noFields;
625
681
  };
682
+
626
683
  exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
627
684
  var propTypes = {
628
685
  icon: T.func,
@@ -637,11 +694,13 @@ var propTypes = {
637
694
  * @param {IconPlaceholderProps} props
638
695
  * @returns {React.ReactElement}
639
696
  */
697
+
640
698
  var IconPlaceholder = function IconPlaceholder(props) {
641
699
  var width = props.width,
642
- height = props.height,
643
- icon = props.icon,
644
- iconColor = props.iconColor;
700
+ height = props.height,
701
+ icon = props.icon,
702
+ iconColor = props.iconColor;
703
+
645
704
  if (icon) {
646
705
  return React.createElement(icon, {
647
706
  style: {
@@ -656,6 +715,7 @@ var IconPlaceholder = function IconPlaceholder(props) {
656
715
  height: '50%'
657
716
  });
658
717
  }
718
+
659
719
  return React.createElement(Message_1.default, {
660
720
  width: width,
661
721
  height: height,
@@ -663,6 +723,7 @@ var IconPlaceholder = function IconPlaceholder(props) {
663
723
  message: (0, i18n_1._)('No DataSource Connected')
664
724
  });
665
725
  };
726
+
666
727
  IconPlaceholder.propTypes = propTypes;
667
728
  IconPlaceholder.defaultProps = {
668
729
  width: '100%',
@@ -678,21 +739,27 @@ exports.default = (0, FixedSizeContainer_1.default)(IconPlaceholder);
678
739
 
679
740
 
680
741
  var _defineProperty = __webpack_require__(7);
742
+
681
743
  Object.defineProperty(exports, "__esModule", {
682
744
  value: true
683
745
  });
684
746
  exports.getSortingParams = exports.SortParamsPropTypes = void 0;
747
+
685
748
  var T = __webpack_require__(0);
749
+
686
750
  var lodash_1 = __webpack_require__(3);
687
- var DataSource_1 = __webpack_require__(43);
751
+
752
+ var DataSource_1 = __webpack_require__(34);
753
+
688
754
  exports.SortParamsPropTypes = T.shape({
689
755
  currentSortKey: T.string,
690
756
  currentSortDir: T.oneOf(DataSource_1.validSortDirs),
691
757
  onSort: T.func
692
758
  });
759
+
693
760
  var getSortingParams = function getSortingParams(_ref) {
694
761
  var requestParams = _ref.requestParams,
695
- onRequestParamsChange = _ref.onRequestParamsChange;
762
+ onRequestParamsChange = _ref.onRequestParamsChange;
696
763
  var currentSortKey;
697
764
  var currentSortDir;
698
765
  var nextSortDirMap = {
@@ -701,15 +768,18 @@ var getSortingParams = function getSortingParams(_ref) {
701
768
  none: 'asc'
702
769
  };
703
770
  var onSort;
771
+
704
772
  if (typeof onRequestParamsChange === 'function') {
705
773
  if (requestParams && (0, lodash_1.has)(requestParams, 'sort')) {
706
774
  currentSortKey = Object.keys(requestParams.sort).shift();
707
775
  currentSortDir = requestParams.sort[currentSortKey];
708
- }
709
- // undid memoization since there is a dependency on requestParams, which is a deeply nested object
776
+ } // undid memoization since there is a dependency on requestParams, which is a deeply nested object
777
+
778
+
710
779
  onSort = function onSort(e, _ref2) {
711
780
  var sortKey = _ref2.sortKey,
712
- sortDir = _ref2.sortDir;
781
+ sortDir = _ref2.sortDir;
782
+
713
783
  if (typeof sortKey === 'string') {
714
784
  var nextSortDir = (0, lodash_1.has)(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
715
785
  onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
@@ -721,12 +791,14 @@ var getSortingParams = function getSortingParams(_ref) {
721
791
  }
722
792
  };
723
793
  }
794
+
724
795
  return {
725
796
  currentSortKey: currentSortKey,
726
797
  currentSortDir: currentSortDir,
727
798
  onSort: onSort
728
799
  };
729
800
  };
801
+
730
802
  exports.getSortingParams = getSortingParams;
731
803
 
732
804
  /***/ }),
@@ -736,43 +808,68 @@ exports.getSortingParams = getSortingParams;
736
808
  "use strict";
737
809
 
738
810
 
811
+ Object.defineProperty(exports, "__esModule", {
812
+ value: true
813
+ });
814
+ exports.validOutputModes = exports.validSegmentationModes = exports.validSortDirs = void 0;
815
+ exports.validSortDirs = ['asc', 'desc', 'none'];
816
+ exports.validSegmentationModes = ['none', 'inner'];
817
+ exports.validOutputModes = ['json_cols', 'json'];
818
+
819
+ /***/ }),
820
+ /* 35 */
821
+ /***/ (function(module, exports, __webpack_require__) {
822
+
823
+ "use strict";
824
+
825
+
739
826
  Object.defineProperty(exports, "__esModule", {
740
827
  value: true
741
828
  });
742
829
  exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
830
+
743
831
  var T = __webpack_require__(0);
832
+
744
833
  var lodash_1 = __webpack_require__(3);
834
+
745
835
  exports.PaginatorParamsPropTypes = T.shape({
746
836
  isPaging: T.bool,
747
837
  current: T.number,
748
838
  totalPages: T.number,
749
839
  onChange: T.func
750
840
  });
841
+
751
842
  var getPaginationParams = function getPaginationParams(_ref) {
752
843
  var requestParams = _ref.requestParams,
753
- meta = _ref.meta,
754
- onRequestParamsChange = _ref.onRequestParamsChange;
844
+ meta = _ref.meta,
845
+ onRequestParamsChange = _ref.onRequestParamsChange;
755
846
  var totalCount = meta && meta.totalCount || 0;
756
847
  var offset = requestParams && requestParams.offset || 0;
757
848
  var count = requestParams && requestParams.count;
758
849
  var totalPages = typeof count === 'number' && count > 0 ? Math.ceil(totalCount / count) : 0;
759
850
  var current = typeof count === 'number' && count > 0 ? Math.floor(offset / count) + 1 : 0;
760
851
  var isPaging = totalPages > 1 && typeof onRequestParamsChange === 'function';
852
+
761
853
  var onChangeHandler = function onChangeHandler(e, _ref2) {
762
854
  var page = _ref2.page,
763
- countArg = _ref2.count;
855
+ countArg = _ref2.count;
764
856
  var newParams = (0, lodash_1.cloneDeep)(requestParams);
857
+
765
858
  if (typeof countArg === 'number') {
766
859
  newParams.count = countArg;
767
860
  newParams.offset = 0;
768
861
  }
862
+
769
863
  var pageCount = typeof newParams.count === 'number' ? newParams.count : 10;
864
+
770
865
  if (typeof page === 'number' && page > 0) {
771
866
  newParams.count = pageCount;
772
867
  newParams.offset = (page - 1) * pageCount;
773
868
  }
869
+
774
870
  onRequestParamsChange(newParams);
775
871
  };
872
+
776
873
  return {
777
874
  isPaging: isPaging,
778
875
  current: current,
@@ -780,10 +877,11 @@ var getPaginationParams = function getPaginationParams(_ref) {
780
877
  onChange: typeof onRequestParamsChange === 'function' ? onChangeHandler : lodash_1.noop
781
878
  };
782
879
  };
880
+
783
881
  exports.getPaginationParams = getPaginationParams;
784
882
 
785
883
  /***/ }),
786
- /* 35 */
884
+ /* 36 */
787
885
  /***/ (function(module, exports, __webpack_require__) {
788
886
 
789
887
  "use strict";
@@ -794,6 +892,7 @@ Object.defineProperty(exports, "__esModule", {
794
892
  });
795
893
  exports.VizCategory = void 0;
796
894
  var VizCategory;
895
+
797
896
  (function (VizCategory) {
798
897
  VizCategory["SINGLE_VALUE"] = "Single Value";
799
898
  VizCategory["TRENDS"] = "Trends";
@@ -810,67 +909,96 @@ var VizCategory;
810
909
  })(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
811
910
 
812
911
  /***/ }),
813
- /* 36 */
912
+ /* 37 */
814
913
  /***/ (function(module, exports, __webpack_require__) {
815
914
 
816
915
  "use strict";
817
916
 
818
917
 
819
918
  var _slicedToArray = __webpack_require__(17);
919
+
820
920
  Object.defineProperty(exports, "__esModule", {
821
921
  value: true
822
922
  });
923
+
823
924
  var React = __webpack_require__(1);
925
+
824
926
  var lodash_1 = __webpack_require__(3);
825
- var getSettingsFromThemedProps_1 = __webpack_require__(37);
927
+
928
+ var getSettingsFromThemedProps_1 = __webpack_require__(38);
929
+
826
930
  var Options_1 = __webpack_require__(30);
827
- var SanitizeProps_1 = __webpack_require__(38);
931
+
932
+ var SanitizeProps_1 = __webpack_require__(39);
933
+
828
934
  var TimezoneContext_1 = __webpack_require__(26);
829
- var moment_1 = __webpack_require__(39);
935
+
936
+ var moment_1 = __webpack_require__(40);
937
+
830
938
  var FeatureFlagContext_1 = __webpack_require__(21);
939
+
831
940
  var styled_components_1 = __webpack_require__(4);
941
+
832
942
  var hocUtils_1 = __webpack_require__(27);
943
+
833
944
  var JSONSchemaUtils_1 = __webpack_require__(28);
834
- var async_dynamic_options_evaluator_1 = __webpack_require__(40);
945
+
946
+ var async_dynamic_options_evaluator_1 = __webpack_require__(41);
947
+
835
948
  var id_1 = __webpack_require__(25);
836
- var SplunkVisualization_1 = __webpack_require__(41);
949
+
950
+ var SplunkVisualization_1 = __webpack_require__(42);
951
+
837
952
  var VizBehavior_1 = __webpack_require__(6);
953
+
838
954
  var getSorting_1 = __webpack_require__(33);
839
- var getPagination_1 = __webpack_require__(34);
955
+
956
+ var getPagination_1 = __webpack_require__(35);
957
+
840
958
  var useDeepMemo_1 = __webpack_require__(44);
959
+
841
960
  var MissingPropsMessage_1 = __webpack_require__(45);
961
+
842
962
  var withEditModeCover_1 = __webpack_require__(46);
963
+
843
964
  var withPlaceholder_1 = __webpack_require__(47);
844
965
  /**
845
966
  * hoc that wraps a pure react visualization in a Dashboard visualization
846
967
  * @param {DashboardVizOpts} opts
847
968
  * @returns {HOC}
848
969
  */
970
+
971
+
849
972
  var withDashboardViz = function withDashboardViz(opts) {
850
973
  var ReactViz = opts.ReactViz,
851
- vizConfig = opts.vizConfig,
852
- _opts$computeVizProps = opts.computeVizProps,
853
- computeVizProps = _opts$computeVizProps === void 0 ? function () {} : _opts$computeVizProps,
854
- disableEditModeCover = opts.disableEditModeCover,
855
- useIconPlaceholder = opts.useIconPlaceholder; // sanitizing props before sending them to reactviz.
974
+ vizConfig = opts.vizConfig,
975
+ _opts$computeVizProps = opts.computeVizProps,
976
+ computeVizProps = _opts$computeVizProps === void 0 ? function () {} : _opts$computeVizProps,
977
+ disableEditModeCover = opts.disableEditModeCover,
978
+ useIconPlaceholder = opts.useIconPlaceholder; // sanitizing props before sending them to reactviz.
979
+
856
980
  var SanitizedReactViz = (0, SanitizeProps_1.withSanitizedProps)(ReactViz);
857
981
  var defaultOptions = (0, JSONSchemaUtils_1.pickFieldFromJSONSchema)(vizConfig.optionsSchema, 'default');
982
+
858
983
  var DashboardViz = function DashboardViz(props) {
859
984
  var _a;
985
+
860
986
  var mode = props.mode,
861
- hasEventHandlers = props.hasEventHandlers,
862
- dataSources = props.dataSources,
863
- options = props.options,
864
- _props$context = props.context,
865
- context = _props$context === void 0 ? {} : _props$context,
866
- width = props.width,
867
- height = props.height,
868
- onComputedProps = props.onComputedProps,
869
- onEventTrigger = props.onEventTrigger,
870
- theme = props.theme,
871
- onRequestParamsChange = props.onRequestParamsChange;
987
+ hasEventHandlers = props.hasEventHandlers,
988
+ dataSources = props.dataSources,
989
+ options = props.options,
990
+ _props$context = props.context,
991
+ context = _props$context === void 0 ? {} : _props$context,
992
+ width = props.width,
993
+ height = props.height,
994
+ onComputedProps = props.onComputedProps,
995
+ onEventTrigger = props.onEventTrigger,
996
+ theme = props.theme,
997
+ onRequestParamsChange = props.onRequestParamsChange;
998
+
872
999
  var _React$useContext = React.useContext(TimezoneContext_1.default),
873
- serializedTimezone = _React$useContext.serializedTimezone;
1000
+ serializedTimezone = _React$useContext.serializedTimezone;
1001
+
874
1002
  if (serializedTimezone) {
875
1003
  /*
876
1004
  @splunk/moment currently does not allow us to customize the timezone on a per visualization basis.
@@ -884,38 +1012,51 @@ var withDashboardViz = function withDashboardViz(opts) {
884
1012
  moment_1.default.setDefaultSplunkTimezone(serializedTimezone);
885
1013
  }
886
1014
  }
1015
+
887
1016
  var themeFunc = function themeFunc(themeVar) {
888
1017
  var _a, _b;
1018
+
889
1019
  return (_b = (_a = vizConfig.themes)[themeVar]) === null || _b === void 0 ? void 0 : _b.call(_a, props);
890
1020
  };
1021
+
891
1022
  var bgColorFromTheme = themeFunc('defaultBackgroundColor');
1023
+
892
1024
  var _ref = (0, getSettingsFromThemedProps_1.default)({
893
- theme: theme
894
- }),
895
- currentThemeFamily = _ref.family,
896
- currentThemeColorScheme = _ref.colorScheme,
897
- currentThemeDensity = _ref.density;
1025
+ theme: theme
1026
+ }),
1027
+ currentThemeFamily = _ref.family,
1028
+ currentThemeColorScheme = _ref.colorScheme,
1029
+ currentThemeDensity = _ref.density;
1030
+
898
1031
  var evaluatedOptions = {}; // evaluatedOptions need to be initialized as an empty object
1032
+
899
1033
  var _React$useState = React.useState({}),
900
- _React$useState2 = _slicedToArray(_React$useState, 2),
901
- evaluatedOptionsAsync = _React$useState2[0],
902
- setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
1034
+ _React$useState2 = _slicedToArray(_React$useState, 2),
1035
+ evaluatedOptionsAsync = _React$useState2[0],
1036
+ setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
1037
+
1038
+
903
1039
  var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
1040
+
904
1041
  var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat((0, id_1.createGUID)())),
905
- _React$useState4 = _slicedToArray(_React$useState3, 1),
906
- visualizationID = _React$useState4[0];
1042
+ _React$useState4 = _slicedToArray(_React$useState3, 1),
1043
+ visualizationID = _React$useState4[0];
1044
+
907
1045
  var _React$useState5 = React.useState({}),
908
- _React$useState6 = _slicedToArray(_React$useState5, 2),
909
- dataSourcesInState = _React$useState6[0],
910
- setDataSourcesInState = _React$useState6[1];
1046
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
1047
+ dataSourcesInState = _React$useState6[0],
1048
+ setDataSourcesInState = _React$useState6[1];
1049
+
911
1050
  var _React$useState7 = React.useState(),
912
- _React$useState8 = _slicedToArray(_React$useState7, 2),
913
- dataFramesInState = _React$useState8[0],
914
- setDataFramesInState = _React$useState8[1];
1051
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
1052
+ dataFramesInState = _React$useState8[0],
1053
+ setDataFramesInState = _React$useState8[1];
1054
+
915
1055
  var _React$useState9 = React.useState(Boolean(featureFlagContext === null || featureFlagContext === void 0 ? void 0 : featureFlagContext.visualizations_useWebWorkersForDSL)),
916
- _React$useState10 = _slicedToArray(_React$useState9, 2),
917
- useAsyncEvaluatedOptions = _React$useState10[0],
918
- setUseAsyncEvaluatedOptions = _React$useState10[1];
1056
+ _React$useState10 = _slicedToArray(_React$useState9, 2),
1057
+ useAsyncEvaluatedOptions = _React$useState10[0],
1058
+ setUseAsyncEvaluatedOptions = _React$useState10[1];
1059
+
919
1060
  var isMounted = React.useRef(true);
920
1061
  evaluatedOptions = (0, useDeepMemo_1.useDeepMemo)(function () {
921
1062
  try {
@@ -940,11 +1081,13 @@ var withDashboardViz = function withDashboardViz(opts) {
940
1081
  });
941
1082
  } else {
942
1083
  var dataFrames = dataFramesInState;
1084
+
943
1085
  if (dataSources !== dataSourcesInState) {
944
1086
  setDataSourcesInState(dataSources);
945
1087
  dataFrames = Options_1.Options.dataFrameFromDataSource(dataSources);
946
1088
  setDataFramesInState(dataFrames);
947
1089
  }
1090
+
948
1091
  return Options_1.Options.evaluate({
949
1092
  context: (0, lodash_1.defaultsDeep)({}, context, vizConfig.defaultContext),
950
1093
  options: (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, defaultOptions)
@@ -955,21 +1098,24 @@ var withDashboardViz = function withDashboardViz(opts) {
955
1098
  console.error("unexpected error evaluating options: ".concat(e.message));
956
1099
  return {};
957
1100
  }
1101
+
958
1102
  return {};
959
1103
  }, [currentThemeFamily, currentThemeColorScheme, currentThemeDensity, options, context, dataSources, serializedTimezone, useAsyncEvaluatedOptions]);
960
- var evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync;
961
- // trellis specific backgroundColor update for onComputedProps
1104
+ var evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync; // trellis specific backgroundColor update for onComputedProps
962
1105
  // 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
963
1106
  // onComputedProps api should return back trellisBackgroundColor value for backgroundColor option to support coloring of sibling panels (for eg:- title/ description on UDF side)
1107
+
964
1108
  var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
965
1109
  var clonedEvaluatedOptions = evaluatedOptionsToUse;
1110
+
966
1111
  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) {
967
1112
  clonedEvaluatedOptions = Object.assign(Object.assign({}, evaluatedOptionsToUse), {
968
1113
  backgroundColor: clonedEvaluatedOptions === null || clonedEvaluatedOptions === void 0 ? void 0 : clonedEvaluatedOptions.trellisBackgroundColor
969
1114
  });
970
- }
971
- // useEffect hook needs to be initialized before any early returns
1115
+ } // useEffect hook needs to be initialized before any early returns
972
1116
  // this is in accordance with the order of hook calls being the same on each render https://reactjs.org/docs/hooks-rules.html#explanation
1117
+
1118
+
973
1119
  React.useEffect(function () {
974
1120
  onComputedProps(clonedEvaluatedOptions);
975
1121
  });
@@ -979,44 +1125,49 @@ var withDashboardViz = function withDashboardViz(opts) {
979
1125
  isMounted.current = false;
980
1126
  async_dynamic_options_evaluator_1.default.reset(visualizationID);
981
1127
  }
982
- };
983
- // eslint-disable-next-line react-hooks/exhaustive-deps
984
- }, []);
985
- // present warning message if any required props are missing
1128
+ }; // eslint-disable-next-line react-hooks/exhaustive-deps
1129
+ }, []); // present warning message if any required props are missing
1130
+
986
1131
  var _vizConfig$requiredPr = vizConfig.requiredProps,
987
- requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
988
- supports = vizConfig.supports;
1132
+ requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
1133
+ supports = vizConfig.supports;
989
1134
  var missing = (0, MissingPropsMessage_1.missingKeys)(requiredProps, evaluatedOptionsToUse);
1135
+
990
1136
  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
991
1137
  ) {
992
- return React.createElement(MissingPropsMessage_1.default, {
993
- "data-test": "missing-props-message",
994
- width: width,
995
- height: height,
996
- missingProps: missing,
997
- backgroundColor: bgColorFromTheme
998
- });
999
- }
1000
- // events
1138
+ return React.createElement(MissingPropsMessage_1.default, {
1139
+ "data-test": "missing-props-message",
1140
+ width: width,
1141
+ height: height,
1142
+ missingProps: missing,
1143
+ backgroundColor: bgColorFromTheme
1144
+ });
1145
+ } // events
1146
+
1147
+
1001
1148
  var eventCallbackProps = {};
1149
+
1002
1150
  if (hasEventHandlers && mode === 'view' && vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.EVENTS) > -1) {
1003
1151
  var supportedEvents = vizConfig.events;
1004
1152
  Object.keys(supportedEvents).forEach(function (eventName) {
1005
1153
  var eventCallbackPropName = (0, lodash_1.camelCase)("on.".concat(eventName));
1006
- eventCallbackProps[eventCallbackPropName] = null;
1007
- // todo: refactor single value and single value icon to send payload from viz
1154
+ eventCallbackProps[eventCallbackPropName] = null; // todo: refactor single value and single value icon to send payload from viz
1008
1155
  // then remove these lines
1156
+
1009
1157
  var payloadKeys = supportedEvents[eventName].payloadKeys;
1010
1158
  var payload = {};
1159
+
1011
1160
  if (Array.isArray(payloadKeys) && payloadKeys.length) {
1012
1161
  payloadKeys.forEach(function (p) {
1013
1162
  payload[p] = evaluatedOptionsToUse[p];
1014
1163
  });
1015
1164
  }
1165
+
1016
1166
  eventCallbackProps[eventCallbackPropName] = function (ev) {
1017
1167
  if (ev && ev.payload) {
1018
1168
  payload = ev.payload;
1019
1169
  }
1170
+
1020
1171
  return onEventTrigger({
1021
1172
  originalEvent: ev,
1022
1173
  payload: payload,
@@ -1024,8 +1175,9 @@ var withDashboardViz = function withDashboardViz(opts) {
1024
1175
  });
1025
1176
  };
1026
1177
  });
1027
- }
1028
- // compute pure viz props which are not from options
1178
+ } // compute pure viz props which are not from options
1179
+
1180
+
1029
1181
  var computedVizProps = computeVizProps(Object.assign(Object.assign(Object.assign(Object.assign({}, props), evaluatedOptionsToUse), eventCallbackProps), {
1030
1182
  themeFunc: themeFunc
1031
1183
  }));
@@ -1043,15 +1195,19 @@ var withDashboardViz = function withDashboardViz(opts) {
1043
1195
  * In future, we could automatically detect which all datasources are being used
1044
1196
  * and bind those magically to pagination/sorting behavior.
1045
1197
  */
1198
+
1046
1199
  var dataSourceMetadata = {};
1047
1200
  var OptionKey = 'paginateDataSourceKey';
1048
1201
  var paginateDataSourceKey = (0, lodash_1.has)(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
1202
+
1049
1203
  if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && (0, lodash_1.has)(dataSources, paginateDataSourceKey)) {
1050
1204
  var requestParams = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'requestParams'], {});
1051
1205
  var meta = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'meta'], {});
1206
+
1052
1207
  var handleRequestParamsChange = function handleRequestParamsChange(payload) {
1053
1208
  return onRequestParamsChange(paginateDataSourceKey, payload);
1054
1209
  };
1210
+
1055
1211
  var sortParams = (0, getSorting_1.getSortingParams)({
1056
1212
  requestParams: requestParams,
1057
1213
  meta: meta,
@@ -1066,103 +1222,120 @@ var withDashboardViz = function withDashboardViz(opts) {
1066
1222
  sortParams: sortParams,
1067
1223
  paginatorParams: paginatorParams
1068
1224
  };
1069
- }
1070
- // if were using webworkers and this is the first render we dont want to show a viz with missing data so we return null
1225
+ } // if were using webworkers and this is the first render we dont want to show a viz with missing data so we return null
1226
+
1227
+
1071
1228
  if (useAsyncEvaluatedOptions && Object.keys(evaluatedOptionsToUse).length === 0) {
1072
1229
  return null;
1073
1230
  }
1231
+
1074
1232
  return React.createElement(SanitizedReactViz, Object.assign({
1075
1233
  mode: mode,
1076
1234
  width: width,
1077
1235
  height: height
1078
1236
  }, evaluatedOptionsToUse, computedVizProps, eventCallbackProps, dataSourceMetadata));
1079
1237
  };
1238
+
1080
1239
  DashboardViz.propTypes = Object.assign(Object.assign({}, SplunkVisualization_1.default.propTypes), ReactViz.propTypes);
1081
1240
  DashboardViz.defaultProps = Object.assign(Object.assign(Object.assign({}, SplunkVisualization_1.default.defaultProps), ReactViz.defaultProps), {
1082
1241
  // using withTheme requires component to receive theme prop. In case the consumer did not provide ThemeProvider, a default empty object will prevent warnings.
1083
1242
  theme: {}
1084
- });
1085
- // attach viz config
1086
- DashboardViz.config = vizConfig;
1087
- // @ts-ignore: TODO fix sc upgrade TS issues
1243
+ }); // attach viz config
1244
+
1245
+ DashboardViz.config = vizConfig; // @ts-ignore: TODO fix sc upgrade TS issues
1246
+
1088
1247
  return (0, styled_components_1.withTheme)((0, withPlaceholder_1.default)((0, withEditModeCover_1.default)(DashboardViz, disableEditModeCover), useIconPlaceholder));
1089
1248
  };
1249
+
1090
1250
  exports.default = withDashboardViz;
1091
1251
 
1092
1252
  /***/ }),
1093
- /* 37 */
1253
+ /* 38 */
1094
1254
  /***/ (function(module, exports) {
1095
1255
 
1096
1256
  module.exports = require("@splunk/themes/getSettingsFromThemedProps");
1097
1257
 
1098
1258
  /***/ }),
1099
- /* 38 */
1259
+ /* 39 */
1100
1260
  /***/ (function(module, exports) {
1101
1261
 
1102
1262
  module.exports = require("@splunk/visualizations-shared/SanitizeProps");
1103
1263
 
1104
1264
  /***/ }),
1105
- /* 39 */
1265
+ /* 40 */
1106
1266
  /***/ (function(module, exports) {
1107
1267
 
1108
1268
  module.exports = require("@splunk/moment");
1109
1269
 
1110
1270
  /***/ }),
1111
- /* 40 */
1271
+ /* 41 */
1112
1272
  /***/ (function(module, exports) {
1113
1273
 
1114
1274
  module.exports = require("@splunk/async-dynamic-options-evaluator");
1115
1275
 
1116
1276
  /***/ }),
1117
- /* 41 */
1277
+ /* 42 */
1118
1278
  /***/ (function(module, exports, __webpack_require__) {
1119
1279
 
1120
1280
  "use strict";
1121
1281
 
1122
1282
 
1123
1283
  var _classCallCheck = __webpack_require__(9);
1284
+
1124
1285
  Object.defineProperty(exports, "__esModule", {
1125
1286
  value: true
1126
1287
  });
1127
1288
  exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
1128
1289
  /* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
1290
+
1129
1291
  var T = __webpack_require__(0);
1292
+
1130
1293
  var lodash_1 = __webpack_require__(3);
1131
- var VizActionHandler_1 = __webpack_require__(42);
1132
- // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
1294
+
1295
+ var VizActionHandler_1 = __webpack_require__(43); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
1296
+
1297
+
1133
1298
  exports.INITIAL_WIDTH = 250;
1134
1299
  exports.INITIAL_HEIGHT = 250;
1135
1300
  /**
1136
1301
  * A Splunk visualization
1137
1302
  */
1303
+
1138
1304
  var SplunkVisualization = function SplunkVisualization() {
1139
1305
  _classCallCheck(this, SplunkVisualization);
1140
1306
  };
1307
+
1141
1308
  SplunkVisualization.propTypes = {
1142
1309
  /**
1143
1310
  * display mode
1144
1311
  */
1145
1312
  mode: T.oneOf(['view', 'edit', 'export']).isRequired,
1313
+
1146
1314
  /**
1147
1315
  * width in pixel or string, defaults to 100%
1148
1316
  */
1149
1317
  width: T.oneOfType([T.string, T.number]).isRequired,
1318
+
1150
1319
  /**
1151
1320
  * height in pixel or string
1152
1321
  */
1153
1322
  height: T.oneOfType([T.string, T.number]).isRequired,
1323
+
1154
1324
  /**
1155
1325
  * visualization context used for dynamic option evaluation
1156
1326
  */
1157
1327
  context: T.object,
1328
+
1158
1329
  /**
1159
1330
  * visualization formatting options
1160
1331
  */
1161
1332
  options: T.object,
1333
+
1162
1334
  /**
1163
1335
  * A callback to update formatting options
1164
1336
  */
1165
1337
  onOptionsChange: T.func,
1338
+
1166
1339
  /**
1167
1340
  * datasource state which include data and request params, object key indicate the datasource type.
1168
1341
  */
@@ -1171,6 +1344,7 @@ SplunkVisualization.propTypes = {
1171
1344
  * current request params
1172
1345
  */
1173
1346
  requestParams: T.object,
1347
+
1174
1348
  /**
1175
1349
  * current dataset
1176
1350
  */
@@ -1178,6 +1352,7 @@ SplunkVisualization.propTypes = {
1178
1352
  fields: T.array,
1179
1353
  columns: T.array
1180
1354
  }),
1355
+
1181
1356
  /**
1182
1357
  * error
1183
1358
  */
@@ -1185,29 +1360,35 @@ SplunkVisualization.propTypes = {
1185
1360
  level: T.string,
1186
1361
  message: T.string
1187
1362
  }),
1363
+
1188
1364
  /**
1189
1365
  * meta data that came with the dataset
1190
1366
  */
1191
1367
  meta: T.object
1192
1368
  })),
1369
+
1193
1370
  /**
1194
1371
  * A callback to trigger event
1195
1372
  */
1196
1373
  onEventTrigger: T.func,
1374
+
1197
1375
  /**
1198
1376
  * Inform viz if there are handlers listening to events
1199
1377
  */
1200
1378
  hasEventHandlers: T.bool,
1379
+
1201
1380
  /**
1202
1381
  * A callback to communicate computed props to a consumer
1203
1382
  */
1204
1383
  onComputedProps: T.func,
1384
+
1205
1385
  /**
1206
1386
  * A callback to obtain visualization api
1207
1387
  */
1208
1388
  vizActionHandlerRef: T.func,
1209
1389
  loading: T.bool,
1210
1390
  theme: T.object,
1391
+
1211
1392
  /**
1212
1393
  * A callback to request new data with updated request params
1213
1394
  */
@@ -1216,6 +1397,7 @@ SplunkVisualization.propTypes = {
1216
1397
  /**
1217
1398
  *
1218
1399
  */
1400
+
1219
1401
  SplunkVisualization.defaultProps = {
1220
1402
  // BaseVisualization in dashboard-visualizations uses 100% for width but 250 for height
1221
1403
  width: '100%',
@@ -1243,26 +1425,29 @@ SplunkVisualization.defaultProps = {
1243
1425
  exports.default = SplunkVisualization;
1244
1426
 
1245
1427
  /***/ }),
1246
- /* 42 */
1428
+ /* 43 */
1247
1429
  /***/ (function(module, exports, __webpack_require__) {
1248
1430
 
1249
1431
  "use strict";
1250
1432
 
1251
1433
 
1252
1434
  var _classCallCheck = __webpack_require__(9);
1435
+
1253
1436
  var _createClass = __webpack_require__(18);
1437
+
1254
1438
  Object.defineProperty(exports, "__esModule", {
1255
1439
  value: true
1256
1440
  });
1257
1441
  exports.DefaultVizActionHandler = void 0;
1442
+
1258
1443
  var DefaultVizActionHandler = /*#__PURE__*/function () {
1259
1444
  function DefaultVizActionHandler() {
1260
1445
  _classCallCheck(this, DefaultVizActionHandler);
1261
1446
  }
1447
+
1262
1448
  _createClass(DefaultVizActionHandler, [{
1263
1449
  key: "focus",
1264
- value: function focus() {
1265
- // noop
1450
+ value: function focus() {// noop
1266
1451
  }
1267
1452
  }, {
1268
1453
  key: "snapshot",
@@ -1270,22 +1455,11 @@ var DefaultVizActionHandler = /*#__PURE__*/function () {
1270
1455
  return null; // noop
1271
1456
  }
1272
1457
  }]);
1458
+
1273
1459
  return DefaultVizActionHandler;
1274
1460
  }();
1275
- exports.DefaultVizActionHandler = DefaultVizActionHandler;
1276
-
1277
- /***/ }),
1278
- /* 43 */
1279
- /***/ (function(module, exports, __webpack_require__) {
1280
1461
 
1281
- "use strict";
1282
-
1283
-
1284
- Object.defineProperty(exports, "__esModule", {
1285
- value: true
1286
- });
1287
- exports.validSortDirs = void 0;
1288
- exports.validSortDirs = ['asc', 'desc', 'none'];
1462
+ exports.DefaultVizActionHandler = DefaultVizActionHandler;
1289
1463
 
1290
1464
  /***/ }),
1291
1465
  /* 44 */
@@ -1298,7 +1472,9 @@ Object.defineProperty(exports, "__esModule", {
1298
1472
  value: true
1299
1473
  });
1300
1474
  exports.useDeepMemo = void 0;
1475
+
1301
1476
  var react_1 = __webpack_require__(1);
1477
+
1302
1478
  var lodash_1 = __webpack_require__(3);
1303
1479
  /**
1304
1480
  * This hook evaluates and stores the result of a passed function and only
@@ -1313,16 +1489,21 @@ var lodash_1 = __webpack_require__(3);
1313
1489
  * @param fn the function to be executed and
1314
1490
  * @param dependencies an array of dependencies
1315
1491
  */
1492
+
1493
+
1316
1494
  var useDeepMemo = function useDeepMemo(fn, dependencies) {
1317
1495
  var ref = (0, react_1.useRef)();
1496
+
1318
1497
  if (!ref.current || !(0, lodash_1.isEqual)(dependencies, ref.current.dependencies)) {
1319
1498
  ref.current = {
1320
1499
  dependencies: dependencies,
1321
1500
  value: fn()
1322
1501
  };
1323
1502
  }
1503
+
1324
1504
  return ref.current.value;
1325
1505
  };
1506
+
1326
1507
  exports.useDeepMemo = useDeepMemo;
1327
1508
 
1328
1509
  /***/ }),
@@ -1336,19 +1517,27 @@ Object.defineProperty(exports, "__esModule", {
1336
1517
  value: true
1337
1518
  });
1338
1519
  exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
1520
+
1339
1521
  var React = __webpack_require__(1);
1522
+
1340
1523
  var T = __webpack_require__(0);
1524
+
1341
1525
  var i18n_1 = __webpack_require__(2);
1526
+
1342
1527
  var Message_1 = __webpack_require__(10);
1528
+
1343
1529
  var FixedSizeContainer_1 = __webpack_require__(13);
1344
1530
  /**
1345
1531
  * @method isMissing
1346
1532
  * @param {any} v
1347
1533
  * @returns {boolean} true if the input value === null or undefined
1348
1534
  */
1535
+
1536
+
1349
1537
  var isMissing = function isMissing(v) {
1350
1538
  return v === null || v === undefined;
1351
1539
  };
1540
+
1352
1541
  exports.isMissing = isMissing;
1353
1542
  /**
1354
1543
  * @method misskingKeys
@@ -1356,11 +1545,13 @@ exports.isMissing = isMissing;
1356
1545
  * @param {object} target
1357
1546
  * @returns {string[]} the keys of missing required props
1358
1547
  */
1548
+
1359
1549
  var missingKeys = function missingKeys(keys, target) {
1360
1550
  return keys.filter(function (k) {
1361
1551
  return (0, exports.isMissing)(target[k]);
1362
1552
  });
1363
1553
  };
1554
+
1364
1555
  exports.missingKeys = missingKeys;
1365
1556
  var propTypes = {
1366
1557
  width: T.oneOfType([T.string, T.number]),
@@ -1374,10 +1565,11 @@ var propTypes = {
1374
1565
  * @param {MissingPropsProps} props
1375
1566
  * @returns {React.ReactElement}
1376
1567
  */
1568
+
1377
1569
  var MissingPropsMessage = function MissingPropsMessage(props) {
1378
1570
  var width = props.width,
1379
- height = props.height,
1380
- missingProps = props.missingProps;
1571
+ height = props.height,
1572
+ missingProps = props.missingProps;
1381
1573
  return React.createElement(Message_1.default, {
1382
1574
  "data-test": "message",
1383
1575
  width: width,
@@ -1385,6 +1577,7 @@ var MissingPropsMessage = function MissingPropsMessage(props) {
1385
1577
  message: (0, i18n_1._)("Missing property: ".concat(missingProps.join(', ')))
1386
1578
  });
1387
1579
  };
1580
+
1388
1581
  exports.MissingPropsMessage = MissingPropsMessage;
1389
1582
  exports.MissingPropsMessage.propTypes = propTypes;
1390
1583
  exports.MissingPropsMessage.defaultProps = {
@@ -1403,15 +1596,19 @@ exports.default = (0, FixedSizeContainer_1.default)(exports.MissingPropsMessage)
1403
1596
  Object.defineProperty(exports, "__esModule", {
1404
1597
  value: true
1405
1598
  });
1599
+
1406
1600
  var React = __webpack_require__(1);
1601
+
1407
1602
  var styled_components_1 = __webpack_require__(4);
1603
+
1408
1604
  var hocUtils_1 = __webpack_require__(15);
1605
+
1409
1606
  var Cover = styled_components_1.default.div.withConfig({
1410
1607
  displayName: "withEditModeCover__Cover",
1411
1608
  componentId: "sc-1gsbnxb-0"
1412
1609
  })(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
1413
1610
  var Blocker = styled_components_1.default.div.attrs({
1414
- 'data-splunk-visualization-version': "26.0.0 - 2f7458907"
1611
+ 'data-splunk-visualization-version': "26.1.0 - fc8bf8d77"
1415
1612
  }).withConfig({
1416
1613
  displayName: "withEditModeCover__Blocker",
1417
1614
  componentId: "sc-1gsbnxb-1"
@@ -1422,6 +1619,7 @@ var Blocker = styled_components_1.default.div.attrs({
1422
1619
  * @param {ExtendedDashViz} Visualization
1423
1620
  * @returns {ExtendedDashViz} Wrapper
1424
1621
  */
1622
+
1425
1623
  var withEditModeCover = function withEditModeCover(Visualization, disableEditModeCover) {
1426
1624
  var Wrapper = function Wrapper(props) {
1427
1625
  var mode = props.mode;
@@ -1430,12 +1628,14 @@ var withEditModeCover = function withEditModeCover(Visualization, disableEditMod
1430
1628
  "data-test": "edit-mode-cover"
1431
1629
  }));
1432
1630
  };
1631
+
1433
1632
  (0, hocUtils_1.extendStaticWrapperProps)({
1434
1633
  Wrapper: Wrapper,
1435
1634
  Visualization: Visualization
1436
1635
  });
1437
1636
  return Wrapper;
1438
1637
  };
1638
+
1439
1639
  exports.default = withEditModeCover;
1440
1640
 
1441
1641
  /***/ }),
@@ -1448,27 +1648,37 @@ exports.default = withEditModeCover;
1448
1648
  Object.defineProperty(exports, "__esModule", {
1449
1649
  value: true
1450
1650
  });
1651
+
1451
1652
  var React = __webpack_require__(1);
1653
+
1452
1654
  var colorUtils_1 = __webpack_require__(12);
1655
+
1453
1656
  var variables_1 = __webpack_require__(11);
1657
+
1454
1658
  var IconPlaceholder_1 = __webpack_require__(32);
1659
+
1455
1660
  var VizBehavior_1 = __webpack_require__(6);
1661
+
1456
1662
  var hocUtils_1 = __webpack_require__(15);
1663
+
1457
1664
  var withPlaceholder = function withPlaceholder(Visualization) {
1458
1665
  var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
1459
1666
  var config = Visualization.config;
1460
1667
  var themes = config.themes;
1668
+
1461
1669
  var Wrapper = function Wrapper(props) {
1462
1670
  var _a, _b;
1671
+
1463
1672
  var dataSources = props.dataSources,
1464
- loading = props.loading,
1465
- options = props.options,
1466
- height = props.height,
1467
- width = props.width;
1673
+ loading = props.loading,
1674
+ options = props.options,
1675
+ height = props.height,
1676
+ width = props.width;
1468
1677
  var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
1469
1678
  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);
1470
1679
  var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
1471
1680
  var iconColor = variables_1.default.contentColorActive(props);
1681
+
1472
1682
  if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
1473
1683
  return React.createElement(IconPlaceholder_1.default, {
1474
1684
  "data-test": "icon-placeholder",
@@ -1479,14 +1689,17 @@ var withPlaceholder = function withPlaceholder(Visualization) {
1479
1689
  iconColor: iconColor
1480
1690
  });
1481
1691
  }
1692
+
1482
1693
  return React.createElement(Visualization, Object.assign({}, props));
1483
1694
  };
1695
+
1484
1696
  (0, hocUtils_1.extendStaticWrapperProps)({
1485
1697
  Wrapper: Wrapper,
1486
1698
  Visualization: Visualization
1487
1699
  });
1488
1700
  return Wrapper;
1489
1701
  };
1702
+
1490
1703
  exports.default = withPlaceholder;
1491
1704
 
1492
1705
  /***/ }),
@@ -1633,33 +1846,40 @@ module.exports = require("@splunk/react-ui/Button");
1633
1846
 
1634
1847
 
1635
1848
  var _toConsumableArray = __webpack_require__(8);
1849
+
1636
1850
  Object.defineProperty(exports, "__esModule", {
1637
1851
  value: true
1638
1852
  });
1639
1853
  exports.getSecondaryColumnByField = exports.sortGraphColumn = exports.getNodesToHighlight = exports.createLinkGraphFromTable = exports.OFFSET_Y = exports.hashString = void 0;
1854
+
1640
1855
  var lodash_1 = __webpack_require__(3);
1856
+
1641
1857
  var hashString = function hashString() {
1642
1858
  var stringIn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
1643
1859
  var returnStringArray = stringIn.toString().split('').map(function (v) {
1644
1860
  return v.charCodeAt(0);
1645
1861
  });
1862
+
1646
1863
  if (returnStringArray.length === 0) {
1647
1864
  return '-1';
1648
1865
  }
1649
- var returnValue =
1650
- // eslint-disable-next-line no-bitwise
1866
+
1867
+ var returnValue = // eslint-disable-next-line no-bitwise
1651
1868
  returnStringArray.reduce(function (a, v) {
1652
1869
  return a + ((a << 7) + (a << 3)) ^ v;
1653
1870
  }).toString(16);
1654
1871
  return returnValue;
1655
1872
  };
1873
+
1656
1874
  exports.hashString = hashString;
1875
+
1657
1876
  var createNode = function createNode(graphDataModelIn, nodesIn, column, field, fieldIndex, nodeWidth, nodeHeight, nodeSpacingX, nodeSpacingY, shouldAddToGraphDataModel) {
1658
1877
  var nodes = nodesIn;
1659
1878
  var graphDataModel = graphDataModelIn;
1660
1879
  var fieldHash = (0, exports.hashString)(field);
1661
1880
  var columnHash = (0, exports.hashString)(column);
1662
1881
  var node = nodes[columnHash];
1882
+
1663
1883
  if (!nodes[columnHash]) {
1664
1884
  node = {
1665
1885
  x: 0,
@@ -1678,10 +1898,13 @@ var createNode = function createNode(graphDataModelIn, nodesIn, column, field, f
1678
1898
  } else {
1679
1899
  node.data.count += 1;
1680
1900
  }
1901
+
1681
1902
  if (column.toString().length === 0) {
1682
1903
  node.data.isHidden = true;
1683
1904
  }
1905
+
1684
1906
  var key = "".concat(fieldIndex, "-").concat(fieldHash, "-").concat(columnHash);
1907
+
1685
1908
  if (shouldAddToGraphDataModel && !graphDataModel.nodes[key]) {
1686
1909
  nodes[columnHash] = node;
1687
1910
  graphDataModel.nodes[key] = node;
@@ -1691,17 +1914,21 @@ var createNode = function createNode(graphDataModelIn, nodesIn, column, field, f
1691
1914
  node.h = nodeHeight;
1692
1915
  node.yIndex = Object.keys(nodes).length - 1;
1693
1916
  }
1917
+
1694
1918
  return node;
1695
1919
  };
1920
+
1696
1921
  var createEdge = function createEdge(graphDataModelIn, nodesIn, edgesIn, nodeIn, columns, column, columnIndex, fields, field, fieldIndex, shouldAddToGraphDataModel) {
1697
1922
  if (!shouldAddToGraphDataModel) {
1698
1923
  return;
1699
1924
  }
1925
+
1700
1926
  var node = nodeIn;
1701
1927
  var edges = edgesIn;
1702
1928
  var fieldHash = (0, exports.hashString)(field);
1703
1929
  var columnHash = (0, exports.hashString)(column);
1704
1930
  var graphDataModel = graphDataModelIn;
1931
+
1705
1932
  if (columns[fieldIndex + 1]) {
1706
1933
  var sourceNode = "".concat(fieldIndex, "-").concat(fieldHash, "-").concat(columnHash);
1707
1934
  var nextColumnOverContent = columns[fieldIndex + 1][columnIndex];
@@ -1713,13 +1940,16 @@ var createEdge = function createEdge(graphDataModelIn, nodesIn, edgesIn, nodeIn,
1713
1940
  node.data.outs["".concat(columnHash, "-").concat((0, exports.hashString)(columns[fieldIndex + 1][columnIndex]))] = edge;
1714
1941
  edges["".concat(edge.sourceNode, "-").concat(edge.targetNode)] = edge;
1715
1942
  }
1943
+
1716
1944
  var fieldToUpdate = graphDataModel.fields.find(function (fieldInQuestion) {
1717
1945
  return (0, exports.hashString)(fieldInQuestion.value) === fieldHash;
1718
1946
  });
1947
+
1719
1948
  if (fieldToUpdate) {
1720
1949
  fieldToUpdate.count = Object.keys(nodesIn).length;
1721
1950
  }
1722
1951
  };
1952
+
1723
1953
  exports.OFFSET_Y = 35;
1724
1954
  /**
1725
1955
  *
@@ -1740,6 +1970,7 @@ exports.OFFSET_Y = 35;
1740
1970
  * look to the right one column, create an edge
1741
1971
  * look to the left one column, create an edge
1742
1972
  */
1973
+
1743
1974
  var createLinkGraphFromTable = function createLinkGraphFromTable(fieldsIn, columnsIn, nodeWidth, nodeHeight, nodeSpacingX, nodeSpacingY, resultLimit, fieldOrder) {
1744
1975
  var nodes = {};
1745
1976
  var edges = {};
@@ -1748,19 +1979,23 @@ var createLinkGraphFromTable = function createLinkGraphFromTable(fieldsIn, colum
1748
1979
  edges: [],
1749
1980
  fields: []
1750
1981
  };
1982
+
1751
1983
  if (!fieldsIn || !Array.isArray(fieldsIn) || !columnsIn || !Array.isArray(columnsIn)) {
1752
1984
  return graphDataModel;
1753
1985
  }
1986
+
1754
1987
  var fields = fieldsIn;
1755
1988
  var columns = columnsIn;
1989
+
1756
1990
  if (fieldOrder.length) {
1757
1991
  fields = fieldOrder;
1758
1992
  columns = [];
1759
1993
  fields.forEach(function (fieldIn, fieldIndex) {
1760
1994
  columns[fieldIndex] = columnsIn[fieldsIn.indexOf(fieldIn)];
1761
1995
  });
1762
- }
1763
- // eslint-disable-next-line consistent-return
1996
+ } // eslint-disable-next-line consistent-return
1997
+
1998
+
1764
1999
  fields.forEach(function (fieldIn, fieldIndex) {
1765
2000
  var field = (0, exports.hashString)(fieldIn);
1766
2001
  nodes[field] = {
@@ -1770,9 +2005,11 @@ var createLinkGraphFromTable = function createLinkGraphFromTable(fieldsIn, colum
1770
2005
  count: 0,
1771
2006
  value: fieldIn
1772
2007
  });
2008
+
1773
2009
  if (!columns[fieldIndex]) {
1774
2010
  return graphDataModel;
1775
2011
  }
2012
+
1776
2013
  columns[fieldIndex].forEach(function (columnIn, columnIndex) {
1777
2014
  var shouldAddToGraphDataModel = Object.keys(nodes[field].nodes).length < resultLimit;
1778
2015
  var node = createNode(graphDataModel, nodes[field].nodes, columnIn, fieldIn, fieldIndex, nodeWidth, nodeHeight, nodeSpacingX, nodeSpacingY, shouldAddToGraphDataModel);
@@ -1780,15 +2017,16 @@ var createLinkGraphFromTable = function createLinkGraphFromTable(fieldsIn, colum
1780
2017
  });
1781
2018
  });
1782
2019
  graphDataModel.edges = Object.values(edges);
1783
- graphDataModel.columns = columns;
1784
- // hide all edges that go to or from a hidden node
2020
+ graphDataModel.columns = columns; // hide all edges that go to or from a hidden node
2021
+
1785
2022
  var edgeTemp;
1786
2023
  graphDataModel.edges.forEach(function (edge) {
1787
2024
  var _a, _b, _c, _d;
2025
+
1788
2026
  if (((_b = (_a = graphDataModel.nodes[edge.sourceNode]) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.isHidden) || ((_d = (_c = graphDataModel.nodes[edge.targetNode]) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.isHidden)) {
1789
2027
  edgeTemp = edge;
1790
- edgeTemp.isHidden = true;
1791
- // show all paths from hidden nodes across the real data
2028
+ edgeTemp.isHidden = true; // show all paths from hidden nodes across the real data
2029
+
1792
2030
  getAllPathsFromNodeID(graphDataModel, graphDataModel.nodes[edge.sourceNode]).edges.forEach(function (edgeToShowTemp) {
1793
2031
  var edgeToShow = edgeToShowTemp;
1794
2032
  edgeToShow.isHidden = false;
@@ -1797,6 +2035,7 @@ var createLinkGraphFromTable = function createLinkGraphFromTable(fieldsIn, colum
1797
2035
  });
1798
2036
  return graphDataModel;
1799
2037
  };
2038
+
1800
2039
  exports.createLinkGraphFromTable = createLinkGraphFromTable;
1801
2040
  /* getAllPathsFromNodeID gets paths from a node via the data and not the graph
1802
2041
 
@@ -1811,33 +2050,40 @@ a, , c
1811
2050
 
1812
2051
  getAllPathsFromNodeID(graph, a) would return nodes a,b,'',c and edges a-b, b-c, a-'', ''-c
1813
2052
  */
2053
+
1814
2054
  var getAllPathsFromNodeID = function getAllPathsFromNodeID(graphDataModel, node) {
1815
2055
  var newEdges = [];
1816
2056
  var nodes = [];
2057
+
1817
2058
  if (!node) {
1818
2059
  return {
1819
2060
  nodes: [],
1820
2061
  edges: []
1821
2062
  };
1822
2063
  }
2064
+
1823
2065
  graphDataModel.columns[node.data.fieldIndex].forEach(function (value, index) {
1824
2066
  if (value === node.data.value) {
1825
2067
  var row = graphDataModel.columns.map(function (column) {
1826
2068
  return column[index];
1827
- });
1828
- // remove blank spaces from the start of the array
2069
+ }); // remove blank spaces from the start of the array
2070
+
1829
2071
  var offset = 0;
2072
+
1830
2073
  while (row[0] === '') {
1831
2074
  row.shift();
1832
2075
  offset += 1;
1833
- }
1834
- // remove blank spaces from the end of the array
2076
+ } // remove blank spaces from the end of the array
2077
+
2078
+
1835
2079
  while (row[row.length - 1] === '') {
1836
2080
  row.pop();
1837
2081
  }
2082
+
1838
2083
  for (var i = 0; i < row.length - 1; i += 1) {
1839
2084
  if (graphDataModel.fields[i + 1]) {
1840
2085
  var fieldIndexStart = offset + i; // this is field.index not i
2086
+
1841
2087
  var fieldHashStart = (0, exports.hashString)(graphDataModel.fields[offset + i].value);
1842
2088
  var columnHashStart = (0, exports.hashString)(row[i]);
1843
2089
  var fieldIndexEnd = offset + i + 1;
@@ -1866,6 +2112,7 @@ var getAllPathsFromNodeID = function getAllPathsFromNodeID(graphDataModel, node)
1866
2112
  edges: edges
1867
2113
  };
1868
2114
  };
2115
+
1869
2116
  var getNodesToHighlight = function getNodesToHighlight(graph, sourceNodeID) {
1870
2117
  var paths = getAllPathsFromNodeID(graph, graph.nodes[sourceNodeID]);
1871
2118
  var newEdges = paths.edges.map(function (edge) {
@@ -1876,8 +2123,9 @@ var getNodesToHighlight = function getNodesToHighlight(graph, sourceNodeID) {
1876
2123
  edges: newEdges
1877
2124
  };
1878
2125
  };
1879
- exports.getNodesToHighlight = getNodesToHighlight;
1880
- // TODO: write tests once all sorting options are supported
2126
+
2127
+ exports.getNodesToHighlight = getNodesToHighlight; // TODO: write tests once all sorting options are supported
2128
+
1881
2129
  var sortGraphColumn = function sortGraphColumn(graph, field, sortKey, nodeHeight, nodeSpacingY) {
1882
2130
  var nodesToSort = Object.values(graph.nodes).filter(function (node) {
1883
2131
  return node.data.field === field;
@@ -1885,19 +2133,24 @@ var sortGraphColumn = function sortGraphColumn(graph, field, sortKey, nodeHeight
1885
2133
  var nodes = (0, lodash_1.sortBy)(nodesToSort, function (node) {
1886
2134
  return node.data.value;
1887
2135
  });
2136
+
1888
2137
  if (sortKey === 'Z-A') {
1889
2138
  nodes.reverse();
1890
2139
  }
2140
+
1891
2141
  nodes.forEach(function (node, index) {
1892
2142
  var currentNode = node;
1893
2143
  currentNode.y = index * nodeHeight + index * nodeSpacingY + exports.OFFSET_Y;
1894
2144
  });
1895
2145
  };
2146
+
1896
2147
  exports.sortGraphColumn = sortGraphColumn;
2148
+
1897
2149
  var getSecondaryColumnByField = function getSecondaryColumnByField(field, metadataFields, metadataColumns) {
1898
2150
  if (!metadataFields || !metadataColumns) {
1899
2151
  return {};
1900
2152
  }
2153
+
1901
2154
  var fieldIndex = metadataFields.findIndex(function (fieldIn) {
1902
2155
  return fieldIn.name === 'node_value';
1903
2156
  });
@@ -1908,6 +2161,7 @@ var getSecondaryColumnByField = function getSecondaryColumnByField(field, metada
1908
2161
  });
1909
2162
  return returnObject;
1910
2163
  };
2164
+
1911
2165
  exports.getSecondaryColumnByField = getSecondaryColumnByField;
1912
2166
 
1913
2167
  /***/ }),
@@ -1950,50 +2204,66 @@ module.exports = require("@splunk/react-icons/enterprise/Clear");
1950
2204
 
1951
2205
  var __rest = this && this.__rest || function (s, e) {
1952
2206
  var t = {};
2207
+
1953
2208
  for (var p in s) {
1954
2209
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
1955
2210
  }
2211
+
1956
2212
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1957
2213
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
1958
2214
  }
1959
2215
  return t;
1960
2216
  };
2217
+
1961
2218
  Object.defineProperty(exports, "__esModule", {
1962
2219
  value: true
1963
2220
  });
1964
2221
  exports.PureLinkGraph = exports.LinkGraph = exports.config = exports.themes = exports.computeVizProps = exports.showPlaceHolderIcon = void 0;
2222
+
1965
2223
  var lodash_1 = __webpack_require__(3);
2224
+
1966
2225
  var dataSourceUtils_1 = __webpack_require__(97);
1967
- var withDashboardViz_1 = __webpack_require__(36);
2226
+
2227
+ var withDashboardViz_1 = __webpack_require__(37);
2228
+
1968
2229
  var PureLinkGraph_1 = __webpack_require__(227);
2230
+
1969
2231
  exports.PureLinkGraph = PureLinkGraph_1.default;
2232
+
1970
2233
  var config_1 = __webpack_require__(409);
2234
+
1971
2235
  exports.config = config_1.default;
1972
2236
  /**
1973
2237
  * @method showPlaceHolderIcon
1974
2238
  * @param {Object} dataSources
1975
2239
  * @returns {Boolean} return true if loading, error, non existent state or without columns in dataSources
1976
2240
  */
2241
+
1977
2242
  var showPlaceHolderIcon = function showPlaceHolderIcon(dataSources) {
1978
2243
  var columns = (0, lodash_1.get)(dataSources, 'primary.data.columns', undefined);
1979
2244
  var noColumns = columns === undefined;
1980
2245
  var dataSourceState = (0, dataSourceUtils_1.getDataSourceStateInfo)(dataSources);
1981
2246
  return dataSourceState === dataSourceUtils_1.DataSourceState.ERROR || dataSourceState === dataSourceUtils_1.DataSourceState.LOADING || dataSourceState === dataSourceUtils_1.DataSourceState.NONEXISTENT || noColumns;
1982
2247
  };
2248
+
1983
2249
  exports.showPlaceHolderIcon = showPlaceHolderIcon;
2250
+
1984
2251
  var computeVizProps = function computeVizProps(_a) {
1985
2252
  var _b, _c, _d, _e, _f, _g;
2253
+
1986
2254
  var themeFunc = _a.themeFunc,
1987
- props = __rest(_a, ["themeFunc"]);
2255
+ props = __rest(_a, ["themeFunc"]);
2256
+
1988
2257
  var themeColorVariables = ['defaultBackgroundColor', 'defaultLinkColor', 'defaultNodeColor'];
1989
2258
  var themeColors = {};
1990
2259
  themeColorVariables.forEach(function (variable) {
1991
2260
  themeColors[variable] = themeFunc(variable);
1992
2261
  });
2262
+
1993
2263
  if (props.dataSources) {
1994
2264
  var _props$dataSources$pr = props.dataSources.primary.data,
1995
- fields = _props$dataSources$pr.fields,
1996
- columns = _props$dataSources$pr.columns;
2265
+ fields = _props$dataSources$pr.fields,
2266
+ columns = _props$dataSources$pr.columns;
1997
2267
  var metadataFields = (_d = (_c = (_b = props === null || props === void 0 ? void 0 : props.dataSources) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.fields;
1998
2268
  var metadataColumns = (_g = (_f = (_e = props === null || props === void 0 ? void 0 : props.dataSources) === null || _e === void 0 ? void 0 : _e.metadata) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.columns;
1999
2269
  return Object.assign({
@@ -2005,8 +2275,10 @@ var computeVizProps = function computeVizProps(_a) {
2005
2275
  columns: columns
2006
2276
  }, themeColors);
2007
2277
  }
2278
+
2008
2279
  return themeColors;
2009
2280
  };
2281
+
2010
2282
  exports.computeVizProps = computeVizProps;
2011
2283
  var LinkGraph = (0, withDashboardViz_1.default)({
2012
2284
  ReactViz: PureLinkGraph_1.default,
@@ -2032,9 +2304,13 @@ Object.defineProperty(exports, "__esModule", {
2032
2304
  value: true
2033
2305
  });
2034
2306
  exports.StyledEdgesPath = exports.StyledViewport = void 0;
2307
+
2035
2308
  var styled_components_1 = __webpack_require__(4);
2309
+
2036
2310
  var pick_1 = __webpack_require__(23);
2311
+
2037
2312
  var variables_1 = __webpack_require__(11);
2313
+
2038
2314
  exports.StyledViewport = styled_components_1.default.div.withConfig({
2039
2315
  displayName: "GraphStyles__StyledViewport",
2040
2316
  componentId: "sc-5hdhcf-0"
@@ -2168,6 +2444,7 @@ exports.StyledEdgesPath = styled_components_1.default.path.withConfig({
2168
2444
  var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
2169
2445
  if (k2 === undefined) k2 = k;
2170
2446
  var desc = Object.getOwnPropertyDescriptor(m, k);
2447
+
2171
2448
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2172
2449
  desc = {
2173
2450
  enumerable: true,
@@ -2176,22 +2453,28 @@ var __createBinding = this && this.__createBinding || (Object.create ? function
2176
2453
  }
2177
2454
  };
2178
2455
  }
2456
+
2179
2457
  Object.defineProperty(o, k2, desc);
2180
2458
  } : function (o, m, k, k2) {
2181
2459
  if (k2 === undefined) k2 = k;
2182
2460
  o[k2] = m[k];
2183
2461
  });
2462
+
2184
2463
  var __exportStar = this && this.__exportStar || function (m, exports) {
2185
2464
  for (var p in m) {
2186
2465
  if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2187
2466
  }
2188
2467
  };
2468
+
2189
2469
  Object.defineProperty(exports, "__esModule", {
2190
2470
  value: true
2191
2471
  });
2192
2472
  exports.default = void 0;
2473
+
2193
2474
  __exportStar(__webpack_require__(156), exports);
2475
+
2194
2476
  var LinkGraph_1 = __webpack_require__(156);
2477
+
2195
2478
  Object.defineProperty(exports, "default", {
2196
2479
  enumerable: true,
2197
2480
  get: function get() {
@@ -2207,19 +2490,30 @@ Object.defineProperty(exports, "default", {
2207
2490
 
2208
2491
 
2209
2492
  var _slicedToArray = __webpack_require__(17);
2493
+
2210
2494
  Object.defineProperty(exports, "__esModule", {
2211
2495
  value: true
2212
2496
  });
2213
2497
  exports.PureLinkGraph = void 0;
2498
+
2214
2499
  var React = __webpack_require__(1);
2500
+
2215
2501
  var T = __webpack_require__(0);
2502
+
2216
2503
  var styled_components_1 = __webpack_require__(4);
2504
+
2217
2505
  var lodash_1 = __webpack_require__(3);
2506
+
2218
2507
  var FixedSizeContainer_1 = __webpack_require__(13);
2508
+
2219
2509
  var PureLinkGraphUtils_1 = __webpack_require__(129);
2510
+
2220
2511
  var Graph_1 = __webpack_require__(228);
2512
+
2221
2513
  var Field_1 = __webpack_require__(405);
2514
+
2222
2515
  var FieldStyles_1 = __webpack_require__(408);
2516
+
2223
2517
  var LinkGraphContainer = styled_components_1.default.div.withConfig({
2224
2518
  displayName: "PureLinkGraph__LinkGraphContainer",
2225
2519
  componentId: "sc-2wfxi-0"
@@ -2240,31 +2534,32 @@ var LinkGraphWrapper = styled_components_1.default.div.withConfig({
2240
2534
  return (0, lodash_1.get)(props, 'height');
2241
2535
  });
2242
2536
  LinkGraphContainer.displayName = 'LinkGraphContainer';
2537
+
2243
2538
  var PureLinkGraph = function PureLinkGraph(props) {
2244
2539
  var mode = props.mode,
2245
- backgroundColor = props.backgroundColor,
2246
- width = props.width,
2247
- height = props.height,
2248
- fields = props.fields,
2249
- columns = props.columns,
2250
- nodeWidth = props.nodeWidth,
2251
- nodeHeight = props.nodeHeight,
2252
- nodeSpacingX = props.nodeSpacingX,
2253
- nodeSpacingY = props.nodeSpacingY,
2254
- onNodeClick = props.onNodeClick,
2255
- onNodeMouseover = props.onNodeMouseover,
2256
- linkColor = props.linkColor,
2257
- nodeColor = props.nodeColor,
2258
- nodeTextColor = props.nodeTextColor,
2259
- nodeHighlightColor = props.nodeHighlightColor,
2260
- nodeTextHighlightColor = props.nodeTextHighlightColor,
2261
- resultLimit = props.resultLimit,
2262
- linkWidth = props.linkWidth,
2263
- showValueCounts = props.showValueCounts,
2264
- showNodeCounts = props.showNodeCounts,
2265
- fieldOrder = props.fieldOrder,
2266
- metadataFields = props.metadataFields,
2267
- metadataColumns = props.metadataColumns;
2540
+ backgroundColor = props.backgroundColor,
2541
+ width = props.width,
2542
+ height = props.height,
2543
+ fields = props.fields,
2544
+ columns = props.columns,
2545
+ nodeWidth = props.nodeWidth,
2546
+ nodeHeight = props.nodeHeight,
2547
+ nodeSpacingX = props.nodeSpacingX,
2548
+ nodeSpacingY = props.nodeSpacingY,
2549
+ onNodeClick = props.onNodeClick,
2550
+ onNodeMouseover = props.onNodeMouseover,
2551
+ linkColor = props.linkColor,
2552
+ nodeColor = props.nodeColor,
2553
+ nodeTextColor = props.nodeTextColor,
2554
+ nodeHighlightColor = props.nodeHighlightColor,
2555
+ nodeTextHighlightColor = props.nodeTextHighlightColor,
2556
+ resultLimit = props.resultLimit,
2557
+ linkWidth = props.linkWidth,
2558
+ showValueCounts = props.showValueCounts,
2559
+ showNodeCounts = props.showNodeCounts,
2560
+ fieldOrder = props.fieldOrder,
2561
+ metadataFields = props.metadataFields,
2562
+ metadataColumns = props.metadataColumns;
2268
2563
  /*
2269
2564
  value / setValue is here so we can modify graphDataModelState directly and
2270
2565
  force a rerender, as opposed to making a copy of graphDataModelState and
@@ -2272,22 +2567,27 @@ var PureLinkGraph = function PureLinkGraph(props) {
2272
2567
  I will make sure to test this in a UDF context to make sure there is no data loss
2273
2568
  or incorrect rendering ( and will then remove this last comment or address later on )
2274
2569
  */
2570
+
2275
2571
  var _React$useState = React.useState(0),
2276
- _React$useState2 = _slicedToArray(_React$useState, 2),
2277
- value = _React$useState2[0],
2278
- setValue = _React$useState2[1];
2572
+ _React$useState2 = _slicedToArray(_React$useState, 2),
2573
+ value = _React$useState2[0],
2574
+ setValue = _React$useState2[1];
2575
+
2279
2576
  var _React$useState3 = React.useState((0, PureLinkGraphUtils_1.createLinkGraphFromTable)(fields, columns, nodeWidth, nodeHeight, nodeSpacingX, nodeSpacingY, resultLimit, fieldOrder)),
2280
- _React$useState4 = _slicedToArray(_React$useState3, 2),
2281
- graphDataModelState = _React$useState4[0],
2282
- setGraphDataModelState = _React$useState4[1];
2577
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
2578
+ graphDataModelState = _React$useState4[0],
2579
+ setGraphDataModelState = _React$useState4[1];
2580
+
2283
2581
  React.useEffect(function () {
2284
2582
  setGraphDataModelState((0, PureLinkGraphUtils_1.createLinkGraphFromTable)(fields, columns, nodeWidth, nodeHeight, nodeSpacingX, nodeSpacingY, resultLimit, fieldOrder));
2285
2583
  }, [fields, columns, nodeWidth, nodeHeight, nodeSpacingX, nodeSpacingY, resultLimit, fieldOrder]);
2584
+
2286
2585
  var handleFieldSort = function handleFieldSort(field, sortKey) {
2287
2586
  (0, PureLinkGraphUtils_1.sortGraphColumn)(graphDataModelState, field, sortKey, nodeHeight, nodeSpacingY);
2288
2587
  setGraphDataModelState(graphDataModelState);
2289
2588
  setValue(value + 1);
2290
2589
  };
2590
+
2291
2591
  return React.createElement(LinkGraphWrapper, {
2292
2592
  backgroundColor: backgroundColor,
2293
2593
  height: height,
@@ -2326,6 +2626,7 @@ var PureLinkGraph = function PureLinkGraph(props) {
2326
2626
  });
2327
2627
  }))));
2328
2628
  };
2629
+
2329
2630
  exports.PureLinkGraph = PureLinkGraph;
2330
2631
  exports.PureLinkGraph.propTypes = {
2331
2632
  mode: T.string,
@@ -2386,28 +2687,47 @@ exports.default = (0, FixedSizeContainer_1.default)(exports.PureLinkGraph);
2386
2687
 
2387
2688
 
2388
2689
  var _toConsumableArray = __webpack_require__(8);
2690
+
2389
2691
  var _classCallCheck = __webpack_require__(9);
2692
+
2390
2693
  var _createClass = __webpack_require__(18);
2694
+
2391
2695
  var _inherits = __webpack_require__(71);
2696
+
2392
2697
  var _possibleConstructorReturn = __webpack_require__(72);
2698
+
2393
2699
  var _getPrototypeOf = __webpack_require__(63);
2700
+
2394
2701
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
2702
+
2395
2703
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
2704
+
2396
2705
  Object.defineProperty(exports, "__esModule", {
2397
2706
  value: true
2398
2707
  });
2708
+
2399
2709
  var React = __webpack_require__(1);
2710
+
2400
2711
  var lodash_1 = __webpack_require__(3);
2712
+
2401
2713
  var Edges_1 = __webpack_require__(229);
2714
+
2402
2715
  var Nodes_1 = __webpack_require__(230);
2716
+
2403
2717
  var GraphStyles_1 = __webpack_require__(157);
2718
+
2404
2719
  var PureLinkGraphUtils_1 = __webpack_require__(129);
2720
+
2405
2721
  var Graph = /*#__PURE__*/function (_React$Component) {
2406
2722
  _inherits(Graph, _React$Component);
2723
+
2407
2724
  var _super = _createSuper(Graph);
2725
+
2408
2726
  function Graph(props) {
2409
2727
  var _this;
2728
+
2410
2729
  _classCallCheck(this, Graph);
2730
+
2411
2731
  _this = _super.call(this, props);
2412
2732
  _this.requestAnimationFrameId = null;
2413
2733
  _this.viewport = null;
@@ -2417,11 +2737,14 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2417
2737
  highlightedNodes: [],
2418
2738
  hasMounted: false
2419
2739
  };
2740
+
2420
2741
  _this.handleNodeMouseover = function (k) {
2421
2742
  return _this.props.onNodeMouseover(k);
2422
2743
  };
2744
+
2423
2745
  return _this;
2424
2746
  }
2747
+
2425
2748
  _createClass(Graph, [{
2426
2749
  key: "componentDidMount",
2427
2750
  value: function componentDidMount() {
@@ -2433,6 +2756,7 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2433
2756
  key: "componentDidUpdate",
2434
2757
  value: function componentDidUpdate() {
2435
2758
  var _this2 = this;
2759
+
2436
2760
  var highlightedNodes = this.state.highlightedNodes;
2437
2761
  cancelAnimationFrame(this.requestAnimationFrameId);
2438
2762
  this.highlightAllEdges();
@@ -2451,16 +2775,21 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2451
2775
  key: "handleMouseEnterNode",
2452
2776
  value: function handleMouseEnterNode(nodeID) {
2453
2777
  var _this3 = this;
2778
+
2454
2779
  this.unhighlightAllEdges();
2780
+
2455
2781
  var _ref = (0, PureLinkGraphUtils_1.getNodesToHighlight)(this.props.graphDataModel, nodeID),
2456
- nodes = _ref.nodes,
2457
- edges = _ref.edges;
2782
+ nodes = _ref.nodes,
2783
+ edges = _ref.edges;
2784
+
2458
2785
  edges.forEach(function (e) {
2459
2786
  var element = _this3.viewport.querySelector("[data-test=\"edge-".concat(e, "\"]"));
2787
+
2460
2788
  element.classList.add('hovering');
2461
2789
  });
2462
2790
  nodes.forEach(function (uuid) {
2463
2791
  var element = _this3.viewport.querySelector("[data-test=\"node-".concat(uuid, "\"]"));
2792
+
2464
2793
  element.classList.add('hovering');
2465
2794
  });
2466
2795
  }
@@ -2468,10 +2797,13 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2468
2797
  key: "handleMouseLeave",
2469
2798
  value: function handleMouseLeave() {
2470
2799
  var _this4 = this;
2800
+
2471
2801
  var highlightedNodes = this.state.highlightedNodes;
2802
+
2472
2803
  _toConsumableArray(this.viewport.getElementsByClassName('hovering')[Symbol.iterator]()).forEach(function (ele) {
2473
2804
  ele.classList.remove('hovering');
2474
2805
  });
2806
+
2475
2807
  highlightedNodes.forEach(function (value) {
2476
2808
  _this4.handleMouseEnterNode(value);
2477
2809
  });
@@ -2481,14 +2813,18 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2481
2813
  key: "handleMouseClick",
2482
2814
  value: function handleMouseClick(key) {
2483
2815
  var _this5 = this;
2816
+
2484
2817
  var onNodeClick = this.props.onNodeClick;
2485
2818
  var _this$state = this.state,
2486
- nodes = _this$state.nodes,
2487
- highlightedNodes = _this$state.highlightedNodes;
2819
+ nodes = _this$state.nodes,
2820
+ highlightedNodes = _this$state.highlightedNodes;
2821
+
2488
2822
  var newHighlightedNodes = _toConsumableArray(highlightedNodes);
2823
+
2489
2824
  var index = newHighlightedNodes.indexOf(key);
2490
2825
  var element = this.viewport.querySelector("[data-test=\"node-".concat(key, "\"]"));
2491
2826
  var state = false;
2827
+
2492
2828
  if (index !== -1) {
2493
2829
  newHighlightedNodes.splice(index, 1);
2494
2830
  element.classList.remove('selected');
@@ -2499,6 +2835,7 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2499
2835
  element.classList.add('selected');
2500
2836
  element.setAttribute('aria-pressed', 'true');
2501
2837
  }
2838
+
2502
2839
  this.setState({
2503
2840
  highlightedNodes: newHighlightedNodes
2504
2841
  }, function () {
@@ -2506,8 +2843,8 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2506
2843
  });
2507
2844
  var selectedOption = state ? 'selected' : 'unselected';
2508
2845
  var _nodes$key$data = nodes[key].data,
2509
- field = _nodes$key$data.field,
2510
- value = _nodes$key$data.value;
2846
+ field = _nodes$key$data.field,
2847
+ value = _nodes$key$data.value;
2511
2848
  var payload = {
2512
2849
  name: field,
2513
2850
  value: value,
@@ -2518,9 +2855,11 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2518
2855
  }).forEach(function (node) {
2519
2856
  if (node.data.isHidden !== true) {
2520
2857
  var row = "row.".concat(node.data.field, ".value");
2858
+
2521
2859
  if (!payload[row]) {
2522
2860
  payload[row] = [];
2523
2861
  }
2862
+
2524
2863
  payload[row].push(node.data.value);
2525
2864
  }
2526
2865
  });
@@ -2532,6 +2871,7 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2532
2871
  key: "highlightAllEdges",
2533
2872
  value: function highlightAllEdges() {
2534
2873
  var highlightedNodes = this.state.highlightedNodes;
2874
+
2535
2875
  if (!highlightedNodes.length) {
2536
2876
  this.viewport.querySelectorAll("[data-test^=\"edge-\"]").forEach(function (element) {
2537
2877
  return element.classList.add('hovering');
@@ -2542,6 +2882,7 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2542
2882
  key: "unhighlightAllEdges",
2543
2883
  value: function unhighlightAllEdges() {
2544
2884
  var highlightedNodes = this.state.highlightedNodes;
2885
+
2545
2886
  if (!highlightedNodes.length) {
2546
2887
  this.viewport.querySelectorAll("[data-test^=\"edge-\"]").forEach(function (element) {
2547
2888
  return element.classList.remove('hovering');
@@ -2552,6 +2893,7 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2552
2893
  key: "unhighlightAllNodes",
2553
2894
  value: function unhighlightAllNodes() {
2554
2895
  var highlightedNodes = this.state.highlightedNodes;
2896
+
2555
2897
  if (!highlightedNodes.length) {
2556
2898
  this.viewport.querySelectorAll("[data-test^=\"node-\"]").forEach(function (element) {
2557
2899
  return element.classList.remove('hovering');
@@ -2562,11 +2904,14 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2562
2904
  key: "tween",
2563
2905
  value: function tween() {
2564
2906
  var _this6 = this;
2907
+
2565
2908
  var nodes = this.state.nodes;
2566
2909
  var isAnimating = false;
2567
2910
  Object.keys(nodes).forEach(function (nodeId) {
2568
2911
  var node = nodes[nodeId];
2912
+
2569
2913
  var nodeElement = _this6.viewport.querySelector("[data-test=\"node-".concat(nodeId, "\"]"));
2914
+
2570
2915
  if (nodeElement) {
2571
2916
  if (nodeElement.style.left === '') {
2572
2917
  _this6.moveNodeBy(nodeId, Math.floor(node.x), Math.floor(node.y), Math.floor(node.w), Math.floor(node.h));
@@ -2580,17 +2925,21 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2580
2925
  var newY = Math.floor(y * (1 - node.time) + node.y * node.time);
2581
2926
  var newWidth = Math.floor(w * (1 - node.time) + node.w * node.time);
2582
2927
  var newHeight = Math.floor(h * (1 - node.time) + node.h * node.time);
2928
+
2583
2929
  if (node.time < 1) {
2584
2930
  _this6.moveNodeBy(nodeId, Math.floor(newX), Math.floor(newY), Math.floor(newWidth), Math.floor(newHeight));
2931
+
2585
2932
  isAnimating = true;
2586
2933
  } else {
2587
2934
  _this6.moveNodeBy(nodeId, Math.floor(node.x), Math.floor(node.y), Math.floor(node.w), Math.floor(node.h));
2935
+
2588
2936
  node.time = 1;
2589
2937
  }
2590
2938
  }
2591
2939
  }
2592
2940
  });
2593
2941
  cancelAnimationFrame(this.requestAnimationFrameId);
2942
+
2594
2943
  if (isAnimating) {
2595
2944
  this.requestAnimationFrameId = requestAnimationFrame(this.tween.bind(this));
2596
2945
  }
@@ -2599,23 +2948,28 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2599
2948
  key: "moveNodeBy",
2600
2949
  value: function moveNodeBy(nodeId, xIn, yIn, wIn, hIn) {
2601
2950
  var _this7 = this;
2951
+
2602
2952
  var nodes = this.state.nodes;
2603
2953
  nodes[nodeId].currentX = xIn;
2604
2954
  nodes[nodeId].currentY = yIn;
2605
2955
  nodes[nodeId].currentW = wIn;
2606
2956
  nodes[nodeId].currentH = hIn;
2607
2957
  var nodeElement = this.viewport.querySelector("[data-test=\"node-".concat(nodeId, "\"]"));
2958
+
2608
2959
  if (nodeElement) {
2609
2960
  nodeElement.style.left = "".concat(xIn, "px");
2610
2961
  nodeElement.style.top = "".concat(yIn, "px");
2611
2962
  nodeElement.style.width = "".concat(wIn, "px");
2612
2963
  nodeElement.style.height = "".concat(hIn, "px");
2613
2964
  }
2965
+
2614
2966
  Object.values(nodes[nodeId].data.outs).forEach(function (edge) {
2615
2967
  if (edge.sourceNode === nodeId || edge.targetNode === nodeId) {
2616
2968
  var start = nodes[edge.sourceNode];
2617
2969
  var end = nodes[edge.targetNode];
2970
+
2618
2971
  var edgeElement = _this7.viewport.querySelector("[data-test=\"edge-".concat(edge.sourceNode, "-").concat(edge.targetNode, "\"]"));
2972
+
2619
2973
  if (edgeElement && start && end) {
2620
2974
  var middle = {
2621
2975
  currentX: 0,
@@ -2635,19 +2989,20 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2635
2989
  key: "render",
2636
2990
  value: function render() {
2637
2991
  var _this8 = this;
2992
+
2638
2993
  var _this$state2 = this.state,
2639
- nodes = _this$state2.nodes,
2640
- edges = _this$state2.edges;
2994
+ nodes = _this$state2.nodes,
2995
+ edges = _this$state2.edges;
2641
2996
  var _this$props = this.props,
2642
- nodeColor = _this$props.nodeColor,
2643
- nodeHighlightColor = _this$props.nodeHighlightColor,
2644
- linkColor = _this$props.linkColor,
2645
- linkWidth = _this$props.linkWidth,
2646
- showValueCounts = _this$props.showValueCounts,
2647
- nodeTextColor = _this$props.nodeTextColor,
2648
- nodeTextHighlightColor = _this$props.nodeTextHighlightColor,
2649
- metadataFields = _this$props.metadataFields,
2650
- metadataColumns = _this$props.metadataColumns;
2997
+ nodeColor = _this$props.nodeColor,
2998
+ nodeHighlightColor = _this$props.nodeHighlightColor,
2999
+ linkColor = _this$props.linkColor,
3000
+ linkWidth = _this$props.linkWidth,
3001
+ showValueCounts = _this$props.showValueCounts,
3002
+ nodeTextColor = _this$props.nodeTextColor,
3003
+ nodeTextHighlightColor = _this$props.nodeTextHighlightColor,
3004
+ metadataFields = _this$props.metadataFields,
3005
+ metadataColumns = _this$props.metadataColumns;
2651
3006
  var newEdges = edges.filter(function (edge) {
2652
3007
  return nodes[edge.sourceNode] && nodes[edge.targetNode];
2653
3008
  });
@@ -2686,21 +3041,26 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2686
3041
  if (!state.hasMounted) {
2687
3042
  return state;
2688
3043
  }
3044
+
2689
3045
  var nodes = (0, lodash_1.cloneDeep)(props.graphDataModel.nodes);
2690
3046
  Object.keys(nodes).forEach(function (key) {
2691
3047
  var nodeFromProps = nodes[key];
2692
3048
  var nodeFromState = state.nodes[key];
3049
+
2693
3050
  if (!nodeFromState) {
2694
3051
  nodeFromProps.time = 1;
2695
3052
  } else if (nodeFromProps.x !== nodeFromState.x || nodeFromProps.y !== nodeFromState.y || nodeFromProps.w !== nodeFromState.w || nodeFromProps.h !== nodeFromState.h) {
2696
3053
  nodeFromProps.time = 0;
2697
3054
  }
3055
+
2698
3056
  nodeFromProps.currentX = nodeFromProps.x;
2699
3057
  nodeFromProps.currentY = nodeFromProps.y;
2700
3058
  nodeFromProps.currentW = nodeFromProps.w;
2701
3059
  nodeFromProps.currentH = nodeFromProps.h;
2702
3060
  });
3061
+
2703
3062
  var highlightedNodes = _toConsumableArray(state.highlightedNodes);
3063
+
2704
3064
  state.highlightedNodes.forEach(function (nodeID) {
2705
3065
  if (!props.graphDataModel.nodes[nodeID]) {
2706
3066
  highlightedNodes = [];
@@ -2713,8 +3073,10 @@ var Graph = /*#__PURE__*/function (_React$Component) {
2713
3073
  };
2714
3074
  }
2715
3075
  }]);
3076
+
2716
3077
  return Graph;
2717
3078
  }(React.Component);
3079
+
2718
3080
  exports.default = Graph;
2719
3081
 
2720
3082
  /***/ }),
@@ -2727,11 +3089,14 @@ exports.default = Graph;
2727
3089
  Object.defineProperty(exports, "__esModule", {
2728
3090
  value: true
2729
3091
  });
3092
+
2730
3093
  var React = __webpack_require__(1);
3094
+
2731
3095
  var GraphStyles_1 = __webpack_require__(157);
3096
+
2732
3097
  var Edges = function Edges(props) {
2733
3098
  var edges = props.edges,
2734
- linkWidth = props.linkWidth;
3099
+ linkWidth = props.linkWidth;
2735
3100
  var key = '';
2736
3101
  return React.createElement("svg", {
2737
3102
  style: {
@@ -2755,6 +3120,7 @@ var Edges = function Edges(props) {
2755
3120
  })];
2756
3121
  }));
2757
3122
  };
3123
+
2758
3124
  exports.default = Edges;
2759
3125
 
2760
3126
  /***/ }),
@@ -2767,10 +3133,15 @@ exports.default = Edges;
2767
3133
  Object.defineProperty(exports, "__esModule", {
2768
3134
  value: true
2769
3135
  });
3136
+
2770
3137
  var React = __webpack_require__(1);
3138
+
2771
3139
  var FeatureFlagContext_1 = __webpack_require__(21);
3140
+
2772
3141
  var lodash_1 = __webpack_require__(3);
3142
+
2773
3143
  var Node_1 = __webpack_require__(231);
3144
+
2774
3145
  var Nodes = function Nodes(props) {
2775
3146
  var context = React.useContext(FeatureFlagContext_1.default);
2776
3147
  var NodeToUse = (0, lodash_1.get)(context, 'LinkGraph.showNodeMetaData') ? Node_1.NodeES : Node_1.Node;
@@ -2802,6 +3173,7 @@ var Nodes = function Nodes(props) {
2802
3173
  }));
2803
3174
  });
2804
3175
  };
3176
+
2805
3177
  exports.default = Nodes;
2806
3178
 
2807
3179
  /***/ }),
@@ -2812,22 +3184,28 @@ exports.default = Nodes;
2812
3184
 
2813
3185
 
2814
3186
  var _slicedToArray = __webpack_require__(17);
3187
+
2815
3188
  Object.defineProperty(exports, "__esModule", {
2816
3189
  value: true
2817
3190
  });
2818
3191
  exports.NodeES = exports.Node = void 0;
3192
+
2819
3193
  var React = __webpack_require__(1);
3194
+
2820
3195
  var Paragraph_1 = __webpack_require__(110);
3196
+
2821
3197
  var PureLinkGraphUtils_1 = __webpack_require__(129);
3198
+
2822
3199
  var Node = function Node(props) {
2823
3200
  var data = props.data,
2824
- showValueCounts = props.showValueCounts;
3201
+ showValueCounts = props.showValueCounts;
2825
3202
  return React.createElement(React.Fragment, null, React.createElement("div", {
2826
3203
  className: "center-content"
2827
3204
  }, React.createElement(Paragraph_1.default, null, data.value)), React.createElement("div", {
2828
3205
  className: "right-content"
2829
3206
  }, React.createElement(Paragraph_1.default, null, showValueCounts ? data.count : null)));
2830
3207
  };
3208
+
2831
3209
  exports.Node = Node;
2832
3210
  var esStyle = {
2833
3211
  width: 'auto',
@@ -2839,20 +3217,24 @@ var esStyle = {
2839
3217
  * 2. a @splunk/react-icon by passing in the icon name
2840
3218
  * 3. an SVG path - example: d="M 0, 0 m -5, 0 a 5,5 0 1,0 5,0 a 5,5 0 1,0 -5,0"
2841
3219
  */
3220
+
2842
3221
  var NodeES = function NodeES(props) {
2843
3222
  var data = props.data,
2844
- showValueCounts = props.showValueCounts,
2845
- metadataFields = props.metadataFields,
2846
- metadataColumns = props.metadataColumns;
3223
+ showValueCounts = props.showValueCounts,
3224
+ metadataFields = props.metadataFields,
3225
+ metadataColumns = props.metadataColumns;
2847
3226
  var metaData = (0, PureLinkGraphUtils_1.getSecondaryColumnByField)(data.value, metadataFields, metadataColumns);
2848
3227
  var isSVG = String(metaData.icon).indexOf('d=') === 0;
2849
3228
  var isIMG = String(metaData.icon).indexOf('data:image/') === 0;
3229
+
2850
3230
  var _React$useState = React.useState(false),
2851
- _React$useState2 = _slicedToArray(_React$useState, 2),
2852
- showRollOverText = _React$useState2[0],
2853
- setShowRollOverText = _React$useState2[1];
3231
+ _React$useState2 = _slicedToArray(_React$useState, 2),
3232
+ showRollOverText = _React$useState2[0],
3233
+ setShowRollOverText = _React$useState2[1];
3234
+
2854
3235
  var anchorRef = React.useRef(null);
2855
3236
  var Icon = null;
3237
+
2856
3238
  if (metaData.icon && !isIMG && !isSVG) {
2857
3239
  try {
2858
3240
  /* eslint-disable import/no-dynamic-require, global-require, @typescript-eslint/no-var-requires */
@@ -2863,6 +3245,8 @@ var NodeES = function NodeES(props) {
2863
3245
  Icon = __webpack_require__(233)("./".concat(metaData.icon, ".js"));
2864
3246
  }
2865
3247
  /* eslint-enable import/no-dynamic-require, global-require, @typescript-eslint/no-var-requires */
3248
+
3249
+
2866
3250
  if (Icon && Icon.default) {
2867
3251
  Icon = Icon.default;
2868
3252
  }
@@ -2870,6 +3254,7 @@ var NodeES = function NodeES(props) {
2870
3254
  Icon = null;
2871
3255
  }
2872
3256
  }
3257
+
2873
3258
  return React.createElement("div", {
2874
3259
  className: "center-content-se",
2875
3260
  ref: anchorRef,
@@ -2928,6 +3313,7 @@ var NodeES = function NodeES(props) {
2928
3313
  }
2929
3314
  }, metaData.badge_label ? metaData.badge_label : null)));
2930
3315
  };
3316
+
2931
3317
  exports.NodeES = NodeES;
2932
3318
 
2933
3319
  /***/ }),
@@ -27182,20 +27568,29 @@ module.exports = __webpack_require__(5);
27182
27568
  Object.defineProperty(exports, "__esModule", {
27183
27569
  value: true
27184
27570
  });
27571
+
27185
27572
  var React = __webpack_require__(1);
27573
+
27186
27574
  var Dropdown_1 = __webpack_require__(406);
27575
+
27187
27576
  var Paragraph_1 = __webpack_require__(110);
27577
+
27188
27578
  var Button_1 = __webpack_require__(123);
27579
+
27189
27580
  var Menu_1 = __webpack_require__(119);
27581
+
27190
27582
  var Chip_1 = __webpack_require__(407);
27583
+
27191
27584
  var FeatureFlagContext_1 = __webpack_require__(21);
27585
+
27192
27586
  var lodash_1 = __webpack_require__(3);
27587
+
27193
27588
  var Field = function Field(_ref) {
27194
27589
  var field = _ref.field,
27195
- count = _ref.count,
27196
- onSort = _ref.onSort,
27197
- showNodeCounts = _ref.showNodeCounts,
27198
- width = _ref.width;
27590
+ count = _ref.count,
27591
+ onSort = _ref.onSort,
27592
+ showNodeCounts = _ref.showNodeCounts,
27593
+ width = _ref.width;
27199
27594
  var toggle = React.createElement(Button_1.default, {
27200
27595
  label: field,
27201
27596
  isMenu: true,
@@ -27243,6 +27638,7 @@ var Field = function Field(_ref) {
27243
27638
  var FieldToUse = (0, lodash_1.get)(context, 'LinkGraph.showNodeMetaData') ? FieldES : FieldNonES;
27244
27639
  return FieldToUse;
27245
27640
  };
27641
+
27246
27642
  Field.displayName = 'Field';
27247
27643
  exports.default = Field;
27248
27644
 
@@ -27269,8 +27665,11 @@ Object.defineProperty(exports, "__esModule", {
27269
27665
  value: true
27270
27666
  });
27271
27667
  exports.StyledFields = void 0;
27668
+
27272
27669
  var styled_components_1 = __webpack_require__(4);
27670
+
27273
27671
  var pick_1 = __webpack_require__(23);
27672
+
27274
27673
  exports.StyledFields = styled_components_1.default.div.withConfig({
27275
27674
  displayName: "FieldStyles__StyledFields",
27276
27675
  componentId: "gvs6f8-0"
@@ -27290,28 +27689,41 @@ exports.StyledFields = styled_components_1.default.div.withConfig({
27290
27689
 
27291
27690
 
27292
27691
  var _toConsumableArray = __webpack_require__(8);
27692
+
27293
27693
  Object.defineProperty(exports, "__esModule", {
27294
27694
  value: true
27295
27695
  });
27696
+
27296
27697
  var lodash_1 = __webpack_require__(3);
27698
+
27297
27699
  var visualization_icons_1 = __webpack_require__(52);
27700
+
27298
27701
  var placeholders_1 = __webpack_require__(50);
27702
+
27299
27703
  var schemaUtils_1 = __webpack_require__(16);
27704
+
27300
27705
  var i18n_1 = __webpack_require__(2);
27706
+
27301
27707
  var pick_1 = __webpack_require__(23);
27708
+
27302
27709
  var variables_1 = __webpack_require__(11);
27710
+
27303
27711
  var colorConstants_1 = __webpack_require__(49);
27712
+
27304
27713
  var visualization_color_palettes_1 = __webpack_require__(51);
27714
+
27305
27715
  var configUtils_1 = __webpack_require__(20);
27306
- var VizCategory_1 = __webpack_require__(35);
27716
+
27717
+ var VizCategory_1 = __webpack_require__(36);
27718
+
27307
27719
  var VizBehavior_1 = __webpack_require__(6);
27720
+
27308
27721
  var dataContract = {
27309
27722
  requiredDataSources: [{
27310
27723
  name: 'primary',
27311
27724
  description: 'DataSource that powers the visualization'
27312
27725
  }],
27313
- optionalDataSources: [
27314
- // {
27726
+ optionalDataSources: [// {
27315
27727
  // name: 'metadata',
27316
27728
  // description: 'Used buy the ES team along side the feature flag `LinkGraph.showNodeMetaData`',
27317
27729
  // },
@@ -27447,8 +27859,8 @@ var themes = {
27447
27859
  enterprise: {
27448
27860
  dark: variables_1.default.contentColorInverted(props),
27449
27861
  light: variables_1.default.white(props) // equal to textColor in enterpriseDark
27450
- },
27451
27862
 
27863
+ },
27452
27864
  prisma: variables_1.default.contentColorInverted(props)
27453
27865
  })(props);
27454
27866
  },
@@ -27463,8 +27875,8 @@ var themes = {
27463
27875
  enterprise: {
27464
27876
  dark: variables_1.default.contentColorInverted(props),
27465
27877
  light: variables_1.default.white(props) // equal to textColor in enterpriseDark
27466
- },
27467
27878
 
27879
+ },
27468
27880
  prisma: variables_1.default.contentColorInverted(props)
27469
27881
  })(props);
27470
27882
  }
@@ -27473,8 +27885,7 @@ var EDITOR_LABEL_WIDTH = 140;
27473
27885
  var backgroundColorPaletteSet = new Set([].concat(_toConsumableArray(colorConstants_1.COLOR_EDITOR_PALETTE), _toConsumableArray((0, lodash_1.map)(themes, function (t) {
27474
27886
  return (0, lodash_1.get)(t, 'defaultBackgroundColor');
27475
27887
  }))));
27476
- var editorConfig = [
27477
- // {
27888
+ var editorConfig = [// {
27478
27889
  // label: _('Data'),
27479
27890
  // layout: [
27480
27891
  // [
@@ -27618,12 +28029,14 @@ var config = {
27618
28029
  * unique viz key
27619
28030
  */
27620
28031
  key: 'splunk.linkgraph',
28032
+
27621
28033
  /**
27622
28034
  * viz name
27623
28035
  */
27624
28036
  name: (0, i18n_1._)('Link graph'),
27625
28037
  category: VizCategory_1.VizCategory.FLOW,
27626
28038
  status: 'preview',
28039
+
27627
28040
  /**
27628
28041
  * viz icon
27629
28042
  */