@splunk/visualizations 26.0.0 → 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 +102 -18
- package/Area.config.js.map +1 -1
- package/Area.js +618 -221
- package/Area.js.map +1 -1
- package/Bar.config.js +104 -20
- package/Bar.config.js.map +1 -1
- package/Bar.js +624 -219
- package/Bar.js.map +1 -1
- package/Bubble.config.js +94 -20
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +606 -211
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +65 -14
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +550 -183
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +103 -18
- package/Column.config.js.map +1 -1
- package/Column.js +637 -221
- package/Column.js.map +1 -1
- package/Ellipse.config.js +82 -17
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +425 -148
- package/Ellipse.js.map +1 -1
- package/Events.config.js +100 -18
- package/Events.config.js.map +1 -1
- package/Events.js +752 -293
- package/Events.js.map +1 -1
- package/FillerGauge.config.js +96 -27
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +759 -374
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +62 -18
- package/Image.config.js.map +1 -1
- package/Image.js +419 -154
- package/Image.js.map +1 -1
- package/Line.config.js +106 -22
- package/Line.config.js.map +1 -1
- package/Line.js +631 -223
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +72 -22
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +632 -219
- package/LinkGraph.js.map +1 -1
- package/MIGRATION.md +1082 -0
- package/Map.config.js +241 -97
- package/Map.config.js.map +1 -1
- package/Map.js +1195 -595
- package/Map.js.map +1 -1
- package/Markdown.config.js +70 -20
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +460 -195
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +79 -21
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +802 -411
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +72 -18
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +853 -484
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +75 -22
- package/Pie.config.js.map +1 -1
- package/Pie.js +612 -212
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +81 -29
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +844 -379
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +85 -19
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +432 -152
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +84 -22
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +878 -342
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +96 -22
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +607 -212
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +94 -24
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +1182 -650
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +286 -225
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +92 -22
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +965 -506
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +99 -26
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +1167 -616
- package/SingleValueRadial.js.map +1 -1
- package/SparkLine.js +126 -67
- package/SparkLine.js.map +1 -1
- package/Table.config.js +73 -20
- package/Table.config.js.map +1 -1
- package/Table.js +810 -322
- package/Table.js.map +1 -1
- package/common/Charting.js +107 -35
- package/common/Charting.js.map +1 -1
- package/common/ChartingApi.js +18 -7
- package/common/ChartingApi.js.map +1 -1
- package/common/EventsDoc.js +76 -22
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +68 -58
- package/common/GaugeMajorTicks.js.map +1 -1
- package/common/GaugeValueMarker.js +43 -34
- package/common/GaugeValueMarker.js.map +1 -1
- package/common/OptionsDoc.js +156 -65
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.js +33 -5
- package/common/OverviewDoc.js.map +1 -1
- package/common/SplunkVisualization.js +31 -4
- package/common/SplunkVisualization.js.map +1 -1
- package/common/SplunkVisualizationApi.js +8 -2
- package/common/SplunkVisualizationApi.js.map +1 -1
- package/common/ThemesDoc.js +27 -14
- package/common/ThemesDoc.js.map +1 -1
- package/common/chartingUtils.js +44 -12
- package/common/chartingUtils.js.map +1 -1
- package/common/docUtils.js +11 -1
- package/common/docUtils.js.map +1 -1
- package/common/gaugeUtils.js +173 -90
- package/common/gaugeUtils.js.map +1 -1
- package/common/shapeUtils.js +14 -2
- package/common/shapeUtils.js.map +1 -1
- package/common/utils/configUtils.js +49 -14
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/dataUtils.js +7 -2
- package/common/utils/dataUtils.js.map +1 -1
- package/common/utils/hocUtils.js +3 -1
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/layoutUtils.js +1 -0
- package/common/utils/layoutUtils.js.map +1 -1
- package/common/utils/mapUtils.js +287 -127
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/singleValueUtils.js +241 -196
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +9 -0
- package/common/utils/testHelper.js.map +1 -1
- package/common/utils/trellisUtils.js +61 -0
- package/common/utils/trellisUtils.js.map +1 -1
- package/common/utils/urlUtils.js +2 -0
- package/common/utils/urlUtils.js.map +1 -1
- package/common/withDashboardViz.js +274 -95
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +16 -18
package/Ellipse.js
CHANGED
|
@@ -133,6 +133,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
133
133
|
});
|
|
134
134
|
exports.VizBehavior = void 0;
|
|
135
135
|
var VizBehavior;
|
|
136
|
+
|
|
136
137
|
(function (VizBehavior) {
|
|
137
138
|
/**
|
|
138
139
|
* Dynamic Options Behavior.
|
|
@@ -152,6 +153,7 @@ var VizBehavior;
|
|
|
152
153
|
* missing.
|
|
153
154
|
* @type {string}
|
|
154
155
|
*/
|
|
156
|
+
|
|
155
157
|
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
156
158
|
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
157
159
|
VizBehavior["TRELLIS"] = "trellis";
|
|
@@ -203,11 +205,17 @@ module.exports = require("@splunk/visualizations-shared/colorUtils");
|
|
|
203
205
|
Object.defineProperty(exports, "__esModule", {
|
|
204
206
|
value: true
|
|
205
207
|
});
|
|
208
|
+
|
|
206
209
|
var React = __webpack_require__(1);
|
|
210
|
+
|
|
207
211
|
var styled_components_1 = __webpack_require__(4);
|
|
212
|
+
|
|
208
213
|
var SizeAwareWrapper_1 = __webpack_require__(19);
|
|
214
|
+
|
|
209
215
|
var style_1 = __webpack_require__(14);
|
|
216
|
+
|
|
210
217
|
var colorUtils_1 = __webpack_require__(12);
|
|
218
|
+
|
|
211
219
|
var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
212
220
|
var width = _ref.width;
|
|
213
221
|
return {
|
|
@@ -220,11 +228,11 @@ var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
|
220
228
|
componentId: "sc-1yhgpod-0"
|
|
221
229
|
})(["position:relative;background-color:", "};"], function (props) {
|
|
222
230
|
return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
223
|
-
});
|
|
224
|
-
|
|
231
|
+
}); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
|
|
232
|
+
|
|
225
233
|
var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
|
|
226
234
|
var width = _ref2.width,
|
|
227
|
-
|
|
235
|
+
height = _ref2.height;
|
|
228
236
|
return {
|
|
229
237
|
style: Object.assign(Object.assign({}, width && {
|
|
230
238
|
width: (0, style_1.toPx)(width)
|
|
@@ -246,11 +254,13 @@ var FixSizeItemContent = styled_components_1.default.div.withConfig({
|
|
|
246
254
|
displayName: "FixedSizeContainer__FixSizeItemContent",
|
|
247
255
|
componentId: "sc-1yhgpod-3"
|
|
248
256
|
})(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
|
|
257
|
+
|
|
249
258
|
var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
250
259
|
var FixedSizeContainer = function FixedSizeContainer(props) {
|
|
251
260
|
var width = props.width,
|
|
252
|
-
|
|
253
|
-
|
|
261
|
+
height = props.height,
|
|
262
|
+
backgroundColor = props.backgroundColor;
|
|
263
|
+
|
|
254
264
|
if (!height) {
|
|
255
265
|
return React.createElement(Item, {
|
|
256
266
|
"data-test": "item",
|
|
@@ -258,24 +268,27 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
258
268
|
backgroundColor: backgroundColor
|
|
259
269
|
}, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
|
|
260
270
|
}
|
|
271
|
+
|
|
261
272
|
return React.createElement(FixSizeItem, {
|
|
262
273
|
"data-test": "fix-size-item",
|
|
263
|
-
"data-splunk-visualization-version": "26.
|
|
274
|
+
"data-splunk-visualization-version": "26.1.0 - fc8bf8d77",
|
|
264
275
|
width: width,
|
|
265
276
|
height: height,
|
|
266
277
|
backgroundColor: backgroundColor
|
|
267
278
|
}, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
|
|
268
279
|
var newWidth = _ref3.width,
|
|
269
|
-
|
|
280
|
+
newHeight = _ref3.height;
|
|
270
281
|
return React.createElement(Viz, Object.assign({}, props, {
|
|
271
282
|
width: newWidth,
|
|
272
283
|
height: newHeight
|
|
273
284
|
}));
|
|
274
285
|
})));
|
|
275
286
|
};
|
|
287
|
+
|
|
276
288
|
FixedSizeContainer.displayName = 'withFixedSizeContainer';
|
|
277
289
|
return FixedSizeContainer;
|
|
278
290
|
};
|
|
291
|
+
|
|
279
292
|
exports.default = withFixedSizeContainer;
|
|
280
293
|
|
|
281
294
|
/***/ }),
|
|
@@ -301,9 +314,10 @@ exports.extendStaticWrapperProps = void 0;
|
|
|
301
314
|
* @param {DashboardVizType} props.Wrapper
|
|
302
315
|
* @param {DashboardVizType} props.Visualization
|
|
303
316
|
*/
|
|
317
|
+
|
|
304
318
|
var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
|
|
305
319
|
var Wrapper = _ref.Wrapper,
|
|
306
|
-
|
|
320
|
+
Visualization = _ref.Visualization;
|
|
307
321
|
var extendProperties = ['propTypes', 'defaultProps', 'config'];
|
|
308
322
|
extendProperties.forEach(function (prop) {
|
|
309
323
|
if (Visualization[prop]) {
|
|
@@ -312,6 +326,7 @@ var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
|
|
|
312
326
|
}
|
|
313
327
|
});
|
|
314
328
|
};
|
|
329
|
+
|
|
315
330
|
exports.extendStaticWrapperProps = extendStaticWrapperProps;
|
|
316
331
|
|
|
317
332
|
/***/ }),
|
|
@@ -346,24 +361,33 @@ module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
|
346
361
|
|
|
347
362
|
|
|
348
363
|
var _toConsumableArray = __webpack_require__(8);
|
|
364
|
+
|
|
349
365
|
var _defineProperty = __webpack_require__(7);
|
|
366
|
+
|
|
350
367
|
var __rest = this && this.__rest || function (s, e) {
|
|
351
368
|
var t = {};
|
|
369
|
+
|
|
352
370
|
for (var p in s) {
|
|
353
371
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
354
372
|
}
|
|
373
|
+
|
|
355
374
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
356
375
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
357
376
|
}
|
|
358
377
|
return t;
|
|
359
378
|
};
|
|
379
|
+
|
|
360
380
|
Object.defineProperty(exports, "__esModule", {
|
|
361
381
|
value: true
|
|
362
382
|
});
|
|
363
383
|
exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
|
|
384
|
+
|
|
364
385
|
var lodash_1 = __webpack_require__(3);
|
|
386
|
+
|
|
365
387
|
var schemaUtils_1 = __webpack_require__(16);
|
|
388
|
+
|
|
366
389
|
var VizBehavior_1 = __webpack_require__(6);
|
|
390
|
+
|
|
367
391
|
var dynamicOptionsDSLType = {
|
|
368
392
|
type: 'string',
|
|
369
393
|
pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
|
|
@@ -373,20 +397,22 @@ var dynamicOptionsDSLType = {
|
|
|
373
397
|
* @param optionsSchema a visualization's options schema
|
|
374
398
|
* @returns an updated options schema that additionally allows strings starting with > for each option
|
|
375
399
|
*/
|
|
400
|
+
|
|
376
401
|
function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
377
402
|
var enhancedOptionsSchema = {};
|
|
378
403
|
Object.keys(optionsSchema).forEach(function (key) {
|
|
379
404
|
var _a = optionsSchema[key],
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
405
|
+
title = _a.title,
|
|
406
|
+
description = _a.description,
|
|
407
|
+
readOnly = _a.readOnly,
|
|
408
|
+
writeOnly = _a.writeOnly,
|
|
409
|
+
examples = _a.examples,
|
|
410
|
+
defaultValue = _a.default,
|
|
411
|
+
type = _a.type,
|
|
412
|
+
properties = _a.properties,
|
|
413
|
+
patternProperties = _a.patternProperties,
|
|
414
|
+
remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
|
|
415
|
+
|
|
390
416
|
var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
|
|
391
417
|
title: title
|
|
392
418
|
}), description !== undefined && {
|
|
@@ -400,12 +426,14 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
|
400
426
|
}), defaultValue !== undefined && {
|
|
401
427
|
default: defaultValue
|
|
402
428
|
});
|
|
429
|
+
|
|
403
430
|
if (type === 'object') {
|
|
404
431
|
enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
|
|
405
432
|
type: type
|
|
406
433
|
}), properties && {
|
|
407
434
|
properties: enhanceOptionsSchemaWithDynamicOptions(properties)
|
|
408
435
|
});
|
|
436
|
+
|
|
409
437
|
if (patternProperties) {
|
|
410
438
|
var enhancedPatternProperties = {};
|
|
411
439
|
Object.keys(patternProperties).forEach(function (opt) {
|
|
@@ -423,6 +451,7 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
|
423
451
|
});
|
|
424
452
|
return enhancedOptionsSchema;
|
|
425
453
|
}
|
|
454
|
+
|
|
426
455
|
exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
|
|
427
456
|
/**
|
|
428
457
|
* Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
|
|
@@ -431,11 +460,14 @@ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamic
|
|
|
431
460
|
* @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
|
|
432
461
|
* and containing `open: false` for all editor panels in editorConfig
|
|
433
462
|
*/
|
|
463
|
+
|
|
434
464
|
function enhanceConfig(vizConfig) {
|
|
435
465
|
var enhancedConfig = Object.assign({}, vizConfig);
|
|
466
|
+
|
|
436
467
|
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
|
|
437
468
|
enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
|
|
438
469
|
}
|
|
470
|
+
|
|
439
471
|
enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
440
472
|
return Object.assign(Object.assign({}, config), {
|
|
441
473
|
open: config.open || false
|
|
@@ -443,6 +475,7 @@ function enhanceConfig(vizConfig) {
|
|
|
443
475
|
});
|
|
444
476
|
return enhancedConfig;
|
|
445
477
|
}
|
|
478
|
+
|
|
446
479
|
exports.enhanceConfig = enhanceConfig;
|
|
447
480
|
/**
|
|
448
481
|
* Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
|
|
@@ -450,6 +483,7 @@ exports.enhanceConfig = enhanceConfig;
|
|
|
450
483
|
* @param vizConfig a Visualization Config
|
|
451
484
|
* @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
|
|
452
485
|
*/
|
|
486
|
+
|
|
453
487
|
function uncollapseEditorConfig(vizConfig) {
|
|
454
488
|
var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
|
|
455
489
|
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
@@ -459,13 +493,16 @@ function uncollapseEditorConfig(vizConfig) {
|
|
|
459
493
|
});
|
|
460
494
|
return editorPanelUncollapsedConfig;
|
|
461
495
|
}
|
|
496
|
+
|
|
462
497
|
exports.uncollapseEditorConfig = uncollapseEditorConfig;
|
|
498
|
+
|
|
463
499
|
function isDynamicOption(option) {
|
|
464
500
|
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
465
501
|
}
|
|
466
|
-
|
|
467
|
-
// private helpers to improve readability of getInitialPreset
|
|
502
|
+
|
|
503
|
+
exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
|
|
468
504
|
// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
|
|
505
|
+
|
|
469
506
|
/**
|
|
470
507
|
* this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
|
|
471
508
|
* 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
|
|
@@ -474,6 +511,7 @@ exports.isDynamicOption = isDynamicOption;
|
|
|
474
511
|
*
|
|
475
512
|
* Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
|
|
476
513
|
*/
|
|
514
|
+
|
|
477
515
|
function hasCompatibleContexts(vizContext, presetContext) {
|
|
478
516
|
var presetContextKeys = Object.keys(presetContext);
|
|
479
517
|
return presetContextKeys.every(function (contextKey) {
|
|
@@ -483,6 +521,8 @@ function hasCompatibleContexts(vizContext, presetContext) {
|
|
|
483
521
|
/**
|
|
484
522
|
* Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
|
|
485
523
|
*/
|
|
524
|
+
|
|
525
|
+
|
|
486
526
|
function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
487
527
|
var presetOptionKeys = Object.keys(presetOptions);
|
|
488
528
|
return presetOptionKeys.every(function (optionKey) {
|
|
@@ -497,18 +537,21 @@ function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
|
497
537
|
* @param {Object} vizOptions - the current vizOptions definition
|
|
498
538
|
* @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
|
|
499
539
|
*/
|
|
540
|
+
|
|
541
|
+
|
|
500
542
|
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
501
543
|
return presets.find(function (preset) {
|
|
502
544
|
var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
|
|
503
545
|
var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
|
|
504
546
|
var presetContextKeys = Object.keys(presetContext);
|
|
505
|
-
var presetOptionKeys = Object.keys(presetOptions);
|
|
506
|
-
// all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
547
|
+
var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
507
548
|
// if not, then the preset is invalid in config.ts
|
|
549
|
+
|
|
508
550
|
if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
|
|
509
551
|
return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
|
|
510
552
|
});
|
|
511
553
|
}
|
|
554
|
+
|
|
512
555
|
exports.getInitialPreset = getInitialPreset;
|
|
513
556
|
/**
|
|
514
557
|
* generates number precision values for a Select editor
|
|
@@ -516,6 +559,7 @@ exports.getInitialPreset = getInitialPreset;
|
|
|
516
559
|
* @param {Number} numPrecisionValues - number of integer precision values to generate
|
|
517
560
|
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
518
561
|
*/
|
|
562
|
+
|
|
519
563
|
function generatePrecisionValues(numPrecisionValues) {
|
|
520
564
|
return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
|
|
521
565
|
return {
|
|
@@ -524,6 +568,7 @@ function generatePrecisionValues(numPrecisionValues) {
|
|
|
524
568
|
};
|
|
525
569
|
});
|
|
526
570
|
}
|
|
571
|
+
|
|
527
572
|
exports.generatePrecisionValues = generatePrecisionValues;
|
|
528
573
|
/**
|
|
529
574
|
* insert layout in layout array, return a new layout array instead of updating the original
|
|
@@ -533,12 +578,15 @@ exports.generatePrecisionValues = generatePrecisionValues;
|
|
|
533
578
|
* @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
|
|
534
579
|
* @returns {EditorLayoutConfig[][]} new editor layout with insertion
|
|
535
580
|
*/
|
|
581
|
+
|
|
536
582
|
var insertLayout = function insertLayout(layout, index) {
|
|
537
583
|
for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
538
584
|
layoutItems[_key - 2] = arguments[_key];
|
|
539
585
|
}
|
|
586
|
+
|
|
540
587
|
return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
|
|
541
588
|
};
|
|
589
|
+
|
|
542
590
|
exports.insertLayout = insertLayout;
|
|
543
591
|
|
|
544
592
|
/***/ }),
|
|
@@ -608,11 +656,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
608
656
|
value: true
|
|
609
657
|
});
|
|
610
658
|
exports.shouldShowIconPlaceholder = void 0;
|
|
659
|
+
|
|
611
660
|
var React = __webpack_require__(1);
|
|
661
|
+
|
|
612
662
|
var T = __webpack_require__(0);
|
|
663
|
+
|
|
613
664
|
var lodash_1 = __webpack_require__(3);
|
|
665
|
+
|
|
614
666
|
var i18n_1 = __webpack_require__(2);
|
|
667
|
+
|
|
615
668
|
var Message_1 = __webpack_require__(10);
|
|
669
|
+
|
|
616
670
|
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
617
671
|
/**
|
|
618
672
|
* @method shouldShowIconPlaceholder
|
|
@@ -620,6 +674,8 @@ var FixedSizeContainer_1 = __webpack_require__(13);
|
|
|
620
674
|
* @param {boolean} loading
|
|
621
675
|
* @returns {boolean}
|
|
622
676
|
*/
|
|
677
|
+
|
|
678
|
+
|
|
623
679
|
var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
|
|
624
680
|
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
625
681
|
var data = (0, lodash_1.get)(dataSources, 'primary.data.columns[0]', undefined);
|
|
@@ -628,6 +684,7 @@ var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources)
|
|
|
628
684
|
var noFields = fields === undefined;
|
|
629
685
|
return loading || noData || noFields;
|
|
630
686
|
};
|
|
687
|
+
|
|
631
688
|
exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
|
|
632
689
|
var propTypes = {
|
|
633
690
|
icon: T.func,
|
|
@@ -642,11 +699,13 @@ var propTypes = {
|
|
|
642
699
|
* @param {IconPlaceholderProps} props
|
|
643
700
|
* @returns {React.ReactElement}
|
|
644
701
|
*/
|
|
702
|
+
|
|
645
703
|
var IconPlaceholder = function IconPlaceholder(props) {
|
|
646
704
|
var width = props.width,
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
705
|
+
height = props.height,
|
|
706
|
+
icon = props.icon,
|
|
707
|
+
iconColor = props.iconColor;
|
|
708
|
+
|
|
650
709
|
if (icon) {
|
|
651
710
|
return React.createElement(icon, {
|
|
652
711
|
style: {
|
|
@@ -661,6 +720,7 @@ var IconPlaceholder = function IconPlaceholder(props) {
|
|
|
661
720
|
height: '50%'
|
|
662
721
|
});
|
|
663
722
|
}
|
|
723
|
+
|
|
664
724
|
return React.createElement(Message_1.default, {
|
|
665
725
|
width: width,
|
|
666
726
|
height: height,
|
|
@@ -668,6 +728,7 @@ var IconPlaceholder = function IconPlaceholder(props) {
|
|
|
668
728
|
message: (0, i18n_1._)('No DataSource Connected')
|
|
669
729
|
});
|
|
670
730
|
};
|
|
731
|
+
|
|
671
732
|
IconPlaceholder.propTypes = propTypes;
|
|
672
733
|
IconPlaceholder.defaultProps = {
|
|
673
734
|
width: '100%',
|
|
@@ -683,21 +744,27 @@ exports.default = (0, FixedSizeContainer_1.default)(IconPlaceholder);
|
|
|
683
744
|
|
|
684
745
|
|
|
685
746
|
var _defineProperty = __webpack_require__(7);
|
|
747
|
+
|
|
686
748
|
Object.defineProperty(exports, "__esModule", {
|
|
687
749
|
value: true
|
|
688
750
|
});
|
|
689
751
|
exports.getSortingParams = exports.SortParamsPropTypes = void 0;
|
|
752
|
+
|
|
690
753
|
var T = __webpack_require__(0);
|
|
754
|
+
|
|
691
755
|
var lodash_1 = __webpack_require__(3);
|
|
692
|
-
|
|
756
|
+
|
|
757
|
+
var DataSource_1 = __webpack_require__(34);
|
|
758
|
+
|
|
693
759
|
exports.SortParamsPropTypes = T.shape({
|
|
694
760
|
currentSortKey: T.string,
|
|
695
761
|
currentSortDir: T.oneOf(DataSource_1.validSortDirs),
|
|
696
762
|
onSort: T.func
|
|
697
763
|
});
|
|
764
|
+
|
|
698
765
|
var getSortingParams = function getSortingParams(_ref) {
|
|
699
766
|
var requestParams = _ref.requestParams,
|
|
700
|
-
|
|
767
|
+
onRequestParamsChange = _ref.onRequestParamsChange;
|
|
701
768
|
var currentSortKey;
|
|
702
769
|
var currentSortDir;
|
|
703
770
|
var nextSortDirMap = {
|
|
@@ -706,15 +773,18 @@ var getSortingParams = function getSortingParams(_ref) {
|
|
|
706
773
|
none: 'asc'
|
|
707
774
|
};
|
|
708
775
|
var onSort;
|
|
776
|
+
|
|
709
777
|
if (typeof onRequestParamsChange === 'function') {
|
|
710
778
|
if (requestParams && (0, lodash_1.has)(requestParams, 'sort')) {
|
|
711
779
|
currentSortKey = Object.keys(requestParams.sort).shift();
|
|
712
780
|
currentSortDir = requestParams.sort[currentSortKey];
|
|
713
|
-
}
|
|
714
|
-
|
|
781
|
+
} // undid memoization since there is a dependency on requestParams, which is a deeply nested object
|
|
782
|
+
|
|
783
|
+
|
|
715
784
|
onSort = function onSort(e, _ref2) {
|
|
716
785
|
var sortKey = _ref2.sortKey,
|
|
717
|
-
|
|
786
|
+
sortDir = _ref2.sortDir;
|
|
787
|
+
|
|
718
788
|
if (typeof sortKey === 'string') {
|
|
719
789
|
var nextSortDir = (0, lodash_1.has)(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
|
|
720
790
|
onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
|
|
@@ -726,12 +796,14 @@ var getSortingParams = function getSortingParams(_ref) {
|
|
|
726
796
|
}
|
|
727
797
|
};
|
|
728
798
|
}
|
|
799
|
+
|
|
729
800
|
return {
|
|
730
801
|
currentSortKey: currentSortKey,
|
|
731
802
|
currentSortDir: currentSortDir,
|
|
732
803
|
onSort: onSort
|
|
733
804
|
};
|
|
734
805
|
};
|
|
806
|
+
|
|
735
807
|
exports.getSortingParams = getSortingParams;
|
|
736
808
|
|
|
737
809
|
/***/ }),
|
|
@@ -741,43 +813,68 @@ exports.getSortingParams = getSortingParams;
|
|
|
741
813
|
"use strict";
|
|
742
814
|
|
|
743
815
|
|
|
816
|
+
Object.defineProperty(exports, "__esModule", {
|
|
817
|
+
value: true
|
|
818
|
+
});
|
|
819
|
+
exports.validOutputModes = exports.validSegmentationModes = exports.validSortDirs = void 0;
|
|
820
|
+
exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
821
|
+
exports.validSegmentationModes = ['none', 'inner'];
|
|
822
|
+
exports.validOutputModes = ['json_cols', 'json'];
|
|
823
|
+
|
|
824
|
+
/***/ }),
|
|
825
|
+
/* 35 */
|
|
826
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
827
|
+
|
|
828
|
+
"use strict";
|
|
829
|
+
|
|
830
|
+
|
|
744
831
|
Object.defineProperty(exports, "__esModule", {
|
|
745
832
|
value: true
|
|
746
833
|
});
|
|
747
834
|
exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
|
|
835
|
+
|
|
748
836
|
var T = __webpack_require__(0);
|
|
837
|
+
|
|
749
838
|
var lodash_1 = __webpack_require__(3);
|
|
839
|
+
|
|
750
840
|
exports.PaginatorParamsPropTypes = T.shape({
|
|
751
841
|
isPaging: T.bool,
|
|
752
842
|
current: T.number,
|
|
753
843
|
totalPages: T.number,
|
|
754
844
|
onChange: T.func
|
|
755
845
|
});
|
|
846
|
+
|
|
756
847
|
var getPaginationParams = function getPaginationParams(_ref) {
|
|
757
848
|
var requestParams = _ref.requestParams,
|
|
758
|
-
|
|
759
|
-
|
|
849
|
+
meta = _ref.meta,
|
|
850
|
+
onRequestParamsChange = _ref.onRequestParamsChange;
|
|
760
851
|
var totalCount = meta && meta.totalCount || 0;
|
|
761
852
|
var offset = requestParams && requestParams.offset || 0;
|
|
762
853
|
var count = requestParams && requestParams.count;
|
|
763
854
|
var totalPages = typeof count === 'number' && count > 0 ? Math.ceil(totalCount / count) : 0;
|
|
764
855
|
var current = typeof count === 'number' && count > 0 ? Math.floor(offset / count) + 1 : 0;
|
|
765
856
|
var isPaging = totalPages > 1 && typeof onRequestParamsChange === 'function';
|
|
857
|
+
|
|
766
858
|
var onChangeHandler = function onChangeHandler(e, _ref2) {
|
|
767
859
|
var page = _ref2.page,
|
|
768
|
-
|
|
860
|
+
countArg = _ref2.count;
|
|
769
861
|
var newParams = (0, lodash_1.cloneDeep)(requestParams);
|
|
862
|
+
|
|
770
863
|
if (typeof countArg === 'number') {
|
|
771
864
|
newParams.count = countArg;
|
|
772
865
|
newParams.offset = 0;
|
|
773
866
|
}
|
|
867
|
+
|
|
774
868
|
var pageCount = typeof newParams.count === 'number' ? newParams.count : 10;
|
|
869
|
+
|
|
775
870
|
if (typeof page === 'number' && page > 0) {
|
|
776
871
|
newParams.count = pageCount;
|
|
777
872
|
newParams.offset = (page - 1) * pageCount;
|
|
778
873
|
}
|
|
874
|
+
|
|
779
875
|
onRequestParamsChange(newParams);
|
|
780
876
|
};
|
|
877
|
+
|
|
781
878
|
return {
|
|
782
879
|
isPaging: isPaging,
|
|
783
880
|
current: current,
|
|
@@ -785,10 +882,11 @@ var getPaginationParams = function getPaginationParams(_ref) {
|
|
|
785
882
|
onChange: typeof onRequestParamsChange === 'function' ? onChangeHandler : lodash_1.noop
|
|
786
883
|
};
|
|
787
884
|
};
|
|
885
|
+
|
|
788
886
|
exports.getPaginationParams = getPaginationParams;
|
|
789
887
|
|
|
790
888
|
/***/ }),
|
|
791
|
-
/*
|
|
889
|
+
/* 36 */
|
|
792
890
|
/***/ (function(module, exports, __webpack_require__) {
|
|
793
891
|
|
|
794
892
|
"use strict";
|
|
@@ -799,6 +897,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
799
897
|
});
|
|
800
898
|
exports.VizCategory = void 0;
|
|
801
899
|
var VizCategory;
|
|
900
|
+
|
|
802
901
|
(function (VizCategory) {
|
|
803
902
|
VizCategory["SINGLE_VALUE"] = "Single Value";
|
|
804
903
|
VizCategory["TRENDS"] = "Trends";
|
|
@@ -815,67 +914,96 @@ var VizCategory;
|
|
|
815
914
|
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
816
915
|
|
|
817
916
|
/***/ }),
|
|
818
|
-
/*
|
|
917
|
+
/* 37 */
|
|
819
918
|
/***/ (function(module, exports, __webpack_require__) {
|
|
820
919
|
|
|
821
920
|
"use strict";
|
|
822
921
|
|
|
823
922
|
|
|
824
923
|
var _slicedToArray = __webpack_require__(17);
|
|
924
|
+
|
|
825
925
|
Object.defineProperty(exports, "__esModule", {
|
|
826
926
|
value: true
|
|
827
927
|
});
|
|
928
|
+
|
|
828
929
|
var React = __webpack_require__(1);
|
|
930
|
+
|
|
829
931
|
var lodash_1 = __webpack_require__(3);
|
|
830
|
-
|
|
932
|
+
|
|
933
|
+
var getSettingsFromThemedProps_1 = __webpack_require__(38);
|
|
934
|
+
|
|
831
935
|
var Options_1 = __webpack_require__(30);
|
|
832
|
-
|
|
936
|
+
|
|
937
|
+
var SanitizeProps_1 = __webpack_require__(39);
|
|
938
|
+
|
|
833
939
|
var TimezoneContext_1 = __webpack_require__(26);
|
|
834
|
-
|
|
940
|
+
|
|
941
|
+
var moment_1 = __webpack_require__(40);
|
|
942
|
+
|
|
835
943
|
var FeatureFlagContext_1 = __webpack_require__(21);
|
|
944
|
+
|
|
836
945
|
var styled_components_1 = __webpack_require__(4);
|
|
946
|
+
|
|
837
947
|
var hocUtils_1 = __webpack_require__(27);
|
|
948
|
+
|
|
838
949
|
var JSONSchemaUtils_1 = __webpack_require__(28);
|
|
839
|
-
|
|
950
|
+
|
|
951
|
+
var async_dynamic_options_evaluator_1 = __webpack_require__(41);
|
|
952
|
+
|
|
840
953
|
var id_1 = __webpack_require__(25);
|
|
841
|
-
|
|
954
|
+
|
|
955
|
+
var SplunkVisualization_1 = __webpack_require__(42);
|
|
956
|
+
|
|
842
957
|
var VizBehavior_1 = __webpack_require__(6);
|
|
958
|
+
|
|
843
959
|
var getSorting_1 = __webpack_require__(33);
|
|
844
|
-
|
|
960
|
+
|
|
961
|
+
var getPagination_1 = __webpack_require__(35);
|
|
962
|
+
|
|
845
963
|
var useDeepMemo_1 = __webpack_require__(44);
|
|
964
|
+
|
|
846
965
|
var MissingPropsMessage_1 = __webpack_require__(45);
|
|
966
|
+
|
|
847
967
|
var withEditModeCover_1 = __webpack_require__(46);
|
|
968
|
+
|
|
848
969
|
var withPlaceholder_1 = __webpack_require__(47);
|
|
849
970
|
/**
|
|
850
971
|
* hoc that wraps a pure react visualization in a Dashboard visualization
|
|
851
972
|
* @param {DashboardVizOpts} opts
|
|
852
973
|
* @returns {HOC}
|
|
853
974
|
*/
|
|
975
|
+
|
|
976
|
+
|
|
854
977
|
var withDashboardViz = function withDashboardViz(opts) {
|
|
855
978
|
var ReactViz = opts.ReactViz,
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
979
|
+
vizConfig = opts.vizConfig,
|
|
980
|
+
_opts$computeVizProps = opts.computeVizProps,
|
|
981
|
+
computeVizProps = _opts$computeVizProps === void 0 ? function () {} : _opts$computeVizProps,
|
|
982
|
+
disableEditModeCover = opts.disableEditModeCover,
|
|
983
|
+
useIconPlaceholder = opts.useIconPlaceholder; // sanitizing props before sending them to reactviz.
|
|
984
|
+
|
|
861
985
|
var SanitizedReactViz = (0, SanitizeProps_1.withSanitizedProps)(ReactViz);
|
|
862
986
|
var defaultOptions = (0, JSONSchemaUtils_1.pickFieldFromJSONSchema)(vizConfig.optionsSchema, 'default');
|
|
987
|
+
|
|
863
988
|
var DashboardViz = function DashboardViz(props) {
|
|
864
989
|
var _a;
|
|
990
|
+
|
|
865
991
|
var mode = props.mode,
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
992
|
+
hasEventHandlers = props.hasEventHandlers,
|
|
993
|
+
dataSources = props.dataSources,
|
|
994
|
+
options = props.options,
|
|
995
|
+
_props$context = props.context,
|
|
996
|
+
context = _props$context === void 0 ? {} : _props$context,
|
|
997
|
+
width = props.width,
|
|
998
|
+
height = props.height,
|
|
999
|
+
onComputedProps = props.onComputedProps,
|
|
1000
|
+
onEventTrigger = props.onEventTrigger,
|
|
1001
|
+
theme = props.theme,
|
|
1002
|
+
onRequestParamsChange = props.onRequestParamsChange;
|
|
1003
|
+
|
|
877
1004
|
var _React$useContext = React.useContext(TimezoneContext_1.default),
|
|
878
|
-
|
|
1005
|
+
serializedTimezone = _React$useContext.serializedTimezone;
|
|
1006
|
+
|
|
879
1007
|
if (serializedTimezone) {
|
|
880
1008
|
/*
|
|
881
1009
|
@splunk/moment currently does not allow us to customize the timezone on a per visualization basis.
|
|
@@ -889,38 +1017,51 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
889
1017
|
moment_1.default.setDefaultSplunkTimezone(serializedTimezone);
|
|
890
1018
|
}
|
|
891
1019
|
}
|
|
1020
|
+
|
|
892
1021
|
var themeFunc = function themeFunc(themeVar) {
|
|
893
1022
|
var _a, _b;
|
|
1023
|
+
|
|
894
1024
|
return (_b = (_a = vizConfig.themes)[themeVar]) === null || _b === void 0 ? void 0 : _b.call(_a, props);
|
|
895
1025
|
};
|
|
1026
|
+
|
|
896
1027
|
var bgColorFromTheme = themeFunc('defaultBackgroundColor');
|
|
1028
|
+
|
|
897
1029
|
var _ref = (0, getSettingsFromThemedProps_1.default)({
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
1030
|
+
theme: theme
|
|
1031
|
+
}),
|
|
1032
|
+
currentThemeFamily = _ref.family,
|
|
1033
|
+
currentThemeColorScheme = _ref.colorScheme,
|
|
1034
|
+
currentThemeDensity = _ref.density;
|
|
1035
|
+
|
|
903
1036
|
var evaluatedOptions = {}; // evaluatedOptions need to be initialized as an empty object
|
|
1037
|
+
|
|
904
1038
|
var _React$useState = React.useState({}),
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
1039
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
1040
|
+
evaluatedOptionsAsync = _React$useState2[0],
|
|
1041
|
+
setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
|
|
1042
|
+
|
|
1043
|
+
|
|
908
1044
|
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
1045
|
+
|
|
909
1046
|
var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat((0, id_1.createGUID)())),
|
|
910
|
-
|
|
911
|
-
|
|
1047
|
+
_React$useState4 = _slicedToArray(_React$useState3, 1),
|
|
1048
|
+
visualizationID = _React$useState4[0];
|
|
1049
|
+
|
|
912
1050
|
var _React$useState5 = React.useState({}),
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
1051
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
1052
|
+
dataSourcesInState = _React$useState6[0],
|
|
1053
|
+
setDataSourcesInState = _React$useState6[1];
|
|
1054
|
+
|
|
916
1055
|
var _React$useState7 = React.useState(),
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
1056
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
1057
|
+
dataFramesInState = _React$useState8[0],
|
|
1058
|
+
setDataFramesInState = _React$useState8[1];
|
|
1059
|
+
|
|
920
1060
|
var _React$useState9 = React.useState(Boolean(featureFlagContext === null || featureFlagContext === void 0 ? void 0 : featureFlagContext.visualizations_useWebWorkersForDSL)),
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
1061
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
1062
|
+
useAsyncEvaluatedOptions = _React$useState10[0],
|
|
1063
|
+
setUseAsyncEvaluatedOptions = _React$useState10[1];
|
|
1064
|
+
|
|
924
1065
|
var isMounted = React.useRef(true);
|
|
925
1066
|
evaluatedOptions = (0, useDeepMemo_1.useDeepMemo)(function () {
|
|
926
1067
|
try {
|
|
@@ -945,11 +1086,13 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
945
1086
|
});
|
|
946
1087
|
} else {
|
|
947
1088
|
var dataFrames = dataFramesInState;
|
|
1089
|
+
|
|
948
1090
|
if (dataSources !== dataSourcesInState) {
|
|
949
1091
|
setDataSourcesInState(dataSources);
|
|
950
1092
|
dataFrames = Options_1.Options.dataFrameFromDataSource(dataSources);
|
|
951
1093
|
setDataFramesInState(dataFrames);
|
|
952
1094
|
}
|
|
1095
|
+
|
|
953
1096
|
return Options_1.Options.evaluate({
|
|
954
1097
|
context: (0, lodash_1.defaultsDeep)({}, context, vizConfig.defaultContext),
|
|
955
1098
|
options: (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, defaultOptions)
|
|
@@ -960,21 +1103,24 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
960
1103
|
console.error("unexpected error evaluating options: ".concat(e.message));
|
|
961
1104
|
return {};
|
|
962
1105
|
}
|
|
1106
|
+
|
|
963
1107
|
return {};
|
|
964
1108
|
}, [currentThemeFamily, currentThemeColorScheme, currentThemeDensity, options, context, dataSources, serializedTimezone, useAsyncEvaluatedOptions]);
|
|
965
|
-
var evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync;
|
|
966
|
-
// trellis specific backgroundColor update for onComputedProps
|
|
1109
|
+
var evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync; // trellis specific backgroundColor update for onComputedProps
|
|
967
1110
|
// if trellis is enabled following these three criteria - 1) trellis feature flag is enabled 2) vizConfig supports array has 'trellis' 3) option 'splitByLayout' is set to 'trellis
|
|
968
1111
|
// onComputedProps api should return back trellisBackgroundColor value for backgroundColor option to support coloring of sibling panels (for eg:- title/ description on UDF side)
|
|
1112
|
+
|
|
969
1113
|
var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
|
|
970
1114
|
var clonedEvaluatedOptions = evaluatedOptionsToUse;
|
|
1115
|
+
|
|
971
1116
|
if (isTrellisFeatureFlagOn && ((_a = vizConfig === null || vizConfig === void 0 ? void 0 : vizConfig.supports) === null || _a === void 0 ? void 0 : _a.includes(VizBehavior_1.VizBehavior.TRELLIS)) && (clonedEvaluatedOptions === null || clonedEvaluatedOptions === void 0 ? void 0 : clonedEvaluatedOptions.splitByLayout) === VizBehavior_1.VizBehavior.TRELLIS) {
|
|
972
1117
|
clonedEvaluatedOptions = Object.assign(Object.assign({}, evaluatedOptionsToUse), {
|
|
973
1118
|
backgroundColor: clonedEvaluatedOptions === null || clonedEvaluatedOptions === void 0 ? void 0 : clonedEvaluatedOptions.trellisBackgroundColor
|
|
974
1119
|
});
|
|
975
|
-
}
|
|
976
|
-
// useEffect hook needs to be initialized before any early returns
|
|
1120
|
+
} // useEffect hook needs to be initialized before any early returns
|
|
977
1121
|
// this is in accordance with the order of hook calls being the same on each render https://reactjs.org/docs/hooks-rules.html#explanation
|
|
1122
|
+
|
|
1123
|
+
|
|
978
1124
|
React.useEffect(function () {
|
|
979
1125
|
onComputedProps(clonedEvaluatedOptions);
|
|
980
1126
|
});
|
|
@@ -984,44 +1130,49 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
984
1130
|
isMounted.current = false;
|
|
985
1131
|
async_dynamic_options_evaluator_1.default.reset(visualizationID);
|
|
986
1132
|
}
|
|
987
|
-
};
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
// present warning message if any required props are missing
|
|
1133
|
+
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1134
|
+
}, []); // present warning message if any required props are missing
|
|
1135
|
+
|
|
991
1136
|
var _vizConfig$requiredPr = vizConfig.requiredProps,
|
|
992
|
-
|
|
993
|
-
|
|
1137
|
+
requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
|
|
1138
|
+
supports = vizConfig.supports;
|
|
994
1139
|
var missing = (0, MissingPropsMessage_1.missingKeys)(requiredProps, evaluatedOptionsToUse);
|
|
1140
|
+
|
|
995
1141
|
if (missing.length > 0 && supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && vizConfig.key !== 'splunk.singlevalue' // For SV missing props msg is not displayed if required props majorValue is missing, instead this will be handled from the component, instead handled within component
|
|
996
1142
|
) {
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1143
|
+
return React.createElement(MissingPropsMessage_1.default, {
|
|
1144
|
+
"data-test": "missing-props-message",
|
|
1145
|
+
width: width,
|
|
1146
|
+
height: height,
|
|
1147
|
+
missingProps: missing,
|
|
1148
|
+
backgroundColor: bgColorFromTheme
|
|
1149
|
+
});
|
|
1150
|
+
} // events
|
|
1151
|
+
|
|
1152
|
+
|
|
1006
1153
|
var eventCallbackProps = {};
|
|
1154
|
+
|
|
1007
1155
|
if (hasEventHandlers && mode === 'view' && vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.EVENTS) > -1) {
|
|
1008
1156
|
var supportedEvents = vizConfig.events;
|
|
1009
1157
|
Object.keys(supportedEvents).forEach(function (eventName) {
|
|
1010
1158
|
var eventCallbackPropName = (0, lodash_1.camelCase)("on.".concat(eventName));
|
|
1011
|
-
eventCallbackProps[eventCallbackPropName] = null;
|
|
1012
|
-
// todo: refactor single value and single value icon to send payload from viz
|
|
1159
|
+
eventCallbackProps[eventCallbackPropName] = null; // todo: refactor single value and single value icon to send payload from viz
|
|
1013
1160
|
// then remove these lines
|
|
1161
|
+
|
|
1014
1162
|
var payloadKeys = supportedEvents[eventName].payloadKeys;
|
|
1015
1163
|
var payload = {};
|
|
1164
|
+
|
|
1016
1165
|
if (Array.isArray(payloadKeys) && payloadKeys.length) {
|
|
1017
1166
|
payloadKeys.forEach(function (p) {
|
|
1018
1167
|
payload[p] = evaluatedOptionsToUse[p];
|
|
1019
1168
|
});
|
|
1020
1169
|
}
|
|
1170
|
+
|
|
1021
1171
|
eventCallbackProps[eventCallbackPropName] = function (ev) {
|
|
1022
1172
|
if (ev && ev.payload) {
|
|
1023
1173
|
payload = ev.payload;
|
|
1024
1174
|
}
|
|
1175
|
+
|
|
1025
1176
|
return onEventTrigger({
|
|
1026
1177
|
originalEvent: ev,
|
|
1027
1178
|
payload: payload,
|
|
@@ -1029,8 +1180,9 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1029
1180
|
});
|
|
1030
1181
|
};
|
|
1031
1182
|
});
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1183
|
+
} // compute pure viz props which are not from options
|
|
1184
|
+
|
|
1185
|
+
|
|
1034
1186
|
var computedVizProps = computeVizProps(Object.assign(Object.assign(Object.assign(Object.assign({}, props), evaluatedOptionsToUse), eventCallbackProps), {
|
|
1035
1187
|
themeFunc: themeFunc
|
|
1036
1188
|
}));
|
|
@@ -1048,15 +1200,19 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1048
1200
|
* In future, we could automatically detect which all datasources are being used
|
|
1049
1201
|
* and bind those magically to pagination/sorting behavior.
|
|
1050
1202
|
*/
|
|
1203
|
+
|
|
1051
1204
|
var dataSourceMetadata = {};
|
|
1052
1205
|
var OptionKey = 'paginateDataSourceKey';
|
|
1053
1206
|
var paginateDataSourceKey = (0, lodash_1.has)(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
|
|
1207
|
+
|
|
1054
1208
|
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && (0, lodash_1.has)(dataSources, paginateDataSourceKey)) {
|
|
1055
1209
|
var requestParams = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'requestParams'], {});
|
|
1056
1210
|
var meta = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'meta'], {});
|
|
1211
|
+
|
|
1057
1212
|
var handleRequestParamsChange = function handleRequestParamsChange(payload) {
|
|
1058
1213
|
return onRequestParamsChange(paginateDataSourceKey, payload);
|
|
1059
1214
|
};
|
|
1215
|
+
|
|
1060
1216
|
var sortParams = (0, getSorting_1.getSortingParams)({
|
|
1061
1217
|
requestParams: requestParams,
|
|
1062
1218
|
meta: meta,
|
|
@@ -1071,103 +1227,120 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1071
1227
|
sortParams: sortParams,
|
|
1072
1228
|
paginatorParams: paginatorParams
|
|
1073
1229
|
};
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1230
|
+
} // if were using webworkers and this is the first render we dont want to show a viz with missing data so we return null
|
|
1231
|
+
|
|
1232
|
+
|
|
1076
1233
|
if (useAsyncEvaluatedOptions && Object.keys(evaluatedOptionsToUse).length === 0) {
|
|
1077
1234
|
return null;
|
|
1078
1235
|
}
|
|
1236
|
+
|
|
1079
1237
|
return React.createElement(SanitizedReactViz, Object.assign({
|
|
1080
1238
|
mode: mode,
|
|
1081
1239
|
width: width,
|
|
1082
1240
|
height: height
|
|
1083
1241
|
}, evaluatedOptionsToUse, computedVizProps, eventCallbackProps, dataSourceMetadata));
|
|
1084
1242
|
};
|
|
1243
|
+
|
|
1085
1244
|
DashboardViz.propTypes = Object.assign(Object.assign({}, SplunkVisualization_1.default.propTypes), ReactViz.propTypes);
|
|
1086
1245
|
DashboardViz.defaultProps = Object.assign(Object.assign(Object.assign({}, SplunkVisualization_1.default.defaultProps), ReactViz.defaultProps), {
|
|
1087
1246
|
// using withTheme requires component to receive theme prop. In case the consumer did not provide ThemeProvider, a default empty object will prevent warnings.
|
|
1088
1247
|
theme: {}
|
|
1089
|
-
});
|
|
1090
|
-
|
|
1091
|
-
DashboardViz.config = vizConfig;
|
|
1092
|
-
|
|
1248
|
+
}); // attach viz config
|
|
1249
|
+
|
|
1250
|
+
DashboardViz.config = vizConfig; // @ts-ignore: TODO fix sc upgrade TS issues
|
|
1251
|
+
|
|
1093
1252
|
return (0, styled_components_1.withTheme)((0, withPlaceholder_1.default)((0, withEditModeCover_1.default)(DashboardViz, disableEditModeCover), useIconPlaceholder));
|
|
1094
1253
|
};
|
|
1254
|
+
|
|
1095
1255
|
exports.default = withDashboardViz;
|
|
1096
1256
|
|
|
1097
1257
|
/***/ }),
|
|
1098
|
-
/*
|
|
1258
|
+
/* 38 */
|
|
1099
1259
|
/***/ (function(module, exports) {
|
|
1100
1260
|
|
|
1101
1261
|
module.exports = require("@splunk/themes/getSettingsFromThemedProps");
|
|
1102
1262
|
|
|
1103
1263
|
/***/ }),
|
|
1104
|
-
/*
|
|
1264
|
+
/* 39 */
|
|
1105
1265
|
/***/ (function(module, exports) {
|
|
1106
1266
|
|
|
1107
1267
|
module.exports = require("@splunk/visualizations-shared/SanitizeProps");
|
|
1108
1268
|
|
|
1109
1269
|
/***/ }),
|
|
1110
|
-
/*
|
|
1270
|
+
/* 40 */
|
|
1111
1271
|
/***/ (function(module, exports) {
|
|
1112
1272
|
|
|
1113
1273
|
module.exports = require("@splunk/moment");
|
|
1114
1274
|
|
|
1115
1275
|
/***/ }),
|
|
1116
|
-
/*
|
|
1276
|
+
/* 41 */
|
|
1117
1277
|
/***/ (function(module, exports) {
|
|
1118
1278
|
|
|
1119
1279
|
module.exports = require("@splunk/async-dynamic-options-evaluator");
|
|
1120
1280
|
|
|
1121
1281
|
/***/ }),
|
|
1122
|
-
/*
|
|
1282
|
+
/* 42 */
|
|
1123
1283
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1124
1284
|
|
|
1125
1285
|
"use strict";
|
|
1126
1286
|
|
|
1127
1287
|
|
|
1128
1288
|
var _classCallCheck = __webpack_require__(9);
|
|
1289
|
+
|
|
1129
1290
|
Object.defineProperty(exports, "__esModule", {
|
|
1130
1291
|
value: true
|
|
1131
1292
|
});
|
|
1132
1293
|
exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
|
|
1133
1294
|
/* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
|
|
1295
|
+
|
|
1134
1296
|
var T = __webpack_require__(0);
|
|
1297
|
+
|
|
1135
1298
|
var lodash_1 = __webpack_require__(3);
|
|
1136
|
-
|
|
1137
|
-
// this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
1299
|
+
|
|
1300
|
+
var VizActionHandler_1 = __webpack_require__(43); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
1301
|
+
|
|
1302
|
+
|
|
1138
1303
|
exports.INITIAL_WIDTH = 250;
|
|
1139
1304
|
exports.INITIAL_HEIGHT = 250;
|
|
1140
1305
|
/**
|
|
1141
1306
|
* A Splunk visualization
|
|
1142
1307
|
*/
|
|
1308
|
+
|
|
1143
1309
|
var SplunkVisualization = function SplunkVisualization() {
|
|
1144
1310
|
_classCallCheck(this, SplunkVisualization);
|
|
1145
1311
|
};
|
|
1312
|
+
|
|
1146
1313
|
SplunkVisualization.propTypes = {
|
|
1147
1314
|
/**
|
|
1148
1315
|
* display mode
|
|
1149
1316
|
*/
|
|
1150
1317
|
mode: T.oneOf(['view', 'edit', 'export']).isRequired,
|
|
1318
|
+
|
|
1151
1319
|
/**
|
|
1152
1320
|
* width in pixel or string, defaults to 100%
|
|
1153
1321
|
*/
|
|
1154
1322
|
width: T.oneOfType([T.string, T.number]).isRequired,
|
|
1323
|
+
|
|
1155
1324
|
/**
|
|
1156
1325
|
* height in pixel or string
|
|
1157
1326
|
*/
|
|
1158
1327
|
height: T.oneOfType([T.string, T.number]).isRequired,
|
|
1328
|
+
|
|
1159
1329
|
/**
|
|
1160
1330
|
* visualization context used for dynamic option evaluation
|
|
1161
1331
|
*/
|
|
1162
1332
|
context: T.object,
|
|
1333
|
+
|
|
1163
1334
|
/**
|
|
1164
1335
|
* visualization formatting options
|
|
1165
1336
|
*/
|
|
1166
1337
|
options: T.object,
|
|
1338
|
+
|
|
1167
1339
|
/**
|
|
1168
1340
|
* A callback to update formatting options
|
|
1169
1341
|
*/
|
|
1170
1342
|
onOptionsChange: T.func,
|
|
1343
|
+
|
|
1171
1344
|
/**
|
|
1172
1345
|
* datasource state which include data and request params, object key indicate the datasource type.
|
|
1173
1346
|
*/
|
|
@@ -1176,6 +1349,7 @@ SplunkVisualization.propTypes = {
|
|
|
1176
1349
|
* current request params
|
|
1177
1350
|
*/
|
|
1178
1351
|
requestParams: T.object,
|
|
1352
|
+
|
|
1179
1353
|
/**
|
|
1180
1354
|
* current dataset
|
|
1181
1355
|
*/
|
|
@@ -1183,6 +1357,7 @@ SplunkVisualization.propTypes = {
|
|
|
1183
1357
|
fields: T.array,
|
|
1184
1358
|
columns: T.array
|
|
1185
1359
|
}),
|
|
1360
|
+
|
|
1186
1361
|
/**
|
|
1187
1362
|
* error
|
|
1188
1363
|
*/
|
|
@@ -1190,29 +1365,35 @@ SplunkVisualization.propTypes = {
|
|
|
1190
1365
|
level: T.string,
|
|
1191
1366
|
message: T.string
|
|
1192
1367
|
}),
|
|
1368
|
+
|
|
1193
1369
|
/**
|
|
1194
1370
|
* meta data that came with the dataset
|
|
1195
1371
|
*/
|
|
1196
1372
|
meta: T.object
|
|
1197
1373
|
})),
|
|
1374
|
+
|
|
1198
1375
|
/**
|
|
1199
1376
|
* A callback to trigger event
|
|
1200
1377
|
*/
|
|
1201
1378
|
onEventTrigger: T.func,
|
|
1379
|
+
|
|
1202
1380
|
/**
|
|
1203
1381
|
* Inform viz if there are handlers listening to events
|
|
1204
1382
|
*/
|
|
1205
1383
|
hasEventHandlers: T.bool,
|
|
1384
|
+
|
|
1206
1385
|
/**
|
|
1207
1386
|
* A callback to communicate computed props to a consumer
|
|
1208
1387
|
*/
|
|
1209
1388
|
onComputedProps: T.func,
|
|
1389
|
+
|
|
1210
1390
|
/**
|
|
1211
1391
|
* A callback to obtain visualization api
|
|
1212
1392
|
*/
|
|
1213
1393
|
vizActionHandlerRef: T.func,
|
|
1214
1394
|
loading: T.bool,
|
|
1215
1395
|
theme: T.object,
|
|
1396
|
+
|
|
1216
1397
|
/**
|
|
1217
1398
|
* A callback to request new data with updated request params
|
|
1218
1399
|
*/
|
|
@@ -1221,6 +1402,7 @@ SplunkVisualization.propTypes = {
|
|
|
1221
1402
|
/**
|
|
1222
1403
|
*
|
|
1223
1404
|
*/
|
|
1405
|
+
|
|
1224
1406
|
SplunkVisualization.defaultProps = {
|
|
1225
1407
|
// BaseVisualization in dashboard-visualizations uses 100% for width but 250 for height
|
|
1226
1408
|
width: '100%',
|
|
@@ -1248,26 +1430,29 @@ SplunkVisualization.defaultProps = {
|
|
|
1248
1430
|
exports.default = SplunkVisualization;
|
|
1249
1431
|
|
|
1250
1432
|
/***/ }),
|
|
1251
|
-
/*
|
|
1433
|
+
/* 43 */
|
|
1252
1434
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1253
1435
|
|
|
1254
1436
|
"use strict";
|
|
1255
1437
|
|
|
1256
1438
|
|
|
1257
1439
|
var _classCallCheck = __webpack_require__(9);
|
|
1440
|
+
|
|
1258
1441
|
var _createClass = __webpack_require__(18);
|
|
1442
|
+
|
|
1259
1443
|
Object.defineProperty(exports, "__esModule", {
|
|
1260
1444
|
value: true
|
|
1261
1445
|
});
|
|
1262
1446
|
exports.DefaultVizActionHandler = void 0;
|
|
1447
|
+
|
|
1263
1448
|
var DefaultVizActionHandler = /*#__PURE__*/function () {
|
|
1264
1449
|
function DefaultVizActionHandler() {
|
|
1265
1450
|
_classCallCheck(this, DefaultVizActionHandler);
|
|
1266
1451
|
}
|
|
1452
|
+
|
|
1267
1453
|
_createClass(DefaultVizActionHandler, [{
|
|
1268
1454
|
key: "focus",
|
|
1269
|
-
value: function focus() {
|
|
1270
|
-
// noop
|
|
1455
|
+
value: function focus() {// noop
|
|
1271
1456
|
}
|
|
1272
1457
|
}, {
|
|
1273
1458
|
key: "snapshot",
|
|
@@ -1275,22 +1460,11 @@ var DefaultVizActionHandler = /*#__PURE__*/function () {
|
|
|
1275
1460
|
return null; // noop
|
|
1276
1461
|
}
|
|
1277
1462
|
}]);
|
|
1463
|
+
|
|
1278
1464
|
return DefaultVizActionHandler;
|
|
1279
1465
|
}();
|
|
1280
|
-
exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
1281
|
-
|
|
1282
|
-
/***/ }),
|
|
1283
|
-
/* 43 */
|
|
1284
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1285
1466
|
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1290
|
-
value: true
|
|
1291
|
-
});
|
|
1292
|
-
exports.validSortDirs = void 0;
|
|
1293
|
-
exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
1467
|
+
exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
1294
1468
|
|
|
1295
1469
|
/***/ }),
|
|
1296
1470
|
/* 44 */
|
|
@@ -1303,7 +1477,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1303
1477
|
value: true
|
|
1304
1478
|
});
|
|
1305
1479
|
exports.useDeepMemo = void 0;
|
|
1480
|
+
|
|
1306
1481
|
var react_1 = __webpack_require__(1);
|
|
1482
|
+
|
|
1307
1483
|
var lodash_1 = __webpack_require__(3);
|
|
1308
1484
|
/**
|
|
1309
1485
|
* This hook evaluates and stores the result of a passed function and only
|
|
@@ -1318,16 +1494,21 @@ var lodash_1 = __webpack_require__(3);
|
|
|
1318
1494
|
* @param fn the function to be executed and
|
|
1319
1495
|
* @param dependencies an array of dependencies
|
|
1320
1496
|
*/
|
|
1497
|
+
|
|
1498
|
+
|
|
1321
1499
|
var useDeepMemo = function useDeepMemo(fn, dependencies) {
|
|
1322
1500
|
var ref = (0, react_1.useRef)();
|
|
1501
|
+
|
|
1323
1502
|
if (!ref.current || !(0, lodash_1.isEqual)(dependencies, ref.current.dependencies)) {
|
|
1324
1503
|
ref.current = {
|
|
1325
1504
|
dependencies: dependencies,
|
|
1326
1505
|
value: fn()
|
|
1327
1506
|
};
|
|
1328
1507
|
}
|
|
1508
|
+
|
|
1329
1509
|
return ref.current.value;
|
|
1330
1510
|
};
|
|
1511
|
+
|
|
1331
1512
|
exports.useDeepMemo = useDeepMemo;
|
|
1332
1513
|
|
|
1333
1514
|
/***/ }),
|
|
@@ -1341,19 +1522,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1341
1522
|
value: true
|
|
1342
1523
|
});
|
|
1343
1524
|
exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
|
|
1525
|
+
|
|
1344
1526
|
var React = __webpack_require__(1);
|
|
1527
|
+
|
|
1345
1528
|
var T = __webpack_require__(0);
|
|
1529
|
+
|
|
1346
1530
|
var i18n_1 = __webpack_require__(2);
|
|
1531
|
+
|
|
1347
1532
|
var Message_1 = __webpack_require__(10);
|
|
1533
|
+
|
|
1348
1534
|
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
1349
1535
|
/**
|
|
1350
1536
|
* @method isMissing
|
|
1351
1537
|
* @param {any} v
|
|
1352
1538
|
* @returns {boolean} true if the input value === null or undefined
|
|
1353
1539
|
*/
|
|
1540
|
+
|
|
1541
|
+
|
|
1354
1542
|
var isMissing = function isMissing(v) {
|
|
1355
1543
|
return v === null || v === undefined;
|
|
1356
1544
|
};
|
|
1545
|
+
|
|
1357
1546
|
exports.isMissing = isMissing;
|
|
1358
1547
|
/**
|
|
1359
1548
|
* @method misskingKeys
|
|
@@ -1361,11 +1550,13 @@ exports.isMissing = isMissing;
|
|
|
1361
1550
|
* @param {object} target
|
|
1362
1551
|
* @returns {string[]} the keys of missing required props
|
|
1363
1552
|
*/
|
|
1553
|
+
|
|
1364
1554
|
var missingKeys = function missingKeys(keys, target) {
|
|
1365
1555
|
return keys.filter(function (k) {
|
|
1366
1556
|
return (0, exports.isMissing)(target[k]);
|
|
1367
1557
|
});
|
|
1368
1558
|
};
|
|
1559
|
+
|
|
1369
1560
|
exports.missingKeys = missingKeys;
|
|
1370
1561
|
var propTypes = {
|
|
1371
1562
|
width: T.oneOfType([T.string, T.number]),
|
|
@@ -1379,10 +1570,11 @@ var propTypes = {
|
|
|
1379
1570
|
* @param {MissingPropsProps} props
|
|
1380
1571
|
* @returns {React.ReactElement}
|
|
1381
1572
|
*/
|
|
1573
|
+
|
|
1382
1574
|
var MissingPropsMessage = function MissingPropsMessage(props) {
|
|
1383
1575
|
var width = props.width,
|
|
1384
|
-
|
|
1385
|
-
|
|
1576
|
+
height = props.height,
|
|
1577
|
+
missingProps = props.missingProps;
|
|
1386
1578
|
return React.createElement(Message_1.default, {
|
|
1387
1579
|
"data-test": "message",
|
|
1388
1580
|
width: width,
|
|
@@ -1390,6 +1582,7 @@ var MissingPropsMessage = function MissingPropsMessage(props) {
|
|
|
1390
1582
|
message: (0, i18n_1._)("Missing property: ".concat(missingProps.join(', ')))
|
|
1391
1583
|
});
|
|
1392
1584
|
};
|
|
1585
|
+
|
|
1393
1586
|
exports.MissingPropsMessage = MissingPropsMessage;
|
|
1394
1587
|
exports.MissingPropsMessage.propTypes = propTypes;
|
|
1395
1588
|
exports.MissingPropsMessage.defaultProps = {
|
|
@@ -1408,15 +1601,19 @@ exports.default = (0, FixedSizeContainer_1.default)(exports.MissingPropsMessage)
|
|
|
1408
1601
|
Object.defineProperty(exports, "__esModule", {
|
|
1409
1602
|
value: true
|
|
1410
1603
|
});
|
|
1604
|
+
|
|
1411
1605
|
var React = __webpack_require__(1);
|
|
1606
|
+
|
|
1412
1607
|
var styled_components_1 = __webpack_require__(4);
|
|
1608
|
+
|
|
1413
1609
|
var hocUtils_1 = __webpack_require__(15);
|
|
1610
|
+
|
|
1414
1611
|
var Cover = styled_components_1.default.div.withConfig({
|
|
1415
1612
|
displayName: "withEditModeCover__Cover",
|
|
1416
1613
|
componentId: "sc-1gsbnxb-0"
|
|
1417
1614
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
1418
1615
|
var Blocker = styled_components_1.default.div.attrs({
|
|
1419
|
-
'data-splunk-visualization-version': "26.
|
|
1616
|
+
'data-splunk-visualization-version': "26.1.0 - fc8bf8d77"
|
|
1420
1617
|
}).withConfig({
|
|
1421
1618
|
displayName: "withEditModeCover__Blocker",
|
|
1422
1619
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -1427,6 +1624,7 @@ var Blocker = styled_components_1.default.div.attrs({
|
|
|
1427
1624
|
* @param {ExtendedDashViz} Visualization
|
|
1428
1625
|
* @returns {ExtendedDashViz} Wrapper
|
|
1429
1626
|
*/
|
|
1627
|
+
|
|
1430
1628
|
var withEditModeCover = function withEditModeCover(Visualization, disableEditModeCover) {
|
|
1431
1629
|
var Wrapper = function Wrapper(props) {
|
|
1432
1630
|
var mode = props.mode;
|
|
@@ -1435,12 +1633,14 @@ var withEditModeCover = function withEditModeCover(Visualization, disableEditMod
|
|
|
1435
1633
|
"data-test": "edit-mode-cover"
|
|
1436
1634
|
}));
|
|
1437
1635
|
};
|
|
1636
|
+
|
|
1438
1637
|
(0, hocUtils_1.extendStaticWrapperProps)({
|
|
1439
1638
|
Wrapper: Wrapper,
|
|
1440
1639
|
Visualization: Visualization
|
|
1441
1640
|
});
|
|
1442
1641
|
return Wrapper;
|
|
1443
1642
|
};
|
|
1643
|
+
|
|
1444
1644
|
exports.default = withEditModeCover;
|
|
1445
1645
|
|
|
1446
1646
|
/***/ }),
|
|
@@ -1453,27 +1653,37 @@ exports.default = withEditModeCover;
|
|
|
1453
1653
|
Object.defineProperty(exports, "__esModule", {
|
|
1454
1654
|
value: true
|
|
1455
1655
|
});
|
|
1656
|
+
|
|
1456
1657
|
var React = __webpack_require__(1);
|
|
1658
|
+
|
|
1457
1659
|
var colorUtils_1 = __webpack_require__(12);
|
|
1660
|
+
|
|
1458
1661
|
var variables_1 = __webpack_require__(11);
|
|
1662
|
+
|
|
1459
1663
|
var IconPlaceholder_1 = __webpack_require__(32);
|
|
1664
|
+
|
|
1460
1665
|
var VizBehavior_1 = __webpack_require__(6);
|
|
1666
|
+
|
|
1461
1667
|
var hocUtils_1 = __webpack_require__(15);
|
|
1668
|
+
|
|
1462
1669
|
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
1463
1670
|
var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
|
|
1464
1671
|
var config = Visualization.config;
|
|
1465
1672
|
var themes = config.themes;
|
|
1673
|
+
|
|
1466
1674
|
var Wrapper = function Wrapper(props) {
|
|
1467
1675
|
var _a, _b;
|
|
1676
|
+
|
|
1468
1677
|
var dataSources = props.dataSources,
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1678
|
+
loading = props.loading,
|
|
1679
|
+
options = props.options,
|
|
1680
|
+
height = props.height,
|
|
1681
|
+
width = props.width;
|
|
1473
1682
|
var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
|
|
1474
1683
|
var bgColorFromTheme = (0, colorUtils_1.isColor)(options === null || options === void 0 ? void 0 : options.backgroundColor) ? options === null || options === void 0 ? void 0 : options.backgroundColor : (_a = themes === null || themes === void 0 ? void 0 : themes.defaultBackgroundColor) === null || _a === void 0 ? void 0 : _a.call(themes, props);
|
|
1475
1684
|
var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
|
|
1476
1685
|
var iconColor = variables_1.default.contentColorActive(props);
|
|
1686
|
+
|
|
1477
1687
|
if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
|
|
1478
1688
|
return React.createElement(IconPlaceholder_1.default, {
|
|
1479
1689
|
"data-test": "icon-placeholder",
|
|
@@ -1484,14 +1694,17 @@ var withPlaceholder = function withPlaceholder(Visualization) {
|
|
|
1484
1694
|
iconColor: iconColor
|
|
1485
1695
|
});
|
|
1486
1696
|
}
|
|
1697
|
+
|
|
1487
1698
|
return React.createElement(Visualization, Object.assign({}, props));
|
|
1488
1699
|
};
|
|
1700
|
+
|
|
1489
1701
|
(0, hocUtils_1.extendStaticWrapperProps)({
|
|
1490
1702
|
Wrapper: Wrapper,
|
|
1491
1703
|
Visualization: Visualization
|
|
1492
1704
|
});
|
|
1493
1705
|
return Wrapper;
|
|
1494
1706
|
};
|
|
1707
|
+
|
|
1495
1708
|
exports.default = withPlaceholder;
|
|
1496
1709
|
|
|
1497
1710
|
/***/ }),
|
|
@@ -1581,11 +1794,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1581
1794
|
value: true
|
|
1582
1795
|
});
|
|
1583
1796
|
exports.getDynamicFillColorEditor = void 0;
|
|
1797
|
+
|
|
1584
1798
|
var i18n_1 = __webpack_require__(2);
|
|
1799
|
+
|
|
1585
1800
|
var configUtils_1 = __webpack_require__(22);
|
|
1801
|
+
|
|
1586
1802
|
var getDynamicFillColorEditor = function getDynamicFillColorEditor(_ref) {
|
|
1587
1803
|
var defaultContext = _ref.defaultContext,
|
|
1588
|
-
|
|
1804
|
+
defaultPalettesConfig = _ref.defaultPalettesConfig;
|
|
1589
1805
|
return {
|
|
1590
1806
|
label: (0, i18n_1._)('Fill'),
|
|
1591
1807
|
option: 'fillColor',
|
|
@@ -1619,6 +1835,7 @@ var getDynamicFillColorEditor = function getDynamicFillColorEditor(_ref) {
|
|
|
1619
1835
|
}
|
|
1620
1836
|
};
|
|
1621
1837
|
};
|
|
1838
|
+
|
|
1622
1839
|
exports.getDynamicFillColorEditor = getDynamicFillColorEditor;
|
|
1623
1840
|
|
|
1624
1841
|
/***/ }),
|
|
@@ -1632,11 +1849,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1632
1849
|
value: true
|
|
1633
1850
|
});
|
|
1634
1851
|
exports.getDynamicStrokeColorEditor = void 0;
|
|
1852
|
+
|
|
1635
1853
|
var i18n_1 = __webpack_require__(2);
|
|
1854
|
+
|
|
1636
1855
|
var configUtils_1 = __webpack_require__(22);
|
|
1856
|
+
|
|
1637
1857
|
var getDynamicStrokeColorEditor = function getDynamicStrokeColorEditor(_ref) {
|
|
1638
1858
|
var defaultContext = _ref.defaultContext,
|
|
1639
|
-
|
|
1859
|
+
defaultPalettesConfig = _ref.defaultPalettesConfig;
|
|
1640
1860
|
return {
|
|
1641
1861
|
label: (0, i18n_1._)('Stroke'),
|
|
1642
1862
|
option: 'strokeColor',
|
|
@@ -1670,6 +1890,7 @@ var getDynamicStrokeColorEditor = function getDynamicStrokeColorEditor(_ref) {
|
|
|
1670
1890
|
}
|
|
1671
1891
|
};
|
|
1672
1892
|
};
|
|
1893
|
+
|
|
1673
1894
|
exports.getDynamicStrokeColorEditor = getDynamicStrokeColorEditor;
|
|
1674
1895
|
|
|
1675
1896
|
/***/ }),
|
|
@@ -1682,8 +1903,11 @@ exports.getDynamicStrokeColorEditor = getDynamicStrokeColorEditor;
|
|
|
1682
1903
|
Object.defineProperty(exports, "__esModule", {
|
|
1683
1904
|
value: true
|
|
1684
1905
|
});
|
|
1906
|
+
|
|
1685
1907
|
var i18n_1 = __webpack_require__(2);
|
|
1908
|
+
|
|
1686
1909
|
var configUtils_1 = __webpack_require__(22);
|
|
1910
|
+
|
|
1687
1911
|
var StaticFillColorEditor = {
|
|
1688
1912
|
label: (0, i18n_1._)('Fill'),
|
|
1689
1913
|
option: 'fillColor',
|
|
@@ -1705,8 +1929,11 @@ exports.default = StaticFillColorEditor;
|
|
|
1705
1929
|
Object.defineProperty(exports, "__esModule", {
|
|
1706
1930
|
value: true
|
|
1707
1931
|
});
|
|
1932
|
+
|
|
1708
1933
|
var i18n_1 = __webpack_require__(2);
|
|
1934
|
+
|
|
1709
1935
|
var configUtils_1 = __webpack_require__(22);
|
|
1936
|
+
|
|
1710
1937
|
var StaticStrokeColorEditor = {
|
|
1711
1938
|
label: (0, i18n_1._)('Stroke'),
|
|
1712
1939
|
option: 'strokeColor',
|
|
@@ -1726,17 +1953,25 @@ exports.default = StaticStrokeColorEditor;
|
|
|
1726
1953
|
|
|
1727
1954
|
|
|
1728
1955
|
var _taggedTemplateLiteral = __webpack_require__(59);
|
|
1956
|
+
|
|
1729
1957
|
var _templateObject;
|
|
1958
|
+
|
|
1730
1959
|
Object.defineProperty(exports, "__esModule", {
|
|
1731
1960
|
value: true
|
|
1732
1961
|
});
|
|
1733
1962
|
exports.getStyledShape = exports.mapToOldKey = void 0;
|
|
1963
|
+
|
|
1734
1964
|
var lodash_1 = __webpack_require__(3);
|
|
1965
|
+
|
|
1735
1966
|
var styled_components_1 = __webpack_require__(4);
|
|
1967
|
+
|
|
1736
1968
|
var pick_1 = __webpack_require__(23);
|
|
1969
|
+
|
|
1737
1970
|
var variables_1 = __webpack_require__(11);
|
|
1738
|
-
|
|
1739
|
-
// map for new options names to old option names
|
|
1971
|
+
|
|
1972
|
+
var propUtils_1 = __webpack_require__(29); // map for new options names to old option names
|
|
1973
|
+
|
|
1974
|
+
|
|
1740
1975
|
var shapeOptionsMapping = {
|
|
1741
1976
|
fillColor: 'fill',
|
|
1742
1977
|
strokeColor: 'stroke',
|
|
@@ -1749,17 +1984,20 @@ var shapeOptionsMapping = {
|
|
|
1749
1984
|
* @param {Object} options
|
|
1750
1985
|
* @returns {Object}
|
|
1751
1986
|
*/
|
|
1987
|
+
|
|
1752
1988
|
var mapToOldKey = function mapToOldKey(options) {
|
|
1753
1989
|
return (0, lodash_1.mapKeys)(options, function (val, key) {
|
|
1754
1990
|
return shapeOptionsMapping[key] ? shapeOptionsMapping[key] : key;
|
|
1755
1991
|
});
|
|
1756
1992
|
};
|
|
1993
|
+
|
|
1757
1994
|
exports.mapToOldKey = mapToOldKey;
|
|
1758
1995
|
/**
|
|
1759
1996
|
* Helper method to get styled component for ellipse or rectangle
|
|
1760
1997
|
* @method mapToOldKey
|
|
1761
1998
|
* @param {Shape} shape
|
|
1762
1999
|
*/
|
|
2000
|
+
|
|
1763
2001
|
var getStyledShape = function getStyledShape(shape) {
|
|
1764
2002
|
return (0, styled_components_1.default)(shape)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fill: ", ";\n stroke: ", ";\n cursor: ", ";\n"])), function (props) {
|
|
1765
2003
|
return props.fill && (0, propUtils_1.formatColor)(props.fill) || (0, pick_1.default)({
|
|
@@ -1781,6 +2019,7 @@ var getStyledShape = function getStyledShape(shape) {
|
|
|
1781
2019
|
return props.onClick ? 'pointer' : 'inherit';
|
|
1782
2020
|
});
|
|
1783
2021
|
};
|
|
2022
|
+
|
|
1784
2023
|
exports.getStyledShape = getStyledShape;
|
|
1785
2024
|
|
|
1786
2025
|
/***/ }),
|
|
@@ -1822,26 +2061,38 @@ exports.getStyledShape = getStyledShape;
|
|
|
1822
2061
|
|
|
1823
2062
|
var __rest = this && this.__rest || function (s, e) {
|
|
1824
2063
|
var t = {};
|
|
2064
|
+
|
|
1825
2065
|
for (var p in s) {
|
|
1826
2066
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
1827
2067
|
}
|
|
2068
|
+
|
|
1828
2069
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1829
2070
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
1830
2071
|
}
|
|
1831
2072
|
return t;
|
|
1832
2073
|
};
|
|
2074
|
+
|
|
1833
2075
|
Object.defineProperty(exports, "__esModule", {
|
|
1834
2076
|
value: true
|
|
1835
2077
|
});
|
|
1836
2078
|
exports.config = exports.themes = void 0;
|
|
2079
|
+
|
|
1837
2080
|
var React = __webpack_require__(1);
|
|
2081
|
+
|
|
1838
2082
|
var lodash_1 = __webpack_require__(3);
|
|
2083
|
+
|
|
1839
2084
|
var styled_components_1 = __webpack_require__(4);
|
|
2085
|
+
|
|
1840
2086
|
var T = __webpack_require__(0);
|
|
2087
|
+
|
|
1841
2088
|
var config_1 = __webpack_require__(201);
|
|
2089
|
+
|
|
1842
2090
|
exports.config = config_1.default;
|
|
1843
|
-
|
|
2091
|
+
|
|
2092
|
+
var withDashboardViz_1 = __webpack_require__(37);
|
|
2093
|
+
|
|
1844
2094
|
var shapeUtils_1 = __webpack_require__(118);
|
|
2095
|
+
|
|
1845
2096
|
var validOptions = Object.keys(config_1.default.optionsSchema);
|
|
1846
2097
|
var SVGContainer = styled_components_1.default.svg.withConfig({
|
|
1847
2098
|
displayName: "Ellipse__SVGContainer",
|
|
@@ -1852,11 +2103,12 @@ var SVGContainer = styled_components_1.default.svg.withConfig({
|
|
|
1852
2103
|
return props.height;
|
|
1853
2104
|
});
|
|
1854
2105
|
var EllipseShape = (0, shapeUtils_1.getStyledShape)('ellipse');
|
|
2106
|
+
|
|
1855
2107
|
var EllipseVisualization = function EllipseVisualization(_ref) {
|
|
1856
2108
|
var height = _ref.height,
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
2109
|
+
width = _ref.width,
|
|
2110
|
+
onEllipseClick = _ref.onEllipseClick,
|
|
2111
|
+
options = _ref.options;
|
|
1860
2112
|
return React.createElement(SVGContainer, {
|
|
1861
2113
|
width: width,
|
|
1862
2114
|
height: height
|
|
@@ -1870,10 +2122,12 @@ var EllipseVisualization = function EllipseVisualization(_ref) {
|
|
|
1870
2122
|
onClick: onEllipseClick
|
|
1871
2123
|
})));
|
|
1872
2124
|
};
|
|
2125
|
+
|
|
1873
2126
|
var computeVizProps = function computeVizProps(_a) {
|
|
1874
2127
|
var width = _a.width,
|
|
1875
|
-
|
|
1876
|
-
|
|
2128
|
+
height = _a.height,
|
|
2129
|
+
options = __rest(_a, ["width", "height"]);
|
|
2130
|
+
|
|
1877
2131
|
var computedProps = {
|
|
1878
2132
|
width: width,
|
|
1879
2133
|
height: height
|
|
@@ -1881,6 +2135,7 @@ var computeVizProps = function computeVizProps(_a) {
|
|
|
1881
2135
|
computedProps.options = (0, lodash_1.chain)(options).pick(validOptions).thru(shapeUtils_1.mapToOldKey).value();
|
|
1882
2136
|
return computedProps;
|
|
1883
2137
|
};
|
|
2138
|
+
|
|
1884
2139
|
var propTypes = {
|
|
1885
2140
|
width: T.oneOfType([T.string, T.number]),
|
|
1886
2141
|
height: T.oneOfType([T.string, T.number]),
|
|
@@ -1964,6 +2219,7 @@ exports.default = Ellipse;
|
|
|
1964
2219
|
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
1965
2220
|
if (k2 === undefined) k2 = k;
|
|
1966
2221
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2222
|
+
|
|
1967
2223
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
1968
2224
|
desc = {
|
|
1969
2225
|
enumerable: true,
|
|
@@ -1972,22 +2228,28 @@ var __createBinding = this && this.__createBinding || (Object.create ? function
|
|
|
1972
2228
|
}
|
|
1973
2229
|
};
|
|
1974
2230
|
}
|
|
2231
|
+
|
|
1975
2232
|
Object.defineProperty(o, k2, desc);
|
|
1976
2233
|
} : function (o, m, k, k2) {
|
|
1977
2234
|
if (k2 === undefined) k2 = k;
|
|
1978
2235
|
o[k2] = m[k];
|
|
1979
2236
|
});
|
|
2237
|
+
|
|
1980
2238
|
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
1981
2239
|
for (var p in m) {
|
|
1982
2240
|
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
1983
2241
|
}
|
|
1984
2242
|
};
|
|
2243
|
+
|
|
1985
2244
|
Object.defineProperty(exports, "__esModule", {
|
|
1986
2245
|
value: true
|
|
1987
2246
|
});
|
|
1988
2247
|
exports.default = void 0;
|
|
2248
|
+
|
|
1989
2249
|
__exportStar(__webpack_require__(149), exports);
|
|
2250
|
+
|
|
1990
2251
|
var Ellipse_1 = __webpack_require__(149);
|
|
2252
|
+
|
|
1991
2253
|
Object.defineProperty(exports, "default", {
|
|
1992
2254
|
enumerable: true,
|
|
1993
2255
|
get: function get() {
|
|
@@ -2005,17 +2267,29 @@ Object.defineProperty(exports, "default", {
|
|
|
2005
2267
|
Object.defineProperty(exports, "__esModule", {
|
|
2006
2268
|
value: true
|
|
2007
2269
|
});
|
|
2270
|
+
|
|
2008
2271
|
var i18n_1 = __webpack_require__(2);
|
|
2272
|
+
|
|
2009
2273
|
var PresetPalettes_1 = __webpack_require__(61);
|
|
2274
|
+
|
|
2010
2275
|
var pick_1 = __webpack_require__(23);
|
|
2276
|
+
|
|
2011
2277
|
var variables_1 = __webpack_require__(11);
|
|
2278
|
+
|
|
2012
2279
|
var VizBehavior_1 = __webpack_require__(6);
|
|
2013
|
-
|
|
2280
|
+
|
|
2281
|
+
var VizCategory_1 = __webpack_require__(36);
|
|
2282
|
+
|
|
2014
2283
|
var configUtils_1 = __webpack_require__(20);
|
|
2284
|
+
|
|
2015
2285
|
var DynamicFillColorEditor_1 = __webpack_require__(114);
|
|
2286
|
+
|
|
2016
2287
|
var DynamicStrokeColorEditor_1 = __webpack_require__(115);
|
|
2288
|
+
|
|
2017
2289
|
var StaticFillColorEditor_1 = __webpack_require__(116);
|
|
2290
|
+
|
|
2018
2291
|
var StaticStrokeColorEditor_1 = __webpack_require__(117);
|
|
2292
|
+
|
|
2019
2293
|
var dataContract = {
|
|
2020
2294
|
requiredDataSources: [],
|
|
2021
2295
|
optionalDataSources: [{
|
|
@@ -2215,7 +2489,7 @@ var editorConfig = [{
|
|
|
2215
2489
|
presets: presets,
|
|
2216
2490
|
value: function value(_ref) {
|
|
2217
2491
|
var context = _ref.context,
|
|
2218
|
-
|
|
2492
|
+
options = _ref.options;
|
|
2219
2493
|
var initialPreset = (0, configUtils_1.getInitialPreset)(context, options, presets);
|
|
2220
2494
|
return initialPreset && initialPreset.label || null;
|
|
2221
2495
|
}
|
|
@@ -2267,16 +2541,19 @@ var editorConfig = [{
|
|
|
2267
2541
|
/**
|
|
2268
2542
|
* visualization configuration
|
|
2269
2543
|
*/
|
|
2544
|
+
|
|
2270
2545
|
var config = {
|
|
2271
2546
|
/**
|
|
2272
2547
|
* unique viz key
|
|
2273
2548
|
*/
|
|
2274
2549
|
key: 'splunk.ellipse',
|
|
2550
|
+
|
|
2275
2551
|
/**
|
|
2276
2552
|
* viz name
|
|
2277
2553
|
*/
|
|
2278
2554
|
name: (0, i18n_1._)('Ellipse'),
|
|
2279
2555
|
category: VizCategory_1.VizCategory.SHAPES,
|
|
2556
|
+
|
|
2280
2557
|
/**
|
|
2281
2558
|
* viz icon
|
|
2282
2559
|
*/
|