@splunk/visualizations 25.13.1 → 26.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/Area.config.js +318 -234
  2. package/Area.config.js.map +1 -1
  3. package/Area.js +1131 -766
  4. package/Area.js.map +1 -1
  5. package/Bar.config.js +317 -233
  6. package/Bar.config.js.map +1 -1
  7. package/Bar.js +1007 -594
  8. package/Bar.js.map +1 -1
  9. package/Bubble.config.js +234 -160
  10. package/Bubble.config.js.map +1 -1
  11. package/Bubble.js +912 -509
  12. package/Bubble.js.map +1 -1
  13. package/ChoroplethSvg.config.js +80 -29
  14. package/ChoroplethSvg.config.js.map +1 -1
  15. package/ChoroplethSvg.js +691 -319
  16. package/ChoroplethSvg.js.map +1 -1
  17. package/Column.config.js +308 -223
  18. package/Column.config.js.map +1 -1
  19. package/Column.js +1011 -587
  20. package/Column.js.map +1 -1
  21. package/Ellipse.config.js +127 -62
  22. package/Ellipse.config.js.map +1 -1
  23. package/Ellipse.js +576 -286
  24. package/Ellipse.js.map +1 -1
  25. package/Events.config.js +111 -29
  26. package/Events.config.js.map +1 -1
  27. package/Events.js +998 -527
  28. package/Events.js.map +1 -1
  29. package/FillerGauge.config.js +142 -73
  30. package/FillerGauge.config.js.map +1 -1
  31. package/FillerGauge.js +962 -572
  32. package/FillerGauge.js.map +1 -1
  33. package/Image.config.js +70 -26
  34. package/Image.config.js.map +1 -1
  35. package/Image.js +524 -253
  36. package/Image.js.map +1 -1
  37. package/Line.config.js +326 -242
  38. package/Line.config.js.map +1 -1
  39. package/Line.js +1022 -606
  40. package/Line.js.map +1 -1
  41. package/LinkGraph.config.js +99 -49
  42. package/LinkGraph.config.js.map +1 -1
  43. package/LinkGraph.js +1184 -762
  44. package/LinkGraph.js.map +1 -1
  45. package/MIGRATION.md +1082 -0
  46. package/Map.config.js +311 -167
  47. package/Map.config.js.map +1 -1
  48. package/Map.js +1479 -873
  49. package/Map.js.map +1 -1
  50. package/Markdown.config.js +93 -43
  51. package/Markdown.config.js.map +1 -1
  52. package/Markdown.js +603 -332
  53. package/Markdown.js.map +1 -1
  54. package/MarkerGauge.config.js +163 -105
  55. package/MarkerGauge.config.js.map +1 -1
  56. package/MarkerGauge.js +1025 -628
  57. package/MarkerGauge.js.map +1 -1
  58. package/ParallelCoordinates.config.js +95 -41
  59. package/ParallelCoordinates.config.js.map +1 -1
  60. package/ParallelCoordinates.js +993 -622
  61. package/ParallelCoordinates.js.map +1 -1
  62. package/Pie.config.js +99 -46
  63. package/Pie.config.js.map +1 -1
  64. package/Pie.js +847 -442
  65. package/Pie.js.map +1 -1
  66. package/Punchcard.config.js +114 -62
  67. package/Punchcard.config.js.map +1 -1
  68. package/Punchcard.js +1097 -633
  69. package/Punchcard.js.map +1 -1
  70. package/Rectangle.config.js +131 -65
  71. package/Rectangle.config.js.map +1 -1
  72. package/Rectangle.js +580 -288
  73. package/Rectangle.js.map +1 -1
  74. package/Sankey.config.js +103 -41
  75. package/Sankey.config.js.map +1 -1
  76. package/Sankey.js +1128 -586
  77. package/Sankey.js.map +1 -1
  78. package/Scatter.config.js +231 -157
  79. package/Scatter.config.js.map +1 -1
  80. package/Scatter.js +904 -504
  81. package/Scatter.js.map +1 -1
  82. package/SingleValue.config.js +212 -142
  83. package/SingleValue.config.js.map +1 -1
  84. package/SingleValue.js +1506 -956
  85. package/SingleValue.js.map +1 -1
  86. package/SingleValueBasic.js +294 -233
  87. package/SingleValueBasic.js.map +1 -1
  88. package/SingleValueIcon.config.js +208 -138
  89. package/SingleValueIcon.config.js.map +1 -1
  90. package/SingleValueIcon.js +1375 -914
  91. package/SingleValueIcon.js.map +1 -1
  92. package/SingleValueRadial.config.js +252 -137
  93. package/SingleValueRadial.config.js.map +1 -1
  94. package/SingleValueRadial.js +2194 -1069
  95. package/SingleValueRadial.js.map +1 -1
  96. package/SparkLine.js +172 -83
  97. package/SparkLine.js.map +1 -1
  98. package/Table.config.js +123 -70
  99. package/Table.config.js.map +1 -1
  100. package/Table.js +1094 -590
  101. package/Table.js.map +1 -1
  102. package/common/Charting.js +147 -75
  103. package/common/Charting.js.map +1 -1
  104. package/common/ChartingApi.js +18 -7
  105. package/common/ChartingApi.js.map +1 -1
  106. package/common/EventsDoc.js +91 -36
  107. package/common/EventsDoc.js.map +1 -1
  108. package/common/GaugeMajorTicks.js +70 -60
  109. package/common/GaugeMajorTicks.js.map +1 -1
  110. package/common/GaugeValueMarker.js +45 -36
  111. package/common/GaugeValueMarker.js.map +1 -1
  112. package/common/OptionsDoc.js +177 -86
  113. package/common/OptionsDoc.js.map +1 -1
  114. package/common/OverviewDoc.js +65 -32
  115. package/common/OverviewDoc.js.map +1 -1
  116. package/common/SplunkVisualization.js +34 -7
  117. package/common/SplunkVisualization.js.map +1 -1
  118. package/common/SplunkVisualizationApi.js +10 -4
  119. package/common/SplunkVisualizationApi.js.map +1 -1
  120. package/common/ThemesDoc.js +41 -28
  121. package/common/ThemesDoc.js.map +1 -1
  122. package/common/chartingUtils.js +56 -24
  123. package/common/chartingUtils.js.map +1 -1
  124. package/common/docUtils.js +15 -5
  125. package/common/docUtils.js.map +1 -1
  126. package/common/gaugeUtils.js +238 -155
  127. package/common/gaugeUtils.js.map +1 -1
  128. package/common/shapeUtils.js +34 -16
  129. package/common/shapeUtils.js.map +1 -1
  130. package/common/utils/configUtils.js +59 -23
  131. package/common/utils/configUtils.js.map +1 -1
  132. package/common/utils/dataUtils.js +9 -4
  133. package/common/utils/dataUtils.js.map +1 -1
  134. package/common/utils/hocUtils.js +5 -3
  135. package/common/utils/hocUtils.js.map +1 -1
  136. package/common/utils/layoutUtils.js +3 -2
  137. package/common/utils/layoutUtils.js.map +1 -1
  138. package/common/utils/mapUtils.js +370 -206
  139. package/common/utils/mapUtils.js.map +1 -1
  140. package/common/utils/singleValueUtils.js +243 -198
  141. package/common/utils/singleValueUtils.js.map +1 -1
  142. package/common/utils/testHelper.js +36 -9
  143. package/common/utils/testHelper.js.map +1 -1
  144. package/common/utils/trellisUtils.js +87 -26
  145. package/common/utils/trellisUtils.js.map +1 -1
  146. package/common/utils/urlUtils.js +4 -2
  147. package/common/utils/urlUtils.js.map +1 -1
  148. package/common/withDashboardViz.js +375 -193
  149. package/common/withDashboardViz.js.map +1 -1
  150. package/package.json +25 -27
