@splunk/visualizations 25.0.1 → 25.2.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 (200) hide show
  1. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_Background_Color_Red.png +0 -0
  2. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_Basic.png +0 -0
  3. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Actions_Simulated_Instance.png +0 -0
  4. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Actions_for_Numeric_Field_Simulated_Instance.png +0 -0
  5. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Dark.png +0 -0
  6. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Light.png +0 -0
  7. package/.loki/reference/chrome_docker_PureVisualizations_PureMap_custom_base_layer_tile_server.png +0 -0
  8. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Background_color_cyan.png +0 -0
  9. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Unit_specified_Unit_Position_after_default.png +0 -0
  10. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Unit_specified_Unit_Position_before.png +0 -0
  11. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Background_Color_white_Under_Label_and_Unit_specified.png +0 -0
  12. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Major_Value_is_null.png +0 -0
  13. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Unit_specified_Unit_Position_after_default.png +0 -0
  14. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Unit_specified_Unit_Position_before.png +0 -0
  15. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Area_Editor.png +0 -0
  16. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bar_Editor.png +0 -0
  17. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bubble_Editor.png +0 -0
  18. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_ChoroplethSvg_Editor.png +0 -0
  19. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Column_Editor.png +0 -0
  20. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Ellipse_Editor.png +0 -0
  21. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Events_Editor.png +0 -0
  22. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_FillerGauge_Editor.png +0 -0
  23. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Image_Editor.png +0 -0
  24. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Line_Editor.png +0 -0
  25. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_LinkGraph_Editor.png +0 -0
  26. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
  27. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Markdown_Editor.png +0 -0
  28. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_MarkerGauge_Editor.png +0 -0
  29. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Parallel_Coordinates_Editor.png +0 -0
  30. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Pie_Editor.png +0 -0
  31. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Punchcard_Editor.png +0 -0
  32. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Rectangle_Editor.png +0 -0
  33. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Sankey_Editor.png +0 -0
  34. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Scatter_Editor.png +0 -0
  35. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Editor.png +0 -0
  36. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Icon_Editor.png +0 -0
  37. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Radial_Editor.png +0 -0
  38. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Table_Editor.png +0 -0
  39. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Background_Color_Light_Blue.png +0 -0
  40. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Basic_Events.png +0 -0
  41. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Event_Actions.png +0 -0
  42. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Actions.png +0 -0
  43. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary.png +0 -0
  44. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary_Simulated_Instance.png +0 -0
  45. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Footer_Fields.png +0 -0
  46. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Footer_Fields_with_Highlight.png +0 -0
  47. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Show_Placeholder.png +0 -0
  48. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Height.png +0 -0
  49. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Percentage_50.png +0 -0
  50. package/.loki/reference/chrome_docker_Visualizations_Events_Events_With_Options.png +0 -0
  51. package/.loki/reference/chrome_docker_Visualizations_LinkGraph_LinkGraph_ES.png +0 -0
  52. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_Unit_value_after.png +0 -0
  53. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_Unit_value_before.png +0 -0
  54. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Set_The_Unit_After.png +0 -0
  55. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Set_The_Unit_Before.png +0 -0
  56. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_Unit_Value_After.png +0 -0
  57. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_Unit_Value_Before.png +0 -0
  58. package/Area.config.js +146 -157
  59. package/Area.config.js.map +1 -1
  60. package/Area.js +459 -545
  61. package/Area.js.map +1 -1
  62. package/Bar.config.js +148 -153
  63. package/Bar.config.js.map +1 -1
  64. package/Bar.js +468 -548
  65. package/Bar.js.map +1 -1
  66. package/Bubble.config.js +143 -123
  67. package/Bubble.config.js.map +1 -1
  68. package/Bubble.js +475 -530
  69. package/Bubble.js.map +1 -1
  70. package/ChoroplethSvg.config.js +87 -81
  71. package/ChoroplethSvg.config.js.map +1 -1
  72. package/ChoroplethSvg.js +352 -422
  73. package/ChoroplethSvg.js.map +1 -1
  74. package/Column.config.js +144 -151
  75. package/Column.config.js.map +1 -1
  76. package/Column.js +463 -546
  77. package/Column.js.map +1 -1
  78. package/Ellipse.config.js +86 -80
  79. package/Ellipse.config.js.map +1 -1
  80. package/Ellipse.js +319 -389
  81. package/Ellipse.js.map +1 -1
  82. package/Events.config.js +668 -0
  83. package/Events.config.js.map +1 -0
  84. package/Events.js +3116 -0
  85. package/Events.js.map +1 -0
  86. package/FillerGauge.config.js +94 -87
  87. package/FillerGauge.config.js.map +1 -1
  88. package/FillerGauge.js +352 -415
  89. package/FillerGauge.js.map +1 -1
  90. package/Image.config.js +74 -74
  91. package/Image.config.js.map +1 -1
  92. package/Image.js +713 -801
  93. package/Image.js.map +1 -1
  94. package/Line.config.js +145 -142
  95. package/Line.config.js.map +1 -1
  96. package/Line.js +471 -538
  97. package/Line.js.map +1 -1
  98. package/LinkGraph.config.js +120 -113
  99. package/LinkGraph.config.js.map +1 -1
  100. package/LinkGraph.js +24563 -717
  101. package/LinkGraph.js.map +1 -1
  102. package/Map.config.js +107 -100
  103. package/Map.config.js.map +1 -1
  104. package/Map.js +2358 -2465
  105. package/Map.js.map +1 -1
  106. package/Markdown.config.js +112 -112
  107. package/Markdown.config.js.map +1 -1
  108. package/Markdown.js +844 -918
  109. package/Markdown.js.map +1 -1
  110. package/MarkerGauge.config.js +185 -186
  111. package/MarkerGauge.config.js.map +1 -1
  112. package/MarkerGauge.js +1274 -1363
  113. package/MarkerGauge.js.map +1 -1
  114. package/ParallelCoordinates.config.js +137 -137
  115. package/ParallelCoordinates.config.js.map +1 -1
  116. package/ParallelCoordinates.js +732 -923
  117. package/ParallelCoordinates.js.map +1 -1
  118. package/Pie.config.js +132 -132
  119. package/Pie.config.js.map +1 -1
  120. package/Pie.js +1193 -1281
  121. package/Pie.js.map +1 -1
  122. package/Punchcard.config.js +138 -138
  123. package/Punchcard.config.js.map +1 -1
  124. package/Punchcard.js +2723 -2923
  125. package/Punchcard.js.map +1 -1
  126. package/Rectangle.config.js +267 -260
  127. package/Rectangle.config.js.map +1 -1
  128. package/Rectangle.js +1107 -1188
  129. package/Rectangle.js.map +1 -1
  130. package/Sankey.config.js +149 -142
  131. package/Sankey.config.js.map +1 -1
  132. package/Sankey.js +2613 -2808
  133. package/Sankey.js.map +1 -1
  134. package/Scatter.config.js +144 -123
  135. package/Scatter.config.js.map +1 -1
  136. package/Scatter.js +1820 -1889
  137. package/Scatter.js.map +1 -1
  138. package/SingleValue.config.js +121 -114
  139. package/SingleValue.config.js.map +1 -1
  140. package/SingleValue.js +2554 -2635
  141. package/SingleValue.js.map +1 -1
  142. package/SingleValueBasic.js +34 -34
  143. package/SingleValueBasic.js.map +1 -1
  144. package/SingleValueIcon.config.js +129 -120
  145. package/SingleValueIcon.config.js.map +1 -1
  146. package/SingleValueIcon.js +994 -1212
  147. package/SingleValueIcon.js.map +1 -1
  148. package/SingleValueRadial.config.js +216 -178
  149. package/SingleValueRadial.config.js.map +1 -1
  150. package/SingleValueRadial.js +2235 -2316
  151. package/SingleValueRadial.js.map +1 -1
  152. package/Table.config.js +150 -151
  153. package/Table.config.js.map +1 -1
  154. package/Table.js +2446 -2525
  155. package/Table.js.map +1 -1
  156. package/common/Charting.js +11 -11
  157. package/common/Charting.js.map +1 -1
  158. package/common/ChartingApi.js +2 -2
  159. package/common/ChartingApi.js.map +1 -1
  160. package/common/EventsDoc.js +25 -18
  161. package/common/EventsDoc.js.map +1 -1
  162. package/common/GaugeMajorTicks.js +10 -10
  163. package/common/GaugeMajorTicks.js.map +1 -1
  164. package/common/GaugeValueMarker.js +10 -10
  165. package/common/GaugeValueMarker.js.map +1 -1
  166. package/common/OptionsDoc.js +57 -357
  167. package/common/OptionsDoc.js.map +1 -1
  168. package/common/OverviewDoc.js +22 -22
  169. package/common/OverviewDoc.js.map +1 -1
  170. package/common/SplunkVisualization.js +4 -4
  171. package/common/SplunkVisualization.js.map +1 -1
  172. package/common/SplunkVisualizationApi.js +2 -2
  173. package/common/SplunkVisualizationApi.js.map +1 -1
  174. package/common/ThemesDoc.js +21 -21
  175. package/common/ThemesDoc.js.map +1 -1
  176. package/common/chartingUtils.js +4 -4
  177. package/common/chartingUtils.js.map +1 -1
  178. package/common/docUtils.js +4 -4
  179. package/common/docUtils.js.map +1 -1
  180. package/common/gaugeUtils.js +13 -13
  181. package/common/gaugeUtils.js.map +1 -1
  182. package/common/shapeUtils.js +8 -8
  183. package/common/shapeUtils.js.map +1 -1
  184. package/common/utils/configUtils.js +17 -18
  185. package/common/utils/configUtils.js.map +1 -1
  186. package/common/utils/{JSONSchemaUtils.js → dataUtils.js} +24 -25
  187. package/common/utils/dataUtils.js.map +1 -0
  188. package/common/utils/hocUtils.js +5 -85
  189. package/common/utils/hocUtils.js.map +1 -1
  190. package/common/utils/mapUtils.js +198 -0
  191. package/common/utils/mapUtils.js.map +1 -0
  192. package/common/utils/singleValueUtils.js +15 -12
  193. package/common/utils/singleValueUtils.js.map +1 -1
  194. package/common/utils/testHelper.js +8 -8
  195. package/common/utils/testHelper.js.map +1 -1
  196. package/common/withDashboardViz.js +120 -207
  197. package/common/withDashboardViz.js.map +1 -1
  198. package/package.json +16 -14
  199. package/.loki/reference/chrome_docker_PureVisualizations_SvgChoroplethDynamic_SVG_Of_Size_Greater_Than_2_MB_Render.png +0 -0
  200. package/common/utils/JSONSchemaUtils.js.map +0 -1
package/Markdown.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 = 208);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 394);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
@@ -109,60 +109,190 @@ 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("@splunk/visualizations-shared/Message");
113
113
 
114
114
  /***/ }),
115
115
 
116
- /***/ 105:
116
+ /***/ 109:
117
117
  /***/ (function(module, exports) {
118
118
 
119
- module.exports = require("@splunk/react-ui/Paragraph");
119
+ module.exports = require("@splunk/react-ui/Markdown");
120
120
 
121
121
  /***/ }),
