@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/Table.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 = 265);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 268);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
@@ -109,18 +109,25 @@ 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
+
114
+ /***/ }),
115
+
116
+ /***/ 109:
117
+ /***/ (function(module, exports) {
118
+
119
+ module.exports = require("@babel/runtime/helpers/typeof");
113
120
 
114
121
  /***/ }),
115
122
 
116
123
  /***/ 11:
117
124
  /***/ (function(module, exports) {
118
125
 
119
- module.exports = require("@splunk/visualizations-shared/Message");
126
+ module.exports = require("@splunk/visualizations-shared/colorUtils");
120
127
 
121
128
  /***/ }),
122
129
 
123
- /***/ 111:
130
+ /***/ 113:
124
131
  /***/ (function(module, exports, __webpack_require__) {
125
132
 
126
133
  "use strict";
@@ -140,20 +147,143 @@ exports.validFontSizes = ['extraSmall', 'small', 'default', 'large'];
140
147
  /***/ }),
141
148
 
142
149
  /***/ 12:
143
- /***/ (function(module, exports) {
150
+ /***/ (function(module, exports, __webpack_require__) {
144
151
 
145
- module.exports = require("@babel/runtime/helpers/classCallCheck");
152
+ "use strict";
153
+
154
+
155
+ Object.defineProperty(exports, "__esModule", {
156
+ value: true
157
+ });
158
+
159
+ var React = __webpack_require__(1);
160
+
161
+ var styled_components_1 = __webpack_require__(4);
162
+
163
+ var SizeAwareWrapper_1 = __webpack_require__(19);
164
+
165
+ var style_1 = __webpack_require__(14);
166
+
167
+ var colorUtils_1 = __webpack_require__(11);
168
+
169
+ var Item = styled_components_1.default.div.attrs(function (_ref) {
170
+ var width = _ref.width;
171
+ return {
172
+ style: {
173
+ width: style_1.toPx(width)
174
+ }
175
+ };
176
+ }).withConfig({
177
+ displayName: "FixedSizeContainer__Item",
178
+ componentId: "sc-1yhgpod-0"
179
+ })(["position:relative;background-color:", "};"], function (props) {
180
+ return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
181
+ }); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
182
+
183
+ var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
184
+ var width = _ref2.width,
185
+ height = _ref2.height;
186
+ return {
187
+ style: Object.assign(Object.assign({}, width && {
188
+ width: style_1.toPx(width)
189
+ }), height && {
190
+ height: style_1.toPx(height)
191
+ })
192
+ };
193
+ }).withConfig({
194
+ displayName: "FixedSizeContainer__FixSizeItem",
195
+ componentId: "sc-1yhgpod-1"
196
+ })(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
197
+ return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
198
+ });
199
+ var ItemContent = styled_components_1.default.div.withConfig({
200
+ displayName: "FixedSizeContainer__ItemContent",
201
+ componentId: "sc-1yhgpod-2"
202
+ })(["position:relative;min-height:100px;width:100%;"]);
203
+ var FixSizeItemContent = styled_components_1.default.div.withConfig({
204
+ displayName: "FixedSizeContainer__FixSizeItemContent",
205
+ componentId: "sc-1yhgpod-3"
206
+ })(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
207
+
208
+ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
209
+ var FixedSizeContainer = function FixedSizeContainer(props) {
210
+ var width = props.width,
211
+ height = props.height,
212
+ backgroundColor = props.backgroundColor;
213
+
214
+ if (!height) {
215
+ return React.createElement(Item, {
216
+ "data-test": "item",
217
+ width: width,
218
+ backgroundColor: backgroundColor
219
+ }, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
220
+ }
221
+
222
+ return React.createElement(FixSizeItem, {
223
+ "data-test": "fix-size-item",
224
+ "data-splunk-visualization-version": "25.1.0 - 812a9a4d8",
225
+ width: width,
226
+ height: height,
227
+ backgroundColor: backgroundColor
228
+ }, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
229
+ var newWidth = _ref3.width,
230
+ newHeight = _ref3.height;
231
+ return React.createElement(Viz, Object.assign({}, props, {
232
+ width: newWidth,
233
+ height: newHeight
234
+ }));
235
+ })));
236
+ };
237
+
238
+ FixedSizeContainer.displayName = 'withFixedSizeContainer';
239
+ return FixedSizeContainer;
240
+ };
241
+
242
+ exports.default = withFixedSizeContainer;
146
243
 
147
244
  /***/ }),
148
245
 
149
246
  /***/ 13:
247
+ /***/ (function(module, exports, __webpack_require__) {
248
+
249
+ "use strict";
250
+
251
+
252
+ Object.defineProperty(exports, "__esModule", {
253
+ value: true
254
+ });
255
+ exports.extendStaticWrapperProps = void 0;
256
+ /**
257
+ * @method extendStaticWrapperProps
258
+ * @param {Object} props
259
+ * @param {DashboardVizType} props.Wrapper
260
+ * @param {DashboardVizType} props.Visualization
261
+ */
262
+
263
+ var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
264
+ var Wrapper = _ref.Wrapper,
265
+ Visualization = _ref.Visualization;
266
+ var extendProperties = ['propTypes', 'defaultProps', 'config'];
267
+ extendProperties.forEach(function (prop) {
268
+ if (Visualization[prop]) {
269
+ // eslint-disable-next-line no-param-reassign
270
+ Wrapper[prop] = Visualization[prop];
271
+ }
272
+ });
273
+ };
274
+
275
+ exports.extendStaticWrapperProps = extendStaticWrapperProps;
276
+
277
+ /***/ }),
278
+
279
+ /***/ 14:
150
280
  /***/ (function(module, exports) {
151
281
 
152
- module.exports = require("@splunk/visualizations-shared/colorUtils");
282
+ module.exports = require("@splunk/visualizations-shared/style");
153
283
 
154
284
  /***/ }),
155
285
 
156
- /***/ 138:
286
+ /***/ 140:
157
287
  /***/ (function(module, exports, __webpack_require__) {
158
288
 
159
289
  "use strict";
@@ -179,17 +309,17 @@ Object.defineProperty(exports, "__esModule", {
179
309
  });
180
310
  exports.config = exports.PureTable = exports.themes = exports.computeVizProps = void 0;
181
311
 
182
- var lodash_1 = __webpack_require__(2);
312
+ var lodash_1 = __webpack_require__(3);
183
313
 
184
- var colorUtils_1 = __webpack_require__(13);
314
+ var colorUtils_1 = __webpack_require__(11);
185
315
 
186
- var config_1 = __webpack_require__(266);
316
+ var config_1 = __webpack_require__(269);
187
317
 
188
318
  exports.config = config_1.default;
189
319
 
190
- var withDashboardViz_1 = __webpack_require__(30);
320
+ var withDashboardViz_1 = __webpack_require__(31);
191
321
 
192
- var PureTable_1 = __webpack_require__(139);
322
+ var PureTable_1 = __webpack_require__(141);
193
323
 
194
324
  exports.PureTable = PureTable_1.default;
195
325
 
@@ -267,7 +397,7 @@ exports.default = Table;
267
397
 
268
398
  /***/ }),
269
399
 
