@splunk/visualizations 25.0.0 → 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.
Files changed (181) hide show
  1. package/.loki/reference/chrome_docker_PureVisualizations_PureMap_basic.png +0 -0
  2. package/.loki/reference/chrome_docker_PureVisualizations_PureMap_custom_base_layer_tile_server.png +0 -0
  3. package/.loki/reference/chrome_docker_PureVisualizations_PureMap_marker_layer_dynamic_color.png +0 -0
  4. package/.loki/reference/chrome_docker_PureVisualizations_PureMap_marker_layer_static_color.png +0 -0
  5. package/.loki/reference/chrome_docker_PureVisualizations_PureMap_marker_layer_static_color_with_no_seriesColors.png +0 -0
  6. package/.loki/reference/chrome_docker_PureVisualizations_PureMap_scale_off.png +0 -0
  7. package/.loki/reference/chrome_docker_PureVisualizations_PureMap_scale_unit_metric.png +0 -0
  8. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Area_Editor.png +0 -0
  9. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bar_Editor.png +0 -0
  10. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bubble_Editor.png +0 -0
  11. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_ChoroplethSvg_Editor.png +0 -0
  12. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Column_Editor.png +0 -0
  13. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Ellipse_Editor.png +0 -0
  14. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_FillerGauge_Editor.png +0 -0
  15. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Image_Editor.png +0 -0
  16. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Line_Editor.png +0 -0
  17. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_LinkGraph_Editor.png +0 -0
  18. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
  19. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Markdown_Editor.png +0 -0
  20. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_MarkerGauge_Editor.png +0 -0
  21. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Parallel_Coordinates_Editor.png +0 -0
  22. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Pie_Editor.png +0 -0
  23. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Punchcard_Editor.png +0 -0
  24. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Rectangle_Editor.png +0 -0
  25. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Sankey_Editor.png +0 -0
  26. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Scatter_Editor.png +0 -0
  27. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Editor.png +0 -0
  28. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Icon_Editor.png +0 -0
  29. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Radial_Editor.png +0 -0
  30. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Table_Editor.png +0 -0
  31. package/.loki/reference/chrome_docker_Visualizations_Line_Line_Placeholder_if_datasource_does_not_have_any_data.png +0 -0
  32. package/.loki/reference/chrome_docker_Visualizations_Line_Line_Placeholder_if_viz_does_not_connect_to_datasource.png +0 -0
  33. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Basic_Map.png +0 -0
  34. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer.png +0 -0
  35. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_GET.png +0 -0
  36. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_GET_Dynamic_Coloring.png +0 -0
  37. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_Internal_Fields.png +0 -0
  38. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_Static_Coloring.png +0 -0
  39. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_Dynamic_Coloring.png +0 -0
  40. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer.png +0 -0
  41. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer_Dynamic_coloring.png +0 -0
  42. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer_Result_Limit_Set_To_3.png +0 -0
  43. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Restricted_Zoom.png +0 -0
  44. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Set_Map_tiles.png +0 -0
  45. package/Area.config.js +166 -152
  46. package/Area.config.js.map +1 -1
  47. package/Area.js +362 -433
  48. package/Area.js.map +1 -1
  49. package/Bar.config.js +168 -148
  50. package/Bar.config.js.map +1 -1
  51. package/Bar.js +364 -429
  52. package/Bar.js.map +1 -1
  53. package/Bubble.config.js +155 -117
  54. package/Bubble.config.js.map +1 -1
  55. package/Bubble.js +353 -400
  56. package/Bubble.js.map +1 -1
  57. package/ChoroplethSvg.config.js +112 -82
  58. package/ChoroplethSvg.config.js.map +1 -1
  59. package/ChoroplethSvg.js +336 -391
  60. package/ChoroplethSvg.js.map +1 -1
  61. package/Column.config.js +164 -146
  62. package/Column.config.js.map +1 -1
  63. package/Column.js +360 -427
  64. package/Column.js.map +1 -1
  65. package/Ellipse.config.js +111 -80
  66. package/Ellipse.config.js.map +1 -1
  67. package/Ellipse.js +317 -371
  68. package/Ellipse.js.map +1 -1
  69. package/FillerGauge.config.js +117 -86
  70. package/FillerGauge.config.js.map +1 -1
  71. package/FillerGauge.js +324 -378
  72. package/FillerGauge.js.map +1 -1
  73. package/Image.config.js +100 -76
  74. package/Image.config.js.map +1 -1
  75. package/Image.js +725 -789
  76. package/Image.js.map +1 -1
  77. package/Line.config.js +164 -137
  78. package/Line.config.js.map +1 -1
  79. package/Line.js +360 -418
  80. package/Line.js.map +1 -1
  81. package/LinkGraph.config.js +137 -112
  82. package/LinkGraph.config.js.map +1 -1
  83. package/LinkGraph.js +351 -410
  84. package/LinkGraph.js.map +1 -1
  85. package/Map.config.js +140 -97
  86. package/Map.config.js.map +1 -1
  87. package/Map.js +517 -523
  88. package/Map.js.map +1 -1
  89. package/Markdown.config.js +138 -115
  90. package/Markdown.config.js.map +1 -1
  91. package/Markdown.js +502 -553
  92. package/Markdown.js.map +1 -1
  93. package/MarkerGauge.config.js +218 -195
  94. package/MarkerGauge.config.js.map +1 -1
  95. package/MarkerGauge.js +2926 -3098
  96. package/MarkerGauge.js.map +1 -1
  97. package/ParallelCoordinates.config.js +158 -133
  98. package/ParallelCoordinates.config.js.map +1 -1
  99. package/ParallelCoordinates.js +319 -377
  100. package/ParallelCoordinates.js.map +1 -1
  101. package/Pie.config.js +160 -136
  102. package/Pie.config.js.map +1 -1
  103. package/Pie.js +1316 -1492
  104. package/Pie.js.map +1 -1
  105. package/Punchcard.config.js +164 -141
  106. package/Punchcard.config.js.map +1 -1
  107. package/Punchcard.js +344 -404
  108. package/Punchcard.js.map +1 -1
  109. package/Rectangle.config.js +280 -248
  110. package/Rectangle.config.js.map +1 -1
  111. package/Rectangle.js +1247 -1303
  112. package/Rectangle.js.map +1 -1
  113. package/Sankey.config.js +175 -143
  114. package/Sankey.config.js.map +1 -1
  115. package/Sankey.js +377 -426
  116. package/Sankey.js.map +1 -1
  117. package/Scatter.config.js +156 -117
  118. package/Scatter.config.js.map +1 -1
  119. package/Scatter.js +550 -601
  120. package/Scatter.js.map +1 -1
  121. package/SingleValue.config.js +147 -115
  122. package/SingleValue.config.js.map +1 -1
  123. package/SingleValue.js +542 -598
  124. package/SingleValue.js.map +1 -1
  125. package/SingleValueBasic.js +19 -19
  126. package/SingleValueBasic.js.map +1 -1
  127. package/SingleValueIcon.config.js +154 -120
  128. package/SingleValueIcon.config.js.map +1 -1
  129. package/SingleValueIcon.js +373 -424
  130. package/SingleValueIcon.js.map +1 -1
  131. package/SingleValueRadial.config.js +143 -111
  132. package/SingleValueRadial.config.js.map +1 -1
  133. package/SingleValueRadial.js +612 -668
  134. package/SingleValueRadial.js.map +1 -1
  135. package/Table.config.js +176 -152
  136. package/Table.config.js.map +1 -1
  137. package/Table.js +740 -797
  138. package/Table.js.map +1 -1
  139. package/common/Charting.js +11 -11
  140. package/common/Charting.js.map +1 -1
  141. package/common/ChartingApi.js +2 -2
  142. package/common/ChartingApi.js.map +1 -1
  143. package/common/EventsDoc.js +12 -12
  144. package/common/EventsDoc.js.map +1 -1
  145. package/common/GaugeMajorTicks.js +8 -8
  146. package/common/GaugeMajorTicks.js.map +1 -1
  147. package/common/GaugeValueMarker.js +8 -8
  148. package/common/GaugeValueMarker.js.map +1 -1
  149. package/common/OptionsDoc.js +51 -327
  150. package/common/OptionsDoc.js.map +1 -1
  151. package/common/OverviewDoc.js +22 -22
  152. package/common/OverviewDoc.js.map +1 -1
  153. package/common/SplunkVisualization.js +4 -4
  154. package/common/SplunkVisualization.js.map +1 -1
  155. package/common/SplunkVisualizationApi.js +2 -2
  156. package/common/SplunkVisualizationApi.js.map +1 -1
  157. package/common/ThemesDoc.js +19 -19
  158. package/common/ThemesDoc.js.map +1 -1
  159. package/common/chartingUtils.js +4 -4
  160. package/common/chartingUtils.js.map +1 -1
  161. package/common/docUtils.js +4 -4
  162. package/common/docUtils.js.map +1 -1
  163. package/common/gaugeUtils.js +13 -13
  164. package/common/gaugeUtils.js.map +1 -1
  165. package/common/shapeUtils.js +8 -8
  166. package/common/shapeUtils.js.map +1 -1
  167. package/common/utils/configUtils.js +42 -18
  168. package/common/utils/configUtils.js.map +1 -1
  169. package/common/utils/hocUtils.js +6 -86
  170. package/common/utils/hocUtils.js.map +1 -1
  171. package/common/utils/{JSONSchemaUtils.js → mapUtils.js} +89 -29
  172. package/common/utils/mapUtils.js.map +1 -0
  173. package/common/utils/singleValueUtils.js +14 -12
  174. package/common/utils/singleValueUtils.js.map +1 -1
  175. package/common/utils/testHelper.js +8 -8
  176. package/common/utils/testHelper.js.map +1 -1
  177. package/common/withDashboardViz.js +120 -207
  178. package/common/withDashboardViz.js.map +1 -1
  179. package/package.json +12 -12
  180. package/.loki/reference/chrome_docker_PureVisualizations_SvgChoroplethDynamic_SVG_Of_Size_Greater_Than_2_MB_Render.png +0 -0
  181. 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 = 251);
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("@splunk/themes/variables");
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/Message");
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
- module.exports = require("@babel/runtime/helpers/classCallCheck");
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__) {
132
222
 
133
- module.exports = require("@splunk/visualizations-shared/colorUtils");
223
+ "use strict";
224
+
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
- /***/ 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__(2); // Charting imports i18n which needs to be run to instantiate window globals in the tests
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__(252);
287
+ var config_1 = __webpack_require__(255);
172
288
 
173
289
  exports.config = config_1.default;
174
290
 
175
- var withDashboardViz_1 = __webpack_require__(30);
291
+ var withDashboardViz_1 = __webpack_require__(31);
176
292
 
177
- var scatterUtils_1 = __webpack_require__(253);
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 React = __webpack_require__(1);
413
+ var lodash_1 = __webpack_require__(3);
266
414
 
267
- var styled_components_1 = __webpack_require__(4);
415
+ var schemaUtils_1 = __webpack_require__(15);
268
416
 
269
- var SizeAwareWrapper_1 = __webpack_require__(18);
417
+ var VizBehavior_1 = __webpack_require__(5);
270
418
 
271
- var style_1 = __webpack_require__(15);
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
- var colorUtils_1 = __webpack_require__(13);
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 Item = styled_components_1.default.div.attrs(function (_ref) {
276
- var width = _ref.width;
277
- return {
278
- style: {
279
- width: style_1.toPx(width)
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
- }).withConfig({
283
- displayName: "FixedSizeContainer__Item",
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
- var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
290
- var width = _ref2.width,
291
- height = _ref2.height;
292
- return {
293
- style: Object.assign(Object.assign({}, width && {
294
- width: style_1.toPx(width)
295
- }), height && {
296
- height: style_1.toPx(height)
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
- var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
315
- var FixedSizeContainer = function FixedSizeContainer(props) {
316
- var width = props.width,
317
- height = props.height,
318
- backgroundColor = props.backgroundColor;
492
+ function enhanceConfig(vizConfig) {
493
+ var enhancedConfig = vizConfig;
319
494
 
320
- if (!height) {
321
- return React.createElement(Item, {
322
- "data-test": "item",
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
- return React.createElement(FixSizeItem, {
329
- "data-test": "fix-size-item",
330
- "data-splunk-visualization-version": "25.0.0 - 5e0f30e5a",
331
- width: width,
332
- height: height,
333
- backgroundColor: backgroundColor
334
- }, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
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
- FixedSizeContainer.displayName = 'withFixedSizeContainer';
345
- return FixedSizeContainer;
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
- exports.default = withFixedSizeContainer;
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
- /***/ 15:
353
- /***/ (function(module, exports) {
527
+ function isDynamicOption(option) {
528
+ return option && typeof option === 'string' && option.trim().startsWith('>') || false;
529
+ }
530
+
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
533
+
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
+ */
542
+
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
+ }
354
599
 
355
- module.exports = require("@splunk/visualizations-shared/style");
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
+ */
356
609
 
357
- /***/ }),
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
+ }
358
614
 
359
- /***/ 16:
360
- /***/ (function(module, exports) {
615
+ return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
616
+ };
361
617
 
362
- module.exports = require("@splunk/visualizations-shared/schemaUtils");
618
+ exports.insertLayout = insertLayout;
363
619
 
364
620
  /***/ }),
365
621
 
366
- /***/ 17:
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
- /***/ 18:
629
+ /***/ 19:
374
630
  /***/ (function(module, exports) {
375
631
 
376
632
  module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
@@ -380,73 +636,46 @@ module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
380
636
  /***/ 2:
381
637
  /***/ (function(module, exports) {
382
638
 
383
- module.exports = require("lodash");
639
+ module.exports = require("@splunk/ui-utils/i18n");
384
640
 
385
641
  /***/ }),
386
642
 
387
- /***/ 20:
643
+ /***/ 21:
388
644
  /***/ (function(module, exports) {
389
645
 
390
646
  module.exports = require("@splunk/themes/pick");
391
647
 
392
648
  /***/ }),
393
649
 
394
- /***/ 21:
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
- /***/ 22:
657
+ /***/ 23:
402
658
  /***/ (function(module, exports) {
403
659
 
404
660
  module.exports = require("@splunk/visualizations-shared/propUtils");
405
661
 
406
662
  /***/ }),
407
663
 
408
- /***/ 23:
664
+ /***/ 24:
409
665
  /***/ (function(module, exports) {
410
666
 
411
- module.exports = require("@babel/runtime/helpers/typeof");
667
+ module.exports = require("@splunk/visualizations-shared/hocUtils");
412
668
 
413
669
  /***/ }),
414
670
 
415
671
  /***/ 25:
416
- /***/ (function(module, exports, __webpack_require__) {
417
-
418
- "use strict";
419
-
420
-
421
- Object.defineProperty(exports, "__esModule", {
422
- value: true
423
- });
424
- exports.pickFieldFromJSONSchema = void 0;
425
-
426
- var lodash_1 = __webpack_require__(2);
427
-
428
- var pickFieldFromJSONSchema = function pickFieldFromJSONSchema(optionsSchema) {
429
- var fieldName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
430
- return Object.keys(optionsSchema).reduce(function (accum, k) {
431
- if (lodash_1.has(optionsSchema[k], fieldName)) {
432
- accum[k] = optionsSchema[k][fieldName];
433
- } else if (lodash_1.get(optionsSchema, [k, 'type']) === 'object' && lodash_1.has(optionsSchema[k], 'properties')) {
434
- var nestedSchema = exports.pickFieldFromJSONSchema(optionsSchema[k].properties, fieldName);
435
-
436
- if (!lodash_1.isEmpty(nestedSchema)) {
437
- accum[k] = nestedSchema;
438
- }
439
- }
440
-
441
- return accum;
442
- }, {});
443
- };
672
+ /***/ (function(module, exports) {
444
673
 
445
- exports.pickFieldFromJSONSchema = pickFieldFromJSONSchema;
674
+ module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
446
675
 
447
676
  /***/ }),
448
677
 
449
- /***/ 251:
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__(137), exports);
708
+ __exportStar(__webpack_require__(139), exports);
480
709
 
481
- var Scatter_1 = __webpack_require__(137);
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
- /***/ 252:
721
+ /***/ 255:
493
722
  /***/ (function(module, exports, __webpack_require__) {
494
723
 
495
724
  "use strict";
496
725
 
497
726
 
498
- var _toConsumableArray = __webpack_require__(9);
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__(20);
738
+ var pick_1 = __webpack_require__(21);
510
739
 
511
- var variables_1 = __webpack_require__(10);
740
+ var variables_1 = __webpack_require__(8);
512
741
 
513
- var schemaUtils_1 = __webpack_require__(16);
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__(3);
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__(29);
750
+ var VizCategory_1 = __webpack_require__(30);
522
751
 
523
- var configUtils_1 = __webpack_require__(6);
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.COLOR_OR_TOKEN_PATTERN,
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
- /***/ 253:
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__(2);
1148
+ var lodash_1 = __webpack_require__(3);
920
1149
 
921
- var propUtils_1 = __webpack_require__(22);
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
- /***/ 26:
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__(2);
1261
+ var lodash_1 = __webpack_require__(3);
1033
1262
 
1034
- var i18n_1 = __webpack_require__(3);
1263
+ var i18n_1 = __webpack_require__(2);
1035
1264
 
1036
- var Message_1 = __webpack_require__(11);
1265
+ var Message_1 = __webpack_require__(9);
1037
1266
 
1038
- var FixedSizeContainer_1 = __webpack_require__(14);
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
- /***/ 27:
1338
+ /***/ 28:
1110
1339
  /***/ (function(module, exports, __webpack_require__) {
1111
1340
 
1112
1341
  "use strict";
1113
1342
 
1114
1343
 
1115
- var _defineProperty = __webpack_require__(7);
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__(2);
1353
+ var lodash_1 = __webpack_require__(3);
1125
1354
 
1126
- var DataSource_1 = __webpack_require__(37);
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
- /***/ 28:
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__(2);
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
- /***/ 29:
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
- /***/ 3:
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__(2);
1522
+ var lodash_1 = __webpack_require__(3);
1294
1523
 
1295
- var getSettingsFromThemedProps_1 = __webpack_require__(31);
1524
+ var getSettingsFromThemedProps_1 = __webpack_require__(32);
1296
1525
 
1297
- var Options_1 = __webpack_require__(32);
1526
+ var Options_1 = __webpack_require__(33);
1298
1527
 
1299
- var SanitizeProps_1 = __webpack_require__(33);
1528
+ var SanitizeProps_1 = __webpack_require__(34);
1300
1529
 
1301
- var TimezoneContext_1 = __webpack_require__(21);
1530
+ var TimezoneContext_1 = __webpack_require__(22);
1302
1531
 
1303
- var moment_1 = __webpack_require__(34);
1532
+ var moment_1 = __webpack_require__(35);
1304
1533
 
1305
1534
  var styled_components_1 = __webpack_require__(4);
1306
1535
 
1307
- var SplunkVisualization_1 = __webpack_require__(35);
1536
+ var hocUtils_1 = __webpack_require__(24);
1308
1537
 
1309
- var VizBehavior_1 = __webpack_require__(5);
1538
+ var JSONSchemaUtils_1 = __webpack_require__(25);
1310
1539
 
1311
- var getSorting_1 = __webpack_require__(27);
1540
+ var SplunkVisualization_1 = __webpack_require__(36);
1312
1541
 
1313
- var getPagination_1 = __webpack_require__(28);
1542
+ var VizBehavior_1 = __webpack_require__(5);
1314
1543
 
1315
- var useDeepMemo_1 = __webpack_require__(38);
1544
+ var getSorting_1 = __webpack_require__(28);
1316
1545
 
1317
- var JSONSchemaUtils_1 = __webpack_require__(25);
1546
+ var getPagination_1 = __webpack_require__(29);
1318
1547
 
1319
- var MissingPropsMessage_1 = __webpack_require__(39);
1548
+ var useDeepMemo_1 = __webpack_require__(39);
1320
1549
 
1321
- var withEditModeCover_1 = __webpack_require__(40);
1550
+ var MissingPropsMessage_1 = __webpack_require__(40);
1322
1551
 
1323
- var withPlaceholder_1 = __webpack_require__(42);
1552
+ var withEditModeCover_1 = __webpack_require__(41);
1324
1553
 
1325
- var hocUtils_1 = __webpack_require__(8);
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
- /***/ 31:
1756
+ /***/ 32:
1528
1757
  /***/ (function(module, exports) {
1529
1758
 
1530
1759
  module.exports = require("@splunk/themes/getSettingsFromThemedProps");
1531
1760
 
1532
1761
  /***/ }),
1533
1762
 
1534
- /***/ 32:
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
- /***/ 33:
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
- /***/ 34:
1777
+ /***/ 35:
1549
1778
  /***/ (function(module, exports) {
1550
1779
 
1551
1780
  module.exports = require("@splunk/moment");
1552
1781
 
1553
1782
  /***/ }),
1554
1783
 
1555
- /***/ 35:
1784
+ /***/ 36:
1556
1785
  /***/ (function(module, exports, __webpack_require__) {
1557
1786
 
1558
1787
  "use strict";
1559
1788
 
1560
1789
 
1561
- var _classCallCheck = __webpack_require__(12);
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__(2);
1800
+ var lodash_1 = __webpack_require__(3);
1572
1801
 
1573
- var VizActionHandler_1 = __webpack_require__(36); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
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
- /***/ 36:
1936
+ /***/ 37:
1708
1937
  /***/ (function(module, exports, __webpack_require__) {
1709
1938
 
1710
1939
  "use strict";
1711
1940
 
1712
1941
 
1713
- var _classCallCheck = __webpack_require__(12);
1942
+ var _classCallCheck = __webpack_require__(10);
1714
1943
 
1715
- var _createClass = __webpack_require__(17);
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
- /***/ 37:
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
- /***/ 38:
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__(2);
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
- /***/ 39:
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__(3);
2056
+ var i18n_1 = __webpack_require__(2);
1821
2057
 
1822
- var Message_1 = __webpack_require__(11);
2058
+ var Message_1 = __webpack_require__(9);
1823
2059
 
1824
- var FixedSizeContainer_1 = __webpack_require__(14);
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
- /***/ 4:
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__(8);
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.0 - 5e0f30e5a"
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__(13);
2187
+ var colorUtils_1 = __webpack_require__(11);
1966
2188
 
1967
- var variables_1 = __webpack_require__(10);
2189
+ var variables_1 = __webpack_require__(8);
1968
2190
 
1969
- var IconPlaceholder_1 = __webpack_require__(26);
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__(8);
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__(3);
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__(9);
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__(2);
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__(2);
2571
+ var lodash_1 = __webpack_require__(3);
2350
2572
 
2351
- var i18n_1 = __webpack_require__(3);
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__(21);
2590
+ var TimezoneContext_1 = __webpack_require__(22);
2369
2591
 
2370
- var style_1 = __webpack_require__(15);
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__(11);
2596
+ var Message_1 = __webpack_require__(9);
2375
2597
 
2376
2598
  var useSplunkTheme_1 = __webpack_require__(58);
2377
2599
 
@@ -2714,286 +2936,81 @@ var defaultProps = {
2714
2936
  // todo: need remove it
2715
2937
  onEventTrigger: lodash_1.noop,
2716
2938
  onClick: lodash_1.noop,
2717
- onSelect: lodash_1.noop,
2718
- onPointMouseOver: lodash_1.noop,
2719
- onPointMouseOut: lodash_1.noop,
2720
- 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.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
- });
2939
+ onSelect: lodash_1.noop,
2940
+ onPointMouseOver: lodash_1.noop,
2941
+ onPointMouseOut: lodash_1.noop,
2942
+ colorPalette: visualization_color_palettes_1.VIZ_CATEGORICAL,
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
2860
2949
 
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
- });
2950
+ var withEmptyChartMessage = function withEmptyChartMessage(Chart) {
2951
+ var Wrapper = function Wrapper(props) {
2952
+ var chartData = props.chartData;
2867
2953
 
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]
2954
+ if (!chartData) {
2955
+ return React.createElement(Message_1.default, {
2956
+ message: i18n_1._('No DataSource'),
2957
+ level: "warning"
2880
2958
  });
2881
2959
  }
2882
- });
2883
- return enhancedOptionsSchema;
2884
- }
2885
2960
 
2886
- exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
2887
- /**
2888
- * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
2889
- * @param vizConfig a Visualization Config
2890
- * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
2891
- */
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
+ }
2892
2967
 
2893
- function enhanceConfig(vizConfig) {
2894
- var enhancedConfig = vizConfig;
2968
+ return React.createElement(Chart, Object.assign({}, props));
2969
+ };
2895
2970
 
2896
- if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
2897
- enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
2898
- }
2971
+ Wrapper.displayName = 'ChartingWrapper';
2972
+ Wrapper.propTypes = propTypes;
2973
+ Wrapper.defaultProps = defaultProps;
2974
+ return Wrapper;
2975
+ }; // export default Charting;
2899
2976
 
2900
- return enhancedConfig;
2901
- }
2902
2977
 
2903
- exports.enhanceConfig = enhanceConfig;
2978
+ exports.default = withEmptyChartMessage(Charting);
2904
2979
 
2905
- function isDynamicOption(option) {
2906
- return option && typeof option === 'string' && option.trim().startsWith('>') || false;
2907
- }
2980
+ /***/ }),
2908
2981
 
2909
- exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
2910
- // this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
2982
+ /***/ 56:
2983
+ /***/ (function(module, exports) {
2911
2984
 
2912
- /**
2913
- * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
2914
- * 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
2915
- * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
2916
- * 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
2917
- *
2918
- * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
2919
- */
2985
+ module.exports = require("react-event-listener");
2920
2986
 
2921
- function hasCompatibleContexts(vizContext, presetContext) {
2922
- var presetContextKeys = Object.keys(presetContext);
2923
- return presetContextKeys.every(function (contextKey) {
2924
- return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
2925
- });
2926
- }
2927
- /**
2928
- * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
2929
- */
2987
+ /***/ }),
2930
2988
 
2989
+ /***/ 57:
2990
+ /***/ (function(module, exports) {
2931
2991
 
2932
- function hasCompatibleOptions(vizOptions, presetOptions) {
2933
- var presetOptionKeys = Object.keys(presetOptions);
2934
- return presetOptionKeys.every(function (optionKey) {
2935
- return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
2936
- });
2937
- }
2938
- /**
2939
- * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
2940
- * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
2941
- *
2942
- * @param {Object} vizContext - the current vizContext definition
2943
- * @param {Object} vizOptions - the current vizOptions definition
2944
- * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
2945
- */
2992
+ module.exports = require("@splunk/visualizations-shared/i18n");
2946
2993
 
2994
+ /***/ }),
2947
2995
 
2948
- function getInitialPreset(vizContext, vizOptions, presets) {
2949
- return presets.find(function (preset) {
2950
- var presetContext = lodash_1.get(preset, ['value', 'context'], {});
2951
- var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
2952
- var presetContextKeys = Object.keys(presetContext);
2953
- var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
2954
- // if not, then the preset is invalid in config.ts
2996
+ /***/ 58:
2997
+ /***/ (function(module, exports) {
2955
2998
 
2956
- if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
2957
- return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
2958
- });
2959
- }
2999
+ module.exports = require("@splunk/themes/useSplunkTheme");
2960
3000
 
2961
- exports.getInitialPreset = getInitialPreset;
2962
- /**
2963
- * generates number precision values for a Select editor
2964
- *
2965
- * @param {Number} numPrecisionValues - number of integer precision values to generate
2966
- * @returns {{ label: string; value; string }[]} array of { label, value } tuples
2967
- */
3001
+ /***/ }),
2968
3002
 
2969
- function generatePrecisionValues(numPrecisionValues) {
2970
- return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
2971
- return {
2972
- label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
2973
- value: i
2974
- };
2975
- });
2976
- }
3003
+ /***/ 59:
3004
+ /***/ (function(module, exports) {
2977
3005
 
2978
- exports.generatePrecisionValues = generatePrecisionValues;
2979
- /**
2980
- * insert layout in layout array, return a new layout array instead of updating the original
2981
- *
2982
- * @param {EditorLayoutConfig[][]} layout - editor layout
2983
- * @param {Number} index - the index to insert layout item(s)
2984
- * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
2985
- * @returns {EditorLayoutConfig[][]} new editor layout with insertion
2986
- */
3006
+ module.exports = require("@splunk/visualizations-shared/themeUtils");
2987
3007
 
2988
- var insertLayout = function insertLayout(layout, index) {
2989
- for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
2990
- layoutItems[_key - 2] = arguments[_key];
2991
- }
3008
+ /***/ }),
2992
3009
 
2993
- return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
2994
- };
3010
+ /***/ 6:
3011
+ /***/ (function(module, exports) {
2995
3012
 
2996
- exports.insertLayout = insertLayout;
3013
+ module.exports = require("@babel/runtime/helpers/defineProperty");
2997
3014
 
2998
3015
  /***/ }),
2999
3016
 
@@ -3003,9 +3020,9 @@ exports.insertLayout = insertLayout;
3003
3020
  "use strict";
3004
3021
 
3005
3022
 
3006
- var _classCallCheck = __webpack_require__(12);
3023
+ var _classCallCheck = __webpack_require__(10);
3007
3024
 
3008
- var _createClass = __webpack_require__(17);
3025
+ var _createClass = __webpack_require__(18);
3009
3026
 
3010
3027
  Object.defineProperty(exports, "__esModule", {
3011
3028
  value: true
@@ -3079,16 +3096,16 @@ module.exports = require("@splunk/visualizations-shared/simpleXMLOptions");
3079
3096
  "use strict";
3080
3097
 
3081
3098
 
3082
- var _toConsumableArray = __webpack_require__(9);
3099
+ var _toConsumableArray = __webpack_require__(7);
3083
3100
 
3084
3101
  Object.defineProperty(exports, "__esModule", {
3085
3102
  value: true
3086
3103
  });
3087
3104
  exports.AxesChartDataConfigAreaColumnLine = exports.AxesChartDataConfigBubble = exports.AxesChartDataConfigScatter = exports.AxesChartDataConfigBar = void 0;
3088
3105
 
3089
- var i18n_1 = __webpack_require__(3);
3106
+ var i18n_1 = __webpack_require__(2);
3090
3107
 
3091
- var configUtils_1 = __webpack_require__(6);
3108
+ var configUtils_1 = __webpack_require__(16);
3092
3109
 
3093
3110
  var AxesChartDataConfig = {
3094
3111
  label: i18n_1._('Data configurations'),
@@ -3129,15 +3146,35 @@ exports.AxesChartDataConfigBar = {
3129
3146
  };
3130
3147
  exports.AxesChartDataConfigScatter = {
3131
3148
  label: AxesChartDataConfig.label,
3132
- // layout: insert Category after Y
3133
- layout: configUtils_1.insertLayout(AxesChartDataConfig.layout, 2, [{
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
+ }], [{
3134
3164
  label: i18n_1._('Category'),
3135
3165
  option: 'category',
3136
3166
  editor: 'editor.columnSelector',
3137
3167
  editorProps: {
3138
3168
  dataSourceKey: 'primary'
3139
3169
  }
3140
- }])
3170
+ }], [{
3171
+ label: i18n_1._('Result limit'),
3172
+ option: 'resultLimit',
3173
+ editor: 'editor.number',
3174
+ editorProps: {
3175
+ dataSourceKey: 'primary'
3176
+ }
3177
+ }]]
3141
3178
  };
3142
3179
  exports.AxesChartDataConfigBubble = {
3143
3180
  label: exports.AxesChartDataConfigScatter.label,
@@ -3183,11 +3220,11 @@ Object.defineProperty(exports, "__esModule", {
3183
3220
  value: true
3184
3221
  });
3185
3222
 
3186
- var i18n_1 = __webpack_require__(3);
3223
+ var i18n_1 = __webpack_require__(2);
3187
3224
 
3188
- var pick_1 = __webpack_require__(20);
3225
+ var pick_1 = __webpack_require__(21);
3189
3226
 
3190
- var variables_1 = __webpack_require__(10);
3227
+ var variables_1 = __webpack_require__(8);
3191
3228
 
3192
3229
  var BackgroundColor_1 = __webpack_require__(49);
3193
3230
 
@@ -3206,23 +3243,15 @@ var AxesChartColorAndStyle = {
3206
3243
  label: i18n_1._('Color and style'),
3207
3244
  layout: [BackgroundColor_1.default({
3208
3245
  themes: themes
3209
- }) // Add SeriesColorsEditor when SCP-55658 is done e.g.
3210
- // [
3211
- // {
3212
- // label: _('Series colors'),
3213
- // option: 'seriesColors',
3214
- // editor: 'editor.seriesColors',
3215
- // },
3216
- // ],
3217
- // Add SeriesColorsByFieldEditor here when SCP-55687 is done, e.g.
3218
- // [
3219
- // {
3220
- // label: _('Series colors by field name'),
3221
- // option: 'seriesColorsByField',
3222
- // editor: 'editor.seriesColorsByField',
3223
- // },
3224
- // ],
3225
- ]
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
+ }]]
3226
3255
  };
3227
3256
  exports.default = AxesChartColorAndStyle;
3228
3257
 
@@ -3238,7 +3267,7 @@ Object.defineProperty(exports, "__esModule", {
3238
3267
  value: true
3239
3268
  });
3240
3269
 
3241
- var i18n_1 = __webpack_require__(3);
3270
+ var i18n_1 = __webpack_require__(2);
3242
3271
 
3243
3272
  var AxesChartLegend = {
3244
3273
  label: i18n_1._('Legend'),
@@ -3299,16 +3328,16 @@ exports.default = AxesChartLegend;
3299
3328
  "use strict";
3300
3329
 
3301
3330
 
3302
- var _toConsumableArray = __webpack_require__(9);
3331
+ var _toConsumableArray = __webpack_require__(7);
3303
3332
 
3304
3333
  Object.defineProperty(exports, "__esModule", {
3305
3334
  value: true
3306
3335
  });
3307
3336
  exports.AxesChartXGridAndLabelsBubbleScatter = exports.AxesChartXGridAndLabelsCommon = void 0;
3308
3337
 
3309
- var i18n_1 = __webpack_require__(3);
3338
+ var i18n_1 = __webpack_require__(2);
3310
3339
 
3311
- var configUtils_1 = __webpack_require__(6);
3340
+ var configUtils_1 = __webpack_require__(16);
3312
3341
 
3313
3342
  exports.AxesChartXGridAndLabelsCommon = {
3314
3343
  label: i18n_1._('X-axis grid and labels'),
@@ -3347,7 +3376,7 @@ var AxesChartXGridAndLabels = {
3347
3376
  layout: [].concat(_toConsumableArray(exports.AxesChartXGridAndLabelsCommon.layout), [[{
3348
3377
  label: i18n_1._('Label rotation'),
3349
3378
  option: 'xAxisLabelRotation',
3350
- editor: 'editor.radioBar',
3379
+ editor: 'editor.select',
3351
3380
  editorProps: {
3352
3381
  values: [{
3353
3382
  label: i18n_1._('-90'),
@@ -3592,7 +3621,7 @@ Object.defineProperty(exports, "__esModule", {
3592
3621
  value: true
3593
3622
  });
3594
3623
 
3595
- var i18n_1 = __webpack_require__(3);
3624
+ var i18n_1 = __webpack_require__(2);
3596
3625
 
3597
3626
  var AxesChartYGridAndLabels = {
3598
3627
  label: i18n_1._('Y-axis grid and labels'),
@@ -3748,101 +3777,21 @@ exports.default = AxesChartYGridAndLabels;
3748
3777
  /***/ 7:
3749
3778
  /***/ (function(module, exports) {
3750
3779
 
3751
- module.exports = require("@babel/runtime/helpers/defineProperty");
3780
+ module.exports = require("@babel/runtime/helpers/toConsumableArray");
3752
3781
 
3753
3782
  /***/ }),
3754
3783
 
3755
3784
  /***/ 8:
3756
- /***/ (function(module, exports, __webpack_require__) {
3757
-
3758
- "use strict";
3759
-
3760
-
3761
- var _typeof = __webpack_require__(23);
3762
-
3763
- Object.defineProperty(exports, "__esModule", {
3764
- value: true
3765
- });
3766
- exports.deepMergeWithArrayPrimitiveOverrides = exports.extendStaticWrapperProps = void 0;
3767
-
3768
- var lodash_1 = __webpack_require__(2);
3769
-
3770
- var mapUtils_1 = __webpack_require__(41);
3771
- /**
3772
- * @method extendStaticWrapperProps
3773
- * @param {Object} props
3774
- * @param {DashboardVizType} props.Wrapper
3775
- * @param {DashboardVizType} props.Visualization
3776
- */
3777
-
3778
-
3779
- var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
3780
- var Wrapper = _ref.Wrapper,
3781
- Visualization = _ref.Visualization;
3782
- var extendProperties = ['propTypes', 'defaultProps', 'config'];
3783
- extendProperties.forEach(function (prop) {
3784
- if (Visualization[prop]) {
3785
- // eslint-disable-next-line no-param-reassign
3786
- Wrapper[prop] = Visualization[prop];
3787
- }
3788
- });
3789
- };
3790
-
3791
- exports.extendStaticWrapperProps = extendStaticWrapperProps;
3792
- /**
3793
- * helper to deeply merge objects while preserving arrays in earlier source objects
3794
- * 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
3795
- * 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).
3796
- * 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
3797
- * 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.
3798
- *
3799
- * @method deepMergeWithArrayPrimitiveOverrides
3800
- * @param {Object} initial - target object to merge values into
3801
- * @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
3802
- *
3803
- * @returns {Object}
3804
- */
3805
-
3806
- var deepMergeWithArrayPrimitiveOverrides = function deepMergeWithArrayPrimitiveOverrides(initial) {
3807
- var clone = lodash_1.cloneDeep(initial);
3808
-
3809
- for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
3810
- sources[_key - 1] = arguments[_key];
3811
- }
3812
-
3813
- sources.forEach(function (sourceToApply) {
3814
- Object.keys(sourceToApply).forEach(function (sourceKey) {
3815
- if (!Object.prototype.hasOwnProperty.call(clone, sourceKey)) {
3816
- clone[sourceKey] = lodash_1.cloneDeep(sourceToApply[sourceKey]);
3817
- }
3818
-
3819
- if (clone[sourceKey] && _typeof(clone[sourceKey]) === 'object' && !Array.isArray(clone[sourceKey]) && _typeof(sourceToApply[sourceKey]) === 'object') {
3820
- clone[sourceKey] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey], sourceToApply[sourceKey]);
3821
- } else if (Array.isArray(clone[sourceKey]) && _typeof(clone[sourceKey][0]) === 'object' && !Array.isArray(clone[sourceKey][0])) {
3822
- // If option is an array of objects
3823
- for (var i = 0; i < clone[sourceKey].length; i += 1) {
3824
- if (_typeof(clone[sourceKey][i]) === 'object') {
3825
- var closestMatchIdx = mapUtils_1.findClosestMatchFromDefaultList(sourceToApply[sourceKey], clone[sourceKey][i]);
3826
-
3827
- if (closestMatchIdx > -1) {
3828
- clone[sourceKey][i] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey][i], sourceToApply[sourceKey][closestMatchIdx]);
3829
- }
3830
- }
3831
- }
3832
- }
3833
- });
3834
- });
3835
- return clone;
3836
- };
3785
+ /***/ (function(module, exports) {
3837
3786
 
3838
- exports.deepMergeWithArrayPrimitiveOverrides = deepMergeWithArrayPrimitiveOverrides;
3787
+ module.exports = require("@splunk/themes/variables");
3839
3788
 
3840
3789
  /***/ }),
3841
3790
 
3842
3791
  /***/ 9:
3843
3792
  /***/ (function(module, exports) {
3844
3793
 
3845
- module.exports = require("@babel/runtime/helpers/toConsumableArray");
3794
+ module.exports = require("@splunk/visualizations-shared/Message");
3846
3795
 
3847
3796
  /***/ })
3848
3797