122
122
 
123
123
  /***/ 11:
124
124
  /***/ (function(module, exports) {
125
125
 
126
- module.exports = require("@splunk/visualizations-shared/Message");
126
+ module.exports = require("@babel/runtime/helpers/classCallCheck");
127
127
 
128
128
  /***/ }),
129
129
 
130
- /***/ 12:
130
+ /***/ 114:
131
131
  /***/ (function(module, exports) {
132
132
 
133
- module.exports = require("@babel/runtime/helpers/classCallCheck");
133
+ module.exports = require("@splunk/react-ui/Paragraph");
134
134
 
135
135
  /***/ }),
136
136
 
137
- /***/ 13:
137
+ /***/ 12:
138
138
  /***/ (function(module, exports) {
139
139
 
140
140
  module.exports = require("@splunk/visualizations-shared/colorUtils");
141
141
 
142
142
  /***/ }),
143
143
 
144
- /***/ 132:
144
+ /***/ 13:
145
+ /***/ (function(module, exports, __webpack_require__) {
146
+
147
+ "use strict";
148
+
149
+
150
+ Object.defineProperty(exports, "__esModule", {
151
+ value: true
152
+ });
153
+
154
+ var React = __webpack_require__(1);
155
+
156
+ var styled_components_1 = __webpack_require__(4);
157
+
158
+ var SizeAwareWrapper_1 = __webpack_require__(20);
159
+
160
+ var style_1 = __webpack_require__(15);
161
+
162
+ var colorUtils_1 = __webpack_require__(12);
163
+
164
+ var Item = styled_components_1.default.div.attrs(function (_ref) {
165
+ var width = _ref.width;
166
+ return {
167
+ style: {
168
+ width: style_1.toPx(width)
169
+ }
170
+ };
171
+ }).withConfig({
172
+ displayName: "FixedSizeContainer__Item",
173
+ componentId: "sc-1yhgpod-0"
174
+ })(["position:relative;background-color:", "};"], function (props) {
175
+ return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
176
+ }); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
177
+
178
+ var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
179
+ var width = _ref2.width,
180
+ height = _ref2.height;
181
+ return {
182
+ style: Object.assign(Object.assign({}, width && {
183
+ width: style_1.toPx(width)
184
+ }), height && {
185
+ height: style_1.toPx(height)
186
+ })
187
+ };
188
+ }).withConfig({
189
+ displayName: "FixedSizeContainer__FixSizeItem",
190
+ componentId: "sc-1yhgpod-1"
191
+ })(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
192
+ return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
193
+ });
194
+ var ItemContent = styled_components_1.default.div.withConfig({
195
+ displayName: "FixedSizeContainer__ItemContent",
196
+ componentId: "sc-1yhgpod-2"
197
+ })(["position:relative;min-height:100px;width:100%;"]);
198
+ var FixSizeItemContent = styled_components_1.default.div.withConfig({
199
+ displayName: "FixedSizeContainer__FixSizeItemContent",
200
+ componentId: "sc-1yhgpod-3"
201
+ })(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
202
+
203
+ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
204
+ var FixedSizeContainer = function FixedSizeContainer(props) {
205
+ var width = props.width,
206
+ height = props.height,
207
+ backgroundColor = props.backgroundColor;
208
+
209
+ if (!height) {
210
+ return React.createElement(Item, {
211
+ "data-test": "item",
212
+ width: width,
213
+ backgroundColor: backgroundColor
214
+ }, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
215
+ }
216
+
217
+ return React.createElement(FixSizeItem, {
218
+ "data-test": "fix-size-item",
219
+ "data-splunk-visualization-version": "25.2.0 - 4373c5a66",
220
+ width: width,
221
+ height: height,
222
+ backgroundColor: backgroundColor
223
+ }, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
224
+ var newWidth = _ref3.width,
225
+ newHeight = _ref3.height;
226
+ return React.createElement(Viz, Object.assign({}, props, {
227
+ width: newWidth,
228
+ height: newHeight
229
+ }));
230
+ })));
231
+ };
232
+
233
+ FixedSizeContainer.displayName = 'withFixedSizeContainer';
234
+ return FixedSizeContainer;
235
+ };
236
+
237
+ exports.default = withFixedSizeContainer;
238
+
239
+ /***/ }),
240
+
241
+ /***/ 14:
242
+ /***/ (function(module, exports, __webpack_require__) {
243
+
244
+ "use strict";
245
+
246
+
247
+ Object.defineProperty(exports, "__esModule", {
248
+ value: true
249
+ });
250
+ exports.extendStaticWrapperProps = void 0;
251
+ /**
252
+ * @method extendStaticWrapperProps
253
+ * @param {Object} props
254
+ * @param {DashboardVizType} props.Wrapper
255
+ * @param {DashboardVizType} props.Visualization
256
+ */
257
+
258
+ var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
259
+ var Wrapper = _ref.Wrapper,
260
+ Visualization = _ref.Visualization;
261
+ var extendProperties = ['propTypes', 'defaultProps', 'config'];
262
+ extendProperties.forEach(function (prop) {
263
+ if (Visualization[prop]) {
264
+ // eslint-disable-next-line no-param-reassign
265
+ Wrapper[prop] = Visualization[prop];
266
+ }
267
+ });
268
+ };
269
+
270
+ exports.extendStaticWrapperProps = extendStaticWrapperProps;
271
+
272
+ /***/ }),
273
+
274
+ /***/ 143:
145
275
  /***/ (function(module, exports, __webpack_require__) {
146
276
 
147
277
  "use strict";
148
278
 
149
279
 
150
- var _taggedTemplateLiteral = __webpack_require__(81);
280
+ var _taggedTemplateLiteral = __webpack_require__(85);
151
281
 
152
282
  var _templateObject;
153
283
 
154
284
  Object.defineProperty(exports, "__esModule", {
155
285
  value: true
156
286
  });
157
- exports.getFontMap = exports.config = exports.themes = void 0;
287
+ exports.getFontMap = exports.config = exports.themes = exports.computeVizProps = void 0;
158
288
 
159
- var lodash_1 = __webpack_require__(2);
289
+ var lodash_1 = __webpack_require__(3);
160
290
 
161
291
  var React = __webpack_require__(1);
162
292
 
163
293
  var style_1 = __webpack_require__(15);
164
294
 
165
- var Markdown_1 = __webpack_require__(209);
295
+ var Markdown_1 = __webpack_require__(109);
166
296
 
167
297
  var styled_components_1 = __webpack_require__(4);
168
298
 
@@ -170,17 +300,17 @@ var T = __webpack_require__(0);
170
300
 
171
301
  var themes_1 = __webpack_require__(69);
172
302
 
173
- var Heading_1 = __webpack_require__(210);
303
+ var Heading_1 = __webpack_require__(395);
174
304
 
175
- var Paragraph_1 = __webpack_require__(105);
305
+ var Paragraph_1 = __webpack_require__(114);
176
306
 
177
- var List_1 = __webpack_require__(211);
307
+ var List_1 = __webpack_require__(396);
178
308
 
179
- var Code_1 = __webpack_require__(212);
309
+ var Code_1 = __webpack_require__(397);
180
310
 
181
- var withDashboardViz_1 = __webpack_require__(30);
311
+ var withDashboardViz_1 = __webpack_require__(32);
182
312
 
183
- var config_1 = __webpack_require__(213);
313
+ var config_1 = __webpack_require__(398);
184
314
 
185
315
  exports.config = config_1.default; // map of valid font sizes with elements' respective pixel sizes
186
316
 
@@ -281,8 +411,12 @@ exports.getFontMap = getFontMap;
281
411
 
282
412
  var handleLinkClick = function handleLinkClick(e) {
283
413
  return e.stopPropagation();
284
- }; // returns renderers customized with the appropriate font sizes given the provided `fontSize` value.
414
+ };
285
415
 
416
+ var StyledA = styled_components_1.default.a.withConfig({
417
+ displayName: "Markdown__StyledA",
418
+ componentId: "zd3qkg-3"
419
+ })(["text-decoration:underlined;"]); // returns renderers customized with the appropriate font sizes given the provided `fontSize` value.
286
420
 
287
421
  var getMarkdownRenderer = function getMarkdownRenderer(fontSize) {
288
422
  /* eslint-disable react/display-name, react/prop-types */
@@ -340,10 +474,6 @@ var getMarkdownRenderer = function getMarkdownRenderer(fontSize) {
340
474
  linkRenderer: function linkRenderer(_ref7) {
341
475
  var href = _ref7.href,
342
476
  children = _ref7.children;
343
- var StyledA = styled_components_1.default.a.withConfig({
344
- displayName: "Markdown__StyledA",
345
- componentId: "zd3qkg-3"
346
- })(["text-decoration:underlined;"]);
347
477
  return React.createElement(StyledA, {
348
478
  href: href,
349
479
  onClick: handleLinkClick
@@ -359,6 +489,7 @@ var MarkdownVisualization = function MarkdownVisualization(_ref8) {
359
489
  backgroundColor = _ref8.backgroundColor,
360
490
  fontColor = _ref8.fontColor,
361
491
  fontSize = _ref8.fontSize,
492
+ hasEventHandlers = _ref8.hasEventHandlers,
362
493
  onMarkdownClick = _ref8.onMarkdownClick;
363
494
 
364
495
  var _a; // because DSL evaluation is not guaranteed to return string data if `markdown` is powered by DSL, we do a typecast here
@@ -377,6 +508,10 @@ var MarkdownVisualization = function MarkdownVisualization(_ref8) {
377
508
  }, React.createElement(Markdown_1.default, Object.assign({
378
509
  text: stringifiedMarkdown
379
510
  }, renderersForFontSize, {
511
+ style: {
512
+ height: '100%',
513
+ cursor: hasEventHandlers ? 'pointer' : 'inherit'
514
+ },
380
515
  onClick: onMarkdownClick
381
516
  })));
382
517
  };
@@ -388,6 +523,7 @@ var propTypes = {
388
523
  backgroundColor: T.string,
389
524
  fontColor: T.string,
390
525
  fontSize: T.string,
526
+ hasEventHandlers: T.bool,
391
527
  onMarkdownClick: T.func
392
528
  };
393
529
  var defaultProps = {
@@ -397,13 +533,21 @@ var defaultProps = {
397
533
  backgroundColor: 'transparent',
398
534
  fontColor: 'rgba(255, 255, 255, 0.7)',
399
535
  fontSize: 'default',
536
+ hasEventHandlers: false,
400
537
  onMarkdownClick: function onMarkdownClick() {}
401
538
  };
402
539
  MarkdownVisualization.propTypes = propTypes;
403
540
  MarkdownVisualization.defaultProps = defaultProps;
541
+
542
+ var computeVizProps = function computeVizProps(props) {
543
+ return props;
544
+ };
545
+
546
+ exports.computeVizProps = computeVizProps;
404
547
  var Markdown = withDashboardViz_1.default({
405
548
  ReactViz: MarkdownVisualization,
406
- vizConfig: config_1.default
549
+ vizConfig: config_1.default,
550
+ computeVizProps: exports.computeVizProps
407
551
  });
408
552
  var themes = config_1.default.themes;
409
553
  exports.themes = themes;
@@ -411,103 +555,6 @@ exports.default = Markdown;
411
555
 
412
556
  /***/ }),
413
557
 
414
- /***/ 14:
415
- /***/ (function(module, exports, __webpack_require__) {
416
-
417
- "use strict";
418
-
419
-
420
- Object.defineProperty(exports, "__esModule", {
421
- value: true
422
- });
423
-
424
- var React = __webpack_require__(1);
425
-
426
- var styled_components_1 = __webpack_require__(4);
427
-
428
- var SizeAwareWrapper_1 = __webpack_require__(18);
429
-
430
- var style_1 = __webpack_require__(15);
431
-
432
- var colorUtils_1 = __webpack_require__(13);
433
-
434
- var Item = styled_components_1.default.div.attrs(function (_ref) {
435
- var width = _ref.width;
436
- return {
437
- style: {
438
- width: style_1.toPx(width)
439
- }
440
- };
441
- }).withConfig({
442
- displayName: "FixedSizeContainer__Item",
443
- componentId: "sc-1yhgpod-0"
444
- })(["position:relative;background-color:", "};"], function (props) {
445
- return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
446
- }); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
447
-
448
- var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
449
- var width = _ref2.width,
450
- height = _ref2.height;
451
- return {
452
- style: Object.assign(Object.assign({}, width && {
453
- width: style_1.toPx(width)
454
- }), height && {
455
- height: style_1.toPx(height)
456
- })
457
- };
458
- }).withConfig({
459
- displayName: "FixedSizeContainer__FixSizeItem",
460
- componentId: "sc-1yhgpod-1"
461
- })(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
462
- return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
463
- });
464
- var ItemContent = styled_components_1.default.div.withConfig({
465
- displayName: "FixedSizeContainer__ItemContent",
466
- componentId: "sc-1yhgpod-2"
467
- })(["position:relative;min-height:100px;width:100%;"]);
468
- var FixSizeItemContent = styled_components_1.default.div.withConfig({
469
- displayName: "FixedSizeContainer__FixSizeItemContent",
470
- componentId: "sc-1yhgpod-3"
471
- })(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
472
-
473
- var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
474
- var FixedSizeContainer = function FixedSizeContainer(props) {
475
- var width = props.width,
476
- height = props.height,
477
- backgroundColor = props.backgroundColor;
478
-
479
- if (!height) {
480
- return React.createElement(Item, {
481
- "data-test": "item",
482
- width: width,
483
- backgroundColor: backgroundColor
484
- }, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
485
- }
486
-
487
- return React.createElement(FixSizeItem, {
488
- "data-test": "fix-size-item",
489
- "data-splunk-visualization-version": "25.0.1 - de10ad954",
490
- width: width,
491
- height: height,
492
- backgroundColor: backgroundColor
493
- }, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
494
- var newWidth = _ref3.width,
495
- newHeight = _ref3.height;
496
- return React.createElement(Viz, Object.assign({}, props, {
497
- width: newWidth,
498
- height: newHeight
499
- }));
500
- })));
501
- };
502
-
503
- FixedSizeContainer.displayName = 'withFixedSizeContainer';
504
- return FixedSizeContainer;
505
- };
506
-
507
- exports.default = withFixedSizeContainer;
508
-
509
- /***/ }),
510
-
511
558
  /***/ 15:
512
559
  /***/ (function(module, exports) {
513
560
 
@@ -523,335 +570,312 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
523
570
  /***/ }),
524
571
 
525
572
  /***/ 17:
526
- /***/ (function(module, exports) {
573
+ /***/ (function(module, exports, __webpack_require__) {
527
574
 
528
- module.exports = require("@babel/runtime/helpers/createClass");
575
+ "use strict";
529
576
 
530
- /***/ }),
531
577
 
532
- /***/ 18:
533
- /***/ (function(module, exports) {
578
+ var _toConsumableArray = __webpack_require__(8);
534
579
 
535
- module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
580
+ var _defineProperty = __webpack_require__(7);
536
581
 
537
- /***/ }),
582
+ var __rest = this && this.__rest || function (s, e) {
583
+ var t = {};
538
584
 
539
- /***/ 2:
540
- /***/ (function(module, exports) {
585
+ for (var p in s) {
586
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
587
+ }
541
588
 
542
- module.exports = require("lodash");
589
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
590
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
591
+ }
592
+ return t;
593
+ };
543
594
 
544
- /***/ }),
595
+ Object.defineProperty(exports, "__esModule", {
596
+ value: true
597
+ });
598
+ exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
545
599
 
546
- /***/ 208:
547
- /***/ (function(module, exports, __webpack_require__) {
600
+ var lodash_1 = __webpack_require__(3);
548
601
 
549
- "use strict";
602
+ var schemaUtils_1 = __webpack_require__(16);
550
603
 
604
+ var VizBehavior_1 = __webpack_require__(6);
551
605
 
552
- var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
553
- if (k2 === undefined) k2 = k;
554
- Object.defineProperty(o, k2, {
555
- enumerable: true,
556
- get: function get() {
557
- return m[k];
606
+ var dynamicOptionsDSLType = {
607
+ type: 'string',
608
+ pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
609
+ };
610
+ /**
611
+ * Helper function to extend an options schema with dynamic options DSL
612
+ * @param optionsSchema a visualization's options schema
613
+ * @returns an updated options schema that additionally allows strings starting with > for each option
614
+ */
615
+
616
+ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
617
+ var enhancedOptionsSchema = {};
618
+ Object.keys(optionsSchema).forEach(function (key) {
619
+ var _a = optionsSchema[key],
620
+ title = _a.title,
621
+ description = _a.description,
622
+ readOnly = _a.readOnly,
623
+ writeOnly = _a.writeOnly,
624
+ examples = _a.examples,
625
+ defaultValue = _a.default,
626
+ type = _a.type,
627
+ properties = _a.properties,
628
+ patternProperties = _a.patternProperties,
629
+ remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
630
+
631
+ var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
632
+ title: title
633
+ }), description !== undefined && {
634
+ description: description
635
+ }), readOnly !== undefined && {
636
+ readOnly: readOnly
637
+ }), writeOnly !== undefined && {
638
+ writeOnly: writeOnly
639
+ }), examples !== undefined && {
640
+ examples: examples
641
+ }), defaultValue !== undefined && {
642
+ default: defaultValue
643
+ });
644
+
645
+ if (type === 'object') {
646
+ enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
647
+ type: type
648
+ }), properties && {
649
+ properties: enhanceOptionsSchemaWithDynamicOptions(properties)
650
+ });
651
+
652
+ if (patternProperties) {
653
+ var enhancedPatternProperties = {};
654
+ Object.keys(patternProperties).forEach(function (opt) {
655
+ enhancedPatternProperties = Object.assign(Object.assign({}, enhancedPatternProperties), enhanceOptionsSchemaWithDynamicOptions(_defineProperty({}, opt, patternProperties[opt])));
656
+ });
657
+ enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;
658
+ }
659
+ } else {
660
+ enhancedOptionsSchema[key] = Object.assign(Object.assign({}, annotations), {
661
+ anyOf: [Object.assign(Object.assign({}, type !== undefined && {
662
+ type: type
663
+ }), remainingSchemaEntry), dynamicOptionsDSLType]
664
+ });
558
665
  }
559
666
  });
560
- } : function (o, m, k, k2) {
561
- if (k2 === undefined) k2 = k;
562
- o[k2] = m[k];
563
- });
667
+ return enhancedOptionsSchema;
668
+ }
564
669
 
565
- var __exportStar = this && this.__exportStar || function (m, exports) {
566
- for (var p in m) {
567
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
670
+ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
671
+ /**
672
+ * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
673
+ * this function also collapse all editor panels
674
+ * @param vizConfig a Visualization Config
675
+ * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
676
+ * and containing `open: false` for all editor panels in editorConfig
677
+ */
678
+
679
+ function enhanceConfig(vizConfig) {
680
+ var enhancedConfig = vizConfig;
681
+
682
+ if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
683
+ enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
568
684
  }
569
- };
570
685
 
571
- Object.defineProperty(exports, "__esModule", {
572
- value: true
573
- });
574
- exports.default = void 0;
686
+ enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
687
+ return Object.assign(Object.assign({}, config), {
688
+ open: false
689
+ });
690
+ });
691
+ return enhancedConfig;
692
+ }
693
+
694
+ exports.enhanceConfig = enhanceConfig;
695
+ /**
696
+ * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
697
+ * Created for editor unit tests
698
+ * @param vizConfig a Visualization Config
699
+ * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
700
+ */
701
+
702
+ function uncollapseEditorConfig(vizConfig) {
703
+ var editorPanelUncollapsedConfig = vizConfig;
704
+ editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
705
+ return Object.assign(Object.assign({}, config), {
706
+ open: true
707
+ });
708
+ });
709
+ return editorPanelUncollapsedConfig;
710
+ }
575
711
 
576
- __exportStar(__webpack_require__(132), exports);
712
+ exports.uncollapseEditorConfig = uncollapseEditorConfig;
577
713
 
578
- var Markdown_1 = __webpack_require__(132);
714
+ function isDynamicOption(option) {
715
+ return option && typeof option === 'string' && option.trim().startsWith('>') || false;
716
+ }
579
717
 
580
- Object.defineProperty(exports, "default", {
581
- enumerable: true,
582
- get: function get() {
583
- return Markdown_1.default;
718
+ exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
719
+ // this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
720
+
721
+ /**
722
+ * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
723
+ * 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
724
+ * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
725
+ * 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
726
+ *
727
+ * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
728
+ */
729
+
730
+ function hasCompatibleContexts(vizContext, presetContext) {
731
+ var presetContextKeys = Object.keys(presetContext);
732
+ return presetContextKeys.every(function (contextKey) {
733
+ return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
734
+ });
735
+ }
736
+ /**
737
+ * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
738
+ */
739
+
740
+
741
+ function hasCompatibleOptions(vizOptions, presetOptions) {
742
+ var presetOptionKeys = Object.keys(presetOptions);
743
+ return presetOptionKeys.every(function (optionKey) {
744
+ return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
745
+ });
746
+ }
747
+ /**
748
+ * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
749
+ * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
750
+ *
751
+ * @param {Object} vizContext - the current vizContext definition
752
+ * @param {Object} vizOptions - the current vizOptions definition
753
+ * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
754
+ */
755
+
756
+
757
+ function getInitialPreset(vizContext, vizOptions, presets) {
758
+ return presets.find(function (preset) {
759
+ var presetContext = lodash_1.get(preset, ['value', 'context'], {});
760
+ var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
761
+ var presetContextKeys = Object.keys(presetContext);
762
+ var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
763
+ // if not, then the preset is invalid in config.ts
764
+
765
+ if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
766
+ return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
767
+ });
768
+ }
769
+
770
+ exports.getInitialPreset = getInitialPreset;
771
+ /**
772
+ * generates number precision values for a Select editor
773
+ *
774
+ * @param {Number} numPrecisionValues - number of integer precision values to generate
775
+ * @returns {{ label: string; value; string }[]} array of { label, value } tuples
776
+ */
777
+
778
+ function generatePrecisionValues(numPrecisionValues) {
779
+ return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
780
+ return {
781
+ label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
782
+ value: i
783
+ };
784
+ });
785
+ }
786
+
787
+ exports.generatePrecisionValues = generatePrecisionValues;
788
+ /**
789
+ * insert layout in layout array, return a new layout array instead of updating the original
790
+ *
791
+ * @param {EditorLayoutConfig[][]} layout - editor layout
792
+ * @param {Number} index - the index to insert layout item(s)
793
+ * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
794
+ * @returns {EditorLayoutConfig[][]} new editor layout with insertion
795
+ */
796
+
797
+ var insertLayout = function insertLayout(layout, index) {
798
+ for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
799
+ layoutItems[_key - 2] = arguments[_key];
584
800
  }
585
- });
801
+
802
+ return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
803
+ };
804
+
805
+ exports.insertLayout = insertLayout;
586
806
 