package/Sankey.config.js CHANGED
@@ -87,7 +87,7 @@ module.exports =
87
87
  /******/
88
88
  /******/
89
89
  /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 71);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 72);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
@@ -129,13 +129,15 @@ module.exports = require("@splunk/visualization-icons");
129
129
  Object.defineProperty(exports, "__esModule", {
130
130
  value: true
131
131
  });
132
+
132
133
  var i18n_1 = __webpack_require__(0);
134
+
133
135
  var background = function background(_ref) {
134
136
  var label = _ref.label,
135
- themes = _ref.themes,
136
- labelPosition = _ref.labelPosition;
137
+ themes = _ref.themes,
138
+ labelPosition = _ref.labelPosition;
137
139
  return [{
138
- label: i18n_1._(label || 'Background'),
140
+ label: (0, i18n_1._)(label || 'Background'),
139
141
  option: 'backgroundColor',
140
142
  editor: 'editor.color',
141
143
  editorProps: {
@@ -144,6 +146,7 @@ var background = function background(_ref) {
144
146
  }
145
147
  }];
146
148
  };
149
+
147
150
  exports.default = background;
148
151
 
149
152
  /***/ }),
@@ -173,6 +176,7 @@ Object.defineProperty(exports, "__esModule", {
173
176
  });
