@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/Ellipse.config.js
CHANGED
|
@@ -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";
|
|
@@ -434,8 +470,7 @@ module.exports = require("@splunk/visualization-color-palettes/editors/PresetPal
|
|
|
434
470
|
/* 32 */,
|
|
435
471
|
/* 33 */,
|
|
436
472
|
/* 34 */,
|
|
437
|
-
/* 35
|
|
438
|
-
/* 36 */
|
|
473
|
+
/* 35 */
|
|
439
474
|
/***/ (function(module, exports, __webpack_require__) {
|
|
440
475
|
|
|
441
476
|
"use strict";
|
|
@@ -445,48 +480,52 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
445
480
|
value: true
|
|
446
481
|
});
|
|
447
482
|
exports.getDynamicFillColorEditor = void 0;
|
|
483
|
+
|
|
448
484
|
var i18n_1 = __webpack_require__(0);
|
|
485
|
+
|
|
449
486
|
var configUtils_1 = __webpack_require__(5);
|
|
487
|
+
|
|
450
488
|
var getDynamicFillColorEditor = function getDynamicFillColorEditor(_ref) {
|
|
451
489
|
var defaultContext = _ref.defaultContext,
|
|
452
|
-
|
|
490
|
+
defaultPalettesConfig = _ref.defaultPalettesConfig;
|
|
453
491
|
return {
|
|
454
|
-
label: i18n_1._('Fill'),
|
|
492
|
+
label: (0, i18n_1._)('Fill'),
|
|
455
493
|
option: 'fillColor',
|
|
456
494
|
context: 'fillColorEditorConfig',
|
|
457
495
|
editor: 'editor.dynamicColor',
|
|
458
496
|
showEditor: function showEditor(_ref2) {
|
|
459
497
|
var options = _ref2.options;
|
|
460
|
-
return configUtils_1.isDynamicOption(options.fillColor);
|
|
498
|
+
return (0, configUtils_1.isDynamicOption)(options.fillColor);
|
|
461
499
|
},
|
|
462
500
|
editorProps: {
|
|
463
501
|
labelPosition: 'top',
|
|
464
|
-
flyoutTitle: i18n_1._('Dynamic coloring: fill'),
|
|
502
|
+
flyoutTitle: (0, i18n_1._)('Dynamic coloring: fill'),
|
|
465
503
|
formatters: [{
|
|
466
|
-
label: i18n_1._('Ranges'),
|
|
504
|
+
label: (0, i18n_1._)('Ranges'),
|
|
467
505
|
value: 'rangeValue',
|
|
468
506
|
defaults: {
|
|
469
507
|
fillDataValue: defaultContext.fillColorConfig
|
|
470
508
|
}
|
|
471
509
|
}, {
|
|
472
|
-
label: i18n_1._('Matches'),
|
|
510
|
+
label: (0, i18n_1._)('Matches'),
|
|
473
511
|
value: 'matchValue',
|
|
474
512
|
defaults: {
|
|
475
513
|
fillDataValue: defaultContext.fillColorMatchConfig
|
|
476
514
|
}
|
|
477
515
|
}],
|
|
478
516
|
dataSelectors: [{
|
|
479
|
-
label: i18n_1._('Fill'),
|
|
517
|
+
label: (0, i18n_1._)('Fill'),
|
|
480
518
|
value: 'fillDataValue'
|
|
481
519
|
}],
|
|
482
520
|
defaultPalettesConfig: defaultPalettesConfig
|
|
483
521
|
}
|
|
484
522
|
};
|
|
485
523
|
};
|
|
524
|
+
|
|
486
525
|
exports.getDynamicFillColorEditor = getDynamicFillColorEditor;
|
|
487
526
|
|
|
488
527
|
/***/ }),
|
|
489
|
-
/*
|
|
528
|
+
/* 36 */
|
|
490
529
|
/***/ (function(module, exports, __webpack_require__) {
|
|
491
530
|
|
|
492
531
|
"use strict";
|
|
@@ -496,48 +535,52 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
496
535
|
value: true
|
|
497
536
|
});
|
|
498
537
|
exports.getDynamicStrokeColorEditor = void 0;
|
|
538
|
+
|
|
499
539
|
var i18n_1 = __webpack_require__(0);
|
|
540
|
+
|
|
500
541
|
var configUtils_1 = __webpack_require__(5);
|
|
542
|
+
|
|
501
543
|
var getDynamicStrokeColorEditor = function getDynamicStrokeColorEditor(_ref) {
|
|
502
544
|
var defaultContext = _ref.defaultContext,
|
|
503
|
-
|
|
545
|
+
defaultPalettesConfig = _ref.defaultPalettesConfig;
|
|
504
546
|
return {
|
|
505
|
-
label: i18n_1._('Stroke'),
|
|
547
|
+
label: (0, i18n_1._)('Stroke'),
|
|
506
548
|
option: 'strokeColor',
|
|
507
549
|
context: 'strokeColorEditorConfig',
|
|
508
550
|
editor: 'editor.dynamicColor',
|
|
509
551
|
showEditor: function showEditor(_ref2) {
|
|
510
552
|
var options = _ref2.options;
|
|
511
|
-
return configUtils_1.isDynamicOption(options.strokeColor);
|
|
553
|
+
return (0, configUtils_1.isDynamicOption)(options.strokeColor);
|
|
512
554
|
},
|
|
513
555
|
editorProps: {
|
|
514
556
|
labelPosition: 'top',
|
|
515
|
-
flyoutTitle: i18n_1._('Dynamic coloring: stroke'),
|
|
557
|
+
flyoutTitle: (0, i18n_1._)('Dynamic coloring: stroke'),
|
|
516
558
|
formatters: [{
|
|
517
|
-
label: i18n_1._('Ranges'),
|
|
559
|
+
label: (0, i18n_1._)('Ranges'),
|
|
518
560
|
value: 'rangeValue',
|
|
519
561
|
defaults: {
|
|
520
562
|
strokeDataValue: defaultContext.strokeColorConfig
|
|
521
563
|
}
|
|
522
564
|
}, {
|
|
523
|
-
label: i18n_1._('Matches'),
|
|
565
|
+
label: (0, i18n_1._)('Matches'),
|
|
524
566
|
value: 'matchValue',
|
|
525
567
|
defaults: {
|
|
526
568
|
strokeDataValue: defaultContext.strokeColorMatchConfig
|
|
527
569
|
}
|
|
528
570
|
}],
|
|
529
571
|
dataSelectors: [{
|
|
530
|
-
label: i18n_1._('Stroke'),
|
|
572
|
+
label: (0, i18n_1._)('Stroke'),
|
|
531
573
|
value: 'strokeDataValue'
|
|
532
574
|
}],
|
|
533
575
|
defaultPalettesConfig: defaultPalettesConfig
|
|
534
576
|
}
|
|
535
577
|
};
|
|
536
578
|
};
|
|
579
|
+
|
|
537
580
|
exports.getDynamicStrokeColorEditor = getDynamicStrokeColorEditor;
|
|
538
581
|
|
|
539
582
|
/***/ }),
|
|
540
|
-
/*
|
|
583
|
+
/* 37 */
|
|
541
584
|
/***/ (function(module, exports, __webpack_require__) {
|
|
542
585
|
|
|
543
586
|
"use strict";
|
|
@@ -546,21 +589,24 @@ exports.getDynamicStrokeColorEditor = getDynamicStrokeColorEditor;
|
|
|
546
589
|
Object.defineProperty(exports, "__esModule", {
|
|
547
590
|
value: true
|
|
548
591
|
});
|
|
592
|
+
|
|
549
593
|
var i18n_1 = __webpack_require__(0);
|
|
594
|
+
|
|
550
595
|
var configUtils_1 = __webpack_require__(5);
|
|
596
|
+
|
|
551
597
|
var StaticFillColorEditor = {
|
|
552
|
-
label: i18n_1._('Fill'),
|
|
598
|
+
label: (0, i18n_1._)('Fill'),
|
|
553
599
|
option: 'fillColor',
|
|
554
600
|
editor: 'editor.color',
|
|
555
601
|
showEditor: function showEditor(_ref) {
|
|
556
602
|
var options = _ref.options;
|
|
557
|
-
return !configUtils_1.isDynamicOption(options.fillColor);
|
|
603
|
+
return !(0, configUtils_1.isDynamicOption)(options.fillColor);
|
|
558
604
|
}
|
|
559
605
|
};
|
|
560
606
|
exports.default = StaticFillColorEditor;
|
|
561
607
|
|
|
562
608
|
/***/ }),
|
|
563
|
-
/*
|
|
609
|
+
/* 38 */
|
|
564
610
|
/***/ (function(module, exports, __webpack_require__) {
|
|
565
611
|
|
|
566
612
|
"use strict";
|
|
@@ -569,20 +615,24 @@ exports.default = StaticFillColorEditor;
|
|
|
569
615
|
Object.defineProperty(exports, "__esModule", {
|
|
570
616
|
value: true
|
|
571
617
|
});
|
|
618
|
+
|
|
572
619
|
var i18n_1 = __webpack_require__(0);
|
|
620
|
+
|
|
573
621
|
var configUtils_1 = __webpack_require__(5);
|
|
622
|
+
|
|
574
623
|
var StaticStrokeColorEditor = {
|
|
575
|
-
label: i18n_1._('Stroke'),
|
|
624
|
+
label: (0, i18n_1._)('Stroke'),
|
|
576
625
|
option: 'strokeColor',
|
|
577
626
|
editor: 'editor.color',
|
|
578
627
|
showEditor: function showEditor(_ref) {
|
|
579
628
|
var options = _ref.options;
|
|
580
|
-
return !configUtils_1.isDynamicOption(options.strokeColor);
|
|
629
|
+
return !(0, configUtils_1.isDynamicOption)(options.strokeColor);
|
|
581
630
|
}
|
|
582
631
|
};
|
|
583
632
|
exports.default = StaticStrokeColorEditor;
|
|
584
633
|
|
|
585
634
|
/***/ }),
|
|
635
|
+
/* 39 */,
|
|
586
636
|
/* 40 */,
|
|
587
637
|
/* 41 */,
|
|
588
638
|
/* 42 */,
|
|
@@ -599,17 +649,29 @@ exports.default = StaticStrokeColorEditor;
|
|
|
599
649
|
Object.defineProperty(exports, "__esModule", {
|
|
600
650
|
value: true
|
|
601
651
|
});
|
|
652
|
+
|
|
602
653
|
var i18n_1 = __webpack_require__(0);
|
|
654
|
+
|
|
603
655
|
var PresetPalettes_1 = __webpack_require__(15);
|
|
656
|
+
|
|
604
657
|
var pick_1 = __webpack_require__(9);
|
|
658
|
+
|
|
605
659
|
var variables_1 = __webpack_require__(10);
|
|
660
|
+
|
|
606
661
|
var VizBehavior_1 = __webpack_require__(2);
|
|
662
|
+
|
|
607
663
|
var VizCategory_1 = __webpack_require__(8);
|
|
664
|
+
|
|
608
665
|
var configUtils_1 = __webpack_require__(4);
|
|
609
|
-
|
|
610
|
-
var
|
|
611
|
-
|
|
612
|
-
var
|
|
666
|
+
|
|
667
|
+
var DynamicFillColorEditor_1 = __webpack_require__(35);
|
|
668
|
+
|
|
669
|
+
var DynamicStrokeColorEditor_1 = __webpack_require__(36);
|
|
670
|
+
|
|
671
|
+
var StaticFillColorEditor_1 = __webpack_require__(37);
|
|
672
|
+
|
|
673
|
+
var StaticStrokeColorEditor_1 = __webpack_require__(38);
|
|
674
|
+
|
|
613
675
|
var dataContract = {
|
|
614
676
|
requiredDataSources: [],
|
|
615
677
|
optionalDataSources: [{
|
|
@@ -725,7 +787,7 @@ var optionsSchema = {
|
|
|
725
787
|
};
|
|
726
788
|
var themes = {
|
|
727
789
|
defaultFillColor: function defaultFillColor(props) {
|
|
728
|
-
return pick_1.default({
|
|
790
|
+
return (0, pick_1.default)({
|
|
729
791
|
enterprise: {
|
|
730
792
|
dark: variables_1.default.gray25(props),
|
|
731
793
|
light: variables_1.default.gray80(props)
|
|
@@ -734,7 +796,7 @@ var themes = {
|
|
|
734
796
|
})(props);
|
|
735
797
|
},
|
|
736
798
|
defaultStrokeColor: function defaultStrokeColor(props) {
|
|
737
|
-
return pick_1.default({
|
|
799
|
+
return (0, pick_1.default)({
|
|
738
800
|
enterprise: {
|
|
739
801
|
dark: variables_1.default.gray80(props),
|
|
740
802
|
light: variables_1.default.gray30(props)
|
|
@@ -753,14 +815,14 @@ var basePresetOptions = {
|
|
|
753
815
|
};
|
|
754
816
|
var presets = [{
|
|
755
817
|
// dummy context variables to allow for resetting of unused context states
|
|
756
|
-
label: i18n_1._('None'),
|
|
818
|
+
label: (0, i18n_1._)('None'),
|
|
757
819
|
name: 'ellipse.none',
|
|
758
820
|
value: {
|
|
759
821
|
context: Object.assign({}, basePresetContext),
|
|
760
822
|
options: Object.assign({}, basePresetOptions)
|
|
761
823
|
}
|
|
762
824
|
}, {
|
|
763
|
-
label: i18n_1._('Fill'),
|
|
825
|
+
label: (0, i18n_1._)('Fill'),
|
|
764
826
|
name: 'ellipse.fill',
|
|
765
827
|
value: {
|
|
766
828
|
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
@@ -772,7 +834,7 @@ var presets = [{
|
|
|
772
834
|
})
|
|
773
835
|
}
|
|
774
836
|
}, {
|
|
775
|
-
label: i18n_1._('Stroke'),
|
|
837
|
+
label: (0, i18n_1._)('Stroke'),
|
|
776
838
|
name: 'ellipse.stroke',
|
|
777
839
|
value: {
|
|
778
840
|
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
@@ -784,7 +846,7 @@ var presets = [{
|
|
|
784
846
|
})
|
|
785
847
|
}
|
|
786
848
|
}, {
|
|
787
|
-
label: i18n_1._('Fill and Stroke'),
|
|
849
|
+
label: (0, i18n_1._)('Fill and Stroke'),
|
|
788
850
|
name: 'ellipse.fillAndStroke',
|
|
789
851
|
value: {
|
|
790
852
|
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
@@ -800,17 +862,17 @@ var presets = [{
|
|
|
800
862
|
}
|
|
801
863
|
}];
|
|
802
864
|
var editorConfig = [{
|
|
803
|
-
label: i18n_1._('Color and style'),
|
|
865
|
+
label: (0, i18n_1._)('Color and style'),
|
|
804
866
|
layout: [[{
|
|
805
|
-
label: i18n_1._('Dynamic elements'),
|
|
867
|
+
label: (0, i18n_1._)('Dynamic elements'),
|
|
806
868
|
key: 'presetSelector',
|
|
807
869
|
editor: 'editor.presetSelector',
|
|
808
870
|
editorProps: {
|
|
809
871
|
presets: presets,
|
|
810
872
|
value: function value(_ref) {
|
|
811
873
|
var context = _ref.context,
|
|
812
|
-
|
|
813
|
-
var initialPreset = configUtils_1.getInitialPreset(context, options, presets);
|
|
874
|
+
options = _ref.options;
|
|
875
|
+
var initialPreset = (0, configUtils_1.getInitialPreset)(context, options, presets);
|
|
814
876
|
return initialPreset && initialPreset.label || null;
|
|
815
877
|
}
|
|
816
878
|
}
|
|
@@ -818,39 +880,39 @@ var editorConfig = [{
|
|
|
818
880
|
editorProps: {
|
|
819
881
|
themes: themes
|
|
820
882
|
}
|
|
821
|
-
})], [DynamicFillColorEditor_1.getDynamicFillColorEditor({
|
|
883
|
+
})], [(0, DynamicFillColorEditor_1.getDynamicFillColorEditor)({
|
|
822
884
|
defaultContext: defaultContext,
|
|
823
885
|
defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
|
|
824
886
|
})], [Object.assign(Object.assign({}, StaticStrokeColorEditor_1.default), {
|
|
825
887
|
editorProps: {
|
|
826
888
|
themes: themes
|
|
827
889
|
}
|
|
828
|
-
})], [DynamicStrokeColorEditor_1.getDynamicStrokeColorEditor({
|
|
890
|
+
})], [(0, DynamicStrokeColorEditor_1.getDynamicStrokeColorEditor)({
|
|
829
891
|
defaultContext: defaultContext,
|
|
830
892
|
defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
|
|
831
893
|
})], [{
|
|
832
|
-
label: i18n_1._('Fill opacity (%)'),
|
|
894
|
+
label: (0, i18n_1._)('Fill opacity (%)'),
|
|
833
895
|
option: 'fillOpacity',
|
|
834
896
|
editor: 'editor.percent',
|
|
835
897
|
editorProps: {
|
|
836
898
|
min: 0
|
|
837
899
|
}
|
|
838
900
|
}, {
|
|
839
|
-
label: i18n_1._('Stroke opacity (%)'),
|
|
901
|
+
label: (0, i18n_1._)('Stroke opacity (%)'),
|
|
840
902
|
option: 'strokeOpacity',
|
|
841
903
|
editor: 'editor.percent',
|
|
842
904
|
editorProps: {
|
|
843
905
|
min: 0
|
|
844
906
|
}
|
|
845
907
|
}], [{
|
|
846
|
-
label: i18n_1._('Stroke width'),
|
|
908
|
+
label: (0, i18n_1._)('Stroke width'),
|
|
847
909
|
option: 'strokeWidth',
|
|
848
910
|
editor: 'editor.number',
|
|
849
911
|
editorProps: {
|
|
850
912
|
min: 0
|
|
851
913
|
}
|
|
852
914
|
}, {
|
|
853
|
-
label: i18n_1._('Stroke dash style'),
|
|
915
|
+
label: (0, i18n_1._)('Stroke dash style'),
|
|
854
916
|
option: 'strokeDashStyle',
|
|
855
917
|
editor: 'editor.number',
|
|
856
918
|
editorProps: {
|
|
@@ -861,16 +923,19 @@ var editorConfig = [{
|
|
|
861
923
|
/**
|
|
862
924
|
* visualization configuration
|
|
863
925
|
*/
|
|
926
|
+
|
|
864
927
|
var config = {
|
|
865
928
|
/**
|
|
866
929
|
* unique viz key
|
|
867
930
|
*/
|
|
868
931
|
key: 'splunk.ellipse',
|
|
932
|
+
|
|
869
933
|
/**
|
|
870
934
|
* viz name
|
|
871
935
|
*/
|
|
872
|
-
name: i18n_1._('Ellipse'),
|
|
936
|
+
name: (0, i18n_1._)('Ellipse'),
|
|
873
937
|
category: VizCategory_1.VizCategory.SHAPES,
|
|
938
|
+
|
|
874
939
|
/**
|
|
875
940
|
* viz icon
|
|
876
941
|
*/
|
|
@@ -889,7 +954,7 @@ var config = {
|
|
|
889
954
|
supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS],
|
|
890
955
|
themes: themes
|
|
891
956
|
};
|
|
892
|
-
exports.default = configUtils_1.enhanceConfig(config);
|
|
957
|
+
exports.default = (0, configUtils_1.enhanceConfig)(config);
|
|
893
958
|
|
|
894
959
|
/***/ })
|
|
895
960
|
/******/ ]);
|