587
807
  /***/ }),
588
808
 
589
- /***/ 209:
809
+ /***/ 19:
590
810
  /***/ (function(module, exports) {
591
811
 
592
- module.exports = require("@splunk/react-ui/Markdown");
812
+ module.exports = require("@babel/runtime/helpers/createClass");
593
813
 
594
814
  /***/ }),
595
815
 
596
- /***/ 21:
816
+ /***/ 2:
597
817
  /***/ (function(module, exports) {
598
818
 
599
- module.exports = require("@splunk/visualization-context/TimezoneContext");
819
+ module.exports = require("@splunk/ui-utils/i18n");
600
820
 
601
821
  /***/ }),
602
822
 
603
- /***/ 210:
823
+ /***/ 20:
604
824
  /***/ (function(module, exports) {
605
825
 
606
- module.exports = require("@splunk/react-ui/Heading");
826
+ module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
607
827
 
608
828
  /***/ }),
609
829
 
610
- /***/ 211:
830
+ /***/ 23:
611
831
  /***/ (function(module, exports) {
612
832
 
613
- module.exports = require("@splunk/react-ui/List");
833
+ module.exports = require("@splunk/visualization-context/TimezoneContext");
614
834
 
615
835
  /***/ }),
616
836
 
617
- /***/ 212:
837
+ /***/ 25:
618
838
  /***/ (function(module, exports) {
619
839
 
620
- module.exports = require("@splunk/react-ui/Code");
840
+ module.exports = require("@splunk/visualizations-shared/hocUtils");
841
+
842
+ /***/ }),
843
+
844
+ /***/ 26:
845
+ /***/ (function(module, exports) {
846
+
847
+ module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
621
848
 
622
849
  /***/ }),
623
850
 
624
- /***/ 213:
851
+ /***/ 27:
625
852
  /***/ (function(module, exports, __webpack_require__) {
626
853
 
627
854
  "use strict";
628
855
 
629
856
 
630
- var _toConsumableArray = __webpack_require__(9);
631
-
632
857
  Object.defineProperty(exports, "__esModule", {
633
858
  value: true
634
859
  });
860
+ exports.shouldShowIconPlaceholder = void 0;
635
861
 
636
- var themes_1 = __webpack_require__(69);
862
+ var React = __webpack_require__(1);
637
863
 
638
- var i18n_1 = __webpack_require__(3);
864
+ var T = __webpack_require__(0);
639
865
 
640
- var schemaUtils_1 = __webpack_require__(16);
866
+ var lodash_1 = __webpack_require__(3);
641
867
 
642
- var VizBehavior_1 = __webpack_require__(5);
868
+ var i18n_1 = __webpack_require__(2);
643
869
 
644
- var VizCategory_1 = __webpack_require__(29);
870
+ var Message_1 = __webpack_require__(10);
645
871
 
646
- var configUtils_1 = __webpack_require__(6);
647
-
648
- var BackgroundColor_1 = __webpack_require__(49);
649
-
650
- var dataContract = {
651
- requiredDataSources: [],
652
- optionalDataSources: [// Note: SCP-14090 disable ui for optional datasources. We may need to add it back later
653
- // {
654
- // name: 'annotation',
655
- // description: 'DataSource that populate event annotations',
656
- // },
657
- ],
658
- initialRequestParams: {
659
- primary: {
660
- offset: 0,
661
- count: 10000
662
- }
663
- }
664
- };
665
- var size = {
666
- initialWidth: 300,
667
- initialHeight: 300
668
- };
669
- var defaultContext = {};
670
- var optionsSchema = {
671
- backgroundColor: {
672
- description: 'Specify the background color using a Hex code such as "#FF0000".',
673
- type: 'string',
674
- default: 'transparent',
675
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
676
- },
677
- fontColor: {
678
- description: 'Specify the text color using Hex codes or RGBA values, such as "#FF0000" or "rgba(25,12,13,0.1)". The default for enterprise light is "#3c444d". The default for enterprise dark is "#FFFFFF". The default for prisma dark is "rgba(255, 255, 255, 0.7)".',
679
- type: 'string',
680
- default: '> themes.defaultFontColor',
681
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
682
- },
683
- fontSize: {
684
- description: 'Specify the font size you would like to use for markdown content. Font sizes range from extra small (10px for unformatted text) to extra large (18px for unformatted text) with the default being 14px for unformatted text.',
685
- type: 'string',
686
- default: 'default',
687
- pattern: schemaUtils_1.getPattern(['extraSmall', 'small', 'default', 'large', 'extraLarge'])
688
- },
689
- markdown: {
690
- description: 'Add text using basic markdown syntax.',
691
- type: 'string'
692
- }
693
- };
694
- var themes = {
695
- defaultFontColor: function defaultFontColor(props) {
696
- return themes_1.pick({
697
- enterprise: {
698
- dark: themes_1.variables.textColor(props),
699
- light: themes_1.variables.textColor(props)
700
- },
701
- prisma: themes_1.variables.contentColorDefault(props)
702
- })(props);
703
- }
704
- };
705
- var editorConfig = [{
706
- label: i18n_1._('Markdown Settings'),
707
- layout: [[{
708
- label: '',
709
- option: 'markdown',
710
- editor: 'editor.markdown'
711
- }]]
712
- }, {
713
- label: i18n_1._('General'),
714
- layout: [[{
715
- label: i18n_1._('Font Color'),
716
- option: 'fontColor',
717
- editor: 'editor.color',
718
- editorProps: {
719
- labelPosition: 'top',
720
- themes: themes
721
- }
722
- }].concat(_toConsumableArray(BackgroundColor_1.default({
723
- label: 'Background Color',
724
- themes: themes
725
- }))), [{
726
- label: i18n_1._('Font Size'),
727
- option: 'fontSize',
728
- editor: 'editor.select',
729
- editorProps: {
730
- values: [{
731
- label: i18n_1._('Extra Small'),
732
- value: 'extraSmall'
733
- }, {
734
- label: i18n_1._('Small'),
735
- value: 'small'
736
- }, {
737
- label: i18n_1._('Default'),
738
- value: 'default'
739
- }, {
740
- label: i18n_1._('Large'),
741
- value: 'large'
742
- }, {
743
- label: i18n_1._('Extra Large'),
744
- value: 'extraLarge'
745
- }]
746
- }
747
- }]]
748
- }];
749
- /**
750
- * visualization configuration
751
- */
752
-
753
- var config = {
754
- /**
755
- * unique viz key
756
- */
757
- key: 'splunk.markdown',
758
-
759
- /**
760
- * viz name
761
- */
762
- name: 'Markdown',
763
- category: VizCategory_1.VizCategory.COMPARISONS,
764
-
765
- /**
766
- * viz icon
767
- */
768
- icon: null,
769
- dataContract: dataContract,
770
- size: size,
771
- defaultContext: defaultContext,
772
- optionsSchema: optionsSchema,
773
- editorConfig: editorConfig,
774
- events: {
775
- 'markdown.click': {
776
- description: 'triggered when user clicks on markdown area not formatted as a link'
777
- }
778
- },
779
- supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS],
780
- themes: themes
781
- };
782
- exports.default = configUtils_1.enhanceConfig(config);
783
-
784
- /***/ }),
785
-
786
- /***/ 24:
787
- /***/ (function(module, exports, __webpack_require__) {
788
-
789
- "use strict";
790
-
791
-
792
- Object.defineProperty(exports, "__esModule", {
793
- value: true
794
- });
795
- exports.pickFieldFromJSONSchema = void 0;
796
-
797
- var lodash_1 = __webpack_require__(2);
798
-
799
- var pickFieldFromJSONSchema = function pickFieldFromJSONSchema(optionsSchema) {
800
- var fieldName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
801
- return Object.keys(optionsSchema).reduce(function (accum, k) {
802
- if (lodash_1.has(optionsSchema[k], fieldName)) {
803
- accum[k] = optionsSchema[k][fieldName];
804
- } else if (lodash_1.get(optionsSchema, [k, 'type']) === 'object' && lodash_1.has(optionsSchema[k], 'properties')) {
805
- var nestedSchema = exports.pickFieldFromJSONSchema(optionsSchema[k].properties, fieldName);
806
-
807
- if (!lodash_1.isEmpty(nestedSchema)) {
808
- accum[k] = nestedSchema;
809
- }
810
- }
811
-
812
- return accum;
813
- }, {});
814
- };
815
-
816
- exports.pickFieldFromJSONSchema = pickFieldFromJSONSchema;
817
-
818
- /***/ }),
819
-
820
- /***/ 25:
821
- /***/ (function(module, exports) {
822
-
823
- module.exports = require("@babel/runtime/helpers/typeof");
824
-
825
- /***/ }),
826
-
827
- /***/ 26:
828
- /***/ (function(module, exports, __webpack_require__) {
829
-
830
- "use strict";
831
-
832
-
833
- Object.defineProperty(exports, "__esModule", {
834
- value: true
835
- });
836
- exports.shouldShowIconPlaceholder = void 0;
837
-
838
- var React = __webpack_require__(1);
839
-
840
- var T = __webpack_require__(0);
841
-
842
- var lodash_1 = __webpack_require__(2);
843
-
844
- var i18n_1 = __webpack_require__(3);
845
-
846
- var Message_1 = __webpack_require__(11);
847
-
848
- var FixedSizeContainer_1 = __webpack_require__(14);
849
- /**
850
- * @method shouldShowIconPlaceholder
851
- * @param {object} dataSources
852
- * @param {boolean} loading
853
- * @returns {boolean}
854
- */
872
+ var FixedSizeContainer_1 = __webpack_require__(13);
873
+ /**
874
+ * @method shouldShowIconPlaceholder
875
+ * @param {object} dataSources
876
+ * @param {boolean} loading
877
+ * @returns {boolean}
878
+ */
855
879
 
856
880
 
857
881
  var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
@@ -916,7 +940,7 @@ exports.default = FixedSizeContainer_1.default(IconPlaceholder);
916
940
 
917
941
  /***/ }),
918
942
 
