@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
@@ -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 = 49);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 50);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ([
@@ -114,6 +114,7 @@ Object.defineProperty(exports, "__esModule", {
114
114
  });
115
115
  exports.VizBehavior = void 0;
116
116
  var VizBehavior;
117
+
117
118
  (function (VizBehavior) {
118
119
  /**
119
120
  * Dynamic Options Behavior.
@@ -133,6 +134,7 @@ var VizBehavior;
133
134
  * missing.
134
135
  * @type {string}
135
136
  */
137
+
136
138
  VizBehavior["PLACEHOLDER"] = "placeholder";
137
139
  VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
138
140
  VizBehavior["TRELLIS"] = "trellis";
@@ -152,24 +154,33 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
152
154
 
153
155
 
154
156
  var _toConsumableArray = __webpack_require__(1);
157
+
155
158
  var _defineProperty = __webpack_require__(7);
159
+
156
160
  var __rest = this && this.__rest || function (s, e) {
157
161
  var t = {};
162
+
158
163
  for (var p in s) {
159
164
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
160
165
  }
166
+
161
167
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
162
168
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
163
169
  }
164
170
  return t;
165
171
  };
172
+
166
173
  Object.defineProperty(exports, "__esModule", {
167
174
  value: true
168
175
  });
169
176
  exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
177
+
170
178
  var lodash_1 = __webpack_require__(6);
179
+
171
180
  var schemaUtils_1 = __webpack_require__(3);
181
+
172
182
  var VizBehavior_1 = __webpack_require__(2);
183
+
173
184
  var dynamicOptionsDSLType = {
174
185
  type: 'string',
175
186
  pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
@@ -179,20 +190,22 @@ var dynamicOptionsDSLType = {
179
190
  * @param optionsSchema a visualization's options schema
180
191
  * @returns an updated options schema that additionally allows strings starting with > for each option
181
192
  */
193
+
182
194
  function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
183
195
  var enhancedOptionsSchema = {};
184
196
  Object.keys(optionsSchema).forEach(function (key) {
185
197
  var _a = optionsSchema[key],
186
- title = _a.title,
187
- description = _a.description,
188
- readOnly = _a.readOnly,
189
- writeOnly = _a.writeOnly,
190
- examples = _a.examples,
191
- defaultValue = _a.default,
192
- type = _a.type,
193
- properties = _a.properties,
194
- patternProperties = _a.patternProperties,
195
- remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
198
+ title = _a.title,
199
+ description = _a.description,
200
+ readOnly = _a.readOnly,
201
+ writeOnly = _a.writeOnly,
202
+ examples = _a.examples,
203
+ defaultValue = _a.default,
204
+ type = _a.type,
205
+ properties = _a.properties,
206
+ patternProperties = _a.patternProperties,
207
+ remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
208
+
196
209
  var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
197
210
  title: title
198
211
  }), description !== undefined && {
@@ -206,12 +219,14 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
206
219
  }), defaultValue !== undefined && {
207
220
  default: defaultValue
208
221
  });
222
+
209
223
  if (type === 'object') {
210
224
  enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
211
225
  type: type
212
226
  }), properties && {
213
227
  properties: enhanceOptionsSchemaWithDynamicOptions(properties)
214
228
  });
229
+
215
230
  if (patternProperties) {
216
231
  var enhancedPatternProperties = {};
217
232
  Object.keys(patternProperties).forEach(function (opt) {
@@ -229,6 +244,7 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
229
244
  });
230
245
  return enhancedOptionsSchema;
231
246
  }
247
+
232
248
  exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
233
249
  /**
234
250
  * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
@@ -237,11 +253,14 @@ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamic
237
253
  * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
238
254
  * and containing `open: false` for all editor panels in editorConfig
239
255
  */
256
+
240
257
  function enhanceConfig(vizConfig) {
241
258
  var enhancedConfig = Object.assign({}, vizConfig);
259
+
242
260
  if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
243
261
  enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
244
262
  }
263
+
245
264
  enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
246
265
  return Object.assign(Object.assign({}, config), {
247
266
  open: config.open || false
@@ -249,6 +268,7 @@ function enhanceConfig(vizConfig) {
249
268
  });
250
269
  return enhancedConfig;
251
270
  }
271
+
252
272
  exports.enhanceConfig = enhanceConfig;
253
273
  /**
254
274
  * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
@@ -256,6 +276,7 @@ exports.enhanceConfig = enhanceConfig;
256
276
  * @param vizConfig a Visualization Config
257
277
  * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
258
278
  */
279
+
259
280
  function uncollapseEditorConfig(vizConfig) {
260
281
  var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
261
282
  editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
@@ -265,13 +286,16 @@ function uncollapseEditorConfig(vizConfig) {
265
286
  });
266
287
  return editorPanelUncollapsedConfig;
267
288
  }
