@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/Punchcard.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 = 70);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -136,13 +136,15 @@ module.exports = require("@splunk/visualization-icons");
|
|
|
136
136
|
Object.defineProperty(exports, "__esModule", {
|
|
137
137
|
value: true
|
|
138
138
|
});
|
|
139
|
+
|
|
139
140
|
var i18n_1 = __webpack_require__(0);
|
|
141
|
+
|
|
140
142
|
var background = function background(_ref) {
|
|
141
143
|
var label = _ref.label,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
+
themes = _ref.themes,
|
|
145
|
+
labelPosition = _ref.labelPosition;
|
|
144
146
|
return [{
|
|
145
|
-
label: i18n_1._(label || 'Background'),
|
|
147
|
+
label: (0, i18n_1._)(label || 'Background'),
|
|
146
148
|
option: 'backgroundColor',
|
|
147
149
|
editor: 'editor.color',
|
|
148
150
|
editorProps: {
|
|
@@ -151,6 +153,7 @@ var background = function background(_ref) {
|
|
|
151
153
|
}
|
|
152
154
|
}];
|
|
153
155
|
};
|
|
156
|
+
|
|
154
157
|
exports.default = background;
|
|
155
158
|
|
|
156
159
|
/***/ }),
|
|
@@ -173,6 +176,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
173
176
|
});
|
|
174
177
|
exports.VizBehavior = void 0;
|
|
175
178
|
var VizBehavior;
|
|
179
|
+
|
|
176
180
|
(function (VizBehavior) {
|
|
177
181
|
/**
|
|
178
182
|
* Dynamic Options Behavior.
|
|
@@ -192,6 +196,7 @@ var VizBehavior;
|
|
|
192
196
|
* missing.
|
|
193
197
|
* @type {string}
|
|
194
198
|
*/
|
|
199
|
+
|
|
195
200
|
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
196
201
|
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
197
202
|
VizBehavior["TRELLIS"] = "trellis";
|
|
@@ -213,24 +218,33 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
|
213
218
|
|
|
214
219
|
|
|
215
220
|
var _toConsumableArray = __webpack_require__(1);
|
|
221
|
+
|
|
216
222
|
var _defineProperty = __webpack_require__(7);
|
|
223
|
+
|
|
217
224
|
var __rest = this && this.__rest || function (s, e) {
|
|
218
225
|
var t = {};
|
|
226
|
+
|
|
219
227
|
for (var p in s) {
|
|
220
228
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
221
229
|
}
|
|
230
|
+
|
|
222
231
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
223
232
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
224
233
|
}
|
|
225
234
|
return t;
|
|
226
235
|
};
|
|
236
|
+
|
|
227
237
|
Object.defineProperty(exports, "__esModule", {
|
|
228
238
|
value: true
|
|
229
239
|
});
|
|
230
240
|
exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
|
|
241
|
+
|
|
231
242
|
var lodash_1 = __webpack_require__(6);
|
|
243
|
+
|
|
232
244
|
var schemaUtils_1 = __webpack_require__(3);
|
|
245
|
+
|
|
233
246
|
var VizBehavior_1 = __webpack_require__(2);
|
|
247
|
+
|
|
234
248
|
var dynamicOptionsDSLType = {
|
|
235
249
|
type: 'string',
|
|
236
250
|
pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
|
|
@@ -240,20 +254,22 @@ var dynamicOptionsDSLType = {
|
|
|
240
254
|
* @param optionsSchema a visualization's options schema
|
|
241
255
|
* @returns an updated options schema that additionally allows strings starting with > for each option
|
|
242
256
|
*/
|
|
257
|
+
|
|
243
258
|
function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
244
259
|
var enhancedOptionsSchema = {};
|
|
245
260
|
Object.keys(optionsSchema).forEach(function (key) {
|
|
246
261
|
var _a = optionsSchema[key],
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
262
|
+
title = _a.title,
|
|
263
|
+
description = _a.description,
|
|
264
|
+
readOnly = _a.readOnly,
|
|
265
|
+
writeOnly = _a.writeOnly,
|
|
266
|
+
examples = _a.examples,
|
|
267
|
+
defaultValue = _a.default,
|
|
268
|
+
type = _a.type,
|
|
269
|
+
properties = _a.properties,
|
|
270
|
+
patternProperties = _a.patternProperties,
|
|
271
|
+
remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
|
|
272
|
+
|
|
257
273
|
var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
|
|
258
274
|
title: title
|
|
259
275
|
}), description !== undefined && {
|
|
@@ -267,12 +283,14 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
|
267
283
|
}), defaultValue !== undefined && {
|
|
268
284
|
default: defaultValue
|
|
269
285
|
});
|
|
286
|
+
|
|
270
287
|
if (type === 'object') {
|
|
271
288
|
enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
|
|
272
289
|
type: type
|
|
273
290
|
}), properties && {
|
|
274
291
|
properties: enhanceOptionsSchemaWithDynamicOptions(properties)
|
|
275
292
|
});
|
|
293
|
+
|
|
276
294
|
if (patternProperties) {
|
|
277
295
|
var enhancedPatternProperties = {};
|
|
278
296
|
Object.keys(patternProperties).forEach(function (opt) {
|
|
@@ -290,6 +308,7 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
|
290
308
|
});
|
|
291
309
|
return enhancedOptionsSchema;
|
|
292
310
|
}
|
|
311
|
+
|
|
293
312
|
exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
|
|
294
313
|
/**
|
|
295
314
|
* Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
|
|
@@ -298,11 +317,14 @@ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamic
|
|
|
298
317
|
* @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
|
|
299
318
|
* and containing `open: false` for all editor panels in editorConfig
|
|
300
319
|
*/
|
|
320
|
+
|
|
301
321
|
function enhanceConfig(vizConfig) {
|
|
302
322
|
var enhancedConfig = Object.assign({}, vizConfig);
|
|
323
|
+
|
|
303
324
|
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
|
|
304
325
|
enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
|
|
305
326
|
}
|
|
327
|
+
|
|
306
328
|
enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
307
329
|
return Object.assign(Object.assign({}, config), {
|
|
308
330
|
open: config.open || false
|
|
@@ -310,6 +332,7 @@ function enhanceConfig(vizConfig) {
|
|
|
310
332
|
});
|
|
311
333
|
return enhancedConfig;
|
|
312
334
|
}
|
|
335
|
+
|
|
313
336
|
exports.enhanceConfig = enhanceConfig;
|
|
314
337
|
/**
|
|
315
338
|
* Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
|
|
@@ -317,6 +340,7 @@ exports.enhanceConfig = enhanceConfig;
|
|
|
317
340
|
* @param vizConfig a Visualization Config
|
|
318
341
|
* @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
|
|
319
342
|
*/
|
|
343
|
+
|
|
320
344
|
function uncollapseEditorConfig(vizConfig) {
|
|
321
345
|
var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
|
|
322
346
|
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
@@ -326,13 +350,16 @@ function uncollapseEditorConfig(vizConfig) {
|
|
|
326
350
|
});
|
|
327
351
|
return editorPanelUncollapsedConfig;
|
|
328
352
|
}
|
|
353
|
+
|
|
329
354
|
exports.uncollapseEditorConfig = uncollapseEditorConfig;
|
|
355
|
+
|
|
330
356
|
function isDynamicOption(option) {
|
|
331
357
|
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
332
358
|
}
|
|
333
|
-
|
|
334
|
-
// private helpers to improve readability of getInitialPreset
|
|
359
|
+
|
|
360
|
+
exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
|
|
335
361
|
// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
|
|
362
|
+
|
|
336
363
|
/**
|
|
337
364
|
* this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
|
|
338
365
|
* 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
|
|
@@ -341,6 +368,7 @@ exports.isDynamicOption = isDynamicOption;
|
|
|
341
368
|
*
|
|
342
369
|
* Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
|
|
343
370
|
*/
|
|
371
|
+
|
|
344
372
|
function hasCompatibleContexts(vizContext, presetContext) {
|
|
345
373
|
var presetContextKeys = Object.keys(presetContext);
|
|
346
374
|
return presetContextKeys.every(function (contextKey) {
|
|
@@ -350,6 +378,8 @@ function hasCompatibleContexts(vizContext, presetContext) {
|
|
|
350
378
|
/**
|
|
351
379
|
* Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
|
|
352
380
|
*/
|
|
381
|
+
|
|
382
|
+
|
|
353
383
|
function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
354
384
|
var presetOptionKeys = Object.keys(presetOptions);
|
|
355
385
|
return presetOptionKeys.every(function (optionKey) {
|
|
@@ -364,18 +394,21 @@ function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
|
364
394
|
* @param {Object} vizOptions - the current vizOptions definition
|
|
365
395
|
* @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
|
|
366
396
|
*/
|
|
397
|
+
|
|
398
|
+
|
|
367
399
|
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
368
400
|
return presets.find(function (preset) {
|
|
369
|
-
var presetContext = lodash_1.get(preset, ['value', 'context'], {});
|
|
370
|
-
var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
|
|
401
|
+
var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
|
|
402
|
+
var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
|
|
371
403
|
var presetContextKeys = Object.keys(presetContext);
|
|
372
|
-
var presetOptionKeys = Object.keys(presetOptions);
|
|
373
|
-
// all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
404
|
+
var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
374
405
|
// if not, then the preset is invalid in config.ts
|
|
406
|
+
|
|
375
407
|
if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
|
|
376
408
|
return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
|
|
377
409
|
});
|
|
378
410
|
}
|
|
411
|
+
|
|
379
412
|
exports.getInitialPreset = getInitialPreset;
|
|
380
413
|
/**
|
|
381
414
|
* generates number precision values for a Select editor
|
|
@@ -383,14 +416,16 @@ exports.getInitialPreset = getInitialPreset;
|
|
|
383
416
|
* @param {Number} numPrecisionValues - number of integer precision values to generate
|
|
384
417
|
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
385
418
|
*/
|
|
419
|
+
|
|
386
420
|
function generatePrecisionValues(numPrecisionValues) {
|
|
387
|
-
return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
|
|
421
|
+
return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
|
|
388
422
|
return {
|
|
389
423
|
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
390
424
|
value: i
|
|
391
425
|
};
|
|
392
426
|
});
|
|
393
427
|
}
|
|
428
|
+
|
|
394
429
|
exports.generatePrecisionValues = generatePrecisionValues;
|
|
395
430
|
/**
|
|
396
431
|
* insert layout in layout array, return a new layout array instead of updating the original
|
|
@@ -400,12 +435,15 @@ exports.generatePrecisionValues = generatePrecisionValues;
|
|
|
400
435
|
* @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
|
|
401
436
|
* @returns {EditorLayoutConfig[][]} new editor layout with insertion
|
|
402
437
|
*/
|
|
438
|
+
|
|
403
439
|
var insertLayout = function insertLayout(layout, index) {
|
|
404
440
|
for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
405
441
|
layoutItems[_key - 2] = arguments[_key];
|
|
406
442
|
}
|
|
443
|
+
|
|
407
444
|
return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
|
|
408
445
|
};
|
|
446
|
+
|
|
409
447
|
exports.insertLayout = insertLayout;
|
|
410
448
|
|
|
411
449
|
/***/ }),
|
|
@@ -417,7 +455,14 @@ module.exports = require("lodash");
|
|
|
417
455
|
|
|
418
456
|
/***/ }),
|
|
419
457
|
|
|
420
|
-
/***/
|
|
458
|
+
/***/ 7:
|
|
459
|
+
/***/ (function(module, exports) {
|
|
460
|
+
|
|
461
|
+
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
462
|
+
|
|
463
|
+
/***/ }),
|
|
464
|
+
|
|
465
|
+
/***/ 70:
|
|
421
466
|
/***/ (function(module, exports, __webpack_require__) {
|
|
422
467
|
|
|
423
468
|
"use strict";
|
|
@@ -426,24 +471,35 @@ module.exports = require("lodash");
|
|
|
426
471
|
Object.defineProperty(exports, "__esModule", {
|
|
427
472
|
value: true
|
|
428
473
|
});
|
|
474
|
+
|
|
429
475
|
var i18n_1 = __webpack_require__(0);
|
|
476
|
+
|
|
430
477
|
var schemaUtils_1 = __webpack_require__(3);
|
|
478
|
+
|
|
431
479
|
var visualization_icons_1 = __webpack_require__(12);
|
|
480
|
+
|
|
432
481
|
var placeholders_1 = __webpack_require__(11);
|
|
482
|
+
|
|
433
483
|
var visualization_color_palettes_1 = __webpack_require__(14);
|
|
484
|
+
|
|
434
485
|
var pick_1 = __webpack_require__(9);
|
|
486
|
+
|
|
435
487
|
var variables_1 = __webpack_require__(10);
|
|
488
|
+
|
|
436
489
|
var VizBehavior_1 = __webpack_require__(2);
|
|
490
|
+
|
|
437
491
|
var VizCategory_1 = __webpack_require__(8);
|
|
492
|
+
|
|
438
493
|
var configUtils_1 = __webpack_require__(4);
|
|
494
|
+
|
|
439
495
|
var BackgroundColor_1 = __webpack_require__(13);
|
|
496
|
+
|
|
440
497
|
var dataContract = {
|
|
441
498
|
requiredDataSources: [{
|
|
442
499
|
name: 'primary',
|
|
443
500
|
description: 'DataSource that powers the visualization'
|
|
444
501
|
}],
|
|
445
|
-
optionalDataSources: [
|
|
446
|
-
// Note: SCP-14090 disable ui for optional datasources. We may need to add it back later
|
|
502
|
+
optionalDataSources: [// Note: SCP-14090 disable ui for optional datasources. We may need to add it back later
|
|
447
503
|
// {
|
|
448
504
|
// name: 'annotation',
|
|
449
505
|
// description: 'DataSource that populate event annotations',
|
|
@@ -532,7 +588,7 @@ var optionsSchema = {
|
|
|
532
588
|
bubbleLabelDisplay: {
|
|
533
589
|
default: 'all',
|
|
534
590
|
description: 'Specify whether all bubble labels, the max value bubble labels, or none of the bubble labels should be displayed.',
|
|
535
|
-
pattern: schemaUtils_1.getPattern(['all', 'max', 'off']),
|
|
591
|
+
pattern: (0, schemaUtils_1.getPattern)(['all', 'max', 'off']),
|
|
536
592
|
type: 'string'
|
|
537
593
|
},
|
|
538
594
|
bubbleRadiusMax: {
|
|
@@ -548,7 +604,7 @@ var optionsSchema = {
|
|
|
548
604
|
bubbleRowScale: {
|
|
549
605
|
default: 'global',
|
|
550
606
|
description: 'Specify how bubbles are scaled relative to other rows.',
|
|
551
|
-
pattern: schemaUtils_1.getPattern(['global', 'row']),
|
|
607
|
+
pattern: (0, schemaUtils_1.getPattern)(['global', 'row']),
|
|
552
608
|
type: 'string'
|
|
553
609
|
},
|
|
554
610
|
bubbleSizeMax: {
|
|
@@ -564,19 +620,19 @@ var optionsSchema = {
|
|
|
564
620
|
bubbleSizeMethod: {
|
|
565
621
|
default: 'area',
|
|
566
622
|
description: 'Specify whether bubble area or diameter corresponds to the size value.',
|
|
567
|
-
pattern: schemaUtils_1.getPattern(['radius', 'area']),
|
|
623
|
+
pattern: (0, schemaUtils_1.getPattern)(['radius', 'area']),
|
|
568
624
|
type: 'string'
|
|
569
625
|
},
|
|
570
626
|
colorMode: {
|
|
571
627
|
default: 'dynamic',
|
|
572
628
|
description: 'Specify the coloring method used for the bubbles.',
|
|
573
|
-
pattern: schemaUtils_1.getPattern(['categorical', 'dynamic']),
|
|
629
|
+
pattern: (0, schemaUtils_1.getPattern)(['categorical', 'dynamic']),
|
|
574
630
|
type: 'string'
|
|
575
631
|
},
|
|
576
632
|
legendDisplay: {
|
|
577
633
|
default: 'right',
|
|
578
634
|
description: 'Specify the location of the legend on the panel.',
|
|
579
|
-
pattern: schemaUtils_1.getPattern(['right', 'off']),
|
|
635
|
+
pattern: (0, schemaUtils_1.getPattern)(['right', 'off']),
|
|
580
636
|
type: 'string'
|
|
581
637
|
},
|
|
582
638
|
seriesColors: {
|
|
@@ -605,7 +661,7 @@ var optionsSchema = {
|
|
|
605
661
|
};
|
|
606
662
|
var themes = {
|
|
607
663
|
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
608
|
-
return pick_1.default({
|
|
664
|
+
return (0, pick_1.default)({
|
|
609
665
|
enterprise: {
|
|
610
666
|
dark: variables_1.default.black(props),
|
|
611
667
|
light: variables_1.default.backgroundColor(props)
|
|
@@ -615,73 +671,72 @@ var themes = {
|
|
|
615
671
|
}
|
|
616
672
|
};
|
|
617
673
|
var editorConfig = [{
|
|
618
|
-
label: i18n_1._('Data display'),
|
|
674
|
+
label: (0, i18n_1._)('Data display'),
|
|
619
675
|
layout: [[{
|
|
620
|
-
label: i18n_1._('Show bubble labels'),
|
|
676
|
+
label: (0, i18n_1._)('Show bubble labels'),
|
|
621
677
|
option: 'bubbleLabelDisplay',
|
|
622
678
|
editor: 'editor.radioBar',
|
|
623
679
|
editorProps: {
|
|
624
680
|
values: [{
|
|
625
|
-
label: i18n_1._('All'),
|
|
681
|
+
label: (0, i18n_1._)('All'),
|
|
626
682
|
value: 'all'
|
|
627
683
|
}, {
|
|
628
|
-
label: i18n_1._('Max'),
|
|
684
|
+
label: (0, i18n_1._)('Max'),
|
|
629
685
|
value: 'max'
|
|
630
686
|
}, {
|
|
631
|
-
label: i18n_1._('Off'),
|
|
687
|
+
label: (0, i18n_1._)('Off'),
|
|
632
688
|
value: 'off'
|
|
633
689
|
}]
|
|
634
690
|
}
|
|
635
691
|
}], [{
|
|
636
|
-
label: i18n_1._('Pulsate max value'),
|
|
692
|
+
label: (0, i18n_1._)('Pulsate max value'),
|
|
637
693
|
option: 'showMaxValuePulsation',
|
|
638
694
|
editor: 'editor.toggle'
|
|
639
695
|
}], [{
|
|
640
|
-
label: i18n_1._('Bubble scale'),
|
|
696
|
+
label: (0, i18n_1._)('Bubble scale'),
|
|
641
697
|
option: 'bubbleSizeMethod',
|
|
642
698
|
editor: 'editor.radioBar',
|
|
643
699
|
editorProps: {
|
|
644
700
|
values: [{
|
|
645
|
-
label: i18n_1._('Radius'),
|
|
701
|
+
label: (0, i18n_1._)('Radius'),
|
|
646
702
|
value: 'radius'
|
|
647
703
|
}, {
|
|
648
|
-
label: i18n_1._('Area'),
|
|
704
|
+
label: (0, i18n_1._)('Area'),
|
|
649
705
|
value: 'area'
|
|
650
706
|
}]
|
|
651
707
|
}
|
|
652
708
|
}], [{
|
|
653
|
-
label: i18n_1._('Bubble row scale'),
|
|
709
|
+
label: (0, i18n_1._)('Bubble row scale'),
|
|
654
710
|
option: 'bubbleRowScale',
|
|
655
711
|
editor: 'editor.radioBar',
|
|
656
712
|
editorProps: {
|
|
657
713
|
values: [{
|
|
658
|
-
label: i18n_1._('Global'),
|
|
714
|
+
label: (0, i18n_1._)('Global'),
|
|
659
715
|
value: 'global'
|
|
660
716
|
}, {
|
|
661
|
-
label: i18n_1._('By Row'),
|
|
717
|
+
label: (0, i18n_1._)('By Row'),
|
|
662
718
|
value: 'row'
|
|
663
719
|
}]
|
|
664
720
|
}
|
|
665
721
|
}]]
|
|
666
722
|
}, {
|
|
667
|
-
label: i18n_1._('Color and style'),
|
|
723
|
+
label: (0, i18n_1._)('Color and style'),
|
|
668
724
|
layout: [[{
|
|
669
|
-
label: i18n_1._('Color mode'),
|
|
725
|
+
label: (0, i18n_1._)('Color mode'),
|
|
670
726
|
option: 'colorMode',
|
|
671
727
|
editor: 'editor.radioBar',
|
|
672
728
|
editorProps: {
|
|
673
729
|
values: [{
|
|
674
|
-
label: i18n_1._('Dynamic'),
|
|
730
|
+
label: (0, i18n_1._)('Dynamic'),
|
|
675
731
|
value: 'dynamic'
|
|
676
732
|
}, {
|
|
677
|
-
label: i18n_1._('Categorical'),
|
|
733
|
+
label: (0, i18n_1._)('Categorical'),
|
|
678
734
|
value: 'categorical'
|
|
679
735
|
}]
|
|
680
736
|
}
|
|
681
|
-
}], [
|
|
682
|
-
// This should be hidden in categorical color mode
|
|
737
|
+
}], [// This should be hidden in categorical color mode
|
|
683
738
|
{
|
|
684
|
-
label: i18n_1._('Color by field'),
|
|
739
|
+
label: (0, i18n_1._)('Color by field'),
|
|
685
740
|
editor: 'editor.columnSelector',
|
|
686
741
|
option: 'bubbleColor',
|
|
687
742
|
context: 'bubbleColorConfig',
|
|
@@ -701,18 +756,18 @@ var editorConfig = [{
|
|
|
701
756
|
};
|
|
702
757
|
}
|
|
703
758
|
}
|
|
704
|
-
}], BackgroundColor_1.default({
|
|
759
|
+
}], (0, BackgroundColor_1.default)({
|
|
705
760
|
themes: themes
|
|
706
761
|
}), [{
|
|
707
|
-
label: i18n_1._('Legend display'),
|
|
762
|
+
label: (0, i18n_1._)('Legend display'),
|
|
708
763
|
option: 'legendDisplay',
|
|
709
764
|
editor: 'editor.select',
|
|
710
765
|
editorProps: {
|
|
711
766
|
values: [{
|
|
712
|
-
label: i18n_1._('Right'),
|
|
767
|
+
label: (0, i18n_1._)('Right'),
|
|
713
768
|
value: 'right'
|
|
714
769
|
}, {
|
|
715
|
-
label: i18n_1._('Off'),
|
|
770
|
+
label: (0, i18n_1._)('Off'),
|
|
716
771
|
value: 'off'
|
|
717
772
|
}]
|
|
718
773
|
},
|
|
@@ -725,16 +780,19 @@ var editorConfig = [{
|
|
|
725
780
|
/**
|
|
726
781
|
* visualization configuration
|
|
727
782
|
*/
|
|
783
|
+
|
|
728
784
|
var config = {
|
|
729
785
|
/**
|
|
730
786
|
* unique viz key
|
|
731
787
|
*/
|
|
732
788
|
key: 'splunk.punchcard',
|
|
789
|
+
|
|
733
790
|
/**
|
|
734
791
|
* viz name
|
|
735
792
|
*/
|
|
736
|
-
name: i18n_1._('Punchcard'),
|
|
793
|
+
name: (0, i18n_1._)('Punchcard'),
|
|
737
794
|
category: VizCategory_1.VizCategory.CORRELATION,
|
|
795
|
+
|
|
738
796
|
/**
|
|
739
797
|
* viz icon
|
|
740
798
|
*/
|
|
@@ -757,14 +815,7 @@ var config = {
|
|
|
757
815
|
themes: themes,
|
|
758
816
|
requiredProps: ['x', 'y', 'size']
|
|
759
817
|
};
|
|
760
|
-
exports.default = configUtils_1.enhanceConfig(config);
|
|
761
|
-
|
|
762
|
-
/***/ }),
|
|
763
|
-
|
|
764
|
-
/***/ 7:
|
|
765
|
-
/***/ (function(module, exports) {
|
|
766
|
-
|
|
767
|
-
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
818
|
+
exports.default = (0, configUtils_1.enhanceConfig)(config);
|
|
768
819
|
|
|
769
820
|
/***/ }),
|
|
770
821
|
|
|
@@ -779,6 +830,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
779
830
|
});
|
|
780
831
|
exports.VizCategory = void 0;
|
|
781
832
|
var VizCategory;
|
|
833
|
+
|
|
782
834
|
(function (VizCategory) {
|
|
783
835
|
VizCategory["SINGLE_VALUE"] = "Single Value";
|
|
784
836
|
VizCategory["TRENDS"] = "Trends";
|