919
- /***/ 27:
943
+ /***/ 28:
920
944
  /***/ (function(module, exports, __webpack_require__) {
921
945
 
922
946
  "use strict";
@@ -931,9 +955,9 @@ exports.getSortingParams = exports.SortParamsPropTypes = void 0;
931
955
 
932
956
  var T = __webpack_require__(0);
933
957
 
934
- var lodash_1 = __webpack_require__(2);
958
+ var lodash_1 = __webpack_require__(3);
935
959
 
936
- var DataSource_1 = __webpack_require__(37);
960
+ var DataSource_1 = __webpack_require__(39);
937
961
 
938
962
  exports.SortParamsPropTypes = T.shape({
939
963
  currentSortKey: T.string,
@@ -987,7 +1011,7 @@ exports.getSortingParams = getSortingParams;
987
1011
 
988
1012
  /***/ }),
989
1013
 
990
- /***/ 28:
1014
+ /***/ 29:
991
1015
  /***/ (function(module, exports, __webpack_require__) {
992
1016
 
993
1017
  "use strict";
@@ -1000,7 +1024,7 @@ exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
1000
1024
 
1001
1025
  var T = __webpack_require__(0);
1002
1026
 
1003
- var lodash_1 = __webpack_require__(2);
1027
+ var lodash_1 = __webpack_require__(3);
1004
1028
 
1005
1029
  exports.PaginatorParamsPropTypes = T.shape({
1006
1030
  isPaging: T.bool,
@@ -1052,7 +1076,14 @@ exports.getPaginationParams = getPaginationParams;
1052
1076
 
1053
1077
  /***/ }),
1054
1078
 
1055
- /***/ 29:
1079
+ /***/ 3:
1080
+ /***/ (function(module, exports) {
1081
+
1082
+ module.exports = require("lodash");
1083
+
1084
+ /***/ }),
1085
+
1086
+ /***/ 31:
1056
1087
  /***/ (function(module, exports, __webpack_require__) {
1057
1088
 
1058
1089
  "use strict";
@@ -1081,14 +1112,7 @@ var VizCategory;
1081
1112
 
1082
1113
  /***/ }),
1083
1114
 
1084
- /***/ 3:
1085
- /***/ (function(module, exports) {
1086
-
1087
- module.exports = require("@splunk/ui-utils/i18n");
1088
-
1089
- /***/ }),
1090
-
1091
- /***/ 30:
1115
+ /***/ 32:
1092
1116
  /***/ (function(module, exports, __webpack_require__) {
1093
1117
 
1094
1118
  "use strict";
@@ -1100,39 +1124,39 @@ Object.defineProperty(exports, "__esModule", {
1100
1124
 
1101
1125
  var React = __webpack_require__(1);
1102
1126
 
1103
- var lodash_1 = __webpack_require__(2);
1127
+ var lodash_1 = __webpack_require__(3);
1104
1128
 
1105
- var getSettingsFromThemedProps_1 = __webpack_require__(31);
1129
+ var getSettingsFromThemedProps_1 = __webpack_require__(33);
1106
1130
 
1107
- var Options_1 = __webpack_require__(32);
1131
+ var Options_1 = __webpack_require__(34);
1108
1132
 
1109
- var SanitizeProps_1 = __webpack_require__(33);
1133
+ var SanitizeProps_1 = __webpack_require__(35);
1110
1134
 
1111
- var TimezoneContext_1 = __webpack_require__(21);
1135
+ var TimezoneContext_1 = __webpack_require__(23);
1112
1136
 
1113
- var moment_1 = __webpack_require__(34);
1137
+ var moment_1 = __webpack_require__(36);
1114
1138
 
1115
1139
  var styled_components_1 = __webpack_require__(4);
1116
1140
 
1117
- var SplunkVisualization_1 = __webpack_require__(35);
1141
+ var hocUtils_1 = __webpack_require__(25);
1118
1142
 
1119
- var VizBehavior_1 = __webpack_require__(5);
1143
+ var JSONSchemaUtils_1 = __webpack_require__(26);
1120
1144
 
1121
- var getSorting_1 = __webpack_require__(27);
1145
+ var SplunkVisualization_1 = __webpack_require__(37);
1122
1146
 
1123
- var getPagination_1 = __webpack_require__(28);
1147
+ var VizBehavior_1 = __webpack_require__(6);
1124
1148
 
1125
- var useDeepMemo_1 = __webpack_require__(38);
1149
+ var getSorting_1 = __webpack_require__(28);
1126
1150
 
1127
- var JSONSchemaUtils_1 = __webpack_require__(24);
1151
+ var getPagination_1 = __webpack_require__(29);
1128
1152
 
1129
- var MissingPropsMessage_1 = __webpack_require__(39);
1153
+ var useDeepMemo_1 = __webpack_require__(40);
1130
1154
 
1131
- var withEditModeCover_1 = __webpack_require__(40);
1155
+ var MissingPropsMessage_1 = __webpack_require__(41);
1132
1156
 
1133
- var withPlaceholder_1 = __webpack_require__(42);
1157
+ var withEditModeCover_1 = __webpack_require__(42);
1134
1158
 
1135
- var hocUtils_1 = __webpack_require__(8);
1159
+ var withPlaceholder_1 = __webpack_require__(43);
1136
1160
  /**
1137
1161
  * hoc that wraps a pure react visualization in a Dashboard visualization
1138
1162
  * @param {DashboardVizOpts} opts
@@ -1334,41 +1358,41 @@ exports.default = withDashboardViz;
1334
1358
 
1335
1359
  /***/ }),
1336
1360
 
1337
- /***/ 31:
1361
+ /***/ 33:
1338
1362
  /***/ (function(module, exports) {
1339
1363
 
1340
1364
  module.exports = require("@splunk/themes/getSettingsFromThemedProps");
1341
1365
 
1342
1366
  /***/ }),
1343
1367
 
1344
- /***/ 32:
1368
+ /***/ 34:
1345
1369
  /***/ (function(module, exports) {
1346
1370
 
1347
1371
  module.exports = require("@splunk/visualization-encoding/Options");
1348
1372
 
1349
1373
  /***/ }),
1350
1374
 
1351
- /***/ 33:
1375
+ /***/ 35:
1352
1376
  /***/ (function(module, exports) {
1353
1377
 
1354
1378
  module.exports = require("@splunk/visualizations-shared/SanitizeProps");
1355
1379
 
1356
1380
  /***/ }),
1357
1381
 
1358
- /***/ 34:
1382
+ /***/ 36:
1359
1383
  /***/ (function(module, exports) {
1360
1384
 
1361
1385
  module.exports = require("@splunk/moment");
1362
1386
 
1363
1387
  /***/ }),
1364
1388
 
1365
- /***/ 35:
1389
+ /***/ 37:
1366
1390
  /***/ (function(module, exports, __webpack_require__) {
1367
1391
 
1368
1392
  "use strict";
1369
1393
 
1370
1394
 
1371
- var _classCallCheck = __webpack_require__(12);
1395
+ var _classCallCheck = __webpack_require__(11);
1372
1396
 
1373
1397
  Object.defineProperty(exports, "__esModule", {
1374
1398
  value: true
@@ -1378,9 +1402,9 @@ exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
1378
1402
 
1379
1403
  var T = __webpack_require__(0);
1380
1404
 
1381
- var lodash_1 = __webpack_require__(2);
1405
+ var lodash_1 = __webpack_require__(3);
1382
1406
 
1383
- var VizActionHandler_1 = __webpack_require__(36); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
1407
+ var VizActionHandler_1 = __webpack_require__(38); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
1384
1408
 
1385
1409
 
1386
1410
  exports.INITIAL_WIDTH = 250;
@@ -1514,15 +1538,15 @@ exports.default = SplunkVisualization;
1514
1538
 
1515
1539
  /***/ }),
1516
1540
 
1517
- /***/ 36:
1541
+ /***/ 38:
1518
1542
  /***/ (function(module, exports, __webpack_require__) {
1519
1543
 
1520
1544
  "use strict";
1521
1545
 
1522
1546
 
1523
- var _classCallCheck = __webpack_require__(12);
1547
+ var _classCallCheck = __webpack_require__(11);
1524
1548
 
1525
- var _createClass = __webpack_require__(17);
1549
+ var _createClass = __webpack_require__(19);
1526
1550
 
1527
1551
  Object.defineProperty(exports, "__esModule", {
1528
1552
  value: true
@@ -1552,7 +1576,7 @@ exports.DefaultVizActionHandler = DefaultVizActionHandler;
1552
1576
 
1553
1577
  /***/ }),
1554
1578
 
1555
- /***/ 37:
1579
+ /***/ 39:
1556
1580
  /***/ (function(module, exports, __webpack_require__) {
1557
1581
 
1558
1582
  "use strict";
@@ -1566,31 +1590,264 @@ exports.validSortDirs = ['asc', 'desc', 'none'];
1566
1590
 
1567
1591
  /***/ }),
1568
1592
 
1569
- /***/ 38:
1593
+ /***/ 394:
1570
1594
  /***/ (function(module, exports, __webpack_require__) {
1571
1595
 
1572
1596
  "use strict";
1573
1597
 
1574
1598
 
1599
+ var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
1600
+ if (k2 === undefined) k2 = k;
1601
+ Object.defineProperty(o, k2, {
1602
+ enumerable: true,
1603
+ get: function get() {
1604
+ return m[k];
1605
+ }
1606
+ });
1607
+ } : function (o, m, k, k2) {
1608
+ if (k2 === undefined) k2 = k;
1609
+ o[k2] = m[k];
1610
+ });
1611
+
1612
+ var __exportStar = this && this.__exportStar || function (m, exports) {
1613
+ for (var p in m) {
1614
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1615
+ }
1616
+ };
1617
+
1575
1618
  Object.defineProperty(exports, "__esModule", {
1576
1619
  value: true
1577
1620
  });
1578
- exports.useDeepMemo = void 0;
1621
+ exports.default = void 0;
1579
1622
 
1580
- var react_1 = __webpack_require__(1);
1623
+ __exportStar(__webpack_require__(143), exports);
1581
1624
 
1582
- var lodash_1 = __webpack_require__(2);
1583
- /**
1584
- * This hook evaluates and stores the result of a passed function and only
1585
- * re-evaluates the function when passed dependencies change.
1586
- *
1587
- * It is different from the internal React useMemo in the following aspects:
1588
- * - it only stores the last evaluated result
1589
- * - it uses a deep equality check to determine if dependencies have changed
1590
- *
1591
- * Inspired by apollo-client's useDeepMemo
1592
- *
1593
- * @param fn the function to be executed and
1625
+ var Markdown_1 = __webpack_require__(143);
1626
+
1627
+ Object.defineProperty(exports, "default", {
1628
+ enumerable: true,
1629
+ get: function get() {
1630
+ return Markdown_1.default;
1631
+ }
1632
+ });
1633
+
1634
+ /***/ }),
1635
+
1636
+ /***/ 395:
1637
+ /***/ (function(module, exports) {
1638
+
1639
+ module.exports = require("@splunk/react-ui/Heading");
1640
+
1641
+ /***/ }),
1642
+
1643
+ /***/ 396:
1644
+ /***/ (function(module, exports) {
1645
+
1646
+ module.exports = require("@splunk/react-ui/List");
1647
+
1648
+ /***/ }),
1649
+
1650
+ /***/ 397:
1651
+ /***/ (function(module, exports) {
1652
+
1653
+ module.exports = require("@splunk/react-ui/Code");
1654
+
1655
+ /***/ }),
1656
+
1657
+ /***/ 398:
1658
+ /***/ (function(module, exports, __webpack_require__) {
1659
+
1660
+ "use strict";
1661
+
1662
+
1663
+ var _toConsumableArray = __webpack_require__(8);
1664
+
1665
+ Object.defineProperty(exports, "__esModule", {
1666
+ value: true
1667
+ });
1668
+
1669
+ var themes_1 = __webpack_require__(69);
1670
+
1671
+ var i18n_1 = __webpack_require__(2);
1672
+
1673
+ var schemaUtils_1 = __webpack_require__(16);
1674
+
1675
+ var VizBehavior_1 = __webpack_require__(6);
1676
+
1677
+ var VizCategory_1 = __webpack_require__(31);
1678
+
1679
+ var configUtils_1 = __webpack_require__(17);
1680
+
1681
+ var BackgroundColor_1 = __webpack_require__(50);
1682
+
1683
+ var dataContract = {
1684
+ requiredDataSources: [],
1685
+ optionalDataSources: [// Note: SCP-14090 disable ui for optional datasources. We may need to add it back later
1686
+ // {
1687
+ // name: 'annotation',
1688
+ // description: 'DataSource that populate event annotations',
1689
+ // },
1690
+ ],
1691
+ initialRequestParams: {
1692
+ primary: {
1693
+ offset: 0,
1694
+ count: 10000
1695
+ }
1696
+ }
1697
+ };
1698
+ var size = {
1699
+ initialWidth: 300,
1700
+ initialHeight: 300
1701
+ };
1702
+ var defaultContext = {};
1703
+ var optionsSchema = {
1704
+ backgroundColor: {
1705
+ description: 'Specify the background color using a Hex code such as "#FF0000".',
1706
+ type: 'string',
1707
+ default: 'transparent',
1708
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
1709
+ },
1710
+ fontColor: {
1711
+ description: 'Specify the text color using Hex codes or RGBA values, such as "#FF0000" or "rgba(25,12,13,0.1)". The default for enterprise light is "#3c444d". The default for enterprise dark is "#FFFFFF". The default for prisma dark is "rgba(255, 255, 255, 0.7)".',
1712
+ type: 'string',
1713
+ default: '> themes.defaultFontColor',
1714
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
1715
+ },
1716
+ fontSize: {
1717
+ description: 'Specify the font size you would like to use for markdown content. Font sizes range from extra small (10px for unformatted text) to extra large (18px for unformatted text) with the default being 14px for unformatted text.',
1718
+ type: 'string',
1719
+ default: 'default',
1720
+ pattern: schemaUtils_1.getPattern(['extraSmall', 'small', 'default', 'large', 'extraLarge'])
1721
+ },
1722
+ markdown: {
1723
+ description: 'Add text using basic markdown syntax.',
1724
+ type: 'string'
1725
+ }
1726
+ };
1727
+ var themes = {
1728
+ defaultFontColor: function defaultFontColor(props) {
1729
+ return themes_1.pick({
1730
+ enterprise: {
1731
+ dark: themes_1.variables.textColor(props),
1732
+ light: themes_1.variables.textColor(props)
1733
+ },
1734
+ prisma: themes_1.variables.contentColorDefault(props)
1735
+ })(props);
1736
+ }
1737
+ };
1738
+ var editorConfig = [{
1739
+ label: i18n_1._('Markdown Settings'),
1740
+ layout: [[{
1741
+ label: '',
1742
+ option: 'markdown',
1743
+ editor: 'editor.markdown'
1744
+ }]]
1745
+ }, {
1746
+ label: i18n_1._('General'),
1747
+ layout: [[{
1748
+ label: i18n_1._('Font Color'),
1749
+ option: 'fontColor',
1750
+ editor: 'editor.color',
1751
+ editorProps: {
1752
+ labelPosition: 'top',
1753
+ themes: themes
1754
+ }
1755
+ }].concat(_toConsumableArray(BackgroundColor_1.default({
1756
+ label: 'Background Color',
1757
+ themes: themes
1758
+ }))), [{
1759
+ label: i18n_1._('Font Size'),
1760
+ option: 'fontSize',
1761
+ editor: 'editor.select',
1762
+ editorProps: {
1763
+ values: [{
1764
+ label: i18n_1._('Extra Small'),
1765
+ value: 'extraSmall'
1766
+ }, {
1767
+ label: i18n_1._('Small'),
1768
+ value: 'small'
1769
+ }, {
1770
+ label: i18n_1._('Default'),
1771
+ value: 'default'
1772
+ }, {
1773
+ label: i18n_1._('Large'),
1774
+ value: 'large'
1775
+ }, {
1776
+ label: i18n_1._('Extra Large'),
1777
+ value: 'extraLarge'
1778
+ }]
1779
+ }
1780
+ }]]
1781
+ }];
1782
+ /**
1783
+ * visualization configuration
1784
+ */
1785
+
1786
+ var config = {
1787
+ /**
1788
+ * unique viz key
1789
+ */
1790
+ key: 'splunk.markdown',
1791
+
1792
+ /**
1793
+ * viz name
1794
+ */
1795
+ name: 'Markdown',
1796
+ category: VizCategory_1.VizCategory.COMPARISONS,
1797
+
1798
+ /**
1799
+ * viz icon
1800
+ */
1801
+ icon: null,
1802
+ dataContract: dataContract,
1803
+ size: size,
1804
+ defaultContext: defaultContext,
1805
+ optionsSchema: optionsSchema,
1806
+ editorConfig: editorConfig,
1807
+ events: {
1808
+ 'markdown.click': {
1809
+ description: 'triggered when user clicks on markdown area not formatted as a link'
1810
+ }
1811
+ },
1812
+ supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS],
1813
+ themes: themes
1814
+ };
1815
+ exports.default = configUtils_1.enhanceConfig(config);
1816
+
1817
+ /***/ }),
1818
+
1819
+ /***/ 4:
1820
+ /***/ (function(module, exports) {
1821
+
1822
+ module.exports = require("styled-components");
1823
+
1824
+ /***/ }),
1825
+
1826
+ /***/ 40:
1827
+ /***/ (function(module, exports, __webpack_require__) {
1828
+
1829
+ "use strict";
1830
+
1831
+
1832
+ Object.defineProperty(exports, "__esModule", {
1833
+ value: true
1834
+ });
1835
+ exports.useDeepMemo = void 0;
1836
+
1837
+ var react_1 = __webpack_require__(1);
1838
+
1839
+ var lodash_1 = __webpack_require__(3);
1840
+ /**
1841
+ * This hook evaluates and stores the result of a passed function and only
1842
+ * re-evaluates the function when passed dependencies change.
1843
+ *
1844
+ * It is different from the internal React useMemo in the following aspects:
1845
+ * - it only stores the last evaluated result
1846
+ * - it uses a deep equality check to determine if dependencies have changed
1847
+ *
1848
+ * Inspired by apollo-client's useDeepMemo
1849
+ *
1850
+ * @param fn the function to be executed and
1594
1851
  * @param dependencies an array of dependencies
1595
1852
  */
1596
1853
 
@@ -1612,7 +1869,7 @@ exports.useDeepMemo = useDeepMemo;
1612
1869
 
1613
1870
  /***/ }),
1614
1871
 
1615
- /***/ 39:
1872
+ /***/ 41:
1616
1873
  /***/ (function(module, exports, __webpack_require__) {
1617
1874
 
1618
1875
  "use strict";
@@ -1627,11 +1884,11 @@ var React = __webpack_require__(1);
1627
1884
 
1628
1885
  var T = __webpack_require__(0);
1629
1886
 
1630
- var i18n_1 = __webpack_require__(3);
1887
+ var i18n_1 = __webpack_require__(2);
1631
1888
 
1632
- var Message_1 = __webpack_require__(11);
1889
+ var Message_1 = __webpack_require__(10);
1633
1890
 
1634
- var FixedSizeContainer_1 = __webpack_require__(14);
1891
+ var FixedSizeContainer_1 = __webpack_require__(13);
1635
1892
  /**
1636
1893
  * @method isMissing
1637
1894
  * @param {any} v
@@ -1693,14 +1950,7 @@ exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
1693
1950
 
1694
1951
  /***/ }),
1695
1952
 
1696
- /***/ 4:
1697
- /***/ (function(module, exports) {
1698
-
1699
- module.exports = require("styled-components");
1700
-
1701
- /***/ }),
1702
-
1703
- /***/ 40:
1953
+ /***/ 42:
1704
1954
  /***/ (function(module, exports, __webpack_require__) {
1705
1955
 
1706
1956
  "use strict";
@@ -1714,525 +1964,201 @@ var React = __webpack_require__(1);
1714
1964
 
1715
1965
  var styled_components_1 = __webpack_require__(4);
1716
1966
 
1717
- var hocUtils_1 = __webpack_require__(8);
1967
+ var hocUtils_1 = __webpack_require__(14);
1718
1968
 
1719
1969
  var Cover = styled_components_1.default.div.withConfig({
1720
1970
  displayName: "withEditModeCover__Cover",
1721
1971
  componentId: "sc-1gsbnxb-0"
1722
1972
  })(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
1723
1973
  var Blocker = styled_components_1.default.div.attrs({
1724
- 'data-splunk-visualization-version': "25.0.1 - de10ad954"
1974
+ 'data-splunk-visualization-version': "25.2.0 - 4373c5a66"
1725
1975
  }).withConfig({
1726
- displayName: "withEditModeCover__Blocker",
1727
- componentId: "sc-1gsbnxb-1"
1728
- })(["position:relative;width:100%;height:100%;"]);
1729
- /**
1730
- * HOC that renders a cover layer in edit mode
1731
- * @method withEditModeCover
1732
- * @param {ExtendedDashViz} Visualization
1733
- * @returns {ExtendedDashViz} Wrapper
1734
- */
1735
-
1736
- var withEditModeCover = function withEditModeCover(Visualization, disableEditModeCover) {
1737
- var Wrapper = function Wrapper(props) {
1738
- var mode = props.mode;
1739
- var showEditCover = mode === 'edit' && !disableEditModeCover;
1740
- return React.createElement(Blocker, null, React.createElement(Visualization, Object.assign({}, props)), showEditCover && React.createElement(Cover, {
1741
- "data-test": "edit-mode-cover"
1742
- }));
1743
- };
1744
-
1745
- hocUtils_1.extendStaticWrapperProps({
1746
- Wrapper: Wrapper,
1747
- Visualization: Visualization
1748
- });
1749
- return Wrapper;
1750
- };
1751
-
1752
- exports.default = withEditModeCover;
1753
-
1754
- /***/ }),
1755
-
1756
- /***/ 41:
1757
- /***/ (function(module, exports) {
1758
-
1759
- module.exports = require("@splunk/visualizations-shared/mapUtils");
1760
-
1761
- /***/ }),
1762
-
1763
- /***/ 42:
1764
- /***/ (function(module, exports, __webpack_require__) {
1765
-
1766
- "use strict";
1767
-
1768
-
1769
- Object.defineProperty(exports, "__esModule", {
1770
- value: true
1771
- });
1772
-
1773
- var React = __webpack_require__(1);
1774
-
1775
- var colorUtils_1 = __webpack_require__(13);
1776
-
1777
- var variables_1 = __webpack_require__(10);
1778
-
1779
- var IconPlaceholder_1 = __webpack_require__(26);
1780
-
1781
- var VizBehavior_1 = __webpack_require__(5);
1782
-
1783
- var hocUtils_1 = __webpack_require__(8);
1784
-
1785
- var withPlaceholder = function withPlaceholder(Visualization) {
1786
- var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
1787
- var config = Visualization.config;
1788
- var themes = config.themes;
1789
-
1790
- var Wrapper = function Wrapper(props) {
1791
- var _a, _b;
1792
-
1793
- var dataSources = props.dataSources,
1794
- loading = props.loading,
1795
- options = props.options,
1796
- height = props.height,
1797
- width = props.width;
1798
- var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
1799
- var bgColorFromTheme = colorUtils_1.isColor(options === null || options === void 0 ? void 0 : options.backgroundColor) ? options === null || options === void 0 ? void 0 : options.backgroundColor : (_a = themes === null || themes === void 0 ? void 0 : themes.defaultBackgroundColor) === null || _a === void 0 ? void 0 : _a.call(themes, props);
1800
- var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
1801
- var iconColor = variables_1.default.contentColorActive(props);
1802
-
1803
- if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
1804
- return React.createElement(IconPlaceholder_1.default, {
1805
- "data-test": "icon-placeholder",
1806
- icon: icon,
1807
- width: width,
1808
- height: height,
1809
- backgroundColor: bgColorFromTheme,
1810
- iconColor: iconColor
1811
- });
1812
- }
1813
-
1814
- return React.createElement(Visualization, Object.assign({}, props));
1815
- };
1816
-
1817
- hocUtils_1.extendStaticWrapperProps({
1818
- Wrapper: Wrapper,
1819
- Visualization: Visualization
1820
- });
1821
- return Wrapper;
1822
- };
1823
-
1824
- exports.default = withPlaceholder;
1825
-
1826
- /***/ }),
1827
-
1828
- /***/ 49:
1829
- /***/ (function(module, exports, __webpack_require__) {
1830
-
1831
- "use strict";
1832
-
1833
-
1834
- Object.defineProperty(exports, "__esModule", {
1835
- value: true
1836
- });
1837
-
1838
- var i18n_1 = __webpack_require__(3);
1839
-
1840
- var background = function background(_ref) {
1841
- var label = _ref.label,
1842
- themes = _ref.themes,
1843
- labelPosition = _ref.labelPosition;
1844
- return [{
1845
- label: i18n_1._(label || 'Background'),
1846
- option: 'backgroundColor',
1847
- editor: 'editor.color',
1848
- editorProps: {
1849
- labelPosition: labelPosition || 'top',
1850
- themes: themes
1851
- }
1852
- }];
1853
- };
1854
-
1855
- exports.default = background;
1856
-
1857
- /***/ }),
1858
-
1859
- /***/ 5:
1860
- /***/ (function(module, exports, __webpack_require__) {
1861
-
1862
- "use strict";
1863
-
1864
-
1865
- Object.defineProperty(exports, "__esModule", {
1866
- value: true
1867
- });
1868
- exports.VizBehavior = void 0;
1869
- var VizBehavior;
1870
-
1871
- (function (VizBehavior) {
1872
- /**
1873
- * Dynamic Options Behavior.
1874
- * This allows visualization options to be powered by data
1875
- *
1876
- * **Example**
1877
- *
1878
- * sparklineValues: ">primary|seriesByIndex(0)"
1879
- * would configure sparklineValues with an array of data points
1880
- * coming from the first series in the primary datasource
1881
- *
1882
- */
1883
- VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
1884
- VizBehavior["EVENTS"] = "events";
1885
- /**
1886
- * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
1887
- * missing.
1888
- * @type {string}
1889
- */
1890
-
1891
- VizBehavior["PLACEHOLDER"] = "placeholder";
1892
- VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
1893
- })(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
1894
-
1895
- /***/ }),
1896
-
1897
- /***/ 6:
1898
- /***/ (function(module, exports, __webpack_require__) {
1899
-
1900
- "use strict";
1901
-
1902
-
1903
- var _toConsumableArray = __webpack_require__(9);
1904
-
1905
- var _defineProperty = __webpack_require__(7);
1906
-
1907
- var __rest = this && this.__rest || function (s, e) {
1908
- var t = {};
1909
-
1910
- for (var p in s) {
1911
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
1912
- }
1913
-
1914
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1915
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
1916
- }
1917
- return t;
1918
- };
1919
-
1920
- Object.defineProperty(exports, "__esModule", {
1921
- value: true
1922
- });
1923
- exports.insertLayout = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.isDynamicOption = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
1924
-
1925
- var lodash_1 = __webpack_require__(2);
1926
-
1927
- var schemaUtils_1 = __webpack_require__(16);
1928
-
1929
- var VizBehavior_1 = __webpack_require__(5);
1930
-
1931
- var dynamicOptionsDSLType = {
1932
- type: 'string',
1933
- pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
1934
- };
1935
- /**
1936
- * Helper function to extend an options schema with dynamic options DSL
1937
- * @param optionsSchema a visualization's options schema
1938
- * @returns an updated options schema that additionally allows strings starting with > for each option
1939
- */
1940
-
1941
- function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
1942
- var enhancedOptionsSchema = {};
1943
- Object.keys(optionsSchema).forEach(function (key) {
1944
- var _a = optionsSchema[key],
1945
- title = _a.title,
1946
- description = _a.description,
1947
- readOnly = _a.readOnly,
1948
- writeOnly = _a.writeOnly,
1949
- examples = _a.examples,
1950
- defaultValue = _a.default,
1951
- type = _a.type,
1952
- properties = _a.properties,
1953
- patternProperties = _a.patternProperties,
1954
- remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
1955
-
1956
- var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
1957
- title: title
1958
- }), description !== undefined && {
1959
- description: description
1960
- }), readOnly !== undefined && {
1961
- readOnly: readOnly
1962
- }), writeOnly !== undefined && {
1963
- writeOnly: writeOnly
1964
- }), examples !== undefined && {
1965
- examples: examples
1966
- }), defaultValue !== undefined && {
1967
- default: defaultValue
1968
- });
1969
-
1970
- if (type === 'object') {
1971
- enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
1972
- type: type
1973
- }), properties && {
1974
- properties: enhanceOptionsSchemaWithDynamicOptions(properties)
1975
- });
1976
-
1977
- if (patternProperties) {
1978
- var enhancedPatternProperties = {};
1979
- Object.keys(patternProperties).forEach(function (opt) {
1980
- enhancedPatternProperties = Object.assign(Object.assign({}, enhancedPatternProperties), enhanceOptionsSchemaWithDynamicOptions(_defineProperty({}, opt, patternProperties[opt])));
1981
- });
1982
- enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;
1983
- }
1984
- } else {
1985
- enhancedOptionsSchema[key] = Object.assign(Object.assign({}, annotations), {
1986
- anyOf: [Object.assign(Object.assign({}, type !== undefined && {
1987
- type: type
1988
- }), remainingSchemaEntry), dynamicOptionsDSLType]
1989
- });
1990
- }
1991
- });
1992
- return enhancedOptionsSchema;
1993
- }
1994
-
1995
- exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
1996
- /**
1997
- * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
1998
- * this function also collapse all editor panels
1999
- * @param vizConfig a Visualization Config
2000
- * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
2001
- * and containing `open: false` for all editor panels in editorConfig
2002
- */
2003
-
2004
- function enhanceConfig(vizConfig) {
2005
- var enhancedConfig = vizConfig;
2006
-
2007
- if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
2008
- enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
2009
- }
2010
-
2011
- enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
2012
- return Object.assign(Object.assign({}, config), {
2013
- open: false
2014
- });
2015
- });
2016
- return enhancedConfig;
2017
- }
2018
-
2019
- exports.enhanceConfig = enhanceConfig;
1976
+ displayName: "withEditModeCover__Blocker",
1977
+ componentId: "sc-1gsbnxb-1"
1978
+ })(["position:relative;width:100%;height:100%;"]);
2020
1979
  /**
2021
- * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
2022
- * Created for editor unit tests
2023
- * @param vizConfig a Visualization Config
2024
- * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
1980
+ * HOC that renders a cover layer in edit mode
1981
+ * @method withEditModeCover
1982
+ * @param {ExtendedDashViz} Visualization
1983
+ * @returns {ExtendedDashViz} Wrapper
2025
1984
  */
