@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.
- package/Area.config.js +318 -234
- package/Area.config.js.map +1 -1
- package/Area.js +1131 -766
- package/Area.js.map +1 -1
- package/Bar.config.js +317 -233
- package/Bar.config.js.map +1 -1
- package/Bar.js +1007 -594
- package/Bar.js.map +1 -1
- package/Bubble.config.js +234 -160
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +912 -509
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +80 -29
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +691 -319
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +308 -223
- package/Column.config.js.map +1 -1
- package/Column.js +1011 -587
- package/Column.js.map +1 -1
- package/Ellipse.config.js +127 -62
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +576 -286
- package/Ellipse.js.map +1 -1
- package/Events.config.js +111 -29
- package/Events.config.js.map +1 -1
- package/Events.js +998 -527
- package/Events.js.map +1 -1
- package/FillerGauge.config.js +142 -73
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +962 -572
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +70 -26
- package/Image.config.js.map +1 -1
- package/Image.js +524 -253
- package/Image.js.map +1 -1
- package/Line.config.js +326 -242
- package/Line.config.js.map +1 -1
- package/Line.js +1022 -606
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +99 -49
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +1184 -762
- package/LinkGraph.js.map +1 -1
- package/MIGRATION.md +1082 -0
- package/Map.config.js +311 -167
- package/Map.config.js.map +1 -1
- package/Map.js +1479 -873
- package/Map.js.map +1 -1
- package/Markdown.config.js +93 -43
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +603 -332
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +163 -105
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +1025 -628
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +95 -41
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +993 -622
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +99 -46
- package/Pie.config.js.map +1 -1
- package/Pie.js +847 -442
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +114 -62
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +1097 -633
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +131 -65
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +580 -288
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +103 -41
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +1128 -586
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +231 -157
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +904 -504
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +212 -142
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +1506 -956
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +294 -233
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +208 -138
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +1375 -914
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +252 -137
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +2194 -1069
- package/SingleValueRadial.js.map +1 -1
- package/SparkLine.js +172 -83
- package/SparkLine.js.map +1 -1
- package/Table.config.js +123 -70
- package/Table.config.js.map +1 -1
- package/Table.js +1094 -590
- package/Table.js.map +1 -1
- package/common/Charting.js +147 -75
- package/common/Charting.js.map +1 -1
- package/common/ChartingApi.js +18 -7
- package/common/ChartingApi.js.map +1 -1
- package/common/EventsDoc.js +91 -36
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +70 -60
- package/common/GaugeMajorTicks.js.map +1 -1
- package/common/GaugeValueMarker.js +45 -36
- package/common/GaugeValueMarker.js.map +1 -1
- package/common/OptionsDoc.js +177 -86
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.js +65 -32
- package/common/OverviewDoc.js.map +1 -1
- package/common/SplunkVisualization.js +34 -7
- package/common/SplunkVisualization.js.map +1 -1
- package/common/SplunkVisualizationApi.js +10 -4
- package/common/SplunkVisualizationApi.js.map +1 -1
- package/common/ThemesDoc.js +41 -28
- package/common/ThemesDoc.js.map +1 -1
- package/common/chartingUtils.js +56 -24
- package/common/chartingUtils.js.map +1 -1
- package/common/docUtils.js +15 -5
- package/common/docUtils.js.map +1 -1
- package/common/gaugeUtils.js +238 -155
- package/common/gaugeUtils.js.map +1 -1
- package/common/shapeUtils.js +34 -16
- package/common/shapeUtils.js.map +1 -1
- package/common/utils/configUtils.js +59 -23
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/dataUtils.js +9 -4
- package/common/utils/dataUtils.js.map +1 -1
- package/common/utils/hocUtils.js +5 -3
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/layoutUtils.js +3 -2
- package/common/utils/layoutUtils.js.map +1 -1
- package/common/utils/mapUtils.js +370 -206
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/singleValueUtils.js +243 -198
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +36 -9
- package/common/utils/testHelper.js.map +1 -1
- package/common/utils/trellisUtils.js +87 -26
- package/common/utils/trellisUtils.js.map +1 -1
- package/common/utils/urlUtils.js +4 -2
- package/common/utils/urlUtils.js.map +1 -1
- package/common/withDashboardViz.js +375 -193
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +25 -27
package/SingleValue.config.js
CHANGED
|
@@ -87,7 +87,7 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 75);
|
|
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
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
/*
|
|
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
|
-
|
|
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
|
-
/*
|
|
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
|
-
/*
|
|
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
|
-
/*
|
|
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
|
-
/*
|
|
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
|
-
|
|
722
|
+
|
|
723
|
+
var React = __webpack_require__(33);
|
|
724
|
+
|
|
736
725
|
var i18n_1 = __webpack_require__(0);
|
|
737
|
-
|
|
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,24 +819,24 @@ exports.TrellisBackgroundColorEditor = {
|
|
|
826
819
|
};
|
|
827
820
|
|
|
828
821
|
/***/ }),
|
|
829
|
-
/*
|
|
822
|
+
/* 33 */
|
|
830
823
|
/***/ (function(module, exports) {
|
|
831
824
|
|
|
832
825
|
module.exports = require("react");
|
|
833
826
|
|
|
834
827
|
/***/ }),
|
|
835
|
-
/*
|
|
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 */,
|
|
844
838
|
/* 39 */,
|
|
845
|
-
/* 40
|
|
846
|
-
/* 41 */
|
|
839
|
+
/* 40 */
|
|
847
840
|
/***/ (function(module, exports, __webpack_require__) {
|
|
848
841
|
|
|
849
842
|
"use strict";
|
|
@@ -886,6 +879,56 @@ exports.defaultContext = {
|
|
|
886
879
|
}]
|
|
887
880
|
};
|
|
888
881
|
|
|
882
|
+
/***/ }),
|
|
883
|
+
/* 41 */
|
|
884
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
885
|
+
|
|
886
|
+
"use strict";
|
|
887
|
+
__webpack_require__.r(__webpack_exports__);
|
|
888
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicMajorColorEditor", function() { return getDynamicMajorColorEditor; });
|
|
889
|
+
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
890
|
+
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
|
891
|
+
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
|
|
892
|
+
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
var getDynamicMajorColorEditor = function getDynamicMajorColorEditor(_ref) {
|
|
896
|
+
var defaultContext = _ref.defaultContext,
|
|
897
|
+
defaultPalettesConfig = _ref.defaultPalettesConfig;
|
|
898
|
+
return {
|
|
899
|
+
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Major value'),
|
|
900
|
+
option: 'majorColor',
|
|
901
|
+
context: 'majorColorEditorConfig',
|
|
902
|
+
editor: 'editor.dynamicColor',
|
|
903
|
+
showEditor: function showEditor(_ref2) {
|
|
904
|
+
var options = _ref2.options;
|
|
905
|
+
return Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.majorColor);
|
|
906
|
+
},
|
|
907
|
+
editorProps: {
|
|
908
|
+
labelPosition: 'top',
|
|
909
|
+
flyoutTitle: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic coloring: major value'),
|
|
910
|
+
formatters: [{
|
|
911
|
+
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Ranges'),
|
|
912
|
+
value: 'rangeValue',
|
|
913
|
+
defaults: {
|
|
914
|
+
majorValue: defaultContext.majorColorConfig
|
|
915
|
+
}
|
|
916
|
+
}, {
|
|
917
|
+
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Matches'),
|
|
918
|
+
value: 'matchValue',
|
|
919
|
+
defaults: {
|
|
920
|
+
majorValue: defaultContext.majorColorMatchConfig
|
|
921
|
+
}
|
|
922
|
+
}],
|
|
923
|
+
dataSelectors: [{
|
|
924
|
+
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Major value'),
|
|
925
|
+
value: 'majorValue'
|
|
926
|
+
}],
|
|
927
|
+
defaultPalettesConfig: defaultPalettesConfig
|
|
928
|
+
}
|
|
929
|
+
};
|
|
930
|
+
};
|
|
931
|
+
|
|
889
932
|
/***/ }),
|
|
890
933
|
/* 42 */,
|
|
891
934
|
/* 43 */,
|
|
@@ -919,37 +962,61 @@ exports.defaultContext = {
|
|
|
919
962
|
/* 71 */,
|
|
920
963
|
/* 72 */,
|
|
921
964
|
/* 73 */,
|
|
922
|
-
/* 74
|
|
965
|
+
/* 74 */,
|
|
966
|
+
/* 75 */
|
|
923
967
|
/***/ (function(module, exports, __webpack_require__) {
|
|
924
968
|
|
|
925
969
|
"use strict";
|
|
926
970
|
|
|
927
971
|
|
|
928
972
|
var _toConsumableArray = __webpack_require__(1);
|
|
973
|
+
|
|
929
974
|
Object.defineProperty(exports, "__esModule", {
|
|
930
975
|
value: true
|
|
931
976
|
});
|
|
977
|
+
|
|
932
978
|
var i18n_1 = __webpack_require__(0);
|
|
979
|
+
|
|
933
980
|
var schemaUtils_1 = __webpack_require__(3);
|
|
981
|
+
|
|
934
982
|
var PresetPalettes_1 = __webpack_require__(15);
|
|
935
|
-
|
|
983
|
+
|
|
984
|
+
var variables_1 = __webpack_require__(76);
|
|
985
|
+
|
|
936
986
|
var pick_1 = __webpack_require__(9);
|
|
987
|
+
|
|
937
988
|
var variables_2 = __webpack_require__(10);
|
|
989
|
+
|
|
938
990
|
var visualization_icons_1 = __webpack_require__(12);
|
|
991
|
+
|
|
939
992
|
var placeholders_1 = __webpack_require__(11);
|
|
940
|
-
|
|
993
|
+
|
|
994
|
+
var singleValueContext_1 = __webpack_require__(40);
|
|
995
|
+
|
|
941
996
|
var VizBehavior_1 = __webpack_require__(2);
|
|
942
|
-
|
|
943
|
-
var
|
|
944
|
-
|
|
945
|
-
var
|
|
946
|
-
|
|
947
|
-
var
|
|
997
|
+
|
|
998
|
+
var DynamicMajorColorEditor_1 = __webpack_require__(41);
|
|
999
|
+
|
|
1000
|
+
var DynamicTrendColorEditor_1 = __webpack_require__(27);
|
|
1001
|
+
|
|
1002
|
+
var DynamicBackgroundColorEditor_1 = __webpack_require__(28);
|
|
1003
|
+
|
|
1004
|
+
var StaticMajorAndTrendLayout_1 = __webpack_require__(29);
|
|
1005
|
+
|
|
1006
|
+
var StaticMajorColorEditor_1 = __webpack_require__(30);
|
|
1007
|
+
|
|
1008
|
+
var StaticTrendColorEditor_1 = __webpack_require__(31);
|
|
1009
|
+
|
|
948
1010
|
var StaticBackgroundColorEditor_1 = __webpack_require__(25);
|
|
1011
|
+
|
|
949
1012
|
var configUtils_1 = __webpack_require__(4);
|
|
950
|
-
|
|
1013
|
+
|
|
1014
|
+
var TrellisEditors_1 = __webpack_require__(32);
|
|
1015
|
+
|
|
951
1016
|
var VizCategory_1 = __webpack_require__(8);
|
|
1017
|
+
|
|
952
1018
|
var layoutUtils_1 = __webpack_require__(22);
|
|
1019
|
+
|
|
953
1020
|
var dataContract = {
|
|
954
1021
|
requiredDataSources: [{
|
|
955
1022
|
name: 'primary',
|
|
@@ -1030,7 +1097,7 @@ var optionsSchema = {
|
|
|
1030
1097
|
default: 'off',
|
|
1031
1098
|
description: 'Specify the layout method by which to display the visualization, which splits the data into individual visualizations based on a certain category.',
|
|
1032
1099
|
type: 'string',
|
|
1033
|
-
pattern: schemaUtils_1.getPattern([layoutUtils_1.LAYOUT_TYPE.Off, layoutUtils_1.LAYOUT_TYPE.Trellis]),
|
|
1100
|
+
pattern: (0, schemaUtils_1.getPattern)([layoutUtils_1.LAYOUT_TYPE.Off, layoutUtils_1.LAYOUT_TYPE.Trellis]),
|
|
1034
1101
|
enum: [layoutUtils_1.LAYOUT_TYPE.Off, layoutUtils_1.LAYOUT_TYPE.Trellis]
|
|
1035
1102
|
},
|
|
1036
1103
|
sparklineAreaColor: {
|
|
@@ -1042,7 +1109,7 @@ var optionsSchema = {
|
|
|
1042
1109
|
sparklineDisplay: {
|
|
1043
1110
|
default: 'below',
|
|
1044
1111
|
description: 'Specify how to display a sparkline.',
|
|
1045
|
-
pattern: schemaUtils_1.getPattern(['before', 'after', 'below', 'off']),
|
|
1112
|
+
pattern: (0, schemaUtils_1.getPattern)(['before', 'after', 'below', 'off']),
|
|
1046
1113
|
type: 'string'
|
|
1047
1114
|
},
|
|
1048
1115
|
sparklineHighlightDots: {
|
|
@@ -1078,7 +1145,7 @@ var optionsSchema = {
|
|
|
1078
1145
|
trendDisplay: {
|
|
1079
1146
|
default: 'absolute',
|
|
1080
1147
|
description: 'Specify how to display the trend value.',
|
|
1081
|
-
pattern: schemaUtils_1.getPattern(['percent', 'absolute', 'off']),
|
|
1148
|
+
pattern: (0, schemaUtils_1.getPattern)(['percent', 'absolute', 'off']),
|
|
1082
1149
|
type: 'string'
|
|
1083
1150
|
},
|
|
1084
1151
|
trendFontSize: {
|
|
@@ -1139,7 +1206,7 @@ var optionsSchema = {
|
|
|
1139
1206
|
unitPosition: {
|
|
1140
1207
|
default: 'after',
|
|
1141
1208
|
description: 'Specify whether the unit text should appear before or after the major value.',
|
|
1142
|
-
pattern: schemaUtils_1.getPattern(['before', 'after']),
|
|
1209
|
+
pattern: (0, schemaUtils_1.getPattern)(['before', 'after']),
|
|
1143
1210
|
type: 'string'
|
|
1144
1211
|
}
|
|
1145
1212
|
};
|
|
@@ -1155,14 +1222,14 @@ var basePresetOptions = {
|
|
|
1155
1222
|
};
|
|
1156
1223
|
var presets = [{
|
|
1157
1224
|
// dummy context variables to allow for resetting of unused context states
|
|
1158
|
-
label: i18n_1._('None'),
|
|
1225
|
+
label: (0, i18n_1._)('None'),
|
|
1159
1226
|
name: 'singleValue.none',
|
|
1160
1227
|
value: {
|
|
1161
1228
|
context: Object.assign({}, basePresetContext),
|
|
1162
1229
|
options: Object.assign({}, basePresetOptions)
|
|
1163
1230
|
}
|
|
1164
1231
|
}, {
|
|
1165
|
-
label: i18n_1._('Major value'),
|
|
1232
|
+
label: (0, i18n_1._)('Major value'),
|
|
1166
1233
|
name: 'singleValue.majorValue',
|
|
1167
1234
|
value: {
|
|
1168
1235
|
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
@@ -1173,7 +1240,7 @@ var presets = [{
|
|
|
1173
1240
|
})
|
|
1174
1241
|
}
|
|
1175
1242
|
}, {
|
|
1176
|
-
label: i18n_1._('Trend value'),
|
|
1243
|
+
label: (0, i18n_1._)('Trend value'),
|
|
1177
1244
|
name: 'singleValue.trend',
|
|
1178
1245
|
value: {
|
|
1179
1246
|
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
@@ -1184,7 +1251,7 @@ var presets = [{
|
|
|
1184
1251
|
})
|
|
1185
1252
|
}
|
|
1186
1253
|
}, {
|
|
1187
|
-
label: i18n_1._('Major value and Trend value'),
|
|
1254
|
+
label: (0, i18n_1._)('Major value and Trend value'),
|
|
1188
1255
|
name: 'singleValue.majorValueAndTrend',
|
|
1189
1256
|
value: {
|
|
1190
1257
|
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
@@ -1197,7 +1264,7 @@ var presets = [{
|
|
|
1197
1264
|
})
|
|
1198
1265
|
}
|
|
1199
1266
|
}, {
|
|
1200
|
-
label: i18n_1._('Background'),
|
|
1267
|
+
label: (0, i18n_1._)('Background'),
|
|
1201
1268
|
name: 'singleValue.background',
|
|
1202
1269
|
value: {
|
|
1203
1270
|
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
@@ -1207,15 +1274,15 @@ var presets = [{
|
|
|
1207
1274
|
backgroundColor: '> majorValue | rangeValue(backgroundColorEditorConfig)'
|
|
1208
1275
|
})
|
|
1209
1276
|
}
|
|
1210
|
-
}];
|
|
1211
|
-
// @TODO(pwied):
|
|
1277
|
+
}]; // @TODO(pwied):
|
|
1212
1278
|
// remove once react-visualizations/SV was deprecated
|
|
1213
1279
|
// including unused sparklineFillColor
|
|
1280
|
+
|
|
1214
1281
|
var LIGHTMODE_SPARKLINE_AREA_COLOR = '#171D21';
|
|
1215
1282
|
var DARKMODE_SPARKLINE_AREA_COLOR = '#FFFFFF';
|
|
1216
1283
|
var themes = {
|
|
1217
1284
|
defaultFontColor: function defaultFontColor(props) {
|
|
1218
|
-
return pick_1.default({
|
|
1285
|
+
return (0, pick_1.default)({
|
|
1219
1286
|
enterprise: {
|
|
1220
1287
|
dark: variables_2.default.textColor(props),
|
|
1221
1288
|
light: variables_2.default.gray20(props)
|
|
@@ -1224,13 +1291,13 @@ var themes = {
|
|
|
1224
1291
|
})(props);
|
|
1225
1292
|
},
|
|
1226
1293
|
defaultBlockFontColor: function defaultBlockFontColor(props) {
|
|
1227
|
-
return pick_1.default({
|
|
1294
|
+
return (0, pick_1.default)({
|
|
1228
1295
|
enterprise: variables_2.default.white(props),
|
|
1229
1296
|
prisma: variables_2.default.contentColorActive(props)
|
|
1230
1297
|
})(props);
|
|
1231
1298
|
},
|
|
1232
1299
|
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
1233
|
-
return pick_1.default({
|
|
1300
|
+
return (0, pick_1.default)({
|
|
1234
1301
|
enterprise: {
|
|
1235
1302
|
dark: variables_2.default.black(props),
|
|
1236
1303
|
light: variables_2.default.backgroundColor(props)
|
|
@@ -1239,14 +1306,14 @@ var themes = {
|
|
|
1239
1306
|
})(props);
|
|
1240
1307
|
},
|
|
1241
1308
|
defaultSparklineStrokeColor: function defaultSparklineStrokeColor(props) {
|
|
1242
|
-
return pick_1.default({
|
|
1309
|
+
return (0, pick_1.default)({
|
|
1243
1310
|
enterprise: variables_2.default.textColor(props),
|
|
1244
1311
|
prisma: variables_2.default.contentColorActive(props)
|
|
1245
1312
|
})(props);
|
|
1246
1313
|
},
|
|
1247
1314
|
// TODO(fkurniawan): update with SCP-36839
|
|
1248
1315
|
sparklineSeverityColors: function sparklineSeverityColors(props) {
|
|
1249
|
-
return pick_1.default({
|
|
1316
|
+
return (0, pick_1.default)({
|
|
1250
1317
|
enterprise: {
|
|
1251
1318
|
dark: JSON.stringify({
|
|
1252
1319
|
none: {
|
|
@@ -1331,7 +1398,7 @@ var themes = {
|
|
|
1331
1398
|
},
|
|
1332
1399
|
// TODO(fkurniawan): update with SCP-36839
|
|
1333
1400
|
sparklineFillColor: function sparklineFillColor(props) {
|
|
1334
|
-
return pick_1.default({
|
|
1401
|
+
return (0, pick_1.default)({
|
|
1335
1402
|
enterprise: {
|
|
1336
1403
|
light: LIGHTMODE_SPARKLINE_AREA_COLOR,
|
|
1337
1404
|
dark: DARKMODE_SPARKLINE_AREA_COLOR
|
|
@@ -1341,9 +1408,9 @@ var themes = {
|
|
|
1341
1408
|
}
|
|
1342
1409
|
};
|
|
1343
1410
|
var editorConfig = [{
|
|
1344
|
-
label: i18n_1._('Data configurations'),
|
|
1411
|
+
label: (0, i18n_1._)('Data configurations'),
|
|
1345
1412
|
layout: [[{
|
|
1346
|
-
label: i18n_1._('Value'),
|
|
1413
|
+
label: (0, i18n_1._)('Value'),
|
|
1347
1414
|
editor: 'editor.columnSelector',
|
|
1348
1415
|
option: 'sparklineValues',
|
|
1349
1416
|
context: 'sparklineValuesContext',
|
|
@@ -1367,20 +1434,20 @@ var editorConfig = [{
|
|
|
1367
1434
|
}
|
|
1368
1435
|
}]]
|
|
1369
1436
|
}, {
|
|
1370
|
-
label: i18n_1._('Data display'),
|
|
1437
|
+
label: (0, i18n_1._)('Data display'),
|
|
1371
1438
|
layout: [].concat(_toConsumableArray(StaticMajorAndTrendLayout_1.default), [[{
|
|
1372
|
-
label: i18n_1._('Trend display'),
|
|
1439
|
+
label: (0, i18n_1._)('Trend display'),
|
|
1373
1440
|
option: 'trendDisplay',
|
|
1374
1441
|
editor: 'editor.select',
|
|
1375
1442
|
editorProps: {
|
|
1376
1443
|
values: [{
|
|
1377
|
-
label: i18n_1._('Percent'),
|
|
1444
|
+
label: (0, i18n_1._)('Percent'),
|
|
1378
1445
|
value: 'percent'
|
|
1379
1446
|
}, {
|
|
1380
|
-
label: i18n_1._('Absolute'),
|
|
1447
|
+
label: (0, i18n_1._)('Absolute'),
|
|
1381
1448
|
value: 'absolute'
|
|
1382
1449
|
}, {
|
|
1383
|
-
label: i18n_1._('Off'),
|
|
1450
|
+
label: (0, i18n_1._)('Off'),
|
|
1384
1451
|
value: 'off'
|
|
1385
1452
|
}]
|
|
1386
1453
|
},
|
|
@@ -1389,37 +1456,37 @@ var editorConfig = [{
|
|
|
1389
1456
|
return options.showValue || options.showValue === undefined;
|
|
1390
1457
|
}
|
|
1391
1458
|
}, {
|
|
1392
|
-
label: i18n_1._('Sparkline display'),
|
|
1459
|
+
label: (0, i18n_1._)('Sparkline display'),
|
|
1393
1460
|
option: 'sparklineDisplay',
|
|
1394
1461
|
editor: 'editor.select',
|
|
1395
1462
|
editorProps: {
|
|
1396
1463
|
values: [{
|
|
1397
|
-
label: i18n_1._('Off'),
|
|
1464
|
+
label: (0, i18n_1._)('Off'),
|
|
1398
1465
|
value: 'off'
|
|
1399
1466
|
}, {
|
|
1400
|
-
label: i18n_1._('Before'),
|
|
1467
|
+
label: (0, i18n_1._)('Before'),
|
|
1401
1468
|
value: 'before'
|
|
1402
1469
|
}, {
|
|
1403
|
-
label: i18n_1._('Below'),
|
|
1470
|
+
label: (0, i18n_1._)('Below'),
|
|
1404
1471
|
value: 'below'
|
|
1405
1472
|
}, {
|
|
1406
|
-
label: i18n_1._('After'),
|
|
1473
|
+
label: (0, i18n_1._)('After'),
|
|
1407
1474
|
value: 'after'
|
|
1408
1475
|
}]
|
|
1409
1476
|
}
|
|
1410
1477
|
}]], _toConsumableArray(TrellisEditors_1.TrellisEditorConfig))
|
|
1411
1478
|
}, {
|
|
1412
|
-
label: i18n_1._('Color and style'),
|
|
1479
|
+
label: (0, i18n_1._)('Color and style'),
|
|
1413
1480
|
layout: [[{
|
|
1414
|
-
label: i18n_1._('Dynamic elements'),
|
|
1481
|
+
label: (0, i18n_1._)('Dynamic elements'),
|
|
1415
1482
|
key: 'presetSelector',
|
|
1416
1483
|
editor: 'editor.presetSelector',
|
|
1417
1484
|
editorProps: {
|
|
1418
1485
|
presets: presets,
|
|
1419
1486
|
value: function value(_ref3) {
|
|
1420
1487
|
var context = _ref3.context,
|
|
1421
|
-
|
|
1422
|
-
var initialPreset = configUtils_1.getInitialPreset(context, options, presets);
|
|
1488
|
+
options = _ref3.options;
|
|
1489
|
+
var initialPreset = (0, configUtils_1.getInitialPreset)(context, options, presets);
|
|
1423
1490
|
return initialPreset && initialPreset.label || null;
|
|
1424
1491
|
}
|
|
1425
1492
|
}
|
|
@@ -1427,14 +1494,14 @@ var editorConfig = [{
|
|
|
1427
1494
|
editorProps: {
|
|
1428
1495
|
themes: themes
|
|
1429
1496
|
}
|
|
1430
|
-
})], [DynamicMajorColorEditor_1.getDynamicMajorColorEditor({
|
|
1497
|
+
})], [(0, DynamicMajorColorEditor_1.getDynamicMajorColorEditor)({
|
|
1431
1498
|
defaultContext: singleValueContext_1.defaultContext,
|
|
1432
1499
|
defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
|
|
1433
1500
|
})], [Object.assign(Object.assign({}, StaticTrendColorEditor_1.default), {
|
|
1434
1501
|
editorProps: {
|
|
1435
1502
|
themes: themes
|
|
1436
1503
|
}
|
|
1437
|
-
})], [DynamicTrendColorEditor_1.getDynamicTrendColorEditor({
|
|
1504
|
+
})], [(0, DynamicTrendColorEditor_1.getDynamicTrendColorEditor)({
|
|
1438
1505
|
defaultContext: singleValueContext_1.defaultContext,
|
|
1439
1506
|
defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
|
|
1440
1507
|
})], [Object.assign(Object.assign({}, StaticBackgroundColorEditor_1.default), {
|
|
@@ -1445,29 +1512,29 @@ var editorConfig = [{
|
|
|
1445
1512
|
editorProps: {
|
|
1446
1513
|
themes: themes
|
|
1447
1514
|
}
|
|
1448
|
-
})], [DynamicBackgroundColorEditor_1.getDynamicBackgroundColorEditor({
|
|
1515
|
+
})], [(0, DynamicBackgroundColorEditor_1.getDynamicBackgroundColorEditor)({
|
|
1449
1516
|
defaultContext: singleValueContext_1.defaultContext,
|
|
1450
1517
|
defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
|
|
1451
1518
|
})], [{
|
|
1452
|
-
label: i18n_1._('Major value size (px)'),
|
|
1519
|
+
label: (0, i18n_1._)('Major value size (px)'),
|
|
1453
1520
|
option: 'majorFontSize',
|
|
1454
1521
|
editor: 'editor.number',
|
|
1455
1522
|
editorProps: {
|
|
1456
1523
|
min: 1
|
|
1457
1524
|
},
|
|
1458
|
-
placeholder: i18n_1._('Auto'),
|
|
1525
|
+
placeholder: (0, i18n_1._)('Auto'),
|
|
1459
1526
|
showEditor: function showEditor(_ref4) {
|
|
1460
1527
|
var options = _ref4.options;
|
|
1461
1528
|
return options.showValue || options.showValue === undefined;
|
|
1462
1529
|
}
|
|
1463
1530
|
}, {
|
|
1464
|
-
label: i18n_1._('Trend value size (px)'),
|
|
1531
|
+
label: (0, i18n_1._)('Trend value size (px)'),
|
|
1465
1532
|
option: 'trendFontSize',
|
|
1466
1533
|
editor: 'editor.number',
|
|
1467
1534
|
editorProps: {
|
|
1468
1535
|
min: 1
|
|
1469
1536
|
},
|
|
1470
|
-
placeholder: i18n_1._('Auto'),
|
|
1537
|
+
placeholder: (0, i18n_1._)('Auto'),
|
|
1471
1538
|
showEditor: function showEditor(_ref5) {
|
|
1472
1539
|
var options = _ref5.options;
|
|
1473
1540
|
return options.showValue || options.showValue === undefined;
|
|
@@ -1481,16 +1548,19 @@ var editorConfig = [{
|
|
|
1481
1548
|
/**
|
|
1482
1549
|
* visualization configuration
|
|
1483
1550
|
*/
|
|
1551
|
+
|
|
1484
1552
|
var config = {
|
|
1485
1553
|
/**
|
|
1486
1554
|
* unique viz key
|
|
1487
1555
|
*/
|
|
1488
1556
|
key: 'splunk.singlevalue',
|
|
1557
|
+
|
|
1489
1558
|
/**
|
|
1490
1559
|
* viz name
|
|
1491
1560
|
*/
|
|
1492
|
-
name: i18n_1._('Single value'),
|
|
1561
|
+
name: (0, i18n_1._)('Single value'),
|
|
1493
1562
|
category: VizCategory_1.VizCategory.SINGLE_VALUE,
|
|
1563
|
+
|
|
1494
1564
|
/**
|
|
1495
1565
|
* viz icon
|
|
1496
1566
|
*/
|
|
@@ -1511,10 +1581,10 @@ var config = {
|
|
|
1511
1581
|
themes: themes,
|
|
1512
1582
|
requiredProps: ['majorValue']
|
|
1513
1583
|
};
|
|
1514
|
-
exports.default = configUtils_1.enhanceConfig(config);
|
|
1584
|
+
exports.default = (0, configUtils_1.enhanceConfig)(config);
|
|
1515
1585
|
|
|
1516
1586
|
/***/ }),
|
|
1517
|
-
/*
|
|
1587
|
+
/* 76 */
|
|
1518
1588
|
/***/ (function(module, exports) {
|
|
1519
1589
|
|
|
1520
1590
|
module.exports = require("@splunk/visualization-themes/variables");
|