174
177
  exports.VizBehavior = void 0;
175
178
  var VizBehavior;
179
+
176
180
  (function (VizBehavior) {
177
181
  /**
178
182
  * Dynamic Options Behavior.
@@ -192,6 +196,7 @@ var VizBehavior;
192
196
  * missing.
193
197
  * @type {string}
194
198
  */
199
+
195
200
  VizBehavior["PLACEHOLDER"] = "placeholder";
196
201
  VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
197
202
  VizBehavior["TRELLIS"] = "trellis";
@@ -220,24 +225,33 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
220
225
 
221
226
 
222
227
  var _toConsumableArray = __webpack_require__(1);
228
+
223
229
  var _defineProperty = __webpack_require__(7);
230
+
224
231
  var __rest = this && this.__rest || function (s, e) {
225
232
  var t = {};
233
+
226
234
  for (var p in s) {
227
235
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
228
236
  }
237
+
229
238
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
230
239
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
231
240
  }
232
241
  return t;
233
242
  };
243
+
234
244
  Object.defineProperty(exports, "__esModule", {
235
245
  value: true
236
246
  });
237
247
  exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
248
+
238
249
  var lodash_1 = __webpack_require__(6);
250
+
239
251
  var schemaUtils_1 = __webpack_require__(3);
252
+
240
253
  var VizBehavior_1 = __webpack_require__(2);
254
+
241
255
  var dynamicOptionsDSLType = {
242
256
  type: 'string',
243
257
  pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
@@ -247,20 +261,22 @@ var dynamicOptionsDSLType = {
247
261
  * @param optionsSchema a visualization's options schema
248
262
  * @returns an updated options schema that additionally allows strings starting with > for each option
249
263
  */
264
+
250
265
  function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
251
266
  var enhancedOptionsSchema = {};
252
267
  Object.keys(optionsSchema).forEach(function (key) {
253
268
  var _a = optionsSchema[key],
254
- title = _a.title,
255
- description = _a.description,
256
- readOnly = _a.readOnly,
257
- writeOnly = _a.writeOnly,
258
- examples = _a.examples,
259
- defaultValue = _a.default,
260
- type = _a.type,
261
- properties = _a.properties,
262
- patternProperties = _a.patternProperties,
263
- remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
269
+ title = _a.title,
270
+ description = _a.description,
271
+ readOnly = _a.readOnly,
272
+ writeOnly = _a.writeOnly,
273
+ examples = _a.examples,
274
+ defaultValue = _a.default,
275
+ type = _a.type,
276
+ properties = _a.properties,
277
+ patternProperties = _a.patternProperties,
278
+ remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
279
+
264
280
  var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
265
281
  title: title
266
282
  }), description !== undefined && {
@@ -274,12 +290,14 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
274
290
  }), defaultValue !== undefined && {
275
291
  default: defaultValue
276
292
  });
293
+
277
294
  if (type === 'object') {
278
295
  enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
279
296
  type: type
280
297
  }), properties && {
281
298
  properties: enhanceOptionsSchemaWithDynamicOptions(properties)
282
299
  });
300
+
283
301
  if (patternProperties) {
284
302
  var enhancedPatternProperties = {};
285
303
  Object.keys(patternProperties).forEach(function (opt) {
@@ -297,6 +315,7 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
297
315
  });
298
316
  return enhancedOptionsSchema;
299
317
  }
318
+
300
319
  exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
301
320
  /**
302
321
  * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
@@ -305,11 +324,14 @@ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamic
305
324
  * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
306
325
  * and containing `open: false` for all editor panels in editorConfig
307
326
  */
327
+
308
328
  function enhanceConfig(vizConfig) {
309
329
  var enhancedConfig = Object.assign({}, vizConfig);
330
+
310
331
  if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
311
332
  enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
312
333
  }