2026
1985
 
2027
- function uncollapseEditorConfig(vizConfig) {
2028
- var editorPanelUncollapsedConfig = vizConfig;
2029
- editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
2030
- return Object.assign(Object.assign({}, config), {
2031
- open: true
2032
- });
1986
+ var withEditModeCover = function withEditModeCover(Visualization, disableEditModeCover) {
1987
+ var Wrapper = function Wrapper(props) {
1988
+ var mode = props.mode;
1989
+ var showEditCover = mode === 'edit' && !disableEditModeCover;
1990
+ return React.createElement(Blocker, null, React.createElement(Visualization, Object.assign({}, props)), showEditCover && React.createElement(Cover, {
1991
+ "data-test": "edit-mode-cover"
1992
+ }));
1993
+ };
1994
+
1995
+ hocUtils_1.extendStaticWrapperProps({
1996
+ Wrapper: Wrapper,
1997
+ Visualization: Visualization
2033
1998
  });
2034
- return editorPanelUncollapsedConfig;
2035
- }
1999
+ return Wrapper;
2000
+ };
2036
2001
 
2037
- exports.uncollapseEditorConfig = uncollapseEditorConfig;
2002
+ exports.default = withEditModeCover;
2038
2003
 
2039
- function isDynamicOption(option) {
2040
- return option && typeof option === 'string' && option.trim().startsWith('>') || false;
2041
- }
2004
+ /***/ }),
2042
2005
 
