@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 = 78);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 79);
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";
@@ -442,6 +478,7 @@ Object.defineProperty(exports, "__esModule", {
442
478
  });
443
479
  exports.LAYOUT_TYPE = void 0;
444
480
  var LAYOUT_TYPE;
481
+
445
482
  (function (LAYOUT_TYPE) {
446
483
  LAYOUT_TYPE["Off"] = "off";
447
484
  LAYOUT_TYPE["Trellis"] = "trellis";
@@ -477,56 +514,6 @@ var StaticBackgroundColorEditor = {
477
514
  /* 27 */
478
515
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
479
516
 
480
- "use strict";
481
- __webpack_require__.r(__webpack_exports__);
482
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicMajorColorEditor", function() { return getDynamicMajorColorEditor; });
483
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
484
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
485
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
486
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
487
-
488
-
489
- var getDynamicMajorColorEditor = function getDynamicMajorColorEditor(_ref) {
490
- var defaultContext = _ref.defaultContext,
491
- defaultPalettesConfig = _ref.defaultPalettesConfig;
492
- return {
493
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Major value'),
494
- option: 'majorColor',
495
- context: 'majorColorEditorConfig',
496
- editor: 'editor.dynamicColor',
497
- showEditor: function showEditor(_ref2) {
498
- var options = _ref2.options;
499
- return Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.majorColor);
500
- },
501
- editorProps: {
502
- labelPosition: 'top',
503
- flyoutTitle: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic coloring: major value'),
504
- formatters: [{
505
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Ranges'),
506
- value: 'rangeValue',
507
- defaults: {
508
- majorValue: defaultContext.majorColorConfig
509
- }
510
- }, {
511
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Matches'),
512
- value: 'matchValue',
513
- defaults: {
514
- majorValue: defaultContext.majorColorMatchConfig
515
- }
516
- }],
517
- dataSelectors: [{
518
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Major value'),
519
- value: 'majorValue'
520
- }],
521
- defaultPalettesConfig: defaultPalettesConfig
522
- }
523
- };
524
- };
525
-
526
- /***/ }),
527
- /* 28 */
528
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
529
-
530
517
  "use strict";
531
518
  __webpack_require__.r(__webpack_exports__);
532
519
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicTrendColorEditor", function() { return getDynamicTrendColorEditor; });
@@ -538,7 +525,7 @@ __webpack_require__.r(__webpack_exports__);
538
525
 
539
526
  var getDynamicTrendColorEditor = function getDynamicTrendColorEditor(_ref) {
540
527
  var defaultContext = _ref.defaultContext,
541
- defaultPalettesConfig = _ref.defaultPalettesConfig;
528
+ defaultPalettesConfig = _ref.defaultPalettesConfig;
542
529
  return {
543
530
  label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Trend value'),
544
531
  option: 'trendColor',
@@ -568,7 +555,7 @@ var getDynamicTrendColorEditor = function getDynamicTrendColorEditor(_ref) {
568
555
  };
569
556
 
570
557
  /***/ }),
571
- /* 29 */
558
+ /* 28 */
572
559
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
573
560
 
574
561
  "use strict";
@@ -582,7 +569,7 @@ __webpack_require__.r(__webpack_exports__);
582
569
 
583
570
  var getDynamicBackgroundColorEditor = function getDynamicBackgroundColorEditor(_ref) {
584
571
  var defaultContext = _ref.defaultContext,
585
- defaultPalettesConfig = _ref.defaultPalettesConfig;
572
+ defaultPalettesConfig = _ref.defaultPalettesConfig;
586
573
  return {
587
574
  label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Background'),
588
575
  option: 'backgroundColor',
@@ -622,7 +609,7 @@ var getDynamicBackgroundColorEditor = function getDynamicBackgroundColorEditor(_
622
609
  };
623
610
 
624
611
  /***/ }),
625
- /* 30 */
612
+ /* 29 */
626
613
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
627
614
 
628
615
  "use strict";
@@ -672,7 +659,7 @@ var StaticMajorAndTrendLayout = [[{
672
659
  /* harmony default export */ __webpack_exports__["default"] = (StaticMajorAndTrendLayout);
673
660
 
674
661
  /***/ }),
675
- /* 31 */
662
+ /* 30 */
676
663
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
677
664
 
678
665
  "use strict";
@@ -695,7 +682,7 @@ var StaticMajorColorEditor = {
695
682
  /* harmony default export */ __webpack_exports__["default"] = (StaticMajorColorEditor);
696
683
 
697
684
  /***/ }),