270
- /***/ 139:
400
+ /***/ 141:
271
401
  /***/ (function(module, exports, __webpack_require__) {
272
402
 
273
403
  "use strict";
@@ -275,7 +405,7 @@ exports.default = Table;
275
405
 
276
406
  var _slicedToArray = __webpack_require__(52);
277
407
 
278
- var _defineProperty = __webpack_require__(7);
408
+ var _defineProperty = __webpack_require__(6);
279
409
 
280
410
  var _taggedTemplateLiteral = __webpack_require__(81);
281
411
 
@@ -303,43 +433,43 @@ var React = __webpack_require__(1);
303
433
 
304
434
  var T = __webpack_require__(0);
305
435
 
306
- var lodash_1 = __webpack_require__(2);
436
+ var lodash_1 = __webpack_require__(3);
307
437
 
308
438
  var styled_components_1 = __webpack_require__(4);
309
439
 
310
- var i18n_1 = __webpack_require__(3);
440
+ var i18n_1 = __webpack_require__(2);
311
441
 
312
- var Table_1 = __webpack_require__(89);
442
+ var Table_1 = __webpack_require__(91);
313
443
 
314
- var Paginator_1 = __webpack_require__(267);
444
+ var Paginator_1 = __webpack_require__(270);
315
445
 
316
- var Message_1 = __webpack_require__(268);
446
+ var Message_1 = __webpack_require__(271);
317
447
 
318
- var colorUtils_1 = __webpack_require__(13);
448
+ var colorUtils_1 = __webpack_require__(11);
319
449
 
320
- var style_1 = __webpack_require__(15);
450
+ var style_1 = __webpack_require__(14);
321
451
 
322
- var pick_1 = __webpack_require__(20);
452
+ var pick_1 = __webpack_require__(21);
323
453
 
324
- var variables_1 = __webpack_require__(10);
454
+ var variables_1 = __webpack_require__(8);
325
455
 
326
- var hooks_1 = __webpack_require__(269);
456
+ var hooks_1 = __webpack_require__(272);
327
457
 
328
- var consts_1 = __webpack_require__(111);
458
+ var consts_1 = __webpack_require__(113);
329
459
 
330
- var cells_1 = __webpack_require__(270);
460
+ var cells_1 = __webpack_require__(273);
331
461
 
332
- var getPagination_1 = __webpack_require__(28);
462
+ var getPagination_1 = __webpack_require__(29);
333
463
 
334
- var getSorting_1 = __webpack_require__(27);
464
+ var getSorting_1 = __webpack_require__(28);
335
465
 
336
- var FixedSizeContainer_1 = __webpack_require__(14);
466
+ var FixedSizeContainer_1 = __webpack_require__(12);
337
467
 
338
- var utils_1 = __webpack_require__(275); // debounce was imported this way due to typing
468
+ var utils_1 = __webpack_require__(278); // debounce was imported this way due to typing
339
469
  // eslint-disable-next-line import/order
340
470
 
341
471
 
342
- var debounce = __webpack_require__(276);
472
+ var debounce = __webpack_require__(279);
343
473
 
344
474
  exports.MINIMUM_COLUMN_SIZE = 30;
345
475
  var NonVisibleTableHead = styled_components_1.default(Table_1.default.Head).withConfig({
@@ -873,125 +1003,258 @@ exports.default = withEmptyTableMessage(FixedSizeContainer_1.default(PureTable))
873
1003
 
874
1004
  /***/ }),
875
1005
 
876
- /***/ 14:
877
- /***/ (function(module, exports, __webpack_require__) {
1006
+ /***/ 15:
1007
+ /***/ (function(module, exports) {
878
1008
 
879
- "use strict";
1009
+ module.exports = require("@splunk/visualizations-shared/schemaUtils");
880
1010
 
1011
+ /***/ }),
881
1012
 
882
- Object.defineProperty(exports, "__esModule", {
883
- value: true
884
- });
1013
+ /***/ 16:
1014
+ /***/ (function(module, exports, __webpack_require__) {
885
1015
 
886
- var React = __webpack_require__(1);
1016
+ "use strict";
887
1017
 
888
- var styled_components_1 = __webpack_require__(4);
889
1018
 
890
- var SizeAwareWrapper_1 = __webpack_require__(18);
1019
+ var _toConsumableArray = __webpack_require__(7);
891
1020
 
892
- var style_1 = __webpack_require__(15);
1021
+ var _defineProperty = __webpack_require__(6);
893
1022
 
894
- var colorUtils_1 = __webpack_require__(13);
1023
+ var __rest = this && this.__rest || function (s, e) {
1024
+ var t = {};
895
1025
 
896
- var Item = styled_components_1.default.div.attrs(function (_ref) {
897
- var width = _ref.width;
898
- return {
899
- style: {
900
- width: style_1.toPx(width)
901
- }
902
- };
903
- }).withConfig({
904
- displayName: "FixedSizeContainer__Item",
905
- componentId: "sc-1yhgpod-0"
906
- })(["position:relative;background-color:", "};"], function (props) {
907
- return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
908
- }); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
1026
+ for (var p in s) {
1027
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
1028
+ }
909
1029
 
910
- var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
911
- var width = _ref2.width,
912
- height = _ref2.height;
913
- return {
914
- style: Object.assign(Object.assign({}, width && {
915
- width: style_1.toPx(width)
916
- }), height && {
917
- height: style_1.toPx(height)
918
- })
919
- };
920
- }).withConfig({
921
- displayName: "FixedSizeContainer__FixSizeItem",
922
- componentId: "sc-1yhgpod-1"
923
- })(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
924
- return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
1030
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1031
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
1032
+ }
1033
+ return t;
1034
+ };
1035
+
1036
+ Object.defineProperty(exports, "__esModule", {
1037
+ value: true
925
1038
  });
926
- var ItemContent = styled_components_1.default.div.withConfig({
927
- displayName: "FixedSizeContainer__ItemContent",
928
- componentId: "sc-1yhgpod-2"
929
- })(["position:relative;min-height:100px;width:100%;"]);
930
- var FixSizeItemContent = styled_components_1.default.div.withConfig({
931
- displayName: "FixedSizeContainer__FixSizeItemContent",
932
- componentId: "sc-1yhgpod-3"
933
- })(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
1039
+ exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
934
1040
 
935
- var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
936
- var FixedSizeContainer = function FixedSizeContainer(props) {
937
- var width = props.width,
938
- height = props.height,
939
- backgroundColor = props.backgroundColor;
1041
+ var lodash_1 = __webpack_require__(3);
940
1042
 
941
- if (!height) {
942
- return React.createElement(Item, {
943
- "data-test": "item",
944
- width: width,
945
- backgroundColor: backgroundColor
946
- }, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
947
- }
1043
+ var schemaUtils_1 = __webpack_require__(15);
948
1044
 
949
- return React.createElement(FixSizeItem, {
950
- "data-test": "fix-size-item",
951
- "data-splunk-visualization-version": "25.0.0 - 5e0f30e5a",
952
- width: width,
953
- height: height,
954
- backgroundColor: backgroundColor
955
- }, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
956
- var newWidth = _ref3.width,
957
- newHeight = _ref3.height;
958
- return React.createElement(Viz, Object.assign({}, props, {
959
- width: newWidth,
960
- height: newHeight
961
- }));
962
- })));
963
- };
1045
+ var VizBehavior_1 = __webpack_require__(5);
964
1046
 
965
- FixedSizeContainer.displayName = 'withFixedSizeContainer';
966
- return FixedSizeContainer;
1047
+ var dynamicOptionsDSLType = {
1048
+ type: 'string',
1049
+ pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
967
1050
  };
1051
+ /**
1052
+ * Helper function to extend an options schema with dynamic options DSL
1053
+ * @param optionsSchema a visualization's options schema
1054
+ * @returns an updated options schema that additionally allows strings starting with > for each option
1055
+ */
968
1056
 
969
- exports.default = withFixedSizeContainer;
970
-
971
- /***/ }),
972
-
973
- /***/ 15:
974
- /***/ (function(module, exports) {
1057
+ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
1058
+ var enhancedOptionsSchema = {};
1059
+ Object.keys(optionsSchema).forEach(function (key) {
1060
+ var _a = optionsSchema[key],
1061
+ title = _a.title,
1062
+ description = _a.description,
1063
+ readOnly = _a.readOnly,
1064
+ writeOnly = _a.writeOnly,
1065
+ examples = _a.examples,
1066
+ defaultValue = _a.default,
1067
+ type = _a.type,
1068
+ properties = _a.properties,
1069
+ patternProperties = _a.patternProperties,
1070
+ remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
975
1071
 
976
- module.exports = require("@splunk/visualizations-shared/style");
1072
+ var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
1073
+ title: title
1074
+ }), description !== undefined && {
1075
+ description: description
1076
+ }), readOnly !== undefined && {
1077
+ readOnly: readOnly
1078
+ }), writeOnly !== undefined && {
1079
+ writeOnly: writeOnly
1080
+ }), examples !== undefined && {
1081
+ examples: examples
1082
+ }), defaultValue !== undefined && {
1083
+ default: defaultValue
1084
+ });
977
1085
 
978
- /***/ }),
1086
+ if (type === 'object') {
1087
+ enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
1088
+ type: type
1089
+ }), properties && {
1090
+ properties: enhanceOptionsSchemaWithDynamicOptions(properties)
1091
+ });
979
1092
 
980
- /***/ 16:
981
- /***/ (function(module, exports) {
1093
+ if (patternProperties) {
1094
+ var enhancedPatternProperties = {};
1095
+ Object.keys(patternProperties).forEach(function (opt) {
1096
+ enhancedPatternProperties = Object.assign(Object.assign({}, enhancedPatternProperties), enhanceOptionsSchemaWithDynamicOptions(_defineProperty({}, opt, patternProperties[opt])));
1097
+ });
1098
+ enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;
1099
+ }
1100
+ } else {
1101
+ enhancedOptionsSchema[key] = Object.assign(Object.assign({}, annotations), {
1102
+ anyOf: [Object.assign(Object.assign({}, type !== undefined && {
1103
+ type: type
1104
+ }), remainingSchemaEntry), dynamicOptionsDSLType]
1105
+ });
1106
+ }
1107
+ });
1108
+ return enhancedOptionsSchema;
1109
+ }
982
1110
 
983
- module.exports = require("@splunk/visualizations-shared/schemaUtils");
1111
+ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
1112
+ /**
1113
+ * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
1114
+ * this function also collapse all editor panels
1115
+ * @param vizConfig a Visualization Config
1116
+ * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
1117
+ * and containing `open: false` for all editor panels in editorConfig
1118
+ */
1119
+
1120
+ function enhanceConfig(vizConfig) {
1121
+ var enhancedConfig = vizConfig;
1122
+
1123
+ if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
1124
+ enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
1125
+ }
1126
+
1127
+ enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
1128
+ return Object.assign(Object.assign({}, config), {
1129
+ open: false
1130
+ });
1131
+ });
1132
+ return enhancedConfig;
1133
+ }
1134
+
1135
+ exports.enhanceConfig = enhanceConfig;
1136
+ /**
1137
+ * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
1138
+ * Created for editor unit tests
1139
+ * @param vizConfig a Visualization Config
1140
+ * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
1141
+ */
1142
+
1143
+ function uncollapseEditorConfig(vizConfig) {
1144
+ var editorPanelUncollapsedConfig = vizConfig;
1145
+ editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
1146
+ return Object.assign(Object.assign({}, config), {
1147
+ open: true
1148
+ });
1149
+ });
1150
+ return editorPanelUncollapsedConfig;
1151
+ }
1152
+
1153
+ exports.uncollapseEditorConfig = uncollapseEditorConfig;
1154
+
1155
+ function isDynamicOption(option) {
1156
+ return option && typeof option === 'string' && option.trim().startsWith('>') || false;
1157
+ }
1158
+
1159
+ exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
1160
+ // this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
1161
+
1162
+ /**
1163
+ * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
1164
+ * 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
1165
+ * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
1166
+ * 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
1167
+ *
1168
+ * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
1169
+ */
1170
+
1171
+ function hasCompatibleContexts(vizContext, presetContext) {
1172
+ var presetContextKeys = Object.keys(presetContext);
1173
+ return presetContextKeys.every(function (contextKey) {
1174
+ return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
1175
+ });
1176
+ }
1177
+ /**
1178
+ * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
1179
+ */
1180
+
1181
+
1182
+ function hasCompatibleOptions(vizOptions, presetOptions) {
1183
+ var presetOptionKeys = Object.keys(presetOptions);
1184
+ return presetOptionKeys.every(function (optionKey) {
1185
+ return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
1186
+ });
1187
+ }
1188
+ /**
1189
+ * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
1190
+ * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
1191
+ *
1192
+ * @param {Object} vizContext - the current vizContext definition
1193
+ * @param {Object} vizOptions - the current vizOptions definition
1194
+ * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
1195
+ */
1196
+
1197
+
1198
+ function getInitialPreset(vizContext, vizOptions, presets) {
1199
+ return presets.find(function (preset) {
1200
+ var presetContext = lodash_1.get(preset, ['value', 'context'], {});
1201
+ var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
1202
+ var presetContextKeys = Object.keys(presetContext);
1203
+ var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
1204
+ // if not, then the preset is invalid in config.ts
1205
+
1206
+ if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
1207
+ return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
1208
+ });
1209
+ }
1210
+
1211
+ exports.getInitialPreset = getInitialPreset;
1212
+ /**
1213
+ * generates number precision values for a Select editor
1214
+ *
1215
+ * @param {Number} numPrecisionValues - number of integer precision values to generate
1216
+ * @returns {{ label: string; value; string }[]} array of { label, value } tuples
1217
+ */
1218
+
1219
+ function generatePrecisionValues(numPrecisionValues) {
1220
+ return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
1221
+ return {
1222
+ label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
1223
+ value: i
1224
+ };
1225
+ });
1226
+ }
1227
+
1228
+ exports.generatePrecisionValues = generatePrecisionValues;
1229
+ /**
1230
+ * insert layout in layout array, return a new layout array instead of updating the original
1231
+ *
1232
+ * @param {EditorLayoutConfig[][]} layout - editor layout
1233
+ * @param {Number} index - the index to insert layout item(s)
1234
+ * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
1235
+ * @returns {EditorLayoutConfig[][]} new editor layout with insertion
1236
+ */
1237
+
1238
+ var insertLayout = function insertLayout(layout, index) {
1239
+ for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
1240
+ layoutItems[_key - 2] = arguments[_key];
1241
+ }
1242
+
1243
+ return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
1244
+ };
1245
+
1246
+ exports.insertLayout = insertLayout;
984
1247
 
