@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/Table.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 = 82);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -138,6 +138,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
138
138
|
});
|
|
139
139
|
exports.VizBehavior = void 0;
|
|
140
140
|
var VizBehavior;
|
|
141
|
+
|
|
141
142
|
(function (VizBehavior) {
|
|
142
143
|
/**
|
|
143
144
|
* Dynamic Options Behavior.
|
|
@@ -157,6 +158,7 @@ var VizBehavior;
|
|
|
157
158
|
* missing.
|
|
158
159
|
* @type {string}
|
|
159
160
|
*/
|
|
161
|
+
|
|
160
162
|
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
161
163
|
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
162
164
|
VizBehavior["TRELLIS"] = "trellis";
|
|
@@ -185,24 +187,33 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
|
185
187
|
|
|
186
188
|
|
|
187
189
|
var _toConsumableArray = __webpack_require__(1);
|
|
190
|
+
|
|
188
191
|
var _defineProperty = __webpack_require__(7);
|
|
192
|
+
|
|
189
193
|
var __rest = this && this.__rest || function (s, e) {
|
|
190
194
|
var t = {};
|
|
195
|
+
|
|
191
196
|
for (var p in s) {
|
|
192
197
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
193
198
|
}
|
|
199
|
+
|
|
194
200
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
195
201
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
196
202
|
}
|
|
197
203
|
return t;
|
|
198
204
|
};
|
|
205
|
+
|
|
199
206
|
Object.defineProperty(exports, "__esModule", {
|
|
200
207
|
value: true
|
|
201
208
|
});
|
|
202
209
|
exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
|
|
210
|
+
|
|
203
211
|
var lodash_1 = __webpack_require__(6);
|
|
212
|
+
|
|
204
213
|
var schemaUtils_1 = __webpack_require__(3);
|
|
214
|
+
|
|
205
215
|
var VizBehavior_1 = __webpack_require__(2);
|
|
216
|
+
|
|
206
217
|
var dynamicOptionsDSLType = {
|
|
207
218
|
type: 'string',
|
|
208
219
|
pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
|
|
@@ -212,20 +223,22 @@ var dynamicOptionsDSLType = {
|
|
|
212
223
|
* @param optionsSchema a visualization's options schema
|
|
213
224
|
* @returns an updated options schema that additionally allows strings starting with > for each option
|
|
214
225
|
*/
|
|
226
|
+
|
|
215
227
|
function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
216
228
|
var enhancedOptionsSchema = {};
|
|
217
229
|
Object.keys(optionsSchema).forEach(function (key) {
|
|
218
230
|
var _a = optionsSchema[key],
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
231
|
+
title = _a.title,
|
|
232
|
+
description = _a.description,
|
|
233
|
+
readOnly = _a.readOnly,
|
|
234
|
+
writeOnly = _a.writeOnly,
|
|
235
|
+
examples = _a.examples,
|
|
236
|
+
defaultValue = _a.default,
|
|
237
|
+
type = _a.type,
|
|
238
|
+
properties = _a.properties,
|
|
239
|
+
patternProperties = _a.patternProperties,
|
|
240
|
+
remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
|
|
241
|
+
|
|
229
242
|
var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
|
|
230
243
|
title: title
|
|
231
244
|
}), description !== undefined && {
|
|
@@ -239,12 +252,14 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
|
239
252
|
}), defaultValue !== undefined && {
|
|
240
253
|
default: defaultValue
|
|
241
254
|
});
|
|
255
|
+
|
|
242
256
|
if (type === 'object') {
|
|
243
257
|
enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
|
|
244
258
|
type: type
|
|
245
259
|
}), properties && {
|
|
246
260
|
properties: enhanceOptionsSchemaWithDynamicOptions(properties)
|
|
247
261
|
});
|
|
262
|
+
|
|
248
263
|
if (patternProperties) {
|
|
249
264
|
var enhancedPatternProperties = {};
|
|
250
265
|
Object.keys(patternProperties).forEach(function (opt) {
|
|
@@ -262,6 +277,7 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
|
262
277
|
});
|
|
263
278
|
return enhancedOptionsSchema;
|
|
264
279
|
}
|
|
280
|
+
|
|
265
281
|
exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
|
|
266
282
|
/**
|
|
267
283
|
* Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
|
|
@@ -270,11 +286,14 @@ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamic
|
|
|
270
286
|
* @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
|
|
271
287
|
* and containing `open: false` for all editor panels in editorConfig
|
|
272
288
|
*/
|
|
289
|
+
|
|
273
290
|
function enhanceConfig(vizConfig) {
|
|
274
291
|
var enhancedConfig = Object.assign({}, vizConfig);
|
|
292
|
+
|
|
275
293
|
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
|
|
276
294
|
enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
|
|
277
295
|
}
|
|
296
|
+
|
|
278
297
|
enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
279
298
|
return Object.assign(Object.assign({}, config), {
|
|
280
299
|
open: config.open || false
|
|
@@ -282,6 +301,7 @@ function enhanceConfig(vizConfig) {
|
|
|
282
301
|
});
|
|
283
302
|
return enhancedConfig;
|
|
284
303
|
}
|
|
304
|
+
|
|
285
305
|
exports.enhanceConfig = enhanceConfig;
|
|
286
306
|
/**
|
|
287
307
|
* Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
|
|
@@ -289,6 +309,7 @@ exports.enhanceConfig = enhanceConfig;
|
|
|
289
309
|
* @param vizConfig a Visualization Config
|
|
290
310
|
* @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
|
|
291
311
|
*/
|
|
312
|
+
|
|
292
313
|
function uncollapseEditorConfig(vizConfig) {
|
|
293
314
|
var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
|
|
294
315
|
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
@@ -298,13 +319,16 @@ function uncollapseEditorConfig(vizConfig) {
|
|
|
298
319
|
});
|
|
299
320
|
return editorPanelUncollapsedConfig;
|
|
300
321
|
}
|
|
322
|
+
|
|
301
323
|
exports.uncollapseEditorConfig = uncollapseEditorConfig;
|
|
324
|
+
|
|
302
325
|
function isDynamicOption(option) {
|
|
303
326
|
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
304
327
|
}
|
|
305
|
-
|
|
306
|
-
// private helpers to improve readability of getInitialPreset
|
|
328
|
+
|
|
329
|
+
exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
|
|
307
330
|
// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
|
|
331
|
+
|
|
308
332
|
/**
|
|
309
333
|
* this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
|
|
310
334
|
* 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
|
|
@@ -313,6 +337,7 @@ exports.isDynamicOption = isDynamicOption;
|
|
|
313
337
|
*
|
|
314
338
|
* Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
|
|
315
339
|
*/
|
|
340
|
+
|
|
316
341
|
function hasCompatibleContexts(vizContext, presetContext) {
|
|
317
342
|
var presetContextKeys = Object.keys(presetContext);
|
|
318
343
|
return presetContextKeys.every(function (contextKey) {
|
|
@@ -322,6 +347,8 @@ function hasCompatibleContexts(vizContext, presetContext) {
|
|
|
322
347
|
/**
|
|
323
348
|
* Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
|
|
324
349
|
*/
|
|
350
|
+
|
|
351
|
+
|
|
325
352
|
function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
326
353
|
var presetOptionKeys = Object.keys(presetOptions);
|
|
327
354
|
return presetOptionKeys.every(function (optionKey) {
|
|
@@ -336,18 +363,21 @@ function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
|
336
363
|
* @param {Object} vizOptions - the current vizOptions definition
|
|
337
364
|
* @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
|
|
338
365
|
*/
|
|
366
|
+
|
|
367
|
+
|
|
339
368
|
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
340
369
|
return presets.find(function (preset) {
|
|
341
|
-
var presetContext = lodash_1.get(preset, ['value', 'context'], {});
|
|
342
|
-
var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
|
|
370
|
+
var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
|
|
371
|
+
var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
|
|
343
372
|
var presetContextKeys = Object.keys(presetContext);
|
|
344
|
-
var presetOptionKeys = Object.keys(presetOptions);
|
|
345
|
-
// all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
373
|
+
var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
346
374
|
// if not, then the preset is invalid in config.ts
|
|
375
|
+
|
|
347
376
|
if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
|
|
348
377
|
return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
|
|
349
378
|
});
|
|
350
379
|
}
|
|
380
|
+
|
|
351
381
|
exports.getInitialPreset = getInitialPreset;
|
|
352
382
|
/**
|
|
353
383
|
* generates number precision values for a Select editor
|
|
@@ -355,14 +385,16 @@ exports.getInitialPreset = getInitialPreset;
|
|
|
355
385
|
* @param {Number} numPrecisionValues - number of integer precision values to generate
|
|
356
386
|
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
357
387
|
*/
|
|
388
|
+
|
|
358
389
|
function generatePrecisionValues(numPrecisionValues) {
|
|
359
|
-
return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
|
|
390
|
+
return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
|
|
360
391
|
return {
|
|
361
392
|
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
362
393
|
value: i
|
|
363
394
|
};
|
|
364
395
|
});
|
|
365
396
|
}
|
|
397
|
+
|
|
366
398
|
exports.generatePrecisionValues = generatePrecisionValues;
|
|
367
399
|
/**
|
|
368
400
|
* insert layout in layout array, return a new layout array instead of updating the original
|
|
@@ -372,12 +404,15 @@ exports.generatePrecisionValues = generatePrecisionValues;
|
|
|
372
404
|
* @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
|
|
373
405
|
* @returns {EditorLayoutConfig[][]} new editor layout with insertion
|
|
374
406
|
*/
|
|
407
|
+
|
|
375
408
|
var insertLayout = function insertLayout(layout, index) {
|
|
376
409
|
for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
377
410
|
layoutItems[_key - 2] = arguments[_key];
|
|
378
411
|
}
|
|
412
|
+
|
|
379
413
|
return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
|
|
380
414
|
};
|
|
415
|
+
|
|
381
416
|
exports.insertLayout = insertLayout;
|
|
382
417
|
|
|
383
418
|
/***/ }),
|
|
@@ -407,6 +442,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
407
442
|
});
|
|
408
443
|
exports.VizCategory = void 0;
|
|
409
444
|
var VizCategory;
|
|
445
|
+
|
|
410
446
|
(function (VizCategory) {
|
|
411
447
|
VizCategory["SINGLE_VALUE"] = "Single Value";
|
|
412
448
|
VizCategory["TRENDS"] = "Trends";
|
|
@@ -424,28 +460,42 @@ var VizCategory;
|
|
|
424
460
|
|
|
425
461
|
/***/ }),
|
|
426
462
|
|
|
427
|
-
/***/
|
|
463
|
+
/***/ 82:
|
|
428
464
|
/***/ (function(module, exports, __webpack_require__) {
|
|
429
465
|
|
|
430
466
|
"use strict";
|
|
431
467
|
|
|
432
468
|
|
|
433
469
|
var _toConsumableArray = __webpack_require__(1);
|
|
470
|
+
|
|
434
471
|
Object.defineProperty(exports, "__esModule", {
|
|
435
472
|
value: true
|
|
436
473
|
});
|
|
474
|
+
|
|
437
475
|
var i18n_1 = __webpack_require__(0);
|
|
476
|
+
|
|
438
477
|
var lodash_1 = __webpack_require__(6);
|
|
478
|
+
|
|
439
479
|
var schemaUtils_1 = __webpack_require__(3);
|
|
480
|
+
|
|
440
481
|
var colorConstants_1 = __webpack_require__(26);
|
|
482
|
+
|
|
441
483
|
var visualization_icons_1 = __webpack_require__(12);
|
|
484
|
+
|
|
442
485
|
var placeholders_1 = __webpack_require__(11);
|
|
486
|
+
|
|
443
487
|
var variables_1 = __webpack_require__(10);
|
|
488
|
+
|
|
444
489
|
var pick_1 = __webpack_require__(9);
|
|
490
|
+
|
|
445
491
|
var configUtils_1 = __webpack_require__(4);
|
|
492
|
+
|
|
446
493
|
var VizBehavior_1 = __webpack_require__(2);
|
|
447
|
-
|
|
494
|
+
|
|
495
|
+
var consts_1 = __webpack_require__(83);
|
|
496
|
+
|
|
448
497
|
var VizCategory_1 = __webpack_require__(8);
|
|
498
|
+
|
|
449
499
|
var dataContract = {
|
|
450
500
|
requiredDataSources: [{
|
|
451
501
|
name: 'primary',
|
|
@@ -539,30 +589,30 @@ var defaultContext = {
|
|
|
539
589
|
tableAltRowBackgroundColorsByBackgroundColor: ['> backgroundColor', '> backgroundColor | setColorChannel(tableRowBackgroundColorEvenConfig)']
|
|
540
590
|
};
|
|
541
591
|
var unitPositionConfig = {
|
|
542
|
-
label: i18n_1._('Units position'),
|
|
592
|
+
label: (0, i18n_1._)('Units position'),
|
|
543
593
|
editor: 'editor.select',
|
|
544
594
|
option: 'unitPosition',
|
|
545
595
|
editorProps: {
|
|
546
596
|
values: [{
|
|
547
|
-
label: i18n_1._('Before'),
|
|
597
|
+
label: (0, i18n_1._)('Before'),
|
|
548
598
|
value: 'before'
|
|
549
599
|
}, {
|
|
550
|
-
label: i18n_1._('After'),
|
|
600
|
+
label: (0, i18n_1._)('After'),
|
|
551
601
|
value: 'after'
|
|
552
602
|
}]
|
|
553
603
|
}
|
|
554
604
|
};
|
|
555
605
|
var unitLabelConfig = {
|
|
556
|
-
label: i18n_1._('Unit label'),
|
|
606
|
+
label: (0, i18n_1._)('Unit label'),
|
|
557
607
|
option: 'unit',
|
|
558
608
|
editor: 'editor.text'
|
|
559
609
|
};
|
|
560
610
|
var timeFormattingConfig = {
|
|
561
|
-
label: i18n_1._('Date & Time formatting'),
|
|
611
|
+
label: (0, i18n_1._)('Date & Time formatting'),
|
|
562
612
|
option: 'format',
|
|
563
613
|
editor: 'editor.text',
|
|
564
614
|
editorProps: {
|
|
565
|
-
tooltip: i18n_1._('For example: DD-MM-YYYY')
|
|
615
|
+
tooltip: (0, i18n_1._)('For example: DD-MM-YYYY')
|
|
566
616
|
}
|
|
567
617
|
};
|
|
568
618
|
var sequentialColorConfig = [{
|
|
@@ -678,7 +728,7 @@ var optionsSchema = {
|
|
|
678
728
|
textOverflow: {
|
|
679
729
|
description: 'Controls how the text should be truncated within a particular column. Valid types include "anywhere", "break-word", "ellipsis". Columns are "break-word" styled by default when "textOverflow" is not configured.',
|
|
680
730
|
type: 'string',
|
|
681
|
-
pattern: schemaUtils_1.getPattern(consts_1.validTextOverflows),
|
|
731
|
+
pattern: (0, schemaUtils_1.getPattern)(consts_1.validTextOverflows),
|
|
682
732
|
enum: consts_1.validTextOverflows.concat()
|
|
683
733
|
},
|
|
684
734
|
width: {
|
|
@@ -699,13 +749,13 @@ var optionsSchema = {
|
|
|
699
749
|
default: 'proportional',
|
|
700
750
|
description: 'Specify the font style to use for table content.',
|
|
701
751
|
type: 'string',
|
|
702
|
-
pattern: schemaUtils_1.getPattern(['proportional', 'monospace'])
|
|
752
|
+
pattern: (0, schemaUtils_1.getPattern)(['proportional', 'monospace'])
|
|
703
753
|
},
|
|
704
754
|
fontSize: {
|
|
705
755
|
default: 'default',
|
|
706
756
|
description: 'Specify the font size to use for table content. Font sizes range from extra small (10px) to large (16px) with the default being 14px.',
|
|
707
757
|
type: 'string',
|
|
708
|
-
pattern: schemaUtils_1.getPattern(consts_1.validFontSizes)
|
|
758
|
+
pattern: (0, schemaUtils_1.getPattern)(consts_1.validFontSizes)
|
|
709
759
|
},
|
|
710
760
|
headers: {
|
|
711
761
|
default: '> table | getField()',
|
|
@@ -718,7 +768,7 @@ var optionsSchema = {
|
|
|
718
768
|
headerVisibility: {
|
|
719
769
|
default: 'inline',
|
|
720
770
|
description: 'Specify how to display the table header row.',
|
|
721
|
-
pattern: schemaUtils_1.getPattern(consts_1.validHeaderVisibilities),
|
|
771
|
+
pattern: (0, schemaUtils_1.getPattern)(consts_1.validHeaderVisibilities),
|
|
722
772
|
enum: consts_1.validHeaderVisibilities.concat(),
|
|
723
773
|
type: 'string'
|
|
724
774
|
},
|
|
@@ -876,7 +926,7 @@ var optionsSchema = {
|
|
|
876
926
|
};
|
|
877
927
|
var themes = {
|
|
878
928
|
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
879
|
-
return pick_1.default({
|
|
929
|
+
return (0, pick_1.default)({
|
|
880
930
|
enterprise: {
|
|
881
931
|
dark: variables_1.default.black(props),
|
|
882
932
|
light: variables_1.default.backgroundColor(props)
|
|
@@ -885,7 +935,7 @@ var themes = {
|
|
|
885
935
|
})(props);
|
|
886
936
|
},
|
|
887
937
|
defaultHeaderBackgroundColor: function defaultHeaderBackgroundColor(props) {
|
|
888
|
-
return pick_1.default({
|
|
938
|
+
return (0, pick_1.default)({
|
|
889
939
|
enterprise: {
|
|
890
940
|
dark: variables_1.default.gray20(props),
|
|
891
941
|
light: variables_1.default.gray92(props)
|
|
@@ -894,7 +944,7 @@ var themes = {
|
|
|
894
944
|
})(props);
|
|
895
945
|
},
|
|
896
946
|
rowBackgroundColorEven: function rowBackgroundColorEven(props) {
|
|
897
|
-
return pick_1.default({
|
|
947
|
+
return (0, pick_1.default)({
|
|
898
948
|
enterprise: {
|
|
899
949
|
dark: variables_1.default.black(props),
|
|
900
950
|
light: variables_1.default.gray96(props)
|
|
@@ -903,7 +953,7 @@ var themes = {
|
|
|
903
953
|
})(props);
|
|
904
954
|
},
|
|
905
955
|
rowBackgroundColorOdd: function rowBackgroundColorOdd(props) {
|
|
906
|
-
return pick_1.default({
|
|
956
|
+
return (0, pick_1.default)({
|
|
907
957
|
enterprise: {
|
|
908
958
|
dark: '#0D1012',
|
|
909
959
|
light: variables_1.default.backgroundColor(props)
|
|
@@ -912,30 +962,30 @@ var themes = {
|
|
|
912
962
|
})(props);
|
|
913
963
|
},
|
|
914
964
|
textColor: function textColor(props) {
|
|
915
|
-
return pick_1.default({
|
|
965
|
+
return (0, pick_1.default)({
|
|
916
966
|
enterprise: variables_1.default.textColor(props),
|
|
917
967
|
prisma: variables_1.default.contentColorDefault(props)
|
|
918
968
|
})(props);
|
|
919
969
|
},
|
|
920
970
|
inverseTextColor: function inverseTextColor(props) {
|
|
921
|
-
return pick_1.default({
|
|
971
|
+
return (0, pick_1.default)({
|
|
922
972
|
enterprise: {
|
|
923
973
|
dark: variables_1.default.contentColorInverted(props),
|
|
924
974
|
light: variables_1.default.white(props) // equal to textColor in enterpriseDark
|
|
925
|
-
},
|
|
926
975
|
|
|
976
|
+
},
|
|
927
977
|
prisma: variables_1.default.contentColorInverted(props)
|
|
928
978
|
})(props);
|
|
929
979
|
}
|
|
930
980
|
};
|
|
931
|
-
var backgroundColorPaletteSet = new Set([].concat(_toConsumableArray(colorConstants_1.COLOR_EDITOR_PALETTE), _toConsumableArray(lodash_1.map(themes, function (t) {
|
|
932
|
-
return lodash_1.get(t, 'defaultBackgroundColor');
|
|
981
|
+
var backgroundColorPaletteSet = new Set([].concat(_toConsumableArray(colorConstants_1.COLOR_EDITOR_PALETTE), _toConsumableArray((0, lodash_1.map)(themes, function (t) {
|
|
982
|
+
return (0, lodash_1.get)(t, 'defaultBackgroundColor');
|
|
933
983
|
}))));
|
|
934
984
|
var EDITOR_LABEL_WIDTH = 100;
|
|
935
985
|
var editorConfig = [{
|
|
936
|
-
label: i18n_1._('Data display'),
|
|
986
|
+
label: (0, i18n_1._)('Data display'),
|
|
937
987
|
layout: [[{
|
|
938
|
-
label: i18n_1._('Rows displayed'),
|
|
988
|
+
label: (0, i18n_1._)('Rows displayed'),
|
|
939
989
|
option: 'count',
|
|
940
990
|
editor: 'editor.number',
|
|
941
991
|
editorProps: {
|
|
@@ -943,39 +993,39 @@ var editorConfig = [{
|
|
|
943
993
|
labelWidth: EDITOR_LABEL_WIDTH
|
|
944
994
|
}
|
|
945
995
|
}], [{
|
|
946
|
-
label: i18n_1._('Row numbers'),
|
|
996
|
+
label: (0, i18n_1._)('Row numbers'),
|
|
947
997
|
option: 'showRowNumbers',
|
|
948
998
|
editor: 'editor.checkbox',
|
|
949
999
|
editorProps: {
|
|
950
1000
|
labelWidth: EDITOR_LABEL_WIDTH
|
|
951
1001
|
}
|
|
952
1002
|
}], [{
|
|
953
|
-
label: i18n_1._('Internal fields'),
|
|
1003
|
+
label: (0, i18n_1._)('Internal fields'),
|
|
954
1004
|
option: 'showInternalFields',
|
|
955
1005
|
editor: 'editor.checkbox',
|
|
956
1006
|
editorProps: {
|
|
957
1007
|
labelWidth: EDITOR_LABEL_WIDTH
|
|
958
1008
|
}
|
|
959
1009
|
}], [{
|
|
960
|
-
label: i18n_1._('Header row'),
|
|
1010
|
+
label: (0, i18n_1._)('Header row'),
|
|
961
1011
|
option: 'headerVisibility',
|
|
962
1012
|
editor: 'editor.select',
|
|
963
1013
|
editorProps: {
|
|
964
1014
|
values: [{
|
|
965
|
-
label: i18n_1._('Inline'),
|
|
1015
|
+
label: (0, i18n_1._)('Inline'),
|
|
966
1016
|
value: 'inline'
|
|
967
1017
|
}, {
|
|
968
|
-
label: i18n_1._('Fixed'),
|
|
1018
|
+
label: (0, i18n_1._)('Fixed'),
|
|
969
1019
|
value: 'fixed'
|
|
970
1020
|
}, {
|
|
971
|
-
label: i18n_1._('Hidden'),
|
|
1021
|
+
label: (0, i18n_1._)('Hidden'),
|
|
972
1022
|
value: 'none'
|
|
973
1023
|
}],
|
|
974
1024
|
labelWidth: EDITOR_LABEL_WIDTH
|
|
975
1025
|
}
|
|
976
1026
|
}]]
|
|
977
1027
|
}, {
|
|
978
|
-
label: i18n_1._('Color and style'),
|
|
1028
|
+
label: (0, i18n_1._)('Color and style'),
|
|
979
1029
|
layout: [[{
|
|
980
1030
|
key: 'backgroundColor',
|
|
981
1031
|
editor: 'editor.tableBackgroundColor',
|
|
@@ -987,14 +1037,14 @@ var editorConfig = [{
|
|
|
987
1037
|
}
|
|
988
1038
|
}], [{
|
|
989
1039
|
option: 'font',
|
|
990
|
-
label: i18n_1._('Font'),
|
|
1040
|
+
label: (0, i18n_1._)('Font'),
|
|
991
1041
|
editor: 'editor.select',
|
|
992
1042
|
editorProps: {
|
|
993
1043
|
values: [{
|
|
994
|
-
label: i18n_1._('Proportional (Default)'),
|
|
1044
|
+
label: (0, i18n_1._)('Proportional (Default)'),
|
|
995
1045
|
value: 'proportional'
|
|
996
1046
|
}, {
|
|
997
|
-
label: i18n_1._('Monospace'),
|
|
1047
|
+
label: (0, i18n_1._)('Monospace'),
|
|
998
1048
|
value: 'monospace'
|
|
999
1049
|
}],
|
|
1000
1050
|
labelPosition: 'top',
|
|
@@ -1002,48 +1052,48 @@ var editorConfig = [{
|
|
|
1002
1052
|
}
|
|
1003
1053
|
}], [{
|
|
1004
1054
|
option: 'fontSize',
|
|
1005
|
-
label: i18n_1._('Font size'),
|
|
1055
|
+
label: (0, i18n_1._)('Font size'),
|
|
1006
1056
|
editor: 'editor.select',
|
|
1007
1057
|
editorProps: {
|
|
1008
1058
|
values: [{
|
|
1009
|
-
label: i18n_1._('Extra Small (font 10px, row 24px)'),
|
|
1059
|
+
label: (0, i18n_1._)('Extra Small (font 10px, row 24px)'),
|
|
1010
1060
|
value: 'extraSmall'
|
|
1011
1061
|
}, {
|
|
1012
|
-
label: i18n_1._('Small (font 12px, row 24px)'),
|
|
1062
|
+
label: (0, i18n_1._)('Small (font 12px, row 24px)'),
|
|
1013
1063
|
value: 'small'
|
|
1014
1064
|
}, {
|
|
1015
|
-
label: i18n_1._('Default (font 14px, row 32px)'),
|
|
1065
|
+
label: (0, i18n_1._)('Default (font 14px, row 32px)'),
|
|
1016
1066
|
value: 'default'
|
|
1017
1067
|
}, {
|
|
1018
|
-
label: i18n_1._('Large (font 16px, row 36px)'),
|
|
1068
|
+
label: (0, i18n_1._)('Large (font 16px, row 36px)'),
|
|
1019
1069
|
value: 'large'
|
|
1020
1070
|
}],
|
|
1021
1071
|
labelPosition: 'top',
|
|
1022
1072
|
labelWidth: EDITOR_LABEL_WIDTH
|
|
1023
1073
|
}
|
|
1024
1074
|
}], [{
|
|
1025
|
-
label: i18n_1._('Column-specific formatting'),
|
|
1075
|
+
label: (0, i18n_1._)('Column-specific formatting'),
|
|
1026
1076
|
editor: 'editor.tableColumnFormatter',
|
|
1027
1077
|
editorProps: {
|
|
1028
1078
|
// Table column coloring does not adhere to same DSL structure as other dynamically colored options
|
|
1029
1079
|
// we use the FormatterEditor directly and not the DynamicColorEditor's provided DSL builders
|
|
1030
1080
|
columnColoringConfig: {
|
|
1031
1081
|
coloringTypes: [{
|
|
1032
|
-
label: i18n_1._('Text'),
|
|
1082
|
+
label: (0, i18n_1._)('Text'),
|
|
1033
1083
|
value: 'rowColors'
|
|
1034
1084
|
}, {
|
|
1035
|
-
label: i18n_1._('Background'),
|
|
1085
|
+
label: (0, i18n_1._)('Background'),
|
|
1036
1086
|
value: 'rowBackgroundColors'
|
|
1037
1087
|
}],
|
|
1038
1088
|
formatters: [{
|
|
1039
|
-
label: i18n_1._('Ranges'),
|
|
1089
|
+
label: (0, i18n_1._)('Ranges'),
|
|
1040
1090
|
value: 'rangeValue',
|
|
1041
1091
|
defaults: {
|
|
1042
1092
|
rowBackgroundColors: sequentialColorConfig,
|
|
1043
1093
|
rowColors: sequentialColorConfig
|
|
1044
1094
|
}
|
|
1045
1095
|
}, {
|
|
1046
|
-
label: i18n_1._('Matches'),
|
|
1096
|
+
label: (0, i18n_1._)('Matches'),
|
|
1047
1097
|
value: 'matchValue',
|
|
1048
1098
|
defaults: {
|
|
1049
1099
|
rowBackgroundColors: matchColorConfig,
|
|
@@ -1063,22 +1113,22 @@ var editorConfig = [{
|
|
|
1063
1113
|
},
|
|
1064
1114
|
flyoutConfig: {
|
|
1065
1115
|
number: [[Object.assign({}, unitPositionConfig), Object.assign({}, unitLabelConfig)], [{
|
|
1066
|
-
label: i18n_1._('Precision'),
|
|
1116
|
+
label: (0, i18n_1._)('Precision'),
|
|
1067
1117
|
option: 'precision',
|
|
1068
1118
|
editor: 'editor.select',
|
|
1069
1119
|
editorProps: {
|
|
1070
|
-
values: configUtils_1.generatePrecisionValues(20)
|
|
1120
|
+
values: (0, configUtils_1.generatePrecisionValues)(20)
|
|
1071
1121
|
}
|
|
1072
1122
|
}, {
|
|
1073
|
-
label: i18n_1._('Thousand separators'),
|
|
1123
|
+
label: (0, i18n_1._)('Thousand separators'),
|
|
1074
1124
|
option: 'thousandSeparated',
|
|
1075
1125
|
editor: 'editor.radioBar',
|
|
1076
1126
|
editorProps: {
|
|
1077
1127
|
values: [{
|
|
1078
|
-
label: i18n_1._('Off'),
|
|
1128
|
+
label: (0, i18n_1._)('Off'),
|
|
1079
1129
|
value: false
|
|
1080
1130
|
}, {
|
|
1081
|
-
label: i18n_1._('On'),
|
|
1131
|
+
label: (0, i18n_1._)('On'),
|
|
1082
1132
|
value: true
|
|
1083
1133
|
}]
|
|
1084
1134
|
}
|
|
@@ -1090,7 +1140,7 @@ var editorConfig = [{
|
|
|
1090
1140
|
},
|
|
1091
1141
|
value: function value(_ref) {
|
|
1092
1142
|
var context = _ref.context,
|
|
1093
|
-
|
|
1143
|
+
options = _ref.options;
|
|
1094
1144
|
return {
|
|
1095
1145
|
context: context,
|
|
1096
1146
|
columnFormat: options.columnFormat,
|
|
@@ -1104,16 +1154,19 @@ var editorConfig = [{
|
|
|
1104
1154
|
/**
|
|
1105
1155
|
* visualization configuration
|
|
1106
1156
|
*/
|
|
1157
|
+
|
|
1107
1158
|
var config = {
|
|
1108
1159
|
/**
|
|
1109
1160
|
* unique viz key
|
|
1110
1161
|
*/
|
|
1111
1162
|
key: 'splunk.table',
|
|
1163
|
+
|
|
1112
1164
|
/**
|
|
1113
1165
|
* viz name
|
|
1114
1166
|
*/
|
|
1115
|
-
name: i18n_1._('Table'),
|
|
1167
|
+
name: (0, i18n_1._)('Table'),
|
|
1116
1168
|
category: VizCategory_1.VizCategory.TABLE,
|
|
1169
|
+
|
|
1117
1170
|
/**
|
|
1118
1171
|
* viz icon
|
|
1119
1172
|
*/
|
|
@@ -1132,11 +1185,11 @@ var config = {
|
|
|
1132
1185
|
supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS, VizBehavior_1.VizBehavior.PAGE_AND_SORT, VizBehavior_1.VizBehavior.PLACEHOLDER],
|
|
1133
1186
|
themes: themes
|
|
1134
1187
|
};
|
|
1135
|
-
exports.default = configUtils_1.enhanceConfig(config);
|
|
1188
|
+
exports.default = (0, configUtils_1.enhanceConfig)(config);
|
|
1136
1189
|
|
|
1137
1190
|
/***/ }),
|
|
1138
1191
|
|
|
1139
|
-
/***/
|
|
1192
|
+
/***/ 83:
|
|
1140
1193
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1141
1194
|
|
|
1142
1195
|
"use strict";
|