2043
- exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
2044
- // this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
2006
+ /***/ 43:
2007
+ /***/ (function(module, exports, __webpack_require__) {
2045
2008
 
2046
- /**
2047
- * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
2048
- * 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
2049
- * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
2050
- * 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
2051
- *
2052
- * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
2053
- */
2009
+ "use strict";
2054
2010
 
2055
- function hasCompatibleContexts(vizContext, presetContext) {
2056
- var presetContextKeys = Object.keys(presetContext);
2057
- return presetContextKeys.every(function (contextKey) {
2058
- return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
2059
- });
2060
- }
2061
- /**
2062
- * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
2063
- */
2064
2011
 
2012
+ Object.defineProperty(exports, "__esModule", {
2013
+ value: true
2014
+ });
2065
2015
 
2066
- function hasCompatibleOptions(vizOptions, presetOptions) {
2067
- var presetOptionKeys = Object.keys(presetOptions);
2068
- return presetOptionKeys.every(function (optionKey) {
2069
- return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
2070
- });
2071
- }
2072
- /**
2073
- * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
2074
- * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
2075
- *
2076
- * @param {Object} vizContext - the current vizContext definition
2077
- * @param {Object} vizOptions - the current vizOptions definition
2078
- * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
2079
- */
2016
+ var React = __webpack_require__(1);
2080
2017
 
2018
+ var colorUtils_1 = __webpack_require__(12);
2081
2019
 
2082
- function getInitialPreset(vizContext, vizOptions, presets) {
2083
- return presets.find(function (preset) {
2084
- var presetContext = lodash_1.get(preset, ['value', 'context'], {});
2085
- var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
2086
- var presetContextKeys = Object.keys(presetContext);
2087
- var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
2088
- // if not, then the preset is invalid in config.ts
2020
+ var variables_1 = __webpack_require__(9);
2089
2021
 
2090
- if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
2091
- return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
2092
- });
2093
- }
2022
+ var IconPlaceholder_1 = __webpack_require__(27);
2094
2023
 
2095
- exports.getInitialPreset = getInitialPreset;
2096
- /**
2097
- * generates number precision values for a Select editor
2098
- *
2099
- * @param {Number} numPrecisionValues - number of integer precision values to generate
2100
- * @returns {{ label: string; value; string }[]} array of { label, value } tuples
2101
- */
2024
+ var VizBehavior_1 = __webpack_require__(6);
2102
2025
 
2103
- function generatePrecisionValues(numPrecisionValues) {
2104
- return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
2105
- return {
2106
- label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
2107
- value: i
2108
- };
2109
- });
2110
- }
2026
+ var hocUtils_1 = __webpack_require__(14);
2111
2027
 