334
+
313
335
  enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
314
336
  return Object.assign(Object.assign({}, config), {
315
337
  open: config.open || false
@@ -317,6 +339,7 @@ function enhanceConfig(vizConfig) {
317
339
  });
318
340
  return enhancedConfig;
319
341
  }
342
+
320
343
  exports.enhanceConfig = enhanceConfig;
321
344
  /**
322
345
  * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
@@ -324,6 +347,7 @@ exports.enhanceConfig = enhanceConfig;
324
347
  * @param vizConfig a Visualization Config
325
348
  * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
326
349
  */
350
+
327
351
  function uncollapseEditorConfig(vizConfig) {
328
352
  var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
329
353
  editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
@@ -333,13 +357,16 @@ function uncollapseEditorConfig(vizConfig) {
333
357
  });
334
358
  return editorPanelUncollapsedConfig;
335
359
  }
360
+
336
361
  exports.uncollapseEditorConfig = uncollapseEditorConfig;
362
+
337
363
  function isDynamicOption(option) {
338
364
  return option && typeof option === 'string' && option.trim().startsWith('>') || false;
339
365
  }
340
- exports.isDynamicOption = isDynamicOption;
341
- // private helpers to improve readability of getInitialPreset
366
+
367
+ exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
342
368
  // this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
369
+
343
370
  /**
344
371
  * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
345
372
  * 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
@@ -348,6 +375,7 @@ exports.isDynamicOption = isDynamicOption;
348
375
  *
349
376
  * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
350
377
  */
