@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 = 64);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 65);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
@@ -129,13 +129,15 @@ module.exports = require("@splunk/visualization-icons/placeholders");
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
  /***/ }),
@@ -159,6 +162,7 @@ Object.defineProperty(exports, "__esModule", {
159
162
  });
160
163
  exports.VizBehavior = void 0;
161
164
  var VizBehavior;
165
+
162
166
  (function (VizBehavior) {
163
167
  /**
164
168
  * Dynamic Options Behavior.
@@ -178,6 +182,7 @@ var VizBehavior;
178
182
  * missing.
179
183
  * @type {string}
180
184
  */
185
+
181
186
  VizBehavior["PLACEHOLDER"] = "placeholder";
182
187
  VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
183
188
  VizBehavior["TRELLIS"] = "trellis";
@@ -192,6 +197,71 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
192
197
 
193
198
  /***/ }),
194
199
 
200
+ /***/ 39:
201
+ /***/ (function(module, exports, __webpack_require__) {
202
+
203
+ "use strict";
204
+
205
+
206
+ Object.defineProperty(exports, "__esModule", {
207
+ value: true
208
+ });
209
+
210
+ var i18n_1 = __webpack_require__(0);
211
+
212
+ var gauge = {
213
+ label: (0, i18n_1._)('Data display'),
214
+ layout: [[{
215
+ label: (0, i18n_1._)('Value display'),
216
+ option: 'valueDisplay',
217
+ editor: 'editor.radioBar',
218
+ editorProps: {
219
+ values: [{
220
+ label: (0, i18n_1._)('Number'),
221
+ value: 'number'
222
+ }, {
223
+ label: (0, i18n_1._)('Percentage'),
224
+ value: 'percentage'
225
+ }, {
226
+ label: (0, i18n_1._)('Off'),
227
+ value: 'off'
228
+ }]
229
+ }
230
+ }], [{
231
+ label: (0, i18n_1._)('Label display'),
232
+ option: 'labelDisplay',
233
+ editor: 'editor.radioBar',
234
+ editorProps: {
235
+ values: [{
236
+ label: (0, i18n_1._)('Numbers'),
237
+ value: 'number'
238
+ }, {
239
+ label: (0, i18n_1._)('Percentages'),
240
+ value: 'percentage'
241
+ }, {
242
+ label: (0, i18n_1._)('Off'),
243
+ value: 'off'
244
+ }]
245
+ }
246
+ }], [{
247
+ label: (0, i18n_1._)('Orientation'),
248
+ option: 'orientation',
249
+ editor: 'editor.radioBar',
250
+ editorProps: {
251
+ values: [{
252
+ label: (0, i18n_1._)('Vertical'),
253
+ value: 'vertical'
254
+ }, {
255
+ label: (0, i18n_1._)('Horizontal'),
256
+ value: 'horizontal'
257
+ }]
258
+ }
259
+ }]]
260
+ };
261
+ exports.default = gauge;
262
+
263
+ /***/ }),
264
+
195
265
  /***/ 4:
196
266
  /***/ (function(module, exports, __webpack_require__) {
197
267
 
@@ -199,24 +269,33 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
199
269
 
200
270
 
201
271
  var _toConsumableArray = __webpack_require__(1);
272
+
202
273
  var _defineProperty = __webpack_require__(7);
274
+
203
275
  var __rest = this && this.__rest || function (s, e) {
204
276
  var t = {};
277
+
205
278
  for (var p in s) {
206
279
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
207
280
  }
281
+
208
282
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
209
283
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
210
284
  }
211
285
  return t;
212
286
  };
287
+
213
288
  Object.defineProperty(exports, "__esModule", {
214
289
  value: true
215
290
  });
216
291
  exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
292
+
217
293
  var lodash_1 = __webpack_require__(6);
294
+
218
295
  var schemaUtils_1 = __webpack_require__(3);
296
+
219
297
  var VizBehavior_1 = __webpack_require__(2);
298
+
220
299
  var dynamicOptionsDSLType = {
221
300
  type: 'string',
222
301
  pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
@@ -226,20 +305,22 @@ var dynamicOptionsDSLType = {
226
305
  * @param optionsSchema a visualization's options schema
227
306
  * @returns an updated options schema that additionally allows strings starting with > for each option
228
307
  */
308
+
229
309
  function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
230
310
  var enhancedOptionsSchema = {};
231
311
  Object.keys(optionsSchema).forEach(function (key) {
232
312
  var _a = optionsSchema[key],
233
- title = _a.title,
234
- description = _a.description,
235
- readOnly = _a.readOnly,
236
- writeOnly = _a.writeOnly,
237
- examples = _a.examples,
238
- defaultValue = _a.default,
239
- type = _a.type,
240
- properties = _a.properties,
241
- patternProperties = _a.patternProperties,
242
- remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
313
+ title = _a.title,
314
+ description = _a.description,
315
+ readOnly = _a.readOnly,
316
+ writeOnly = _a.writeOnly,
317
+ examples = _a.examples,
318
+ defaultValue = _a.default,
319
+ type = _a.type,
320
+ properties = _a.properties,
321
+ patternProperties = _a.patternProperties,
322
+ remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
323
+
243
324
  var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
244
325
  title: title
245
326
  }), description !== undefined && {
@@ -253,12 +334,14 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
253
334
  }), defaultValue !== undefined && {
254
335
  default: defaultValue
255
336
  });
337
+
256
338
  if (type === 'object') {
257
339
  enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
258
340
  type: type
259
341
  }), properties && {
260
342
  properties: enhanceOptionsSchemaWithDynamicOptions(properties)
261
343
  });
344
+
262
345
  if (patternProperties) {
263
346
  var enhancedPatternProperties = {};
264
347
  Object.keys(patternProperties).forEach(function (opt) {
@@ -276,6 +359,7 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
276
359
  });
277
360
  return enhancedOptionsSchema;
278
361
  }
362
+
279
363
  exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
280
364
  /**
281
365
  * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
@@ -284,11 +368,14 @@ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamic
284
368
  * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
285
369
  * and containing `open: false` for all editor panels in editorConfig
286
370
  */
371
+
287
372
  function enhanceConfig(vizConfig) {
288
373
  var enhancedConfig = Object.assign({}, vizConfig);
374
+
289
375
  if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
290
376
  enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
291
377
  }
378
+
292
379
  enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
293
380
  return Object.assign(Object.assign({}, config), {
294
381
  open: config.open || false
@@ -296,6 +383,7 @@ function enhanceConfig(vizConfig) {
296
383
  });
297
384
  return enhancedConfig;
298
385
  }
386
+
299
387
  exports.enhanceConfig = enhanceConfig;
300
388
  /**
301
389
  * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
@@ -303,6 +391,7 @@ exports.enhanceConfig = enhanceConfig;
303
391
  * @param vizConfig a Visualization Config
304
392
  * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
305
393
  */
394
+
306
395
  function uncollapseEditorConfig(vizConfig) {
307
396
  var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
308
397
  editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
@@ -312,13 +401,16 @@ function uncollapseEditorConfig(vizConfig) {
312
401
  });
313
402
  return editorPanelUncollapsedConfig;
314
403
  }
404
+
315
405
  exports.uncollapseEditorConfig = uncollapseEditorConfig;
406
+
316
407
  function isDynamicOption(option) {
317
408
  return option && typeof option === 'string' && option.trim().startsWith('>') || false;
318
409
  }
319
- exports.isDynamicOption = isDynamicOption;
320
- // private helpers to improve readability of getInitialPreset
410
+
411
+ exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
321
412
  // this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
413
+
322
414
  /**
323
415
  * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
324
416
  * 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
@@ -327,6 +419,7 @@ exports.isDynamicOption = isDynamicOption;
327
419
  *
328
420
  * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
329
421
  */