2112
- exports.generatePrecisionValues = generatePrecisionValues;
2113
- /**
2114
- * insert layout in layout array, return a new layout array instead of updating the original
2115
- *
2116
- * @param {EditorLayoutConfig[][]} layout - editor layout
2117
- * @param {Number} index - the index to insert layout item(s)
2118
- * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
2119
- * @returns {EditorLayoutConfig[][]} new editor layout with insertion
2120
- */
2028
+ var withPlaceholder = function withPlaceholder(Visualization) {
2029
+ var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
2030
+ var config = Visualization.config;
2031
+ var themes = config.themes;
2121
2032
 
2122
- var insertLayout = function insertLayout(layout, index) {
2123
- for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
2124
- layoutItems[_key - 2] = arguments[_key];
2125
- }
2033
+ var Wrapper = function Wrapper(props) {
2034
+ var _a, _b;
2126
2035
 
2127
- return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
2036
+ var dataSources = props.dataSources,
2037
+ loading = props.loading,
2038
+ options = props.options,
2039
+ height = props.height,
2040
+ width = props.width;
2041
+ var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
2042
+ var bgColorFromTheme = colorUtils_1.isColor(options === null || options === void 0 ? void 0 : options.backgroundColor) ? options === null || options === void 0 ? void 0 : options.backgroundColor : (_a = themes === null || themes === void 0 ? void 0 : themes.defaultBackgroundColor) === null || _a === void 0 ? void 0 : _a.call(themes, props);
2043
+ var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
2044
+ var iconColor = variables_1.default.contentColorActive(props);
2045
+
2046
+ if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
2047
+ return React.createElement(IconPlaceholder_1.default, {
2048
+ "data-test": "icon-placeholder",
2049
+ icon: icon,
2050
+ width: width,
2051
+ height: height,
2052
+ backgroundColor: bgColorFromTheme,
2053
+ iconColor: iconColor
2054
+ });
2055
+ }
2056
+
2057
+ return React.createElement(Visualization, Object.assign({}, props));
2058
+ };
2059
+
2060
+ hocUtils_1.extendStaticWrapperProps({
2061
+ Wrapper: Wrapper,
2062
+ Visualization: Visualization
2063
+ });
2064
+ return Wrapper;
2128
2065
  };
2129
2066
 
2130
- exports.insertLayout = insertLayout;
2067
+ exports.default = withPlaceholder;
2131
2068
 
2132
2069
  /***/ }),
2133
2070
 
2134
- /***/ 69:
2135
- /***/ (function(module, exports) {
2071
+ /***/ 50:
2072
+ /***/ (function(module, exports, __webpack_require__) {
2136
2073
 
2137
- module.exports = require("@splunk/themes");
2074
+ "use strict";
2138
2075
 
2139
- /***/ }),
2140
2076
 
2141
- /***/ 7:
2142
- /***/ (function(module, exports) {
2077
+ Object.defineProperty(exports, "__esModule", {
2078
+ value: true
2079
+ });
2143
2080
 
2144
- module.exports = require("@babel/runtime/helpers/defineProperty");
2081
+ var i18n_1 = __webpack_require__(2);
2082
+
2083
+ var background = function background(_ref) {
2084
+ var label = _ref.label,
2085
+ themes = _ref.themes,
2086
+ labelPosition = _ref.labelPosition;
2087
+ return [{
2088
+ label: i18n_1._(label || 'Background'),
2089
+ option: 'backgroundColor',
2090
+ editor: 'editor.color',
2091
+ editorProps: {
2092
+ labelPosition: labelPosition || 'top',
2093
+ themes: themes
2094
+ }
2095
+ }];
2096
+ };
2097
+
2098
+ exports.default = background;
2145
2099
 
2146
2100
  /***/ }),
2147
2101
 
2148
- /***/ 8:
2102
+ /***/ 6:
2149
2103
  /***/ (function(module, exports, __webpack_require__) {
2150
2104
 
2151
2105
  "use strict";
2152
2106
 
2153
2107
 
2154
- var _typeof = __webpack_require__(25);
2155
-
2156
2108
  Object.defineProperty(exports, "__esModule", {
2157
2109
  value: true
2158
2110
  });
2159
- exports.deepMergeWithArrayPrimitiveOverrides = exports.extendStaticWrapperProps = void 0;
2111
+ exports.VizBehavior = void 0;
2112
+ var VizBehavior;
2113
+
2114
+ (function (VizBehavior) {
2115
+ /**
2116
+ * Dynamic Options Behavior.
2117
+ * This allows visualization options to be powered by data
2118
+ *
2119
+ * **Example**
2120
+ *
2121
+ * sparklineValues: ">primary|seriesByIndex(0)"
2122
+ * would configure sparklineValues with an array of data points
2123
+ * coming from the first series in the primary datasource
2124
+ *
2125
+ */
2126
+ VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
2127
+ VizBehavior["EVENTS"] = "events";
2128
+ /**
2129
+ * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
2130
+ * missing.
2131
+ * @type {string}
2132
+ */
2160
2133
 
2161
- var lodash_1 = __webpack_require__(2);
2134
+ VizBehavior["PLACEHOLDER"] = "placeholder";
2135
+ VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
2136
+ })(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
2162
2137
 
2163
- var mapUtils_1 = __webpack_require__(41);
2164
- /**
2165
- * @method extendStaticWrapperProps
2166
- * @param {Object} props
2167
- * @param {DashboardVizType} props.Wrapper
2168
- * @param {DashboardVizType} props.Visualization
2169
- */
2138
+ /***/ }),
2170
2139
 
2140
+ /***/ 69:
2141
+ /***/ (function(module, exports) {
2171
2142
 
2172
- var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
2173
- var Wrapper = _ref.Wrapper,
2174
- Visualization = _ref.Visualization;
2175
- var extendProperties = ['propTypes', 'defaultProps', 'config'];
2176
- extendProperties.forEach(function (prop) {
2177
- if (Visualization[prop]) {
2178
- // eslint-disable-next-line no-param-reassign
2179
- Wrapper[prop] = Visualization[prop];
2180
- }
2181
- });
2182
- };
2143
+ module.exports = require("@splunk/themes");
2183
2144
 
2184
- exports.extendStaticWrapperProps = extendStaticWrapperProps;
2185
- /**
2186
- * helper to deeply merge objects while preserving arrays in earlier source objects
2187
- * 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
2188
- * 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).
2189
- * 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
2190
- * 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.
2191
- *
2192
- * @method deepMergeWithArrayPrimitiveOverrides
2193
- * @param {Object} initial - target object to merge values into
2194
- * @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
2195
- *
2196
- * @returns {Object}
2197
- */
2145
+ /***/ }),
2198
2146
 
2199
- var deepMergeWithArrayPrimitiveOverrides = function deepMergeWithArrayPrimitiveOverrides(initial) {
2200
- var clone = lodash_1.cloneDeep(initial);
2147
+ /***/ 7:
2148
+ /***/ (function(module, exports) {
2201
2149
 
2202
- for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2203
- sources[_key - 1] = arguments[_key];
2204
- }
2150
+ module.exports = require("@babel/runtime/helpers/defineProperty");
2205
2151
 
2206
- sources.forEach(function (sourceToApply) {
2207
- Object.keys(sourceToApply).forEach(function (sourceKey) {
2208
- if (!Object.prototype.hasOwnProperty.call(clone, sourceKey)) {
2209
- clone[sourceKey] = lodash_1.cloneDeep(sourceToApply[sourceKey]);
2210
- }
2152
+ /***/ }),
2211
2153
 
2212
- if (clone[sourceKey] && _typeof(clone[sourceKey]) === 'object' && !Array.isArray(clone[sourceKey]) && _typeof(sourceToApply[sourceKey]) === 'object') {
2213
- clone[sourceKey] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey], sourceToApply[sourceKey]);
2214
- } else if (Array.isArray(clone[sourceKey]) && _typeof(clone[sourceKey][0]) === 'object' && !Array.isArray(clone[sourceKey][0])) {
2215
- // If option is an array of objects
2216
- for (var i = 0; i < clone[sourceKey].length; i += 1) {
2217
- if (_typeof(clone[sourceKey][i]) === 'object') {
2218
- var closestMatchIdx = mapUtils_1.findClosestMatchFromDefaultList(sourceToApply[sourceKey], clone[sourceKey][i]);
2219
-
2220
- if (closestMatchIdx > -1) {
2221
- clone[sourceKey][i] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey][i], sourceToApply[sourceKey][closestMatchIdx]);
2222
- }
2223
- }
2224
- }
2225
- }
2226
- });
2227
- });
2228
- return clone;
2229
- };
2154
+ /***/ 8:
2155
+ /***/ (function(module, exports) {
2230
2156
 
2231
- exports.deepMergeWithArrayPrimitiveOverrides = deepMergeWithArrayPrimitiveOverrides;
2157
+ module.exports = require("@babel/runtime/helpers/toConsumableArray");
2232
2158
 
2233
2159
  /***/ }),
2234
2160
 
2235
- /***/ 81:
2161
+ /***/ 85:
2236
2162
  /***/ (function(module, exports) {
2237
2163
 
2238
2164
  module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
@@ -2242,7 +2168,7 @@ module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
2242
2168
  /***/ 9:
2243
2169
  /***/ (function(module, exports) {
2244
2170
 
2245
- module.exports = require("@babel/runtime/helpers/toConsumableArray");
2171
+ module.exports = require("@splunk/themes/variables");
2246
2172
 
2247
2173
  /***/ })
2248
2174