378
+
351
379
  function hasCompatibleContexts(vizContext, presetContext) {
352
380
  var presetContextKeys = Object.keys(presetContext);
353
381
  return presetContextKeys.every(function (contextKey) {
@@ -357,6 +385,8 @@ function hasCompatibleContexts(vizContext, presetContext) {
357
385
  /**
358
386
  * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
359
387
  */
388
+
389
+
360
390
  function hasCompatibleOptions(vizOptions, presetOptions) {
361
391
  var presetOptionKeys = Object.keys(presetOptions);
362
392
  return presetOptionKeys.every(function (optionKey) {
@@ -371,18 +401,21 @@ function hasCompatibleOptions(vizOptions, presetOptions) {
371
401
  * @param {Object} vizOptions - the current vizOptions definition
372
402
  * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
373
403
  */
404
+
405
+
374
406
  function getInitialPreset(vizContext, vizOptions, presets) {
375
407
  return presets.find(function (preset) {
376
- var presetContext = lodash_1.get(preset, ['value', 'context'], {});
377
- var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
408
+ var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
409
+ var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
378
410
  var presetContextKeys = Object.keys(presetContext);
379
- var presetOptionKeys = Object.keys(presetOptions);
380
- // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
411
+ var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
381
412
  // if not, then the preset is invalid in config.ts
413
+
382
414
  if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
383
415
  return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
384
416
  });
385
417
  }
418
+
386
419
  exports.getInitialPreset = getInitialPreset;
387
420
  /**
388
421
  * generates number precision values for a Select editor
@@ -390,14 +423,16 @@ exports.getInitialPreset = getInitialPreset;
390
423
  * @param {Number} numPrecisionValues - number of integer precision values to generate
391
424
  * @returns {{ label: string; value; string }[]} array of { label, value } tuples
392
425
  */
426
+
393
427
  function generatePrecisionValues(numPrecisionValues) {
394
- return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
428
+ return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
395
429
  return {
396
430
  label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
397
431
  value: i
398
432
  };
399
433
  });
400
434
  }
435
+
401
436
  exports.generatePrecisionValues = generatePrecisionValues;
402
437
  /**
403
438
  * insert layout in layout array, return a new layout array instead of updating the original
@@ -407,12 +442,15 @@ exports.generatePrecisionValues = generatePrecisionValues;
407
442
  * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
408
443
  * @returns {EditorLayoutConfig[][]} new editor layout with insertion
409
444
  */
445
+
410
446
  var insertLayout = function insertLayout(layout, index) {
411
447
  for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
412
448
  layoutItems[_key - 2] = arguments[_key];
413
449
  }
450
+
414
451
  return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
415
452
  };
453
+
416
454
  exports.insertLayout = insertLayout;
417
455
 
418
456
  /***/ }),
@@ -438,7 +476,7 @@ module.exports = require("@babel/runtime/helpers/defineProperty");
438
476
 
439
477
  /***/ }),
440
478
 
441
- /***/ 71:
479
+ /***/ 72:
442
480
  /***/ (function(module, exports, __webpack_require__) {
443
481
 
444
482
  "use strict";
@@ -447,18 +485,31 @@ module.exports = require("@babel/runtime/helpers/defineProperty");
447
485
  Object.defineProperty(exports, "__esModule", {
448
486
  value: true
449
487
  });
488
+
450
489
  var visualization_icons_1 = __webpack_require__(12);
490
+
451
491
  var placeholders_1 = __webpack_require__(11);
492
+
452
493
  var visualization_color_palettes_1 = __webpack_require__(14);
494
+
453
495
  var schemaUtils_1 = __webpack_require__(3);
496
+
454
497
  var PresetPalettes_1 = __webpack_require__(15);
498
+
455
499
  var themes_1 = __webpack_require__(21);
500
+
456
501
  var i18n_1 = __webpack_require__(0);
502
+
457
503
  var VizBehavior_1 = __webpack_require__(2);
504
+
458
505
  var VizCategory_1 = __webpack_require__(8);
506
+
459
507
  var configUtils_1 = __webpack_require__(4);
460
- var DynamicLinkColorsEditor_1 = __webpack_require__(72);
508
+
509
+ var DynamicLinkColorsEditor_1 = __webpack_require__(73);
510
+
461
511
  var BackgroundColor_1 = __webpack_require__(13);
512
+
462
513
  var defaultContext = {
463
514
  linkColorRangeConfig: [{
464
515
  to: 20,
@@ -511,7 +562,7 @@ var optionsSchema = {
511
562
  colorMode: {
512
563
  default: 'categorical',
513
564
  description: 'Specify the coloring method used for the links. When set to "categorical" the nodes and links will be colored based on the "seriesColors". When set to "dynamic" the links will be colored based on the dynamic string assigned to "linkColors".',
514
- pattern: schemaUtils_1.getPattern(['categorical', 'dynamic']),
565
+ pattern: (0, schemaUtils_1.getPattern)(['categorical', 'dynamic']),
515
566
  type: 'string'
516
567
  },
517
568
  linkColors: {
@@ -549,7 +600,7 @@ var optionsSchema = {
549
600
  };
550
601
  var themes = {
551
602
  defaultBackgroundColor: function defaultBackgroundColor(props) {
552
- return themes_1.pick({
603
+ return (0, themes_1.pick)({
553
604
  enterprise: {
554
605
  dark: themes_1.variables.black(props),
555
606
  light: themes_1.variables.backgroundColor(props)
@@ -558,7 +609,7 @@ var themes = {
558
609
  })(props);
559
610
  },
560
611
  nodeTextColor: function nodeTextColor(props) {
561
- return themes_1.pick({
612
+ return (0, themes_1.pick)({
562
613
  enterprise: {
563
614
  dark: themes_1.variables.textColor(props),
564
615
  light: themes_1.variables.textColor(props)
@@ -567,7 +618,7 @@ var themes = {
567
618
  })(props);
568
619
  },
569
620
  tooltipRowColor: function tooltipRowColor(props) {
570
- return themes_1.pick({
621
+ return (0, themes_1.pick)({
571
622
  enterprise: {
572
623
  dark: themes_1.variables.textColor(props),
573
624
  light: themes_1.variables.textColor(props)
@@ -576,7 +627,7 @@ var themes = {
576
627
  })(props);
577
628
  },
578
629
  tooltipLinkHeaderColor: function tooltipLinkHeaderColor(props) {
579
- return themes_1.pick({
630
+ return (0, themes_1.pick)({
580
631
  enterprise: {
581
632
  dark: themes_1.variables.textColor(props),
582
633
  light: themes_1.variables.textColor(props)
@@ -585,7 +636,7 @@ var themes = {
585
636
  })(props);
586
637
  },
587
638
  tooltipHeaderColor: function tooltipHeaderColor(props) {
588
- return themes_1.pick({
639
+ return (0, themes_1.pick)({
589
640
  enterprise: {
590
641
  dark: themes_1.variables.textGray(props),
591
642
  light: themes_1.variables.textGray(props)
@@ -595,7 +646,7 @@ var themes = {
595
646
  }
596
647
  };
597
648
  var editorConfig = [{
598
- label: i18n_1._('Data configurations'),
649
+ label: (0, i18n_1._)('Data configurations'),
599
650
  layout: [[{
600
651
  label: 'Link value',
601
652
  editor: 'editor.columnSelector',
@@ -607,21 +658,21 @@ var editorConfig = [{
607
658
  }
608
659
  }]]
609
660
  }, {
610
- label: i18n_1._('Color and style'),
661
+ label: (0, i18n_1._)('Color and style'),
611
662
  layout: [[{
612
- label: i18n_1._('Color mode'),
663
+ label: (0, i18n_1._)('Color mode'),
613
664
  option: 'colorMode',
614
665
  editor: 'editor.radioBar',
615
666
  editorProps: {
616
667
  values: [{
617
- label: i18n_1._('Categorical'),
668
+ label: (0, i18n_1._)('Categorical'),
618
669
  value: 'categorical'
619
670
  }, {
620
- label: i18n_1._('Dynamic'),
671
+ label: (0, i18n_1._)('Dynamic'),
621
672
  value: 'dynamic'
622
673
  }]
623
674
  }
624
- }], [Object.assign(Object.assign({}, DynamicLinkColorsEditor_1.getDynamicLinkColorsEditor({
675
+ }], [Object.assign(Object.assign({}, (0, DynamicLinkColorsEditor_1.getDynamicLinkColorsEditor)({
625
676
  defaultContext: defaultContext,
626
677
  defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
627
678
  })), {
@@ -629,24 +680,27 @@ var editorConfig = [{
629
680
  var options = _ref.options;
630
681
  return options.colorMode === 'dynamic';
631
682
  }
632
- })], BackgroundColor_1.default({
683
+ })], (0, BackgroundColor_1.default)({
633
684
  themes: themes
634
685
  })]
635
686
  }];
636
687
  /**
637
688
  * visualization configuration
638
689
  */
690
+
639
691
  var config = {
640
692
  /**
641
693
  * unique viz key
642
694
  */
643
695
  key: 'splunk.sankey',
696
+
644
697
  /**
645
698
  * viz name
646
699
  */
647
- name: i18n_1._('Sankey'),
700
+ name: (0, i18n_1._)('Sankey'),
648
701
  category: VizCategory_1.VizCategory.FLOW,
649
702
  status: 'preview',
703
+
650
704
  /**
651
705
  * viz icon
652
706
  */
@@ -657,16 +711,23 @@ var config = {
657
711
  defaultContext: defaultContext,
658
712
  optionsSchema: optionsSchema,
659
713
  editorConfig: editorConfig,
660
- events: {},
714
+ events: {
715
+ 'node.click': {
716
+ description: 'Triggered when user clicks on a node'
717
+ },
718
+ 'link.click': {
719
+ description: 'Triggered when user clicks on a link'
720
+ }
721
+ },
661
722
  supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS, VizBehavior_1.VizBehavior.PLACEHOLDER],
662
723
  themes: themes,
663
724
  requiredProps: []
664
725
  };
665
- exports.default = configUtils_1.enhanceConfig(config);
726
+ exports.default = (0, configUtils_1.enhanceConfig)(config);
666
727
 
667
728
  /***/ }),
668
729
 
669
- /***/ 72:
730
+ /***/ 73:
670
731
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
671
732
 
672
733
  "use strict";
@@ -680,7 +741,7 @@ __webpack_require__.r(__webpack_exports__);
680
741
 
681
742
  var getDynamicLinkColorsEditor = function getDynamicLinkColorsEditor(_ref) {
682
743
  var defaultContext = _ref.defaultContext,
683
- defaultPalettesConfig = _ref.defaultPalettesConfig;
744
+ defaultPalettesConfig = _ref.defaultPalettesConfig;
684
745
  return {
685
746
  label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Link'),
686
747
  option: 'linkColors',
@@ -728,6 +789,7 @@ Object.defineProperty(exports, "__esModule", {
728
789
  });
729
790
  exports.VizCategory = void 0;
730
791
  var VizCategory;
792
+
731
793
  (function (VizCategory) {
732
794
  VizCategory["SINGLE_VALUE"] = "Single Value";
733
795
  VizCategory["TRENDS"] = "Trends";