698
- /* 32 */
685
+ /* 31 */
699
686
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
700
687
 
701
688
  "use strict";
@@ -722,7 +709,7 @@ var StaticTrendColorEditor = {
722
709
  /* harmony default export */ __webpack_exports__["default"] = (StaticTrendColorEditor);
723
710
 
724
711
  /***/ }),
725
- /* 33 */
712
+ /* 32 */
726
713
  /***/ (function(module, exports, __webpack_require__) {
727
714
 
728
715
  "use strict";
@@ -732,13 +719,19 @@ Object.defineProperty(exports, "__esModule", {
732
719
  value: true
733
720
  });
734
721
  exports.TrellisBackgroundColorEditor = exports.TrellisEditorConfig = void 0;
735
- var React = __webpack_require__(34);
722
+
723
+ var React = __webpack_require__(33);
724
+
736
725
  var i18n_1 = __webpack_require__(0);
737
- var FeatureFlagContext_1 = __webpack_require__(35);
726
+
727
+ var FeatureFlagContext_1 = __webpack_require__(34);
728
+
738
729
  var layoutUtils_1 = __webpack_require__(22);
739
730
  /* eslint-disable react-hooks/rules-of-hooks */
731
+
732
+
740
733
  exports.TrellisEditorConfig = [[{
741
- label: i18n_1._('Trellis layout'),
734
+ label: (0, i18n_1._)('Trellis layout'),
742
735
  option: 'splitByLayout',
743
736
  editor: 'editor.toggle',
744
737
  showEditor: function showEditor() {
@@ -747,7 +740,7 @@ exports.TrellisEditorConfig = [[{
747
740
  return isTrellisFeatureFlagOn;
748
741
  }
749
742
  }], [{
750
- label: i18n_1._('Split by'),
743
+ label: (0, i18n_1._)('Split by'),
751
744
  option: 'trellisSplitBy',
752
745
  editor: 'editor.trellisSplitBy',
753
746
  editorProps: {
@@ -760,13 +753,13 @@ exports.TrellisEditorConfig = [[{
760
753
  return isTrellisFeatureFlagOn && options.splitByLayout === layoutUtils_1.LAYOUT_TYPE.Trellis;
761
754
  }
762
755
  }], [{
763
- label: i18n_1._('Number of columns'),
756
+ label: (0, i18n_1._)('Number of columns'),
764
757
  option: 'trellisColumns',
765
758
  editor: 'editor.number',
766
759
  editorProps: {
767
760
  min: 1
768
761
  },
769
- placeholder: i18n_1._('Auto'),
762
+ placeholder: (0, i18n_1._)('Auto'),
770
763
  showEditor: function showEditor(_ref2) {
771
764
  var options = _ref2.options;
772
765
  var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
@@ -774,7 +767,7 @@ exports.TrellisEditorConfig = [[{
774
767
  return isTrellisFeatureFlagOn && options.splitByLayout === layoutUtils_1.LAYOUT_TYPE.Trellis;
775
768
  }
776
769
  }], [{
777
- label: i18n_1._('Min column width'),
770
+ label: (0, i18n_1._)('Min column width'),
778
771
  option: 'trellisMinColumnWidth',
779
772
  editor: 'editor.number',
780
773
  editorProps: {
@@ -787,7 +780,7 @@ exports.TrellisEditorConfig = [[{
787
780
  return isTrellisFeatureFlagOn && options.splitByLayout === layoutUtils_1.LAYOUT_TYPE.Trellis;
788
781
  }
789
782
  }, {
790
- label: i18n_1._('Row height'),
783
+ label: (0, i18n_1._)('Row height'),
791
784
  option: 'trellisRowHeight',
792
785
  editor: 'editor.number',
793
786
  editorProps: {
@@ -800,7 +793,7 @@ exports.TrellisEditorConfig = [[{
800
793
  return isTrellisFeatureFlagOn && options.splitByLayout === layoutUtils_1.LAYOUT_TYPE.Trellis;
801
794
  }
802
795
  }], [{
803
- label: i18n_1._('Max number of components per page'),
796
+ label: (0, i18n_1._)('Max number of components per page'),
804
797
  option: 'trellisPageCount',
805
798
  editor: 'editor.number',
806
799
  editorProps: {
@@ -814,7 +807,7 @@ exports.TrellisEditorConfig = [[{
814
807
  }
815
808
  }]];
816
809
  exports.TrellisBackgroundColorEditor = {
817
- label: i18n_1._('Trellis background'),
810
+ label: (0, i18n_1._)('Trellis background'),
818
811
  option: 'trellisBackgroundColor',
819
812
  editor: 'editor.color',
820
813
  showEditor: function showEditor(_ref6) {
@@ -826,18 +819,19 @@ exports.TrellisBackgroundColorEditor = {
826
819
  };
827
820
 
828
821
  /***/ }),
829
- /* 34 */
822
+ /* 33 */
830
823
  /***/ (function(module, exports) {
831
824
 
832
825
  module.exports = require("react");
833
826
 
834
827
  /***/ }),
835
- /* 35 */
828
+ /* 34 */
836
829
  /***/ (function(module, exports) {
837
830
 
838
831
  module.exports = require("@splunk/visualization-context/FeatureFlagContext");
839
832
 
840
833
  /***/ }),
834
+ /* 35 */,
841
835
  /* 36 */,
842
836
  /* 37 */,
843
837
  /* 38 */,
@@ -880,36 +874,61 @@ module.exports = require("@splunk/visualization-context/FeatureFlagContext");
880
874
  /* 75 */,
881
875
  /* 76 */,
882
876
  /* 77 */,
883
- /* 78 */
877
+ /* 78 */,
878
+ /* 79 */
884
879
  /***/ (function(module, exports, __webpack_require__) {
885
880
 
886
881
  "use strict";
887
882
 
888
883
 
889
884
  var _toConsumableArray = __webpack_require__(1);
885
+
890
886
  Object.defineProperty(exports, "__esModule", {
891
887
  value: true
892
888
  });
889
+
893
890
  var i18n_1 = __webpack_require__(0);
891
+
894
892
  var schemaUtils_1 = __webpack_require__(3);
893
+
895
894
  var pick_1 = __webpack_require__(9);
895
+
896
896
  var variables_1 = __webpack_require__(10);
897
+
897
898
  var PresetPalettes_1 = __webpack_require__(15);
899
+
898
900
  var visualization_icons_1 = __webpack_require__(12);
901
+
899
902
  var placeholders_1 = __webpack_require__(11);
900
- var StaticMajorAndTrendLayout_1 = __webpack_require__(30);
903
+
904
+ var configUtils_1 = __webpack_require__(5);
905
+
906
+ var StaticMajorAndTrendLayout_1 = __webpack_require__(29);
907
+
901
908
  var VizBehavior_1 = __webpack_require__(2);
902
- var configUtils_1 = __webpack_require__(4);
909
+
910
+ var configUtils_2 = __webpack_require__(4);
911
+
903
912
  var VizCategory_1 = __webpack_require__(8);
904
- var DynamicMajorColorEditor_1 = __webpack_require__(27);
905
- var DynamicTrendColorEditor_1 = __webpack_require__(28);
906
- var DynamicBackgroundColorEditor_1 = __webpack_require__(29);
907
- var StaticMajorColorEditor_1 = __webpack_require__(31);
908
- var StaticTrendColorEditor_1 = __webpack_require__(32);
913
+
914
+ var DynamicMajorColorAndGaugeEditor_1 = __webpack_require__(80);
915
+
916
+ var DynamicTrendColorEditor_1 = __webpack_require__(27);
917
+
918
+ var DynamicBackgroundColorEditor_1 = __webpack_require__(28);
919
+
920
+ var StaticMajorColorEditor_1 = __webpack_require__(30);
921
+
922
+ var StaticTrendColorEditor_1 = __webpack_require__(31);
923
+
909
924
  var StaticBackgroundColorEditor_1 = __webpack_require__(25);
910
- var RadialBackgroundColor_1 = __webpack_require__(79);
911
- var TrellisEditors_1 = __webpack_require__(33);
925
+
926
+ var RadialBackgroundColor_1 = __webpack_require__(81);
927
+
928
+ var TrellisEditors_1 = __webpack_require__(32);
929
+
912
930
  var layoutUtils_1 = __webpack_require__(22);
931
+
913
932
  var dataContract = {
914
933
  requiredDataSources: [{
915
934
  name: 'primary',
@@ -928,13 +947,6 @@ var size = {
928
947
  initialHeight: 250
929
948
  };
930
949
  var defaultContext = {
931
- trendColorConfig: [{
932
- to: 0,
933
- value: '#9E2520'
934
- }, {
935
- from: 0,
936
- value: '#1C6B2D'
937
- }],
938
950
  majorColorConfig: [{
939
951
  to: 20,
940
952
  value: '#D41F1F'
@@ -957,6 +969,13 @@ var defaultContext = {
957
969
  majorColorMatchConfig: [{
958
970
  match: '',
959
971
  value: '#5C33FF'
972
+ }],
973
+ trendColorConfig: [{
974
+ to: 0,
975
+ value: '#9E2520'
976
+ }, {
977
+ from: 0,
978
+ value: '#1C6B2D'
960
979
  }]
961
980
  };
962
981
  var optionsSchema = {
@@ -966,6 +985,31 @@ var optionsSchema = {
966
985
  pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
967
986
  type: 'string'
968
987
  },
988
+ gaugeRanges: {
989
+ default: '> majorColorEditorConfig',
990
+ description: 'Specify the overall range of the gauge as a series of continuous, color-coded subranges. For example, [{"to": 20, "value": "#4BEBA8"}, {"from": 20, "to": 50, "value": "#D41F1F"}, {"from": 50, "value": "#F4DF7A"}]. Must be unbounded, open ranges. Ranges are bound by a separate minValue/maxValue option. Only configured if isGaugeOn is true.',
991
+ type: 'array',
992
+ items: {
993
+ type: 'object',
994
+ properties: {
995
+ from: {
996
+ type: 'number'
997
+ },
998
+ to: {
999
+ type: 'number'
1000
+ },
1001
+ value: {
1002
+ type: 'string',
1003
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
1004
+ }
1005
+ }
1006
+ }
1007
+ },
1008
+ isGaugeOn: {
1009
+ default: false,
1010
+ description: 'Specify if gauge is on.',
1011
+ type: 'boolean'
1012
+ },
969
1013
  majorColor: {
970
1014
  default: '> themes.defaultFontColor',
971
1015
  description: 'Specify the color for the major value. You may use a dataSource to apply the color. The hex value format should be “#ffffff”. The default for enterprise light is "#000000". The default for enterprise dark is "#ffffff". The default for prisma dark is "rgba(255, 255, 255, 0.98)".',
@@ -982,6 +1026,11 @@ var optionsSchema = {
982
1026
  description: 'Specify the field that should be mapped to the major value.',
983
1027
  type: 'string'
984
1028
  },
1029
+ minValue: {
1030
+ default: 0,
1031
+ description: 'Specify the min value of the radial.',
1032
+ type: 'number'
1033
+ },
985
1034
  maxValue: {
986
1035
  default: 100,
987
1036
  description: 'Specify the value the radial fills up to.',
@@ -1020,7 +1069,7 @@ var optionsSchema = {
1020
1069
  default: 'off',
1021
1070
  description: 'Specify the layout method by which to display the visualization, which splits the data into individual visualizations based on a certain category.',
1022
1071
  type: 'string',
1023
- pattern: schemaUtils_1.getPattern([layoutUtils_1.LAYOUT_TYPE.Off, layoutUtils_1.LAYOUT_TYPE.Trellis]),
1072
+ pattern: (0, schemaUtils_1.getPattern)([layoutUtils_1.LAYOUT_TYPE.Off, layoutUtils_1.LAYOUT_TYPE.Trellis]),
1024
1073
  enum: [layoutUtils_1.LAYOUT_TYPE.Off, layoutUtils_1.LAYOUT_TYPE.Trellis]
1025
1074
  },
1026
1075
  trendColor: {
@@ -1032,7 +1081,7 @@ var optionsSchema = {
1032
1081
  trendDisplay: {
1033
1082
  default: 'absolute',
1034
1083
  description: 'Specify how to display the trend value.',
1035
- pattern: schemaUtils_1.getPattern(['percent', 'absolute', 'off']),
1084
+ pattern: (0, schemaUtils_1.getPattern)(['percent', 'absolute', 'off']),
1036
1085
  type: 'string'
1037
1086
  },
1038
1087
  trendValue: {
@@ -1084,7 +1133,7 @@ var optionsSchema = {
1084
1133
  unitPosition: {
1085
1134
  default: 'after',
1086
1135
  description: 'Specify whether the unit text should appear before or after the major value.',
1087
- pattern: schemaUtils_1.getPattern(['before', 'after']),
1136
+ pattern: (0, schemaUtils_1.getPattern)(['before', 'after']),
1088
1137
  type: 'string'
1089
1138
  }
1090
1139
  };
@@ -1100,14 +1149,14 @@ var basePresetOptions = {
1100
1149
  };
1101
1150
  var presets = [{
1102
1151
  // dummy context variables to allow for resetting of unused context states
1103
- label: i18n_1._('None'),
1152
+ label: (0, i18n_1._)('None'),
1104
1153
  name: 'singleValueRadial.none',
1105
1154
  value: {
1106
1155
  context: Object.assign({}, basePresetContext),
1107
1156
  options: Object.assign({}, basePresetOptions)
1108
1157
  }
1109
1158
  }, {
1110
- label: i18n_1._('Major value'),
1159
+ label: (0, i18n_1._)('Major value and gauge'),
1111
1160
  name: 'singleValueRadial.majorValue',
1112
1161
  value: {
1113
1162
  context: Object.assign(Object.assign({}, basePresetContext), {
@@ -1118,7 +1167,7 @@ var presets = [{
1118
1167
  })
1119
1168
  }
1120
1169
  }, {
1121
- label: i18n_1._('Major value and Trend value'),
1170
+ label: (0, i18n_1._)('Major value, trend value, and gauge'),
1122
1171
  name: 'singleValueRadial.majorValueAndTrend',
1123
1172
  value: {
1124
1173
  context: Object.assign(Object.assign({}, basePresetContext), {
@@ -1131,7 +1180,7 @@ var presets = [{
1131
1180
  })
1132
1181
  }
1133
1182
  }, {
1134
- label: i18n_1._('Trend value'),
1183
+ label: (0, i18n_1._)('Trend value'),
1135
1184
  name: 'singleValueRadial.trend',
1136
1185
  value: {
1137
1186
  context: Object.assign(Object.assign({}, basePresetContext), {
@@ -1142,7 +1191,7 @@ var presets = [{
1142
1191
  })
1143
1192
  }
1144
1193
  }, {
1145
- label: i18n_1._('Background'),
1194
+ label: (0, i18n_1._)('Background'),
1146
1195
  name: 'singleValueRadial.background',
1147
1196
  value: {
1148
1197
  context: Object.assign(Object.assign({}, basePresetContext), {
@@ -1155,7 +1204,7 @@ var presets = [{
1155
1204
  }];
1156
1205
  var themes = {
1157
1206
  defaultFontColor: function defaultFontColor(props) {
1158
- return pick_1.default({
1207
+ return (0, pick_1.default)({
1159
1208
  enterprise: {
1160
1209
  dark: variables_1.default.white(props),
1161
1210
  light: variables_1.default.black(props)
@@ -1164,7 +1213,7 @@ var themes = {
1164
1213
  })(props);
1165
1214
  },
1166
1215
  defaultBackgroundColor: function defaultBackgroundColor(props) {
1167
- return pick_1.default({
1216
+ return (0, pick_1.default)({
1168
1217
  enterprise: {
1169
1218
  dark: variables_1.default.black(props),
1170
1219
  light: variables_1.default.white(props)
@@ -1173,7 +1222,7 @@ var themes = {
1173
1222
  })(props);
1174
1223
  },
1175
1224
  defaultRadialBackgroundColor: function defaultRadialBackgroundColor(props) {
1176
- return pick_1.default({
1225
+ return (0, pick_1.default)({
1177
1226
  enterprise: {
1178
1227
  dark: 'rgba(255, 255, 255, 0.15)',
1179
1228
  light: 'rgba(0, 0, 0, 0.1)'
@@ -1183,9 +1232,9 @@ var themes = {
1183
1232
  }
1184
1233
  };
1185
1234
  var editorConfig = [{
1186
- label: i18n_1._('Data configurations'),
1235
+ label: (0, i18n_1._)('Data configurations'),
1187
1236
  layout: [[{
1188
- label: i18n_1._('Value'),
1237
+ label: (0, i18n_1._)('Value'),
1189
1238
  editor: 'editor.columnSelector',
1190
1239
  option: 'majorValue',
1191
1240
  context: 'valuesContext',
@@ -1208,20 +1257,20 @@ var editorConfig = [{
1208
1257
  }
1209
1258
  }]]
1210
1259
  }, {
1211
- label: i18n_1._('Data display'),
1260
+ label: (0, i18n_1._)('Data display'),
1212
1261
  layout: [].concat(_toConsumableArray(StaticMajorAndTrendLayout_1.default), [[{
1213
- label: i18n_1._('Trend display'),
1262
+ label: (0, i18n_1._)('Trend display'),
1214
1263
  option: 'trendDisplay',
1215
1264
  editor: 'editor.select',
1216
1265
  editorProps: {
1217
1266
  values: [{
1218
- label: i18n_1._('Percent'),
1267
+ label: (0, i18n_1._)('Percent'),
1219
1268
  value: 'percent'
1220
1269
  }, {
1221
- label: i18n_1._('Absolute'),
1270
+ label: (0, i18n_1._)('Absolute'),
1222
1271
  value: 'absolute'
1223
1272
  }, {
1224
- label: i18n_1._('Off'),
1273
+ label: (0, i18n_1._)('Off'),
1225
1274
  value: 'off'
1226
1275
  }]
1227
1276
  },
@@ -1229,19 +1278,27 @@ var editorConfig = [{
1229
1278
  var options = _ref2.options;
1230
1279
  return options.showValue || options.showValue === undefined;
1231
1280
  }
1281
+ }], [{
1282
+ label: (0, i18n_1._)('Min'),
1283
+ option: 'minValue',
1284
+ editor: 'editor.number'
1285
+ }, {
1286
+ label: (0, i18n_1._)('Max'),
1287
+ option: 'maxValue',
1288
+ editor: 'editor.number'
1232
1289
  }]], _toConsumableArray(TrellisEditors_1.TrellisEditorConfig))
1233
1290
  }, {
1234
- label: i18n_1._('Color and style'),
1291
+ label: (0, i18n_1._)('Color and style'),
1235
1292
  layout: [[{
1236
- label: i18n_1._('Dynamic elements'),
1293
+ label: (0, i18n_1._)('Dynamic elements'),
1237
1294
  key: 'presetSelector',
1238
1295
  editor: 'editor.presetSelector',
1239
1296
  editorProps: {
1240
1297
  presets: presets,
1241
1298
  value: function value(_ref3) {
1242
1299
  var context = _ref3.context,
1243
- options = _ref3.options;
1244
- var initialPreset = configUtils_1.getInitialPreset(context, options, presets);
1300
+ options = _ref3.options;
1301
+ var initialPreset = (0, configUtils_2.getInitialPreset)(context, options, presets);
1245
1302
  return initialPreset && initialPreset.label || null;
1246
1303
  }
1247
1304
  }
@@ -1249,17 +1306,17 @@ var editorConfig = [{
1249
1306
  editorProps: {
1250
1307
  themes: themes
1251
1308
  }
1252
- })], [DynamicMajorColorEditor_1.getDynamicMajorColorEditor({
1309
+ })], [(0, DynamicMajorColorAndGaugeEditor_1.getDynamicMajorColorAndGaugeEditor)({
1253
1310
  defaultContext: defaultContext,
1254
1311
  defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
1255
1312
  })], [Object.assign(Object.assign({}, StaticTrendColorEditor_1.default), {
1256
1313
  editorProps: {
1257
1314
  themes: themes
1258
1315
  }
1259
- })], [DynamicTrendColorEditor_1.getDynamicTrendColorEditor({
1316
+ })], [(0, DynamicTrendColorEditor_1.getDynamicTrendColorEditor)({
1260
1317
  defaultContext: defaultContext,
1261
1318
  defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
1262
- })], RadialBackgroundColor_1.default({
1319
+ })], (0, RadialBackgroundColor_1.default)({
1263
1320
  themes: themes
1264
1321
  }), [Object.assign(Object.assign({}, StaticBackgroundColorEditor_1.default), {
1265
1322
  editorProps: {
@@ -1269,24 +1326,35 @@ var editorConfig = [{
1269
1326
  editorProps: {
1270
1327
  themes: themes
1271
1328
  }
1272
- })], [DynamicBackgroundColorEditor_1.getDynamicBackgroundColorEditor({
1329
+ })], [(0, DynamicBackgroundColorEditor_1.getDynamicBackgroundColorEditor)({
1273
1330
  defaultContext: defaultContext,
1274
1331
  defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
1275
- })]]
1332
+ })], [{
1333
+ label: (0, i18n_1._)('Show gauge ranges'),
1334
+ option: 'isGaugeOn',
1335
+ editor: 'editor.toggle',
1336
+ showEditor: function showEditor(_ref4) {
1337
+ var options = _ref4.options;
1338
+ return (0, configUtils_1.isDynamicOption)(options.majorColor);
1339
+ }
1340
+ }]]
1276
1341
  }];
1277
1342
  /**
1278
1343
  * visualization configuration
1279
1344
  */
1345
+
1280
1346
  var config = {
1281
1347
  /**
1282
1348
  * unique viz key
1283
1349
  */
1284
1350
  key: 'splunk.singlevalueradial',
1351
+
1285
1352
  /**
1286
1353
  * viz name
1287
1354
  */
1288
- name: i18n_1._('Single value radial'),
1355
+ name: (0, i18n_1._)('Single value radial'),
1289
1356
  category: VizCategory_1.VizCategory.SINGLE_VALUE,
1357
+
1290
1358
  /**
1291
1359
  * viz icon
1292
1360
  */
@@ -1306,10 +1374,54 @@ var config = {
1306
1374
  supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS, VizBehavior_1.VizBehavior.PLACEHOLDER, VizBehavior_1.VizBehavior.TRELLIS],
1307
1375
  themes: themes
1308
1376
  };
1309
- exports.default = configUtils_1.enhanceConfig(config);
1377
+ exports.default = (0, configUtils_2.enhanceConfig)(config);
1310
1378
 
1311
1379
  /***/ }),
1312
- /* 79 */
1380
+ /* 80 */
1381
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1382
+
1383
+ "use strict";
1384
+ __webpack_require__.r(__webpack_exports__);
1385
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicMajorColorAndGaugeEditor", function() { return getDynamicMajorColorAndGaugeEditor; });
1386
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1387
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
1388
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
1389
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
1390
+
1391
+
1392
+ var getDynamicMajorColorAndGaugeEditor = function getDynamicMajorColorAndGaugeEditor(_ref) {
1393
+ var defaultContext = _ref.defaultContext,
1394
+ defaultPalettesConfig = _ref.defaultPalettesConfig;
1395
+ return {
1396
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Major value and gauge'),
1397
+ option: 'majorColor',
1398
+ context: 'majorColorEditorConfig',
1399
+ editor: 'editor.dynamicColor',
1400
+ showEditor: function showEditor(_ref2) {
1401
+ var options = _ref2.options;
1402
+ return Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.majorColor);
1403
+ },
1404
+ editorProps: {
1405
+ labelPosition: 'top',
1406
+ flyoutTitle: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic coloring: major value'),
1407
+ formatters: [{
1408
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Ranges'),
1409
+ value: 'rangeValue',
1410
+ defaults: {
1411
+ majorValue: defaultContext.majorColorConfig
1412
+ }
1413
+ }],
1414
+ dataSelectors: [{
1415
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Major value'),
1416
+ value: 'majorValue'
1417
+ }],
1418
+ defaultPalettesConfig: defaultPalettesConfig
1419
+ }
1420
+ };
1421
+ };
1422
+
1423
+ /***/ }),
1424
+ /* 81 */
1313
1425
  /***/ (function(module, exports, __webpack_require__) {
1314
1426
 
1315
1427
  "use strict";
@@ -1318,13 +1430,15 @@ exports.default = configUtils_1.enhanceConfig(config);
1318
1430
  Object.defineProperty(exports, "__esModule", {
1319
1431
  value: true
1320
1432
  });
1433
+
1321
1434
  var i18n_1 = __webpack_require__(0);
1435
+
1322
1436
  var radialBackground = function radialBackground(_ref) {
1323
1437
  var label = _ref.label,
1324
- themes = _ref.themes,
1325
- labelPosition = _ref.labelPosition;
1438
+ themes = _ref.themes,
1439
+ labelPosition = _ref.labelPosition;
1326
1440
  return [{
1327
- label: i18n_1._(label || 'Radial background'),
1441
+ label: (0, i18n_1._)(label || 'Radial background'),
1328
1442
  option: 'radialBackgroundColor',
1329
1443
  editor: 'editor.color',
1330
1444
  editorProps: {
@@ -1333,6 +1447,7 @@ var radialBackground = function radialBackground(_ref) {
1333
1447
  }
1334
1448
  }];
1335
1449
  };
1450
+
1336
1451
  exports.default = radialBackground;
1337
1452
 
1338
1453
  /***/ })