@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/Column.js
CHANGED
|
@@ -87,7 +87,7 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 197);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ([
|
|
@@ -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,40 +205,46 @@ 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 {
|
|
214
222
|
style: {
|
|
215
|
-
width: style_1.toPx(width)
|
|
223
|
+
width: (0, style_1.toPx)(width)
|
|
216
224
|
}
|
|
217
225
|
};
|
|
218
226
|
}).withConfig({
|
|
219
227
|
displayName: "FixedSizeContainer__Item",
|
|
220
228
|
componentId: "sc-1yhgpod-0"
|
|
221
229
|
})(["position:relative;background-color:", "};"], function (props) {
|
|
222
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
223
|
-
});
|
|
224
|
-
|
|
230
|
+
return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
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
|
-
width: style_1.toPx(width)
|
|
238
|
+
width: (0, style_1.toPx)(width)
|
|
231
239
|
}), height && {
|
|
232
|
-
height: style_1.toPx(height)
|
|
240
|
+
height: (0, style_1.toPx)(height)
|
|
233
241
|
})
|
|
234
242
|
};
|
|
235
243
|
}).withConfig({
|
|
236
244
|
displayName: "FixedSizeContainer__FixSizeItem",
|
|
237
245
|
componentId: "sc-1yhgpod-1"
|
|
238
246
|
})(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
|
|
239
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
247
|
+
return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
240
248
|
});
|
|
241
249
|
var ItemContent = styled_components_1.default.div.withConfig({
|
|
242
250
|
displayName: "FixedSizeContainer__ItemContent",
|
|
@@ -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": "
|
|
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
|
-
var presetContext = lodash_1.get(preset, ['value', 'context'], {});
|
|
503
|
-
var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
|
|
544
|
+
var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
|
|
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,14 +559,16 @@ 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
|
-
return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
|
|
564
|
+
return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
|
|
521
565
|
return {
|
|
522
566
|
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
523
567
|
value: i
|
|
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
|
/***/ }),
|
|
@@ -559,35 +607,41 @@ module.exports = require("@splunk/themes/pick");
|
|
|
559
607
|
/* 25 */
|
|
560
608
|
/***/ (function(module, exports) {
|
|
561
609
|
|
|
562
|
-
module.exports = require("@splunk/
|
|
610
|
+
module.exports = require("@splunk/ui-utils/id");
|
|
563
611
|
|
|
564
612
|
/***/ }),
|
|
565
613
|
/* 26 */
|
|
566
614
|
/***/ (function(module, exports) {
|
|
567
615
|
|
|
568
|
-
module.exports = require("@splunk/
|
|
616
|
+
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
569
617
|
|
|
570
618
|
/***/ }),
|
|
571
619
|
/* 27 */
|
|
572
620
|
/***/ (function(module, exports) {
|
|
573
621
|
|
|
574
|
-
module.exports = require("@splunk/visualizations-shared/
|
|
622
|
+
module.exports = require("@splunk/visualizations-shared/hocUtils");
|
|
575
623
|
|
|
576
624
|
/***/ }),
|
|
577
625
|
/* 28 */
|
|
578
626
|
/***/ (function(module, exports) {
|
|
579
627
|
|
|
580
|
-
module.exports = require("@splunk/visualizations-shared/
|
|
628
|
+
module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
|
|
581
629
|
|
|
582
630
|
/***/ }),
|
|
583
631
|
/* 29 */
|
|
584
632
|
/***/ (function(module, exports) {
|
|
585
633
|
|
|
634
|
+
module.exports = require("@splunk/visualizations-shared/propUtils");
|
|
635
|
+
|
|
636
|
+
/***/ }),
|
|
637
|
+
/* 30 */
|
|
638
|
+
/***/ (function(module, exports) {
|
|
639
|
+
|
|
586
640
|
module.exports = require("@splunk/visualization-encoding/Options");
|
|
587
641
|
|
|
588
642
|
/***/ }),
|
|
589
|
-
/*
|
|
590
|
-
/*
|
|
643
|
+
/* 31 */,
|
|
644
|
+
/* 32 */
|
|
591
645
|
/***/ (function(module, exports, __webpack_require__) {
|
|
592
646
|
|
|
593
647
|
"use strict";
|
|
@@ -597,11 +651,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
597
651
|
value: true
|
|
598
652
|
});
|
|
599
653
|
exports.shouldShowIconPlaceholder = void 0;
|
|
654
|
+
|
|
600
655
|
var React = __webpack_require__(1);
|
|
656
|
+
|
|
601
657
|
var T = __webpack_require__(0);
|
|
658
|
+
|
|
602
659
|
var lodash_1 = __webpack_require__(3);
|
|
660
|
+
|
|
603
661
|
var i18n_1 = __webpack_require__(2);
|
|
662
|
+
|
|
604
663
|
var Message_1 = __webpack_require__(10);
|
|
664
|
+
|
|
605
665
|
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
606
666
|
/**
|
|
607
667
|
* @method shouldShowIconPlaceholder
|
|
@@ -609,14 +669,17 @@ var FixedSizeContainer_1 = __webpack_require__(13);
|
|
|
609
669
|
* @param {boolean} loading
|
|
610
670
|
* @returns {boolean}
|
|
611
671
|
*/
|
|
672
|
+
|
|
673
|
+
|
|
612
674
|
var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
|
|
613
675
|
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
614
|
-
var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
|
|
676
|
+
var data = (0, lodash_1.get)(dataSources, 'primary.data.columns[0]', undefined);
|
|
615
677
|
var noData = data === undefined;
|
|
616
|
-
var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
|
|
678
|
+
var fields = (0, lodash_1.get)(dataSources, 'primary.data.fields[0]', undefined);
|
|
617
679
|
var noFields = fields === undefined;
|
|
618
680
|
return loading || noData || noFields;
|
|
619
681
|
};
|
|
682
|
+
|
|
620
683
|
exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
|
|
621
684
|
var propTypes = {
|
|
622
685
|
icon: T.func,
|
|
@@ -631,11 +694,13 @@ var propTypes = {
|
|
|
631
694
|
* @param {IconPlaceholderProps} props
|
|
632
695
|
* @returns {React.ReactElement}
|
|
633
696
|
*/
|
|
697
|
+
|
|
634
698
|
var IconPlaceholder = function IconPlaceholder(props) {
|
|
635
699
|
var width = props.width,
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
700
|
+
height = props.height,
|
|
701
|
+
icon = props.icon,
|
|
702
|
+
iconColor = props.iconColor;
|
|
703
|
+
|
|
639
704
|
if (icon) {
|
|
640
705
|
return React.createElement(icon, {
|
|
641
706
|
style: {
|
|
@@ -650,25 +715,21 @@ var IconPlaceholder = function IconPlaceholder(props) {
|
|
|
650
715
|
height: '50%'
|
|
651
716
|
});
|
|
652
717
|
}
|
|
718
|
+
|
|
653
719
|
return React.createElement(Message_1.default, {
|
|
654
720
|
width: width,
|
|
655
721
|
height: height,
|
|
656
722
|
level: "warning",
|
|
657
|
-
message: i18n_1._('No DataSource Connected')
|
|
723
|
+
message: (0, i18n_1._)('No DataSource Connected')
|
|
658
724
|
});
|
|
659
725
|
};
|
|
726
|
+
|
|
660
727
|
IconPlaceholder.propTypes = propTypes;
|
|
661
728
|
IconPlaceholder.defaultProps = {
|
|
662
729
|
width: '100%',
|
|
663
730
|
height: 250
|
|
664
731
|
};
|
|
665
|
-
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
666
|
-
|
|
667
|
-
/***/ }),
|
|
668
|
-
/* 32 */
|
|
669
|
-
/***/ (function(module, exports) {
|
|
670
|
-
|
|
671
|
-
module.exports = require("@splunk/ui-utils/id");
|
|
732
|
+
exports.default = (0, FixedSizeContainer_1.default)(IconPlaceholder);
|
|
672
733
|
|
|
673
734
|
/***/ }),
|
|
674
735
|
/* 33 */
|
|
@@ -678,21 +739,27 @@ module.exports = require("@splunk/ui-utils/id");
|
|
|
678
739
|
|
|
679
740
|
|
|
680
741
|
var _defineProperty = __webpack_require__(7);
|
|
742
|
+
|
|
681
743
|
Object.defineProperty(exports, "__esModule", {
|
|
682
744
|
value: true
|
|
683
745
|
});
|
|
684
746
|
exports.getSortingParams = exports.SortParamsPropTypes = void 0;
|
|
747
|
+
|
|
685
748
|
var T = __webpack_require__(0);
|
|
749
|
+
|
|
686
750
|
var lodash_1 = __webpack_require__(3);
|
|
687
|
-
|
|
751
|
+
|
|
752
|
+
var DataSource_1 = __webpack_require__(34);
|
|
753
|
+
|
|
688
754
|
exports.SortParamsPropTypes = T.shape({
|
|
689
755
|
currentSortKey: T.string,
|
|
690
756
|
currentSortDir: T.oneOf(DataSource_1.validSortDirs),
|
|
691
757
|
onSort: T.func
|
|
692
758
|
});
|
|
759
|
+
|
|
693
760
|
var getSortingParams = function getSortingParams(_ref) {
|
|
694
761
|
var requestParams = _ref.requestParams,
|
|
695
|
-
|
|
762
|
+
onRequestParamsChange = _ref.onRequestParamsChange;
|
|
696
763
|
var currentSortKey;
|
|
697
764
|
var currentSortDir;
|
|
698
765
|
var nextSortDirMap = {
|
|
@@ -701,17 +768,20 @@ var getSortingParams = function getSortingParams(_ref) {
|
|
|
701
768
|
none: 'asc'
|
|
702
769
|
};
|
|
703
770
|
var onSort;
|
|
771
|
+
|
|
704
772
|
if (typeof onRequestParamsChange === 'function') {
|
|
705
|
-
if (requestParams && lodash_1.has(requestParams, 'sort')) {
|
|
773
|
+
if (requestParams && (0, lodash_1.has)(requestParams, 'sort')) {
|
|
706
774
|
currentSortKey = Object.keys(requestParams.sort).shift();
|
|
707
775
|
currentSortDir = requestParams.sort[currentSortKey];
|
|
708
|
-
}
|
|
709
|
-
|
|
776
|
+
} // undid memoization since there is a dependency on requestParams, which is a deeply nested object
|
|
777
|
+
|
|
778
|
+
|
|
710
779
|
onSort = function onSort(e, _ref2) {
|
|
711
780
|
var sortKey = _ref2.sortKey,
|
|
712
|
-
|
|
781
|
+
sortDir = _ref2.sortDir;
|
|
782
|
+
|
|
713
783
|
if (typeof sortKey === 'string') {
|
|
714
|
-
var nextSortDir = lodash_1.has(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
|
|
784
|
+
var nextSortDir = (0, lodash_1.has)(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
|
|
715
785
|
onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
|
|
716
786
|
offset: 0,
|
|
717
787
|
sort: _defineProperty({}, sortKey, nextSortDir)
|
|
@@ -721,12 +791,14 @@ var getSortingParams = function getSortingParams(_ref) {
|
|
|
721
791
|
}
|
|
722
792
|
};
|
|
723
793
|
}
|
|
794
|
+
|
|
724
795
|
return {
|
|
725
796
|
currentSortKey: currentSortKey,
|
|
726
797
|
currentSortDir: currentSortDir,
|
|
727
798
|
onSort: onSort
|
|
728
799
|
};
|
|
729
800
|
};
|
|
801
|
+
|
|
730
802
|
exports.getSortingParams = getSortingParams;
|
|
731
803
|
|
|
732
804
|
/***/ }),
|
|
@@ -736,43 +808,68 @@ exports.getSortingParams = getSortingParams;
|
|
|
736
808
|
"use strict";
|
|
737
809
|
|
|
738
810
|
|
|
811
|
+
Object.defineProperty(exports, "__esModule", {
|
|
812
|
+
value: true
|
|
813
|
+
});
|
|
814
|
+
exports.validOutputModes = exports.validSegmentationModes = exports.validSortDirs = void 0;
|
|
815
|
+
exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
816
|
+
exports.validSegmentationModes = ['none', 'inner'];
|
|
817
|
+
exports.validOutputModes = ['json_cols', 'json'];
|
|
818
|
+
|
|
819
|
+
/***/ }),
|
|
820
|
+
/* 35 */
|
|
821
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
822
|
+
|
|
823
|
+
"use strict";
|
|
824
|
+
|
|
825
|
+
|
|
739
826
|
Object.defineProperty(exports, "__esModule", {
|
|
740
827
|
value: true
|
|
741
828
|
});
|
|
742
829
|
exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
|
|
830
|
+
|
|
743
831
|
var T = __webpack_require__(0);
|
|
832
|
+
|
|
744
833
|
var lodash_1 = __webpack_require__(3);
|
|
834
|
+
|
|
745
835
|
exports.PaginatorParamsPropTypes = T.shape({
|
|
746
836
|
isPaging: T.bool,
|
|
747
837
|
current: T.number,
|
|
748
838
|
totalPages: T.number,
|
|
749
839
|
onChange: T.func
|
|
750
840
|
});
|
|
841
|
+
|
|
751
842
|
var getPaginationParams = function getPaginationParams(_ref) {
|
|
752
843
|
var requestParams = _ref.requestParams,
|
|
753
|
-
|
|
754
|
-
|
|
844
|
+
meta = _ref.meta,
|
|
845
|
+
onRequestParamsChange = _ref.onRequestParamsChange;
|
|
755
846
|
var totalCount = meta && meta.totalCount || 0;
|
|
756
847
|
var offset = requestParams && requestParams.offset || 0;
|
|
757
848
|
var count = requestParams && requestParams.count;
|
|
758
849
|
var totalPages = typeof count === 'number' && count > 0 ? Math.ceil(totalCount / count) : 0;
|
|
759
850
|
var current = typeof count === 'number' && count > 0 ? Math.floor(offset / count) + 1 : 0;
|
|
760
851
|
var isPaging = totalPages > 1 && typeof onRequestParamsChange === 'function';
|
|
852
|
+
|
|
761
853
|
var onChangeHandler = function onChangeHandler(e, _ref2) {
|
|
762
854
|
var page = _ref2.page,
|
|
763
|
-
|
|
764
|
-
var newParams = lodash_1.cloneDeep(requestParams);
|
|
855
|
+
countArg = _ref2.count;
|
|
856
|
+
var newParams = (0, lodash_1.cloneDeep)(requestParams);
|
|
857
|
+
|
|
765
858
|
if (typeof countArg === 'number') {
|
|
766
859
|
newParams.count = countArg;
|
|
767
860
|
newParams.offset = 0;
|
|
768
861
|
}
|
|
862
|
+
|
|
769
863
|
var pageCount = typeof newParams.count === 'number' ? newParams.count : 10;
|
|
864
|
+
|
|
770
865
|
if (typeof page === 'number' && page > 0) {
|
|
771
866
|
newParams.count = pageCount;
|
|
772
867
|
newParams.offset = (page - 1) * pageCount;
|
|
773
868
|
}
|
|
869
|
+
|
|
774
870
|
onRequestParamsChange(newParams);
|
|
775
871
|
};
|
|
872
|
+
|
|
776
873
|
return {
|
|
777
874
|
isPaging: isPaging,
|
|
778
875
|
current: current,
|
|
@@ -780,10 +877,11 @@ var getPaginationParams = function getPaginationParams(_ref) {
|
|
|
780
877
|
onChange: typeof onRequestParamsChange === 'function' ? onChangeHandler : lodash_1.noop
|
|
781
878
|
};
|
|
782
879
|
};
|
|
880
|
+
|
|
783
881
|
exports.getPaginationParams = getPaginationParams;
|
|
784
882
|
|
|
785
883
|
/***/ }),
|
|
786
|
-
/*
|
|
884
|
+
/* 36 */
|
|
787
885
|
/***/ (function(module, exports, __webpack_require__) {
|
|
788
886
|
|
|
789
887
|
"use strict";
|
|
@@ -794,6 +892,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
794
892
|
});
|
|
795
893
|
exports.VizCategory = void 0;
|
|
796
894
|
var VizCategory;
|
|
895
|
+
|
|
797
896
|
(function (VizCategory) {
|
|
798
897
|
VizCategory["SINGLE_VALUE"] = "Single Value";
|
|
799
898
|
VizCategory["TRENDS"] = "Trends";
|
|
@@ -810,67 +909,96 @@ var VizCategory;
|
|
|
810
909
|
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
811
910
|
|
|
812
911
|
/***/ }),
|
|
813
|
-
/*
|
|
912
|
+
/* 37 */
|
|
814
913
|
/***/ (function(module, exports, __webpack_require__) {
|
|
815
914
|
|
|
816
915
|
"use strict";
|
|
817
916
|
|
|
818
917
|
|
|
819
918
|
var _slicedToArray = __webpack_require__(17);
|
|
919
|
+
|
|
820
920
|
Object.defineProperty(exports, "__esModule", {
|
|
821
921
|
value: true
|
|
822
922
|
});
|
|
923
|
+
|
|
823
924
|
var React = __webpack_require__(1);
|
|
925
|
+
|
|
824
926
|
var lodash_1 = __webpack_require__(3);
|
|
825
|
-
|
|
826
|
-
var
|
|
827
|
-
|
|
828
|
-
var
|
|
829
|
-
|
|
927
|
+
|
|
928
|
+
var getSettingsFromThemedProps_1 = __webpack_require__(38);
|
|
929
|
+
|
|
930
|
+
var Options_1 = __webpack_require__(30);
|
|
931
|
+
|
|
932
|
+
var SanitizeProps_1 = __webpack_require__(39);
|
|
933
|
+
|
|
934
|
+
var TimezoneContext_1 = __webpack_require__(26);
|
|
935
|
+
|
|
936
|
+
var moment_1 = __webpack_require__(40);
|
|
937
|
+
|
|
830
938
|
var FeatureFlagContext_1 = __webpack_require__(21);
|
|
939
|
+
|
|
831
940
|
var styled_components_1 = __webpack_require__(4);
|
|
832
|
-
|
|
833
|
-
var
|
|
834
|
-
|
|
835
|
-
var
|
|
836
|
-
|
|
941
|
+
|
|
942
|
+
var hocUtils_1 = __webpack_require__(27);
|
|
943
|
+
|
|
944
|
+
var JSONSchemaUtils_1 = __webpack_require__(28);
|
|
945
|
+
|
|
946
|
+
var async_dynamic_options_evaluator_1 = __webpack_require__(41);
|
|
947
|
+
|
|
948
|
+
var id_1 = __webpack_require__(25);
|
|
949
|
+
|
|
950
|
+
var SplunkVisualization_1 = __webpack_require__(42);
|
|
951
|
+
|
|
837
952
|
var VizBehavior_1 = __webpack_require__(6);
|
|
953
|
+
|
|
838
954
|
var getSorting_1 = __webpack_require__(33);
|
|
839
|
-
|
|
955
|
+
|
|
956
|
+
var getPagination_1 = __webpack_require__(35);
|
|
957
|
+
|
|
840
958
|
var useDeepMemo_1 = __webpack_require__(44);
|
|
959
|
+
|
|
841
960
|
var MissingPropsMessage_1 = __webpack_require__(45);
|
|
961
|
+
|
|
842
962
|
var withEditModeCover_1 = __webpack_require__(46);
|
|
963
|
+
|
|
843
964
|
var withPlaceholder_1 = __webpack_require__(47);
|
|
844
965
|
/**
|
|
845
966
|
* hoc that wraps a pure react visualization in a Dashboard visualization
|
|
846
967
|
* @param {DashboardVizOpts} opts
|
|
847
968
|
* @returns {HOC}
|
|
848
969
|
*/
|
|
970
|
+
|
|
971
|
+
|
|
849
972
|
var withDashboardViz = function withDashboardViz(opts) {
|
|
850
973
|
var ReactViz = opts.ReactViz,
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
var
|
|
974
|
+
vizConfig = opts.vizConfig,
|
|
975
|
+
_opts$computeVizProps = opts.computeVizProps,
|
|
976
|
+
computeVizProps = _opts$computeVizProps === void 0 ? function () {} : _opts$computeVizProps,
|
|
977
|
+
disableEditModeCover = opts.disableEditModeCover,
|
|
978
|
+
useIconPlaceholder = opts.useIconPlaceholder; // sanitizing props before sending them to reactviz.
|
|
979
|
+
|
|
980
|
+
var SanitizedReactViz = (0, SanitizeProps_1.withSanitizedProps)(ReactViz);
|
|
981
|
+
var defaultOptions = (0, JSONSchemaUtils_1.pickFieldFromJSONSchema)(vizConfig.optionsSchema, 'default');
|
|
982
|
+
|
|
858
983
|
var DashboardViz = function DashboardViz(props) {
|
|
859
984
|
var _a;
|
|
985
|
+
|
|
860
986
|
var mode = props.mode,
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
987
|
+
hasEventHandlers = props.hasEventHandlers,
|
|
988
|
+
dataSources = props.dataSources,
|
|
989
|
+
options = props.options,
|
|
990
|
+
_props$context = props.context,
|
|
991
|
+
context = _props$context === void 0 ? {} : _props$context,
|
|
992
|
+
width = props.width,
|
|
993
|
+
height = props.height,
|
|
994
|
+
onComputedProps = props.onComputedProps,
|
|
995
|
+
onEventTrigger = props.onEventTrigger,
|
|
996
|
+
theme = props.theme,
|
|
997
|
+
onRequestParamsChange = props.onRequestParamsChange;
|
|
998
|
+
|
|
872
999
|
var _React$useContext = React.useContext(TimezoneContext_1.default),
|
|
873
|
-
|
|
1000
|
+
serializedTimezone = _React$useContext.serializedTimezone;
|
|
1001
|
+
|
|
874
1002
|
if (serializedTimezone) {
|
|
875
1003
|
/*
|
|
876
1004
|
@splunk/moment currently does not allow us to customize the timezone on a per visualization basis.
|
|
@@ -884,44 +1012,58 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
884
1012
|
moment_1.default.setDefaultSplunkTimezone(serializedTimezone);
|
|
885
1013
|
}
|
|
886
1014
|
}
|
|
1015
|
+
|
|
887
1016
|
var themeFunc = function themeFunc(themeVar) {
|
|
888
1017
|
var _a, _b;
|
|
1018
|
+
|
|
889
1019
|
return (_b = (_a = vizConfig.themes)[themeVar]) === null || _b === void 0 ? void 0 : _b.call(_a, props);
|
|
890
1020
|
};
|
|
1021
|
+
|
|
891
1022
|
var bgColorFromTheme = themeFunc('defaultBackgroundColor');
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
1023
|
+
|
|
1024
|
+
var _ref = (0, getSettingsFromThemedProps_1.default)({
|
|
1025
|
+
theme: theme
|
|
1026
|
+
}),
|
|
1027
|
+
currentThemeFamily = _ref.family,
|
|
1028
|
+
currentThemeColorScheme = _ref.colorScheme,
|
|
1029
|
+
currentThemeDensity = _ref.density;
|
|
1030
|
+
|
|
898
1031
|
var evaluatedOptions = {}; // evaluatedOptions need to be initialized as an empty object
|
|
1032
|
+
|
|
899
1033
|
var _React$useState = React.useState({}),
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
1034
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
1035
|
+
evaluatedOptionsAsync = _React$useState2[0],
|
|
1036
|
+
setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
|
|
1037
|
+
|
|
1038
|
+
|
|
903
1039
|
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
1040
|
+
|
|
1041
|
+
var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat((0, id_1.createGUID)())),
|
|
1042
|
+
_React$useState4 = _slicedToArray(_React$useState3, 1),
|
|
1043
|
+
visualizationID = _React$useState4[0];
|
|
1044
|
+
|
|
907
1045
|
var _React$useState5 = React.useState({}),
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
1046
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
1047
|
+
dataSourcesInState = _React$useState6[0],
|
|
1048
|
+
setDataSourcesInState = _React$useState6[1];
|
|
1049
|
+
|
|
911
1050
|
var _React$useState7 = React.useState(),
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
1051
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
1052
|
+
dataFramesInState = _React$useState8[0],
|
|
1053
|
+
setDataFramesInState = _React$useState8[1];
|
|
1054
|
+
|
|
1055
|
+
var _React$useState9 = React.useState(Boolean(featureFlagContext === null || featureFlagContext === void 0 ? void 0 : featureFlagContext.visualizations_useWebWorkersForDSL)),
|
|
1056
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
1057
|
+
useAsyncEvaluatedOptions = _React$useState10[0],
|
|
1058
|
+
setUseAsyncEvaluatedOptions = _React$useState10[1];
|
|
1059
|
+
|
|
1060
|
+
var isMounted = React.useRef(true);
|
|
1061
|
+
evaluatedOptions = (0, useDeepMemo_1.useDeepMemo)(function () {
|
|
920
1062
|
try {
|
|
921
1063
|
if (useAsyncEvaluatedOptions) {
|
|
922
1064
|
var optionsToEvaluate = {
|
|
923
|
-
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
924
|
-
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
1065
|
+
context: (0, lodash_1.defaultsDeep)({}, context, vizConfig.defaultContext),
|
|
1066
|
+
options: (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, defaultOptions)
|
|
925
1067
|
};
|
|
926
1068
|
var asyncDynamicOptionsEvaluatorParams = {
|
|
927
1069
|
visualizationID: visualizationID,
|
|
@@ -932,21 +1074,23 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
932
1074
|
};
|
|
933
1075
|
async_dynamic_options_evaluator_1.default.evaluate(asyncDynamicOptionsEvaluatorParams).then(function (results) {
|
|
934
1076
|
setEvaluatedOptionsAsync(results.results);
|
|
935
|
-
}).catch(function (
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
1077
|
+
}).catch(function () {
|
|
1078
|
+
if (isMounted.current) {
|
|
1079
|
+
setUseAsyncEvaluatedOptions(false);
|
|
1080
|
+
}
|
|
939
1081
|
});
|
|
940
1082
|
} else {
|
|
941
1083
|
var dataFrames = dataFramesInState;
|
|
1084
|
+
|
|
942
1085
|
if (dataSources !== dataSourcesInState) {
|
|
943
1086
|
setDataSourcesInState(dataSources);
|
|
944
1087
|
dataFrames = Options_1.Options.dataFrameFromDataSource(dataSources);
|
|
945
1088
|
setDataFramesInState(dataFrames);
|
|
946
1089
|
}
|
|
1090
|
+
|
|
947
1091
|
return Options_1.Options.evaluate({
|
|
948
|
-
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
949
|
-
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
1092
|
+
context: (0, lodash_1.defaultsDeep)({}, context, vizConfig.defaultContext),
|
|
1093
|
+
options: (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, defaultOptions)
|
|
950
1094
|
}, dataSources, themeFunc, dataFrames);
|
|
951
1095
|
}
|
|
952
1096
|
} catch (e) {
|
|
@@ -954,67 +1098,76 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
954
1098
|
console.error("unexpected error evaluating options: ".concat(e.message));
|
|
955
1099
|
return {};
|
|
956
1100
|
}
|
|
1101
|
+
|
|
957
1102
|
return {};
|
|
958
1103
|
}, [currentThemeFamily, currentThemeColorScheme, currentThemeDensity, options, context, dataSources, serializedTimezone, useAsyncEvaluatedOptions]);
|
|
959
|
-
var evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync;
|
|
960
|
-
// trellis specific backgroundColor update for onComputedProps
|
|
1104
|
+
var evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync; // trellis specific backgroundColor update for onComputedProps
|
|
961
1105
|
// 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
|
|
962
1106
|
// onComputedProps api should return back trellisBackgroundColor value for backgroundColor option to support coloring of sibling panels (for eg:- title/ description on UDF side)
|
|
1107
|
+
|
|
963
1108
|
var isTrellisFeatureFlagOn = Boolean(featureFlagContext && featureFlagContext.visualizations_enableTrellis);
|
|
964
1109
|
var clonedEvaluatedOptions = evaluatedOptionsToUse;
|
|
1110
|
+
|
|
965
1111
|
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) {
|
|
966
1112
|
clonedEvaluatedOptions = Object.assign(Object.assign({}, evaluatedOptionsToUse), {
|
|
967
1113
|
backgroundColor: clonedEvaluatedOptions === null || clonedEvaluatedOptions === void 0 ? void 0 : clonedEvaluatedOptions.trellisBackgroundColor
|
|
968
1114
|
});
|
|
969
|
-
}
|
|
970
|
-
// useEffect hook needs to be initialized before any early returns
|
|
1115
|
+
} // useEffect hook needs to be initialized before any early returns
|
|
971
1116
|
// this is in accordance with the order of hook calls being the same on each render https://reactjs.org/docs/hooks-rules.html#explanation
|
|
1117
|
+
|
|
1118
|
+
|
|
972
1119
|
React.useEffect(function () {
|
|
973
1120
|
onComputedProps(clonedEvaluatedOptions);
|
|
974
1121
|
});
|
|
975
1122
|
React.useEffect(function () {
|
|
976
1123
|
return function () {
|
|
977
1124
|
if (useAsyncEvaluatedOptions) {
|
|
1125
|
+
isMounted.current = false;
|
|
978
1126
|
async_dynamic_options_evaluator_1.default.reset(visualizationID);
|
|
979
1127
|
}
|
|
980
|
-
};
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
// present warning message if any required props are missing
|
|
1128
|
+
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1129
|
+
}, []); // present warning message if any required props are missing
|
|
1130
|
+
|
|
984
1131
|
var _vizConfig$requiredPr = vizConfig.requiredProps,
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
var missing = MissingPropsMessage_1.missingKeys(requiredProps, evaluatedOptionsToUse);
|
|
1132
|
+
requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
|
|
1133
|
+
supports = vizConfig.supports;
|
|
1134
|
+
var missing = (0, MissingPropsMessage_1.missingKeys)(requiredProps, evaluatedOptionsToUse);
|
|
1135
|
+
|
|
988
1136
|
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
|
|
989
1137
|
) {
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
1138
|
+
return React.createElement(MissingPropsMessage_1.default, {
|
|
1139
|
+
"data-test": "missing-props-message",
|
|
1140
|
+
width: width,
|
|
1141
|
+
height: height,
|
|
1142
|
+
missingProps: missing,
|
|
1143
|
+
backgroundColor: bgColorFromTheme
|
|
1144
|
+
});
|
|
1145
|
+
} // events
|
|
1146
|
+
|
|
1147
|
+
|
|
999
1148
|
var eventCallbackProps = {};
|
|
1149
|
+
|
|
1000
1150
|
if (hasEventHandlers && mode === 'view' && vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.EVENTS) > -1) {
|
|
1001
1151
|
var supportedEvents = vizConfig.events;
|
|
1002
1152
|
Object.keys(supportedEvents).forEach(function (eventName) {
|
|
1003
|
-
var eventCallbackPropName = lodash_1.camelCase("on.".concat(eventName));
|
|
1004
|
-
eventCallbackProps[eventCallbackPropName] = null;
|
|
1005
|
-
// todo: refactor single value and single value icon to send payload from viz
|
|
1153
|
+
var eventCallbackPropName = (0, lodash_1.camelCase)("on.".concat(eventName));
|
|
1154
|
+
eventCallbackProps[eventCallbackPropName] = null; // todo: refactor single value and single value icon to send payload from viz
|
|
1006
1155
|
// then remove these lines
|
|
1156
|
+
|
|
1007
1157
|
var payloadKeys = supportedEvents[eventName].payloadKeys;
|
|
1008
1158
|
var payload = {};
|
|
1159
|
+
|
|
1009
1160
|
if (Array.isArray(payloadKeys) && payloadKeys.length) {
|
|
1010
1161
|
payloadKeys.forEach(function (p) {
|
|
1011
1162
|
payload[p] = evaluatedOptionsToUse[p];
|
|
1012
1163
|
});
|
|
1013
1164
|
}
|
|
1165
|
+
|
|
1014
1166
|
eventCallbackProps[eventCallbackPropName] = function (ev) {
|
|
1015
1167
|
if (ev && ev.payload) {
|
|
1016
1168
|
payload = ev.payload;
|
|
1017
1169
|
}
|
|
1170
|
+
|
|
1018
1171
|
return onEventTrigger({
|
|
1019
1172
|
originalEvent: ev,
|
|
1020
1173
|
payload: payload,
|
|
@@ -1022,8 +1175,9 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1022
1175
|
});
|
|
1023
1176
|
};
|
|
1024
1177
|
});
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1178
|
+
} // compute pure viz props which are not from options
|
|
1179
|
+
|
|
1180
|
+
|
|
1027
1181
|
var computedVizProps = computeVizProps(Object.assign(Object.assign(Object.assign(Object.assign({}, props), evaluatedOptionsToUse), eventCallbackProps), {
|
|
1028
1182
|
themeFunc: themeFunc
|
|
1029
1183
|
}));
|
|
@@ -1041,21 +1195,25 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1041
1195
|
* In future, we could automatically detect which all datasources are being used
|
|
1042
1196
|
* and bind those magically to pagination/sorting behavior.
|
|
1043
1197
|
*/
|
|
1198
|
+
|
|
1044
1199
|
var dataSourceMetadata = {};
|
|
1045
1200
|
var OptionKey = 'paginateDataSourceKey';
|
|
1046
|
-
var paginateDataSourceKey = lodash_1.has(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
var
|
|
1201
|
+
var paginateDataSourceKey = (0, lodash_1.has)(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
|
|
1202
|
+
|
|
1203
|
+
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && (0, lodash_1.has)(dataSources, paginateDataSourceKey)) {
|
|
1204
|
+
var requestParams = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'requestParams'], {});
|
|
1205
|
+
var meta = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'meta'], {});
|
|
1206
|
+
|
|
1050
1207
|
var handleRequestParamsChange = function handleRequestParamsChange(payload) {
|
|
1051
1208
|
return onRequestParamsChange(paginateDataSourceKey, payload);
|
|
1052
1209
|
};
|
|
1053
|
-
|
|
1210
|
+
|
|
1211
|
+
var sortParams = (0, getSorting_1.getSortingParams)({
|
|
1054
1212
|
requestParams: requestParams,
|
|
1055
1213
|
meta: meta,
|
|
1056
1214
|
onRequestParamsChange: handleRequestParamsChange
|
|
1057
1215
|
});
|
|
1058
|
-
var paginatorParams = getPagination_1.getPaginationParams({
|
|
1216
|
+
var paginatorParams = (0, getPagination_1.getPaginationParams)({
|
|
1059
1217
|
requestParams: requestParams,
|
|
1060
1218
|
meta: meta,
|
|
1061
1219
|
onRequestParamsChange: handleRequestParamsChange
|
|
@@ -1064,103 +1222,120 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1064
1222
|
sortParams: sortParams,
|
|
1065
1223
|
paginatorParams: paginatorParams
|
|
1066
1224
|
};
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1225
|
+
} // if were using webworkers and this is the first render we dont want to show a viz with missing data so we return null
|
|
1226
|
+
|
|
1227
|
+
|
|
1069
1228
|
if (useAsyncEvaluatedOptions && Object.keys(evaluatedOptionsToUse).length === 0) {
|
|
1070
1229
|
return null;
|
|
1071
1230
|
}
|
|
1231
|
+
|
|
1072
1232
|
return React.createElement(SanitizedReactViz, Object.assign({
|
|
1073
1233
|
mode: mode,
|
|
1074
1234
|
width: width,
|
|
1075
1235
|
height: height
|
|
1076
1236
|
}, evaluatedOptionsToUse, computedVizProps, eventCallbackProps, dataSourceMetadata));
|
|
1077
1237
|
};
|
|
1238
|
+
|
|
1078
1239
|
DashboardViz.propTypes = Object.assign(Object.assign({}, SplunkVisualization_1.default.propTypes), ReactViz.propTypes);
|
|
1079
1240
|
DashboardViz.defaultProps = Object.assign(Object.assign(Object.assign({}, SplunkVisualization_1.default.defaultProps), ReactViz.defaultProps), {
|
|
1080
1241
|
// using withTheme requires component to receive theme prop. In case the consumer did not provide ThemeProvider, a default empty object will prevent warnings.
|
|
1081
1242
|
theme: {}
|
|
1082
|
-
});
|
|
1083
|
-
|
|
1084
|
-
DashboardViz.config = vizConfig;
|
|
1085
|
-
|
|
1086
|
-
return styled_components_1.withTheme(withPlaceholder_1.default(withEditModeCover_1.default(DashboardViz, disableEditModeCover), useIconPlaceholder));
|
|
1243
|
+
}); // attach viz config
|
|
1244
|
+
|
|
1245
|
+
DashboardViz.config = vizConfig; // @ts-ignore: TODO fix sc upgrade TS issues
|
|
1246
|
+
|
|
1247
|
+
return (0, styled_components_1.withTheme)((0, withPlaceholder_1.default)((0, withEditModeCover_1.default)(DashboardViz, disableEditModeCover), useIconPlaceholder));
|
|
1087
1248
|
};
|
|
1249
|
+
|
|
1088
1250
|
exports.default = withDashboardViz;
|
|
1089
1251
|
|
|
1090
1252
|
/***/ }),
|
|
1091
|
-
/*
|
|
1253
|
+
/* 38 */
|
|
1092
1254
|
/***/ (function(module, exports) {
|
|
1093
1255
|
|
|
1094
1256
|
module.exports = require("@splunk/themes/getSettingsFromThemedProps");
|
|
1095
1257
|
|
|
1096
1258
|
/***/ }),
|
|
1097
|
-
/*
|
|
1259
|
+
/* 39 */
|
|
1098
1260
|
/***/ (function(module, exports) {
|
|
1099
1261
|
|
|
1100
1262
|
module.exports = require("@splunk/visualizations-shared/SanitizeProps");
|
|
1101
1263
|
|
|
1102
1264
|
/***/ }),
|
|
1103
|
-
/*
|
|
1265
|
+
/* 40 */
|
|
1104
1266
|
/***/ (function(module, exports) {
|
|
1105
1267
|
|
|
1106
1268
|
module.exports = require("@splunk/moment");
|
|
1107
1269
|
|
|
1108
1270
|
/***/ }),
|
|
1109
|
-
/*
|
|
1271
|
+
/* 41 */
|
|
1110
1272
|
/***/ (function(module, exports) {
|
|
1111
1273
|
|
|
1112
1274
|
module.exports = require("@splunk/async-dynamic-options-evaluator");
|
|
1113
1275
|
|
|
1114
1276
|
/***/ }),
|
|
1115
|
-
/*
|
|
1277
|
+
/* 42 */
|
|
1116
1278
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1117
1279
|
|
|
1118
1280
|
"use strict";
|
|
1119
1281
|
|
|
1120
1282
|
|
|
1121
1283
|
var _classCallCheck = __webpack_require__(9);
|
|
1284
|
+
|
|
1122
1285
|
Object.defineProperty(exports, "__esModule", {
|
|
1123
1286
|
value: true
|
|
1124
1287
|
});
|
|
1125
1288
|
exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
|
|
1126
1289
|
/* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
|
|
1290
|
+
|
|
1127
1291
|
var T = __webpack_require__(0);
|
|
1292
|
+
|
|
1128
1293
|
var lodash_1 = __webpack_require__(3);
|
|
1129
|
-
|
|
1130
|
-
// this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
1294
|
+
|
|
1295
|
+
var VizActionHandler_1 = __webpack_require__(43); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
1296
|
+
|
|
1297
|
+
|
|
1131
1298
|
exports.INITIAL_WIDTH = 250;
|
|
1132
1299
|
exports.INITIAL_HEIGHT = 250;
|
|
1133
1300
|
/**
|
|
1134
1301
|
* A Splunk visualization
|
|
1135
1302
|
*/
|
|
1303
|
+
|
|
1136
1304
|
var SplunkVisualization = function SplunkVisualization() {
|
|
1137
1305
|
_classCallCheck(this, SplunkVisualization);
|
|
1138
1306
|
};
|
|
1307
|
+
|
|
1139
1308
|
SplunkVisualization.propTypes = {
|
|
1140
1309
|
/**
|
|
1141
1310
|
* display mode
|
|
1142
1311
|
*/
|
|
1143
1312
|
mode: T.oneOf(['view', 'edit', 'export']).isRequired,
|
|
1313
|
+
|
|
1144
1314
|
/**
|
|
1145
1315
|
* width in pixel or string, defaults to 100%
|
|
1146
1316
|
*/
|
|
1147
1317
|
width: T.oneOfType([T.string, T.number]).isRequired,
|
|
1318
|
+
|
|
1148
1319
|
/**
|
|
1149
1320
|
* height in pixel or string
|
|
1150
1321
|
*/
|
|
1151
1322
|
height: T.oneOfType([T.string, T.number]).isRequired,
|
|
1323
|
+
|
|
1152
1324
|
/**
|
|
1153
1325
|
* visualization context used for dynamic option evaluation
|
|
1154
1326
|
*/
|
|
1155
1327
|
context: T.object,
|
|
1328
|
+
|
|
1156
1329
|
/**
|
|
1157
1330
|
* visualization formatting options
|
|
1158
1331
|
*/
|
|
1159
1332
|
options: T.object,
|
|
1333
|
+
|
|
1160
1334
|
/**
|
|
1161
1335
|
* A callback to update formatting options
|
|
1162
1336
|
*/
|
|
1163
1337
|
onOptionsChange: T.func,
|
|
1338
|
+
|
|
1164
1339
|
/**
|
|
1165
1340
|
* datasource state which include data and request params, object key indicate the datasource type.
|
|
1166
1341
|
*/
|
|
@@ -1169,6 +1344,7 @@ SplunkVisualization.propTypes = {
|
|
|
1169
1344
|
* current request params
|
|
1170
1345
|
*/
|
|
1171
1346
|
requestParams: T.object,
|
|
1347
|
+
|
|
1172
1348
|
/**
|
|
1173
1349
|
* current dataset
|
|
1174
1350
|
*/
|
|
@@ -1176,6 +1352,7 @@ SplunkVisualization.propTypes = {
|
|
|
1176
1352
|
fields: T.array,
|
|
1177
1353
|
columns: T.array
|
|
1178
1354
|
}),
|
|
1355
|
+
|
|
1179
1356
|
/**
|
|
1180
1357
|
* error
|
|
1181
1358
|
*/
|
|
@@ -1183,29 +1360,35 @@ SplunkVisualization.propTypes = {
|
|
|
1183
1360
|
level: T.string,
|
|
1184
1361
|
message: T.string
|
|
1185
1362
|
}),
|
|
1363
|
+
|
|
1186
1364
|
/**
|
|
1187
1365
|
* meta data that came with the dataset
|
|
1188
1366
|
*/
|
|
1189
1367
|
meta: T.object
|
|
1190
1368
|
})),
|
|
1369
|
+
|
|
1191
1370
|
/**
|
|
1192
1371
|
* A callback to trigger event
|
|
1193
1372
|
*/
|
|
1194
1373
|
onEventTrigger: T.func,
|
|
1374
|
+
|
|
1195
1375
|
/**
|
|
1196
1376
|
* Inform viz if there are handlers listening to events
|
|
1197
1377
|
*/
|
|
1198
1378
|
hasEventHandlers: T.bool,
|
|
1379
|
+
|
|
1199
1380
|
/**
|
|
1200
1381
|
* A callback to communicate computed props to a consumer
|
|
1201
1382
|
*/
|
|
1202
1383
|
onComputedProps: T.func,
|
|
1384
|
+
|
|
1203
1385
|
/**
|
|
1204
1386
|
* A callback to obtain visualization api
|
|
1205
1387
|
*/
|
|
1206
1388
|
vizActionHandlerRef: T.func,
|
|
1207
1389
|
loading: T.bool,
|
|
1208
1390
|
theme: T.object,
|
|
1391
|
+
|
|
1209
1392
|
/**
|
|
1210
1393
|
* A callback to request new data with updated request params
|
|
1211
1394
|
*/
|
|
@@ -1214,6 +1397,7 @@ SplunkVisualization.propTypes = {
|
|
|
1214
1397
|
/**
|
|
1215
1398
|
*
|
|
1216
1399
|
*/
|
|
1400
|
+
|
|
1217
1401
|
SplunkVisualization.defaultProps = {
|
|
1218
1402
|
// BaseVisualization in dashboard-visualizations uses 100% for width but 250 for height
|
|
1219
1403
|
width: '100%',
|
|
@@ -1241,26 +1425,29 @@ SplunkVisualization.defaultProps = {
|
|
|
1241
1425
|
exports.default = SplunkVisualization;
|
|
1242
1426
|
|
|
1243
1427
|
/***/ }),
|
|
1244
|
-
/*
|
|
1428
|
+
/* 43 */
|
|
1245
1429
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1246
1430
|
|
|
1247
1431
|
"use strict";
|
|
1248
1432
|
|
|
1249
1433
|
|
|
1250
1434
|
var _classCallCheck = __webpack_require__(9);
|
|
1435
|
+
|
|
1251
1436
|
var _createClass = __webpack_require__(18);
|
|
1437
|
+
|
|
1252
1438
|
Object.defineProperty(exports, "__esModule", {
|
|
1253
1439
|
value: true
|
|
1254
1440
|
});
|
|
1255
1441
|
exports.DefaultVizActionHandler = void 0;
|
|
1442
|
+
|
|
1256
1443
|
var DefaultVizActionHandler = /*#__PURE__*/function () {
|
|
1257
1444
|
function DefaultVizActionHandler() {
|
|
1258
1445
|
_classCallCheck(this, DefaultVizActionHandler);
|
|
1259
1446
|
}
|
|
1447
|
+
|
|
1260
1448
|
_createClass(DefaultVizActionHandler, [{
|
|
1261
1449
|
key: "focus",
|
|
1262
|
-
value: function focus() {
|
|
1263
|
-
// noop
|
|
1450
|
+
value: function focus() {// noop
|
|
1264
1451
|
}
|
|
1265
1452
|
}, {
|
|
1266
1453
|
key: "snapshot",
|
|
@@ -1268,22 +1455,11 @@ var DefaultVizActionHandler = /*#__PURE__*/function () {
|
|
|
1268
1455
|
return null; // noop
|
|
1269
1456
|
}
|
|
1270
1457
|
}]);
|
|
1458
|
+
|
|
1271
1459
|
return DefaultVizActionHandler;
|
|
1272
1460
|
}();
|
|
1273
|
-
exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
1274
|
-
|
|
1275
|
-
/***/ }),
|
|
1276
|
-
/* 43 */
|
|
1277
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1278
1461
|
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1283
|
-
value: true
|
|
1284
|
-
});
|
|
1285
|
-
exports.validSortDirs = void 0;
|
|
1286
|
-
exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
1462
|
+
exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
1287
1463
|
|
|
1288
1464
|
/***/ }),
|
|
1289
1465
|
/* 44 */
|
|
@@ -1296,7 +1472,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1296
1472
|
value: true
|
|
1297
1473
|
});
|
|
1298
1474
|
exports.useDeepMemo = void 0;
|
|
1475
|
+
|
|
1299
1476
|
var react_1 = __webpack_require__(1);
|
|
1477
|
+
|
|
1300
1478
|
var lodash_1 = __webpack_require__(3);
|
|
1301
1479
|
/**
|
|
1302
1480
|
* This hook evaluates and stores the result of a passed function and only
|
|
@@ -1311,16 +1489,21 @@ var lodash_1 = __webpack_require__(3);
|
|
|
1311
1489
|
* @param fn the function to be executed and
|
|
1312
1490
|
* @param dependencies an array of dependencies
|
|
1313
1491
|
*/
|
|
1492
|
+
|
|
1493
|
+
|
|
1314
1494
|
var useDeepMemo = function useDeepMemo(fn, dependencies) {
|
|
1315
|
-
var ref = react_1.useRef();
|
|
1316
|
-
|
|
1495
|
+
var ref = (0, react_1.useRef)();
|
|
1496
|
+
|
|
1497
|
+
if (!ref.current || !(0, lodash_1.isEqual)(dependencies, ref.current.dependencies)) {
|
|
1317
1498
|
ref.current = {
|
|
1318
1499
|
dependencies: dependencies,
|
|
1319
1500
|
value: fn()
|
|
1320
1501
|
};
|
|
1321
1502
|
}
|
|
1503
|
+
|
|
1322
1504
|
return ref.current.value;
|
|
1323
1505
|
};
|
|
1506
|
+
|
|
1324
1507
|
exports.useDeepMemo = useDeepMemo;
|
|
1325
1508
|
|
|
1326
1509
|
/***/ }),
|
|
@@ -1334,19 +1517,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1334
1517
|
value: true
|
|
1335
1518
|
});
|
|
1336
1519
|
exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
|
|
1520
|
+
|
|
1337
1521
|
var React = __webpack_require__(1);
|
|
1522
|
+
|
|
1338
1523
|
var T = __webpack_require__(0);
|
|
1524
|
+
|
|
1339
1525
|
var i18n_1 = __webpack_require__(2);
|
|
1526
|
+
|
|
1340
1527
|
var Message_1 = __webpack_require__(10);
|
|
1528
|
+
|
|
1341
1529
|
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
1342
1530
|
/**
|
|
1343
1531
|
* @method isMissing
|
|
1344
1532
|
* @param {any} v
|
|
1345
1533
|
* @returns {boolean} true if the input value === null or undefined
|
|
1346
1534
|
*/
|
|
1535
|
+
|
|
1536
|
+
|
|
1347
1537
|
var isMissing = function isMissing(v) {
|
|
1348
1538
|
return v === null || v === undefined;
|
|
1349
1539
|
};
|
|
1540
|
+
|
|
1350
1541
|
exports.isMissing = isMissing;
|
|
1351
1542
|
/**
|
|
1352
1543
|
* @method misskingKeys
|
|
@@ -1354,11 +1545,13 @@ exports.isMissing = isMissing;
|
|
|
1354
1545
|
* @param {object} target
|
|
1355
1546
|
* @returns {string[]} the keys of missing required props
|
|
1356
1547
|
*/
|
|
1548
|
+
|
|
1357
1549
|
var missingKeys = function missingKeys(keys, target) {
|
|
1358
1550
|
return keys.filter(function (k) {
|
|
1359
|
-
return exports.isMissing(target[k]);
|
|
1551
|
+
return (0, exports.isMissing)(target[k]);
|
|
1360
1552
|
});
|
|
1361
1553
|
};
|
|
1554
|
+
|
|
1362
1555
|
exports.missingKeys = missingKeys;
|
|
1363
1556
|
var propTypes = {
|
|
1364
1557
|
width: T.oneOfType([T.string, T.number]),
|
|
@@ -1372,24 +1565,26 @@ var propTypes = {
|
|
|
1372
1565
|
* @param {MissingPropsProps} props
|
|
1373
1566
|
* @returns {React.ReactElement}
|
|
1374
1567
|
*/
|
|
1568
|
+
|
|
1375
1569
|
var MissingPropsMessage = function MissingPropsMessage(props) {
|
|
1376
1570
|
var width = props.width,
|
|
1377
|
-
|
|
1378
|
-
|
|
1571
|
+
height = props.height,
|
|
1572
|
+
missingProps = props.missingProps;
|
|
1379
1573
|
return React.createElement(Message_1.default, {
|
|
1380
1574
|
"data-test": "message",
|
|
1381
1575
|
width: width,
|
|
1382
1576
|
height: height,
|
|
1383
|
-
message: i18n_1._("Missing property: ".concat(missingProps.join(', ')))
|
|
1577
|
+
message: (0, i18n_1._)("Missing property: ".concat(missingProps.join(', ')))
|
|
1384
1578
|
});
|
|
1385
1579
|
};
|
|
1580
|
+
|
|
1386
1581
|
exports.MissingPropsMessage = MissingPropsMessage;
|
|
1387
1582
|
exports.MissingPropsMessage.propTypes = propTypes;
|
|
1388
1583
|
exports.MissingPropsMessage.defaultProps = {
|
|
1389
1584
|
width: '100%',
|
|
1390
1585
|
height: 250
|
|
1391
1586
|
};
|
|
1392
|
-
exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
1587
|
+
exports.default = (0, FixedSizeContainer_1.default)(exports.MissingPropsMessage);
|
|
1393
1588
|
|
|
1394
1589
|
/***/ }),
|
|
1395
1590
|
/* 46 */
|
|
@@ -1401,15 +1596,19 @@ exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
|
1401
1596
|
Object.defineProperty(exports, "__esModule", {
|
|
1402
1597
|
value: true
|
|
1403
1598
|
});
|
|
1599
|
+
|
|
1404
1600
|
var React = __webpack_require__(1);
|
|
1601
|
+
|
|
1405
1602
|
var styled_components_1 = __webpack_require__(4);
|
|
1603
|
+
|
|
1406
1604
|
var hocUtils_1 = __webpack_require__(15);
|
|
1605
|
+
|
|
1407
1606
|
var Cover = styled_components_1.default.div.withConfig({
|
|
1408
1607
|
displayName: "withEditModeCover__Cover",
|
|
1409
1608
|
componentId: "sc-1gsbnxb-0"
|
|
1410
1609
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
1411
1610
|
var Blocker = styled_components_1.default.div.attrs({
|
|
1412
|
-
'data-splunk-visualization-version': "
|
|
1611
|
+
'data-splunk-visualization-version': "26.1.0 - fc8bf8d77"
|
|
1413
1612
|
}).withConfig({
|
|
1414
1613
|
displayName: "withEditModeCover__Blocker",
|
|
1415
1614
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -1420,6 +1619,7 @@ var Blocker = styled_components_1.default.div.attrs({
|
|
|
1420
1619
|
* @param {ExtendedDashViz} Visualization
|
|
1421
1620
|
* @returns {ExtendedDashViz} Wrapper
|
|
1422
1621
|
*/
|
|
1622
|
+
|
|
1423
1623
|
var withEditModeCover = function withEditModeCover(Visualization, disableEditModeCover) {
|
|
1424
1624
|
var Wrapper = function Wrapper(props) {
|
|
1425
1625
|
var mode = props.mode;
|
|
@@ -1428,12 +1628,14 @@ var withEditModeCover = function withEditModeCover(Visualization, disableEditMod
|
|
|
1428
1628
|
"data-test": "edit-mode-cover"
|
|
1429
1629
|
}));
|
|
1430
1630
|
};
|
|
1431
|
-
|
|
1631
|
+
|
|
1632
|
+
(0, hocUtils_1.extendStaticWrapperProps)({
|
|
1432
1633
|
Wrapper: Wrapper,
|
|
1433
1634
|
Visualization: Visualization
|
|
1434
1635
|
});
|
|
1435
1636
|
return Wrapper;
|
|
1436
1637
|
};
|
|
1638
|
+
|
|
1437
1639
|
exports.default = withEditModeCover;
|
|
1438
1640
|
|
|
1439
1641
|
/***/ }),
|
|
@@ -1446,27 +1648,37 @@ exports.default = withEditModeCover;
|
|
|
1446
1648
|
Object.defineProperty(exports, "__esModule", {
|
|
1447
1649
|
value: true
|
|
1448
1650
|
});
|
|
1651
|
+
|
|
1449
1652
|
var React = __webpack_require__(1);
|
|
1653
|
+
|
|
1450
1654
|
var colorUtils_1 = __webpack_require__(12);
|
|
1655
|
+
|
|
1451
1656
|
var variables_1 = __webpack_require__(11);
|
|
1452
|
-
|
|
1657
|
+
|
|
1658
|
+
var IconPlaceholder_1 = __webpack_require__(32);
|
|
1659
|
+
|
|
1453
1660
|
var VizBehavior_1 = __webpack_require__(6);
|
|
1661
|
+
|
|
1454
1662
|
var hocUtils_1 = __webpack_require__(15);
|
|
1663
|
+
|
|
1455
1664
|
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
1456
1665
|
var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
|
|
1457
1666
|
var config = Visualization.config;
|
|
1458
1667
|
var themes = config.themes;
|
|
1668
|
+
|
|
1459
1669
|
var Wrapper = function Wrapper(props) {
|
|
1460
1670
|
var _a, _b;
|
|
1671
|
+
|
|
1461
1672
|
var dataSources = props.dataSources,
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1673
|
+
loading = props.loading,
|
|
1674
|
+
options = props.options,
|
|
1675
|
+
height = props.height,
|
|
1676
|
+
width = props.width;
|
|
1466
1677
|
var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
|
|
1467
|
-
var bgColorFromTheme = 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);
|
|
1678
|
+
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);
|
|
1468
1679
|
var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
|
|
1469
1680
|
var iconColor = variables_1.default.contentColorActive(props);
|
|
1681
|
+
|
|
1470
1682
|
if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
|
|
1471
1683
|
return React.createElement(IconPlaceholder_1.default, {
|
|
1472
1684
|
"data-test": "icon-placeholder",
|
|
@@ -1477,25 +1689,28 @@ var withPlaceholder = function withPlaceholder(Visualization) {
|
|
|
1477
1689
|
iconColor: iconColor
|
|
1478
1690
|
});
|
|
1479
1691
|
}
|
|
1692
|
+
|
|
1480
1693
|
return React.createElement(Visualization, Object.assign({}, props));
|
|
1481
1694
|
};
|
|
1482
|
-
|
|
1695
|
+
|
|
1696
|
+
(0, hocUtils_1.extendStaticWrapperProps)({
|
|
1483
1697
|
Wrapper: Wrapper,
|
|
1484
1698
|
Visualization: Visualization
|
|
1485
1699
|
});
|
|
1486
1700
|
return Wrapper;
|
|
1487
1701
|
};
|
|
1702
|
+
|
|
1488
1703
|
exports.default = withPlaceholder;
|
|
1489
1704
|
|
|
1490
1705
|
/***/ }),
|
|
1491
1706
|
/* 48 */,
|
|
1492
|
-
/* 49
|
|
1707
|
+
/* 49 */,
|
|
1708
|
+
/* 50 */
|
|
1493
1709
|
/***/ (function(module, exports) {
|
|
1494
1710
|
|
|
1495
1711
|
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
1496
1712
|
|
|
1497
1713
|
/***/ }),
|
|
1498
|
-
/* 50 */,
|
|
1499
1714
|
/* 51 */
|
|
1500
1715
|
/***/ (function(module, exports) {
|
|
1501
1716
|
|
|
@@ -1517,13 +1732,15 @@ module.exports = require("@splunk/visualization-icons");
|
|
|
1517
1732
|
Object.defineProperty(exports, "__esModule", {
|
|
1518
1733
|
value: true
|
|
1519
1734
|
});
|
|
1735
|
+
|
|
1520
1736
|
var i18n_1 = __webpack_require__(2);
|
|
1737
|
+
|
|
1521
1738
|
var background = function background(_ref) {
|
|
1522
1739
|
var label = _ref.label,
|
|
1523
|
-
|
|
1524
|
-
|
|
1740
|
+
themes = _ref.themes,
|
|
1741
|
+
labelPosition = _ref.labelPosition;
|
|
1525
1742
|
return [{
|
|
1526
|
-
label: i18n_1._(label || 'Background'),
|
|
1743
|
+
label: (0, i18n_1._)(label || 'Background'),
|
|
1527
1744
|
option: 'backgroundColor',
|
|
1528
1745
|
editor: 'editor.color',
|
|
1529
1746
|
editorProps: {
|
|
@@ -1532,31 +1749,43 @@ var background = function background(_ref) {
|
|
|
1532
1749
|
}
|
|
1533
1750
|
}];
|
|
1534
1751
|
};
|
|
1752
|
+
|
|
1535
1753
|
exports.default = background;
|
|
1536
1754
|
|
|
1537
1755
|
/***/ }),
|
|
1538
1756
|
/* 54 */,
|
|
1539
1757
|
/* 55 */
|
|
1758
|
+
/***/ (function(module, exports) {
|
|
1759
|
+
|
|
1760
|
+
module.exports = require("@splunk/charting-bundle");
|
|
1761
|
+
|
|
1762
|
+
/***/ }),
|
|
1763
|
+
/* 56 */
|
|
1540
1764
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1541
1765
|
|
|
1542
1766
|
"use strict";
|
|
1543
1767
|
|
|
1544
1768
|
|
|
1545
1769
|
var _toConsumableArray = __webpack_require__(8);
|
|
1770
|
+
|
|
1546
1771
|
var __rest = this && this.__rest || function (s, e) {
|
|
1547
1772
|
var t = {};
|
|
1773
|
+
|
|
1548
1774
|
for (var p in s) {
|
|
1549
1775
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
1550
1776
|
}
|
|
1777
|
+
|
|
1551
1778
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1552
1779
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
1553
1780
|
}
|
|
1554
1781
|
return t;
|
|
1555
1782
|
};
|
|
1783
|
+
|
|
1556
1784
|
Object.defineProperty(exports, "__esModule", {
|
|
1557
1785
|
value: true
|
|
1558
1786
|
});
|
|
1559
1787
|
exports.constructFieldsAndColumns = exports.toArrayForSeries = exports.isMultiSeriesData = exports.convertOverlayFields = exports.convertY2AxisOptions = exports.mapToValues = exports.truncateData = exports.getAnnotations = void 0;
|
|
1788
|
+
|
|
1560
1789
|
var lodash_1 = __webpack_require__(3);
|
|
1561
1790
|
/**
|
|
1562
1791
|
* Get formatted annotations
|
|
@@ -1567,10 +1796,12 @@ var lodash_1 = __webpack_require__(3);
|
|
|
1567
1796
|
* @param {Array} options.annotationLabel
|
|
1568
1797
|
* @returns {Array}
|
|
1569
1798
|
*/
|
|
1799
|
+
|
|
1800
|
+
|
|
1570
1801
|
var getAnnotations = function getAnnotations(_ref) {
|
|
1571
1802
|
var annotationX = _ref.annotationX,
|
|
1572
|
-
|
|
1573
|
-
|
|
1803
|
+
annotationColor = _ref.annotationColor,
|
|
1804
|
+
annotationLabel = _ref.annotationLabel;
|
|
1574
1805
|
return annotationX && annotationX.length ? annotationX.map(function (timestamp, i) {
|
|
1575
1806
|
return {
|
|
1576
1807
|
color: annotationColor && annotationColor[i],
|
|
@@ -1579,6 +1810,7 @@ var getAnnotations = function getAnnotations(_ref) {
|
|
|
1579
1810
|
};
|
|
1580
1811
|
}) : [];
|
|
1581
1812
|
};
|
|
1813
|
+
|
|
1582
1814
|
exports.getAnnotations = getAnnotations;
|
|
1583
1815
|
/**
|
|
1584
1816
|
* Truncate the result set to given limit
|
|
@@ -1587,20 +1819,25 @@ exports.getAnnotations = getAnnotations;
|
|
|
1587
1819
|
* @param {Number|String} truncationLimit - options['chart.resultTruncationLimit']
|
|
1588
1820
|
* @returns {Object}
|
|
1589
1821
|
*/
|
|
1822
|
+
|
|
1590
1823
|
var truncateData = function truncateData(dataSet, truncationLimit) {
|
|
1591
1824
|
if (!dataSet) {
|
|
1592
1825
|
return null;
|
|
1593
1826
|
}
|
|
1827
|
+
|
|
1594
1828
|
var limit = parseInt(truncationLimit, 10);
|
|
1829
|
+
|
|
1595
1830
|
if (!limit || limit <= 0) {
|
|
1596
1831
|
return dataSet;
|
|
1597
1832
|
}
|
|
1833
|
+
|
|
1598
1834
|
var truncatedData = Object.assign({}, dataSet);
|
|
1599
1835
|
truncatedData.columns = truncatedData.columns.map(function (columnData) {
|
|
1600
1836
|
return columnData && Array.isArray(columnData) ? columnData.slice(0, limit) : columnData;
|
|
1601
1837
|
});
|
|
1602
1838
|
return truncatedData;
|
|
1603
1839
|
};
|
|
1840
|
+
|
|
1604
1841
|
exports.truncateData = truncateData;
|
|
1605
1842
|
/**
|
|
1606
1843
|
* Helper method to update the option values into the values that SC accepts
|
|
@@ -1608,13 +1845,15 @@ exports.truncateData = truncateData;
|
|
|
1608
1845
|
* @param {Object} options
|
|
1609
1846
|
* @returns {Object}
|
|
1610
1847
|
*/
|
|
1848
|
+
|
|
1611
1849
|
var mapToValues = function mapToValues(optionValuesSCMapping) {
|
|
1612
1850
|
return function (options) {
|
|
1613
1851
|
var convertedOptions = Object.assign({}, options);
|
|
1614
1852
|
Object.keys(optionValuesSCMapping).forEach(function (key) {
|
|
1615
|
-
if (lodash_1.has(options, key)) {
|
|
1853
|
+
if ((0, lodash_1.has)(options, key)) {
|
|
1616
1854
|
var updatedValue = optionValuesSCMapping[key][options[key]];
|
|
1617
|
-
|
|
1855
|
+
|
|
1856
|
+
if (!(0, lodash_1.isUndefined)(updatedValue)) {
|
|
1618
1857
|
convertedOptions[key] = updatedValue;
|
|
1619
1858
|
}
|
|
1620
1859
|
}
|
|
@@ -1622,6 +1861,7 @@ var mapToValues = function mapToValues(optionValuesSCMapping) {
|
|
|
1622
1861
|
return convertedOptions;
|
|
1623
1862
|
};
|
|
1624
1863
|
};
|
|
1864
|
+
|
|
1625
1865
|
exports.mapToValues = mapToValues;
|
|
1626
1866
|
/**
|
|
1627
1867
|
* Helper method to process options related to y2Fields
|
|
@@ -1629,18 +1869,23 @@ exports.mapToValues = mapToValues;
|
|
|
1629
1869
|
* @param {Object} originalOptions
|
|
1630
1870
|
* @returns {Object}
|
|
1631
1871
|
*/
|
|
1872
|
+
|
|
1632
1873
|
var convertY2AxisOptions = function convertY2AxisOptions(_a) {
|
|
1633
1874
|
var y2Fields = _a.y2Fields,
|
|
1634
|
-
|
|
1875
|
+
originalOptions = __rest(_a, ["y2Fields"]);
|
|
1876
|
+
|
|
1635
1877
|
var convertedOptions = Object.assign({}, originalOptions);
|
|
1878
|
+
|
|
1636
1879
|
if (y2Fields) {
|
|
1637
1880
|
convertedOptions['axisY2.enabled'] = true;
|
|
1638
|
-
convertedOptions['axisY2.fields'] = lodash_1.isArray(y2Fields) ? y2Fields.filter(function (name) {
|
|
1881
|
+
convertedOptions['axisY2.fields'] = (0, lodash_1.isArray)(y2Fields) ? y2Fields.filter(function (name) {
|
|
1639
1882
|
return name;
|
|
1640
1883
|
}).join(',') : y2Fields;
|
|
1641
1884
|
}
|
|
1885
|
+
|
|
1642
1886
|
return convertedOptions;
|
|
1643
1887
|
};
|
|
1888
|
+
|
|
1644
1889
|
exports.convertY2AxisOptions = convertY2AxisOptions;
|
|
1645
1890
|
/**
|
|
1646
1891
|
* Helper method to format value for overlayFields
|
|
@@ -1648,9 +1893,11 @@ exports.convertY2AxisOptions = convertY2AxisOptions;
|
|
|
1648
1893
|
* @param {Object} originalOptions
|
|
1649
1894
|
* @returns {Object}
|
|
1650
1895
|
*/
|
|
1896
|
+
|
|
1651
1897
|
var convertOverlayFields = function convertOverlayFields(originalOptions) {
|
|
1652
1898
|
var convertedOptions = Object.assign({}, originalOptions);
|
|
1653
1899
|
var overlayFields = originalOptions.overlayFields;
|
|
1900
|
+
|
|
1654
1901
|
if (overlayFields) {
|
|
1655
1902
|
convertedOptions.overlayFields = Array.isArray(overlayFields) ? overlayFields.filter(function (field) {
|
|
1656
1903
|
return field;
|
|
@@ -1658,17 +1905,21 @@ var convertOverlayFields = function convertOverlayFields(originalOptions) {
|
|
|
1658
1905
|
return field.trim();
|
|
1659
1906
|
}).join(',') : overlayFields;
|
|
1660
1907
|
}
|
|
1908
|
+
|
|
1661
1909
|
return convertedOptions;
|
|
1662
1910
|
};
|
|
1911
|
+
|
|
1663
1912
|
exports.convertOverlayFields = convertOverlayFields;
|
|
1664
1913
|
/**
|
|
1665
1914
|
* checks whether data is multi series data
|
|
1666
1915
|
* @param {array} data array
|
|
1667
1916
|
* @return {Boolean}
|
|
1668
1917
|
*/
|
|
1918
|
+
|
|
1669
1919
|
var isMultiSeriesData = function isMultiSeriesData(data) {
|
|
1670
1920
|
return Array.isArray(data) && Array.isArray(data[0]);
|
|
1671
1921
|
};
|
|
1922
|
+
|
|
1672
1923
|
exports.isMultiSeriesData = isMultiSeriesData;
|
|
1673
1924
|
/**
|
|
1674
1925
|
* checks whether data is multi series data and returns value as array
|
|
@@ -1676,36 +1927,39 @@ exports.isMultiSeriesData = isMultiSeriesData;
|
|
|
1676
1927
|
* @param {*} value to return as array
|
|
1677
1928
|
* @return {array}
|
|
1678
1929
|
*/
|
|
1930
|
+
|
|
1679
1931
|
var toArrayForSeries = function toArrayForSeries(data, value) {
|
|
1680
|
-
return exports.isMultiSeriesData(data) ? value : [value];
|
|
1932
|
+
return (0, exports.isMultiSeriesData)(data) ? value : [value];
|
|
1681
1933
|
};
|
|
1934
|
+
|
|
1682
1935
|
exports.toArrayForSeries = toArrayForSeries;
|
|
1936
|
+
|
|
1683
1937
|
var constructFieldsAndColumns = function constructFieldsAndColumns(_ref2) {
|
|
1684
1938
|
var _ref2$x = _ref2.x,
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
var columns = [x.map(String)].concat(_toConsumableArray(exports.toArrayForSeries(y, y).map(function (series) {
|
|
1939
|
+
x = _ref2$x === void 0 ? [] : _ref2$x,
|
|
1940
|
+
_ref2$y = _ref2.y,
|
|
1941
|
+
y = _ref2$y === void 0 ? [] : _ref2$y,
|
|
1942
|
+
xField = _ref2.xField,
|
|
1943
|
+
yFields = _ref2.yFields,
|
|
1944
|
+
y2 = _ref2.y2,
|
|
1945
|
+
y2Fields = _ref2.y2Fields;
|
|
1946
|
+
var columns = [x.map(String)].concat(_toConsumableArray((0, exports.toArrayForSeries)(y, y).map(function (series) {
|
|
1693
1947
|
return series.map(String);
|
|
1694
1948
|
})));
|
|
1695
|
-
var yFieldsArray = exports.toArrayForSeries(y, yFields);
|
|
1949
|
+
var yFieldsArray = (0, exports.toArrayForSeries)(y, yFields);
|
|
1696
1950
|
var fields = [{
|
|
1697
1951
|
name: xField
|
|
1698
1952
|
}].concat(_toConsumableArray(yFieldsArray.map(function (field) {
|
|
1699
1953
|
return {
|
|
1700
1954
|
name: field
|
|
1701
1955
|
};
|
|
1702
|
-
})));
|
|
1703
|
-
// splunk-charting requires y2 to be part of columns
|
|
1956
|
+
}))); // splunk-charting requires y2 to be part of columns
|
|
1704
1957
|
// when y & y2 options are configured with different (mutually exclusive) series
|
|
1705
1958
|
// y2 columns need to be added to columns
|
|
1959
|
+
|
|
1706
1960
|
if (y2Fields) {
|
|
1707
|
-
var y2FieldsArray = exports.toArrayForSeries(y2, y2Fields);
|
|
1708
|
-
var y2AsArray = exports.toArrayForSeries(y2, y2).map(function (series) {
|
|
1961
|
+
var y2FieldsArray = (0, exports.toArrayForSeries)(y2, y2Fields);
|
|
1962
|
+
var y2AsArray = (0, exports.toArrayForSeries)(y2, y2).map(function (series) {
|
|
1709
1963
|
return series === null || series === void 0 ? void 0 : series.map(String);
|
|
1710
1964
|
});
|
|
1711
1965
|
y2FieldsArray.forEach(function (y2Field, index) {
|
|
@@ -1717,18 +1971,14 @@ var constructFieldsAndColumns = function constructFieldsAndColumns(_ref2) {
|
|
|
1717
1971
|
}
|
|
1718
1972
|
});
|
|
1719
1973
|
}
|
|
1974
|
+
|
|
1720
1975
|
return {
|
|
1721
1976
|
columns: columns,
|
|
1722
1977
|
fields: fields
|
|
1723
1978
|
};
|
|
1724
1979
|
};
|
|
1725
|
-
exports.constructFieldsAndColumns = constructFieldsAndColumns;
|
|
1726
|
-
|
|
1727
|
-
/***/ }),
|
|
1728
|
-
/* 56 */
|
|
1729
|
-
/***/ (function(module, exports) {
|
|
1730
1980
|
|
|
1731
|
-
|
|
1981
|
+
exports.constructFieldsAndColumns = constructFieldsAndColumns;
|
|
1732
1982
|
|
|
1733
1983
|
/***/ }),
|
|
1734
1984
|
/* 57 */
|
|
@@ -1743,7 +1993,8 @@ module.exports = require("@splunk/themes/useSplunkTheme");
|
|
|
1743
1993
|
/* 61 */,
|
|
1744
1994
|
/* 62 */,
|
|
1745
1995
|
/* 63 */,
|
|
1746
|
-
/* 64
|
|
1996
|
+
/* 64 */,
|
|
1997
|
+
/* 65 */
|
|
1747
1998
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1748
1999
|
|
|
1749
2000
|
"use strict";
|
|
@@ -1754,23 +2005,42 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1754
2005
|
});
|
|
1755
2006
|
exports.updateRowPayload = exports.canUpdateInPlace = exports.changedOptions = exports.NO_INPLACE_PROPS = void 0;
|
|
1756
2007
|
/* eslint-disable react/no-unused-prop-types */
|
|
2008
|
+
|
|
1757
2009
|
var lodash_1 = __webpack_require__(3);
|
|
2010
|
+
|
|
1758
2011
|
var i18n_1 = __webpack_require__(2);
|
|
2012
|
+
|
|
1759
2013
|
var visualization_color_palettes_1 = __webpack_require__(51);
|
|
2014
|
+
|
|
1760
2015
|
var react_1 = __webpack_require__(1);
|
|
2016
|
+
|
|
1761
2017
|
var React = __webpack_require__(1);
|
|
2018
|
+
|
|
1762
2019
|
var T = __webpack_require__(0);
|
|
1763
|
-
|
|
1764
|
-
__webpack_require__(66);
|
|
1765
|
-
|
|
1766
|
-
|
|
2020
|
+
|
|
2021
|
+
var react_event_listener_1 = __webpack_require__(66);
|
|
2022
|
+
|
|
2023
|
+
__webpack_require__(67); // fixme, @splunk/charting should be refactor to use locale & timezone instead of i18n functions
|
|
2024
|
+
|
|
2025
|
+
|
|
2026
|
+
var charting_bundle_1 = __webpack_require__(55);
|
|
2027
|
+
|
|
2028
|
+
var TimezoneContext_1 = __webpack_require__(26);
|
|
2029
|
+
|
|
1767
2030
|
var style_1 = __webpack_require__(14);
|
|
2031
|
+
|
|
1768
2032
|
var styled_components_1 = __webpack_require__(4);
|
|
2033
|
+
|
|
1769
2034
|
var Message_1 = __webpack_require__(10);
|
|
2035
|
+
|
|
1770
2036
|
var useSplunkTheme_1 = __webpack_require__(57);
|
|
1771
|
-
|
|
1772
|
-
var
|
|
2037
|
+
|
|
2038
|
+
var themeUtils_1 = __webpack_require__(68);
|
|
2039
|
+
|
|
2040
|
+
var ChartingApi_1 = __webpack_require__(69);
|
|
2041
|
+
|
|
1773
2042
|
exports.NO_INPLACE_PROPS = ['chart', 'chart.orientation', 'layout.splitSeries', 'chart.style', 'legend.placement'];
|
|
2043
|
+
|
|
1774
2044
|
var changedOptions = function changedOptions(curOptions, nextOptions) {
|
|
1775
2045
|
return Object.keys(curOptions).filter(function (key) {
|
|
1776
2046
|
return !(key in nextOptions);
|
|
@@ -1778,30 +2048,34 @@ var changedOptions = function changedOptions(curOptions, nextOptions) {
|
|
|
1778
2048
|
return !(key in curOptions) || curOptions[key] !== nextOptions[key];
|
|
1779
2049
|
}));
|
|
1780
2050
|
};
|
|
2051
|
+
|
|
1781
2052
|
exports.changedOptions = changedOptions;
|
|
1782
|
-
|
|
2053
|
+
|
|
1783
2054
|
function usePrevious(value) {
|
|
1784
|
-
var ref = react_1.useRef();
|
|
1785
|
-
react_1.useEffect(function () {
|
|
2055
|
+
var ref = (0, react_1.useRef)();
|
|
2056
|
+
(0, react_1.useEffect)(function () {
|
|
1786
2057
|
ref.current = value;
|
|
1787
2058
|
});
|
|
1788
2059
|
return ref.current;
|
|
1789
2060
|
}
|
|
2061
|
+
|
|
1790
2062
|
var canUpdateInPlace = function canUpdateInPlace(curOptions, nextOptions) {
|
|
1791
2063
|
// if either of the options are undefined
|
|
1792
2064
|
// it cannot update in place.
|
|
1793
2065
|
if (!curOptions || !nextOptions) {
|
|
1794
2066
|
return false;
|
|
1795
2067
|
}
|
|
2068
|
+
|
|
1796
2069
|
return !exports.NO_INPLACE_PROPS.some(function (p) {
|
|
1797
2070
|
return curOptions[p] !== nextOptions[p];
|
|
1798
|
-
}) && !exports.changedOptions(curOptions, nextOptions).some(function (p) {
|
|
2071
|
+
}) && !(0, exports.changedOptions)(curOptions, nextOptions).some(function (p) {
|
|
1799
2072
|
return p.toLowerCase().endsWith('color');
|
|
1800
2073
|
});
|
|
1801
2074
|
};
|
|
1802
|
-
|
|
1803
|
-
// create 'row' payloads from 'rowContext' in the flattened format:
|
|
2075
|
+
|
|
2076
|
+
exports.canUpdateInPlace = canUpdateInPlace; // create 'row' payloads from 'rowContext' in the flattened format:
|
|
1804
2077
|
// row.<fieldname>.value
|
|
2078
|
+
|
|
1805
2079
|
var updateRowPayload = function updateRowPayload(chartEventRowContext, payload) {
|
|
1806
2080
|
Object.keys(chartEventRowContext || {}).forEach(function (key) {
|
|
1807
2081
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -1809,18 +2083,21 @@ var updateRowPayload = function updateRowPayload(chartEventRowContext, payload)
|
|
|
1809
2083
|
});
|
|
1810
2084
|
return payload;
|
|
1811
2085
|
};
|
|
2086
|
+
|
|
1812
2087
|
exports.updateRowPayload = updateRowPayload;
|
|
1813
2088
|
var VizChartEventType;
|
|
2089
|
+
|
|
1814
2090
|
(function (VizChartEventType) {
|
|
1815
2091
|
VizChartEventType["POINT_CLICK"] = "point.click";
|
|
1816
2092
|
VizChartEventType["POINT_MOUSE_OUT"] = "point.mouseout";
|
|
1817
2093
|
VizChartEventType["POINT_MOUSE_OVER"] = "point.mouseover";
|
|
1818
2094
|
VizChartEventType["LEGEND_CLICK"] = "legend.click";
|
|
1819
|
-
})(VizChartEventType || (VizChartEventType = {}));
|
|
1820
|
-
// @TODO(pwied): remove after HC upgrade to 8+
|
|
2095
|
+
})(VizChartEventType || (VizChartEventType = {})); // @TODO(pwied): remove after HC upgrade to 8+
|
|
1821
2096
|
// .highcharts-a11y-proxy-container rule addresses a HighCharts < 8 bug
|
|
1822
2097
|
// caused by the accessibility plugin
|
|
1823
2098
|
// https://github.com/highcharts/highcharts/issues/12883
|
|
2099
|
+
|
|
2100
|
+
|
|
1824
2101
|
var ChartingContainer = styled_components_1.default.div.attrs(function (props) {
|
|
1825
2102
|
return {
|
|
1826
2103
|
'data-test': 'charting-container',
|
|
@@ -1831,7 +2108,7 @@ var ChartingContainer = styled_components_1.default.div.attrs(function (props) {
|
|
|
1831
2108
|
displayName: "Charting__ChartingContainer",
|
|
1832
2109
|
componentId: "sc-3wbgm0-0"
|
|
1833
2110
|
})(["& .highcharts-a11y-proxy-container{pointer-events:none;}overflow:hidden;position:relative;", ";"], function (props) {
|
|
1834
|
-
return style_1.toDimension(lodash_1.pick(props, ['width', 'height']));
|
|
2111
|
+
return (0, style_1.toDimension)((0, lodash_1.pick)(props, ['width', 'height']));
|
|
1835
2112
|
});
|
|
1836
2113
|
var propTypes = {
|
|
1837
2114
|
width: T.oneOfType([T.string, T.number]),
|
|
@@ -1848,13 +2125,15 @@ var propTypes = {
|
|
|
1848
2125
|
visualizationApiRef: T.func,
|
|
1849
2126
|
themeKey: T.string
|
|
1850
2127
|
};
|
|
2128
|
+
|
|
1851
2129
|
var Charting = function Charting(props) {
|
|
1852
|
-
var container = react_1.useRef(null);
|
|
1853
|
-
var needsInit = react_1.useRef(true);
|
|
1854
|
-
var chart = react_1.useRef();
|
|
1855
|
-
var needsRedraw = react_1.useRef(true);
|
|
1856
|
-
var api = react_1.useRef(new ChartingApi_1.ChartingApiFunctional(chart));
|
|
1857
|
-
var timezone = react_1.useContext(TimezoneContext_1.default);
|
|
2130
|
+
var container = (0, react_1.useRef)(null);
|
|
2131
|
+
var needsInit = (0, react_1.useRef)(true);
|
|
2132
|
+
var chart = (0, react_1.useRef)();
|
|
2133
|
+
var needsRedraw = (0, react_1.useRef)(true);
|
|
2134
|
+
var api = (0, react_1.useRef)(new ChartingApi_1.ChartingApiFunctional(chart));
|
|
2135
|
+
var timezone = (0, react_1.useContext)(TimezoneContext_1.default);
|
|
2136
|
+
|
|
1858
2137
|
var computeChartingSize = function computeChartingSize() {
|
|
1859
2138
|
if (container.current) {
|
|
1860
2139
|
var rect = container.current.getBoundingClientRect();
|
|
@@ -1863,91 +2142,103 @@ var Charting = function Charting(props) {
|
|
|
1863
2142
|
width: rect.width
|
|
1864
2143
|
};
|
|
1865
2144
|
}
|
|
2145
|
+
|
|
1866
2146
|
return {};
|
|
1867
2147
|
};
|
|
1868
|
-
|
|
1869
|
-
var
|
|
2148
|
+
|
|
2149
|
+
var splunkTheme = (0, useSplunkTheme_1.default)();
|
|
2150
|
+
var themeKey = props.themeKey ? props.themeKey : (0, themeUtils_1.getChartingThemeKey)({
|
|
1870
2151
|
splunkThemeV1: splunkTheme
|
|
1871
2152
|
});
|
|
1872
2153
|
var width = props.width,
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
2154
|
+
height = props.height,
|
|
2155
|
+
style = props.style,
|
|
2156
|
+
chartData = props.chartData,
|
|
2157
|
+
options = props.options,
|
|
2158
|
+
colorPalette = props.colorPalette,
|
|
2159
|
+
onClick = props.onClick,
|
|
2160
|
+
onSelect = props.onSelect,
|
|
2161
|
+
onPointMouseOut = props.onPointMouseOut,
|
|
2162
|
+
onPointMouseOver = props.onPointMouseOver,
|
|
2163
|
+
onEventTrigger = props.onEventTrigger;
|
|
1883
2164
|
var prevOptions = usePrevious(options);
|
|
1884
2165
|
var prevTimezone = usePrevious(timezone);
|
|
2166
|
+
|
|
1885
2167
|
var handleClick = function handleClick(chartEvent, type) {
|
|
1886
|
-
var payload = lodash_1.pick(chartEvent, 'name2', 'value2', '_span', 'modifierKey');
|
|
2168
|
+
var payload = (0, lodash_1.pick)(chartEvent, 'name2', 'value2', '_span', 'modifierKey');
|
|
1887
2169
|
payload.name = payload.name2;
|
|
1888
2170
|
delete payload.name2;
|
|
2171
|
+
|
|
1889
2172
|
if (type === VizChartEventType.POINT_CLICK) {
|
|
1890
2173
|
payload.value = payload.value2;
|
|
1891
2174
|
delete payload.value2;
|
|
1892
|
-
payload = exports.updateRowPayload(chartEvent.rowContext, payload);
|
|
2175
|
+
payload = (0, exports.updateRowPayload)(chartEvent.rowContext, payload);
|
|
1893
2176
|
}
|
|
2177
|
+
|
|
1894
2178
|
onClick({
|
|
1895
2179
|
type: type,
|
|
1896
2180
|
originalEvent: chartEvent,
|
|
1897
2181
|
payload: payload
|
|
1898
2182
|
});
|
|
1899
2183
|
};
|
|
2184
|
+
|
|
1900
2185
|
var destroyChart = function destroyChart() {
|
|
1901
2186
|
if (chart.current) {
|
|
1902
2187
|
chart.current.destroy();
|
|
1903
2188
|
chart.current = null;
|
|
1904
2189
|
}
|
|
2190
|
+
|
|
1905
2191
|
needsRedraw.current = true;
|
|
1906
2192
|
needsInit.current = true;
|
|
1907
2193
|
};
|
|
2194
|
+
|
|
1908
2195
|
var handleSelect = function handleSelect(chartEvent) {
|
|
1909
2196
|
// todo: need change this after breaking all visualizations
|
|
1910
2197
|
if (onSelect && typeof onSelect === 'function') {
|
|
1911
2198
|
onSelect({
|
|
1912
2199
|
type: 'range.select',
|
|
1913
2200
|
originalEvent: chartEvent,
|
|
1914
|
-
payload: lodash_1.pick(chartEvent, 'startXIndex', 'endXIndex', 'startXValue', 'endXValue')
|
|
2201
|
+
payload: (0, lodash_1.pick)(chartEvent, 'startXIndex', 'endXIndex', 'startXValue', 'endXValue')
|
|
1915
2202
|
});
|
|
1916
2203
|
return;
|
|
1917
|
-
}
|
|
1918
|
-
|
|
2204
|
+
} // the chartEvent here is a jQuery event
|
|
2205
|
+
|
|
2206
|
+
|
|
1919
2207
|
onEventTrigger({
|
|
1920
2208
|
type: 'range.select',
|
|
1921
2209
|
originalEvent: chartEvent,
|
|
1922
|
-
payload: lodash_1.pick(chartEvent, 'startXIndex', 'endXIndex', 'startXValue', 'endXValue')
|
|
2210
|
+
payload: (0, lodash_1.pick)(chartEvent, 'startXIndex', 'endXIndex', 'startXValue', 'endXValue')
|
|
1923
2211
|
});
|
|
1924
2212
|
};
|
|
2213
|
+
|
|
1925
2214
|
var handlePointMouseOut = function handlePointMouseOut(chartEvent, type) {
|
|
1926
|
-
var payload = lodash_1.pick(chartEvent, 'name2', 'value2', '_span', 'modifierKey', 'tooltipContext');
|
|
2215
|
+
var payload = (0, lodash_1.pick)(chartEvent, 'name2', 'value2', '_span', 'modifierKey', 'tooltipContext');
|
|
1927
2216
|
payload.name = payload.name2;
|
|
1928
2217
|
delete payload.name2;
|
|
1929
2218
|
payload.value = payload.value2;
|
|
1930
2219
|
delete payload.value2;
|
|
1931
|
-
payload = exports.updateRowPayload(chartEvent.rowContext, payload);
|
|
2220
|
+
payload = (0, exports.updateRowPayload)(chartEvent.rowContext, payload);
|
|
1932
2221
|
onPointMouseOut({
|
|
1933
2222
|
type: type,
|
|
1934
2223
|
originalEvent: chartEvent,
|
|
1935
2224
|
payload: payload
|
|
1936
2225
|
});
|
|
1937
2226
|
};
|
|
2227
|
+
|
|
1938
2228
|
var handlePointMouseOver = function handlePointMouseOver(chartEvent, type) {
|
|
1939
|
-
var payload = lodash_1.pick(chartEvent, 'name2', 'value2', '_span', 'modifierKey', 'tooltipContext');
|
|
2229
|
+
var payload = (0, lodash_1.pick)(chartEvent, 'name2', 'value2', '_span', 'modifierKey', 'tooltipContext');
|
|
1940
2230
|
payload.name = payload.name2;
|
|
1941
2231
|
delete payload.name2;
|
|
1942
2232
|
payload.value = payload.value2;
|
|
1943
2233
|
delete payload.value2;
|
|
1944
|
-
payload = exports.updateRowPayload(chartEvent.rowContext, payload);
|
|
2234
|
+
payload = (0, exports.updateRowPayload)(chartEvent.rowContext, payload);
|
|
1945
2235
|
onPointMouseOver({
|
|
1946
2236
|
type: type,
|
|
1947
2237
|
originalEvent: chartEvent,
|
|
1948
2238
|
payload: payload
|
|
1949
2239
|
});
|
|
1950
2240
|
};
|
|
2241
|
+
|
|
1951
2242
|
var drawChart = function drawChart() {
|
|
1952
2243
|
var updatedOptions = Object.assign(Object.assign({}, options), {
|
|
1953
2244
|
shouldColorizeTooltipData: false
|
|
@@ -1958,15 +2249,18 @@ var Charting = function Charting(props) {
|
|
|
1958
2249
|
var serializedTimezone = timezone === null || timezone === void 0 ? void 0 : timezone.serializedTimezone;
|
|
1959
2250
|
var ianaTimezone = timezone === null || timezone === void 0 ? void 0 : timezone.ianaTimezone;
|
|
1960
2251
|
var utcOffset = timezone === null || timezone === void 0 ? void 0 : timezone.utcOffset;
|
|
2252
|
+
|
|
1961
2253
|
if (!computedWidth || !computedHeight) {
|
|
1962
2254
|
return;
|
|
1963
2255
|
}
|
|
2256
|
+
|
|
1964
2257
|
if (!chartData || !Object.keys(chartData).length) {
|
|
1965
2258
|
return;
|
|
1966
|
-
}
|
|
1967
|
-
// splunk-charting layers configuration option updates.
|
|
2259
|
+
} // splunk-charting layers configuration option updates.
|
|
1968
2260
|
// when an option is removed it needs to be set to an empty string
|
|
1969
2261
|
// to override the previous configuration
|
|
2262
|
+
|
|
2263
|
+
|
|
1970
2264
|
if (prevOptions) {
|
|
1971
2265
|
Object.keys(prevOptions).forEach(function (key) {
|
|
1972
2266
|
if (updatedOptions[key] === undefined) {
|
|
@@ -1974,13 +2268,16 @@ var Charting = function Charting(props) {
|
|
|
1974
2268
|
}
|
|
1975
2269
|
});
|
|
1976
2270
|
}
|
|
2271
|
+
|
|
1977
2272
|
try {
|
|
1978
2273
|
if (needsInit.current) {
|
|
1979
2274
|
destroyChart();
|
|
1980
2275
|
charting_bundle_1.default.setTheme(themeKey);
|
|
2276
|
+
|
|
1981
2277
|
if (colorPalette.length > 0) {
|
|
1982
2278
|
charting_bundle_1.default.setColorPalette(colorPalette);
|
|
1983
2279
|
}
|
|
2280
|
+
|
|
1984
2281
|
chart.current = charting_bundle_1.default.createChart(container.current, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, updatedOptions), {
|
|
1985
2282
|
drilldown: 'all'
|
|
1986
2283
|
}), typeof serializedTimezone === 'string' && {
|
|
@@ -1989,8 +2286,8 @@ var Charting = function Charting(props) {
|
|
|
1989
2286
|
'time.ianaTimezone': ianaTimezone
|
|
1990
2287
|
}), typeof utcOffset === 'number' && {
|
|
1991
2288
|
'time.timezoneOffset': utcOffset
|
|
1992
|
-
}));
|
|
1993
|
-
|
|
2289
|
+
})); // bind event handlers
|
|
2290
|
+
|
|
1994
2291
|
chart.current.on('pointClick', function (e) {
|
|
1995
2292
|
handleClick(e, VizChartEventType.POINT_CLICK);
|
|
1996
2293
|
});
|
|
@@ -2005,32 +2302,40 @@ var Charting = function Charting(props) {
|
|
|
2005
2302
|
});
|
|
2006
2303
|
chart.current.on('chartRangeSelect', handleSelect);
|
|
2007
2304
|
}
|
|
2305
|
+
|
|
2008
2306
|
if (needsRedraw.current) {
|
|
2009
2307
|
charting_bundle_1.default.setTheme(themeKey);
|
|
2308
|
+
|
|
2010
2309
|
if (colorPalette.length > 0) {
|
|
2011
2310
|
charting_bundle_1.default.setColorPalette(colorPalette);
|
|
2012
2311
|
}
|
|
2312
|
+
|
|
2013
2313
|
chart.current.prepareAndDraw(chartData, updatedOptions, function () {});
|
|
2014
2314
|
}
|
|
2315
|
+
|
|
2015
2316
|
if (chart.current) {
|
|
2016
2317
|
if (Math.round(chart.current.height) !== Math.round(computedHeight) || Math.round(chart.current.width) !== Math.round(computedWidth)) {
|
|
2017
2318
|
chart.current.resize(computedWidth, computedHeight);
|
|
2018
2319
|
}
|
|
2019
2320
|
}
|
|
2321
|
+
|
|
2020
2322
|
needsInit.current = false;
|
|
2021
2323
|
needsRedraw.current = false;
|
|
2022
2324
|
} catch (e) {
|
|
2023
2325
|
window.console.error('Caught error rendering chart:', e);
|
|
2024
2326
|
}
|
|
2025
2327
|
};
|
|
2026
|
-
|
|
2328
|
+
|
|
2329
|
+
var debouncedDrawChart = (0, lodash_1.debounce)(drawChart, 5);
|
|
2330
|
+
|
|
2027
2331
|
var onContainerMount = function onContainerMount(chartingContainer) {
|
|
2028
2332
|
container.current = chartingContainer;
|
|
2029
2333
|
debouncedDrawChart();
|
|
2030
2334
|
};
|
|
2335
|
+
|
|
2031
2336
|
var prevTheme = usePrevious(themeKey);
|
|
2032
2337
|
var prevOnClick = usePrevious(onClick);
|
|
2033
|
-
react_1.useEffect(function () {
|
|
2338
|
+
(0, react_1.useEffect)(function () {
|
|
2034
2339
|
debouncedDrawChart();
|
|
2035
2340
|
props.visualizationApiRef(api.current);
|
|
2036
2341
|
return function () {
|
|
@@ -2038,17 +2343,17 @@ var Charting = function Charting(props) {
|
|
|
2038
2343
|
destroyChart();
|
|
2039
2344
|
};
|
|
2040
2345
|
}, []);
|
|
2041
|
-
react_1.useEffect(function () {
|
|
2346
|
+
(0, react_1.useEffect)(function () {
|
|
2042
2347
|
// TODO: figure out why re-init is needed for functional components (i.e. PlatformViz) when changing theme
|
|
2043
2348
|
// seems like redraw doesn't suffice to update the background colors
|
|
2044
|
-
if (!chart.current || !exports.canUpdateInPlace(prevOptions, options) ||
|
|
2045
|
-
// timezone is a simple object so this comparison should be fast
|
|
2349
|
+
if (!chart.current || !(0, exports.canUpdateInPlace)(prevOptions, options) || // timezone is a simple object so this comparison should be fast
|
|
2046
2350
|
JSON.stringify(prevTimezone) !== JSON.stringify(timezone) || !props.themeKey && prevTheme !== themeKey || prevOnClick !== onClick) {
|
|
2047
2351
|
needsInit.current = true;
|
|
2048
2352
|
}
|
|
2049
|
-
|
|
2050
|
-
// need to immediately call drawChart upon an option or chartData change
|
|
2353
|
+
|
|
2354
|
+
needsRedraw.current = true; // need to immediately call drawChart upon an option or chartData change
|
|
2051
2355
|
// otherwise a noop would occur if the onContainerMount drawChart is re-invoked when dimensions change
|
|
2356
|
+
|
|
2052
2357
|
drawChart();
|
|
2053
2358
|
}, [JSON.stringify(options), JSON.stringify(chartData.toJSON()), JSON.stringify(chartData.annotations), timezone === null || timezone === void 0 ? void 0 : timezone.ianaTimezone, timezone === null || timezone === void 0 ? void 0 : timezone.utcOffset, timezone === null || timezone === void 0 ? void 0 : timezone.serializedTimezone, themeKey, onClick]);
|
|
2054
2359
|
return React.createElement(ChartingContainer, {
|
|
@@ -2061,6 +2366,7 @@ var Charting = function Charting(props) {
|
|
|
2061
2366
|
onResize: debouncedDrawChart
|
|
2062
2367
|
}));
|
|
2063
2368
|
};
|
|
2369
|
+
|
|
2064
2370
|
var defaultProps = {
|
|
2065
2371
|
width: '100%',
|
|
2066
2372
|
height: 250,
|
|
@@ -2078,68 +2384,77 @@ var defaultProps = {
|
|
|
2078
2384
|
themeKey: null
|
|
2079
2385
|
};
|
|
2080
2386
|
Charting.propTypes = propTypes;
|
|
2081
|
-
Charting.defaultProps = defaultProps;
|
|
2082
|
-
|
|
2387
|
+
Charting.defaultProps = defaultProps; // allow for early return in case of empty chartData while still following hook rules
|
|
2388
|
+
|
|
2083
2389
|
var withEmptyChartMessage = function withEmptyChartMessage(Chart) {
|
|
2084
2390
|
var Wrapper = function Wrapper(props) {
|
|
2085
2391
|
var chartData = props.chartData;
|
|
2392
|
+
|
|
2086
2393
|
if (!chartData) {
|
|
2087
2394
|
return React.createElement(Message_1.default, {
|
|
2088
|
-
message: i18n_1._('No DataSource'),
|
|
2395
|
+
message: (0, i18n_1._)('No DataSource'),
|
|
2089
2396
|
level: "warning"
|
|
2090
2397
|
});
|
|
2091
2398
|
}
|
|
2399
|
+
|
|
2092
2400
|
if (chartData && !Object.keys(chartData).length) {
|
|
2093
2401
|
return React.createElement(Message_1.default, {
|
|
2094
|
-
message: i18n_1._('No Result'),
|
|
2402
|
+
message: (0, i18n_1._)('No Result'),
|
|
2095
2403
|
level: "info"
|
|
2096
2404
|
});
|
|
2097
2405
|
}
|
|
2406
|
+
|
|
2098
2407
|
return React.createElement(Chart, Object.assign({}, props));
|
|
2099
2408
|
};
|
|
2409
|
+
|
|
2100
2410
|
Wrapper.displayName = 'ChartingWrapper';
|
|
2101
2411
|
Wrapper.propTypes = propTypes;
|
|
2102
2412
|
Wrapper.defaultProps = defaultProps;
|
|
2103
2413
|
return Wrapper;
|
|
2104
|
-
};
|
|
2105
|
-
|
|
2414
|
+
}; // export default Charting;
|
|
2415
|
+
|
|
2416
|
+
|
|
2106
2417
|
exports.default = withEmptyChartMessage(Charting);
|
|
2107
2418
|
|
|
2108
2419
|
/***/ }),
|
|
2109
|
-
/*
|
|
2420
|
+
/* 66 */
|
|
2110
2421
|
/***/ (function(module, exports) {
|
|
2111
2422
|
|
|
2112
2423
|
module.exports = require("react-event-listener");
|
|
2113
2424
|
|
|
2114
2425
|
/***/ }),
|
|
2115
|
-
/*
|
|
2426
|
+
/* 67 */
|
|
2116
2427
|
/***/ (function(module, exports) {
|
|
2117
2428
|
|
|
2118
2429
|
module.exports = require("@splunk/visualizations-shared/i18n");
|
|
2119
2430
|
|
|
2120
2431
|
/***/ }),
|
|
2121
|
-
/*
|
|
2432
|
+
/* 68 */
|
|
2122
2433
|
/***/ (function(module, exports) {
|
|
2123
2434
|
|
|
2124
2435
|
module.exports = require("@splunk/visualizations-shared/themeUtils");
|
|
2125
2436
|
|
|
2126
2437
|
/***/ }),
|
|
2127
|
-
/*
|
|
2438
|
+
/* 69 */
|
|
2128
2439
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2129
2440
|
|
|
2130
2441
|
"use strict";
|
|
2131
2442
|
|
|
2132
2443
|
|
|
2133
2444
|
var _classCallCheck = __webpack_require__(9);
|
|
2445
|
+
|
|
2134
2446
|
var _createClass = __webpack_require__(18);
|
|
2447
|
+
|
|
2135
2448
|
Object.defineProperty(exports, "__esModule", {
|
|
2136
2449
|
value: true
|
|
2137
2450
|
});
|
|
2138
2451
|
exports.ChartingApiFunctional = void 0;
|
|
2452
|
+
|
|
2139
2453
|
var ChartingApiFunctional = /*#__PURE__*/function () {
|
|
2140
2454
|
// eslint-disable-next-line no-useless-constructor
|
|
2141
2455
|
function ChartingApiFunctional(chartRef) {
|
|
2142
2456
|
_classCallCheck(this, ChartingApiFunctional);
|
|
2457
|
+
|
|
2143
2458
|
this.chartRef = chartRef;
|
|
2144
2459
|
}
|
|
2145
2460
|
/**
|
|
@@ -2147,15 +2462,18 @@ var ChartingApiFunctional = /*#__PURE__*/function () {
|
|
|
2147
2462
|
*
|
|
2148
2463
|
* @memberof ChartingApiFunctional
|
|
2149
2464
|
*/
|
|
2465
|
+
|
|
2466
|
+
|
|
2150
2467
|
_createClass(ChartingApiFunctional, [{
|
|
2151
2468
|
key: "highlight",
|
|
2152
2469
|
value: function highlight() {
|
|
2153
2470
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2471
|
+
xValue: '',
|
|
2472
|
+
seriesName: ''
|
|
2473
|
+
},
|
|
2474
|
+
xValue = _ref.xValue,
|
|
2475
|
+
seriesName = _ref.seriesName;
|
|
2476
|
+
|
|
2159
2477
|
this.getChart().highlight(xValue, seriesName);
|
|
2160
2478
|
}
|
|
2161
2479
|
/**
|
|
@@ -2163,50 +2481,58 @@ var ChartingApiFunctional = /*#__PURE__*/function () {
|
|
|
2163
2481
|
*
|
|
2164
2482
|
* @memberof ChartingApiFunctional
|
|
2165
2483
|
*/
|
|
2484
|
+
|
|
2166
2485
|
}, {
|
|
2167
2486
|
key: "unHighlight",
|
|
2168
2487
|
value: function unHighlight() {
|
|
2169
2488
|
this.getChart().unHighlight();
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2489
|
+
} // returns chart object
|
|
2490
|
+
|
|
2172
2491
|
}, {
|
|
2173
2492
|
key: "getChart",
|
|
2174
2493
|
value: function getChart() {
|
|
2175
2494
|
var _a;
|
|
2495
|
+
|
|
2176
2496
|
return (_a = this.chartRef) === null || _a === void 0 ? void 0 : _a.current;
|
|
2177
2497
|
}
|
|
2178
2498
|
}]);
|
|
2499
|
+
|
|
2179
2500
|
return ChartingApiFunctional;
|
|
2180
2501
|
}();
|
|
2502
|
+
|
|
2181
2503
|
exports.ChartingApiFunctional = ChartingApiFunctional;
|
|
2182
2504
|
|
|
2183
2505
|
/***/ }),
|
|
2184
|
-
/*
|
|
2506
|
+
/* 70 */
|
|
2185
2507
|
/***/ (function(module, exports) {
|
|
2186
2508
|
|
|
2187
2509
|
module.exports = require("@splunk/visualizations-shared/simpleXMLOptions");
|
|
2188
2510
|
|
|
2189
2511
|
/***/ }),
|
|
2190
|
-
/* 70 */,
|
|
2191
2512
|
/* 71 */,
|
|
2192
2513
|
/* 72 */,
|
|
2193
|
-
/* 73
|
|
2514
|
+
/* 73 */,
|
|
2515
|
+
/* 74 */
|
|
2194
2516
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2195
2517
|
|
|
2196
2518
|
"use strict";
|
|
2197
2519
|
|
|
2198
2520
|
|
|
2199
2521
|
var _toConsumableArray = __webpack_require__(8);
|
|
2522
|
+
|
|
2200
2523
|
Object.defineProperty(exports, "__esModule", {
|
|
2201
2524
|
value: true
|
|
2202
2525
|
});
|
|
2203
2526
|
exports.AxesChartDataConfigAreaColumnLine = exports.AxesChartDataConfigBubble = exports.AxesChartDataConfigScatter = exports.AxesChartDataConfigBar = void 0;
|
|
2527
|
+
|
|
2204
2528
|
var i18n_1 = __webpack_require__(2);
|
|
2529
|
+
|
|
2205
2530
|
var configUtils_1 = __webpack_require__(20);
|
|
2531
|
+
|
|
2206
2532
|
var AxesChartDataConfig = {
|
|
2207
|
-
label: i18n_1._('Data configurations'),
|
|
2533
|
+
label: (0, i18n_1._)('Data configurations'),
|
|
2208
2534
|
layout: [[{
|
|
2209
|
-
label: i18n_1._('X'),
|
|
2535
|
+
label: (0, i18n_1._)('X'),
|
|
2210
2536
|
option: 'x',
|
|
2211
2537
|
editor: 'editor.columnSelector',
|
|
2212
2538
|
editorProps: {
|
|
@@ -2215,7 +2541,7 @@ var AxesChartDataConfig = {
|
|
|
2215
2541
|
expectedDataPrimitive: ['series']
|
|
2216
2542
|
}
|
|
2217
2543
|
}], [{
|
|
2218
|
-
label: i18n_1._('Y'),
|
|
2544
|
+
label: (0, i18n_1._)('Y'),
|
|
2219
2545
|
option: 'y',
|
|
2220
2546
|
editor: 'editor.columnMultiSelector',
|
|
2221
2547
|
editorProps: {
|
|
@@ -2225,7 +2551,7 @@ var AxesChartDataConfig = {
|
|
|
2225
2551
|
expectedDataPrimitive: ['series', 'frame']
|
|
2226
2552
|
}
|
|
2227
2553
|
}], [{
|
|
2228
|
-
label: i18n_1._('Result limit'),
|
|
2554
|
+
label: (0, i18n_1._)('Result limit'),
|
|
2229
2555
|
option: 'resultLimit',
|
|
2230
2556
|
editor: 'editor.number',
|
|
2231
2557
|
editorProps: {
|
|
@@ -2236,8 +2562,8 @@ var AxesChartDataConfig = {
|
|
|
2236
2562
|
exports.AxesChartDataConfigBar = {
|
|
2237
2563
|
label: AxesChartDataConfig.label,
|
|
2238
2564
|
// insert Y2 after Y
|
|
2239
|
-
layout: configUtils_1.insertLayout(AxesChartDataConfig.layout, 2, [{
|
|
2240
|
-
label: i18n_1._('Y2'),
|
|
2565
|
+
layout: (0, configUtils_1.insertLayout)(AxesChartDataConfig.layout, 2, [{
|
|
2566
|
+
label: (0, i18n_1._)('Y2'),
|
|
2241
2567
|
option: 'y2',
|
|
2242
2568
|
editor: 'editor.columnMultiSelector',
|
|
2243
2569
|
editorProps: {
|
|
@@ -2251,7 +2577,7 @@ exports.AxesChartDataConfigBar = {
|
|
|
2251
2577
|
exports.AxesChartDataConfigScatter = {
|
|
2252
2578
|
label: AxesChartDataConfig.label,
|
|
2253
2579
|
layout: [[{
|
|
2254
|
-
label: i18n_1._('X'),
|
|
2580
|
+
label: (0, i18n_1._)('X'),
|
|
2255
2581
|
option: 'x',
|
|
2256
2582
|
editor: 'editor.columnSelector',
|
|
2257
2583
|
editorProps: {
|
|
@@ -2260,7 +2586,7 @@ exports.AxesChartDataConfigScatter = {
|
|
|
2260
2586
|
expectedDataPrimitive: ['series']
|
|
2261
2587
|
}
|
|
2262
2588
|
}], [{
|
|
2263
|
-
label: i18n_1._('Y'),
|
|
2589
|
+
label: (0, i18n_1._)('Y'),
|
|
2264
2590
|
option: 'y',
|
|
2265
2591
|
editor: 'editor.columnSelector',
|
|
2266
2592
|
editorProps: {
|
|
@@ -2270,7 +2596,7 @@ exports.AxesChartDataConfigScatter = {
|
|
|
2270
2596
|
expectedDataPrimitive: ['series']
|
|
2271
2597
|
}
|
|
2272
2598
|
}], [{
|
|
2273
|
-
label: i18n_1._('Category'),
|
|
2599
|
+
label: (0, i18n_1._)('Category'),
|
|
2274
2600
|
option: 'category',
|
|
2275
2601
|
editor: 'editor.columnSelector',
|
|
2276
2602
|
editorProps: {
|
|
@@ -2279,7 +2605,7 @@ exports.AxesChartDataConfigScatter = {
|
|
|
2279
2605
|
expectedDataPrimitive: ['series']
|
|
2280
2606
|
}
|
|
2281
2607
|
}], [{
|
|
2282
|
-
label: i18n_1._('Result limit'),
|
|
2608
|
+
label: (0, i18n_1._)('Result limit'),
|
|
2283
2609
|
option: 'resultLimit',
|
|
2284
2610
|
editor: 'editor.number',
|
|
2285
2611
|
editorProps: {
|
|
@@ -2290,8 +2616,8 @@ exports.AxesChartDataConfigScatter = {
|
|
|
2290
2616
|
exports.AxesChartDataConfigBubble = {
|
|
2291
2617
|
label: exports.AxesChartDataConfigScatter.label,
|
|
2292
2618
|
// layout: insert Size after Category
|
|
2293
|
-
layout: configUtils_1.insertLayout(exports.AxesChartDataConfigScatter.layout, 3, [{
|
|
2294
|
-
label: i18n_1._('Size'),
|
|
2619
|
+
layout: (0, configUtils_1.insertLayout)(exports.AxesChartDataConfigScatter.layout, 3, [{
|
|
2620
|
+
label: (0, i18n_1._)('Size'),
|
|
2295
2621
|
option: 'size',
|
|
2296
2622
|
editor: 'editor.columnSelector',
|
|
2297
2623
|
editorProps: {
|
|
@@ -2304,7 +2630,7 @@ exports.AxesChartDataConfigBubble = {
|
|
|
2304
2630
|
exports.AxesChartDataConfigAreaColumnLine = {
|
|
2305
2631
|
label: exports.AxesChartDataConfigBar.label,
|
|
2306
2632
|
layout: [].concat(_toConsumableArray(exports.AxesChartDataConfigBar.layout), [[{
|
|
2307
|
-
label: i18n_1._('Annotation x'),
|
|
2633
|
+
label: (0, i18n_1._)('Annotation x'),
|
|
2308
2634
|
option: 'annotationX',
|
|
2309
2635
|
editor: 'editor.columnSelector',
|
|
2310
2636
|
editorProps: {
|
|
@@ -2313,7 +2639,7 @@ exports.AxesChartDataConfigAreaColumnLine = {
|
|
|
2313
2639
|
expectedDataPrimitive: ['series']
|
|
2314
2640
|
}
|
|
2315
2641
|
}], [{
|
|
2316
|
-
label: i18n_1._('Annotation labels'),
|
|
2642
|
+
label: (0, i18n_1._)('Annotation labels'),
|
|
2317
2643
|
option: 'annotationLabel',
|
|
2318
2644
|
editor: 'editor.columnSelector',
|
|
2319
2645
|
editorProps: {
|
|
@@ -2326,7 +2652,7 @@ exports.AxesChartDataConfigAreaColumnLine = {
|
|
|
2326
2652
|
exports.default = AxesChartDataConfig;
|
|
2327
2653
|
|
|
2328
2654
|
/***/ }),
|
|
2329
|
-
/*
|
|
2655
|
+
/* 75 */
|
|
2330
2656
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2331
2657
|
|
|
2332
2658
|
"use strict";
|
|
@@ -2335,13 +2661,18 @@ exports.default = AxesChartDataConfig;
|
|
|
2335
2661
|
Object.defineProperty(exports, "__esModule", {
|
|
2336
2662
|
value: true
|
|
2337
2663
|
});
|
|
2664
|
+
|
|
2338
2665
|
var i18n_1 = __webpack_require__(2);
|
|
2666
|
+
|
|
2339
2667
|
var pick_1 = __webpack_require__(23);
|
|
2668
|
+
|
|
2340
2669
|
var variables_1 = __webpack_require__(11);
|
|
2670
|
+
|
|
2341
2671
|
var BackgroundColor_1 = __webpack_require__(53);
|
|
2672
|
+
|
|
2342
2673
|
var themes = {
|
|
2343
2674
|
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
2344
|
-
return pick_1.default({
|
|
2675
|
+
return (0, pick_1.default)({
|
|
2345
2676
|
enterprise: {
|
|
2346
2677
|
dark: variables_1.default.black(props),
|
|
2347
2678
|
light: variables_1.default.backgroundColor(props)
|
|
@@ -2351,15 +2682,15 @@ var themes = {
|
|
|
2351
2682
|
}
|
|
2352
2683
|
};
|
|
2353
2684
|
var AxesChartColorAndStyle = {
|
|
2354
|
-
label: i18n_1._('Color and style'),
|
|
2355
|
-
layout: [BackgroundColor_1.default({
|
|
2685
|
+
label: (0, i18n_1._)('Color and style'),
|
|
2686
|
+
layout: [(0, BackgroundColor_1.default)({
|
|
2356
2687
|
themes: themes
|
|
2357
2688
|
}), [{
|
|
2358
|
-
label: i18n_1._('Series colors'),
|
|
2689
|
+
label: (0, i18n_1._)('Series colors'),
|
|
2359
2690
|
option: 'seriesColors',
|
|
2360
2691
|
editor: 'editor.seriesColors'
|
|
2361
2692
|
}], [{
|
|
2362
|
-
label: i18n_1._('Series colors by field name'),
|
|
2693
|
+
label: (0, i18n_1._)('Series colors by field name'),
|
|
2363
2694
|
option: 'seriesColorsByField',
|
|
2364
2695
|
editor: 'editor.seriesColorsByField'
|
|
2365
2696
|
}]]
|
|
@@ -2367,7 +2698,7 @@ var AxesChartColorAndStyle = {
|
|
|
2367
2698
|
exports.default = AxesChartColorAndStyle;
|
|
2368
2699
|
|
|
2369
2700
|
/***/ }),
|
|
2370
|
-
/*
|
|
2701
|
+
/* 76 */
|
|
2371
2702
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2372
2703
|
|
|
2373
2704
|
"use strict";
|
|
@@ -2376,47 +2707,49 @@ exports.default = AxesChartColorAndStyle;
|
|
|
2376
2707
|
Object.defineProperty(exports, "__esModule", {
|
|
2377
2708
|
value: true
|
|
2378
2709
|
});
|
|
2710
|
+
|
|
2379
2711
|
var i18n_1 = __webpack_require__(2);
|
|
2712
|
+
|
|
2380
2713
|
var AxesChartLegend = {
|
|
2381
|
-
label: i18n_1._('Legend'),
|
|
2714
|
+
label: (0, i18n_1._)('Legend'),
|
|
2382
2715
|
layout: [[{
|
|
2383
|
-
label: i18n_1._('Legend display'),
|
|
2716
|
+
label: (0, i18n_1._)('Legend display'),
|
|
2384
2717
|
option: 'legendDisplay',
|
|
2385
2718
|
editor: 'editor.select',
|
|
2386
2719
|
editorProps: {
|
|
2387
2720
|
values: [{
|
|
2388
|
-
label: i18n_1._('Right'),
|
|
2721
|
+
label: (0, i18n_1._)('Right'),
|
|
2389
2722
|
value: 'right'
|
|
2390
2723
|
}, {
|
|
2391
|
-
label: i18n_1._('Left'),
|
|
2724
|
+
label: (0, i18n_1._)('Left'),
|
|
2392
2725
|
value: 'left'
|
|
2393
2726
|
}, {
|
|
2394
|
-
label: i18n_1._('Top'),
|
|
2727
|
+
label: (0, i18n_1._)('Top'),
|
|
2395
2728
|
value: 'top'
|
|
2396
2729
|
}, {
|
|
2397
|
-
label: i18n_1._('Bottom'),
|
|
2730
|
+
label: (0, i18n_1._)('Bottom'),
|
|
2398
2731
|
value: 'bottom'
|
|
2399
2732
|
}, {
|
|
2400
|
-
label: i18n_1._('Off'),
|
|
2733
|
+
label: (0, i18n_1._)('Off'),
|
|
2401
2734
|
value: 'off'
|
|
2402
2735
|
}]
|
|
2403
2736
|
}
|
|
2404
2737
|
}], [{
|
|
2405
|
-
label: i18n_1._('Legend truncation'),
|
|
2738
|
+
label: (0, i18n_1._)('Legend truncation'),
|
|
2406
2739
|
option: 'legendTruncation',
|
|
2407
2740
|
editor: 'editor.radioBar',
|
|
2408
2741
|
editorProps: {
|
|
2409
2742
|
values: [{
|
|
2410
|
-
label: i18n_1._('A...'),
|
|
2743
|
+
label: (0, i18n_1._)('A...'),
|
|
2411
2744
|
value: 'ellipsisEnd'
|
|
2412
2745
|
}, {
|
|
2413
|
-
label: i18n_1._('A...Z'),
|
|
2746
|
+
label: (0, i18n_1._)('A...Z'),
|
|
2414
2747
|
value: 'ellipsisMiddle'
|
|
2415
2748
|
}, {
|
|
2416
|
-
label: i18n_1._('...Z'),
|
|
2749
|
+
label: (0, i18n_1._)('...Z'),
|
|
2417
2750
|
value: 'ellipsisStart'
|
|
2418
2751
|
}, {
|
|
2419
|
-
label: i18n_1._('Off'),
|
|
2752
|
+
label: (0, i18n_1._)('Off'),
|
|
2420
2753
|
value: 'ellipsisOff'
|
|
2421
2754
|
}]
|
|
2422
2755
|
},
|
|
@@ -2429,27 +2762,31 @@ var AxesChartLegend = {
|
|
|
2429
2762
|
exports.default = AxesChartLegend;
|
|
2430
2763
|
|
|
2431
2764
|
/***/ }),
|
|
2432
|
-
/*
|
|
2765
|
+
/* 77 */
|
|
2433
2766
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2434
2767
|
|
|
2435
2768
|
"use strict";
|
|
2436
2769
|
|
|
2437
2770
|
|
|
2438
2771
|
var _toConsumableArray = __webpack_require__(8);
|
|
2772
|
+
|
|
2439
2773
|
Object.defineProperty(exports, "__esModule", {
|
|
2440
2774
|
value: true
|
|
2441
2775
|
});
|
|
2442
2776
|
exports.AxesChartXGridAndLabelsBubbleScatter = exports.AxesChartXGridAndLabelsCommon = void 0;
|
|
2777
|
+
|
|
2443
2778
|
var i18n_1 = __webpack_require__(2);
|
|
2779
|
+
|
|
2444
2780
|
var configUtils_1 = __webpack_require__(20);
|
|
2781
|
+
|
|
2445
2782
|
exports.AxesChartXGridAndLabelsCommon = {
|
|
2446
|
-
label: i18n_1._('X-axis grid and labels'),
|
|
2783
|
+
label: (0, i18n_1._)('X-axis grid and labels'),
|
|
2447
2784
|
layout: [[{
|
|
2448
|
-
label: i18n_1._('Axis title'),
|
|
2785
|
+
label: (0, i18n_1._)('Axis title'),
|
|
2449
2786
|
option: 'xAxisTitleVisibility',
|
|
2450
2787
|
editor: 'editor.toggle'
|
|
2451
2788
|
}], [{
|
|
2452
|
-
label: i18n_1._('Axis title text'),
|
|
2789
|
+
label: (0, i18n_1._)('Axis title text'),
|
|
2453
2790
|
option: 'xAxisTitleText',
|
|
2454
2791
|
editor: 'editor.text',
|
|
2455
2792
|
showEditor: function showEditor(_ref) {
|
|
@@ -2457,18 +2794,18 @@ exports.AxesChartXGridAndLabelsCommon = {
|
|
|
2457
2794
|
return options.xAxisTitleVisibility === 'show' || options.xAxisTitleVisibility === undefined;
|
|
2458
2795
|
}
|
|
2459
2796
|
}], [{
|
|
2460
|
-
label: i18n_1._('Label visibility'),
|
|
2797
|
+
label: (0, i18n_1._)('Label visibility'),
|
|
2461
2798
|
option: 'xAxisLabelVisibility',
|
|
2462
2799
|
editor: 'editor.radioBar',
|
|
2463
2800
|
editorProps: {
|
|
2464
2801
|
values: [{
|
|
2465
|
-
label: i18n_1._('Auto'),
|
|
2802
|
+
label: (0, i18n_1._)('Auto'),
|
|
2466
2803
|
value: 'auto'
|
|
2467
2804
|
}, {
|
|
2468
|
-
label: i18n_1._('Show'),
|
|
2805
|
+
label: (0, i18n_1._)('Show'),
|
|
2469
2806
|
value: 'show'
|
|
2470
2807
|
}, {
|
|
2471
|
-
label: i18n_1._('Hide'),
|
|
2808
|
+
label: (0, i18n_1._)('Hide'),
|
|
2472
2809
|
value: 'hide'
|
|
2473
2810
|
}]
|
|
2474
2811
|
}
|
|
@@ -2477,24 +2814,24 @@ exports.AxesChartXGridAndLabelsCommon = {
|
|
|
2477
2814
|
var AxesChartXGridAndLabels = {
|
|
2478
2815
|
label: exports.AxesChartXGridAndLabelsCommon.label,
|
|
2479
2816
|
layout: [].concat(_toConsumableArray(exports.AxesChartXGridAndLabelsCommon.layout), [[{
|
|
2480
|
-
label: i18n_1._('Label rotation'),
|
|
2817
|
+
label: (0, i18n_1._)('Label rotation'),
|
|
2481
2818
|
option: 'xAxisLabelRotation',
|
|
2482
2819
|
editor: 'editor.select',
|
|
2483
2820
|
editorProps: {
|
|
2484
2821
|
values: [{
|
|
2485
|
-
label: i18n_1._('-90'),
|
|
2822
|
+
label: (0, i18n_1._)('-90'),
|
|
2486
2823
|
value: -90
|
|
2487
2824
|
}, {
|
|
2488
|
-
label: i18n_1._('-45'),
|
|
2825
|
+
label: (0, i18n_1._)('-45'),
|
|
2489
2826
|
value: -45
|
|
2490
2827
|
}, {
|
|
2491
|
-
label: i18n_1._('0'),
|
|
2828
|
+
label: (0, i18n_1._)('0'),
|
|
2492
2829
|
value: 0
|
|
2493
2830
|
}, {
|
|
2494
|
-
label: i18n_1._('45'),
|
|
2831
|
+
label: (0, i18n_1._)('45'),
|
|
2495
2832
|
value: 45
|
|
2496
2833
|
}, {
|
|
2497
|
-
label: i18n_1._('90'),
|
|
2834
|
+
label: (0, i18n_1._)('90'),
|
|
2498
2835
|
value: 90
|
|
2499
2836
|
}]
|
|
2500
2837
|
},
|
|
@@ -2503,7 +2840,7 @@ var AxesChartXGridAndLabels = {
|
|
|
2503
2840
|
return options.xAxisLabelVisibility === 'show' || options.xAxisLabelVisibility === 'auto' || options.xAxisLabelVisibility === undefined;
|
|
2504
2841
|
}
|
|
2505
2842
|
}], [{
|
|
2506
|
-
label: i18n_1._('Number of time label parts'),
|
|
2843
|
+
label: (0, i18n_1._)('Number of time label parts'),
|
|
2507
2844
|
option: 'xAxisMaxLabelParts',
|
|
2508
2845
|
editor: 'editor.number',
|
|
2509
2846
|
editorProps: {
|
|
@@ -2515,31 +2852,31 @@ var AxesChartXGridAndLabels = {
|
|
|
2515
2852
|
return options.xAxisLabelVisibility === 'show' || options.xAxisLabelVisibility === 'auto' || options.xAxisLabelVisibility === undefined;
|
|
2516
2853
|
}
|
|
2517
2854
|
}], [{
|
|
2518
|
-
label: i18n_1._('Axis line visibility'),
|
|
2855
|
+
label: (0, i18n_1._)('Axis line visibility'),
|
|
2519
2856
|
option: 'xAxisLineVisibility',
|
|
2520
2857
|
editor: 'editor.checkbox'
|
|
2521
2858
|
}], [{
|
|
2522
|
-
label: i18n_1._('Major gridlines'),
|
|
2859
|
+
label: (0, i18n_1._)('Major gridlines'),
|
|
2523
2860
|
option: 'showXMajorGridLines',
|
|
2524
2861
|
editor: 'editor.checkbox'
|
|
2525
2862
|
}], [{
|
|
2526
|
-
label: i18n_1._('Major tick visibility'),
|
|
2863
|
+
label: (0, i18n_1._)('Major tick visibility'),
|
|
2527
2864
|
option: 'xAxisMajorTickVisibility',
|
|
2528
2865
|
editor: 'editor.radioBar',
|
|
2529
2866
|
editorProps: {
|
|
2530
2867
|
values: [{
|
|
2531
|
-
label: i18n_1._('Auto'),
|
|
2868
|
+
label: (0, i18n_1._)('Auto'),
|
|
2532
2869
|
value: 'auto'
|
|
2533
2870
|
}, {
|
|
2534
|
-
label: i18n_1._('Show'),
|
|
2871
|
+
label: (0, i18n_1._)('Show'),
|
|
2535
2872
|
value: 'show'
|
|
2536
2873
|
}, {
|
|
2537
|
-
label: i18n_1._('Hide'),
|
|
2874
|
+
label: (0, i18n_1._)('Hide'),
|
|
2538
2875
|
value: 'hide'
|
|
2539
2876
|
}]
|
|
2540
2877
|
}
|
|
2541
2878
|
}], [{
|
|
2542
|
-
label: i18n_1._('Major tick size (px)'),
|
|
2879
|
+
label: (0, i18n_1._)('Major tick size (px)'),
|
|
2543
2880
|
option: 'xAxisMajorTickSize',
|
|
2544
2881
|
editor: 'editor.slider',
|
|
2545
2882
|
editorProps: {
|
|
@@ -2555,38 +2892,38 @@ var AxesChartXGridAndLabels = {
|
|
|
2555
2892
|
};
|
|
2556
2893
|
exports.AxesChartXGridAndLabelsBubbleScatter = {
|
|
2557
2894
|
label: exports.AxesChartXGridAndLabelsCommon.label,
|
|
2558
|
-
layout: [].concat(_toConsumableArray(configUtils_1.insertLayout(exports.AxesChartXGridAndLabelsCommon.layout, 2, [{
|
|
2559
|
-
label: i18n_1._('Axis scale'),
|
|
2895
|
+
layout: [].concat(_toConsumableArray((0, configUtils_1.insertLayout)(exports.AxesChartXGridAndLabelsCommon.layout, 2, [{
|
|
2896
|
+
label: (0, i18n_1._)('Axis scale'),
|
|
2560
2897
|
option: 'xAxisScale',
|
|
2561
2898
|
editor: 'editor.radioBar',
|
|
2562
2899
|
editorProps: {
|
|
2563
2900
|
values: [{
|
|
2564
|
-
label: i18n_1._('Linear'),
|
|
2901
|
+
label: (0, i18n_1._)('Linear'),
|
|
2565
2902
|
value: 'linear'
|
|
2566
2903
|
}, {
|
|
2567
|
-
label: i18n_1._('Log'),
|
|
2904
|
+
label: (0, i18n_1._)('Log'),
|
|
2568
2905
|
value: 'log'
|
|
2569
2906
|
}]
|
|
2570
2907
|
}
|
|
2571
2908
|
}])), [[{
|
|
2572
|
-
label: i18n_1._('Label rotation'),
|
|
2909
|
+
label: (0, i18n_1._)('Label rotation'),
|
|
2573
2910
|
option: 'xAxisLabelRotation',
|
|
2574
2911
|
editor: 'editor.select',
|
|
2575
2912
|
editorProps: {
|
|
2576
2913
|
values: [{
|
|
2577
|
-
label: i18n_1._('-90'),
|
|
2914
|
+
label: (0, i18n_1._)('-90'),
|
|
2578
2915
|
value: -90
|
|
2579
2916
|
}, {
|
|
2580
|
-
label: i18n_1._('-45'),
|
|
2917
|
+
label: (0, i18n_1._)('-45'),
|
|
2581
2918
|
value: -45
|
|
2582
2919
|
}, {
|
|
2583
|
-
label: i18n_1._('0'),
|
|
2920
|
+
label: (0, i18n_1._)('0'),
|
|
2584
2921
|
value: 0
|
|
2585
2922
|
}, {
|
|
2586
|
-
label: i18n_1._('45'),
|
|
2923
|
+
label: (0, i18n_1._)('45'),
|
|
2587
2924
|
value: 45
|
|
2588
2925
|
}, {
|
|
2589
|
-
label: i18n_1._('90'),
|
|
2926
|
+
label: (0, i18n_1._)('90'),
|
|
2590
2927
|
value: 90
|
|
2591
2928
|
}]
|
|
2592
2929
|
},
|
|
@@ -2595,7 +2932,7 @@ exports.AxesChartXGridAndLabelsBubbleScatter = {
|
|
|
2595
2932
|
return options.xAxisLabelVisibility === 'show' || options.xAxisLabelVisibility === 'auto' || options.xAxisLabelVisibility === undefined;
|
|
2596
2933
|
}
|
|
2597
2934
|
}], [{
|
|
2598
|
-
label: i18n_1._('Round axis labels'),
|
|
2935
|
+
label: (0, i18n_1._)('Round axis labels'),
|
|
2599
2936
|
option: 'showRoundedXAxisLabels',
|
|
2600
2937
|
editor: 'editor.checkbox',
|
|
2601
2938
|
showEditor: function showEditor(_ref6) {
|
|
@@ -2603,7 +2940,7 @@ exports.AxesChartXGridAndLabelsBubbleScatter = {
|
|
|
2603
2940
|
return options.xAxisLabelVisibility === 'show' || options.xAxisLabelVisibility === 'auto' || options.xAxisLabelVisibility === undefined;
|
|
2604
2941
|
}
|
|
2605
2942
|
}], [{
|
|
2606
|
-
label: i18n_1._('SI prefix abbreviation for labels'),
|
|
2943
|
+
label: (0, i18n_1._)('SI prefix abbreviation for labels'),
|
|
2607
2944
|
option: 'xAxisAbbreviation',
|
|
2608
2945
|
editor: 'editor.checkbox',
|
|
2609
2946
|
showEditor: function showEditor(_ref7) {
|
|
@@ -2611,27 +2948,26 @@ exports.AxesChartXGridAndLabelsBubbleScatter = {
|
|
|
2611
2948
|
return options.xAxisLabelVisibility === 'show' || options.xAxisLabelVisibility === 'auto' || options.xAxisLabelVisibility === undefined;
|
|
2612
2949
|
}
|
|
2613
2950
|
}], [{
|
|
2614
|
-
label: i18n_1._('Include zero'),
|
|
2951
|
+
label: (0, i18n_1._)('Include zero'),
|
|
2615
2952
|
option: 'showXAxisWithZero',
|
|
2616
2953
|
editor: 'editor.checkbox'
|
|
2617
2954
|
}], [{
|
|
2618
|
-
label: i18n_1._('Extend to whole grid'),
|
|
2955
|
+
label: (0, i18n_1._)('Extend to whole grid'),
|
|
2619
2956
|
option: 'showXAxisExtendedRange',
|
|
2620
2957
|
editor: 'editor.checkbox'
|
|
2621
2958
|
}], [{
|
|
2622
|
-
label: i18n_1._('Minimum axis value'),
|
|
2959
|
+
label: (0, i18n_1._)('Minimum axis value'),
|
|
2623
2960
|
option: 'xAxisMin',
|
|
2624
2961
|
editor: 'editor.number'
|
|
2625
2962
|
}, {
|
|
2626
|
-
label: i18n_1._('Maximum axis value'),
|
|
2963
|
+
label: (0, i18n_1._)('Maximum axis value'),
|
|
2627
2964
|
option: 'xAxisMax',
|
|
2628
2965
|
editor: 'editor.number'
|
|
2629
2966
|
}], [{
|
|
2630
|
-
label: i18n_1._('Axis line visibility'),
|
|
2967
|
+
label: (0, i18n_1._)('Axis line visibility'),
|
|
2631
2968
|
option: 'xAxisLineVisibility',
|
|
2632
2969
|
editor: 'editor.checkbox'
|
|
2633
|
-
}],
|
|
2634
|
-
// this option is disabled for bubble and scatter
|
|
2970
|
+
}], // this option is disabled for bubble and scatter
|
|
2635
2971
|
// [
|
|
2636
2972
|
// {
|
|
2637
2973
|
// label: _('Major gridlines'),
|
|
@@ -2640,23 +2976,23 @@ exports.AxesChartXGridAndLabelsBubbleScatter = {
|
|
|
2640
2976
|
// },
|
|
2641
2977
|
// ],
|
|
2642
2978
|
[{
|
|
2643
|
-
label: i18n_1._('Major tick visibility'),
|
|
2979
|
+
label: (0, i18n_1._)('Major tick visibility'),
|
|
2644
2980
|
option: 'xAxisMajorTickVisibility',
|
|
2645
2981
|
editor: 'editor.radioBar',
|
|
2646
2982
|
editorProps: {
|
|
2647
2983
|
values: [{
|
|
2648
|
-
label: i18n_1._('Auto'),
|
|
2984
|
+
label: (0, i18n_1._)('Auto'),
|
|
2649
2985
|
value: 'auto'
|
|
2650
2986
|
}, {
|
|
2651
|
-
label: i18n_1._('Show'),
|
|
2987
|
+
label: (0, i18n_1._)('Show'),
|
|
2652
2988
|
value: 'show'
|
|
2653
2989
|
}, {
|
|
2654
|
-
label: i18n_1._('Hide'),
|
|
2990
|
+
label: (0, i18n_1._)('Hide'),
|
|
2655
2991
|
value: 'hide'
|
|
2656
2992
|
}]
|
|
2657
2993
|
}
|
|
2658
2994
|
}], [{
|
|
2659
|
-
label: i18n_1._('Major tick size (px)'),
|
|
2995
|
+
label: (0, i18n_1._)('Major tick size (px)'),
|
|
2660
2996
|
option: 'xAxisMajorTickSize',
|
|
2661
2997
|
editor: 'editor.slider',
|
|
2662
2998
|
editorProps: {
|
|
@@ -2669,7 +3005,7 @@ exports.AxesChartXGridAndLabelsBubbleScatter = {
|
|
|
2669
3005
|
return options.xAxisMajorTickVisibility === 'show' || options.xAxisMajorTickVisibility === 'auto' || options.xAxisMajorTickVisibility === undefined;
|
|
2670
3006
|
}
|
|
2671
3007
|
}], [{
|
|
2672
|
-
label: i18n_1._('Major tick interval spacing'),
|
|
3008
|
+
label: (0, i18n_1._)('Major tick interval spacing'),
|
|
2673
3009
|
option: 'xAxisMajorTickInterval',
|
|
2674
3010
|
editor: 'editor.number',
|
|
2675
3011
|
showEditor: function showEditor(_ref9) {
|
|
@@ -2677,27 +3013,27 @@ exports.AxesChartXGridAndLabelsBubbleScatter = {
|
|
|
2677
3013
|
return options.xAxisMajorTickVisibility === 'show' || options.xAxisMajorTickVisibility === 'auto' || options.xAxisMajorTickVisibility === undefined;
|
|
2678
3014
|
}
|
|
2679
3015
|
}], [{
|
|
2680
|
-
label: i18n_1._('Minor gridlines'),
|
|
3016
|
+
label: (0, i18n_1._)('Minor gridlines'),
|
|
2681
3017
|
option: 'showXMinorGridLines',
|
|
2682
3018
|
editor: 'editor.checkbox'
|
|
2683
3019
|
}], [{
|
|
2684
|
-
label: i18n_1._('Minor tick visibility'),
|
|
3020
|
+
label: (0, i18n_1._)('Minor tick visibility'),
|
|
2685
3021
|
option: 'xAxisMinorTickVisibility',
|
|
2686
3022
|
editor: 'editor.radioBar',
|
|
2687
3023
|
editorProps: {
|
|
2688
3024
|
values: [{
|
|
2689
|
-
label: i18n_1._('Auto'),
|
|
3025
|
+
label: (0, i18n_1._)('Auto'),
|
|
2690
3026
|
value: 'auto'
|
|
2691
3027
|
}, {
|
|
2692
|
-
label: i18n_1._('Show'),
|
|
3028
|
+
label: (0, i18n_1._)('Show'),
|
|
2693
3029
|
value: 'show'
|
|
2694
3030
|
}, {
|
|
2695
|
-
label: i18n_1._('Hide'),
|
|
3031
|
+
label: (0, i18n_1._)('Hide'),
|
|
2696
3032
|
value: 'hide'
|
|
2697
3033
|
}]
|
|
2698
3034
|
}
|
|
2699
3035
|
}], [{
|
|
2700
|
-
label: i18n_1._('Minor tick size (px)'),
|
|
3036
|
+
label: (0, i18n_1._)('Minor tick size (px)'),
|
|
2701
3037
|
option: 'xAxisMinorTickSize',
|
|
2702
3038
|
editor: 'editor.slider',
|
|
2703
3039
|
editorProps: {
|
|
@@ -2714,7 +3050,7 @@ exports.AxesChartXGridAndLabelsBubbleScatter = {
|
|
|
2714
3050
|
exports.default = AxesChartXGridAndLabels;
|
|
2715
3051
|
|
|
2716
3052
|
/***/ }),
|
|
2717
|
-
/*
|
|
3053
|
+
/* 78 */
|
|
2718
3054
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2719
3055
|
|
|
2720
3056
|
"use strict";
|
|
@@ -2723,15 +3059,17 @@ exports.default = AxesChartXGridAndLabels;
|
|
|
2723
3059
|
Object.defineProperty(exports, "__esModule", {
|
|
2724
3060
|
value: true
|
|
2725
3061
|
});
|
|
3062
|
+
|
|
2726
3063
|
var i18n_1 = __webpack_require__(2);
|
|
3064
|
+
|
|
2727
3065
|
var AxesChartYGridAndLabels = {
|
|
2728
|
-
label: i18n_1._('Y-axis grid and labels'),
|
|
3066
|
+
label: (0, i18n_1._)('Y-axis grid and labels'),
|
|
2729
3067
|
layout: [[{
|
|
2730
|
-
label: i18n_1._('Axis title'),
|
|
3068
|
+
label: (0, i18n_1._)('Axis title'),
|
|
2731
3069
|
option: 'yAxisTitleVisibility',
|
|
2732
3070
|
editor: 'editor.toggle'
|
|
2733
3071
|
}], [{
|
|
2734
|
-
label: i18n_1._('Axis title text'),
|
|
3072
|
+
label: (0, i18n_1._)('Axis title text'),
|
|
2735
3073
|
option: 'yAxisTitleText',
|
|
2736
3074
|
editor: 'editor.text',
|
|
2737
3075
|
showEditor: function showEditor(_ref) {
|
|
@@ -2739,36 +3077,36 @@ var AxesChartYGridAndLabels = {
|
|
|
2739
3077
|
return options.yAxisTitleVisibility === 'show' || options.yAxisTitleVisibility === undefined;
|
|
2740
3078
|
}
|
|
2741
3079
|
}], [{
|
|
2742
|
-
label: i18n_1._('Scale'),
|
|
3080
|
+
label: (0, i18n_1._)('Scale'),
|
|
2743
3081
|
option: 'yAxisScale',
|
|
2744
3082
|
editor: 'editor.radioBar',
|
|
2745
3083
|
editorProps: {
|
|
2746
3084
|
values: [{
|
|
2747
|
-
label: i18n_1._('Linear'),
|
|
3085
|
+
label: (0, i18n_1._)('Linear'),
|
|
2748
3086
|
value: 'linear'
|
|
2749
3087
|
}, {
|
|
2750
|
-
label: i18n_1._('Log'),
|
|
3088
|
+
label: (0, i18n_1._)('Log'),
|
|
2751
3089
|
value: 'log'
|
|
2752
3090
|
}]
|
|
2753
3091
|
}
|
|
2754
3092
|
}], [{
|
|
2755
|
-
label: i18n_1._('Label visibility'),
|
|
3093
|
+
label: (0, i18n_1._)('Label visibility'),
|
|
2756
3094
|
option: 'yAxisLabelVisibility',
|
|
2757
3095
|
editor: 'editor.radioBar',
|
|
2758
3096
|
editorProps: {
|
|
2759
3097
|
values: [{
|
|
2760
|
-
label: i18n_1._('Auto'),
|
|
3098
|
+
label: (0, i18n_1._)('Auto'),
|
|
2761
3099
|
value: 'auto'
|
|
2762
3100
|
}, {
|
|
2763
|
-
label: i18n_1._('Show'),
|
|
3101
|
+
label: (0, i18n_1._)('Show'),
|
|
2764
3102
|
value: 'show'
|
|
2765
3103
|
}, {
|
|
2766
|
-
label: i18n_1._('Hide'),
|
|
3104
|
+
label: (0, i18n_1._)('Hide'),
|
|
2767
3105
|
value: 'hide'
|
|
2768
3106
|
}]
|
|
2769
3107
|
}
|
|
2770
3108
|
}], [{
|
|
2771
|
-
label: i18n_1._('SI prefix abbreviation for labels'),
|
|
3109
|
+
label: (0, i18n_1._)('SI prefix abbreviation for labels'),
|
|
2772
3110
|
option: 'yAxisAbbreviation',
|
|
2773
3111
|
editor: 'editor.checkbox',
|
|
2774
3112
|
showEditor: function showEditor(_ref2) {
|
|
@@ -2776,47 +3114,47 @@ var AxesChartYGridAndLabels = {
|
|
|
2776
3114
|
return options.yAxisLabelVisibility === 'show' || options.yAxisLabelVisibility === 'auto' || options.yAxisLabelVisibility === undefined;
|
|
2777
3115
|
}
|
|
2778
3116
|
}], [{
|
|
2779
|
-
label: i18n_1._('Include zero'),
|
|
3117
|
+
label: (0, i18n_1._)('Include zero'),
|
|
2780
3118
|
option: 'showYAxisWithZero',
|
|
2781
3119
|
editor: 'editor.checkbox'
|
|
2782
3120
|
}], [{
|
|
2783
|
-
label: i18n_1._('Extend to whole grid'),
|
|
3121
|
+
label: (0, i18n_1._)('Extend to whole grid'),
|
|
2784
3122
|
option: 'showYAxisExtendedRange',
|
|
2785
3123
|
editor: 'editor.checkbox'
|
|
2786
3124
|
}], [{
|
|
2787
|
-
label: i18n_1._('Minimum axis value'),
|
|
3125
|
+
label: (0, i18n_1._)('Minimum axis value'),
|
|
2788
3126
|
option: 'yAxisMin',
|
|
2789
3127
|
editor: 'editor.number'
|
|
2790
3128
|
}, {
|
|
2791
|
-
label: i18n_1._('Maximum axis value'),
|
|
3129
|
+
label: (0, i18n_1._)('Maximum axis value'),
|
|
2792
3130
|
option: 'yAxisMax',
|
|
2793
3131
|
editor: 'editor.number'
|
|
2794
3132
|
}], [{
|
|
2795
|
-
label: i18n_1._('Axis line visibility'),
|
|
3133
|
+
label: (0, i18n_1._)('Axis line visibility'),
|
|
2796
3134
|
option: 'yAxisLineVisibility',
|
|
2797
3135
|
editor: 'editor.checkbox'
|
|
2798
3136
|
}], [{
|
|
2799
|
-
label: i18n_1._('Major gridlines'),
|
|
3137
|
+
label: (0, i18n_1._)('Major gridlines'),
|
|
2800
3138
|
option: 'showYMajorGridLines',
|
|
2801
3139
|
editor: 'editor.checkbox'
|
|
2802
3140
|
}], [{
|
|
2803
|
-
label: i18n_1._('Major tick visibility'),
|
|
3141
|
+
label: (0, i18n_1._)('Major tick visibility'),
|
|
2804
3142
|
option: 'yAxisMajorTickVisibility',
|
|
2805
3143
|
editor: 'editor.radioBar',
|
|
2806
3144
|
editorProps: {
|
|
2807
3145
|
values: [{
|
|
2808
|
-
label: i18n_1._('Auto'),
|
|
3146
|
+
label: (0, i18n_1._)('Auto'),
|
|
2809
3147
|
value: 'auto'
|
|
2810
3148
|
}, {
|
|
2811
|
-
label: i18n_1._('Show'),
|
|
3149
|
+
label: (0, i18n_1._)('Show'),
|
|
2812
3150
|
value: 'show'
|
|
2813
3151
|
}, {
|
|
2814
|
-
label: i18n_1._('Hide'),
|
|
3152
|
+
label: (0, i18n_1._)('Hide'),
|
|
2815
3153
|
value: 'hide'
|
|
2816
3154
|
}]
|
|
2817
3155
|
}
|
|
2818
3156
|
}], [{
|
|
2819
|
-
label: i18n_1._('Major tick size (px)'),
|
|
3157
|
+
label: (0, i18n_1._)('Major tick size (px)'),
|
|
2820
3158
|
option: 'yAxisMajorTickSize',
|
|
2821
3159
|
editor: 'editor.slider',
|
|
2822
3160
|
editorProps: {
|
|
@@ -2829,7 +3167,7 @@ var AxesChartYGridAndLabels = {
|
|
|
2829
3167
|
return options.yAxisMajorTickVisibility === 'show' || options.yAxisMajorTickVisibility === 'auto' || options.yAxisMajorTickVisibility === undefined;
|
|
2830
3168
|
}
|
|
2831
3169
|
}], [{
|
|
2832
|
-
label: i18n_1._('Major tick interval spacing'),
|
|
3170
|
+
label: (0, i18n_1._)('Major tick interval spacing'),
|
|
2833
3171
|
option: 'yAxisMajorTickInterval',
|
|
2834
3172
|
editor: 'editor.number',
|
|
2835
3173
|
showEditor: function showEditor(_ref4) {
|
|
@@ -2837,27 +3175,27 @@ var AxesChartYGridAndLabels = {
|
|
|
2837
3175
|
return options.yAxisMajorTickVisibility === 'show' || options.yAxisMajorTickVisibility === 'auto' || options.yAxisMajorTickVisibility === undefined;
|
|
2838
3176
|
}
|
|
2839
3177
|
}], [{
|
|
2840
|
-
label: i18n_1._('Minor gridlines'),
|
|
3178
|
+
label: (0, i18n_1._)('Minor gridlines'),
|
|
2841
3179
|
option: 'showYMinorGridLines',
|
|
2842
3180
|
editor: 'editor.checkbox'
|
|
2843
3181
|
}], [{
|
|
2844
|
-
label: i18n_1._('Minor tick visibility'),
|
|
3182
|
+
label: (0, i18n_1._)('Minor tick visibility'),
|
|
2845
3183
|
option: 'yAxisMinorTickVisibility',
|
|
2846
3184
|
editor: 'editor.radioBar',
|
|
2847
3185
|
editorProps: {
|
|
2848
3186
|
values: [{
|
|
2849
|
-
label: i18n_1._('Auto'),
|
|
3187
|
+
label: (0, i18n_1._)('Auto'),
|
|
2850
3188
|
value: 'auto'
|
|
2851
3189
|
}, {
|
|
2852
|
-
label: i18n_1._('Show'),
|
|
3190
|
+
label: (0, i18n_1._)('Show'),
|
|
2853
3191
|
value: 'show'
|
|
2854
3192
|
}, {
|
|
2855
|
-
label: i18n_1._('Hide'),
|
|
3193
|
+
label: (0, i18n_1._)('Hide'),
|
|
2856
3194
|
value: 'hide'
|
|
2857
3195
|
}]
|
|
2858
3196
|
}
|
|
2859
3197
|
}], [{
|
|
2860
|
-
label: i18n_1._('Minor tick size (px)'),
|
|
3198
|
+
label: (0, i18n_1._)('Minor tick size (px)'),
|
|
2861
3199
|
option: 'yAxisMinorTickSize',
|
|
2862
3200
|
editor: 'editor.slider',
|
|
2863
3201
|
editorProps: {
|
|
@@ -2874,7 +3212,6 @@ var AxesChartYGridAndLabels = {
|
|
|
2874
3212
|
exports.default = AxesChartYGridAndLabels;
|
|
2875
3213
|
|
|
2876
3214
|
/***/ }),
|
|
2877
|
-
/* 78 */,
|
|
2878
3215
|
/* 79 */,
|
|
2879
3216
|
/* 80 */,
|
|
2880
3217
|
/* 81 */,
|
|
@@ -2883,67 +3220,74 @@ exports.default = AxesChartYGridAndLabels;
|
|
|
2883
3220
|
/* 84 */,
|
|
2884
3221
|
/* 85 */,
|
|
2885
3222
|
/* 86 */,
|
|
2886
|
-
/* 87
|
|
3223
|
+
/* 87 */,
|
|
3224
|
+
/* 88 */,
|
|
3225
|
+
/* 89 */
|
|
2887
3226
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2888
3227
|
|
|
2889
3228
|
"use strict";
|
|
2890
3229
|
|
|
2891
3230
|
|
|
2892
3231
|
var _toConsumableArray = __webpack_require__(8);
|
|
3232
|
+
|
|
2893
3233
|
Object.defineProperty(exports, "__esModule", {
|
|
2894
3234
|
value: true
|
|
2895
3235
|
});
|
|
2896
3236
|
exports.AxesChartDataDisplayColumn = exports.AxesChartDataDisplayBar = exports.AxesChartDataDisplayLine = void 0;
|
|
3237
|
+
|
|
2897
3238
|
var i18n_1 = __webpack_require__(2);
|
|
3239
|
+
|
|
2898
3240
|
var lodash_1 = __webpack_require__(3);
|
|
3241
|
+
|
|
2899
3242
|
var configUtils_1 = __webpack_require__(20);
|
|
3243
|
+
|
|
2900
3244
|
exports.AxesChartDataDisplayLine = {
|
|
2901
|
-
label: i18n_1._('Data display'),
|
|
3245
|
+
label: (0, i18n_1._)('Data display'),
|
|
2902
3246
|
layout: [[{
|
|
2903
|
-
label: i18n_1._('Null value display'),
|
|
3247
|
+
label: (0, i18n_1._)('Null value display'),
|
|
2904
3248
|
option: 'nullValueDisplay',
|
|
2905
3249
|
editor: 'editor.radioBar',
|
|
2906
3250
|
editorProps: {
|
|
2907
3251
|
values: [{
|
|
2908
|
-
label: i18n_1._('Gaps'),
|
|
3252
|
+
label: (0, i18n_1._)('Gaps'),
|
|
2909
3253
|
value: 'gaps'
|
|
2910
3254
|
}, {
|
|
2911
|
-
label: i18n_1._('Zero'),
|
|
3255
|
+
label: (0, i18n_1._)('Zero'),
|
|
2912
3256
|
value: 'zero'
|
|
2913
3257
|
}, {
|
|
2914
|
-
label: i18n_1._('Connect'),
|
|
3258
|
+
label: (0, i18n_1._)('Connect'),
|
|
2915
3259
|
value: 'connect'
|
|
2916
3260
|
}]
|
|
2917
3261
|
}
|
|
2918
3262
|
}], [{
|
|
2919
|
-
label: i18n_1._('Data value display'),
|
|
3263
|
+
label: (0, i18n_1._)('Data value display'),
|
|
2920
3264
|
option: 'dataValuesDisplay',
|
|
2921
3265
|
editor: 'editor.radioBar',
|
|
2922
3266
|
editorProps: {
|
|
2923
3267
|
values: [{
|
|
2924
|
-
label: i18n_1._('Off'),
|
|
3268
|
+
label: (0, i18n_1._)('Off'),
|
|
2925
3269
|
value: 'off'
|
|
2926
3270
|
}, {
|
|
2927
|
-
label: i18n_1._('All'),
|
|
3271
|
+
label: (0, i18n_1._)('All'),
|
|
2928
3272
|
value: 'all'
|
|
2929
3273
|
}, {
|
|
2930
|
-
label: i18n_1._('Min/Max'),
|
|
3274
|
+
label: (0, i18n_1._)('Min/Max'),
|
|
2931
3275
|
value: 'minmax'
|
|
2932
3276
|
}]
|
|
2933
3277
|
}
|
|
2934
3278
|
}], [{
|
|
2935
|
-
label: i18n_1._('Overlay fields'),
|
|
3279
|
+
label: (0, i18n_1._)('Overlay fields'),
|
|
2936
3280
|
option: 'overlayFields',
|
|
2937
3281
|
editor: 'editor.columnMultiSelectionByFieldNameEditor',
|
|
2938
3282
|
editorProps: {
|
|
2939
3283
|
filterByTypes: ['number']
|
|
2940
3284
|
}
|
|
2941
3285
|
}], [{
|
|
2942
|
-
label: i18n_1._('Split series'),
|
|
3286
|
+
label: (0, i18n_1._)('Split series'),
|
|
2943
3287
|
option: 'showSplitSeries',
|
|
2944
3288
|
editor: 'editor.toggle'
|
|
2945
3289
|
}], [{
|
|
2946
|
-
label: i18n_1._('Independent y-axis for split series'),
|
|
3290
|
+
label: (0, i18n_1._)('Independent y-axis for split series'),
|
|
2947
3291
|
option: 'showIndependentYRanges',
|
|
2948
3292
|
editor: 'editor.checkbox',
|
|
2949
3293
|
showEditor: function showEditor(_ref) {
|
|
@@ -2955,18 +3299,18 @@ exports.AxesChartDataDisplayLine = {
|
|
|
2955
3299
|
var AxesChartDataDisplay = {
|
|
2956
3300
|
label: exports.AxesChartDataDisplayLine.label,
|
|
2957
3301
|
layout: [[{
|
|
2958
|
-
label: i18n_1._('Stack mode'),
|
|
3302
|
+
label: (0, i18n_1._)('Stack mode'),
|
|
2959
3303
|
option: 'stackMode',
|
|
2960
3304
|
editor: 'editor.select',
|
|
2961
3305
|
editorProps: {
|
|
2962
3306
|
values: [{
|
|
2963
|
-
label: i18n_1._('Not stacked'),
|
|
3307
|
+
label: (0, i18n_1._)('Not stacked'),
|
|
2964
3308
|
value: 'auto'
|
|
2965
3309
|
}, {
|
|
2966
|
-
label: i18n_1._('Stacked'),
|
|
3310
|
+
label: (0, i18n_1._)('Stacked'),
|
|
2967
3311
|
value: 'stacked'
|
|
2968
3312
|
}, {
|
|
2969
|
-
label: i18n_1._('Stacked 100%'),
|
|
3313
|
+
label: (0, i18n_1._)('Stacked 100%'),
|
|
2970
3314
|
value: 'stacked100'
|
|
2971
3315
|
}]
|
|
2972
3316
|
}
|
|
@@ -2975,39 +3319,39 @@ var AxesChartDataDisplay = {
|
|
|
2975
3319
|
exports.AxesChartDataDisplayBar = {
|
|
2976
3320
|
label: exports.AxesChartDataDisplayLine.label,
|
|
2977
3321
|
layout: [[{
|
|
2978
|
-
label: i18n_1._('Stack mode'),
|
|
3322
|
+
label: (0, i18n_1._)('Stack mode'),
|
|
2979
3323
|
option: 'stackMode',
|
|
2980
3324
|
editor: 'editor.select',
|
|
2981
3325
|
editorProps: {
|
|
2982
3326
|
values: [{
|
|
2983
|
-
label: i18n_1._('Not stacked'),
|
|
3327
|
+
label: (0, i18n_1._)('Not stacked'),
|
|
2984
3328
|
value: 'auto'
|
|
2985
3329
|
}, {
|
|
2986
|
-
label: i18n_1._('Stacked'),
|
|
3330
|
+
label: (0, i18n_1._)('Stacked'),
|
|
2987
3331
|
value: 'stacked'
|
|
2988
3332
|
}, {
|
|
2989
|
-
label: i18n_1._('Stacked 100%'),
|
|
3333
|
+
label: (0, i18n_1._)('Stacked 100%'),
|
|
2990
3334
|
value: 'stacked100'
|
|
2991
3335
|
}]
|
|
2992
3336
|
}
|
|
2993
|
-
}]].concat(_toConsumableArray(lodash_1.drop(exports.AxesChartDataDisplayLine.layout)))
|
|
3337
|
+
}]].concat(_toConsumableArray((0, lodash_1.drop)(exports.AxesChartDataDisplayLine.layout)))
|
|
2994
3338
|
};
|
|
2995
3339
|
exports.AxesChartDataDisplayColumn = {
|
|
2996
3340
|
label: exports.AxesChartDataDisplayBar.label,
|
|
2997
|
-
layout: [].concat(_toConsumableArray(configUtils_1.insertLayout(exports.AxesChartDataDisplayBar.layout, 2, [{
|
|
2998
|
-
label: i18n_1._('Show tooltip on hover'),
|
|
3341
|
+
layout: [].concat(_toConsumableArray((0, configUtils_1.insertLayout)(exports.AxesChartDataDisplayBar.layout, 2, [{
|
|
3342
|
+
label: (0, i18n_1._)('Show tooltip on hover'),
|
|
2999
3343
|
option: 'showTooltip',
|
|
3000
3344
|
editor: 'editor.checkbox'
|
|
3001
3345
|
}])), [[{
|
|
3002
|
-
label: i18n_1._('Column grouping mode'),
|
|
3346
|
+
label: (0, i18n_1._)('Column grouping mode'),
|
|
3003
3347
|
option: 'columnGrouping',
|
|
3004
3348
|
editor: 'editor.radioBar',
|
|
3005
3349
|
editorProps: {
|
|
3006
3350
|
values: [{
|
|
3007
|
-
label: i18n_1._('Auto'),
|
|
3351
|
+
label: (0, i18n_1._)('Auto'),
|
|
3008
3352
|
value: 'auto'
|
|
3009
3353
|
}, {
|
|
3010
|
-
label: i18n_1._('Overlay'),
|
|
3354
|
+
label: (0, i18n_1._)('Overlay'),
|
|
3011
3355
|
value: 'overlay'
|
|
3012
3356
|
}]
|
|
3013
3357
|
}
|
|
@@ -3016,7 +3360,7 @@ exports.AxesChartDataDisplayColumn = {
|
|
|
3016
3360
|
exports.default = AxesChartDataDisplay;
|
|
3017
3361
|
|
|
3018
3362
|
/***/ }),
|
|
3019
|
-
/*
|
|
3363
|
+
/* 90 */
|
|
3020
3364
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3021
3365
|
|
|
3022
3366
|
"use strict";
|
|
@@ -3025,15 +3369,17 @@ exports.default = AxesChartDataDisplay;
|
|
|
3025
3369
|
Object.defineProperty(exports, "__esModule", {
|
|
3026
3370
|
value: true
|
|
3027
3371
|
});
|
|
3372
|
+
|
|
3028
3373
|
var i18n_1 = __webpack_require__(2);
|
|
3374
|
+
|
|
3029
3375
|
var axesChartY2GridAndLabels = {
|
|
3030
|
-
label: i18n_1._('Y2-axis grid and labels'),
|
|
3376
|
+
label: (0, i18n_1._)('Y2-axis grid and labels'),
|
|
3031
3377
|
layout: [[{
|
|
3032
|
-
label: i18n_1._('Axis title'),
|
|
3378
|
+
label: (0, i18n_1._)('Axis title'),
|
|
3033
3379
|
option: 'y2AxisTitleVisibility',
|
|
3034
3380
|
editor: 'editor.toggle'
|
|
3035
3381
|
}], [{
|
|
3036
|
-
label: i18n_1._('Axis title'),
|
|
3382
|
+
label: (0, i18n_1._)('Axis title'),
|
|
3037
3383
|
option: 'y2AxisTitleText',
|
|
3038
3384
|
editor: 'editor.text',
|
|
3039
3385
|
showEditor: function showEditor(_ref) {
|
|
@@ -3041,7 +3387,7 @@ var axesChartY2GridAndLabels = {
|
|
|
3041
3387
|
return options.y2AxisTitleVisibility === 'show' || options.y2AxisTitleVisibility === undefined;
|
|
3042
3388
|
}
|
|
3043
3389
|
}], [{
|
|
3044
|
-
label: i18n_1._('Show overlays on the y2-axis'),
|
|
3390
|
+
label: (0, i18n_1._)('Show overlays on the y2-axis'),
|
|
3045
3391
|
option: 'showOverlayY2Axis',
|
|
3046
3392
|
editor: 'editor.checkbox',
|
|
3047
3393
|
showEditor: function showEditor(_ref2) {
|
|
@@ -3049,36 +3395,36 @@ var axesChartY2GridAndLabels = {
|
|
|
3049
3395
|
return Array.isArray(options.overlayFields) && options.overlayFields.length > 0;
|
|
3050
3396
|
}
|
|
3051
3397
|
}], [{
|
|
3052
|
-
label: i18n_1._('Scale'),
|
|
3398
|
+
label: (0, i18n_1._)('Scale'),
|
|
3053
3399
|
option: 'y2AxisScale',
|
|
3054
3400
|
editor: 'editor.radioBar',
|
|
3055
3401
|
editorProps: {
|
|
3056
3402
|
values: [{
|
|
3057
|
-
label: i18n_1._('Linear'),
|
|
3403
|
+
label: (0, i18n_1._)('Linear'),
|
|
3058
3404
|
value: 'linear'
|
|
3059
3405
|
}, {
|
|
3060
|
-
label: i18n_1._('Log'),
|
|
3406
|
+
label: (0, i18n_1._)('Log'),
|
|
3061
3407
|
value: 'log'
|
|
3062
3408
|
}]
|
|
3063
3409
|
}
|
|
3064
3410
|
}], [{
|
|
3065
|
-
label: i18n_1._('Label visibility'),
|
|
3411
|
+
label: (0, i18n_1._)('Label visibility'),
|
|
3066
3412
|
option: 'y2AxisLabelVisibility',
|
|
3067
3413
|
editor: 'editor.radioBar',
|
|
3068
3414
|
editorProps: {
|
|
3069
3415
|
values: [{
|
|
3070
|
-
label: i18n_1._('Auto'),
|
|
3416
|
+
label: (0, i18n_1._)('Auto'),
|
|
3071
3417
|
value: 'auto'
|
|
3072
3418
|
}, {
|
|
3073
|
-
label: i18n_1._('Show'),
|
|
3419
|
+
label: (0, i18n_1._)('Show'),
|
|
3074
3420
|
value: 'show'
|
|
3075
3421
|
}, {
|
|
3076
|
-
label: i18n_1._('Hide'),
|
|
3422
|
+
label: (0, i18n_1._)('Hide'),
|
|
3077
3423
|
value: 'hide'
|
|
3078
3424
|
}]
|
|
3079
3425
|
}
|
|
3080
3426
|
}], [{
|
|
3081
|
-
label: i18n_1._('Round axis labels'),
|
|
3427
|
+
label: (0, i18n_1._)('Round axis labels'),
|
|
3082
3428
|
option: 'showRoundedY2AxisLabels',
|
|
3083
3429
|
editor: 'editor.checkbox',
|
|
3084
3430
|
showEditor: function showEditor(_ref3) {
|
|
@@ -3086,7 +3432,7 @@ var axesChartY2GridAndLabels = {
|
|
|
3086
3432
|
return options.y2AxisLabelVisibility === 'show' || options.y2AxisLabelVisibility === 'auto' || options.y2AxisLabelVisibility === undefined;
|
|
3087
3433
|
}
|
|
3088
3434
|
}], [{
|
|
3089
|
-
label: i18n_1._('SI prefix abbreviation for labels'),
|
|
3435
|
+
label: (0, i18n_1._)('SI prefix abbreviation for labels'),
|
|
3090
3436
|
option: 'y2AxisAbbreviation',
|
|
3091
3437
|
editor: 'editor.checkbox',
|
|
3092
3438
|
showEditor: function showEditor(_ref4) {
|
|
@@ -3094,43 +3440,43 @@ var axesChartY2GridAndLabels = {
|
|
|
3094
3440
|
return options.y2AxisLabelVisibility === 'show' || options.y2AxisLabelVisibility === 'auto' || options.y2AxisLabelVisibility === undefined;
|
|
3095
3441
|
}
|
|
3096
3442
|
}], [{
|
|
3097
|
-
label: i18n_1._('Include zero'),
|
|
3443
|
+
label: (0, i18n_1._)('Include zero'),
|
|
3098
3444
|
option: 'showY2AxisWithZero',
|
|
3099
3445
|
editor: 'editor.checkbox'
|
|
3100
3446
|
}], [{
|
|
3101
|
-
label: i18n_1._('Minimum axis value'),
|
|
3447
|
+
label: (0, i18n_1._)('Minimum axis value'),
|
|
3102
3448
|
option: 'y2AxisMin',
|
|
3103
3449
|
editor: 'editor.number'
|
|
3104
3450
|
}, {
|
|
3105
|
-
label: i18n_1._('Maximum axis value'),
|
|
3451
|
+
label: (0, i18n_1._)('Maximum axis value'),
|
|
3106
3452
|
option: 'y2AxisMax',
|
|
3107
3453
|
editor: 'editor.number'
|
|
3108
3454
|
}], [{
|
|
3109
|
-
label: i18n_1._('Axis line visibility'),
|
|
3455
|
+
label: (0, i18n_1._)('Axis line visibility'),
|
|
3110
3456
|
option: 'y2AxisLineVisibility',
|
|
3111
3457
|
editor: 'editor.checkbox'
|
|
3112
3458
|
}], [{
|
|
3113
|
-
label: i18n_1._('Major gridlines'),
|
|
3459
|
+
label: (0, i18n_1._)('Major gridlines'),
|
|
3114
3460
|
option: 'showY2MajorGridLines',
|
|
3115
3461
|
editor: 'editor.checkbox'
|
|
3116
3462
|
}], [{
|
|
3117
|
-
label: i18n_1._('Major tick visibility'),
|
|
3463
|
+
label: (0, i18n_1._)('Major tick visibility'),
|
|
3118
3464
|
option: 'y2AxisMajorTickVisibility',
|
|
3119
3465
|
editor: 'editor.radioBar',
|
|
3120
3466
|
editorProps: {
|
|
3121
3467
|
values: [{
|
|
3122
|
-
label: i18n_1._('Auto'),
|
|
3468
|
+
label: (0, i18n_1._)('Auto'),
|
|
3123
3469
|
value: 'auto'
|
|
3124
3470
|
}, {
|
|
3125
|
-
label: i18n_1._('Show'),
|
|
3471
|
+
label: (0, i18n_1._)('Show'),
|
|
3126
3472
|
value: 'show'
|
|
3127
3473
|
}, {
|
|
3128
|
-
label: i18n_1._('Hide'),
|
|
3474
|
+
label: (0, i18n_1._)('Hide'),
|
|
3129
3475
|
value: 'hide'
|
|
3130
3476
|
}]
|
|
3131
3477
|
}
|
|
3132
3478
|
}], [{
|
|
3133
|
-
label: i18n_1._('Major tick size (px)'),
|
|
3479
|
+
label: (0, i18n_1._)('Major tick size (px)'),
|
|
3134
3480
|
option: 'y2AxisMajorTickSize',
|
|
3135
3481
|
editor: 'editor.slider',
|
|
3136
3482
|
editorProps: {
|
|
@@ -3143,7 +3489,7 @@ var axesChartY2GridAndLabels = {
|
|
|
3143
3489
|
return options.y2AxisMajorTickVisibility === 'show' || options.y2AxisMajorTickVisibility === 'auto' || options.y2AxisMajorTickVisibility === undefined;
|
|
3144
3490
|
}
|
|
3145
3491
|
}], [{
|
|
3146
|
-
label: i18n_1._('Major tick interval spacing'),
|
|
3492
|
+
label: (0, i18n_1._)('Major tick interval spacing'),
|
|
3147
3493
|
option: 'y2AxisMajorTickInterval',
|
|
3148
3494
|
editor: 'editor.number',
|
|
3149
3495
|
showEditor: function showEditor(_ref6) {
|
|
@@ -3151,27 +3497,27 @@ var axesChartY2GridAndLabels = {
|
|
|
3151
3497
|
return options.y2AxisMajorTickVisibility === 'show' || options.y2AxisMajorTickVisibility === 'auto' || options.y2AxisMajorTickVisibility === undefined;
|
|
3152
3498
|
}
|
|
3153
3499
|
}], [{
|
|
3154
|
-
label: i18n_1._('Minor gridlines'),
|
|
3500
|
+
label: (0, i18n_1._)('Minor gridlines'),
|
|
3155
3501
|
option: 'showY2MinorGridLines',
|
|
3156
3502
|
editor: 'editor.checkbox'
|
|
3157
3503
|
}], [{
|
|
3158
|
-
label: i18n_1._('Minor tick visibility'),
|
|
3504
|
+
label: (0, i18n_1._)('Minor tick visibility'),
|
|
3159
3505
|
option: 'y2AxisMinorTickVisibility',
|
|
3160
3506
|
editor: 'editor.radioBar',
|
|
3161
3507
|
editorProps: {
|
|
3162
3508
|
values: [{
|
|
3163
|
-
label: i18n_1._('Auto'),
|
|
3509
|
+
label: (0, i18n_1._)('Auto'),
|
|
3164
3510
|
value: 'auto'
|
|
3165
3511
|
}, {
|
|
3166
|
-
label: i18n_1._('Show'),
|
|
3512
|
+
label: (0, i18n_1._)('Show'),
|
|
3167
3513
|
value: 'show'
|
|
3168
3514
|
}, {
|
|
3169
|
-
label: i18n_1._('Hide'),
|
|
3515
|
+
label: (0, i18n_1._)('Hide'),
|
|
3170
3516
|
value: 'hide'
|
|
3171
3517
|
}]
|
|
3172
3518
|
}
|
|
3173
3519
|
}], [{
|
|
3174
|
-
label: i18n_1._('Minor tick size (px)'),
|
|
3520
|
+
label: (0, i18n_1._)('Minor tick size (px)'),
|
|
3175
3521
|
option: 'y2AxisMinorTickSize',
|
|
3176
3522
|
editor: 'editor.slider',
|
|
3177
3523
|
editorProps: {
|
|
@@ -3188,8 +3534,6 @@ var axesChartY2GridAndLabels = {
|
|
|
3188
3534
|
exports.default = axesChartY2GridAndLabels;
|
|
3189
3535
|
|
|
3190
3536
|
/***/ }),
|
|
3191
|
-
/* 89 */,
|
|
3192
|
-
/* 90 */,
|
|
3193
3537
|
/* 91 */,
|
|
3194
3538
|
/* 92 */,
|
|
3195
3539
|
/* 93 */,
|
|
@@ -3244,7 +3588,10 @@ exports.default = axesChartY2GridAndLabels;
|
|
|
3244
3588
|
/* 142 */,
|
|
3245
3589
|
/* 143 */,
|
|
3246
3590
|
/* 144 */,
|
|
3247
|
-
/* 145
|
|
3591
|
+
/* 145 */,
|
|
3592
|
+
/* 146 */,
|
|
3593
|
+
/* 147 */,
|
|
3594
|
+
/* 148 */
|
|
3248
3595
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3249
3596
|
|
|
3250
3597
|
"use strict";
|
|
@@ -3252,88 +3599,110 @@ exports.default = axesChartY2GridAndLabels;
|
|
|
3252
3599
|
|
|
3253
3600
|
var __rest = this && this.__rest || function (s, e) {
|
|
3254
3601
|
var t = {};
|
|
3602
|
+
|
|
3255
3603
|
for (var p in s) {
|
|
3256
3604
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
3257
3605
|
}
|
|
3606
|
+
|
|
3258
3607
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
3259
3608
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
3260
3609
|
}
|
|
3261
3610
|
return t;
|
|
3262
3611
|
};
|
|
3612
|
+
|
|
3263
3613
|
Object.defineProperty(exports, "__esModule", {
|
|
3264
3614
|
value: true
|
|
3265
3615
|
});
|
|
3266
3616
|
exports.config = exports.themes = exports.computeVizProps = void 0;
|
|
3267
|
-
|
|
3268
|
-
// Charting imports i18n which needs to be run to instantiate window globals in the tests
|
|
3617
|
+
|
|
3618
|
+
var lodash_1 = __webpack_require__(3); // Charting imports i18n which needs to be run to instantiate window globals in the tests
|
|
3269
3619
|
// eslint-disable-next-line import/order
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
var
|
|
3273
|
-
|
|
3620
|
+
|
|
3621
|
+
|
|
3622
|
+
var Charting_1 = __webpack_require__(65);
|
|
3623
|
+
|
|
3624
|
+
var charting_bundle_1 = __webpack_require__(55);
|
|
3625
|
+
|
|
3626
|
+
var simpleXMLOptions_1 = __webpack_require__(70);
|
|
3627
|
+
|
|
3628
|
+
var config_1 = __webpack_require__(198);
|
|
3629
|
+
|
|
3274
3630
|
exports.config = config_1.default;
|
|
3275
|
-
|
|
3276
|
-
var
|
|
3277
|
-
|
|
3631
|
+
|
|
3632
|
+
var withDashboardViz_1 = __webpack_require__(37);
|
|
3633
|
+
|
|
3634
|
+
var columnUtils_1 = __webpack_require__(199);
|
|
3635
|
+
|
|
3636
|
+
var chartingUtils_1 = __webpack_require__(56);
|
|
3637
|
+
|
|
3278
3638
|
var validOptions = Object.keys(config_1.default.optionsSchema);
|
|
3639
|
+
|
|
3279
3640
|
var computeVizProps = function computeVizProps(_a) {
|
|
3280
3641
|
var dataSources = _a.dataSources,
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3642
|
+
onEventTrigger = _a.onEventTrigger,
|
|
3643
|
+
x = _a.x,
|
|
3644
|
+
y = _a.y,
|
|
3645
|
+
xField = _a.xField,
|
|
3646
|
+
yFields = _a.yFields,
|
|
3647
|
+
annotationX = _a.annotationX,
|
|
3648
|
+
annotationLabel = _a.annotationLabel,
|
|
3649
|
+
annotationColor = _a.annotationColor,
|
|
3650
|
+
visualizationApiRef = _a.visualizationApiRef,
|
|
3651
|
+
otherOptions = __rest(_a, ["dataSources", "onEventTrigger", "x", "y", "xField", "yFields", "annotationX", "annotationLabel", "annotationColor", "visualizationApiRef"]); // options to be passed as props
|
|
3652
|
+
|
|
3653
|
+
|
|
3291
3654
|
var computedProps = {
|
|
3292
3655
|
visualizationApiRef: visualizationApiRef
|
|
3293
3656
|
};
|
|
3294
3657
|
var y2Fields = otherOptions.y2Fields,
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
computedProps.options = lodash_1.chain(otherOptions).pick(validOptions).thru(columnUtils_1.convertToColumnSCProperties).thru(function (options) {
|
|
3298
|
-
return Object.assign(Object.assign({}, simpleXMLOptions_1.getSimpleXMLOptionsForProps(lodash_1.omit(options, ['y2Fields']))), {
|
|
3658
|
+
y2 = otherOptions.y2,
|
|
3659
|
+
hasEventHandlers = otherOptions.hasEventHandlers;
|
|
3660
|
+
computedProps.options = (0, lodash_1.chain)(otherOptions).pick(validOptions).thru(columnUtils_1.convertToColumnSCProperties).thru(function (options) {
|
|
3661
|
+
return Object.assign(Object.assign({}, (0, simpleXMLOptions_1.getSimpleXMLOptionsForProps)((0, lodash_1.omit)(options, ['y2Fields']))), {
|
|
3299
3662
|
chart: 'column'
|
|
3300
3663
|
});
|
|
3301
3664
|
}).value();
|
|
3302
|
-
var chartingAnnotations = chartingUtils_1.getAnnotations({
|
|
3665
|
+
var chartingAnnotations = (0, chartingUtils_1.getAnnotations)({
|
|
3303
3666
|
annotationX: annotationX,
|
|
3304
3667
|
annotationColor: annotationColor,
|
|
3305
3668
|
annotationLabel: annotationLabel
|
|
3306
3669
|
});
|
|
3307
3670
|
var primaryData = Object.assign({}, dataSources.primary.data);
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3671
|
+
|
|
3672
|
+
var _ref = (0, chartingUtils_1.constructFieldsAndColumns)({
|
|
3673
|
+
x: x,
|
|
3674
|
+
y: y,
|
|
3675
|
+
xField: xField,
|
|
3676
|
+
yFields: yFields,
|
|
3677
|
+
y2: y2,
|
|
3678
|
+
y2Fields: y2Fields
|
|
3679
|
+
}),
|
|
3680
|
+
columns = _ref.columns,
|
|
3681
|
+
fields = _ref.fields;
|
|
3682
|
+
|
|
3318
3683
|
primaryData.columns = columns;
|
|
3319
3684
|
primaryData.fields = fields;
|
|
3320
3685
|
var truncationLimit = computedProps.options['chart.resultTruncationLimit'];
|
|
3686
|
+
|
|
3321
3687
|
if (truncationLimit) {
|
|
3322
|
-
primaryData = chartingUtils_1.truncateData(primaryData, truncationLimit);
|
|
3688
|
+
primaryData = (0, chartingUtils_1.truncateData)(primaryData, truncationLimit);
|
|
3323
3689
|
}
|
|
3690
|
+
|
|
3324
3691
|
if (hasEventHandlers) {
|
|
3325
3692
|
computedProps.onClick = onEventTrigger;
|
|
3326
3693
|
computedProps.onSelect = onEventTrigger;
|
|
3327
3694
|
computedProps.onPointMouseOver = onEventTrigger;
|
|
3328
3695
|
computedProps.onPointMouseOut = onEventTrigger;
|
|
3329
3696
|
}
|
|
3697
|
+
|
|
3330
3698
|
computedProps.chartData = charting_bundle_1.default.extractChartReadyData(Object.assign(Object.assign({}, primaryData), {
|
|
3331
3699
|
annotations: chartingAnnotations
|
|
3332
3700
|
}));
|
|
3333
3701
|
return computedProps;
|
|
3334
3702
|
};
|
|
3703
|
+
|
|
3335
3704
|
exports.computeVizProps = computeVizProps;
|
|
3336
|
-
var Column = withDashboardViz_1.default({
|
|
3705
|
+
var Column = (0, withDashboardViz_1.default)({
|
|
3337
3706
|
ReactViz: Charting_1.default,
|
|
3338
3707
|
computeVizProps: exports.computeVizProps,
|
|
3339
3708
|
vizConfig: config_1.default
|
|
@@ -3343,9 +3712,6 @@ exports.themes = themes;
|
|
|
3343
3712
|
exports.default = Column;
|
|
3344
3713
|
|
|
3345
3714
|
/***/ }),
|
|
3346
|
-
/* 146 */,
|
|
3347
|
-
/* 147 */,
|
|
3348
|
-
/* 148 */,
|
|
3349
3715
|
/* 149 */,
|
|
3350
3716
|
/* 150 */,
|
|
3351
3717
|
/* 151 */,
|
|
@@ -3391,7 +3757,10 @@ exports.default = Column;
|
|
|
3391
3757
|
/* 191 */,
|
|
3392
3758
|
/* 192 */,
|
|
3393
3759
|
/* 193 */,
|
|
3394
|
-
/* 194
|
|
3760
|
+
/* 194 */,
|
|
3761
|
+
/* 195 */,
|
|
3762
|
+
/* 196 */,
|
|
3763
|
+
/* 197 */
|
|
3395
3764
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3396
3765
|
|
|
3397
3766
|
"use strict";
|
|
@@ -3399,27 +3768,38 @@ exports.default = Column;
|
|
|
3399
3768
|
|
|
3400
3769
|
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
3401
3770
|
if (k2 === undefined) k2 = k;
|
|
3402
|
-
Object.
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3771
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3772
|
+
|
|
3773
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3774
|
+
desc = {
|
|
3775
|
+
enumerable: true,
|
|
3776
|
+
get: function get() {
|
|
3777
|
+
return m[k];
|
|
3778
|
+
}
|
|
3779
|
+
};
|
|
3780
|
+
}
|
|
3781
|
+
|
|
3782
|
+
Object.defineProperty(o, k2, desc);
|
|
3408
3783
|
} : function (o, m, k, k2) {
|
|
3409
3784
|
if (k2 === undefined) k2 = k;
|
|
3410
3785
|
o[k2] = m[k];
|
|
3411
3786
|
});
|
|
3787
|
+
|
|
3412
3788
|
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
3413
3789
|
for (var p in m) {
|
|
3414
3790
|
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
3415
3791
|
}
|
|
3416
3792
|
};
|
|
3793
|
+
|
|
3417
3794
|
Object.defineProperty(exports, "__esModule", {
|
|
3418
3795
|
value: true
|
|
3419
3796
|
});
|
|
3420
3797
|
exports.default = void 0;
|
|
3421
|
-
|
|
3422
|
-
|
|
3798
|
+
|
|
3799
|
+
__exportStar(__webpack_require__(148), exports);
|
|
3800
|
+
|
|
3801
|
+
var Column_1 = __webpack_require__(148);
|
|
3802
|
+
|
|
3423
3803
|
Object.defineProperty(exports, "default", {
|
|
3424
3804
|
enumerable: true,
|
|
3425
3805
|
get: function get() {
|
|
@@ -3428,35 +3808,55 @@ Object.defineProperty(exports, "default", {
|
|
|
3428
3808
|
});
|
|
3429
3809
|
|
|
3430
3810
|
/***/ }),
|
|
3431
|
-
/*
|
|
3811
|
+
/* 198 */
|
|
3432
3812
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3433
3813
|
|
|
3434
3814
|
"use strict";
|
|
3435
3815
|
|
|
3436
3816
|
|
|
3437
3817
|
var _toConsumableArray = __webpack_require__(8);
|
|
3818
|
+
|
|
3438
3819
|
Object.defineProperty(exports, "__esModule", {
|
|
3439
3820
|
value: true
|
|
3440
3821
|
});
|
|
3441
3822
|
exports.optionsSchema = void 0;
|
|
3823
|
+
|
|
3442
3824
|
var visualization_icons_1 = __webpack_require__(52);
|
|
3443
|
-
|
|
3825
|
+
|
|
3826
|
+
var placeholders_1 = __webpack_require__(50);
|
|
3827
|
+
|
|
3444
3828
|
var schemaUtils_1 = __webpack_require__(16);
|
|
3829
|
+
|
|
3445
3830
|
var i18n_1 = __webpack_require__(2);
|
|
3831
|
+
|
|
3446
3832
|
var pick_1 = __webpack_require__(23);
|
|
3833
|
+
|
|
3447
3834
|
var variables_1 = __webpack_require__(11);
|
|
3835
|
+
|
|
3448
3836
|
var visualization_color_palettes_1 = __webpack_require__(51);
|
|
3837
|
+
|
|
3449
3838
|
var lodash_1 = __webpack_require__(3);
|
|
3839
|
+
|
|
3450
3840
|
var VizBehavior_1 = __webpack_require__(6);
|
|
3451
|
-
|
|
3841
|
+
|
|
3842
|
+
var VizCategory_1 = __webpack_require__(36);
|
|
3843
|
+
|
|
3452
3844
|
var configUtils_1 = __webpack_require__(20);
|
|
3453
|
-
|
|
3454
|
-
var
|
|
3455
|
-
|
|
3456
|
-
var
|
|
3457
|
-
|
|
3458
|
-
var
|
|
3459
|
-
|
|
3845
|
+
|
|
3846
|
+
var AxesChartDataConfig_1 = __webpack_require__(74);
|
|
3847
|
+
|
|
3848
|
+
var AxesChartDataDisplay_1 = __webpack_require__(89);
|
|
3849
|
+
|
|
3850
|
+
var AxesChartColorAndStyle_1 = __webpack_require__(75);
|
|
3851
|
+
|
|
3852
|
+
var AxesChartLegend_1 = __webpack_require__(76);
|
|
3853
|
+
|
|
3854
|
+
var AxesChartXGridAndLabels_1 = __webpack_require__(77);
|
|
3855
|
+
|
|
3856
|
+
var AxesChartYGridAndLabels_1 = __webpack_require__(78);
|
|
3857
|
+
|
|
3858
|
+
var AxesChartY2GridAndLabels_1 = __webpack_require__(90);
|
|
3859
|
+
|
|
3460
3860
|
var dataContract = {
|
|
3461
3861
|
requiredDataSources: [{
|
|
3462
3862
|
name: 'primary',
|
|
@@ -3554,13 +3954,13 @@ exports.optionsSchema = {
|
|
|
3554
3954
|
dataValuesDisplay: {
|
|
3555
3955
|
description: 'Specify the labels to display. Enter "all" to show labels for all data points, "off" to show no labels, or "minmax" to show high and low values.',
|
|
3556
3956
|
type: 'string',
|
|
3557
|
-
pattern: schemaUtils_1.getPattern(['off', 'all', 'minmax']),
|
|
3957
|
+
pattern: (0, schemaUtils_1.getPattern)(['off', 'all', 'minmax']),
|
|
3558
3958
|
default: 'off'
|
|
3559
3959
|
},
|
|
3560
3960
|
columnGrouping: {
|
|
3561
3961
|
default: 'auto',
|
|
3562
3962
|
description: 'Specify a column grouping mode. If chart.stackMode is defined, it overrides grouping mode settings.',
|
|
3563
|
-
pattern: schemaUtils_1.getPattern(['auto', 'overlay']),
|
|
3963
|
+
pattern: (0, schemaUtils_1.getPattern)(['auto', 'overlay']),
|
|
3564
3964
|
type: 'string'
|
|
3565
3965
|
},
|
|
3566
3966
|
columnSpacing: {
|
|
@@ -3569,7 +3969,7 @@ exports.optionsSchema = {
|
|
|
3569
3969
|
},
|
|
3570
3970
|
legendDisplay: {
|
|
3571
3971
|
description: 'Specify the location of the legend on the panel.',
|
|
3572
|
-
pattern: schemaUtils_1.getPattern(['right', 'left', 'top', 'bottom', 'off']),
|
|
3972
|
+
pattern: (0, schemaUtils_1.getPattern)(['right', 'left', 'top', 'bottom', 'off']),
|
|
3573
3973
|
type: 'string',
|
|
3574
3974
|
default: 'right'
|
|
3575
3975
|
},
|
|
@@ -3583,12 +3983,12 @@ exports.optionsSchema = {
|
|
|
3583
3983
|
legendMode: {
|
|
3584
3984
|
default: 'standard',
|
|
3585
3985
|
description: 'Specify visual and behavioral settings for the tooltip and legend. "seriesCompare" is useful when comparing series.',
|
|
3586
|
-
pattern: schemaUtils_1.getPattern(['standard', 'seriesCompare']),
|
|
3986
|
+
pattern: (0, schemaUtils_1.getPattern)(['standard', 'seriesCompare']),
|
|
3587
3987
|
type: 'string'
|
|
3588
3988
|
},
|
|
3589
3989
|
legendTruncation: {
|
|
3590
3990
|
description: 'Specify how to display legend labels when they overflow the layout boundaries by replacing overflow text with an ellipsis.',
|
|
3591
|
-
pattern: schemaUtils_1.getPattern(['ellipsisEnd', 'ellipsisMiddle', 'ellipsisStart', 'ellipsisOff']),
|
|
3991
|
+
pattern: (0, schemaUtils_1.getPattern)(['ellipsisEnd', 'ellipsisMiddle', 'ellipsisStart', 'ellipsisOff']),
|
|
3592
3992
|
type: 'string',
|
|
3593
3993
|
default: 'ellipsisEnd'
|
|
3594
3994
|
},
|
|
@@ -3621,7 +4021,7 @@ exports.optionsSchema = {
|
|
|
3621
4021
|
stackMode: {
|
|
3622
4022
|
description: 'Specify stack mode.',
|
|
3623
4023
|
type: 'string',
|
|
3624
|
-
pattern: schemaUtils_1.getPattern(['auto', 'stacked', 'stacked100']),
|
|
4024
|
+
pattern: (0, schemaUtils_1.getPattern)(['auto', 'stacked', 'stacked100']),
|
|
3625
4025
|
default: 'auto'
|
|
3626
4026
|
},
|
|
3627
4027
|
showIndependentYRanges: {
|
|
@@ -3687,41 +4087,41 @@ exports.optionsSchema = {
|
|
|
3687
4087
|
},
|
|
3688
4088
|
xAxisLabelVisibility: {
|
|
3689
4089
|
description: 'Specify whether to show labels on the x-axis.',
|
|
3690
|
-
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
4090
|
+
pattern: (0, schemaUtils_1.getPattern)(['auto', 'show', 'hide']),
|
|
3691
4091
|
type: 'string',
|
|
3692
4092
|
default: 'auto'
|
|
3693
4093
|
},
|
|
3694
4094
|
yAxisLabelVisibility: {
|
|
3695
4095
|
default: 'auto',
|
|
3696
4096
|
description: 'Specify whether to show labels on the y-axis.',
|
|
3697
|
-
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
4097
|
+
pattern: (0, schemaUtils_1.getPattern)(['auto', 'show', 'hide']),
|
|
3698
4098
|
type: 'string'
|
|
3699
4099
|
},
|
|
3700
4100
|
y2AxisLabelVisibility: {
|
|
3701
4101
|
default: 'auto',
|
|
3702
4102
|
description: 'Specify whether to show labels on the second y-axis.',
|
|
3703
|
-
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
4103
|
+
pattern: (0, schemaUtils_1.getPattern)(['auto', 'show', 'hide']),
|
|
3704
4104
|
type: 'string'
|
|
3705
4105
|
},
|
|
3706
4106
|
xAxisLineVisibility: {
|
|
3707
4107
|
default: 'hide',
|
|
3708
4108
|
description: 'Specify whether to show the x-axis line.',
|
|
3709
4109
|
enum: ['hide', 'show'],
|
|
3710
|
-
pattern: schemaUtils_1.getPattern(['show', 'hide']),
|
|
4110
|
+
pattern: (0, schemaUtils_1.getPattern)(['show', 'hide']),
|
|
3711
4111
|
type: 'string'
|
|
3712
4112
|
},
|
|
3713
4113
|
yAxisLineVisibility: {
|
|
3714
4114
|
default: 'hide',
|
|
3715
4115
|
description: 'Specify whether to show the y-axis line.',
|
|
3716
4116
|
enum: ['hide', 'show'],
|
|
3717
|
-
pattern: schemaUtils_1.getPattern(['show', 'hide']),
|
|
4117
|
+
pattern: (0, schemaUtils_1.getPattern)(['show', 'hide']),
|
|
3718
4118
|
type: 'string'
|
|
3719
4119
|
},
|
|
3720
4120
|
y2AxisLineVisibility: {
|
|
3721
4121
|
default: 'hide',
|
|
3722
4122
|
description: 'Specify whether to show the second y-axis line.',
|
|
3723
4123
|
enum: ['hide', 'show'],
|
|
3724
|
-
pattern: schemaUtils_1.getPattern(['show', 'hide']),
|
|
4124
|
+
pattern: (0, schemaUtils_1.getPattern)(['show', 'hide']),
|
|
3725
4125
|
type: 'string'
|
|
3726
4126
|
},
|
|
3727
4127
|
xAxisMajorTickSize: {
|
|
@@ -3752,31 +4152,31 @@ exports.optionsSchema = {
|
|
|
3752
4152
|
xAxisMajorTickVisibility: {
|
|
3753
4153
|
default: 'auto',
|
|
3754
4154
|
description: 'Specify whether to show major tick marks on the x-axis.',
|
|
3755
|
-
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
4155
|
+
pattern: (0, schemaUtils_1.getPattern)(['auto', 'show', 'hide']),
|
|
3756
4156
|
type: 'string'
|
|
3757
4157
|
},
|
|
3758
4158
|
yAxisMajorTickVisibility: {
|
|
3759
4159
|
default: 'auto',
|
|
3760
4160
|
description: 'Specify whether to show major tick marks on the y-axis.',
|
|
3761
|
-
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
4161
|
+
pattern: (0, schemaUtils_1.getPattern)(['auto', 'show', 'hide']),
|
|
3762
4162
|
type: 'string'
|
|
3763
4163
|
},
|
|
3764
4164
|
y2AxisMajorTickVisibility: {
|
|
3765
4165
|
default: 'auto',
|
|
3766
4166
|
description: 'Specify whether to show major tick marks on the second y-axis.',
|
|
3767
|
-
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
4167
|
+
pattern: (0, schemaUtils_1.getPattern)(['auto', 'show', 'hide']),
|
|
3768
4168
|
type: 'string'
|
|
3769
4169
|
},
|
|
3770
4170
|
yAxisMinorTickVisibility: {
|
|
3771
4171
|
default: 'auto',
|
|
3772
4172
|
description: 'Specify whether to show minor tick marks on the y-axis.',
|
|
3773
|
-
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
4173
|
+
pattern: (0, schemaUtils_1.getPattern)(['auto', 'show', 'hide']),
|
|
3774
4174
|
type: 'string'
|
|
3775
4175
|
},
|
|
3776
4176
|
y2AxisMinorTickVisibility: {
|
|
3777
4177
|
default: 'auto',
|
|
3778
4178
|
description: 'Specify whether to show minor tick marks on the second y-axis.',
|
|
3779
|
-
pattern: schemaUtils_1.getPattern(['auto', 'show', 'hide']),
|
|
4179
|
+
pattern: (0, schemaUtils_1.getPattern)(['auto', 'show', 'hide']),
|
|
3780
4180
|
type: 'string'
|
|
3781
4181
|
},
|
|
3782
4182
|
xAxisMaxLabelParts: {
|
|
@@ -3788,13 +4188,13 @@ exports.optionsSchema = {
|
|
|
3788
4188
|
},
|
|
3789
4189
|
yAxisScale: {
|
|
3790
4190
|
type: 'string',
|
|
3791
|
-
pattern: schemaUtils_1.getPattern(['linear', 'log']),
|
|
4191
|
+
pattern: (0, schemaUtils_1.getPattern)(['linear', 'log']),
|
|
3792
4192
|
description: 'Specify the type of scale that applies to a numerical y-axis.',
|
|
3793
4193
|
default: 'linear'
|
|
3794
4194
|
},
|
|
3795
4195
|
y2AxisScale: {
|
|
3796
4196
|
type: 'string',
|
|
3797
|
-
pattern: schemaUtils_1.getPattern(['linear', 'log']),
|
|
4197
|
+
pattern: (0, schemaUtils_1.getPattern)(['linear', 'log']),
|
|
3798
4198
|
description: 'Specify the type of scale that applies to a numerical second y-axis.',
|
|
3799
4199
|
default: 'linear'
|
|
3800
4200
|
},
|
|
@@ -3814,35 +4214,35 @@ exports.optionsSchema = {
|
|
|
3814
4214
|
default: 'show',
|
|
3815
4215
|
description: 'Specify whether to show the title of the x-axis.',
|
|
3816
4216
|
enum: ['hide', 'show'],
|
|
3817
|
-
pattern: schemaUtils_1.getPattern(['show', 'hide']),
|
|
4217
|
+
pattern: (0, schemaUtils_1.getPattern)(['show', 'hide']),
|
|
3818
4218
|
type: 'string'
|
|
3819
4219
|
},
|
|
3820
4220
|
yAxisTitleVisibility: {
|
|
3821
4221
|
default: 'show',
|
|
3822
4222
|
description: 'Specify whether to show the title of the y-axis.',
|
|
3823
4223
|
enum: ['hide', 'show'],
|
|
3824
|
-
pattern: schemaUtils_1.getPattern(['show', 'hide']),
|
|
4224
|
+
pattern: (0, schemaUtils_1.getPattern)(['show', 'hide']),
|
|
3825
4225
|
type: 'string'
|
|
3826
4226
|
},
|
|
3827
4227
|
y2AxisTitleVisibility: {
|
|
3828
4228
|
default: 'show',
|
|
3829
4229
|
description: 'Specify whether to show the title of the second y-axis.',
|
|
3830
4230
|
enum: ['hide', 'show'],
|
|
3831
|
-
pattern: schemaUtils_1.getPattern(['show', 'hide']),
|
|
4231
|
+
pattern: (0, schemaUtils_1.getPattern)(['show', 'hide']),
|
|
3832
4232
|
type: 'string'
|
|
3833
4233
|
},
|
|
3834
4234
|
yAxisAbbreviation: {
|
|
3835
4235
|
default: 'auto',
|
|
3836
4236
|
description: 'Specify whether to abbreviate large y-axis values with the closest International System of Units (SI) prefix.',
|
|
3837
4237
|
enum: ['auto', 'off'],
|
|
3838
|
-
pattern: schemaUtils_1.getPattern(['off', 'auto']),
|
|
4238
|
+
pattern: (0, schemaUtils_1.getPattern)(['off', 'auto']),
|
|
3839
4239
|
type: 'string'
|
|
3840
4240
|
},
|
|
3841
4241
|
y2AxisAbbreviation: {
|
|
3842
4242
|
default: 'auto',
|
|
3843
4243
|
description: 'Specify whether to abbreviate large second y-axis values with the closest International System of Units (SI) prefix.',
|
|
3844
4244
|
enum: ['auto', 'off'],
|
|
3845
|
-
pattern: schemaUtils_1.getPattern(['off', 'auto']),
|
|
4245
|
+
pattern: (0, schemaUtils_1.getPattern)(['off', 'auto']),
|
|
3846
4246
|
type: 'string'
|
|
3847
4247
|
},
|
|
3848
4248
|
yAxisMajorTickInterval: {
|
|
@@ -3895,7 +4295,7 @@ exports.optionsSchema = {
|
|
|
3895
4295
|
};
|
|
3896
4296
|
var themes = {
|
|
3897
4297
|
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
3898
|
-
return pick_1.default({
|
|
4298
|
+
return (0, pick_1.default)({
|
|
3899
4299
|
enterprise: {
|
|
3900
4300
|
dark: variables_1.default.black(props),
|
|
3901
4301
|
light: variables_1.default.backgroundColor(props)
|
|
@@ -3904,17 +4304,17 @@ var themes = {
|
|
|
3904
4304
|
})(props);
|
|
3905
4305
|
}
|
|
3906
4306
|
};
|
|
3907
|
-
var updatedAxesChartLegend = lodash_1.cloneDeep(AxesChartLegend_1.default);
|
|
4307
|
+
var updatedAxesChartLegend = (0, lodash_1.cloneDeep)(AxesChartLegend_1.default);
|
|
3908
4308
|
updatedAxesChartLegend.layout.push([{
|
|
3909
|
-
label: i18n_1._('Legend mode'),
|
|
4309
|
+
label: (0, i18n_1._)('Legend mode'),
|
|
3910
4310
|
option: 'legendMode',
|
|
3911
4311
|
editor: 'editor.radioBar',
|
|
3912
4312
|
editorProps: {
|
|
3913
4313
|
values: [{
|
|
3914
|
-
label: i18n_1._('Standard'),
|
|
4314
|
+
label: (0, i18n_1._)('Standard'),
|
|
3915
4315
|
value: 'standard'
|
|
3916
4316
|
}, {
|
|
3917
|
-
label: i18n_1._('Compare series'),
|
|
4317
|
+
label: (0, i18n_1._)('Compare series'),
|
|
3918
4318
|
value: 'seriesCompare'
|
|
3919
4319
|
}]
|
|
3920
4320
|
}
|
|
@@ -3922,15 +4322,15 @@ updatedAxesChartLegend.layout.push([{
|
|
|
3922
4322
|
var editorConfig = [AxesChartDataConfig_1.AxesChartDataConfigAreaColumnLine, AxesChartDataDisplay_1.AxesChartDataDisplayColumn, {
|
|
3923
4323
|
label: AxesChartColorAndStyle_1.default.label,
|
|
3924
4324
|
layout: [].concat(_toConsumableArray(AxesChartColorAndStyle_1.default.layout), [[{
|
|
3925
|
-
label: i18n_1._('Spacing between column series'),
|
|
4325
|
+
label: (0, i18n_1._)('Spacing between column series'),
|
|
3926
4326
|
option: 'seriesSpacing',
|
|
3927
4327
|
editor: 'editor.number'
|
|
3928
4328
|
}], [{
|
|
3929
|
-
label: i18n_1._('Spacing between columns'),
|
|
4329
|
+
label: (0, i18n_1._)('Spacing between columns'),
|
|
3930
4330
|
option: 'columnSpacing',
|
|
3931
4331
|
editor: 'editor.number'
|
|
3932
4332
|
}], [{
|
|
3933
|
-
label: i18n_1._('Line width'),
|
|
4333
|
+
label: (0, i18n_1._)('Line width'),
|
|
3934
4334
|
option: 'lineWidth',
|
|
3935
4335
|
editor: 'editor.slider',
|
|
3936
4336
|
editorProps: {
|
|
@@ -3943,7 +4343,7 @@ var editorConfig = [AxesChartDataConfig_1.AxesChartDataConfigAreaColumnLine, Axe
|
|
|
3943
4343
|
return Array.isArray(options.overlayFields) && options.overlayFields.length > 0;
|
|
3944
4344
|
}
|
|
3945
4345
|
}], [{
|
|
3946
|
-
label: i18n_1._('Annotation colors'),
|
|
4346
|
+
label: (0, i18n_1._)('Annotation colors'),
|
|
3947
4347
|
option: 'annotationColor',
|
|
3948
4348
|
editor: 'editor.columnSelector',
|
|
3949
4349
|
editorProps: {
|
|
@@ -3956,16 +4356,19 @@ var editorConfig = [AxesChartDataConfig_1.AxesChartDataConfigAreaColumnLine, Axe
|
|
|
3956
4356
|
/**
|
|
3957
4357
|
* visualization configuration
|
|
3958
4358
|
*/
|
|
4359
|
+
|
|
3959
4360
|
var config = {
|
|
3960
4361
|
/**
|
|
3961
4362
|
* unique viz key
|
|
3962
4363
|
*/
|
|
3963
4364
|
key: 'splunk.column',
|
|
4365
|
+
|
|
3964
4366
|
/**
|
|
3965
4367
|
* viz name
|
|
3966
4368
|
*/
|
|
3967
|
-
name: i18n_1._('Column'),
|
|
4369
|
+
name: (0, i18n_1._)('Column'),
|
|
3968
4370
|
category: VizCategory_1.VizCategory.TRENDS,
|
|
4371
|
+
|
|
3969
4372
|
/**
|
|
3970
4373
|
* viz icon
|
|
3971
4374
|
*/
|
|
@@ -3996,10 +4399,10 @@ var config = {
|
|
|
3996
4399
|
supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.PLACEHOLDER],
|
|
3997
4400
|
themes: themes
|
|
3998
4401
|
};
|
|
3999
|
-
exports.default = configUtils_1.enhanceConfig(config);
|
|
4402
|
+
exports.default = (0, configUtils_1.enhanceConfig)(config);
|
|
4000
4403
|
|
|
4001
4404
|
/***/ }),
|
|
4002
|
-
/*
|
|
4405
|
+
/* 199 */
|
|
4003
4406
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4004
4407
|
|
|
4005
4408
|
"use strict";
|
|
@@ -4009,10 +4412,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4009
4412
|
value: true
|
|
4010
4413
|
});
|
|
4011
4414
|
exports.convertToColumnSCProperties = exports.mapToOldKey = exports.convertToStringValues = exports.convertAuto = exports.convertTitleVisibilityOptions = exports.convertYAxisLabelOptions = exports.convertLegendDisplayOptions = exports.columnOptionValuesSCMapping = void 0;
|
|
4415
|
+
|
|
4012
4416
|
var lodash_1 = __webpack_require__(3);
|
|
4013
|
-
|
|
4014
|
-
var
|
|
4015
|
-
|
|
4417
|
+
|
|
4418
|
+
var propUtils_1 = __webpack_require__(29);
|
|
4419
|
+
|
|
4420
|
+
var chartingUtils_1 = __webpack_require__(56); // map for key names which are either new or not present in SimpleXML options mapping
|
|
4421
|
+
|
|
4422
|
+
|
|
4016
4423
|
var columnOptionsSCMapping = {
|
|
4017
4424
|
dataValuesDisplay: 'showDataLabels',
|
|
4018
4425
|
showYAxisWithZero: 'yAxisIncludeZero',
|
|
@@ -4041,8 +4448,8 @@ var columnOptionsSCMapping = {
|
|
|
4041
4448
|
xAxisLineVisibility: 'xAxisVisibility',
|
|
4042
4449
|
yAxisLineVisibility: 'yAxisVisibility',
|
|
4043
4450
|
y2AxisLineVisibility: 'y2AxisVisibility'
|
|
4044
|
-
};
|
|
4045
|
-
|
|
4451
|
+
}; // key value mapping of what options (and their corresponding values) which we expose in config.ts to property values SC understands
|
|
4452
|
+
|
|
4046
4453
|
exports.columnOptionValuesSCMapping = {
|
|
4047
4454
|
xAxisTitleVisibility: {
|
|
4048
4455
|
hide: 'collapsed'
|
|
@@ -4078,17 +4485,20 @@ exports.columnOptionValuesSCMapping = {
|
|
|
4078
4485
|
* @param {Object} originalOptions
|
|
4079
4486
|
* @returns {Object}
|
|
4080
4487
|
*/
|
|
4488
|
+
|
|
4081
4489
|
var convertLegendDisplayOptions = function convertLegendDisplayOptions() {
|
|
4082
4490
|
var originalOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4083
4491
|
var convertedOptions = Object.assign({}, originalOptions);
|
|
4084
4492
|
['legendPlacement', 'legendLabelOverflowMode'].forEach(function (key) {
|
|
4085
4493
|
var updatedValue = exports.columnOptionValuesSCMapping[key][originalOptions[key]];
|
|
4494
|
+
|
|
4086
4495
|
if (updatedValue) {
|
|
4087
4496
|
convertedOptions[key] = updatedValue;
|
|
4088
4497
|
}
|
|
4089
4498
|
});
|
|
4090
4499
|
return convertedOptions;
|
|
4091
4500
|
};
|
|
4501
|
+
|
|
4092
4502
|
exports.convertLegendDisplayOptions = convertLegendDisplayOptions;
|
|
4093
4503
|
/**
|
|
4094
4504
|
* Helper function to convert values for Y axis label options
|
|
@@ -4096,14 +4506,18 @@ exports.convertLegendDisplayOptions = convertLegendDisplayOptions;
|
|
|
4096
4506
|
* @param {Object} originalOptions
|
|
4097
4507
|
* @returns {Object}
|
|
4098
4508
|
*/
|
|
4509
|
+
|
|
4099
4510
|
var convertYAxisLabelOptions = function convertYAxisLabelOptions(originalOptions) {
|
|
4100
4511
|
var convertedOptions = Object.assign({}, originalOptions);
|
|
4101
4512
|
var updatedValue = exports.columnOptionValuesSCMapping.yAxisAbbreviation[originalOptions.yAxisAbbreviation];
|
|
4513
|
+
|
|
4102
4514
|
if (updatedValue) {
|
|
4103
4515
|
convertedOptions.yAxisAbbreviation = updatedValue;
|
|
4104
4516
|
}
|
|
4517
|
+
|
|
4105
4518
|
return convertedOptions;
|
|
4106
4519
|
};
|
|
4520
|
+
|
|
4107
4521
|
exports.convertYAxisLabelOptions = convertYAxisLabelOptions;
|
|
4108
4522
|
/**
|
|
4109
4523
|
* Helper method to process options related to title visibility
|
|
@@ -4111,6 +4525,7 @@ exports.convertYAxisLabelOptions = convertYAxisLabelOptions;
|
|
|
4111
4525
|
* @param {Object} originalOptions
|
|
4112
4526
|
* @returns {Object}
|
|
4113
4527
|
*/
|
|
4528
|
+
|
|
4114
4529
|
var convertTitleVisibilityOptions = function convertTitleVisibilityOptions(originalOptions) {
|
|
4115
4530
|
var convertedOptions = Object.assign({}, originalOptions);
|
|
4116
4531
|
['xAxisTitleVisibility', 'yAxisTitleVisibility', 'y2AxisTitleVisibility'].forEach(function (key) {
|
|
@@ -4120,6 +4535,7 @@ var convertTitleVisibilityOptions = function convertTitleVisibilityOptions(origi
|
|
|
4120
4535
|
});
|
|
4121
4536
|
return convertedOptions;
|
|
4122
4537
|
};
|
|
4538
|
+
|
|
4123
4539
|
exports.convertTitleVisibilityOptions = convertTitleVisibilityOptions;
|
|
4124
4540
|
/**
|
|
4125
4541
|
* Helper method to convert 'auto' to default
|
|
@@ -4127,6 +4543,7 @@ exports.convertTitleVisibilityOptions = convertTitleVisibilityOptions;
|
|
|
4127
4543
|
* @param {Object} originalOptions
|
|
4128
4544
|
* @returns {Object}
|
|
4129
4545
|
*/
|
|
4546
|
+
|
|
4130
4547
|
var convertAuto = function convertAuto(originalOptions) {
|
|
4131
4548
|
var convertedOptions = Object.assign({}, originalOptions);
|
|
4132
4549
|
['stackMode'].forEach(function (key) {
|
|
@@ -4136,6 +4553,7 @@ var convertAuto = function convertAuto(originalOptions) {
|
|
|
4136
4553
|
});
|
|
4137
4554
|
return convertedOptions;
|
|
4138
4555
|
};
|
|
4556
|
+
|
|
4139
4557
|
exports.convertAuto = convertAuto;
|
|
4140
4558
|
/**
|
|
4141
4559
|
* Converts defined option values to string if present
|
|
@@ -4143,13 +4561,15 @@ exports.convertAuto = convertAuto;
|
|
|
4143
4561
|
* @param {Object} options
|
|
4144
4562
|
* @returns {Object}
|
|
4145
4563
|
*/
|
|
4564
|
+
|
|
4146
4565
|
var convertToStringValues = function convertToStringValues(options) {
|
|
4147
|
-
var updatedOptions = propUtils_1.convertPropsToString({
|
|
4566
|
+
var updatedOptions = (0, propUtils_1.convertPropsToString)({
|
|
4148
4567
|
vizProps: options,
|
|
4149
4568
|
propNames: ['seriesColors', 'fieldColors', 'legendLabels']
|
|
4150
4569
|
});
|
|
4151
4570
|
return Object.assign(Object.assign({}, options), updatedOptions);
|
|
4152
4571
|
};
|
|
4572
|
+
|
|
4153
4573
|
exports.convertToStringValues = convertToStringValues;
|
|
4154
4574
|
/**
|
|
4155
4575
|
* Helper method to update the option names which can be mapped to SimpleXML options or
|
|
@@ -4158,11 +4578,13 @@ exports.convertToStringValues = convertToStringValues;
|
|
|
4158
4578
|
* @param options
|
|
4159
4579
|
* @returns
|
|
4160
4580
|
*/
|
|
4581
|
+
|
|
4161
4582
|
var mapToOldKey = function mapToOldKey(options) {
|
|
4162
|
-
return lodash_1.mapKeys(options, function (val, key) {
|
|
4583
|
+
return (0, lodash_1.mapKeys)(options, function (val, key) {
|
|
4163
4584
|
return columnOptionsSCMapping[key] ? columnOptionsSCMapping[key] : key;
|
|
4164
4585
|
});
|
|
4165
4586
|
};
|
|
4587
|
+
|
|
4166
4588
|
exports.mapToOldKey = mapToOldKey;
|
|
4167
4589
|
/**
|
|
4168
4590
|
* Chained helper for mapping the option properties (and values) we expose in config.ts into property values that splunk-charting accepts
|
|
@@ -4172,9 +4594,11 @@ exports.mapToOldKey = mapToOldKey;
|
|
|
4172
4594
|
* @param originalOptions
|
|
4173
4595
|
* @returns
|
|
4174
4596
|
*/
|
|
4597
|
+
|
|
4175
4598
|
var convertToColumnSCProperties = function convertToColumnSCProperties(originalOptions) {
|
|
4176
|
-
return lodash_1.chain(exports.mapToOldKey(originalOptions)).thru(chartingUtils_1.mapToValues(exports.columnOptionValuesSCMapping)).thru(chartingUtils_1.convertY2AxisOptions).thru(chartingUtils_1.convertOverlayFields).thru(exports.convertTitleVisibilityOptions).thru(exports.convertLegendDisplayOptions).thru(exports.convertToStringValues).thru(exports.convertAuto).thru(exports.convertYAxisLabelOptions).value();
|
|
4599
|
+
return (0, lodash_1.chain)((0, exports.mapToOldKey)(originalOptions)).thru((0, chartingUtils_1.mapToValues)(exports.columnOptionValuesSCMapping)).thru(chartingUtils_1.convertY2AxisOptions).thru(chartingUtils_1.convertOverlayFields).thru(exports.convertTitleVisibilityOptions).thru(exports.convertLegendDisplayOptions).thru(exports.convertToStringValues).thru(exports.convertAuto).thru(exports.convertYAxisLabelOptions).value();
|
|
4177
4600
|
};
|
|
4601
|
+
|
|
4178
4602
|
exports.convertToColumnSCProperties = convertToColumnSCProperties;
|
|
4179
4603
|
|
|
4180
4604
|
/***/ })
|