985
1248
  /***/ }),
986
1249
 
987
- /***/ 17:
1250
+ /***/ 18:
988
1251
  /***/ (function(module, exports) {
989
1252
 
990
1253
  module.exports = require("@babel/runtime/helpers/createClass");
991
1254
 
992
1255
  /***/ }),
993
1256
 
994
- /***/ 18:
1257
+ /***/ 19:
995
1258
  /***/ (function(module, exports) {
996
1259
 
997
1260
  module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
@@ -1001,237 +1264,118 @@ module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
1001
1264
  /***/ 2:
1002
1265
  /***/ (function(module, exports) {
1003
1266
 
1004
- module.exports = require("lodash");
1267
+ module.exports = require("@splunk/ui-utils/i18n");
1005
1268
 
1006
1269
  /***/ }),
1007
1270
 
1008
- /***/ 20:
1271
+ /***/ 21:
1009
1272
  /***/ (function(module, exports) {
1010
1273
 
1011
1274
  module.exports = require("@splunk/themes/pick");
1012
1275
 
1013
1276
  /***/ }),
1014
1277
 
1015
- /***/ 21:
1278
+ /***/ 22:
1016
1279
  /***/ (function(module, exports) {
1017
1280
 
1018
1281
  module.exports = require("@splunk/visualization-context/TimezoneContext");
1019
1282
 
1020
1283
  /***/ }),
1021
1284
 
1022
- /***/ 23:
1285
+ /***/ 24:
1023
1286
  /***/ (function(module, exports) {
1024
1287
 
1025
- module.exports = require("@babel/runtime/helpers/typeof");
1288
+ module.exports = require("@splunk/visualizations-shared/hocUtils");
1026
1289
 
1027
1290
  /***/ }),
1028
1291
 
1029
1292
  /***/ 25:
1293
+ /***/ (function(module, exports) {
1294
+
1295
+ module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
1296
+
1297
+ /***/ }),
1298
+
1299
+ /***/ 268:
1030
1300
  /***/ (function(module, exports, __webpack_require__) {
1031
1301
 
1032
1302
  "use strict";
1033
1303
 
1034
1304
 
1035
- Object.defineProperty(exports, "__esModule", {
1036
- value: true
1305
+ var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
1306
+ if (k2 === undefined) k2 = k;
1307
+ Object.defineProperty(o, k2, {
1308
+ enumerable: true,
1309
+ get: function get() {
1310
+ return m[k];
1311
+ }
1312
+ });
1313
+ } : function (o, m, k, k2) {
1314
+ if (k2 === undefined) k2 = k;
1315
+ o[k2] = m[k];
1037
1316
  });
1038
- exports.pickFieldFromJSONSchema = void 0;
1039
1317
 
1040
- var lodash_1 = __webpack_require__(2);
1318
+ var __exportStar = this && this.__exportStar || function (m, exports) {
1319
+ for (var p in m) {
1320
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1321
+ }
1322
+ };
1041
1323
 
1042
- var pickFieldFromJSONSchema = function pickFieldFromJSONSchema(optionsSchema) {
1043
- var fieldName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
1044
- return Object.keys(optionsSchema).reduce(function (accum, k) {
1045
- if (lodash_1.has(optionsSchema[k], fieldName)) {
1046
- accum[k] = optionsSchema[k][fieldName];
1047
- } else if (lodash_1.get(optionsSchema, [k, 'type']) === 'object' && lodash_1.has(optionsSchema[k], 'properties')) {
1048
- var nestedSchema = exports.pickFieldFromJSONSchema(optionsSchema[k].properties, fieldName);
1324
+ Object.defineProperty(exports, "__esModule", {
1325
+ value: true
1326
+ });
1327
+ exports.default = void 0; // NOTE: wildcard syntax only works for named exports
1328
+ // for some reason, omitting the default export worked before TS v4
1329
+ // see: https://stackoverflow.com/a/34445175
1049
1330
 
1050
- if (!lodash_1.isEmpty(nestedSchema)) {
1051
- accum[k] = nestedSchema;
1052
- }
1053
- }
1331
+ __exportStar(__webpack_require__(140), exports);
1054
1332
 
1055
- return accum;
1056
- }, {});
1057
- };
1333
+ var Table_1 = __webpack_require__(140);
1058
1334
 
1059
- exports.pickFieldFromJSONSchema = pickFieldFromJSONSchema;
1335
+ Object.defineProperty(exports, "default", {
1336
+ enumerable: true,
1337
+ get: function get() {
1338
+ return Table_1.default;
1339
+ }
1340
+ });
1060
1341
 
1061
1342
  /***/ }),
1062
1343
 
1063
- /***/ 26:
1344
+ /***/ 269:
1064
1345
  /***/ (function(module, exports, __webpack_require__) {
1065
1346
 
1066
1347
  "use strict";
1067
1348
 
1068
1349
 
1350
+ var _toConsumableArray = __webpack_require__(7);
1351
+
1069
1352
  Object.defineProperty(exports, "__esModule", {
1070
1353
  value: true
1071
1354
  });
1072
- exports.shouldShowIconPlaceholder = void 0;
1073
1355
 
1074
- var React = __webpack_require__(1);
1356
+ var i18n_1 = __webpack_require__(2);
1075
1357
 
1076
- var T = __webpack_require__(0);
1358
+ var lodash_1 = __webpack_require__(3);
1077
1359
 
1078
- var lodash_1 = __webpack_require__(2);
1360
+ var schemaUtils_1 = __webpack_require__(15);
1079
1361
 
1080
- var i18n_1 = __webpack_require__(3);
1362
+ var colorConstants_1 = __webpack_require__(43);
1081
1363
 
1082
- var Message_1 = __webpack_require__(11);
1364
+ var visualization_icons_1 = __webpack_require__(46);
1083
1365
 
1084
- var FixedSizeContainer_1 = __webpack_require__(14);
1085
- /**
1086
- * @method shouldShowIconPlaceholder
1087
- * @param {object} dataSources
1088
- * @param {boolean} loading
1089
- * @returns {boolean}
1090
- */
1366
+ var placeholders_1 = __webpack_require__(45);
1091
1367
 
1368
+ var variables_1 = __webpack_require__(8);
1092
1369
 
1093
- var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
1094
- var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1095
- var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
1096
- var noData = data === undefined;
1097
- var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
1098
- var noFields = fields === undefined;
1099
- return loading || noData || noFields;
1100
- };
1370
+ var pick_1 = __webpack_require__(21);
1101
1371
 
1102
- exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
1103
- var propTypes = {
1104
- icon: T.func,
1105
- width: T.oneOfType([T.string, T.number]),
1106
- height: T.oneOfType([T.string, T.number]),
1107
- // eslint-disable-next-line react/no-unused-prop-types
1108
- backgroundColor: T.string,
1109
- iconColor: T.string
1110
- };
1111
- /**
1112
- * @method IconPlaceholder
1113
- * @param {IconPlaceholderProps} props
1114
- * @returns {React.ReactElement}
1115
- */
1372
+ var configUtils_1 = __webpack_require__(16);
1116
1373
 
1117
- var IconPlaceholder = function IconPlaceholder(props) {
1118
- var width = props.width,
1119
- height = props.height,
1120
- icon = props.icon,
1121
- iconColor = props.iconColor;
1374
+ var VizBehavior_1 = __webpack_require__(5);
1122
1375
 
1123
- if (icon) {
1124
- return React.createElement(icon, {
1125
- style: {
1126
- left: '50%',
1127
- top: '50%',
1128
- color: iconColor,
1129
- opacity: 0.15,
1130
- position: 'absolute',
1131
- transform: 'translate(-50%, -50%)'
1132
- },
1133
- width: '50%',
1134
- height: '50%'
1135
- });
1136
- }
1137
-
1138
- return React.createElement(Message_1.default, {
1139
- width: width,
1140
- height: height,
1141
- level: "warning",
1142
- message: i18n_1._('No DataSource Connected')
1143
- });
1144
- };
1145
-
1146
- IconPlaceholder.propTypes = propTypes;
1147
- IconPlaceholder.defaultProps = {
1148
- width: '100%',
1149
- height: 250
1150
- };
1151
- exports.default = FixedSizeContainer_1.default(IconPlaceholder);
1152
-
1153
- /***/ }),
1154
-
1155
- /***/ 265:
1156
- /***/ (function(module, exports, __webpack_require__) {
1157
-
1158
- "use strict";
1159
-
1160
-
1161
- var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
1162
- if (k2 === undefined) k2 = k;
1163
- Object.defineProperty(o, k2, {
1164
- enumerable: true,
1165
- get: function get() {
1166
- return m[k];
1167
- }
1168
- });
1169
- } : function (o, m, k, k2) {
1170
- if (k2 === undefined) k2 = k;
1171
- o[k2] = m[k];
1172
- });
1173
-
1174
- var __exportStar = this && this.__exportStar || function (m, exports) {
1175
- for (var p in m) {
1176
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1177
- }
1178
- };
1179
-
1180
- Object.defineProperty(exports, "__esModule", {
1181
- value: true
1182
- });
1183
- exports.default = void 0; // NOTE: wildcard syntax only works for named exports
1184
- // for some reason, omitting the default export worked before TS v4
1185
- // see: https://stackoverflow.com/a/34445175
1186
-
1187
- __exportStar(__webpack_require__(138), exports);
1188
-
1189
- var Table_1 = __webpack_require__(138);
1190
-
1191
- Object.defineProperty(exports, "default", {
1192
- enumerable: true,
1193
- get: function get() {
1194
- return Table_1.default;
1195
- }
1196
- });
1376
+ var consts_1 = __webpack_require__(113);
1197
1377
 
1198
- /***/ }),
1199
-
1200
- /***/ 266:
1201
- /***/ (function(module, exports, __webpack_require__) {
1202
-
1203
- "use strict";
1204
-
1205
-
1206
- var _toConsumableArray = __webpack_require__(9);
1207
-
1208
- Object.defineProperty(exports, "__esModule", {
1209
- value: true
1210
- });
1211
-
1212
- var i18n_1 = __webpack_require__(3);
1213
-
1214
- var lodash_1 = __webpack_require__(2);
1215
-
1216
- var schemaUtils_1 = __webpack_require__(16);
1217
-
1218
- var colorConstants_1 = __webpack_require__(43);
1219
-
1220
- var visualization_icons_1 = __webpack_require__(46);
1221
-
1222
- var placeholders_1 = __webpack_require__(45);
1223
-
1224
- var variables_1 = __webpack_require__(10);
1225
-
1226
- var pick_1 = __webpack_require__(20);
1227
-
1228
- var configUtils_1 = __webpack_require__(6);
1229
-
1230
- var VizBehavior_1 = __webpack_require__(5);
1231
-
1232
- var consts_1 = __webpack_require__(111);
1233
-
1234
- var VizCategory_1 = __webpack_require__(29);
1378
+ var VizCategory_1 = __webpack_require__(30);
1235
1379
 
1236
1380
  var dataContract = {
1237
1381
  requiredDataSources: [{
@@ -1373,11 +1517,11 @@ var optionsSchema = {
1373
1517
  backgroundColor: {
1374
1518
  default: '> themes.defaultBackgroundColor',
1375
1519
  description: 'Specify the color for the background. You might use a data source to apply the color. The default for enterprise light is "#FFFFFF". The default for enterprise dark is "#000000". The default for prisma dark is "#0B0C0E".',
1376
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN,
1520
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
1377
1521
  type: 'string'
1378
1522
  },
1379
1523
  columnFormat: {
1380
- description: 'Allows column formatting for individual columns.',
1524
+ description: 'Lets you format an individual column in a table. Specify a column in a table as a field, followed by a property. For more information, see the Column Format Align - Left example on the Examples page.',
1381
1525
  type: 'object',
1382
1526
  patternProperties: {
1383
1527
  '.*': {
@@ -1421,7 +1565,7 @@ var optionsSchema = {
1421
1565
  type: 'array',
1422
1566
  items: {
1423
1567
  type: 'string',
1424
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
1568
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
1425
1569
  }
1426
1570
  },
1427
1571
  rowColors: {
@@ -1429,7 +1573,7 @@ var optionsSchema = {
1429
1573
  type: 'array',
1430
1574
  items: {
1431
1575
  type: 'string',
1432
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
1576
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
1433
1577
  }
1434
1578
  },
1435
1579
  sparklineAreaColors: {
@@ -1437,7 +1581,7 @@ var optionsSchema = {
1437
1581
  type: 'array',
1438
1582
  items: {
1439
1583
  type: 'string',
1440
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
1584
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
1441
1585
  }
1442
1586
  },
1443
1587
  sparklineColors: {
@@ -1445,7 +1589,7 @@ var optionsSchema = {
1445
1589
  type: 'array',
1446
1590
  items: {
1447
1591
  type: 'string',
1448
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
1592
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
1449
1593
  }
1450
1594
  },
1451
1595
  sparklineTypes: {
@@ -1539,7 +1683,7 @@ var optionsSchema = {
1539
1683
  }
1540
1684
  },
1541
1685
  tableFormat: {
1542
- description: 'Allows users to set table wide options.',
1686
+ description: 'Lets you set global options for a table.',
1543
1687
  type: 'object',
1544
1688
  properties: {
1545
1689
  align: {
@@ -1588,12 +1732,12 @@ var optionsSchema = {
1588
1732
  headerBackgroundColor: {
1589
1733
  default: '> themes.defaultHeaderBackgroundColor',
1590
1734
  description: 'Specify the table header background color using a hexadecimal code. For example, "#FFFFFF".',
1591
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN,
1735
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
1592
1736
  type: 'string'
1593
1737
  },
1594
1738
  headerColor: {
1595
1739
  description: 'Specify the table header text color using a hexadecimal code. For example, "#FFFFFF".',
1596
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN,
1740
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
1597
1741
  type: 'string'
1598
1742
  },
1599
1743
  rowBackgroundColors: {
@@ -1604,7 +1748,7 @@ var optionsSchema = {
1604
1748
  type: 'array',
1605
1749
  items: {
1606
1750
  type: 'string',
1607
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
1751
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
1608
1752
  }
1609
1753
  }
1610
1754
  },
@@ -1626,7 +1770,7 @@ var optionsSchema = {
1626
1770
  type: 'array',
1627
1771
  items: {
1628
1772
  type: 'string',
1629
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
1773
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
1630
1774
  }
1631
1775
  }
1632
1776
  },
@@ -1637,7 +1781,7 @@ var optionsSchema = {
1637
1781
  type: 'array',
1638
1782
  items: {
1639
1783
  type: 'string',
1640
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN
1784
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
1641
1785
  }
1642
1786
  }
1643
1787
  },
@@ -1740,10 +1884,19 @@ var editorConfig = [{
1740
1884
  labelPosition: 'left',
1741
1885
  labelWidth: EDITOR_LABEL_WIDTH
1742
1886
  }
1887
+ }], [{
1888
+ key: 'backgroundColor',
1889
+ editor: 'editor.tableBackgroundColor',
1890
+ editorProps: {
1891
+ themes: themes,
1892
+ labelPosition: 'left',
1893
+ labelWidth: EDITOR_LABEL_WIDTH,
1894
+ palette: _toConsumableArray(backgroundColorPaletteSet)
1895
+ }
1743
1896
  }], [{
1744
1897
  label: i18n_1._('Header Row'),
1745
1898
  option: 'headerVisibility',
1746
- editor: 'editor.radioBar',
1899
+ editor: 'editor.select',
1747
1900
  editorProps: {
1748
1901
  values: [{
1749
1902
  label: i18n_1._('Inline'),
@@ -1755,18 +1908,8 @@ var editorConfig = [{
1755
1908
  label: i18n_1._('Hidden'),
1756
1909
  value: 'none'
1757
1910
  }],
1758
- labelPosition: 'left',
1759
1911
  labelWidth: EDITOR_LABEL_WIDTH
1760
1912
  }
1761
- }], [{
1762
- key: 'backgroundColor',
1763
- editor: 'editor.tableBackgroundColor',
1764
- editorProps: {
1765
- themes: themes,
1766
- labelPosition: 'left',
1767
- labelWidth: EDITOR_LABEL_WIDTH,
1768
- palette: _toConsumableArray(backgroundColorPaletteSet)
1769
- }
1770
1913
  }], [{
1771
1914
  option: 'font',
1772
1915
  label: i18n_1._('Font'),
@@ -1807,7 +1950,7 @@ var editorConfig = [{
1807
1950
  }, {
1808
1951
  label: i18n_1._('Column Formatting'),
1809
1952
  layout: [[{
1810
- label: i18n_1._(''),
1953
+ label: i18n_1._('Column-specific formatting'),
1811
1954
  editor: 'editor.tableColumnFormatter',
1812
1955
  editorProps: {
1813
1956
  // Table column coloring does not adhere to same DSL structure as other dynamically colored options
@@ -1924,40 +2067,132 @@ exports.default = configUtils_1.enhanceConfig(config);
1924
2067
 
1925
2068
  /***/ }),
1926
2069
 
1927
- /***/ 267:
2070
+ /***/ 27:
2071
+ /***/ (function(module, exports, __webpack_require__) {
2072
+
2073
+ "use strict";
2074
+
2075
+
2076
+ Object.defineProperty(exports, "__esModule", {
2077
+ value: true
2078
+ });
2079
+ exports.shouldShowIconPlaceholder = void 0;
2080
+
2081
+ var React = __webpack_require__(1);
2082
+
2083
+ var T = __webpack_require__(0);
2084
+
2085
+ var lodash_1 = __webpack_require__(3);
2086
+
2087
+ var i18n_1 = __webpack_require__(2);
2088
+
2089
+ var Message_1 = __webpack_require__(9);
2090
+
2091
+ var FixedSizeContainer_1 = __webpack_require__(12);
2092
+ /**
2093
+ * @method shouldShowIconPlaceholder
2094
+ * @param {object} dataSources
2095
+ * @param {boolean} loading
2096
+ * @returns {boolean}
2097
+ */
2098
+
2099
+
2100
+ var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
2101
+ var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
2102
+ var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
2103
+ var noData = data === undefined;
2104
+ var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
2105
+ var noFields = fields === undefined;
2106
+ return loading || noData || noFields;
2107
+ };
2108
+
2109
+ exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
2110
+ var propTypes = {
2111
+ icon: T.func,
2112
+ width: T.oneOfType([T.string, T.number]),
2113
+ height: T.oneOfType([T.string, T.number]),
2114
+ // eslint-disable-next-line react/no-unused-prop-types
2115
+ backgroundColor: T.string,
2116
+ iconColor: T.string
2117
+ };
2118
+ /**
2119
+ * @method IconPlaceholder
2120
+ * @param {IconPlaceholderProps} props
2121
+ * @returns {React.ReactElement}
2122
+ */
2123
+
2124
+ var IconPlaceholder = function IconPlaceholder(props) {
2125
+ var width = props.width,
2126
+ height = props.height,
2127
+ icon = props.icon,
2128
+ iconColor = props.iconColor;
2129
+
2130
+ if (icon) {
2131
+ return React.createElement(icon, {
2132
+ style: {
2133
+ left: '50%',
2134
+ top: '50%',
2135
+ color: iconColor,
2136
+ opacity: 0.15,
2137
+ position: 'absolute',
2138
+ transform: 'translate(-50%, -50%)'
2139
+ },
2140
+ width: '50%',
2141
+ height: '50%'
2142
+ });
2143
+ }
2144
+
2145
+ return React.createElement(Message_1.default, {
2146
+ width: width,
2147
+ height: height,
2148
+ level: "warning",
2149
+ message: i18n_1._('No DataSource Connected')
2150
+ });
2151
+ };
2152
+
2153
+ IconPlaceholder.propTypes = propTypes;
2154
+ IconPlaceholder.defaultProps = {
2155
+ width: '100%',
2156
+ height: 250
2157
+ };
2158
+ exports.default = FixedSizeContainer_1.default(IconPlaceholder);
2159
+
2160
+ /***/ }),
2161
+
2162
+ /***/ 270:
1928
2163
  /***/ (function(module, exports) {
1929
2164
 
1930
2165
  module.exports = require("@splunk/react-ui/Paginator");
1931
2166
 
1932
2167
  /***/ }),
1933
2168
 
1934
- /***/ 268:
2169
+ /***/ 271:
1935
2170
  /***/ (function(module, exports) {
1936
2171
 
1937
2172
  module.exports = require("@splunk/react-ui/Message");
1938
2173
 
1939
2174
  /***/ }),
1940
2175
 
1941
- /***/ 269:
2176
+ /***/ 272:
1942
2177
  /***/ (function(module, exports, __webpack_require__) {
1943
2178
 
1944
2179
  "use strict";
1945
2180
 
1946
2181
 
1947
- var _toConsumableArray = __webpack_require__(9);
2182
+ var _toConsumableArray = __webpack_require__(7);
1948
2183
 
1949
- var _typeof = __webpack_require__(23);
2184
+ var _typeof = __webpack_require__(109);
1950
2185
 
1951
2186
  Object.defineProperty(exports, "__esModule", {
1952
2187
  value: true
1953
2188
  });
1954
2189
  exports.useTable = exports.getTextOverflowType = exports.getOverflowStyles = void 0;
1955
2190
 
1956
- var lodash_1 = __webpack_require__(2);
2191
+ var lodash_1 = __webpack_require__(3);
1957
2192
 
1958
- var colorUtils_1 = __webpack_require__(13);
2193
+ var colorUtils_1 = __webpack_require__(11);
1959
2194
 
1960
- var consts_1 = __webpack_require__(111);
2195
+ var consts_1 = __webpack_require__(113);
1961
2196
 
1962
2197
  var isArray = function isArray(v) {
1963
2198
  return Array.isArray(v);
@@ -2364,120 +2599,49 @@ exports.useTable = useTable;
2364
2599
 
2365
2600
  /***/ }),
2366
2601
 
2367
- /***/ 27:
2602
+ /***/ 273:
2368
2603
  /***/ (function(module, exports, __webpack_require__) {
2369
2604
 
2370
2605
  "use strict";
2371
2606
 
2372
2607
 
2373
- var _defineProperty = __webpack_require__(7);
2608
+ var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
2609
+ if (k2 === undefined) k2 = k;
2610
+ Object.defineProperty(o, k2, {
2611
+ enumerable: true,
2612
+ get: function get() {
2613
+ return m[k];
2614
+ }
2615
+ });
2616
+ } : function (o, m, k, k2) {
2617
+ if (k2 === undefined) k2 = k;
2618
+ o[k2] = m[k];
2619
+ });
2620
+
2621
+ var __exportStar = this && this.__exportStar || function (m, exports) {
2622
+ for (var p in m) {
2623
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2624
+ }
2625
+ };
2374
2626
 
2375
2627
  Object.defineProperty(exports, "__esModule", {
2376
2628
  value: true
2377
2629
  });
2378
- exports.getSortingParams = exports.SortParamsPropTypes = void 0;
2379
2630
 
2380
- var T = __webpack_require__(0);
2631
+ __exportStar(__webpack_require__(274), exports);
2381
2632
 
2382
- var lodash_1 = __webpack_require__(2);
2633
+ __exportStar(__webpack_require__(275), exports);
2383
2634
 
2384
- var DataSource_1 = __webpack_require__(37);
2635
+ __exportStar(__webpack_require__(276), exports);
2385
2636
 
2386
- exports.SortParamsPropTypes = T.shape({
2387
- currentSortKey: T.string,
2388
- currentSortDir: T.oneOf(DataSource_1.validSortDirs),
2389
- onSort: T.func
2390
- });
2637
+ __exportStar(__webpack_require__(277), exports);
2391
2638
 
2392
- var getSortingParams = function getSortingParams(_ref) {
2393
- var requestParams = _ref.requestParams,
2394
- onRequestParamsChange = _ref.onRequestParamsChange;
2395
- var currentSortKey;
2396
- var currentSortDir;
2397
- var nextSortDirMap = {
2398
- asc: 'desc',
2399
- desc: 'asc',
2400
- none: 'asc'
2401
- };
2402
- var onSort;
2639
+ /***/ }),
2403
2640
 
2404
- if (lodash_1.isFunction(onRequestParamsChange)) {
2405
- if (requestParams && lodash_1.has(requestParams, 'sort')) {
2406
- currentSortKey = Object.keys(requestParams.sort).shift();
2407
- currentSortDir = requestParams.sort[currentSortKey];
2408
- } // undid memoization since there is a dependency on requestParams, which is a deeply nested object
2641
+ /***/ 274:
2642
+ /***/ (function(module, exports, __webpack_require__) {
2409
2643
 
2410
-
2411
- onSort = function onSort(e, _ref2) {
2412
- var sortKey = _ref2.sortKey,
2413
- sortDir = _ref2.sortDir;
2414
-
2415
- if (typeof sortKey === 'string') {
2416
- var nextSortDir = lodash_1.has(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
2417
- onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
2418
- offset: 0,
2419
- sort: _defineProperty({}, sortKey, nextSortDir)
2420
- }));
2421
- } else {
2422
- onRequestParamsChange(requestParams);
2423
- }
2424
- };
2425
- }
2426
-
2427
- return {
2428
- currentSortKey: currentSortKey,
2429
- currentSortDir: currentSortDir,
2430
- onSort: onSort
2431
- };
2432
- };
2433
-
2434
- exports.getSortingParams = getSortingParams;
2435
-
2436
- /***/ }),
2437
-
2438
- /***/ 270:
2439
- /***/ (function(module, exports, __webpack_require__) {
2440
-
2441
- "use strict";
2442
-
2443
-
2444
- var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
2445
- if (k2 === undefined) k2 = k;
2446
- Object.defineProperty(o, k2, {
2447
- enumerable: true,
2448
- get: function get() {
2449
- return m[k];
2450
- }
2451
- });
2452
- } : function (o, m, k, k2) {
2453
- if (k2 === undefined) k2 = k;
2454
- o[k2] = m[k];
2455
- });
2456
-
2457
- var __exportStar = this && this.__exportStar || function (m, exports) {
2458
- for (var p in m) {
2459
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2460
- }
2461
- };
2462
-
2463
- Object.defineProperty(exports, "__esModule", {
2464
- value: true
2465
- });
2466
-
2467
- __exportStar(__webpack_require__(271), exports);
2468
-
2469
- __exportStar(__webpack_require__(272), exports);
2470
-
2471
- __exportStar(__webpack_require__(273), exports);
2472
-
2473
- __exportStar(__webpack_require__(274), exports);
2474
-
2475
- /***/ }),
2476
-
2477
- /***/ 271:
2478
- /***/ (function(module, exports, __webpack_require__) {
2479
-
2480
- "use strict";
2644
+ "use strict";
2481
2645
 
2482
2646
 
2483
2647
  Object.defineProperty(exports, "__esModule", {
@@ -2497,7 +2661,7 @@ exports.SwitchTableCell = SwitchTableCell;
2497
2661
 
2498
2662
  /***/ }),
2499
2663
 
2500
- /***/ 272:
2664
+ /***/ 275:
2501
2665
  /***/ (function(module, exports, __webpack_require__) {
2502
2666
 
2503
2667
  "use strict";
@@ -2510,7 +2674,7 @@ exports.TextCell = void 0;
2510
2674
 
2511
2675
  var React = __webpack_require__(1);
2512
2676
 
2513
- var Table_1 = __webpack_require__(89);
2677
+ var Table_1 = __webpack_require__(91);
2514
2678
 
2515
2679
  var TextCell = function TextCell(_ref) {
2516
2680
  var cell = _ref.cell,
@@ -2533,7 +2697,7 @@ exports.TextCell.displayName = 'TextCell';
2533
2697
 
2534
2698
  /***/ }),
2535
2699
 
2536
- /***/ 273:
2700
+ /***/ 276:
2537
2701
  /***/ (function(module, exports, __webpack_require__) {
2538
2702
 
2539
2703
  "use strict";
@@ -2546,7 +2710,7 @@ exports.ArrayCell = void 0;
2546
2710
 
2547
2711
  var React = __webpack_require__(1);
2548
2712
 
2549
- var Table_1 = __webpack_require__(89);
2713
+ var Table_1 = __webpack_require__(91);
2550
2714
 
2551
2715
  var ArrayCell = function ArrayCell(_ref) {
2552
2716
  var cell = _ref.cell,
@@ -2575,7 +2739,7 @@ exports.ArrayCell.displayName = 'ArrayCell';
2575
2739
 
2576
2740
  /***/ }),
2577
2741
 
2578
- /***/ 274:
2742
+ /***/ 277:
2579
2743
  /***/ (function(module, exports, __webpack_require__) {
2580
2744
 
2581
2745
  "use strict";
@@ -2590,9 +2754,9 @@ exports.SparklineCell = exports.validSparklineTypes = void 0;
2590
2754
 
2591
2755
  var React = __webpack_require__(1);
2592
2756
 
2593
- var Table_1 = __webpack_require__(89);
2757
+ var Table_1 = __webpack_require__(91);
2594
2758
 
2595
- var Line_1 = __webpack_require__(90);
2759
+ var Line_1 = __webpack_require__(92);
2596
2760
 
2597
2761
  var paddingLeftRight = 5;
2598
2762
  var paddingTopBottom = 3;
@@ -2668,7 +2832,7 @@ exports.SparklineCell.displayName = 'SparklineCell';
2668
2832
 
2669
2833
  /***/ }),
2670
2834
 
2671
- /***/ 275:
2835
+ /***/ 278:
2672
2836
  /***/ (function(module, exports, __webpack_require__) {
2673
2837
 
2674
2838
  "use strict";
@@ -2679,7 +2843,7 @@ Object.defineProperty(exports, "__esModule", {
2679
2843
  });
2680
2844
  exports.getLastColumnWidth = exports.getColumnWidth = void 0;
2681
2845
 
2682
- var PureTable_1 = __webpack_require__(139);
2846
+ var PureTable_1 = __webpack_require__(141);
2683
2847
 
2684
2848
  var getColumnWidth = function getColumnWidth(_ref) {
2685
2849
  var columns = _ref.columns,
@@ -2762,7 +2926,7 @@ exports.getLastColumnWidth = getLastColumnWidth;
2762
2926
 
2763
2927
  /***/ }),
2764
2928
 
2765
- /***/ 276:
2929
+ /***/ 279:
2766
2930
  /***/ (function(module, exports) {
2767
2931
 
2768
2932
  module.exports = require("lodash/debounce");
@@ -2775,6 +2939,77 @@ module.exports = require("lodash/debounce");
2775
2939
  "use strict";
2776
2940
 
2777
2941
 
2942
+ var _defineProperty = __webpack_require__(6);
2943
+
2944
+ Object.defineProperty(exports, "__esModule", {
2945
+ value: true
2946
+ });
2947
+ exports.getSortingParams = exports.SortParamsPropTypes = void 0;
2948
+
2949
+ var T = __webpack_require__(0);
2950
+
2951
+ var lodash_1 = __webpack_require__(3);
2952
+
2953
+ var DataSource_1 = __webpack_require__(38);
2954
+
2955
+ exports.SortParamsPropTypes = T.shape({
2956
+ currentSortKey: T.string,
2957
+ currentSortDir: T.oneOf(DataSource_1.validSortDirs),
2958
+ onSort: T.func
2959
+ });
2960
+
2961
+ var getSortingParams = function getSortingParams(_ref) {
2962
+ var requestParams = _ref.requestParams,
2963
+ onRequestParamsChange = _ref.onRequestParamsChange;
2964
+ var currentSortKey;
2965
+ var currentSortDir;
2966
+ var nextSortDirMap = {
2967
+ asc: 'desc',
2968
+ desc: 'asc',
2969
+ none: 'asc'
2970
+ };
2971
+ var onSort;
2972
+
2973
+ if (lodash_1.isFunction(onRequestParamsChange)) {
2974
+ if (requestParams && lodash_1.has(requestParams, 'sort')) {
2975
+ currentSortKey = Object.keys(requestParams.sort).shift();
2976
+ currentSortDir = requestParams.sort[currentSortKey];
2977
+ } // undid memoization since there is a dependency on requestParams, which is a deeply nested object
2978
+
2979
+
2980
+ onSort = function onSort(e, _ref2) {
2981
+ var sortKey = _ref2.sortKey,
2982
+ sortDir = _ref2.sortDir;
2983
+
2984
+ if (typeof sortKey === 'string') {
2985
+ var nextSortDir = lodash_1.has(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
2986
+ onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
2987
+ offset: 0,
2988
+ sort: _defineProperty({}, sortKey, nextSortDir)
2989
+ }));
2990
+ } else {
2991
+ onRequestParamsChange(requestParams);
2992
+ }
2993
+ };
2994
+ }
2995
+
2996
+ return {
2997
+ currentSortKey: currentSortKey,
2998
+ currentSortDir: currentSortDir,
2999
+ onSort: onSort
3000
+ };
3001
+ };
3002
+
3003
+ exports.getSortingParams = getSortingParams;
3004
+
3005
+ /***/ }),
3006
+
3007
+ /***/ 29:
3008
+ /***/ (function(module, exports, __webpack_require__) {
3009
+
3010
+ "use strict";
3011
+
3012
+
2778
3013
  Object.defineProperty(exports, "__esModule", {
2779
3014
  value: true
2780
3015
  });
@@ -2782,7 +3017,7 @@ exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
2782
3017
 
2783
3018
  var T = __webpack_require__(0);
2784
3019
 
2785
- var lodash_1 = __webpack_require__(2);
3020
+ var lodash_1 = __webpack_require__(3);
2786
3021
 
2787
3022
  exports.PaginatorParamsPropTypes = T.shape({
2788
3023
  isPaging: T.bool,
@@ -2834,7 +3069,14 @@ exports.getPaginationParams = getPaginationParams;
2834
3069
 
2835
3070
  /***/ }),
2836
3071
 
2837
- /***/ 29:
3072
+ /***/ 3:
3073
+ /***/ (function(module, exports) {
3074
+
3075
+ module.exports = require("lodash");
3076
+
3077
+ /***/ }),
3078
+
3079
+ /***/ 30:
2838
3080
  /***/ (function(module, exports, __webpack_require__) {
2839
3081
 
2840
3082
  "use strict";
@@ -2863,14 +3105,7 @@ var VizCategory;
2863
3105
 
2864
3106
  /***/ }),
2865
3107
 
2866
- /***/ 3:
2867
- /***/ (function(module, exports) {
2868
-
2869
- module.exports = require("@splunk/ui-utils/i18n");
2870
-
2871
- /***/ }),
2872
-
2873
- /***/ 30:
3108
+ /***/ 31:
2874
3109
  /***/ (function(module, exports, __webpack_require__) {
2875
3110
 
2876
3111
  "use strict";
@@ -2882,39 +3117,39 @@ Object.defineProperty(exports, "__esModule", {
2882
3117
 
2883
3118
  var React = __webpack_require__(1);
2884
3119
 
2885
- var lodash_1 = __webpack_require__(2);
3120
+ var lodash_1 = __webpack_require__(3);
2886
3121
 
2887
- var getSettingsFromThemedProps_1 = __webpack_require__(31);
3122
+ var getSettingsFromThemedProps_1 = __webpack_require__(32);
2888
3123
 
2889
- var Options_1 = __webpack_require__(32);
3124
+ var Options_1 = __webpack_require__(33);
2890
3125
 
2891
- var SanitizeProps_1 = __webpack_require__(33);
3126
+ var SanitizeProps_1 = __webpack_require__(34);
2892
3127
 
2893
- var TimezoneContext_1 = __webpack_require__(21);
3128
+ var TimezoneContext_1 = __webpack_require__(22);
2894
3129
 
2895
- var moment_1 = __webpack_require__(34);
3130
+ var moment_1 = __webpack_require__(35);
2896
3131
 
2897
3132
  var styled_components_1 = __webpack_require__(4);
2898
3133
 
2899
- var SplunkVisualization_1 = __webpack_require__(35);
3134
+ var hocUtils_1 = __webpack_require__(24);
2900
3135
 
2901
- var VizBehavior_1 = __webpack_require__(5);
3136
+ var JSONSchemaUtils_1 = __webpack_require__(25);
2902
3137
 
2903
- var getSorting_1 = __webpack_require__(27);
3138
+ var SplunkVisualization_1 = __webpack_require__(36);
2904
3139
 
2905
- var getPagination_1 = __webpack_require__(28);
3140
+ var VizBehavior_1 = __webpack_require__(5);
2906
3141
 
2907
- var useDeepMemo_1 = __webpack_require__(38);
3142
+ var getSorting_1 = __webpack_require__(28);
2908
3143
 
2909
- var JSONSchemaUtils_1 = __webpack_require__(25);
3144
+ var getPagination_1 = __webpack_require__(29);
2910
3145
 
2911
- var MissingPropsMessage_1 = __webpack_require__(39);
3146
+ var useDeepMemo_1 = __webpack_require__(39);
2912
3147
 
2913
- var withEditModeCover_1 = __webpack_require__(40);
3148
+ var MissingPropsMessage_1 = __webpack_require__(40);
2914
3149
 
2915
- var withPlaceholder_1 = __webpack_require__(42);
3150
+ var withEditModeCover_1 = __webpack_require__(41);
2916
3151
 
2917
- var hocUtils_1 = __webpack_require__(8);
3152
+ var withPlaceholder_1 = __webpack_require__(42);
2918
3153
  /**
2919
3154
  * hoc that wraps a pure react visualization in a Dashboard visualization
2920
3155
  * @param {DashboardVizOpts} opts
@@ -3116,41 +3351,41 @@ exports.default = withDashboardViz;
3116
3351
 
3117
3352
  /***/ }),
3118
3353
 
3119
- /***/ 31:
3354
+ /***/ 32:
3120
3355
  /***/ (function(module, exports) {
3121
3356
 
3122
3357
  module.exports = require("@splunk/themes/getSettingsFromThemedProps");
3123
3358
 
3124
3359
  /***/ }),
3125
3360
 
3126
- /***/ 32:
3361
+ /***/ 33:
3127
3362
  /***/ (function(module, exports) {
3128
3363
 
3129
3364
  module.exports = require("@splunk/visualization-encoding/Options");
3130
3365
 
3131
3366
  /***/ }),
3132
3367
 
3133
- /***/ 33:
3368
+ /***/ 34:
3134
3369
  /***/ (function(module, exports) {
3135
3370
 
3136
3371
  module.exports = require("@splunk/visualizations-shared/SanitizeProps");
3137
3372
 
3138
3373
  /***/ }),
3139
3374
 
3140
- /***/ 34:
3375
+ /***/ 35:
3141
3376
  /***/ (function(module, exports) {
3142
3377
 
3143
3378
  module.exports = require("@splunk/moment");
3144
3379
 
3145
3380
  /***/ }),
3146
3381
 
3147
- /***/ 35:
3382
+ /***/ 36:
3148
3383
  /***/ (function(module, exports, __webpack_require__) {
3149
3384
 
3150
3385
  "use strict";
3151
3386
 
3152
3387
 
3153
- var _classCallCheck = __webpack_require__(12);
3388
+ var _classCallCheck = __webpack_require__(10);
3154
3389
 
3155
3390
  Object.defineProperty(exports, "__esModule", {
3156
3391
  value: true
@@ -3160,9 +3395,9 @@ exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
3160
3395
 
3161
3396
  var T = __webpack_require__(0);
3162
3397
 
3163
- var lodash_1 = __webpack_require__(2);
3398
+ var lodash_1 = __webpack_require__(3);
3164
3399
 
3165
- var VizActionHandler_1 = __webpack_require__(36); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
3400
+ var VizActionHandler_1 = __webpack_require__(37); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
3166
3401
 
3167
3402
 
3168
3403
  exports.INITIAL_WIDTH = 250;
@@ -3296,15 +3531,15 @@ exports.default = SplunkVisualization;
3296
3531
 
3297
3532
  /***/ }),
3298
3533
 
3299
- /***/ 36:
3534
+ /***/ 37:
3300
3535
  /***/ (function(module, exports, __webpack_require__) {
3301
3536
 
3302
3537
  "use strict";
3303
3538
 
3304
3539
 
3305
- var _classCallCheck = __webpack_require__(12);
3540
+ var _classCallCheck = __webpack_require__(10);
3306
3541
 
3307
- var _createClass = __webpack_require__(17);
3542
+ var _createClass = __webpack_require__(18);
3308
3543
 
3309
3544
  Object.defineProperty(exports, "__esModule", {
3310
3545
  value: true
@@ -3334,7 +3569,7 @@ exports.DefaultVizActionHandler = DefaultVizActionHandler;
3334
3569
 
3335
3570
  /***/ }),
3336
3571
 
3337
- /***/ 37:
3572
+ /***/ 38:
3338
3573
  /***/ (function(module, exports, __webpack_require__) {
3339
3574
 
3340
3575
  "use strict";
@@ -3348,7 +3583,7 @@ exports.validSortDirs = ['asc', 'desc', 'none'];
3348
3583
 
3349
3584
  /***/ }),
3350
3585
 
3351
- /***/ 38:
3586
+ /***/ 39:
3352
3587
  /***/ (function(module, exports, __webpack_require__) {
3353
3588
 
3354
3589
  "use strict";
@@ -3361,7 +3596,7 @@ exports.useDeepMemo = void 0;
3361
3596
 
3362
3597
  var react_1 = __webpack_require__(1);
3363
3598
 
3364
- var lodash_1 = __webpack_require__(2);
3599
+ var lodash_1 = __webpack_require__(3);
3365
3600
  /**
3366
3601
  * This hook evaluates and stores the result of a passed function and only
3367
3602
  * re-evaluates the function when passed dependencies change.
@@ -3394,7 +3629,14 @@ exports.useDeepMemo = useDeepMemo;
3394
3629
 
3395
3630
  /***/ }),
3396
3631
 
3397
- /***/ 39:
3632
+ /***/ 4:
3633
+ /***/ (function(module, exports) {
3634
+
3635
+ module.exports = require("styled-components");
3636
+
3637
+ /***/ }),
3638
+
3639
+ /***/ 40:
3398
3640
  /***/ (function(module, exports, __webpack_require__) {
3399
3641
 
3400
3642
  "use strict";
@@ -3409,11 +3651,11 @@ var React = __webpack_require__(1);
3409
3651
 
3410
3652
  var T = __webpack_require__(0);
3411
3653
 
3412
- var i18n_1 = __webpack_require__(3);
3654
+ var i18n_1 = __webpack_require__(2);
3413
3655
 
3414
- var Message_1 = __webpack_require__(11);
3656
+ var Message_1 = __webpack_require__(9);
3415
3657
 
3416
- var FixedSizeContainer_1 = __webpack_require__(14);
3658
+ var FixedSizeContainer_1 = __webpack_require__(12);
3417
3659
  /**
3418
3660
  * @method isMissing
3419
3661
  * @param {any} v
@@ -3475,14 +3717,7 @@ exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
3475
3717
 
3476
3718
  /***/ }),
3477
3719
 
3478
- /***/ 4:
3479
- /***/ (function(module, exports) {
3480
-
3481
- module.exports = require("styled-components");
3482
-
3483
- /***/ }),
3484
-
3485
- /***/ 40:
3720
+ /***/ 41:
3486
3721
  /***/ (function(module, exports, __webpack_require__) {
3487
3722
 
3488
3723
  "use strict";
@@ -3496,14 +3731,14 @@ var React = __webpack_require__(1);
3496
3731
 
3497
3732
  var styled_components_1 = __webpack_require__(4);
3498
3733
 
3499
- var hocUtils_1 = __webpack_require__(8);
3734
+ var hocUtils_1 = __webpack_require__(13);
3500
3735
 
3501
3736
  var Cover = styled_components_1.default.div.withConfig({
3502
3737
  displayName: "withEditModeCover__Cover",
3503
3738
  componentId: "sc-1gsbnxb-0"
3504
3739
  })(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
3505
3740
  var Blocker = styled_components_1.default.div.attrs({
3506
- 'data-splunk-visualization-version': "25.0.0 - 5e0f30e5a"
3741
+ 'data-splunk-visualization-version': "25.1.0 - 812a9a4d8"
3507
3742
  }).withConfig({
3508
3743
  displayName: "withEditModeCover__Blocker",
3509
3744
  componentId: "sc-1gsbnxb-1"
@@ -3535,13 +3770,6 @@ exports.default = withEditModeCover;
3535
3770
 
3536
3771
  /***/ }),
3537
3772
 
3538
- /***/ 41:
3539
- /***/ (function(module, exports) {
3540
-
3541
- module.exports = require("@splunk/visualizations-shared/mapUtils");
3542
-
3543
- /***/ }),
3544
-
3545
3773
  /***/ 42:
3546
3774
  /***/ (function(module, exports, __webpack_require__) {
3547
3775
 
@@ -3554,15 +3782,15 @@ Object.defineProperty(exports, "__esModule", {
3554
3782
 
3555
3783
  var React = __webpack_require__(1);
3556
3784
 
3557
- var colorUtils_1 = __webpack_require__(13);
3785
+ var colorUtils_1 = __webpack_require__(11);
3558
3786
 
3559
- var variables_1 = __webpack_require__(10);
3787
+ var variables_1 = __webpack_require__(8);
3560
3788
 
3561
- var IconPlaceholder_1 = __webpack_require__(26);
3789
+ var IconPlaceholder_1 = __webpack_require__(27);
3562
3790
 
3563
3791
  var VizBehavior_1 = __webpack_require__(5);
3564
3792
 
3565
- var hocUtils_1 = __webpack_require__(8);
3793
+ var hocUtils_1 = __webpack_require__(13);
3566
3794
 
3567
3795
  var withPlaceholder = function withPlaceholder(Visualization) {
3568
3796
  var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
@@ -3674,308 +3902,23 @@ module.exports = require("@babel/runtime/helpers/slicedToArray");
3674
3902
  /***/ }),
3675
3903
 
3676
3904
  /***/ 6:
3677
- /***/ (function(module, exports, __webpack_require__) {
3678
-
3679
- "use strict";
3680
-
3681
-
3682
- var _toConsumableArray = __webpack_require__(9);
3683
-
3684
- var _defineProperty = __webpack_require__(7);
3685
-
3686
- var __rest = this && this.__rest || function (s, e) {
3687
- var t = {};
3688
-
3689
- for (var p in s) {
3690
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
3691
- }
3692
-
3693
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
3694
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
3695
- }
3696
- return t;
3697
- };
3698
-
3699
- Object.defineProperty(exports, "__esModule", {
3700
- value: true
3701
- });
3702
- exports.insertLayout = exports.generatePrecisionValues = exports.getInitialPreset = exports.isDynamicOption = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
3703
-
3704
- var lodash_1 = __webpack_require__(2);
3705
-
3706
- var schemaUtils_1 = __webpack_require__(16);
3707
-
3708
- var VizBehavior_1 = __webpack_require__(5);
3709
-
3710
- var dynamicOptionsDSLType = {
3711
- type: 'string',
3712
- pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
3713
- };
3714
- /**
3715
- * Helper function to extend an options schema with dynamic options DSL
3716
- * @param optionsSchema a visualization's options schema
3717
- * @returns an updated options schema that additionally allows strings starting with > for each option
3718
- */
3719
-
3720
- function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
3721
- var enhancedOptionsSchema = {};
3722
- Object.keys(optionsSchema).forEach(function (key) {
3723
- var _a = optionsSchema[key],
3724
- title = _a.title,
3725
- description = _a.description,
3726
- readOnly = _a.readOnly,
3727
- writeOnly = _a.writeOnly,
3728
- examples = _a.examples,
3729
- defaultValue = _a.default,
3730
- type = _a.type,
3731
- properties = _a.properties,
3732
- patternProperties = _a.patternProperties,
3733
- remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
3734
-
3735
- var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
3736
- title: title
3737
- }), description !== undefined && {
3738
- description: description
3739
- }), readOnly !== undefined && {
3740
- readOnly: readOnly
3741
- }), writeOnly !== undefined && {
3742
- writeOnly: writeOnly
3743
- }), examples !== undefined && {
3744
- examples: examples
3745
- }), defaultValue !== undefined && {
3746
- default: defaultValue
3747
- });
3748
-
3749
- if (type === 'object') {
3750
- enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
3751
- type: type
3752
- }), properties && {
3753
- properties: enhanceOptionsSchemaWithDynamicOptions(properties)
3754
- });
3755
-
3756
- if (patternProperties) {
3757
- var enhancedPatternProperties = {};
3758
- Object.keys(patternProperties).forEach(function (opt) {
3759
- enhancedPatternProperties = Object.assign(Object.assign({}, enhancedPatternProperties), enhanceOptionsSchemaWithDynamicOptions(_defineProperty({}, opt, patternProperties[opt])));
3760
- });
3761
- enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;
3762
- }
3763
- } else {
3764
- enhancedOptionsSchema[key] = Object.assign(Object.assign({}, annotations), {
3765
- anyOf: [Object.assign(Object.assign({}, type !== undefined && {
3766
- type: type
3767
- }), remainingSchemaEntry), dynamicOptionsDSLType]
3768
- });
3769
- }
3770
- });
3771
- return enhancedOptionsSchema;
3772
- }
3773
-
3774
- exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
3775
- /**
3776
- * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
3777
- * @param vizConfig a Visualization Config
3778
- * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
3779
- */
3780
-
3781
- function enhanceConfig(vizConfig) {
3782
- var enhancedConfig = vizConfig;
3783
-
3784
- if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
3785
- enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
3786
- }
3787
-
3788
- return enhancedConfig;
3789
- }
3790
-
3791
- exports.enhanceConfig = enhanceConfig;
3792
-
3793
- function isDynamicOption(option) {
3794
- return option && typeof option === 'string' && option.trim().startsWith('>') || false;
3795
- }
3796
-
3797
- exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
3798
- // this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
3799
-
3800
- /**
3801
- * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
3802
- * 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
3803
- * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
3804
- * 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
3805
- *
3806
- * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
3807
- */
3808
-
3809
- function hasCompatibleContexts(vizContext, presetContext) {
3810
- var presetContextKeys = Object.keys(presetContext);
3811
- return presetContextKeys.every(function (contextKey) {
3812
- return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
3813
- });
3814
- }
3815
- /**
3816
- * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
3817
- */
3818
-
3819
-
3820
- function hasCompatibleOptions(vizOptions, presetOptions) {
3821
- var presetOptionKeys = Object.keys(presetOptions);
3822
- return presetOptionKeys.every(function (optionKey) {
3823
- return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
3824
- });
3825
- }
3826
- /**
3827
- * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
3828
- * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
3829
- *
3830
- * @param {Object} vizContext - the current vizContext definition
3831
- * @param {Object} vizOptions - the current vizOptions definition
3832
- * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
3833
- */
3834
-
3835
-
3836
- function getInitialPreset(vizContext, vizOptions, presets) {
3837
- return presets.find(function (preset) {
3838
- var presetContext = lodash_1.get(preset, ['value', 'context'], {});
3839
- var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
3840
- var presetContextKeys = Object.keys(presetContext);
3841
- var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
3842
- // if not, then the preset is invalid in config.ts
3843
-
3844
- if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
3845
- return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
3846
- });
3847
- }
3848
-
3849
- exports.getInitialPreset = getInitialPreset;
3850
- /**
3851
- * generates number precision values for a Select editor
3852
- *
3853
- * @param {Number} numPrecisionValues - number of integer precision values to generate
3854
- * @returns {{ label: string; value; string }[]} array of { label, value } tuples
3855
- */
3856
-
3857
- function generatePrecisionValues(numPrecisionValues) {
3858
- return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
3859
- return {
3860
- label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
3861
- value: i
3862
- };
3863
- });
3864
- }
3865
-
3866
- exports.generatePrecisionValues = generatePrecisionValues;
3867
- /**
3868
- * insert layout in layout array, return a new layout array instead of updating the original
3869
- *
3870
- * @param {EditorLayoutConfig[][]} layout - editor layout
3871
- * @param {Number} index - the index to insert layout item(s)
3872
- * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
3873
- * @returns {EditorLayoutConfig[][]} new editor layout with insertion
3874
- */
3875
-
3876
- var insertLayout = function insertLayout(layout, index) {
3877
- for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
3878
- layoutItems[_key - 2] = arguments[_key];
3879
- }
3880
-
3881
- return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
3882
- };
3905
+ /***/ (function(module, exports) {
3883
3906
 
3884
- exports.insertLayout = insertLayout;
3907
+ module.exports = require("@babel/runtime/helpers/defineProperty");
3885
3908
 
3886
3909
  /***/ }),
3887
3910
 
3888
3911
  /***/ 7:
3889
3912
  /***/ (function(module, exports) {
3890
3913
 
3891
- module.exports = require("@babel/runtime/helpers/defineProperty");
3914
+ module.exports = require("@babel/runtime/helpers/toConsumableArray");
3892
3915
 
3893
3916
  /***/ }),
3894
3917
 
3895
3918
  /***/ 8:
3896
- /***/ (function(module, exports, __webpack_require__) {
3897
-
3898
- "use strict";
3899
-
3900
-
3901
- var _typeof = __webpack_require__(23);
3902
-
3903
- Object.defineProperty(exports, "__esModule", {
3904
- value: true
3905
- });
3906
- exports.deepMergeWithArrayPrimitiveOverrides = exports.extendStaticWrapperProps = void 0;
3907
-
3908
- var lodash_1 = __webpack_require__(2);
3909
-
3910
- var mapUtils_1 = __webpack_require__(41);
3911
- /**
3912
- * @method extendStaticWrapperProps
3913
- * @param {Object} props
3914
- * @param {DashboardVizType} props.Wrapper
3915
- * @param {DashboardVizType} props.Visualization
3916
- */
3917
-
3918
-
3919
- var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
3920
- var Wrapper = _ref.Wrapper,
3921
- Visualization = _ref.Visualization;
3922
- var extendProperties = ['propTypes', 'defaultProps', 'config'];
3923
- extendProperties.forEach(function (prop) {
3924
- if (Visualization[prop]) {
3925
- // eslint-disable-next-line no-param-reassign
3926
- Wrapper[prop] = Visualization[prop];
3927
- }
3928
- });
3929
- };
3930
-
3931
- exports.extendStaticWrapperProps = extendStaticWrapperProps;
3932
- /**
3933
- * helper to deeply merge objects while preserving arrays in earlier source objects
3934
- * 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
3935
- * 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).
3936
- * 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
3937
- * 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.
3938
- *
3939
- * @method deepMergeWithArrayPrimitiveOverrides
3940
- * @param {Object} initial - target object to merge values into
3941
- * @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
3942
- *
3943
- * @returns {Object}
3944
- */
3945
-
3946
- var deepMergeWithArrayPrimitiveOverrides = function deepMergeWithArrayPrimitiveOverrides(initial) {
3947
- var clone = lodash_1.cloneDeep(initial);
3948
-
3949
- for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
3950
- sources[_key - 1] = arguments[_key];
3951
- }
3952
-
3953
- sources.forEach(function (sourceToApply) {
3954
- Object.keys(sourceToApply).forEach(function (sourceKey) {
3955
- if (!Object.prototype.hasOwnProperty.call(clone, sourceKey)) {
3956
- clone[sourceKey] = lodash_1.cloneDeep(sourceToApply[sourceKey]);
3957
- }
3958
-
3959
- if (clone[sourceKey] && _typeof(clone[sourceKey]) === 'object' && !Array.isArray(clone[sourceKey]) && _typeof(sourceToApply[sourceKey]) === 'object') {
3960
- clone[sourceKey] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey], sourceToApply[sourceKey]);
3961
- } else if (Array.isArray(clone[sourceKey]) && _typeof(clone[sourceKey][0]) === 'object' && !Array.isArray(clone[sourceKey][0])) {
3962
- // If option is an array of objects
3963
- for (var i = 0; i < clone[sourceKey].length; i += 1) {
3964
- if (_typeof(clone[sourceKey][i]) === 'object') {
3965
- var closestMatchIdx = mapUtils_1.findClosestMatchFromDefaultList(sourceToApply[sourceKey], clone[sourceKey][i]);
3966
-
3967
- if (closestMatchIdx > -1) {
3968
- clone[sourceKey][i] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey][i], sourceToApply[sourceKey][closestMatchIdx]);
3969
- }
3970
- }
3971
- }
3972
- }
3973
- });
3974
- });
3975
- return clone;
3976
- };
3919
+ /***/ (function(module, exports) {
3977
3920
 
3978
- exports.deepMergeWithArrayPrimitiveOverrides = deepMergeWithArrayPrimitiveOverrides;
3921
+ module.exports = require("@splunk/themes/variables");
3979
3922
 
3980
3923
  /***/ }),
3981
3924
 
@@ -3986,21 +3929,21 @@ module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
3986
3929
 
3987
3930
  /***/ }),
3988
3931
 
3989
- /***/ 89:
3932
+ /***/ 9:
3990
3933
  /***/ (function(module, exports) {
3991
3934
 
3992
- module.exports = require("@splunk/react-ui/Table");
3935
+ module.exports = require("@splunk/visualizations-shared/Message");
3993
3936
 
3994
3937
  /***/ }),
3995
3938
 
3996
- /***/ 9:
3939
+ /***/ 91:
3997
3940
  /***/ (function(module, exports) {
3998
3941
 
3999
- module.exports = require("@babel/runtime/helpers/toConsumableArray");
3942
+ module.exports = require("@splunk/react-ui/Table");
4000
3943
 
4001
3944
  /***/ }),
4002
3945
 
4003
- /***/ 90:
3946
+ /***/ 92:
4004
3947
  /***/ (function(module, exports) {
4005
3948
 
4006
3949
  module.exports = require("@splunk/react-sparkline/Line");