422
+
330
423
  function hasCompatibleContexts(vizContext, presetContext) {
331
424
  var presetContextKeys = Object.keys(presetContext);
332
425
  return presetContextKeys.every(function (contextKey) {
@@ -336,6 +429,8 @@ function hasCompatibleContexts(vizContext, presetContext) {
336
429
  /**
337
430
  * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
338
431
  */
432
+
433
+
339
434
  function hasCompatibleOptions(vizOptions, presetOptions) {
340
435
  var presetOptionKeys = Object.keys(presetOptions);
341
436
  return presetOptionKeys.every(function (optionKey) {
@@ -350,18 +445,21 @@ function hasCompatibleOptions(vizOptions, presetOptions) {
350
445
  * @param {Object} vizOptions - the current vizOptions definition
351
446
  * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
352
447
  */
448
+
449
+
353
450
  function getInitialPreset(vizContext, vizOptions, presets) {
354
451
  return presets.find(function (preset) {
355
- var presetContext = lodash_1.get(preset, ['value', 'context'], {});
356
- var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
452
+ var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
453
+ var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
357
454
  var presetContextKeys = Object.keys(presetContext);
358
- var presetOptionKeys = Object.keys(presetOptions);
359
- // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
455
+ var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
360
456
  // if not, then the preset is invalid in config.ts
457
+
361
458
  if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
362
459
  return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
363
460
  });
364
461
  }
462
+
365
463
  exports.getInitialPreset = getInitialPreset;
366
464
  /**
367
465
  * generates number precision values for a Select editor
@@ -369,14 +467,16 @@ exports.getInitialPreset = getInitialPreset;
369
467
  * @param {Number} numPrecisionValues - number of integer precision values to generate
370
468
  * @returns {{ label: string; value; string }[]} array of { label, value } tuples
371
469
  */
470
+
372
471
  function generatePrecisionValues(numPrecisionValues) {
373
- return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
472
+ return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
374
473
  return {
375
474
  label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
376
475
  value: i
377
476
  };
378
477
  });
379
478
  }
479
+
380
480
  exports.generatePrecisionValues = generatePrecisionValues;
381
481
  /**
382
482
  * insert layout in layout array, return a new layout array instead of updating the original
@@ -386,76 +486,16 @@ exports.generatePrecisionValues = generatePrecisionValues;
386
486
  * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
387
487
  * @returns {EditorLayoutConfig[][]} new editor layout with insertion
388
488
  */
489
+
389
490
  var insertLayout = function insertLayout(layout, index) {
390
491
  for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
391
492
  layoutItems[_key - 2] = arguments[_key];
392
493
  }
494
+
393
495
  return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
394
496
  };
395
- exports.insertLayout = insertLayout;
396
497
 
397
- /***/ }),
398
-
399
- /***/ 40:
400
- /***/ (function(module, exports, __webpack_require__) {
401
-
402
- "use strict";
403
-
404
-
405
- Object.defineProperty(exports, "__esModule", {
406
- value: true
407
- });
408
- var i18n_1 = __webpack_require__(0);
409
- var gauge = {
410
- label: i18n_1._('Data display'),
411
- layout: [[{
412
- label: i18n_1._('Value display'),
413
- option: 'valueDisplay',
414
- editor: 'editor.radioBar',
415
- editorProps: {
416
- values: [{
417
- label: i18n_1._('Number'),
418
- value: 'number'
419
- }, {
420
- label: i18n_1._('Percentage'),
421
- value: 'percentage'
422
- }, {
423
- label: i18n_1._('Off'),
424
- value: 'off'
425
- }]
426
- }
427
- }], [{
428
- label: i18n_1._('Label display'),
429
- option: 'labelDisplay',
430
- editor: 'editor.radioBar',
431
- editorProps: {
432
- values: [{
433
- label: i18n_1._('Numbers'),
434
- value: 'number'
435
- }, {
436
- label: i18n_1._('Percentages'),
437
- value: 'percentage'
438
- }, {
439
- label: i18n_1._('Off'),
440
- value: 'off'
441
- }]
442
- }
443
- }], [{
444
- label: i18n_1._('Orientation'),
445
- option: 'orientation',
446
- editor: 'editor.radioBar',
447
- editorProps: {
448
- values: [{
449
- label: i18n_1._('Vertical'),
450
- value: 'vertical'
451
- }, {
452
- label: i18n_1._('Horizontal'),
453
- value: 'horizontal'
454
- }]
455
- }
456
- }]]
457
- };
458
- exports.default = gauge;
498
+ exports.insertLayout = insertLayout;
459
499
 
460
500
  /***/ }),
461
501
 
@@ -466,7 +506,7 @@ module.exports = require("lodash");
466
506
 
467
507
  /***/ }),
468
508
 
469
- /***/ 64:
509
+ /***/ 65:
470
510
  /***/ (function(module, exports, __webpack_require__) {
471
511
 
472
512
  "use strict";
@@ -475,17 +515,29 @@ module.exports = require("lodash");
475
515
  Object.defineProperty(exports, "__esModule", {
476
516
  value: true
477
517
  });
518
+
478
519
  var i18n_1 = __webpack_require__(0);
479
- var GaugeMarker_1 = __webpack_require__(65);
520
+
521
+ var GaugeMarker_1 = __webpack_require__(66);
522
+
480
523
  var placeholders_1 = __webpack_require__(11);
524
+
481
525
  var schemaUtils_1 = __webpack_require__(3);
526
+
482
527
  var variables_1 = __webpack_require__(10);
528
+
483
529
  var pick_1 = __webpack_require__(9);
484
- var Gauge_1 = __webpack_require__(40);
530
+
531
+ var Gauge_1 = __webpack_require__(39);
532
+
485
533
  var VizBehavior_1 = __webpack_require__(2);
534
+
486
535
  var VizCategory_1 = __webpack_require__(8);
536
+
487
537
  var configUtils_1 = __webpack_require__(4);
538
+
488
539
  var BackgroundColor_1 = __webpack_require__(13);
540
+
489
541
  var dataContract = {
490
542
  requiredDataSources: [{
491
543
  name: 'primary',
@@ -552,7 +604,7 @@ var optionsSchema = {
552
604
  description: 'Specify whether to display the labels as numbers, percentages, or off. The label center aligns to the value.',
553
605
  default: 'number',
554
606
  type: 'string',
555
- pattern: schemaUtils_1.getPattern(['number', 'percentage', 'off'])
607
+ pattern: (0, schemaUtils_1.getPattern)(['number', 'percentage', 'off'])
556
608
  },
557
609
  majorTickInterval: {
558
610
  description: 'Specify, in pixels, the spacing between major tick marks.',
@@ -563,7 +615,7 @@ var optionsSchema = {
563
615
  description: 'Specify the axis orientation of the gauge.',
564
616
  default: 'vertical',
565
617
  type: 'string',
566
- pattern: schemaUtils_1.getPattern(['horizontal', 'vertical'])
618
+ pattern: (0, schemaUtils_1.getPattern)(['horizontal', 'vertical'])
567
619
  },
568
620
  value: {
569
621
  description: 'Specify the dataSource applied to the value of the marker gauge.',
@@ -574,18 +626,18 @@ var optionsSchema = {
574
626
  description: 'Specify whether to display the value as a number, percentage, or off.',
575
627
  default: 'number',
576
628
  type: 'string',
577
- pattern: schemaUtils_1.getPattern(['number', 'percentage', 'off'])
629
+ pattern: (0, schemaUtils_1.getPattern)(['number', 'percentage', 'off'])
578
630
  }
579
631
  };
580
632
  var themes = {
581
633
  defaultFillColor: function defaultFillColor(props) {
582
- return pick_1.default({
634
+ return (0, pick_1.default)({
583
635
  enterprise: variables_1.default.backgroundColorHover(props),
584
636
  prisma: variables_1.default.neutral100(props)
585
637
  })(props);
586
638
  },
587
639
  defaultBackgroundColor: function defaultBackgroundColor(props) {
588
- return pick_1.default({
640
+ return (0, pick_1.default)({
589
641
  enterprise: {
590
642
  dark: variables_1.default.black(props),
591
643
  light: variables_1.default.backgroundColor(props)
@@ -594,21 +646,22 @@ var themes = {
594
646
  })(props);
595
647
  },
596
648
  majorTickFillColor: function majorTickFillColor(props) {
597
- return pick_1.default({
649
+ return (0, pick_1.default)({
598
650
  enterprise: {
599
651
  light: variables_1.default.gray30(props),
600
652
  dark: variables_1.default.textGray(props) // was #D7DAE0
601
- },
602
653
 
654
+ },
603
655
  prisma: {
604
656
  // TODO: missed colors :(
605
657
  light: variables_1.default.neutral100(props),
606
658
  dark: variables_1.default.contentColorMuted(props) // was #D7DAE0; contentColor
659
+
607
660
  }
608
661
  })(props);
609
662
  },
610
663
  majorTickStrokeColor: function majorTickStrokeColor(props) {
611
- return pick_1.default({
664
+ return (0, pick_1.default)({
612
665
  enterprise: {
613
666
  light: variables_1.default.textGray(props),
614
667
  dark: variables_1.default.contentColorMuted(props)
@@ -617,7 +670,7 @@ var themes = {
617
670
  })(props);
618
671
  },
619
672
  valueMarkerFillColor: function valueMarkerFillColor(props) {
620
- return pick_1.default({
673
+ return (0, pick_1.default)({
621
674
  enterprise: variables_1.default.textColor(props),
622
675
  prisma: {
623
676
  dark: variables_1.default.white(props),
@@ -626,7 +679,7 @@ var themes = {
626
679
  })(props);
627
680
  },
628
681
  valueMarkerLabelFillColor: function valueMarkerLabelFillColor(props) {
629
- return pick_1.default({
682
+ return (0, pick_1.default)({
630
683
  enterprise: {
631
684
  light: variables_1.default.gray96(props),
632
685
  dark: variables_1.default.black(props)
@@ -636,9 +689,9 @@ var themes = {
636
689
  }
637
690
  };
638
691
  var editorConfig = [{
639
- label: i18n_1._('Data configurations'),
692
+ label: (0, i18n_1._)('Data configurations'),
640
693
  layout: [[{
641
- label: i18n_1._('Value'),
694
+ label: (0, i18n_1._)('Value'),
642
695
  editor: 'editor.columnSelector',
643
696
  option: 'value',
644
697
  context: 'defaultContext',
@@ -656,16 +709,17 @@ var editorConfig = [{
656
709
  }
657
710
  }]]
658
711
  }, Gauge_1.default, {
659
- label: i18n_1._('Color and style'),
712
+ label: (0, i18n_1._)('Color and style'),
660
713
  layout: [[{
661
- label: i18n_1._('Gauge ranges'),
714
+ label: (0, i18n_1._)('Gauge ranges'),
662
715
  option: 'gaugeRanges',
663
716
  editor: 'editor.threshold',
664
717
  editorProps: {
665
718
  openRanges: false,
666
719
  isTogglable: false // Can not disable thresholds
720
+
667
721
  }
668
- }], BackgroundColor_1.default({
722
+ }], (0, BackgroundColor_1.default)({
669
723
  themes: themes,
670
724
  labelPosition: 'top'
671
725
  })]
@@ -673,16 +727,19 @@ var editorConfig = [{
673
727
  /**
674
728
  * visualization configuration
675
729
  */
730
+
676
731
  var config = {
677
732
  /**
678
733
  * unique viz key
679
734
  */
680
735
  key: 'splunk.markergauge',
736
+
681
737
  /**
682
738
  * viz name
683
739
  */
684
- name: i18n_1._('Marker gauge'),
740
+ name: (0, i18n_1._)('Marker gauge'),
685
741
  category: VizCategory_1.VizCategory.GAUGE,
742
+
686
743
  /**
687
744
  * viz icon
688
745
  */
@@ -696,11 +753,11 @@ var config = {
696
753
  supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.PLACEHOLDER],
697
754
  themes: themes
698
755
  };
699
- exports.default = configUtils_1.enhanceConfig(config);
756
+ exports.default = (0, configUtils_1.enhanceConfig)(config);
700
757
 
701
758
  /***/ }),
702
759
 
703
- /***/ 65:
760
+ /***/ 66:
704
761
  /***/ (function(module, exports) {
705
762
 
706
763
  module.exports = require("@splunk/react-icons/enterprise/GaugeMarker");
@@ -725,6 +782,7 @@ Object.defineProperty(exports, "__esModule", {
725
782
  });
726
783
  exports.VizCategory = void 0;
727
784
  var VizCategory;
785
+
728
786
  (function (VizCategory) {
729
787
  VizCategory["SINGLE_VALUE"] = "Single Value";
730
788
  VizCategory["TRENDS"] = "Trends";