@splunk/visualizations 25.0.1 → 25.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/.loki/reference/chrome_docker_PureVisualizations_PureMap_custom_base_layer_tile_server.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Area_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bar_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bubble_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_ChoroplethSvg_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Column_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Ellipse_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_FillerGauge_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Image_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Line_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_LinkGraph_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Markdown_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_MarkerGauge_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Parallel_Coordinates_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Pie_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Punchcard_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Rectangle_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Sankey_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Scatter_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Icon_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Radial_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Table_Editor.png +0 -0
- package/Area.config.js +141 -152
- package/Area.config.js.map +1 -1
- package/Area.js +334 -431
- package/Area.js.map +1 -1
- package/Bar.config.js +143 -148
- package/Bar.config.js.map +1 -1
- package/Bar.js +336 -427
- package/Bar.js.map +1 -1
- package/Bubble.config.js +130 -117
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +325 -398
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +86 -80
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +305 -385
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +139 -146
- package/Column.config.js.map +1 -1
- package/Column.js +332 -425
- package/Column.js.map +1 -1
- package/Ellipse.config.js +86 -80
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +288 -368
- package/Ellipse.js.map +1 -1
- package/FillerGauge.config.js +91 -85
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +296 -376
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +74 -74
- package/Image.config.js.map +1 -1
- package/Image.js +710 -798
- package/Image.js.map +1 -1
- package/Line.config.js +139 -137
- package/Line.config.js.map +1 -1
- package/Line.js +332 -416
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +112 -112
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +320 -405
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +101 -95
- package/Map.config.js.map +1 -1
- package/Map.js +472 -518
- package/Map.js.map +1 -1
- package/Markdown.config.js +113 -113
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +500 -574
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +192 -193
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +1200 -1289
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +138 -138
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +292 -376
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +133 -133
- package/Pie.config.js.map +1 -1
- package/Pie.js +496 -584
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +139 -139
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +315 -399
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +267 -260
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +499 -580
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +150 -143
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +316 -390
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +130 -117
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +547 -623
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +119 -113
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +523 -604
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +19 -19
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +128 -120
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +343 -420
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +215 -178
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +668 -749
- package/SingleValueRadial.js.map +1 -1
- package/Table.config.js +150 -151
- package/Table.config.js.map +1 -1
- package/Table.js +772 -854
- package/Table.js.map +1 -1
- package/common/Charting.js +11 -11
- package/common/Charting.js.map +1 -1
- package/common/ChartingApi.js +2 -2
- package/common/ChartingApi.js.map +1 -1
- package/common/EventsDoc.js +12 -12
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +8 -8
- package/common/GaugeMajorTicks.js.map +1 -1
- package/common/GaugeValueMarker.js +8 -8
- package/common/GaugeValueMarker.js.map +1 -1
- package/common/OptionsDoc.js +51 -352
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.js +22 -22
- package/common/OverviewDoc.js.map +1 -1
- package/common/SplunkVisualization.js +4 -4
- package/common/SplunkVisualization.js.map +1 -1
- package/common/SplunkVisualizationApi.js +2 -2
- package/common/SplunkVisualizationApi.js.map +1 -1
- package/common/ThemesDoc.js +19 -19
- package/common/ThemesDoc.js.map +1 -1
- package/common/chartingUtils.js +4 -4
- package/common/chartingUtils.js.map +1 -1
- package/common/docUtils.js +4 -4
- package/common/docUtils.js.map +1 -1
- package/common/gaugeUtils.js +13 -13
- package/common/gaugeUtils.js.map +1 -1
- package/common/shapeUtils.js +8 -8
- package/common/shapeUtils.js.map +1 -1
- package/common/utils/configUtils.js +17 -18
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/hocUtils.js +6 -86
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/{JSONSchemaUtils.js → mapUtils.js} +89 -29
- package/common/utils/mapUtils.js.map +1 -0
- package/common/utils/singleValueUtils.js +14 -12
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +8 -8
- package/common/utils/testHelper.js.map +1 -1
- package/common/withDashboardViz.js +120 -207
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +12 -12
- package/.loki/reference/chrome_docker_PureVisualizations_SvgChoroplethDynamic_SVG_Of_Size_Greater_Than_2_MB_Render.png +0 -0
- package/common/utils/JSONSchemaUtils.js.map +0 -1
package/Scatter.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 = 254);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -109,32 +109,148 @@ module.exports = require("react");
|
|
|
109
109
|
/***/ 10:
|
|
110
110
|
/***/ (function(module, exports) {
|
|
111
111
|
|
|
112
|
-
module.exports = require("@
|
|
112
|
+
module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
113
113
|
|
|
114
114
|
/***/ }),
|
|
115
115
|
|
|
116
116
|
/***/ 11:
|
|
117
117
|
/***/ (function(module, exports) {
|
|
118
118
|
|
|
119
|
-
module.exports = require("@splunk/visualizations-shared/
|
|
119
|
+
module.exports = require("@splunk/visualizations-shared/colorUtils");
|
|
120
120
|
|
|
121
121
|
/***/ }),
|
|
122
122
|
|
|
123
123
|
/***/ 12:
|
|
124
|
-
/***/ (function(module, exports) {
|
|
124
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
"use strict";
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
Object.defineProperty(exports, "__esModule", {
|
|
130
|
+
value: true
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
var React = __webpack_require__(1);
|
|
134
|
+
|
|
135
|
+
var styled_components_1 = __webpack_require__(4);
|
|
136
|
+
|
|
137
|
+
var SizeAwareWrapper_1 = __webpack_require__(19);
|
|
138
|
+
|
|
139
|
+
var style_1 = __webpack_require__(14);
|
|
140
|
+
|
|
141
|
+
var colorUtils_1 = __webpack_require__(11);
|
|
142
|
+
|
|
143
|
+
var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
144
|
+
var width = _ref.width;
|
|
145
|
+
return {
|
|
146
|
+
style: {
|
|
147
|
+
width: style_1.toPx(width)
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
}).withConfig({
|
|
151
|
+
displayName: "FixedSizeContainer__Item",
|
|
152
|
+
componentId: "sc-1yhgpod-0"
|
|
153
|
+
})(["position:relative;background-color:", "};"], function (props) {
|
|
154
|
+
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
155
|
+
}); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
|
|
156
|
+
|
|
157
|
+
var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
|
|
158
|
+
var width = _ref2.width,
|
|
159
|
+
height = _ref2.height;
|
|
160
|
+
return {
|
|
161
|
+
style: Object.assign(Object.assign({}, width && {
|
|
162
|
+
width: style_1.toPx(width)
|
|
163
|
+
}), height && {
|
|
164
|
+
height: style_1.toPx(height)
|
|
165
|
+
})
|
|
166
|
+
};
|
|
167
|
+
}).withConfig({
|
|
168
|
+
displayName: "FixedSizeContainer__FixSizeItem",
|
|
169
|
+
componentId: "sc-1yhgpod-1"
|
|
170
|
+
})(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
|
|
171
|
+
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
172
|
+
});
|
|
173
|
+
var ItemContent = styled_components_1.default.div.withConfig({
|
|
174
|
+
displayName: "FixedSizeContainer__ItemContent",
|
|
175
|
+
componentId: "sc-1yhgpod-2"
|
|
176
|
+
})(["position:relative;min-height:100px;width:100%;"]);
|
|
177
|
+
var FixSizeItemContent = styled_components_1.default.div.withConfig({
|
|
178
|
+
displayName: "FixedSizeContainer__FixSizeItemContent",
|
|
179
|
+
componentId: "sc-1yhgpod-3"
|
|
180
|
+
})(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
|
|
181
|
+
|
|
182
|
+
var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
183
|
+
var FixedSizeContainer = function FixedSizeContainer(props) {
|
|
184
|
+
var width = props.width,
|
|
185
|
+
height = props.height,
|
|
186
|
+
backgroundColor = props.backgroundColor;
|
|
187
|
+
|
|
188
|
+
if (!height) {
|
|
189
|
+
return React.createElement(Item, {
|
|
190
|
+
"data-test": "item",
|
|
191
|
+
width: width,
|
|
192
|
+
backgroundColor: backgroundColor
|
|
193
|
+
}, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return React.createElement(FixSizeItem, {
|
|
197
|
+
"data-test": "fix-size-item",
|
|
198
|
+
"data-splunk-visualization-version": "25.1.0 - 812a9a4d8",
|
|
199
|
+
width: width,
|
|
200
|
+
height: height,
|
|
201
|
+
backgroundColor: backgroundColor
|
|
202
|
+
}, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
|
|
203
|
+
var newWidth = _ref3.width,
|
|
204
|
+
newHeight = _ref3.height;
|
|
205
|
+
return React.createElement(Viz, Object.assign({}, props, {
|
|
206
|
+
width: newWidth,
|
|
207
|
+
height: newHeight
|
|
208
|
+
}));
|
|
209
|
+
})));
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
FixedSizeContainer.displayName = 'withFixedSizeContainer';
|
|
213
|
+
return FixedSizeContainer;
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
exports.default = withFixedSizeContainer;
|
|
127
217
|
|
|
128
218
|
/***/ }),
|
|
129
219
|
|
|
130
220
|
/***/ 13:
|
|
131
|
-
/***/ (function(module, exports) {
|
|
221
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
222
|
+
|
|
223
|
+
"use strict";
|
|
132
224
|
|
|
133
|
-
|
|
225
|
+
|
|
226
|
+
Object.defineProperty(exports, "__esModule", {
|
|
227
|
+
value: true
|
|
228
|
+
});
|
|
229
|
+
exports.extendStaticWrapperProps = void 0;
|
|
230
|
+
/**
|
|
231
|
+
* @method extendStaticWrapperProps
|
|
232
|
+
* @param {Object} props
|
|
233
|
+
* @param {DashboardVizType} props.Wrapper
|
|
234
|
+
* @param {DashboardVizType} props.Visualization
|
|
235
|
+
*/
|
|
236
|
+
|
|
237
|
+
var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
|
|
238
|
+
var Wrapper = _ref.Wrapper,
|
|
239
|
+
Visualization = _ref.Visualization;
|
|
240
|
+
var extendProperties = ['propTypes', 'defaultProps', 'config'];
|
|
241
|
+
extendProperties.forEach(function (prop) {
|
|
242
|
+
if (Visualization[prop]) {
|
|
243
|
+
// eslint-disable-next-line no-param-reassign
|
|
244
|
+
Wrapper[prop] = Visualization[prop];
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
exports.extendStaticWrapperProps = extendStaticWrapperProps;
|
|
134
250
|
|
|
135
251
|
/***/ }),
|
|
136
252
|
|
|
137
|
-
/***/
|
|
253
|
+
/***/ 139:
|
|
138
254
|
/***/ (function(module, exports, __webpack_require__) {
|
|
139
255
|
|
|
140
256
|
"use strict";
|
|
@@ -158,7 +274,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
158
274
|
});
|
|
159
275
|
exports.config = exports.themes = exports.computeVizProps = void 0;
|
|
160
276
|
|
|
161
|
-
var lodash_1 = __webpack_require__(
|
|
277
|
+
var lodash_1 = __webpack_require__(3); // Charting imports i18n which needs to be run to instantiate window globals in the tests
|
|
162
278
|
// eslint-disable-next-line import/order
|
|
163
279
|
|
|
164
280
|
|
|
@@ -168,13 +284,13 @@ var charting_bundle_1 = __webpack_require__(51);
|
|
|
168
284
|
|
|
169
285
|
var simpleXMLOptions_1 = __webpack_require__(61);
|
|
170
286
|
|
|
171
|
-
var config_1 = __webpack_require__(
|
|
287
|
+
var config_1 = __webpack_require__(255);
|
|
172
288
|
|
|
173
289
|
exports.config = config_1.default;
|
|
174
290
|
|
|
175
|
-
var withDashboardViz_1 = __webpack_require__(
|
|
291
|
+
var withDashboardViz_1 = __webpack_require__(31);
|
|
176
292
|
|
|
177
|
-
var scatterUtils_1 = __webpack_require__(
|
|
293
|
+
var scatterUtils_1 = __webpack_require__(256);
|
|
178
294
|
|
|
179
295
|
var chartingUtils_1 = __webpack_require__(50);
|
|
180
296
|
|
|
@@ -253,124 +369,264 @@ exports.default = Column;
|
|
|
253
369
|
/***/ }),
|
|
254
370
|
|
|
255
371
|
/***/ 14:
|
|
372
|
+
/***/ (function(module, exports) {
|
|
373
|
+
|
|
374
|
+
module.exports = require("@splunk/visualizations-shared/style");
|
|
375
|
+
|
|
376
|
+
/***/ }),
|
|
377
|
+
|
|
378
|
+
/***/ 15:
|
|
379
|
+
/***/ (function(module, exports) {
|
|
380
|
+
|
|
381
|
+
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
382
|
+
|
|
383
|
+
/***/ }),
|
|
384
|
+
|
|
385
|
+
/***/ 16:
|
|
256
386
|
/***/ (function(module, exports, __webpack_require__) {
|
|
257
387
|
|
|
258
388
|
"use strict";
|
|
259
389
|
|
|
260
390
|
|
|
391
|
+
var _toConsumableArray = __webpack_require__(7);
|
|
392
|
+
|
|
393
|
+
var _defineProperty = __webpack_require__(6);
|
|
394
|
+
|
|
395
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
396
|
+
var t = {};
|
|
397
|
+
|
|
398
|
+
for (var p in s) {
|
|
399
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
403
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
404
|
+
}
|
|
405
|
+
return t;
|
|
406
|
+
};
|
|
407
|
+
|
|
261
408
|
Object.defineProperty(exports, "__esModule", {
|
|
262
409
|
value: true
|
|
263
410
|
});
|
|
411
|
+
exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
|
|
264
412
|
|
|
265
|
-
var
|
|
413
|
+
var lodash_1 = __webpack_require__(3);
|
|
266
414
|
|
|
267
|
-
var
|
|
415
|
+
var schemaUtils_1 = __webpack_require__(15);
|
|
268
416
|
|
|
269
|
-
var
|
|
417
|
+
var VizBehavior_1 = __webpack_require__(5);
|
|
270
418
|
|
|
271
|
-
var
|
|
419
|
+
var dynamicOptionsDSLType = {
|
|
420
|
+
type: 'string',
|
|
421
|
+
pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
|
|
422
|
+
};
|
|
423
|
+
/**
|
|
424
|
+
* Helper function to extend an options schema with dynamic options DSL
|
|
425
|
+
* @param optionsSchema a visualization's options schema
|
|
426
|
+
* @returns an updated options schema that additionally allows strings starting with > for each option
|
|
427
|
+
*/
|
|
272
428
|
|
|
273
|
-
|
|
429
|
+
function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
430
|
+
var enhancedOptionsSchema = {};
|
|
431
|
+
Object.keys(optionsSchema).forEach(function (key) {
|
|
432
|
+
var _a = optionsSchema[key],
|
|
433
|
+
title = _a.title,
|
|
434
|
+
description = _a.description,
|
|
435
|
+
readOnly = _a.readOnly,
|
|
436
|
+
writeOnly = _a.writeOnly,
|
|
437
|
+
examples = _a.examples,
|
|
438
|
+
defaultValue = _a.default,
|
|
439
|
+
type = _a.type,
|
|
440
|
+
properties = _a.properties,
|
|
441
|
+
patternProperties = _a.patternProperties,
|
|
442
|
+
remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
|
|
274
443
|
|
|
275
|
-
var
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
444
|
+
var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
|
|
445
|
+
title: title
|
|
446
|
+
}), description !== undefined && {
|
|
447
|
+
description: description
|
|
448
|
+
}), readOnly !== undefined && {
|
|
449
|
+
readOnly: readOnly
|
|
450
|
+
}), writeOnly !== undefined && {
|
|
451
|
+
writeOnly: writeOnly
|
|
452
|
+
}), examples !== undefined && {
|
|
453
|
+
examples: examples
|
|
454
|
+
}), defaultValue !== undefined && {
|
|
455
|
+
default: defaultValue
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
if (type === 'object') {
|
|
459
|
+
enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
|
|
460
|
+
type: type
|
|
461
|
+
}), properties && {
|
|
462
|
+
properties: enhanceOptionsSchemaWithDynamicOptions(properties)
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
if (patternProperties) {
|
|
466
|
+
var enhancedPatternProperties = {};
|
|
467
|
+
Object.keys(patternProperties).forEach(function (opt) {
|
|
468
|
+
enhancedPatternProperties = Object.assign(Object.assign({}, enhancedPatternProperties), enhanceOptionsSchemaWithDynamicOptions(_defineProperty({}, opt, patternProperties[opt])));
|
|
469
|
+
});
|
|
470
|
+
enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;
|
|
471
|
+
}
|
|
472
|
+
} else {
|
|
473
|
+
enhancedOptionsSchema[key] = Object.assign(Object.assign({}, annotations), {
|
|
474
|
+
anyOf: [Object.assign(Object.assign({}, type !== undefined && {
|
|
475
|
+
type: type
|
|
476
|
+
}), remainingSchemaEntry), dynamicOptionsDSLType]
|
|
477
|
+
});
|
|
280
478
|
}
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
componentId: "sc-1yhgpod-0"
|
|
285
|
-
})(["position:relative;background-color:", "};"], function (props) {
|
|
286
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
287
|
-
}); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
|
|
479
|
+
});
|
|
480
|
+
return enhancedOptionsSchema;
|
|
481
|
+
}
|
|
288
482
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
})
|
|
298
|
-
};
|
|
299
|
-
}).withConfig({
|
|
300
|
-
displayName: "FixedSizeContainer__FixSizeItem",
|
|
301
|
-
componentId: "sc-1yhgpod-1"
|
|
302
|
-
})(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
|
|
303
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
304
|
-
});
|
|
305
|
-
var ItemContent = styled_components_1.default.div.withConfig({
|
|
306
|
-
displayName: "FixedSizeContainer__ItemContent",
|
|
307
|
-
componentId: "sc-1yhgpod-2"
|
|
308
|
-
})(["position:relative;min-height:100px;width:100%;"]);
|
|
309
|
-
var FixSizeItemContent = styled_components_1.default.div.withConfig({
|
|
310
|
-
displayName: "FixedSizeContainer__FixSizeItemContent",
|
|
311
|
-
componentId: "sc-1yhgpod-3"
|
|
312
|
-
})(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
|
|
483
|
+
exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
|
|
484
|
+
/**
|
|
485
|
+
* Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
|
|
486
|
+
* this function also collapse all editor panels
|
|
487
|
+
* @param vizConfig a Visualization Config
|
|
488
|
+
* @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
|
|
489
|
+
* and containing `open: false` for all editor panels in editorConfig
|
|
490
|
+
*/
|
|
313
491
|
|
|
314
|
-
|
|
315
|
-
var
|
|
316
|
-
var width = props.width,
|
|
317
|
-
height = props.height,
|
|
318
|
-
backgroundColor = props.backgroundColor;
|
|
492
|
+
function enhanceConfig(vizConfig) {
|
|
493
|
+
var enhancedConfig = vizConfig;
|
|
319
494
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
width: width,
|
|
324
|
-
backgroundColor: backgroundColor
|
|
325
|
-
}, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
|
|
326
|
-
}
|
|
495
|
+
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
|
|
496
|
+
enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
|
|
497
|
+
}
|
|
327
498
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
var newWidth = _ref3.width,
|
|
336
|
-
newHeight = _ref3.height;
|
|
337
|
-
return React.createElement(Viz, Object.assign({}, props, {
|
|
338
|
-
width: newWidth,
|
|
339
|
-
height: newHeight
|
|
340
|
-
}));
|
|
341
|
-
})));
|
|
342
|
-
};
|
|
499
|
+
enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
500
|
+
return Object.assign(Object.assign({}, config), {
|
|
501
|
+
open: false
|
|
502
|
+
});
|
|
503
|
+
});
|
|
504
|
+
return enhancedConfig;
|
|
505
|
+
}
|
|
343
506
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
507
|
+
exports.enhanceConfig = enhanceConfig;
|
|
508
|
+
/**
|
|
509
|
+
* Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
|
|
510
|
+
* Created for editor unit tests
|
|
511
|
+
* @param vizConfig a Visualization Config
|
|
512
|
+
* @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
|
|
513
|
+
*/
|
|
347
514
|
|
|
348
|
-
|
|
515
|
+
function uncollapseEditorConfig(vizConfig) {
|
|
516
|
+
var editorPanelUncollapsedConfig = vizConfig;
|
|
517
|
+
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
518
|
+
return Object.assign(Object.assign({}, config), {
|
|
519
|
+
open: true
|
|
520
|
+
});
|
|
521
|
+
});
|
|
522
|
+
return editorPanelUncollapsedConfig;
|
|
523
|
+
}
|
|
349
524
|
|
|
350
|
-
|
|
525
|
+
exports.uncollapseEditorConfig = uncollapseEditorConfig;
|
|
351
526
|
|
|
352
|
-
|
|
353
|
-
|
|
527
|
+
function isDynamicOption(option) {
|
|
528
|
+
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
529
|
+
}
|
|
354
530
|
|
|
355
|
-
|
|
531
|
+
exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
|
|
532
|
+
// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
|
|
356
533
|
|
|
357
|
-
|
|
534
|
+
/**
|
|
535
|
+
* this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
|
|
536
|
+
* 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
|
|
537
|
+
* the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
|
|
538
|
+
* the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up
|
|
539
|
+
*
|
|
540
|
+
* Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
|
|
541
|
+
*/
|
|
358
542
|
|
|
359
|
-
|
|
360
|
-
|
|
543
|
+
function hasCompatibleContexts(vizContext, presetContext) {
|
|
544
|
+
var presetContextKeys = Object.keys(presetContext);
|
|
545
|
+
return presetContextKeys.every(function (contextKey) {
|
|
546
|
+
return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
|
|
551
|
+
*/
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
555
|
+
var presetOptionKeys = Object.keys(presetOptions);
|
|
556
|
+
return presetOptionKeys.every(function (optionKey) {
|
|
557
|
+
return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
|
|
562
|
+
* This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
|
|
563
|
+
*
|
|
564
|
+
* @param {Object} vizContext - the current vizContext definition
|
|
565
|
+
* @param {Object} vizOptions - the current vizOptions definition
|
|
566
|
+
* @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
|
|
567
|
+
*/
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
571
|
+
return presets.find(function (preset) {
|
|
572
|
+
var presetContext = lodash_1.get(preset, ['value', 'context'], {});
|
|
573
|
+
var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
|
|
574
|
+
var presetContextKeys = Object.keys(presetContext);
|
|
575
|
+
var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
576
|
+
// if not, then the preset is invalid in config.ts
|
|
577
|
+
|
|
578
|
+
if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
|
|
579
|
+
return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
exports.getInitialPreset = getInitialPreset;
|
|
584
|
+
/**
|
|
585
|
+
* generates number precision values for a Select editor
|
|
586
|
+
*
|
|
587
|
+
* @param {Number} numPrecisionValues - number of integer precision values to generate
|
|
588
|
+
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
589
|
+
*/
|
|
590
|
+
|
|
591
|
+
function generatePrecisionValues(numPrecisionValues) {
|
|
592
|
+
return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
|
|
593
|
+
return {
|
|
594
|
+
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
595
|
+
value: i
|
|
596
|
+
};
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
exports.generatePrecisionValues = generatePrecisionValues;
|
|
601
|
+
/**
|
|
602
|
+
* insert layout in layout array, return a new layout array instead of updating the original
|
|
603
|
+
*
|
|
604
|
+
* @param {EditorLayoutConfig[][]} layout - editor layout
|
|
605
|
+
* @param {Number} index - the index to insert layout item(s)
|
|
606
|
+
* @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
|
|
607
|
+
* @returns {EditorLayoutConfig[][]} new editor layout with insertion
|
|
608
|
+
*/
|
|
609
|
+
|
|
610
|
+
var insertLayout = function insertLayout(layout, index) {
|
|
611
|
+
for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
612
|
+
layoutItems[_key - 2] = arguments[_key];
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
|
|
616
|
+
};
|
|
361
617
|
|
|
362
|
-
|
|
618
|
+
exports.insertLayout = insertLayout;
|
|
363
619
|
|
|
364
620
|
/***/ }),
|
|
365
621
|
|
|
366
|
-
/***/
|
|
622
|
+
/***/ 18:
|
|
367
623
|
/***/ (function(module, exports) {
|
|
368
624
|
|
|
369
625
|
module.exports = require("@babel/runtime/helpers/createClass");
|
|
370
626
|
|
|
371
627
|
/***/ }),
|
|
372
628
|
|
|
373
|
-
/***/
|
|
629
|
+
/***/ 19:
|
|
374
630
|
/***/ (function(module, exports) {
|
|
375
631
|
|
|
376
632
|
module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
@@ -380,25 +636,25 @@ module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
|
380
636
|
/***/ 2:
|
|
381
637
|
/***/ (function(module, exports) {
|
|
382
638
|
|
|
383
|
-
module.exports = require("
|
|
639
|
+
module.exports = require("@splunk/ui-utils/i18n");
|
|
384
640
|
|
|
385
641
|
/***/ }),
|
|
386
642
|
|
|
387
|
-
/***/
|
|
643
|
+
/***/ 21:
|
|
388
644
|
/***/ (function(module, exports) {
|
|
389
645
|
|
|
390
646
|
module.exports = require("@splunk/themes/pick");
|
|
391
647
|
|
|
392
648
|
/***/ }),
|
|
393
649
|
|
|
394
|
-
/***/
|
|
650
|
+
/***/ 22:
|
|
395
651
|
/***/ (function(module, exports) {
|
|
396
652
|
|
|
397
653
|
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
398
654
|
|
|
399
655
|
/***/ }),
|
|
400
656
|
|
|
401
|
-
/***/
|
|
657
|
+
/***/ 23:
|
|
402
658
|
/***/ (function(module, exports) {
|
|
403
659
|
|
|
404
660
|
module.exports = require("@splunk/visualizations-shared/propUtils");
|
|
@@ -406,47 +662,20 @@ module.exports = require("@splunk/visualizations-shared/propUtils");
|
|
|
406
662
|
/***/ }),
|
|
407
663
|
|
|
408
664
|
/***/ 24:
|
|
409
|
-
/***/ (function(module, exports
|
|
410
|
-
|
|
411
|
-
"use strict";
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
Object.defineProperty(exports, "__esModule", {
|
|
415
|
-
value: true
|
|
416
|
-
});
|
|
417
|
-
exports.pickFieldFromJSONSchema = void 0;
|
|
418
|
-
|
|
419
|
-
var lodash_1 = __webpack_require__(2);
|
|
420
|
-
|
|
421
|
-
var pickFieldFromJSONSchema = function pickFieldFromJSONSchema(optionsSchema) {
|
|
422
|
-
var fieldName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
|
|
423
|
-
return Object.keys(optionsSchema).reduce(function (accum, k) {
|
|
424
|
-
if (lodash_1.has(optionsSchema[k], fieldName)) {
|
|
425
|
-
accum[k] = optionsSchema[k][fieldName];
|
|
426
|
-
} else if (lodash_1.get(optionsSchema, [k, 'type']) === 'object' && lodash_1.has(optionsSchema[k], 'properties')) {
|
|
427
|
-
var nestedSchema = exports.pickFieldFromJSONSchema(optionsSchema[k].properties, fieldName);
|
|
428
|
-
|
|
429
|
-
if (!lodash_1.isEmpty(nestedSchema)) {
|
|
430
|
-
accum[k] = nestedSchema;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
return accum;
|
|
435
|
-
}, {});
|
|
436
|
-
};
|
|
665
|
+
/***/ (function(module, exports) {
|
|
437
666
|
|
|
438
|
-
exports
|
|
667
|
+
module.exports = require("@splunk/visualizations-shared/hocUtils");
|
|
439
668
|
|
|
440
669
|
/***/ }),
|
|
441
670
|
|
|
442
671
|
/***/ 25:
|
|
443
672
|
/***/ (function(module, exports) {
|
|
444
673
|
|
|
445
|
-
module.exports = require("@
|
|
674
|
+
module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
|
|
446
675
|
|
|
447
676
|
/***/ }),
|
|
448
677
|
|
|
449
|
-
/***/
|
|
678
|
+
/***/ 254:
|
|
450
679
|
/***/ (function(module, exports, __webpack_require__) {
|
|
451
680
|
|
|
452
681
|
"use strict";
|
|
@@ -476,9 +705,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
476
705
|
});
|
|
477
706
|
exports.default = void 0;
|
|
478
707
|
|
|
479
|
-
__exportStar(__webpack_require__(
|
|
708
|
+
__exportStar(__webpack_require__(139), exports);
|
|
480
709
|
|
|
481
|
-
var Scatter_1 = __webpack_require__(
|
|
710
|
+
var Scatter_1 = __webpack_require__(139);
|
|
482
711
|
|
|
483
712
|
Object.defineProperty(exports, "default", {
|
|
484
713
|
enumerable: true,
|
|
@@ -489,13 +718,13 @@ Object.defineProperty(exports, "default", {
|
|
|
489
718
|
|
|
490
719
|
/***/ }),
|
|
491
720
|
|
|
492
|
-
/***/
|
|
721
|
+
/***/ 255:
|
|
493
722
|
/***/ (function(module, exports, __webpack_require__) {
|
|
494
723
|
|
|
495
724
|
"use strict";
|
|
496
725
|
|
|
497
726
|
|
|
498
|
-
var _toConsumableArray = __webpack_require__(
|
|
727
|
+
var _toConsumableArray = __webpack_require__(7);
|
|
499
728
|
|
|
500
729
|
Object.defineProperty(exports, "__esModule", {
|
|
501
730
|
value: true
|
|
@@ -506,21 +735,21 @@ var visualization_icons_1 = __webpack_require__(46);
|
|
|
506
735
|
|
|
507
736
|
var placeholders_1 = __webpack_require__(45);
|
|
508
737
|
|
|
509
|
-
var pick_1 = __webpack_require__(
|
|
738
|
+
var pick_1 = __webpack_require__(21);
|
|
510
739
|
|
|
511
|
-
var variables_1 = __webpack_require__(
|
|
740
|
+
var variables_1 = __webpack_require__(8);
|
|
512
741
|
|
|
513
|
-
var schemaUtils_1 = __webpack_require__(
|
|
742
|
+
var schemaUtils_1 = __webpack_require__(15);
|
|
514
743
|
|
|
515
744
|
var visualization_color_palettes_1 = __webpack_require__(44);
|
|
516
745
|
|
|
517
|
-
var i18n_1 = __webpack_require__(
|
|
746
|
+
var i18n_1 = __webpack_require__(2);
|
|
518
747
|
|
|
519
748
|
var VizBehavior_1 = __webpack_require__(5);
|
|
520
749
|
|
|
521
|
-
var VizCategory_1 = __webpack_require__(
|
|
750
|
+
var VizCategory_1 = __webpack_require__(30);
|
|
522
751
|
|
|
523
|
-
var configUtils_1 = __webpack_require__(
|
|
752
|
+
var configUtils_1 = __webpack_require__(16);
|
|
524
753
|
|
|
525
754
|
var AxesChartDataConfig_1 = __webpack_require__(63);
|
|
526
755
|
|
|
@@ -602,7 +831,7 @@ exports.optionsSchema = {
|
|
|
602
831
|
backgroundColor: {
|
|
603
832
|
default: '> themes.defaultBackgroundColor',
|
|
604
833
|
description: 'Specify the color used for the background. The default for enterprise light is "#ffffff". The default for enterprise dark is "#000000". The default for prisma dark is "#0b0c0e".',
|
|
605
|
-
pattern: schemaUtils_1.
|
|
834
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
|
|
606
835
|
type: 'string'
|
|
607
836
|
},
|
|
608
837
|
legendDisplay: {
|
|
@@ -905,7 +1134,7 @@ exports.default = configUtils_1.enhanceConfig(config);
|
|
|
905
1134
|
|
|
906
1135
|
/***/ }),
|
|
907
1136
|
|
|
908
|
-
/***/
|
|
1137
|
+
/***/ 256:
|
|
909
1138
|
/***/ (function(module, exports, __webpack_require__) {
|
|
910
1139
|
|
|
911
1140
|
"use strict";
|
|
@@ -916,9 +1145,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
916
1145
|
});
|
|
917
1146
|
exports.convertToScatterSCProperties = exports.mapToOldKey = exports.convertToStringValues = exports.scatterOptionValuesSCMapping = void 0;
|
|
918
1147
|
|
|
919
|
-
var lodash_1 = __webpack_require__(
|
|
1148
|
+
var lodash_1 = __webpack_require__(3);
|
|
920
1149
|
|
|
921
|
-
var propUtils_1 = __webpack_require__(
|
|
1150
|
+
var propUtils_1 = __webpack_require__(23);
|
|
922
1151
|
|
|
923
1152
|
var chartingUtils_1 = __webpack_require__(50); // map for key names which are either new or not present in SimpleXML options mapping
|
|
924
1153
|
|
|
@@ -1014,7 +1243,7 @@ exports.convertToScatterSCProperties = convertToScatterSCProperties;
|
|
|
1014
1243
|
|
|
1015
1244
|
/***/ }),
|
|
1016
1245
|
|
|
1017
|
-
/***/
|
|
1246
|
+
/***/ 27:
|
|
1018
1247
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1019
1248
|
|
|
1020
1249
|
"use strict";
|
|
@@ -1029,13 +1258,13 @@ var React = __webpack_require__(1);
|
|
|
1029
1258
|
|
|
1030
1259
|
var T = __webpack_require__(0);
|
|
1031
1260
|
|
|
1032
|
-
var lodash_1 = __webpack_require__(
|
|
1261
|
+
var lodash_1 = __webpack_require__(3);
|
|
1033
1262
|
|
|
1034
|
-
var i18n_1 = __webpack_require__(
|
|
1263
|
+
var i18n_1 = __webpack_require__(2);
|
|
1035
1264
|
|
|
1036
|
-
var Message_1 = __webpack_require__(
|
|
1265
|
+
var Message_1 = __webpack_require__(9);
|
|
1037
1266
|
|
|
1038
|
-
var FixedSizeContainer_1 = __webpack_require__(
|
|
1267
|
+
var FixedSizeContainer_1 = __webpack_require__(12);
|
|
1039
1268
|
/**
|
|
1040
1269
|
* @method shouldShowIconPlaceholder
|
|
1041
1270
|
* @param {object} dataSources
|
|
@@ -1106,13 +1335,13 @@ exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
|
1106
1335
|
|
|
1107
1336
|
/***/ }),
|
|
1108
1337
|
|
|
1109
|
-
/***/
|
|
1338
|
+
/***/ 28:
|
|
1110
1339
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1111
1340
|
|
|
1112
1341
|
"use strict";
|
|
1113
1342
|
|
|
1114
1343
|
|
|
1115
|
-
var _defineProperty = __webpack_require__(
|
|
1344
|
+
var _defineProperty = __webpack_require__(6);
|
|
1116
1345
|
|
|
1117
1346
|
Object.defineProperty(exports, "__esModule", {
|
|
1118
1347
|
value: true
|
|
@@ -1121,9 +1350,9 @@ exports.getSortingParams = exports.SortParamsPropTypes = void 0;
|
|
|
1121
1350
|
|
|
1122
1351
|
var T = __webpack_require__(0);
|
|
1123
1352
|
|
|
1124
|
-
var lodash_1 = __webpack_require__(
|
|
1353
|
+
var lodash_1 = __webpack_require__(3);
|
|
1125
1354
|
|
|
1126
|
-
var DataSource_1 = __webpack_require__(
|
|
1355
|
+
var DataSource_1 = __webpack_require__(38);
|
|
1127
1356
|
|
|
1128
1357
|
exports.SortParamsPropTypes = T.shape({
|
|
1129
1358
|
currentSortKey: T.string,
|
|
@@ -1177,7 +1406,7 @@ exports.getSortingParams = getSortingParams;
|
|
|
1177
1406
|
|
|
1178
1407
|
/***/ }),
|
|
1179
1408
|
|
|
1180
|
-
/***/
|
|
1409
|
+
/***/ 29:
|
|
1181
1410
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1182
1411
|
|
|
1183
1412
|
"use strict";
|
|
@@ -1190,7 +1419,7 @@ exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
|
|
|
1190
1419
|
|
|
1191
1420
|
var T = __webpack_require__(0);
|
|
1192
1421
|
|
|
1193
|
-
var lodash_1 = __webpack_require__(
|
|
1422
|
+
var lodash_1 = __webpack_require__(3);
|
|
1194
1423
|
|
|
1195
1424
|
exports.PaginatorParamsPropTypes = T.shape({
|
|
1196
1425
|
isPaging: T.bool,
|
|
@@ -1242,7 +1471,14 @@ exports.getPaginationParams = getPaginationParams;
|
|
|
1242
1471
|
|
|
1243
1472
|
/***/ }),
|
|
1244
1473
|
|
|
1245
|
-
/***/
|
|
1474
|
+
/***/ 3:
|
|
1475
|
+
/***/ (function(module, exports) {
|
|
1476
|
+
|
|
1477
|
+
module.exports = require("lodash");
|
|
1478
|
+
|
|
1479
|
+
/***/ }),
|
|
1480
|
+
|
|
1481
|
+
/***/ 30:
|
|
1246
1482
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1247
1483
|
|
|
1248
1484
|
"use strict";
|
|
@@ -1271,14 +1507,7 @@ var VizCategory;
|
|
|
1271
1507
|
|
|
1272
1508
|
/***/ }),
|
|
1273
1509
|
|
|
1274
|
-
/***/
|
|
1275
|
-
/***/ (function(module, exports) {
|
|
1276
|
-
|
|
1277
|
-
module.exports = require("@splunk/ui-utils/i18n");
|
|
1278
|
-
|
|
1279
|
-
/***/ }),
|
|
1280
|
-
|
|
1281
|
-
/***/ 30:
|
|
1510
|
+
/***/ 31:
|
|
1282
1511
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1283
1512
|
|
|
1284
1513
|
"use strict";
|
|
@@ -1290,39 +1519,39 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1290
1519
|
|
|
1291
1520
|
var React = __webpack_require__(1);
|
|
1292
1521
|
|
|
1293
|
-
var lodash_1 = __webpack_require__(
|
|
1522
|
+
var lodash_1 = __webpack_require__(3);
|
|
1294
1523
|
|
|
1295
|
-
var getSettingsFromThemedProps_1 = __webpack_require__(
|
|
1524
|
+
var getSettingsFromThemedProps_1 = __webpack_require__(32);
|
|
1296
1525
|
|
|
1297
|
-
var Options_1 = __webpack_require__(
|
|
1526
|
+
var Options_1 = __webpack_require__(33);
|
|
1298
1527
|
|
|
1299
|
-
var SanitizeProps_1 = __webpack_require__(
|
|
1528
|
+
var SanitizeProps_1 = __webpack_require__(34);
|
|
1300
1529
|
|
|
1301
|
-
var TimezoneContext_1 = __webpack_require__(
|
|
1530
|
+
var TimezoneContext_1 = __webpack_require__(22);
|
|
1302
1531
|
|
|
1303
|
-
var moment_1 = __webpack_require__(
|
|
1532
|
+
var moment_1 = __webpack_require__(35);
|
|
1304
1533
|
|
|
1305
1534
|
var styled_components_1 = __webpack_require__(4);
|
|
1306
1535
|
|
|
1307
|
-
var
|
|
1536
|
+
var hocUtils_1 = __webpack_require__(24);
|
|
1308
1537
|
|
|
1309
|
-
var
|
|
1538
|
+
var JSONSchemaUtils_1 = __webpack_require__(25);
|
|
1310
1539
|
|
|
1311
|
-
var
|
|
1540
|
+
var SplunkVisualization_1 = __webpack_require__(36);
|
|
1312
1541
|
|
|
1313
|
-
var
|
|
1542
|
+
var VizBehavior_1 = __webpack_require__(5);
|
|
1314
1543
|
|
|
1315
|
-
var
|
|
1544
|
+
var getSorting_1 = __webpack_require__(28);
|
|
1316
1545
|
|
|
1317
|
-
var
|
|
1546
|
+
var getPagination_1 = __webpack_require__(29);
|
|
1318
1547
|
|
|
1319
|
-
var
|
|
1548
|
+
var useDeepMemo_1 = __webpack_require__(39);
|
|
1320
1549
|
|
|
1321
|
-
var
|
|
1550
|
+
var MissingPropsMessage_1 = __webpack_require__(40);
|
|
1322
1551
|
|
|
1323
|
-
var
|
|
1552
|
+
var withEditModeCover_1 = __webpack_require__(41);
|
|
1324
1553
|
|
|
1325
|
-
var
|
|
1554
|
+
var withPlaceholder_1 = __webpack_require__(42);
|
|
1326
1555
|
/**
|
|
1327
1556
|
* hoc that wraps a pure react visualization in a Dashboard visualization
|
|
1328
1557
|
* @param {DashboardVizOpts} opts
|
|
@@ -1524,41 +1753,41 @@ exports.default = withDashboardViz;
|
|
|
1524
1753
|
|
|
1525
1754
|
/***/ }),
|
|
1526
1755
|
|
|
1527
|
-
/***/
|
|
1756
|
+
/***/ 32:
|
|
1528
1757
|
/***/ (function(module, exports) {
|
|
1529
1758
|
|
|
1530
1759
|
module.exports = require("@splunk/themes/getSettingsFromThemedProps");
|
|
1531
1760
|
|
|
1532
1761
|
/***/ }),
|
|
1533
1762
|
|
|
1534
|
-
/***/
|
|
1763
|
+
/***/ 33:
|
|
1535
1764
|
/***/ (function(module, exports) {
|
|
1536
1765
|
|
|
1537
1766
|
module.exports = require("@splunk/visualization-encoding/Options");
|
|
1538
1767
|
|
|
1539
1768
|
/***/ }),
|
|
1540
1769
|
|
|
1541
|
-
/***/
|
|
1770
|
+
/***/ 34:
|
|
1542
1771
|
/***/ (function(module, exports) {
|
|
1543
1772
|
|
|
1544
1773
|
module.exports = require("@splunk/visualizations-shared/SanitizeProps");
|
|
1545
1774
|
|
|
1546
1775
|
/***/ }),
|
|
1547
1776
|
|
|
1548
|
-
/***/
|
|
1777
|
+
/***/ 35:
|
|
1549
1778
|
/***/ (function(module, exports) {
|
|
1550
1779
|
|
|
1551
1780
|
module.exports = require("@splunk/moment");
|
|
1552
1781
|
|
|
1553
1782
|
/***/ }),
|
|
1554
1783
|
|
|
1555
|
-
/***/
|
|
1784
|
+
/***/ 36:
|
|
1556
1785
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1557
1786
|
|
|
1558
1787
|
"use strict";
|
|
1559
1788
|
|
|
1560
1789
|
|
|
1561
|
-
var _classCallCheck = __webpack_require__(
|
|
1790
|
+
var _classCallCheck = __webpack_require__(10);
|
|
1562
1791
|
|
|
1563
1792
|
Object.defineProperty(exports, "__esModule", {
|
|
1564
1793
|
value: true
|
|
@@ -1568,9 +1797,9 @@ exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
|
|
|
1568
1797
|
|
|
1569
1798
|
var T = __webpack_require__(0);
|
|
1570
1799
|
|
|
1571
|
-
var lodash_1 = __webpack_require__(
|
|
1800
|
+
var lodash_1 = __webpack_require__(3);
|
|
1572
1801
|
|
|
1573
|
-
var VizActionHandler_1 = __webpack_require__(
|
|
1802
|
+
var VizActionHandler_1 = __webpack_require__(37); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
1574
1803
|
|
|
1575
1804
|
|
|
1576
1805
|
exports.INITIAL_WIDTH = 250;
|
|
@@ -1704,15 +1933,15 @@ exports.default = SplunkVisualization;
|
|
|
1704
1933
|
|
|
1705
1934
|
/***/ }),
|
|
1706
1935
|
|
|
1707
|
-
/***/
|
|
1936
|
+
/***/ 37:
|
|
1708
1937
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1709
1938
|
|
|
1710
1939
|
"use strict";
|
|
1711
1940
|
|
|
1712
1941
|
|
|
1713
|
-
var _classCallCheck = __webpack_require__(
|
|
1942
|
+
var _classCallCheck = __webpack_require__(10);
|
|
1714
1943
|
|
|
1715
|
-
var _createClass = __webpack_require__(
|
|
1944
|
+
var _createClass = __webpack_require__(18);
|
|
1716
1945
|
|
|
1717
1946
|
Object.defineProperty(exports, "__esModule", {
|
|
1718
1947
|
value: true
|
|
@@ -1742,7 +1971,7 @@ exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
|
1742
1971
|
|
|
1743
1972
|
/***/ }),
|
|
1744
1973
|
|
|
1745
|
-
/***/
|
|
1974
|
+
/***/ 38:
|
|
1746
1975
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1747
1976
|
|
|
1748
1977
|
"use strict";
|
|
@@ -1756,7 +1985,7 @@ exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
|
1756
1985
|
|
|
1757
1986
|
/***/ }),
|
|
1758
1987
|
|
|
1759
|
-
/***/
|
|
1988
|
+
/***/ 39:
|
|
1760
1989
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1761
1990
|
|
|
1762
1991
|
"use strict";
|
|
@@ -1769,7 +1998,7 @@ exports.useDeepMemo = void 0;
|
|
|
1769
1998
|
|
|
1770
1999
|
var react_1 = __webpack_require__(1);
|
|
1771
2000
|
|
|
1772
|
-
var lodash_1 = __webpack_require__(
|
|
2001
|
+
var lodash_1 = __webpack_require__(3);
|
|
1773
2002
|
/**
|
|
1774
2003
|
* This hook evaluates and stores the result of a passed function and only
|
|
1775
2004
|
* re-evaluates the function when passed dependencies change.
|
|
@@ -1802,7 +2031,14 @@ exports.useDeepMemo = useDeepMemo;
|
|
|
1802
2031
|
|
|
1803
2032
|
/***/ }),
|
|
1804
2033
|
|
|
1805
|
-
/***/
|
|
2034
|
+
/***/ 4:
|
|
2035
|
+
/***/ (function(module, exports) {
|
|
2036
|
+
|
|
2037
|
+
module.exports = require("styled-components");
|
|
2038
|
+
|
|
2039
|
+
/***/ }),
|
|
2040
|
+
|
|
2041
|
+
/***/ 40:
|
|
1806
2042
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1807
2043
|
|
|
1808
2044
|
"use strict";
|
|
@@ -1817,11 +2053,11 @@ var React = __webpack_require__(1);
|
|
|
1817
2053
|
|
|
1818
2054
|
var T = __webpack_require__(0);
|
|
1819
2055
|
|
|
1820
|
-
var i18n_1 = __webpack_require__(
|
|
2056
|
+
var i18n_1 = __webpack_require__(2);
|
|
1821
2057
|
|
|
1822
|
-
var Message_1 = __webpack_require__(
|
|
2058
|
+
var Message_1 = __webpack_require__(9);
|
|
1823
2059
|
|
|
1824
|
-
var FixedSizeContainer_1 = __webpack_require__(
|
|
2060
|
+
var FixedSizeContainer_1 = __webpack_require__(12);
|
|
1825
2061
|
/**
|
|
1826
2062
|
* @method isMissing
|
|
1827
2063
|
* @param {any} v
|
|
@@ -1883,14 +2119,7 @@ exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
|
1883
2119
|
|
|
1884
2120
|
/***/ }),
|
|
1885
2121
|
|
|
1886
|
-
/***/
|
|
1887
|
-
/***/ (function(module, exports) {
|
|
1888
|
-
|
|
1889
|
-
module.exports = require("styled-components");
|
|
1890
|
-
|
|
1891
|
-
/***/ }),
|
|
1892
|
-
|
|
1893
|
-
/***/ 40:
|
|
2122
|
+
/***/ 41:
|
|
1894
2123
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1895
2124
|
|
|
1896
2125
|
"use strict";
|
|
@@ -1904,14 +2133,14 @@ var React = __webpack_require__(1);
|
|
|
1904
2133
|
|
|
1905
2134
|
var styled_components_1 = __webpack_require__(4);
|
|
1906
2135
|
|
|
1907
|
-
var hocUtils_1 = __webpack_require__(
|
|
2136
|
+
var hocUtils_1 = __webpack_require__(13);
|
|
1908
2137
|
|
|
1909
2138
|
var Cover = styled_components_1.default.div.withConfig({
|
|
1910
2139
|
displayName: "withEditModeCover__Cover",
|
|
1911
2140
|
componentId: "sc-1gsbnxb-0"
|
|
1912
2141
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
1913
2142
|
var Blocker = styled_components_1.default.div.attrs({
|
|
1914
|
-
'data-splunk-visualization-version': "25.0
|
|
2143
|
+
'data-splunk-visualization-version': "25.1.0 - 812a9a4d8"
|
|
1915
2144
|
}).withConfig({
|
|
1916
2145
|
displayName: "withEditModeCover__Blocker",
|
|
1917
2146
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -1943,13 +2172,6 @@ exports.default = withEditModeCover;
|
|
|
1943
2172
|
|
|
1944
2173
|
/***/ }),
|
|
1945
2174
|
|
|
1946
|
-
/***/ 41:
|
|
1947
|
-
/***/ (function(module, exports) {
|
|
1948
|
-
|
|
1949
|
-
module.exports = require("@splunk/visualizations-shared/mapUtils");
|
|
1950
|
-
|
|
1951
|
-
/***/ }),
|
|
1952
|
-
|
|
1953
2175
|
/***/ 42:
|
|
1954
2176
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1955
2177
|
|
|
@@ -1962,15 +2184,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1962
2184
|
|
|
1963
2185
|
var React = __webpack_require__(1);
|
|
1964
2186
|
|
|
1965
|
-
var colorUtils_1 = __webpack_require__(
|
|
2187
|
+
var colorUtils_1 = __webpack_require__(11);
|
|
1966
2188
|
|
|
1967
|
-
var variables_1 = __webpack_require__(
|
|
2189
|
+
var variables_1 = __webpack_require__(8);
|
|
1968
2190
|
|
|
1969
|
-
var IconPlaceholder_1 = __webpack_require__(
|
|
2191
|
+
var IconPlaceholder_1 = __webpack_require__(27);
|
|
1970
2192
|
|
|
1971
2193
|
var VizBehavior_1 = __webpack_require__(5);
|
|
1972
2194
|
|
|
1973
|
-
var hocUtils_1 = __webpack_require__(
|
|
2195
|
+
var hocUtils_1 = __webpack_require__(13);
|
|
1974
2196
|
|
|
1975
2197
|
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
1976
2198
|
var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
|
|
@@ -2046,7 +2268,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2046
2268
|
value: true
|
|
2047
2269
|
});
|
|
2048
2270
|
|
|
2049
|
-
var i18n_1 = __webpack_require__(
|
|
2271
|
+
var i18n_1 = __webpack_require__(2);
|
|
2050
2272
|
|
|
2051
2273
|
var background = function background(_ref) {
|
|
2052
2274
|
var label = _ref.label,
|
|
@@ -2111,7 +2333,7 @@ var VizBehavior;
|
|
|
2111
2333
|
"use strict";
|
|
2112
2334
|
|
|
2113
2335
|
|
|
2114
|
-
var _toConsumableArray = __webpack_require__(
|
|
2336
|
+
var _toConsumableArray = __webpack_require__(7);
|
|
2115
2337
|
|
|
2116
2338
|
var __rest = this && this.__rest || function (s, e) {
|
|
2117
2339
|
var t = {};
|
|
@@ -2131,7 +2353,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2131
2353
|
});
|
|
2132
2354
|
exports.constructFieldsAndColumns = exports.toArrayForSeries = exports.isMultiSeriesData = exports.convertOverlayFields = exports.convertY2AxisOptions = exports.mapToValues = exports.truncateData = exports.getAnnotations = void 0;
|
|
2133
2355
|
|
|
2134
|
-
var lodash_1 = __webpack_require__(
|
|
2356
|
+
var lodash_1 = __webpack_require__(3);
|
|
2135
2357
|
/**
|
|
2136
2358
|
* Get formatted annotations
|
|
2137
2359
|
* @method getAnnotations
|
|
@@ -2346,9 +2568,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2346
2568
|
exports.updateRowPayload = exports.canUpdateInPlace = exports.changedOptions = exports.NO_INPLACE_PROPS = void 0;
|
|
2347
2569
|
/* eslint-disable react/no-unused-prop-types */
|
|
2348
2570
|
|
|
2349
|
-
var lodash_1 = __webpack_require__(
|
|
2571
|
+
var lodash_1 = __webpack_require__(3);
|
|
2350
2572
|
|
|
2351
|
-
var i18n_1 = __webpack_require__(
|
|
2573
|
+
var i18n_1 = __webpack_require__(2);
|
|
2352
2574
|
|
|
2353
2575
|
var visualization_color_palettes_1 = __webpack_require__(44);
|
|
2354
2576
|
|
|
@@ -2365,13 +2587,13 @@ __webpack_require__(57); // fixme, @splunk/charting should be refactor to use lo
|
|
|
2365
2587
|
|
|
2366
2588
|
var charting_bundle_1 = __webpack_require__(51);
|
|
2367
2589
|
|
|
2368
|
-
var TimezoneContext_1 = __webpack_require__(
|
|
2590
|
+
var TimezoneContext_1 = __webpack_require__(22);
|
|
2369
2591
|
|
|
2370
|
-
var style_1 = __webpack_require__(
|
|
2592
|
+
var style_1 = __webpack_require__(14);
|
|
2371
2593
|
|
|
2372
2594
|
var styled_components_1 = __webpack_require__(4);
|
|
2373
2595
|
|
|
2374
|
-
var Message_1 = __webpack_require__(
|
|
2596
|
+
var Message_1 = __webpack_require__(9);
|
|
2375
2597
|
|
|
2376
2598
|
var useSplunkTheme_1 = __webpack_require__(58);
|
|
2377
2599
|
|
|
@@ -2718,307 +2940,77 @@ var defaultProps = {
|
|
|
2718
2940
|
onPointMouseOver: lodash_1.noop,
|
|
2719
2941
|
onPointMouseOut: lodash_1.noop,
|
|
2720
2942
|
colorPalette: visualization_color_palettes_1.VIZ_CATEGORICAL,
|
|
2721
|
-
visualizationApiRef: lodash_1.noop,
|
|
2722
|
-
chartData: null,
|
|
2723
|
-
themeKey: null
|
|
2724
|
-
};
|
|
2725
|
-
Charting.propTypes = propTypes;
|
|
2726
|
-
Charting.defaultProps = defaultProps; // allow for early return in case of empty chartData while still following hook rules
|
|
2727
|
-
|
|
2728
|
-
var withEmptyChartMessage = function withEmptyChartMessage(Chart) {
|
|
2729
|
-
var Wrapper = function Wrapper(props) {
|
|
2730
|
-
var chartData = props.chartData;
|
|
2731
|
-
|
|
2732
|
-
if (!chartData) {
|
|
2733
|
-
return React.createElement(Message_1.default, {
|
|
2734
|
-
message: i18n_1._('No DataSource'),
|
|
2735
|
-
level: "warning"
|
|
2736
|
-
});
|
|
2737
|
-
}
|
|
2738
|
-
|
|
2739
|
-
if (chartData && !Object.keys(chartData).length) {
|
|
2740
|
-
return React.createElement(Message_1.default, {
|
|
2741
|
-
message: i18n_1._('No Result'),
|
|
2742
|
-
level: "info"
|
|
2743
|
-
});
|
|
2744
|
-
}
|
|
2745
|
-
|
|
2746
|
-
return React.createElement(Chart, Object.assign({}, props));
|
|
2747
|
-
};
|
|
2748
|
-
|
|
2749
|
-
Wrapper.displayName = 'ChartingWrapper';
|
|
2750
|
-
Wrapper.propTypes = propTypes;
|
|
2751
|
-
Wrapper.defaultProps = defaultProps;
|
|
2752
|
-
return Wrapper;
|
|
2753
|
-
}; // export default Charting;
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
exports.default = withEmptyChartMessage(Charting);
|
|
2757
|
-
|
|
2758
|
-
/***/ }),
|
|
2759
|
-
|
|
2760
|
-
/***/ 56:
|
|
2761
|
-
/***/ (function(module, exports) {
|
|
2762
|
-
|
|
2763
|
-
module.exports = require("react-event-listener");
|
|
2764
|
-
|
|
2765
|
-
/***/ }),
|
|
2766
|
-
|
|
2767
|
-
/***/ 57:
|
|
2768
|
-
/***/ (function(module, exports) {
|
|
2769
|
-
|
|
2770
|
-
module.exports = require("@splunk/visualizations-shared/i18n");
|
|
2771
|
-
|
|
2772
|
-
/***/ }),
|
|
2773
|
-
|
|
2774
|
-
/***/ 58:
|
|
2775
|
-
/***/ (function(module, exports) {
|
|
2776
|
-
|
|
2777
|
-
module.exports = require("@splunk/themes/useSplunkTheme");
|
|
2778
|
-
|
|
2779
|
-
/***/ }),
|
|
2780
|
-
|
|
2781
|
-
/***/ 59:
|
|
2782
|
-
/***/ (function(module, exports) {
|
|
2783
|
-
|
|
2784
|
-
module.exports = require("@splunk/visualizations-shared/themeUtils");
|
|
2785
|
-
|
|
2786
|
-
/***/ }),
|
|
2787
|
-
|
|
2788
|
-
/***/ 6:
|
|
2789
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2790
|
-
|
|
2791
|
-
"use strict";
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
var _toConsumableArray = __webpack_require__(9);
|
|
2795
|
-
|
|
2796
|
-
var _defineProperty = __webpack_require__(7);
|
|
2797
|
-
|
|
2798
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
2799
|
-
var t = {};
|
|
2800
|
-
|
|
2801
|
-
for (var p in s) {
|
|
2802
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
2803
|
-
}
|
|
2804
|
-
|
|
2805
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
2806
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
2807
|
-
}
|
|
2808
|
-
return t;
|
|
2809
|
-
};
|
|
2810
|
-
|
|
2811
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2812
|
-
value: true
|
|
2813
|
-
});
|
|
2814
|
-
exports.insertLayout = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.isDynamicOption = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
|
|
2815
|
-
|
|
2816
|
-
var lodash_1 = __webpack_require__(2);
|
|
2817
|
-
|
|
2818
|
-
var schemaUtils_1 = __webpack_require__(16);
|
|
2819
|
-
|
|
2820
|
-
var VizBehavior_1 = __webpack_require__(5);
|
|
2821
|
-
|
|
2822
|
-
var dynamicOptionsDSLType = {
|
|
2823
|
-
type: 'string',
|
|
2824
|
-
pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
|
|
2825
|
-
};
|
|
2826
|
-
/**
|
|
2827
|
-
* Helper function to extend an options schema with dynamic options DSL
|
|
2828
|
-
* @param optionsSchema a visualization's options schema
|
|
2829
|
-
* @returns an updated options schema that additionally allows strings starting with > for each option
|
|
2830
|
-
*/
|
|
2831
|
-
|
|
2832
|
-
function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
2833
|
-
var enhancedOptionsSchema = {};
|
|
2834
|
-
Object.keys(optionsSchema).forEach(function (key) {
|
|
2835
|
-
var _a = optionsSchema[key],
|
|
2836
|
-
title = _a.title,
|
|
2837
|
-
description = _a.description,
|
|
2838
|
-
readOnly = _a.readOnly,
|
|
2839
|
-
writeOnly = _a.writeOnly,
|
|
2840
|
-
examples = _a.examples,
|
|
2841
|
-
defaultValue = _a.default,
|
|
2842
|
-
type = _a.type,
|
|
2843
|
-
properties = _a.properties,
|
|
2844
|
-
patternProperties = _a.patternProperties,
|
|
2845
|
-
remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
|
|
2846
|
-
|
|
2847
|
-
var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
|
|
2848
|
-
title: title
|
|
2849
|
-
}), description !== undefined && {
|
|
2850
|
-
description: description
|
|
2851
|
-
}), readOnly !== undefined && {
|
|
2852
|
-
readOnly: readOnly
|
|
2853
|
-
}), writeOnly !== undefined && {
|
|
2854
|
-
writeOnly: writeOnly
|
|
2855
|
-
}), examples !== undefined && {
|
|
2856
|
-
examples: examples
|
|
2857
|
-
}), defaultValue !== undefined && {
|
|
2858
|
-
default: defaultValue
|
|
2859
|
-
});
|
|
2860
|
-
|
|
2861
|
-
if (type === 'object') {
|
|
2862
|
-
enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
|
|
2863
|
-
type: type
|
|
2864
|
-
}), properties && {
|
|
2865
|
-
properties: enhanceOptionsSchemaWithDynamicOptions(properties)
|
|
2866
|
-
});
|
|
2867
|
-
|
|
2868
|
-
if (patternProperties) {
|
|
2869
|
-
var enhancedPatternProperties = {};
|
|
2870
|
-
Object.keys(patternProperties).forEach(function (opt) {
|
|
2871
|
-
enhancedPatternProperties = Object.assign(Object.assign({}, enhancedPatternProperties), enhanceOptionsSchemaWithDynamicOptions(_defineProperty({}, opt, patternProperties[opt])));
|
|
2872
|
-
});
|
|
2873
|
-
enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;
|
|
2874
|
-
}
|
|
2875
|
-
} else {
|
|
2876
|
-
enhancedOptionsSchema[key] = Object.assign(Object.assign({}, annotations), {
|
|
2877
|
-
anyOf: [Object.assign(Object.assign({}, type !== undefined && {
|
|
2878
|
-
type: type
|
|
2879
|
-
}), remainingSchemaEntry), dynamicOptionsDSLType]
|
|
2880
|
-
});
|
|
2881
|
-
}
|
|
2882
|
-
});
|
|
2883
|
-
return enhancedOptionsSchema;
|
|
2884
|
-
}
|
|
2943
|
+
visualizationApiRef: lodash_1.noop,
|
|
2944
|
+
chartData: null,
|
|
2945
|
+
themeKey: null
|
|
2946
|
+
};
|
|
2947
|
+
Charting.propTypes = propTypes;
|
|
2948
|
+
Charting.defaultProps = defaultProps; // allow for early return in case of empty chartData while still following hook rules
|
|
2885
2949
|
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
* this function also collapse all editor panels
|
|
2890
|
-
* @param vizConfig a Visualization Config
|
|
2891
|
-
* @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
|
|
2892
|
-
* and containing `open: false` for all editor panels in editorConfig
|
|
2893
|
-
*/
|
|
2950
|
+
var withEmptyChartMessage = function withEmptyChartMessage(Chart) {
|
|
2951
|
+
var Wrapper = function Wrapper(props) {
|
|
2952
|
+
var chartData = props.chartData;
|
|
2894
2953
|
|
|
2895
|
-
|
|
2896
|
-
|
|
2954
|
+
if (!chartData) {
|
|
2955
|
+
return React.createElement(Message_1.default, {
|
|
2956
|
+
message: i18n_1._('No DataSource'),
|
|
2957
|
+
level: "warning"
|
|
2958
|
+
});
|
|
2959
|
+
}
|
|
2897
2960
|
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2961
|
+
if (chartData && !Object.keys(chartData).length) {
|
|
2962
|
+
return React.createElement(Message_1.default, {
|
|
2963
|
+
message: i18n_1._('No Result'),
|
|
2964
|
+
level: "info"
|
|
2965
|
+
});
|
|
2966
|
+
}
|
|
2901
2967
|
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
open: false
|
|
2905
|
-
});
|
|
2906
|
-
});
|
|
2907
|
-
return enhancedConfig;
|
|
2908
|
-
}
|
|
2968
|
+
return React.createElement(Chart, Object.assign({}, props));
|
|
2969
|
+
};
|
|
2909
2970
|
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
* @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
|
|
2916
|
-
*/
|
|
2971
|
+
Wrapper.displayName = 'ChartingWrapper';
|
|
2972
|
+
Wrapper.propTypes = propTypes;
|
|
2973
|
+
Wrapper.defaultProps = defaultProps;
|
|
2974
|
+
return Wrapper;
|
|
2975
|
+
}; // export default Charting;
|
|
2917
2976
|
|
|
2918
|
-
function uncollapseEditorConfig(vizConfig) {
|
|
2919
|
-
var editorPanelUncollapsedConfig = vizConfig;
|
|
2920
|
-
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
2921
|
-
return Object.assign(Object.assign({}, config), {
|
|
2922
|
-
open: true
|
|
2923
|
-
});
|
|
2924
|
-
});
|
|
2925
|
-
return editorPanelUncollapsedConfig;
|
|
2926
|
-
}
|
|
2927
2977
|
|
|
2928
|
-
exports.
|
|
2978
|
+
exports.default = withEmptyChartMessage(Charting);
|
|
2929
2979
|
|
|
2930
|
-
|
|
2931
|
-
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
2932
|
-
}
|
|
2980
|
+
/***/ }),
|
|
2933
2981
|
|
|
2934
|
-
|
|
2935
|
-
|
|
2982
|
+
/***/ 56:
|
|
2983
|
+
/***/ (function(module, exports) {
|
|
2936
2984
|
|
|
2937
|
-
|
|
2938
|
-
* this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
|
|
2939
|
-
* 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
|
|
2940
|
-
* the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
|
|
2941
|
-
* the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up
|
|
2942
|
-
*
|
|
2943
|
-
* Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
|
|
2944
|
-
*/
|
|
2985
|
+
module.exports = require("react-event-listener");
|
|
2945
2986
|
|
|
2946
|
-
|
|
2947
|
-
var presetContextKeys = Object.keys(presetContext);
|
|
2948
|
-
return presetContextKeys.every(function (contextKey) {
|
|
2949
|
-
return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
|
|
2950
|
-
});
|
|
2951
|
-
}
|
|
2952
|
-
/**
|
|
2953
|
-
* Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
|
|
2954
|
-
*/
|
|
2987
|
+
/***/ }),
|
|
2955
2988
|
|
|
2989
|
+
/***/ 57:
|
|
2990
|
+
/***/ (function(module, exports) {
|
|
2956
2991
|
|
|
2957
|
-
|
|
2958
|
-
var presetOptionKeys = Object.keys(presetOptions);
|
|
2959
|
-
return presetOptionKeys.every(function (optionKey) {
|
|
2960
|
-
return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
|
|
2961
|
-
});
|
|
2962
|
-
}
|
|
2963
|
-
/**
|
|
2964
|
-
* Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
|
|
2965
|
-
* This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
|
|
2966
|
-
*
|
|
2967
|
-
* @param {Object} vizContext - the current vizContext definition
|
|
2968
|
-
* @param {Object} vizOptions - the current vizOptions definition
|
|
2969
|
-
* @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
|
|
2970
|
-
*/
|
|
2992
|
+
module.exports = require("@splunk/visualizations-shared/i18n");
|
|
2971
2993
|
|
|
2994
|
+
/***/ }),
|
|
2972
2995
|
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
var presetContext = lodash_1.get(preset, ['value', 'context'], {});
|
|
2976
|
-
var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
|
|
2977
|
-
var presetContextKeys = Object.keys(presetContext);
|
|
2978
|
-
var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
2979
|
-
// if not, then the preset is invalid in config.ts
|
|
2996
|
+
/***/ 58:
|
|
2997
|
+
/***/ (function(module, exports) {
|
|
2980
2998
|
|
|
2981
|
-
|
|
2982
|
-
return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
|
|
2983
|
-
});
|
|
2984
|
-
}
|
|
2999
|
+
module.exports = require("@splunk/themes/useSplunkTheme");
|
|
2985
3000
|
|
|
2986
|
-
|
|
2987
|
-
/**
|
|
2988
|
-
* generates number precision values for a Select editor
|
|
2989
|
-
*
|
|
2990
|
-
* @param {Number} numPrecisionValues - number of integer precision values to generate
|
|
2991
|
-
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
2992
|
-
*/
|
|
3001
|
+
/***/ }),
|
|
2993
3002
|
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
return {
|
|
2997
|
-
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
2998
|
-
value: i
|
|
2999
|
-
};
|
|
3000
|
-
});
|
|
3001
|
-
}
|
|
3003
|
+
/***/ 59:
|
|
3004
|
+
/***/ (function(module, exports) {
|
|
3002
3005
|
|
|
3003
|
-
exports
|
|
3004
|
-
/**
|
|
3005
|
-
* insert layout in layout array, return a new layout array instead of updating the original
|
|
3006
|
-
*
|
|
3007
|
-
* @param {EditorLayoutConfig[][]} layout - editor layout
|
|
3008
|
-
* @param {Number} index - the index to insert layout item(s)
|
|
3009
|
-
* @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
|
|
3010
|
-
* @returns {EditorLayoutConfig[][]} new editor layout with insertion
|
|
3011
|
-
*/
|
|
3006
|
+
module.exports = require("@splunk/visualizations-shared/themeUtils");
|
|
3012
3007
|
|
|
3013
|
-
|
|
3014
|
-
for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
3015
|
-
layoutItems[_key - 2] = arguments[_key];
|
|
3016
|
-
}
|
|
3008
|
+
/***/ }),
|
|
3017
3009
|
|
|
3018
|
-
|
|
3019
|
-
|
|
3010
|
+
/***/ 6:
|
|
3011
|
+
/***/ (function(module, exports) {
|
|
3020
3012
|
|
|
3021
|
-
exports
|
|
3013
|
+
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
3022
3014
|
|
|
3023
3015
|
/***/ }),
|
|
3024
3016
|
|
|
@@ -3028,9 +3020,9 @@ exports.insertLayout = insertLayout;
|
|
|
3028
3020
|
"use strict";
|
|
3029
3021
|
|
|
3030
3022
|
|
|
3031
|
-
var _classCallCheck = __webpack_require__(
|
|
3023
|
+
var _classCallCheck = __webpack_require__(10);
|
|
3032
3024
|
|
|
3033
|
-
var _createClass = __webpack_require__(
|
|
3025
|
+
var _createClass = __webpack_require__(18);
|
|
3034
3026
|
|
|
3035
3027
|
Object.defineProperty(exports, "__esModule", {
|
|
3036
3028
|
value: true
|
|
@@ -3104,16 +3096,16 @@ module.exports = require("@splunk/visualizations-shared/simpleXMLOptions");
|
|
|
3104
3096
|
"use strict";
|
|
3105
3097
|
|
|
3106
3098
|
|
|
3107
|
-
var _toConsumableArray = __webpack_require__(
|
|
3099
|
+
var _toConsumableArray = __webpack_require__(7);
|
|
3108
3100
|
|
|
3109
3101
|
Object.defineProperty(exports, "__esModule", {
|
|
3110
3102
|
value: true
|
|
3111
3103
|
});
|
|
3112
3104
|
exports.AxesChartDataConfigAreaColumnLine = exports.AxesChartDataConfigBubble = exports.AxesChartDataConfigScatter = exports.AxesChartDataConfigBar = void 0;
|
|
3113
3105
|
|
|
3114
|
-
var i18n_1 = __webpack_require__(
|
|
3106
|
+
var i18n_1 = __webpack_require__(2);
|
|
3115
3107
|
|
|
3116
|
-
var configUtils_1 = __webpack_require__(
|
|
3108
|
+
var configUtils_1 = __webpack_require__(16);
|
|
3117
3109
|
|
|
3118
3110
|
var AxesChartDataConfig = {
|
|
3119
3111
|
label: i18n_1._('Data configurations'),
|
|
@@ -3154,15 +3146,35 @@ exports.AxesChartDataConfigBar = {
|
|
|
3154
3146
|
};
|
|
3155
3147
|
exports.AxesChartDataConfigScatter = {
|
|
3156
3148
|
label: AxesChartDataConfig.label,
|
|
3157
|
-
|
|
3158
|
-
|
|
3149
|
+
layout: [[{
|
|
3150
|
+
label: i18n_1._('X'),
|
|
3151
|
+
option: 'x',
|
|
3152
|
+
editor: 'editor.columnSelector',
|
|
3153
|
+
editorProps: {
|
|
3154
|
+
dataSourceKey: 'primary'
|
|
3155
|
+
}
|
|
3156
|
+
}], [{
|
|
3157
|
+
label: i18n_1._('Y'),
|
|
3158
|
+
option: 'y',
|
|
3159
|
+
editor: 'editor.columnSelector',
|
|
3160
|
+
editorProps: {
|
|
3161
|
+
dataSourceKey: 'primary'
|
|
3162
|
+
}
|
|
3163
|
+
}], [{
|
|
3159
3164
|
label: i18n_1._('Category'),
|
|
3160
3165
|
option: 'category',
|
|
3161
3166
|
editor: 'editor.columnSelector',
|
|
3162
3167
|
editorProps: {
|
|
3163
3168
|
dataSourceKey: 'primary'
|
|
3164
3169
|
}
|
|
3165
|
-
}]
|
|
3170
|
+
}], [{
|
|
3171
|
+
label: i18n_1._('Result limit'),
|
|
3172
|
+
option: 'resultLimit',
|
|
3173
|
+
editor: 'editor.number',
|
|
3174
|
+
editorProps: {
|
|
3175
|
+
dataSourceKey: 'primary'
|
|
3176
|
+
}
|
|
3177
|
+
}]]
|
|
3166
3178
|
};
|
|
3167
3179
|
exports.AxesChartDataConfigBubble = {
|
|
3168
3180
|
label: exports.AxesChartDataConfigScatter.label,
|
|
@@ -3208,11 +3220,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3208
3220
|
value: true
|
|
3209
3221
|
});
|
|
3210
3222
|
|
|
3211
|
-
var i18n_1 = __webpack_require__(
|
|
3223
|
+
var i18n_1 = __webpack_require__(2);
|
|
3212
3224
|
|
|
3213
|
-
var pick_1 = __webpack_require__(
|
|
3225
|
+
var pick_1 = __webpack_require__(21);
|
|
3214
3226
|
|
|
3215
|
-
var variables_1 = __webpack_require__(
|
|
3227
|
+
var variables_1 = __webpack_require__(8);
|
|
3216
3228
|
|
|
3217
3229
|
var BackgroundColor_1 = __webpack_require__(49);
|
|
3218
3230
|
|
|
@@ -3231,23 +3243,15 @@ var AxesChartColorAndStyle = {
|
|
|
3231
3243
|
label: i18n_1._('Color and style'),
|
|
3232
3244
|
layout: [BackgroundColor_1.default({
|
|
3233
3245
|
themes: themes
|
|
3234
|
-
})
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
// [
|
|
3244
|
-
// {
|
|
3245
|
-
// label: _('Series colors by field name'),
|
|
3246
|
-
// option: 'seriesColorsByField',
|
|
3247
|
-
// editor: 'editor.seriesColorsByField',
|
|
3248
|
-
// },
|
|
3249
|
-
// ],
|
|
3250
|
-
]
|
|
3246
|
+
}), [{
|
|
3247
|
+
label: i18n_1._('Series colors'),
|
|
3248
|
+
option: 'seriesColors',
|
|
3249
|
+
editor: 'editor.seriesColors'
|
|
3250
|
+
}], [{
|
|
3251
|
+
label: i18n_1._('Series colors by field name'),
|
|
3252
|
+
option: 'seriesColorsByField',
|
|
3253
|
+
editor: 'editor.seriesColorsByField'
|
|
3254
|
+
}]]
|
|
3251
3255
|
};
|
|
3252
3256
|
exports.default = AxesChartColorAndStyle;
|
|
3253
3257
|
|
|
@@ -3263,7 +3267,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3263
3267
|
value: true
|
|
3264
3268
|
});
|
|
3265
3269
|
|
|
3266
|
-
var i18n_1 = __webpack_require__(
|
|
3270
|
+
var i18n_1 = __webpack_require__(2);
|
|
3267
3271
|
|
|
3268
3272
|
var AxesChartLegend = {
|
|
3269
3273
|
label: i18n_1._('Legend'),
|
|
@@ -3324,16 +3328,16 @@ exports.default = AxesChartLegend;
|
|
|
3324
3328
|
"use strict";
|
|
3325
3329
|
|
|
3326
3330
|
|
|
3327
|
-
var _toConsumableArray = __webpack_require__(
|
|
3331
|
+
var _toConsumableArray = __webpack_require__(7);
|
|
3328
3332
|
|
|
3329
3333
|
Object.defineProperty(exports, "__esModule", {
|
|
3330
3334
|
value: true
|
|
3331
3335
|
});
|
|
3332
3336
|
exports.AxesChartXGridAndLabelsBubbleScatter = exports.AxesChartXGridAndLabelsCommon = void 0;
|
|
3333
3337
|
|
|
3334
|
-
var i18n_1 = __webpack_require__(
|
|
3338
|
+
var i18n_1 = __webpack_require__(2);
|
|
3335
3339
|
|
|
3336
|
-
var configUtils_1 = __webpack_require__(
|
|
3340
|
+
var configUtils_1 = __webpack_require__(16);
|
|
3337
3341
|
|
|
3338
3342
|
exports.AxesChartXGridAndLabelsCommon = {
|
|
3339
3343
|
label: i18n_1._('X-axis grid and labels'),
|
|
@@ -3372,7 +3376,7 @@ var AxesChartXGridAndLabels = {
|
|
|
3372
3376
|
layout: [].concat(_toConsumableArray(exports.AxesChartXGridAndLabelsCommon.layout), [[{
|
|
3373
3377
|
label: i18n_1._('Label rotation'),
|
|
3374
3378
|
option: 'xAxisLabelRotation',
|
|
3375
|
-
editor: 'editor.
|
|
3379
|
+
editor: 'editor.select',
|
|
3376
3380
|
editorProps: {
|
|
3377
3381
|
values: [{
|
|
3378
3382
|
label: i18n_1._('-90'),
|
|
@@ -3617,7 +3621,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3617
3621
|
value: true
|
|
3618
3622
|
});
|
|
3619
3623
|
|
|
3620
|
-
var i18n_1 = __webpack_require__(
|
|
3624
|
+
var i18n_1 = __webpack_require__(2);
|
|
3621
3625
|
|
|
3622
3626
|
var AxesChartYGridAndLabels = {
|
|
3623
3627
|
label: i18n_1._('Y-axis grid and labels'),
|
|
@@ -3773,101 +3777,21 @@ exports.default = AxesChartYGridAndLabels;
|
|
|
3773
3777
|
/***/ 7:
|
|
3774
3778
|
/***/ (function(module, exports) {
|
|
3775
3779
|
|
|
3776
|
-
module.exports = require("@babel/runtime/helpers/
|
|
3780
|
+
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
3777
3781
|
|
|
3778
3782
|
/***/ }),
|
|
3779
3783
|
|
|
3780
3784
|
/***/ 8:
|
|
3781
|
-
/***/ (function(module, exports
|
|
3782
|
-
|
|
3783
|
-
"use strict";
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
var _typeof = __webpack_require__(25);
|
|
3787
|
-
|
|
3788
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3789
|
-
value: true
|
|
3790
|
-
});
|
|
3791
|
-
exports.deepMergeWithArrayPrimitiveOverrides = exports.extendStaticWrapperProps = void 0;
|
|
3792
|
-
|
|
3793
|
-
var lodash_1 = __webpack_require__(2);
|
|
3794
|
-
|
|
3795
|
-
var mapUtils_1 = __webpack_require__(41);
|
|
3796
|
-
/**
|
|
3797
|
-
* @method extendStaticWrapperProps
|
|
3798
|
-
* @param {Object} props
|
|
3799
|
-
* @param {DashboardVizType} props.Wrapper
|
|
3800
|
-
* @param {DashboardVizType} props.Visualization
|
|
3801
|
-
*/
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
|
|
3805
|
-
var Wrapper = _ref.Wrapper,
|
|
3806
|
-
Visualization = _ref.Visualization;
|
|
3807
|
-
var extendProperties = ['propTypes', 'defaultProps', 'config'];
|
|
3808
|
-
extendProperties.forEach(function (prop) {
|
|
3809
|
-
if (Visualization[prop]) {
|
|
3810
|
-
// eslint-disable-next-line no-param-reassign
|
|
3811
|
-
Wrapper[prop] = Visualization[prop];
|
|
3812
|
-
}
|
|
3813
|
-
});
|
|
3814
|
-
};
|
|
3815
|
-
|
|
3816
|
-
exports.extendStaticWrapperProps = extendStaticWrapperProps;
|
|
3817
|
-
/**
|
|
3818
|
-
* helper to deeply merge objects while preserving arrays in earlier source objects
|
|
3819
|
-
* deeply nested primitive keys are merged similarly to lodash's defaultsDeep, while keys with arrays of primitives will be preserved if already present in the resultant merged object
|
|
3820
|
-
* this prevents default arrays of primitives from appending values to user-defined arrays (this occurs if the default array is longer than the user-defined one).
|
|
3821
|
-
* Array of objects gets merged with the defaults, where the defaults can be an array of objects. Closest matching default object from the defaults list based on key - value pair
|
|
3822
|
-
* will be used for merging defaults for each object in the array. If no closest match found, first object in default array list used for merging.
|
|
3823
|
-
*
|
|
3824
|
-
* @method deepMergeWithArrayPrimitiveOverrides
|
|
3825
|
-
* @param {Object} initial - target object to merge values into
|
|
3826
|
-
* @param {Object[]} sources - other default options to be merged into the resultant object if no explicit value is provided, with earlier args taking precedence over later ones
|
|
3827
|
-
*
|
|
3828
|
-
* @returns {Object}
|
|
3829
|
-
*/
|
|
3830
|
-
|
|
3831
|
-
var deepMergeWithArrayPrimitiveOverrides = function deepMergeWithArrayPrimitiveOverrides(initial) {
|
|
3832
|
-
var clone = lodash_1.cloneDeep(initial);
|
|
3833
|
-
|
|
3834
|
-
for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3835
|
-
sources[_key - 1] = arguments[_key];
|
|
3836
|
-
}
|
|
3837
|
-
|
|
3838
|
-
sources.forEach(function (sourceToApply) {
|
|
3839
|
-
Object.keys(sourceToApply).forEach(function (sourceKey) {
|
|
3840
|
-
if (!Object.prototype.hasOwnProperty.call(clone, sourceKey)) {
|
|
3841
|
-
clone[sourceKey] = lodash_1.cloneDeep(sourceToApply[sourceKey]);
|
|
3842
|
-
}
|
|
3843
|
-
|
|
3844
|
-
if (clone[sourceKey] && _typeof(clone[sourceKey]) === 'object' && !Array.isArray(clone[sourceKey]) && _typeof(sourceToApply[sourceKey]) === 'object') {
|
|
3845
|
-
clone[sourceKey] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey], sourceToApply[sourceKey]);
|
|
3846
|
-
} else if (Array.isArray(clone[sourceKey]) && _typeof(clone[sourceKey][0]) === 'object' && !Array.isArray(clone[sourceKey][0])) {
|
|
3847
|
-
// If option is an array of objects
|
|
3848
|
-
for (var i = 0; i < clone[sourceKey].length; i += 1) {
|
|
3849
|
-
if (_typeof(clone[sourceKey][i]) === 'object') {
|
|
3850
|
-
var closestMatchIdx = mapUtils_1.findClosestMatchFromDefaultList(sourceToApply[sourceKey], clone[sourceKey][i]);
|
|
3851
|
-
|
|
3852
|
-
if (closestMatchIdx > -1) {
|
|
3853
|
-
clone[sourceKey][i] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey][i], sourceToApply[sourceKey][closestMatchIdx]);
|
|
3854
|
-
}
|
|
3855
|
-
}
|
|
3856
|
-
}
|
|
3857
|
-
}
|
|
3858
|
-
});
|
|
3859
|
-
});
|
|
3860
|
-
return clone;
|
|
3861
|
-
};
|
|
3785
|
+
/***/ (function(module, exports) {
|
|
3862
3786
|
|
|
3863
|
-
exports
|
|
3787
|
+
module.exports = require("@splunk/themes/variables");
|
|
3864
3788
|
|
|
3865
3789
|
/***/ }),
|
|
3866
3790
|
|
|
3867
3791
|
/***/ 9:
|
|
3868
3792
|
/***/ (function(module, exports) {
|
|
3869
3793
|
|
|
3870
|
-
module.exports = require("@
|
|
3794
|
+
module.exports = require("@splunk/visualizations-shared/Message");
|
|
3871
3795
|
|
|
3872
3796
|
/***/ })
|
|
3873
3797
|
|