289
+
268
290
  exports.uncollapseEditorConfig = uncollapseEditorConfig;
291
+
269
292
  function isDynamicOption(option) {
270
293
  return option && typeof option === 'string' && option.trim().startsWith('>') || false;
271
294
  }
272
- exports.isDynamicOption = isDynamicOption;
273
- // private helpers to improve readability of getInitialPreset
295
+
296
+ exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
274
297
  // this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
298
+
275
299
  /**
276
300
  * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
277
301
  * 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
@@ -280,6 +304,7 @@ exports.isDynamicOption = isDynamicOption;
280
304
  *
281
305
  * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
282
306
  */
307
+
283
308
  function hasCompatibleContexts(vizContext, presetContext) {
284
309
  var presetContextKeys = Object.keys(presetContext);
285
310
  return presetContextKeys.every(function (contextKey) {
@@ -289,6 +314,8 @@ function hasCompatibleContexts(vizContext, presetContext) {
289
314
  /**
290
315
  * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
291
316
  */
317
+
318
+
292
319
  function hasCompatibleOptions(vizOptions, presetOptions) {
293
320
  var presetOptionKeys = Object.keys(presetOptions);
294
321
  return presetOptionKeys.every(function (optionKey) {
@@ -303,18 +330,21 @@ function hasCompatibleOptions(vizOptions, presetOptions) {
303
330
  * @param {Object} vizOptions - the current vizOptions definition
304
331
  * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
305
332
  */
333
+
334
+
306
335
  function getInitialPreset(vizContext, vizOptions, presets) {
307
336
  return presets.find(function (preset) {
308
- var presetContext = lodash_1.get(preset, ['value', 'context'], {});
309
- var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
337
+ var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
338
+ var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
310
339
  var presetContextKeys = Object.keys(presetContext);
311
- var presetOptionKeys = Object.keys(presetOptions);
312
- // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
340
+ var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
313
341
  // if not, then the preset is invalid in config.ts
342
+
314
343
  if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
315
344
  return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
316
345
  });
317
346
  }
347
+
318
348
  exports.getInitialPreset = getInitialPreset;
319
349
  /**
320
350
  * generates number precision values for a Select editor
@@ -322,14 +352,16 @@ exports.getInitialPreset = getInitialPreset;
322
352
  * @param {Number} numPrecisionValues - number of integer precision values to generate
323
353
  * @returns {{ label: string; value; string }[]} array of { label, value } tuples
324
354
  */
355
+
325
356
  function generatePrecisionValues(numPrecisionValues) {
326
- return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
357
+ return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
327
358
  return {
328
359
  label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
329
360
  value: i
330
361
  };
331
362
  });
332
363
  }
364
+
333
365
  exports.generatePrecisionValues = generatePrecisionValues;
334
366
  /**
335
367
  * insert layout in layout array, return a new layout array instead of updating the original
@@ -339,12 +371,15 @@ exports.generatePrecisionValues = generatePrecisionValues;
339
371
  * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
340
372
  * @returns {EditorLayoutConfig[][]} new editor layout with insertion
341
373
  */
374
+
342
375
  var insertLayout = function insertLayout(layout, index) {
343
376
  for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
344
377
  layoutItems[_key - 2] = arguments[_key];
345
378
  }
379
+
346
380
  return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
347
381
  };
382
+
348
383
  exports.insertLayout = insertLayout;
349
384
 
350
385
  /***/ }),
@@ -377,6 +412,7 @@ Object.defineProperty(exports, "__esModule", {
377
412
  });
378
413
  exports.VizCategory = void 0;
379
414
  var VizCategory;
415
+
380
416
  (function (VizCategory) {
381
417
  VizCategory["SINGLE_VALUE"] = "Single Value";
382
418
  VizCategory["TRENDS"] = "Trends";
@@ -421,13 +457,15 @@ module.exports = require("@splunk/visualization-icons/placeholders");
421
457
  Object.defineProperty(exports, "__esModule", {
422
458
  value: true
423
459
  });
460
+
424
461
  var i18n_1 = __webpack_require__(0);
462
+
425
463
  var background = function background(_ref) {
426
464
  var label = _ref.label,
427
- themes = _ref.themes,
428
- labelPosition = _ref.labelPosition;
465
+ themes = _ref.themes,
466
+ labelPosition = _ref.labelPosition;
429
467
  return [{
430
- label: i18n_1._(label || 'Background'),
468
+ label: (0, i18n_1._)(label || 'Background'),
431
469
  option: 'backgroundColor',
432
470
  editor: 'editor.color',
433
471
  editorProps: {
@@ -436,6 +474,7 @@ var background = function background(_ref) {
436
474
  }
437
475
  }];
438
476
  };
477
+
439
478
  exports.default = background;
440
479
 
441
480
  /***/ }),
@@ -474,8 +513,7 @@ module.exports = require("@splunk/visualization-color-palettes/editors/PresetPal
474
513
  /* 36 */,
475
514
  /* 37 */,
476
515
  /* 38 */,
477
- /* 39 */,
478
- /* 40 */
516
+ /* 39 */
479
517
  /***/ (function(module, exports, __webpack_require__) {
480
518
 
481
519
  "use strict";
@@ -484,51 +522,53 @@ module.exports = require("@splunk/visualization-color-palettes/editors/PresetPal
484
522
  Object.defineProperty(exports, "__esModule", {
485
523
  value: true
486
524
  });
525
+
487
526
  var i18n_1 = __webpack_require__(0);
527
+
488
528
  var gauge = {
489
- label: i18n_1._('Data display'),
529
+ label: (0, i18n_1._)('Data display'),
490
530
  layout: [[{
491
- label: i18n_1._('Value display'),
531
+ label: (0, i18n_1._)('Value display'),
492
532
  option: 'valueDisplay',
493
533
  editor: 'editor.radioBar',
494
534
  editorProps: {
495
535
  values: [{
496
- label: i18n_1._('Number'),
536
+ label: (0, i18n_1._)('Number'),
497
537
  value: 'number'
498
538
  }, {
499
- label: i18n_1._('Percentage'),
539
+ label: (0, i18n_1._)('Percentage'),
500
540
  value: 'percentage'
501
541
  }, {
502
- label: i18n_1._('Off'),
542
+ label: (0, i18n_1._)('Off'),
503
543
  value: 'off'
504
544
  }]
505
545
  }
506
546
  }], [{
507
- label: i18n_1._('Label display'),
547
+ label: (0, i18n_1._)('Label display'),
508
548
  option: 'labelDisplay',
509
549
  editor: 'editor.radioBar',
510
550
  editorProps: {
511
551
  values: [{
512
- label: i18n_1._('Numbers'),
552
+ label: (0, i18n_1._)('Numbers'),
513
553
  value: 'number'
514
554
  }, {
515
- label: i18n_1._('Percentages'),
555
+ label: (0, i18n_1._)('Percentages'),
516
556
  value: 'percentage'
517
557
  }, {
518
- label: i18n_1._('Off'),
558
+ label: (0, i18n_1._)('Off'),
519
559
  value: 'off'
520
560
  }]
521
561
  }
522
562
  }], [{
523
- label: i18n_1._('Orientation'),
563
+ label: (0, i18n_1._)('Orientation'),
524
564
  option: 'orientation',
525
565
  editor: 'editor.radioBar',
526
566
  editorProps: {
527
567
  values: [{
528
- label: i18n_1._('Vertical'),
568
+ label: (0, i18n_1._)('Vertical'),
529
569
  value: 'vertical'
530
570
  }, {
531
- label: i18n_1._('Horizontal'),
571
+ label: (0, i18n_1._)('Horizontal'),
532
572
  value: 'horizontal'
533
573
  }]
534
574
  }
@@ -537,6 +577,7 @@ var gauge = {
537
577
  exports.default = gauge;
538
578
 
539
579
  /***/ }),
580
+ /* 40 */,
540
581
  /* 41 */,
541
582
  /* 42 */,
542
583
  /* 43 */,
@@ -545,7 +586,8 @@ exports.default = gauge;
545
586
  /* 46 */,
546
587
  /* 47 */,
547
588
  /* 48 */,
548
- /* 49 */
589
+ /* 49 */,
590
+ /* 50 */
549
591
  /***/ (function(module, exports, __webpack_require__) {
550
592
 
551
593
  "use strict";
@@ -554,21 +596,37 @@ exports.default = gauge;
554
596
  Object.defineProperty(exports, "__esModule", {
555
597
  value: true
556
598
  });
599
+
557
600
  var i18n_1 = __webpack_require__(0);
601
+
558
602
  var schemaUtils_1 = __webpack_require__(3);
603
+
559
604
  var pick_1 = __webpack_require__(9);
605
+
560
606
  var variables_1 = __webpack_require__(10);
607
+
561
608
  var visualization_color_palettes_1 = __webpack_require__(14);
609
+
562
610
  var PresetPalettes_1 = __webpack_require__(15);
563
- var GaugeFiller_1 = __webpack_require__(50);
611
+
612
+ var GaugeFiller_1 = __webpack_require__(51);
613
+
564
614
  var placeholders_1 = __webpack_require__(11);
615
+
565
616
  var VizBehavior_1 = __webpack_require__(2);
617
+
566
618
  var VizCategory_1 = __webpack_require__(8);
619
+
567
620
  var configUtils_1 = __webpack_require__(4);
568
- var Gauge_1 = __webpack_require__(40);
621
+
622
+ var Gauge_1 = __webpack_require__(39);
623
+
569
624
  var BackgroundColor_1 = __webpack_require__(13);
570
- var DynamicGaugeColorEditor_1 = __webpack_require__(51);
571
- var StaticGaugeColorEditor_1 = __webpack_require__(52);
625
+
626
+ var DynamicGaugeColorEditor_1 = __webpack_require__(52);
627
+
628
+ var StaticGaugeColorEditor_1 = __webpack_require__(53);
629
+
572
630
  var dataContract = {
573
631
  requiredDataSources: [{
574
632
  name: 'primary',
@@ -622,7 +680,7 @@ var optionsSchema = {
622
680
  labelDisplay: {
623
681
  default: 'number',
624
682
  description: 'Specify whether to display the labels as numbers, percentages, or off. The label right aligns to the value for horizontal orientation, and top aligns for vertical.',
625
- pattern: schemaUtils_1.getPattern(['number', 'percentage', 'off']),
683
+ pattern: (0, schemaUtils_1.getPattern)(['number', 'percentage', 'off']),
626
684
  type: 'string'
627
685
  },
628
686
  majorTickInterval: {
@@ -633,7 +691,7 @@ var optionsSchema = {
633
691
  orientation: {
634
692
  default: 'vertical',
635
693
  description: 'Specify the axis orientation of the gauge.',
636
- pattern: schemaUtils_1.getPattern(['vertical', 'horizontal']),
694
+ pattern: (0, schemaUtils_1.getPattern)(['vertical', 'horizontal']),
637
695
  type: 'string'
638
696
  },
639
697
  value: {
@@ -644,13 +702,13 @@ var optionsSchema = {
644
702
  valueDisplay: {
645
703
  default: 'number',
646
704
  description: 'Specify whether to display the value as a number, percentage, or off.',
647
- pattern: schemaUtils_1.getPattern(['number', 'percentage', 'off']),
705
+ pattern: (0, schemaUtils_1.getPattern)(['number', 'percentage', 'off']),
648
706
  type: 'string'
649
707
  }
650
708
  };
651
709
  var themes = {
652
710
  defaultBackgroundColor: function defaultBackgroundColor(props) {
653
- return pick_1.default({
711
+ return (0, pick_1.default)({
654
712
  enterprise: {
655
713
  dark: variables_1.default.black(props),
656
714
  light: variables_1.default.backgroundColor(props)
@@ -659,7 +717,7 @@ var themes = {
659
717
  })(props);
660
718
  },
661
719
  defaultBackgroundBarFillColor: function defaultBackgroundBarFillColor(props) {
662
- return pick_1.default({
720
+ return (0, pick_1.default)({
663
721
  enterprise: variables_1.default.backgroundColorHover(props),
664
722
  prisma: {
665
723
  light: variables_1.default.contentColorActive(props),
@@ -668,21 +726,22 @@ var themes = {
668
726
  })(props);
669
727
  },
670
728
  majorTickFillColor: function majorTickFillColor(props) {
671
- return pick_1.default({
729
+ return (0, pick_1.default)({
672
730
  enterprise: {
673
731
  light: variables_1.default.gray30(props),
674
732
  dark: variables_1.default.textGray(props) // was #D7DAE0
675
- },
676
733
 
734
+ },
677
735
  prisma: {
678
736
  // TODO: missed colors :(
679
737
  light: variables_1.default.neutral100(props),
680
738
  dark: variables_1.default.contentColorMuted(props) // was #D7DAE0; contentColor
739
+
681
740
  }
682
741
  })(props);
683
742
  },
684
743
  majorTickStrokeColor: function majorTickStrokeColor(props) {
685
- return pick_1.default({
744
+ return (0, pick_1.default)({
686
745
  enterprise: {
687
746
  light: variables_1.default.textGray(props),
688
747
  dark: variables_1.default.contentColorMuted(props)
@@ -691,7 +750,7 @@ var themes = {
691
750
  })(props);
692
751
  },
693
752
  valueMarkerFillColor: function valueMarkerFillColor(props) {
694
- return pick_1.default({
753
+ return (0, pick_1.default)({
695
754
  enterprise: variables_1.default.textColor(props),
696
755
  prisma: {
697
756
  dark: variables_1.default.white(props),
@@ -700,7 +759,7 @@ var themes = {
700
759
  })(props);
701
760
  },
702
761
  valueMarkerLabelFillColor: function valueMarkerLabelFillColor(props) {
703
- return pick_1.default({
762
+ return (0, pick_1.default)({
704
763
  enterprise: {
705
764
  light: variables_1.default.gray96(props),
706
765
  dark: variables_1.default.black(props)
@@ -717,14 +776,14 @@ var basePresetOptions = {
717
776
  };
718
777
  var presets = [{
719
778
  // dummy context variables to allow for resetting of unused context states
720
- label: i18n_1._('None'),
779
+ label: (0, i18n_1._)('None'),
721
780
  name: 'fillerGauge.none',
722
781
  value: {
723
782
  context: Object.assign({}, basePresetContext),
724
783
  options: Object.assign({}, basePresetOptions)
725
784
  }
726
785
  }, {
727
- label: i18n_1._('Gauge'),
786
+ label: (0, i18n_1._)('Gauge'),
728
787
  name: 'fillerGauge.gauge',
729
788
  value: {
730
789
  context: {
@@ -736,9 +795,9 @@ var presets = [{
736
795
  }
737
796
  }];
738
797
  var editorConfig = [{
739
- label: i18n_1._('Data configurations'),
798
+ label: (0, i18n_1._)('Data configurations'),
740
799
  layout: [[{
741
- label: i18n_1._('Value'),
800
+ label: (0, i18n_1._)('Value'),
742
801
  editor: 'editor.columnSelector',
743
802
  option: 'value',
744
803
  context: 'defaultContext',
@@ -756,44 +815,47 @@ var editorConfig = [{
756
815
  }
757
816
  }]]
758
817
  }, Gauge_1.default, {
759
- label: i18n_1._('Color and style'),
818
+ label: (0, i18n_1._)('Color and style'),
760
819
  layout: [[{
761
- label: i18n_1._('Dynamic elements'),
820
+ label: (0, i18n_1._)('Dynamic elements'),
762
821
  key: 'presetSelector',
763
822
  editor: 'editor.presetSelector',
764
823
  editorProps: {
765
824
  presets: presets,
766
825
  value: function value(_ref) {
767
826
  var context = _ref.context,
768
- options = _ref.options;
769
- var initialPreset = configUtils_1.getInitialPreset(context, options, presets);
827
+ options = _ref.options;
828
+ var initialPreset = (0, configUtils_1.getInitialPreset)(context, options, presets);
770
829
  return initialPreset && initialPreset.label || null;
771
830
  }
772
831
  }
773
- }], [DynamicGaugeColorEditor_1.getDynamicGaugeColorEditor({
832
+ }], [(0, DynamicGaugeColorEditor_1.getDynamicGaugeColorEditor)({
774
833
  defaultContext: defaultContext,
775
834
  defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
776
835
  })], [Object.assign(Object.assign({}, StaticGaugeColorEditor_1.default), {
777
836
  editorProps: {
778
837
  themes: themes
779
838
  }
780
- })], BackgroundColor_1.default({
839
+ })], (0, BackgroundColor_1.default)({
781
840
  themes: themes
782
841
  })]
783
842
  }];
784
843
  /**
785
844
  * visualization configuration
786
845
  */
846
+
787
847
  var config = {
788
848
  /**
789
849
  * unique viz key
790
850
  */
791
851
  key: 'splunk.fillergauge',
852
+
792
853
  /**
793
854
  * viz name
794
855
  */
795
- name: i18n_1._('Filler gauge'),
856
+ name: (0, i18n_1._)('Filler gauge'),
796
857
  category: VizCategory_1.VizCategory.GAUGE,
858
+
797
859
  /**
798
860
  * viz icon
799
861
  */
@@ -807,16 +869,16 @@ var config = {
807
869
  supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.PLACEHOLDER],
808
870
  themes: themes
809
871
  };
810
- exports.default = configUtils_1.enhanceConfig(config);
872
+ exports.default = (0, configUtils_1.enhanceConfig)(config);
811
873
 
812
874
  /***/ }),
813
- /* 50 */
875
+ /* 51 */
814
876
  /***/ (function(module, exports) {
815
877
 
816
878
  module.exports = require("@splunk/react-icons/enterprise/GaugeFiller");
817
879
 
818
880
  /***/ }),
819
- /* 51 */
881
+ /* 52 */
820
882
  /***/ (function(module, exports, __webpack_require__) {
821
883
 
822
884
  "use strict";
@@ -826,42 +888,46 @@ Object.defineProperty(exports, "__esModule", {
826
888
  value: true
827
889
  });
828
890
  exports.getDynamicGaugeColorEditor = void 0;
891
+
829
892
  var i18n_1 = __webpack_require__(0);
893
+
830
894
  var configUtils_1 = __webpack_require__(5);
895
+
831
896
  var getDynamicGaugeColorEditor = function getDynamicGaugeColorEditor(_ref) {
832
897
  var defaultContext = _ref.defaultContext,
833
- defaultPalettesConfig = _ref.defaultPalettesConfig;
898
+ defaultPalettesConfig = _ref.defaultPalettesConfig;
834
899
  return {
835
- label: i18n_1._('Gauge'),
900
+ label: (0, i18n_1._)('Gauge'),
836
901
  option: 'gaugeColor',
837
902
  context: 'gaugeColorConfig',
838
903
  editor: 'editor.dynamicColor',
839
904
  showEditor: function showEditor(_ref2) {
840
905
  var options = _ref2.options;
841
- return configUtils_1.isDynamicOption(options.gaugeColor);
906
+ return (0, configUtils_1.isDynamicOption)(options.gaugeColor);
842
907
  },
843
908
  editorProps: {
844
909
  labelPosition: 'top',
845
- flyoutTitle: i18n_1._('Dynamic coloring: gauge'),
910
+ flyoutTitle: (0, i18n_1._)('Dynamic coloring: gauge'),
846
911
  formatters: [{
847
- label: i18n_1._('Ranges'),
912
+ label: (0, i18n_1._)('Ranges'),
848
913
  value: 'rangeValue',
849
914
  defaults: {
850
915
  value: defaultContext.gaugeColorConfig
851
916
  }
852
917
  }],
853
918
  dataSelectors: [{
854
- label: i18n_1._('Value'),
919
+ label: (0, i18n_1._)('Value'),
855
920
  value: 'value'
856
921
  }],
857
922
  defaultPalettesConfig: defaultPalettesConfig
858
923
  }
859
924
  };
860
925
  };
926
+
861
927
  exports.getDynamicGaugeColorEditor = getDynamicGaugeColorEditor;
862
928
 
863
929
  /***/ }),
864
- /* 52 */
930
+ /* 53 */
865
931
  /***/ (function(module, exports, __webpack_require__) {
866
932
 
867
933
  "use strict";
@@ -870,15 +936,18 @@ exports.getDynamicGaugeColorEditor = getDynamicGaugeColorEditor;
870
936
  Object.defineProperty(exports, "__esModule", {
871
937
  value: true
872
938
  });
939
+
873
940
  var i18n_1 = __webpack_require__(0);
941
+
874
942
  var configUtils_1 = __webpack_require__(5);
943
+
875
944
  var StaticGaugeColorEditor = {
876
- label: i18n_1._('Gauge'),
945
+ label: (0, i18n_1._)('Gauge'),
877
946
  option: 'gaugeColor',
878
947
  editor: 'editor.color',
879
948
  showEditor: function showEditor(_ref) {
880
949
  var options = _ref.options;
881
- return !configUtils_1.isDynamicOption(options.gaugeColor);
950
+ return !(0, configUtils_1.isDynamicOption)(options.gaugeColor);
882
951
  }
883
952
  };
884
953
  exports.default = StaticGaugeColorEditor;