@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/Rectangle.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 = 243);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 428);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
@@ -109,11 +109,177 @@ 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
+
114
+ /***/ }),
115
+
116
+ /***/ 102:
117
+ /***/ (function(module, exports, __webpack_require__) {
118
+
119
+ "use strict";
120
+
121
+
122
+ Object.defineProperty(exports, "__esModule", {
123
+ value: true
124
+ });
125
+ exports.getDynamicFillColorEditor = void 0;
126
+
127
+ var i18n_1 = __webpack_require__(2);
128
+
129
+ var configUtils_1 = __webpack_require__(18);
130
+
131
+ var getDynamicFillColorEditor = function getDynamicFillColorEditor(_ref) {
132
+ var defaultContext = _ref.defaultContext,
133
+ defaultPalettesConfig = _ref.defaultPalettesConfig;
134
+ return {
135
+ label: i18n_1._('Dynamic Fill'),
136
+ option: 'fillColor',
137
+ context: 'fillColorEditorConfig',
138
+ editor: 'editor.dynamicColor',
139
+ showEditor: function showEditor(_ref2) {
140
+ var options = _ref2.options;
141
+ return configUtils_1.isDynamicOption(options.fillColor);
142
+ },
143
+ editorProps: {
144
+ labelPosition: 'left',
145
+ flyoutTitle: i18n_1._('Dynamic Coloring: Fill Color'),
146
+ formatters: [{
147
+ label: i18n_1._('Ranges'),
148
+ value: 'rangeValue',
149
+ defaults: {
150
+ fillDataValue: defaultContext.fillColorConfig
151
+ }
152
+ }, {
153
+ label: i18n_1._('Matches'),
154
+ value: 'matchValue',
155
+ defaults: {
156
+ fillDataValue: defaultContext.fillColorMatchConfig
157
+ }
158
+ }],
159
+ dataSelectors: [{
160
+ label: i18n_1._('Fill Color'),
161
+ value: 'fillDataValue'
162
+ }],
163
+ defaultPalettesConfig: defaultPalettesConfig
164
+ }
165
+ };
166
+ };
167
+
168
+ exports.getDynamicFillColorEditor = getDynamicFillColorEditor;
169
+
170
+ /***/ }),
171
+
172
+ /***/ 103:
173
+ /***/ (function(module, exports, __webpack_require__) {
174
+
175
+ "use strict";
176
+
177
+
178
+ Object.defineProperty(exports, "__esModule", {
179
+ value: true
180
+ });
181
+ exports.getDynamicStrokeColorEditor = void 0;
182
+
183
+ var i18n_1 = __webpack_require__(2);
184
+
185
+ var configUtils_1 = __webpack_require__(18);
186
+
187
+ var getDynamicStrokeColorEditor = function getDynamicStrokeColorEditor(_ref) {
188
+ var defaultContext = _ref.defaultContext,
189
+ defaultPalettesConfig = _ref.defaultPalettesConfig;
190
+ return {
191
+ label: i18n_1._('Dynamic Stroke'),
192
+ option: 'strokeColor',
193
+ context: 'strokeColorEditorConfig',
194
+ editor: 'editor.dynamicColor',
195
+ showEditor: function showEditor(_ref2) {
196
+ var options = _ref2.options;
197
+ return configUtils_1.isDynamicOption(options.strokeColor);
198
+ },
199
+ editorProps: {
200
+ labelPosition: 'left',
201
+ flyoutTitle: i18n_1._('Dynamic Coloring: Stroke Color'),
202
+ formatters: [{
203
+ label: i18n_1._('Ranges'),
204
+ value: 'rangeValue',
205
+ defaults: {
206
+ strokeDataValue: defaultContext.strokeColorConfig
207
+ }
208
+ }, {
209
+ label: i18n_1._('Matches'),
210
+ value: 'matchValue',
211
+ defaults: {
212
+ strokeDataValue: defaultContext.strokeColorMatchConfig
213
+ }
214
+ }],
215
+ dataSelectors: [{
216
+ label: i18n_1._('Stroke Color'),
217
+ value: 'strokeDataValue'
218
+ }],
219
+ defaultPalettesConfig: defaultPalettesConfig
220
+ }
221
+ };
222
+ };
223
+
224
+ exports.getDynamicStrokeColorEditor = getDynamicStrokeColorEditor;
225
+
226
+ /***/ }),
227
+
228
+ /***/ 104:
229
+ /***/ (function(module, exports, __webpack_require__) {
230
+
231
+ "use strict";
232
+
233
+
234
+ Object.defineProperty(exports, "__esModule", {
235
+ value: true
236
+ });
237
+
238
+ var i18n_1 = __webpack_require__(2);
239
+
240
+ var configUtils_1 = __webpack_require__(18);
241
+
242
+ var StaticFillColorEditor = {
243
+ label: i18n_1._('Static Fill'),
244
+ option: 'fillColor',
245
+ editor: 'editor.color',
246
+ showEditor: function showEditor(_ref) {
247
+ var options = _ref.options;
248
+ return !configUtils_1.isDynamicOption(options.fillColor);
249
+ }
250
+ };
251
+ exports.default = StaticFillColorEditor;
252
+
253
+ /***/ }),
254
+
255
+ /***/ 105:
256
+ /***/ (function(module, exports, __webpack_require__) {
257
+
258
+ "use strict";
259
+
260
+
261
+ Object.defineProperty(exports, "__esModule", {
262
+ value: true
263
+ });
264
+
265
+ var i18n_1 = __webpack_require__(2);
266
+
267
+ var configUtils_1 = __webpack_require__(18);
268
+
269
+ var StaticStrokeColorEditor = {
270
+ label: i18n_1._('Static Stroke'),
271
+ option: 'strokeColor',
272
+ editor: 'editor.color',
273
+ showEditor: function showEditor(_ref) {
274
+ var options = _ref.options;
275
+ return !configUtils_1.isDynamicOption(options.strokeColor);
276
+ }
277
+ };
278
+ exports.default = StaticStrokeColorEditor;
113
279
 
114
280
  /***/ }),
115
281
 
116
- /***/ 100:
282
+ /***/ 106:
117
283
  /***/ (function(module, exports, __webpack_require__) {
118
284
 
119
285
  "use strict";
@@ -124,15 +290,15 @@ Object.defineProperty(exports, "__esModule", {
124
290
  });
125
291
  exports.getStyledShape = exports.mapToOldKey = void 0;
126
292
 
127
- var lodash_1 = __webpack_require__(2);
293
+ var lodash_1 = __webpack_require__(3);
128
294
 
129
295
  var styled_components_1 = __webpack_require__(4);
130
296
 
131
- var pick_1 = __webpack_require__(20);
297
+ var pick_1 = __webpack_require__(21);
132
298
 
133
- var variables_1 = __webpack_require__(10);
299
+ var variables_1 = __webpack_require__(9);
134
300
 
135
- var propUtils_1 = __webpack_require__(22); // map for new options names to old option names
301
+ var propUtils_1 = __webpack_require__(24); // map for new options names to old option names
136
302
 
137
303
 
138
304
  var shapeOptionsMapping = {
@@ -193,200 +359,81 @@ exports.getStyledShape = getStyledShape;
193
359
  /***/ 11:
194
360
  /***/ (function(module, exports) {
195
361
 
196
- module.exports = require("@splunk/visualizations-shared/Message");
197
-
198
- /***/ }),
199
-
200
- /***/ 12:
201
- /***/ (function(module, exports) {
202
-
203
362
  module.exports = require("@babel/runtime/helpers/classCallCheck");
204
363
 
205
364
  /***/ }),
206
365
 
207
- /***/ 13:
366
+ /***/ 12:
208
367
  /***/ (function(module, exports) {
209
368
 
210
369
  module.exports = require("@splunk/visualizations-shared/colorUtils");
211
370
 
212
371
  /***/ }),
213
372
 
214
- /***/ 136:
373
+ /***/ 13:
215
374
  /***/ (function(module, exports, __webpack_require__) {
216
375
 
217
376
  "use strict";
218
377
 
219
378
 
220
- var __rest = this && this.__rest || function (s, e) {
221
- var t = {};
222
-
223
- for (var p in s) {
224
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
225
- }
226
-
227
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
228
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
229
- }
230
- return t;
231
- };
232
-
233
379
  Object.defineProperty(exports, "__esModule", {
234
380
  value: true
235
381
  });
236
- exports.config = exports.computeVizProps = void 0;
237
382
 
238
383
  var React = __webpack_require__(1);
239
384
 
240
385
  var styled_components_1 = __webpack_require__(4);
241
386
 
242
- var lodash_1 = __webpack_require__(2);
387
+ var SizeAwareWrapper_1 = __webpack_require__(20);
243
388
 
244
- var T = __webpack_require__(0);
245
-
246
- var withDashboardViz_1 = __webpack_require__(30);
247
-
248
- var config_1 = __webpack_require__(244);
389
+ var style_1 = __webpack_require__(15);
249
390
 
250
- exports.config = config_1.default;
391
+ var colorUtils_1 = __webpack_require__(12);
251
392
 
252
- var shapeUtils_1 = __webpack_require__(100);
393
+ var Item = styled_components_1.default.div.attrs(function (_ref) {
394
+ var width = _ref.width;
395
+ return {
396
+ style: {
397
+ width: style_1.toPx(width)
398
+ }
399
+ };
400
+ }).withConfig({
401
+ displayName: "FixedSizeContainer__Item",
402
+ componentId: "sc-1yhgpod-0"
403
+ })(["position:relative;background-color:", "};"], function (props) {
404
+ return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
405
+ }); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
253
406
 
254
- var SVGContainer = styled_components_1.default.svg.withConfig({
255
- displayName: "Rectangle__SVGContainer",
256
- componentId: "iwvil2-0"
257
- })(["width:", "px;height:", "px;"], function (props) {
258
- return props.width;
259
- }, function (props) {
260
- return props.height;
407
+ var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
408
+ var width = _ref2.width,
409
+ height = _ref2.height;
410
+ return {
411
+ style: Object.assign(Object.assign({}, width && {
412
+ width: style_1.toPx(width)
413
+ }), height && {
414
+ height: style_1.toPx(height)
415
+ })
416
+ };
417
+ }).withConfig({
418
+ displayName: "FixedSizeContainer__FixSizeItem",
419
+ componentId: "sc-1yhgpod-1"
420
+ })(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
421
+ return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
261
422
  });
262
- var propTypes = {
263
- width: T.number,
264
- height: T.number,
265
- options: T.object,
266
- mode: T.string,
267
- onRectangleClick: T.func
268
- };
269
- var RectangleShape = shapeUtils_1.getStyledShape('rect');
423
+ var ItemContent = styled_components_1.default.div.withConfig({
424
+ displayName: "FixedSizeContainer__ItemContent",
425
+ componentId: "sc-1yhgpod-2"
426
+ })(["position:relative;min-height:100px;width:100%;"]);
427
+ var FixSizeItemContent = styled_components_1.default.div.withConfig({
428
+ displayName: "FixedSizeContainer__FixSizeItemContent",
429
+ componentId: "sc-1yhgpod-3"
430
+ })(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
270
431
 
271
- var RectangleViz = function RectangleViz(props) {
272
- var width = props.width,
273
- height = props.height,
274
- options = props.options,
275
- onRectangleClick = props.onRectangleClick;
276
- var strokeWidth = options.strokeWidth;
277
- var rx = options.rx,
278
- ry = options.ry; // If either radius value is NaN/undefined, sets value to 0.
279
-
280
- rx = rx || 0;
281
- ry = ry || 0;
282
- return React.createElement(SVGContainer, {
283
- width: width,
284
- height: height
285
- }, React.createElement(RectangleShape, Object.assign({}, options, {
286
- rx: rx,
287
- ry: ry,
288
- x: "".concat(strokeWidth / 2, "px"),
289
- y: "".concat(strokeWidth / 2, "px"),
290
- vectorEffect: "non-scaling-stroke",
291
- width: "".concat(width - strokeWidth, "px"),
292
- height: "".concat(height - strokeWidth, "px"),
293
- onClick: onRectangleClick
294
- })));
295
- };
296
-
297
- var validOptions = Object.keys(config_1.default.optionsSchema);
298
-
299
- var computeVizProps = function computeVizProps(props) {
300
- var dataSources = props.dataSources,
301
- otherOptions = __rest(props, ["dataSources"]);
302
-
303
- var computedProps = {
304
- dataSources: dataSources,
305
- options: null
306
- };
307
- computedProps.options = lodash_1.chain(otherOptions).pick(validOptions).thru(shapeUtils_1.mapToOldKey).value();
308
- return computedProps;
309
- };
310
-
311
- exports.computeVizProps = computeVizProps;
312
- RectangleViz.propTypes = propTypes;
313
- RectangleViz.defaultProps = {
314
- width: 250,
315
- height: 300
316
- };
317
- var Rectangle = withDashboardViz_1.default({
318
- ReactViz: RectangleViz,
319
- computeVizProps: exports.computeVizProps,
320
- vizConfig: config_1.default
321
- });
322
- exports.default = Rectangle;
323
-
324
- /***/ }),
325
-
326
- /***/ 14:
327
- /***/ (function(module, exports, __webpack_require__) {
328
-
329
- "use strict";
330
-
331
-
332
- Object.defineProperty(exports, "__esModule", {
333
- value: true
334
- });
335
-
336
- var React = __webpack_require__(1);
337
-
338
- var styled_components_1 = __webpack_require__(4);
339
-
340
- var SizeAwareWrapper_1 = __webpack_require__(18);
341
-
342
- var style_1 = __webpack_require__(15);
343
-
344
- var colorUtils_1 = __webpack_require__(13);
345
-
346
- var Item = styled_components_1.default.div.attrs(function (_ref) {
347
- var width = _ref.width;
348
- return {
349
- style: {
350
- width: style_1.toPx(width)
351
- }
352
- };
353
- }).withConfig({
354
- displayName: "FixedSizeContainer__Item",
355
- componentId: "sc-1yhgpod-0"
356
- })(["position:relative;background-color:", "};"], function (props) {
357
- return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
358
- }); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
359
-
360
- var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
361
- var width = _ref2.width,
362
- height = _ref2.height;
363
- return {
364
- style: Object.assign(Object.assign({}, width && {
365
- width: style_1.toPx(width)
366
- }), height && {
367
- height: style_1.toPx(height)
368
- })
369
- };
370
- }).withConfig({
371
- displayName: "FixedSizeContainer__FixSizeItem",
372
- componentId: "sc-1yhgpod-1"
373
- })(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
374
- return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
375
- });
376
- var ItemContent = styled_components_1.default.div.withConfig({
377
- displayName: "FixedSizeContainer__ItemContent",
378
- componentId: "sc-1yhgpod-2"
379
- })(["position:relative;min-height:100px;width:100%;"]);
380
- var FixSizeItemContent = styled_components_1.default.div.withConfig({
381
- displayName: "FixedSizeContainer__FixSizeItemContent",
382
- componentId: "sc-1yhgpod-3"
383
- })(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
384
-
385
- var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
386
- var FixedSizeContainer = function FixedSizeContainer(props) {
387
- var width = props.width,
388
- height = props.height,
389
- backgroundColor = props.backgroundColor;
432
+ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
433
+ var FixedSizeContainer = function FixedSizeContainer(props) {
434
+ var width = props.width,
435
+ height = props.height,
436
+ backgroundColor = props.backgroundColor;
390
437
 
391
438
  if (!height) {
392
439
  return React.createElement(Item, {
@@ -398,7 +445,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
398
445
 
399
446
  return React.createElement(FixSizeItem, {
400
447
  "data-test": "fix-size-item",
401
- "data-splunk-visualization-version": "25.0.1 - de10ad954",
448
+ "data-splunk-visualization-version": "25.2.0 - 4373c5a66",
402
449
  width: width,
403
450
  height: height,
404
451
  backgroundColor: backgroundColor
@@ -420,63 +467,7 @@ exports.default = withFixedSizeContainer;
420
467
 
421
468
  /***/ }),
422
469
 
423
- /***/ 15:
424
- /***/ (function(module, exports) {
425
-
426
- module.exports = require("@splunk/visualizations-shared/style");
427
-
428
- /***/ }),
429
-
430
- /***/ 16:
431
- /***/ (function(module, exports) {
432
-
433
- module.exports = require("@splunk/visualizations-shared/schemaUtils");
434
-
435
- /***/ }),
436
-
437
- /***/ 17:
438
- /***/ (function(module, exports) {
439
-
440
- module.exports = require("@babel/runtime/helpers/createClass");
441
-
442
- /***/ }),
443
-
444
- /***/ 18:
445
- /***/ (function(module, exports) {
446
-
447
- module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
448
-
449
- /***/ }),
450
-
451
- /***/ 2:
452
- /***/ (function(module, exports) {
453
-
454
- module.exports = require("lodash");
455
-
456
- /***/ }),
457
-
458
- /***/ 20:
459
- /***/ (function(module, exports) {
460
-
461
- module.exports = require("@splunk/themes/pick");
462
-
463
- /***/ }),
464
-
465
- /***/ 21:
466
- /***/ (function(module, exports) {
467
-
468
- module.exports = require("@splunk/visualization-context/TimezoneContext");
469
-
470
- /***/ }),
471
-
472
- /***/ 22:
473
- /***/ (function(module, exports) {
474
-
475
- module.exports = require("@splunk/visualizations-shared/propUtils");
476
-
477
- /***/ }),
478
-
479
- /***/ 24:
470
+ /***/ 14:
480
471
  /***/ (function(module, exports, __webpack_require__) {
481
472
 
482
473
  "use strict";
@@ -485,431 +476,457 @@ module.exports = require("@splunk/visualizations-shared/propUtils");
485
476
  Object.defineProperty(exports, "__esModule", {
486
477
  value: true
487
478
  });
488
- exports.pickFieldFromJSONSchema = void 0;
489
-
490
- var lodash_1 = __webpack_require__(2);
491
-
492
- var pickFieldFromJSONSchema = function pickFieldFromJSONSchema(optionsSchema) {
493
- var fieldName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
494
- return Object.keys(optionsSchema).reduce(function (accum, k) {
495
- if (lodash_1.has(optionsSchema[k], fieldName)) {
496
- accum[k] = optionsSchema[k][fieldName];
497
- } else if (lodash_1.get(optionsSchema, [k, 'type']) === 'object' && lodash_1.has(optionsSchema[k], 'properties')) {
498
- var nestedSchema = exports.pickFieldFromJSONSchema(optionsSchema[k].properties, fieldName);
479
+ exports.extendStaticWrapperProps = void 0;
480
+ /**
481
+ * @method extendStaticWrapperProps
482
+ * @param {Object} props
483
+ * @param {DashboardVizType} props.Wrapper
484
+ * @param {DashboardVizType} props.Visualization
485
+ */
499
486
 
500
- if (!lodash_1.isEmpty(nestedSchema)) {
501
- accum[k] = nestedSchema;
502
- }
487
+ var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
488
+ var Wrapper = _ref.Wrapper,
489
+ Visualization = _ref.Visualization;
490
+ var extendProperties = ['propTypes', 'defaultProps', 'config'];
491
+ extendProperties.forEach(function (prop) {
492
+ if (Visualization[prop]) {
493
+ // eslint-disable-next-line no-param-reassign
494
+ Wrapper[prop] = Visualization[prop];
503
495
  }
504
-
505
- return accum;
506
- }, {});
496
+ });
507
497
  };
508
498
 
509
- exports.pickFieldFromJSONSchema = pickFieldFromJSONSchema;
499
+ exports.extendStaticWrapperProps = extendStaticWrapperProps;
510
500
 
511
501
  /***/ }),
512
502
 
513
- /***/ 243:
503
+ /***/ 147:
514
504
  /***/ (function(module, exports, __webpack_require__) {
515
505
 
516
506
  "use strict";
517
507
 
518
508
 
519
- var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
520
- if (k2 === undefined) k2 = k;
521
- Object.defineProperty(o, k2, {
522
- enumerable: true,
523
- get: function get() {
524
- return m[k];
525
- }
526
- });
527
- } : function (o, m, k, k2) {
528
- if (k2 === undefined) k2 = k;
529
- o[k2] = m[k];
530
- });
509
+ var __rest = this && this.__rest || function (s, e) {
510
+ var t = {};
531
511
 
532
- var __exportStar = this && this.__exportStar || function (m, exports) {
533
- for (var p in m) {
534
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
512
+ for (var p in s) {
513
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
535
514
  }
536
- };
537
-
538
- Object.defineProperty(exports, "__esModule", {
539
- value: true
540
- });
541
- exports.default = void 0;
542
515
 
543
- __exportStar(__webpack_require__(136), exports);
544
-
545
- var Rectangle_1 = __webpack_require__(136);
546
-
547
- Object.defineProperty(exports, "default", {
548
- enumerable: true,
549
- get: function get() {
550
- return Rectangle_1.default;
516
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
517
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
551
518
  }
552
- });
553
-
554
- /***/ }),
555
-
556
- /***/ 244:
557
- /***/ (function(module, exports, __webpack_require__) {
558
-
559
- "use strict";
560
-
519
+ return t;
520
+ };
561
521
 
562
522
  Object.defineProperty(exports, "__esModule", {
563
523
  value: true
564
524
  });
565
- exports.optionsSchema = void 0;
566
-
567
- var visualization_icons_1 = __webpack_require__(46);
568
-
569
- var schemaUtils_1 = __webpack_require__(16);
525
+ exports.config = exports.computeVizProps = void 0;
570
526
 
571
- var i18n_1 = __webpack_require__(3);
527
+ var React = __webpack_require__(1);
572
528
 
573
- var PresetPalettes_1 = __webpack_require__(53);
529
+ var styled_components_1 = __webpack_require__(4);
574
530
 
575
- var themes_1 = __webpack_require__(69);
531
+ var lodash_1 = __webpack_require__(3);
576
532
 
577
- var VizBehavior_1 = __webpack_require__(5);
533
+ var T = __webpack_require__(0);
578
534
 
579
- var VizCategory_1 = __webpack_require__(29);
535
+ var withDashboardViz_1 = __webpack_require__(32);
580
536
 
581
- var configUtils_1 = __webpack_require__(6);
537
+ var config_1 = __webpack_require__(429);
582
538
 
583
- var DynamicFillColorEditor_1 = __webpack_require__(96);
539
+ exports.config = config_1.default;
584
540
 
585
- var DynamicStrokeColorEditor_1 = __webpack_require__(97);
541
+ var shapeUtils_1 = __webpack_require__(106);
586
542
 
587
- var StaticFillColorEditor_1 = __webpack_require__(98);
543
+ var SVGContainer = styled_components_1.default.svg.withConfig({
544
+ displayName: "Rectangle__SVGContainer",
545
+ componentId: "iwvil2-0"
546
+ })(["width:", "px;height:", "px;"], function (props) {
547
+ return props.width;
548
+ }, function (props) {
549
+ return props.height;
550
+ });
551
+ var propTypes = {
552
+ width: T.number,
553
+ height: T.number,
554
+ options: T.object,
555
+ mode: T.string,
556
+ onRectangleClick: T.func
557
+ };
558
+ var RectangleShape = shapeUtils_1.getStyledShape('rect');
588
559
 
589
- var StaticStrokeColorEditor_1 = __webpack_require__(99);
560
+ var RectangleViz = function RectangleViz(props) {
561
+ var width = props.width,
562
+ height = props.height,
563
+ options = props.options,
564
+ onRectangleClick = props.onRectangleClick;
565
+ var strokeWidth = options.strokeWidth;
566
+ var rx = options.rx,
567
+ ry = options.ry; // If either radius value is NaN/undefined, sets value to 0.
590
568
 
591
- var dataContract = {
592
- requiredDataSources: [],
593
- optionalDataSources: [{
594
- name: 'primary',
595
- description: 'DataSource that powers the visualization'
596
- }],
597
- initialRequestParams: {
598
- primary: {
599
- offset: 0,
600
- count: 10000
601
- }
602
- }
569
+ rx = rx || 0;
570
+ ry = ry || 0;
571
+ return React.createElement(SVGContainer, {
572
+ width: width,
573
+ height: height
574
+ }, React.createElement(RectangleShape, Object.assign({}, options, {
575
+ rx: rx,
576
+ ry: ry,
577
+ x: "".concat(strokeWidth / 2, "px"),
578
+ y: "".concat(strokeWidth / 2, "px"),
579
+ vectorEffect: "non-scaling-stroke",
580
+ width: "".concat(width - strokeWidth, "px"),
581
+ height: "".concat(height - strokeWidth, "px"),
582
+ onClick: onRectangleClick
583
+ })));
603
584
  };
604
- var size = {
605
- initialWidth: 300,
606
- initialHeight: 300
585
+
586
+ var validOptions = Object.keys(config_1.default.optionsSchema);
587
+
588
+ var computeVizProps = function computeVizProps(props) {
589
+ var dataSources = props.dataSources,
590
+ otherOptions = __rest(props, ["dataSources"]);
591
+
592
+ var computedProps = {
593
+ dataSources: dataSources,
594
+ options: null
595
+ };
596
+ computedProps.options = lodash_1.chain(otherOptions).pick(validOptions).thru(shapeUtils_1.mapToOldKey).value();
597
+ return computedProps;
607
598
  };
608
- var defaultContext = {
609
- fillColorConfig: [{
610
- from: 100,
611
- value: '#088F44'
612
- }, {
613
- from: 80,
614
- to: 100,
615
- value: '#2EB82E'
616
- }, {
617
- from: 60,
618
- to: 80,
619
- value: '#C3CC33'
620
- }, {
621
- from: 40,
622
- to: 60,
623
- value: '#FFD442'
624
- }, {
625
- from: 20,
626
- to: 40,
627
- value: '#FFA857'
628
- }, {
629
- from: 0,
630
- to: 20,
631
- value: '#FF7149'
632
- }, {
633
- to: 0,
634
- value: '#FE3A3A'
635
- }],
636
- strokeColorConfig: [{
637
- from: 100,
638
- value: '#088F44'
639
- }, {
640
- from: 80,
641
- to: 100,
642
- value: '#2EB82E'
643
- }, {
644
- from: 60,
645
- to: 80,
646
- value: '#C3CC33'
647
- }, {
648
- from: 40,
649
- to: 60,
650
- value: '#FFD442'
651
- }, {
652
- from: 20,
653
- to: 40,
654
- value: '#FFA857'
655
- }, {
656
- from: 0,
657
- to: 20,
658
- value: '#FF7149'
659
- }, {
660
- to: 0,
661
- value: '#FE3A3A'
662
- }],
663
- fillColorMatchConfig: [{
664
- match: '',
665
- value: '#5C33FF'
666
- }],
667
- strokeColorMatchConfig: [{
668
- match: '',
669
- value: '#5C33FF'
670
- }]
599
+
600
+ exports.computeVizProps = computeVizProps;
601
+ RectangleViz.propTypes = propTypes;
602
+ RectangleViz.defaultProps = {
603
+ width: 250,
604
+ height: 300
671
605
  };
672
- exports.optionsSchema = {
673
- fillColor: {
674
- default: '> themes.defaultFillColor',
675
- description: 'Specify the fill color. You may use a dataSource to apply the color. The hex value format should be "#FFFFFF". The default for enterprise light mode is "#C3CBD4". The default for enterprise dark mode is "#31373E". The default for prisma dark mode is "#0B0C0E".',
676
- type: 'string'
677
- },
678
- fillOpacity: {
679
- description: 'Specify the opacity of the fill. Choose a number in the range of 0 - 1 (inclusive). You can also express the value as a percentage. For example, "0.80" in source or "80%" in UI.',
680
- type: 'number',
681
- default: 1
682
- },
683
- rx: {
684
- description: 'Specify the curvature of the horizontal corner (or border) radius with an integer or a percent greater than or equal to zero.',
685
- type: 'number',
686
- default: 0
687
- },
688
- ry: {
689
- description: 'Specify the curvature of the vertical corner (or border) radius with an integer or a percent greater than or equal to zero.',
690
- type: 'number',
691
- default: '> rx'
692
- },
693
- strokeColor: {
694
- default: '> themes.defaultStrokeColor',
695
- description: 'Specify the stroke color. You may use a dataSource to apply the color. The hex value format should be "#FFFFFF". The default for enterprise light mode is "#3C444D". The default for enterprise dark mode is "#C3CBD4". The default for prisma dark mode is "#ACACAD".',
696
- type: 'string'
697
- },
698
- strokeDashStyle: {
699
- description: 'Specify the size, in pixels, of dashes and spaces used to create a custom stitched outline. The value you specify applies to both the dashes and the spaces between them.',
700
- type: 'number',
701
- default: 0
702
- },
703
- strokeJoinStyle: {
704
- description: 'Specifies the shape to be used at the corners of paths when they are joined.',
705
- type: 'string',
706
- default: 'miter',
707
- pattern: schemaUtils_1.getPattern(['arcs', 'bevel', 'miter', 'miter-clip', 'round'])
708
- },
709
- strokeOpacity: {
710
- description: 'Specify the opacity of the stroke. Choose a number in the range of 0 - 1 (inclusive). You can also express the value as a percentage. For example, "0.80" in source or "80%" in UI.',
711
- type: 'number',
712
- default: 1
713
- },
714
- strokeWidth: {
715
- description: 'Specify the width of the stroke, in pixels, in the range of 1 - 25 (inclusive).',
716
- type: 'number',
717
- default: 1
606
+ var Rectangle = withDashboardViz_1.default({
607
+ ReactViz: RectangleViz,
608
+ computeVizProps: exports.computeVizProps,
609
+ vizConfig: config_1.default
610
+ });
611
+ exports.default = Rectangle;
612
+
613
+ /***/ }),
614
+
615
+ /***/ 15:
616
+ /***/ (function(module, exports) {
617
+
618
+ module.exports = require("@splunk/visualizations-shared/style");
619
+
620
+ /***/ }),
621
+
622
+ /***/ 16:
623
+ /***/ (function(module, exports) {
624
+
625
+ module.exports = require("@splunk/visualizations-shared/schemaUtils");
626
+
627
+ /***/ }),
628
+
629
+ /***/ 17:
630
+ /***/ (function(module, exports, __webpack_require__) {
631
+
632
+ "use strict";
633
+
634
+
635
+ var _toConsumableArray = __webpack_require__(8);
636
+
637
+ var _defineProperty = __webpack_require__(7);
638
+
639
+ var __rest = this && this.__rest || function (s, e) {
640
+ var t = {};
641
+
642
+ for (var p in s) {
643
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
718
644
  }
719
- };
720
- var themes = {
721
- defaultFillColor: function defaultFillColor(props) {
722
- return themes_1.pick({
723
- enterprise: {
724
- dark: themes_1.variables.gray25(props),
725
- light: themes_1.variables.gray80(props)
726
- },
727
- prisma: themes_1.variables.backgroundColorSidebar(props)
728
- })(props);
729
- },
730
- defaultStrokeColor: function defaultStrokeColor(props) {
731
- return themes_1.pick({
732
- enterprise: {
733
- dark: themes_1.variables.gray80(props),
734
- light: themes_1.variables.gray30(props)
735
- },
736
- prisma: themes_1.variables.neutral500(props)
737
- })(props);
645
+
646
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
647
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
738
648
  }
649
+ return t;
739
650
  };
740
- var basePresetContext = {
741
- fillColorEditorConfig: undefined,
742
- strokeColorEditorConfig: undefined
743
- };
744
- var basePresetOptions = {
745
- fillColor: undefined,
746
- strokeColor: undefined
651
+
652
+ Object.defineProperty(exports, "__esModule", {
653
+ value: true
654
+ });
655
+ exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
656
+
657
+ var lodash_1 = __webpack_require__(3);
658
+
659
+ var schemaUtils_1 = __webpack_require__(16);
660
+
661
+ var VizBehavior_1 = __webpack_require__(6);
662
+
663
+ var dynamicOptionsDSLType = {
664
+ type: 'string',
665
+ pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
747
666
  };
748
- var presets = [{
749
- // dummy context variables to allow for resetting of unused context states
750
- label: i18n_1._('None'),
751
- name: 'rectangle.none',
752
- value: {
753
- context: Object.assign({}, basePresetContext),
754
- options: Object.assign({}, basePresetOptions)
755
- }
756
- }, {
757
- label: i18n_1._('Fill'),
758
- name: 'rectangle.fill',
759
- value: {
760
- context: Object.assign(Object.assign({}, basePresetContext), {
761
- fillDataValue: '> primary | seriesByType("number") | lastPoint()',
762
- fillColorEditorConfig: defaultContext.fillColorConfig
763
- }),
764
- options: Object.assign(Object.assign({}, basePresetOptions), {
765
- fillColor: '> fillDataValue | rangeValue(fillColorEditorConfig)'
766
- })
767
- }
768
- }, {
769
- label: i18n_1._('Stroke'),
770
- name: 'rectangle.stroke',
771
- value: {
772
- context: Object.assign(Object.assign({}, basePresetContext), {
773
- strokeDataValue: '> primary | seriesByType("number") | lastPoint()',
774
- strokeColorEditorConfig: defaultContext.strokeColorConfig
775
- }),
776
- options: Object.assign(Object.assign({}, basePresetOptions), {
777
- strokeColor: '> strokeDataValue | rangeValue(strokeColorEditorConfig)'
778
- })
779
- }
780
- }, {
781
- label: i18n_1._('Fill & Stroke'),
782
- name: 'rectangle.fillAndStroke',
783
- value: {
784
- context: Object.assign(Object.assign({}, basePresetContext), {
785
- fillDataValue: '> primary | seriesByType("number") | lastPoint()',
786
- strokeDataValue: '> primary | seriesByType("number") | lastPoint()',
787
- fillColorEditorConfig: defaultContext.fillColorConfig,
788
- strokeColorEditorConfig: defaultContext.strokeColorConfig
789
- }),
790
- options: Object.assign(Object.assign({}, basePresetOptions), {
791
- fillColor: '> fillDataValue | rangeValue(fillColorEditorConfig)',
792
- strokeColor: '> strokeDataValue | rangeValue(strokeColorEditorConfig)'
793
- })
794
- }
795
- }];
796
- var editorConfig = [{
797
- label: i18n_1._('General'),
798
- layout: [[{
799
- label: i18n_1._('Fill Opacity (%)'),
800
- option: 'fillOpacity',
801
- editor: 'editor.percent',
802
- editorProps: {
803
- min: 0
804
- }
805
- }, {
806
- label: i18n_1._('Stroke Opacity (%)'),
807
- option: 'strokeOpacity',
808
- editor: 'editor.percent',
809
- editorProps: {
810
- min: 0
811
- }
812
- }], [{
813
- label: i18n_1._('Stroke Width'),
814
- option: 'strokeWidth',
815
- editor: 'editor.number',
816
- editorProps: {
817
- min: 0
818
- }
819
- }, {
820
- label: i18n_1._('Stroke Dash Style'),
821
- option: 'strokeDashStyle',
822
- editor: 'editor.number',
823
- editorProps: {
824
- min: 0
825
- }
826
- }], [{
827
- label: i18n_1._('Radius (px)'),
828
- option: 'rx',
829
- editor: 'editor.number',
830
- editorProps: {
831
- min: 0
832
- }
833
- }, {}]]
834
- }, {
835
- label: i18n_1._('Coloring'),
836
- layout: [[{
837
- label: 'Dynamic Elements',
838
- key: 'presetSelector',
839
- editor: 'editor.presetSelector',
840
- editorProps: {
841
- presets: presets,
842
- value: function value(_ref) {
843
- var context = _ref.context,
844
- options = _ref.options;
845
- var initialPreset = configUtils_1.getInitialPreset(context, options, presets);
846
- return initialPreset && initialPreset.label || null;
667
+ /**
668
+ * Helper function to extend an options schema with dynamic options DSL
669
+ * @param optionsSchema a visualization's options schema
670
+ * @returns an updated options schema that additionally allows strings starting with > for each option
671
+ */
672
+
673
+ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
674
+ var enhancedOptionsSchema = {};
675
+ Object.keys(optionsSchema).forEach(function (key) {
676
+ var _a = optionsSchema[key],
677
+ title = _a.title,
678
+ description = _a.description,
679
+ readOnly = _a.readOnly,
680
+ writeOnly = _a.writeOnly,
681
+ examples = _a.examples,
682
+ defaultValue = _a.default,
683
+ type = _a.type,
684
+ properties = _a.properties,
685
+ patternProperties = _a.patternProperties,
686
+ remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
687
+
688
+ var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
689
+ title: title
690
+ }), description !== undefined && {
691
+ description: description
692
+ }), readOnly !== undefined && {
693
+ readOnly: readOnly
694
+ }), writeOnly !== undefined && {
695
+ writeOnly: writeOnly
696
+ }), examples !== undefined && {
697
+ examples: examples
698
+ }), defaultValue !== undefined && {
699
+ default: defaultValue
700
+ });
701
+
702
+ if (type === 'object') {
703
+ enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
704
+ type: type
705
+ }), properties && {
706
+ properties: enhanceOptionsSchemaWithDynamicOptions(properties)
707
+ });
708
+
709
+ if (patternProperties) {
710
+ var enhancedPatternProperties = {};
711
+ Object.keys(patternProperties).forEach(function (opt) {
712
+ enhancedPatternProperties = Object.assign(Object.assign({}, enhancedPatternProperties), enhanceOptionsSchemaWithDynamicOptions(_defineProperty({}, opt, patternProperties[opt])));
713
+ });
714
+ enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;
847
715
  }
716
+ } else {
717
+ enhancedOptionsSchema[key] = Object.assign(Object.assign({}, annotations), {
718
+ anyOf: [Object.assign(Object.assign({}, type !== undefined && {
719
+ type: type
720
+ }), remainingSchemaEntry), dynamicOptionsDSLType]
721
+ });
848
722
  }
849
- }], [Object.assign(Object.assign({}, StaticFillColorEditor_1.default), {
850
- editorProps: {
851
- labelPosition: 'left',
852
- themes: themes
853
- }
854
- })], [DynamicFillColorEditor_1.getDynamicFillColorEditor({
855
- defaultContext: defaultContext,
856
- defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
857
- })], [Object.assign(Object.assign({}, StaticStrokeColorEditor_1.default), {
858
- editorProps: {
859
- labelPosition: 'left',
860
- themes: themes
861
- }
862
- })], [DynamicStrokeColorEditor_1.getDynamicStrokeColorEditor({
863
- defaultContext: defaultContext,
864
- defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
865
- })]]
866
- }];
723
+ });
724
+ return enhancedOptionsSchema;
725
+ }
726
+
727
+ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
867
728
  /**
868
- * visualization configuration
729
+ * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
730
+ * this function also collapse all editor panels
731
+ * @param vizConfig a Visualization Config
732
+ * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
733
+ * and containing `open: false` for all editor panels in editorConfig
869
734
  */
870
735
 
871
- var config = {
872
- /**
873
- * unique viz key
874
- */
875
- key: 'splunk.rectangle',
736
+ function enhanceConfig(vizConfig) {
737
+ var enhancedConfig = vizConfig;
738
+
739
+ if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
740
+ enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
741
+ }
742
+
743
+ enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
744
+ return Object.assign(Object.assign({}, config), {
745
+ open: false
746
+ });
747
+ });
748
+ return enhancedConfig;
749
+ }
750
+
751
+ exports.enhanceConfig = enhanceConfig;
752
+ /**
753
+ * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
754
+ * Created for editor unit tests
755
+ * @param vizConfig a Visualization Config
756
+ * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
757
+ */
758
+
759
+ function uncollapseEditorConfig(vizConfig) {
760
+ var editorPanelUncollapsedConfig = vizConfig;
761
+ editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
762
+ return Object.assign(Object.assign({}, config), {
763
+ open: true
764
+ });
765
+ });
766
+ return editorPanelUncollapsedConfig;
767
+ }
768
+
769
+ exports.uncollapseEditorConfig = uncollapseEditorConfig;
770
+
771
+ function isDynamicOption(option) {
772
+ return option && typeof option === 'string' && option.trim().startsWith('>') || false;
773
+ }
774
+
775
+ exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
776
+ // this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
777
+
778
+ /**
779
+ * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
780
+ * 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
781
+ * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
782
+ * 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
783
+ *
784
+ * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
785
+ */
786
+
787
+ function hasCompatibleContexts(vizContext, presetContext) {
788
+ var presetContextKeys = Object.keys(presetContext);
789
+ return presetContextKeys.every(function (contextKey) {
790
+ return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
791
+ });
792
+ }
793
+ /**
794
+ * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
795
+ */
796
+
797
+
798
+ function hasCompatibleOptions(vizOptions, presetOptions) {
799
+ var presetOptionKeys = Object.keys(presetOptions);
800
+ return presetOptionKeys.every(function (optionKey) {
801
+ return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
802
+ });
803
+ }
804
+ /**
805
+ * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
806
+ * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
807
+ *
808
+ * @param {Object} vizContext - the current vizContext definition
809
+ * @param {Object} vizOptions - the current vizOptions definition
810
+ * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
811
+ */
812
+
813
+
814
+ function getInitialPreset(vizContext, vizOptions, presets) {
815
+ return presets.find(function (preset) {
816
+ var presetContext = lodash_1.get(preset, ['value', 'context'], {});
817
+ var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
818
+ var presetContextKeys = Object.keys(presetContext);
819
+ var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
820
+ // if not, then the preset is invalid in config.ts
821
+
822
+ if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
823
+ return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
824
+ });
825
+ }
826
+
827
+ exports.getInitialPreset = getInitialPreset;
828
+ /**
829
+ * generates number precision values for a Select editor
830
+ *
831
+ * @param {Number} numPrecisionValues - number of integer precision values to generate
832
+ * @returns {{ label: string; value; string }[]} array of { label, value } tuples
833
+ */
834
+
835
+ function generatePrecisionValues(numPrecisionValues) {
836
+ return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
837
+ return {
838
+ label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
839
+ value: i
840
+ };
841
+ });
842
+ }
876
843
 
877
- /**
878
- * viz name
879
- */
880
- name: 'Rectangle',
881
- category: VizCategory_1.VizCategory.SHAPES,
844
+ exports.generatePrecisionValues = generatePrecisionValues;
845
+ /**
846
+ * insert layout in layout array, return a new layout array instead of updating the original
847
+ *
848
+ * @param {EditorLayoutConfig[][]} layout - editor layout
849
+ * @param {Number} index - the index to insert layout item(s)
850
+ * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
851
+ * @returns {EditorLayoutConfig[][]} new editor layout with insertion
852
+ */
882
853
 
883
- /**
884
- * viz icon
885
- */
886
- icon: visualization_icons_1.Rectangle,
887
- dataContract: dataContract,
888
- size: size,
889
- defaultContext: defaultContext,
890
- optionsSchema: exports.optionsSchema,
891
- editorConfig: editorConfig,
892
- supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS],
893
- themes: themes,
894
- events: {
895
- 'rectangle.click': {
896
- description: 'trigger when user clicks rectangle',
897
- payloadKeys: ['strokeColor', 'fillColor']
898
- }
854
+ var insertLayout = function insertLayout(layout, index) {
855
+ for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
856
+ layoutItems[_key - 2] = arguments[_key];
899
857
  }
858
+
859
+ return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
900
860
  };
901
- exports.default = configUtils_1.enhanceConfig(config);
861
+
862
+ exports.insertLayout = insertLayout;
863
+
864
+ /***/ }),
865
+
866
+ /***/ 18:
867
+ /***/ (function(module, exports) {
868
+
869
+ module.exports = require("@splunk/visualizations-shared/configUtils");
870
+
871
+ /***/ }),
872
+
873
+ /***/ 19:
874
+ /***/ (function(module, exports) {
875
+
876
+ module.exports = require("@babel/runtime/helpers/createClass");
877
+
878
+ /***/ }),
879
+
880
+ /***/ 2:
881
+ /***/ (function(module, exports) {
882
+
883
+ module.exports = require("@splunk/ui-utils/i18n");
884
+
885
+ /***/ }),
886
+
887
+ /***/ 20:
888
+ /***/ (function(module, exports) {
889
+
890
+ module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
891
+
892
+ /***/ }),
893
+
894
+ /***/ 21:
895
+ /***/ (function(module, exports) {
896
+
897
+ module.exports = require("@splunk/themes/pick");
898
+
899
+ /***/ }),
900
+
901
+ /***/ 23:
902
+ /***/ (function(module, exports) {
903
+
904
+ module.exports = require("@splunk/visualization-context/TimezoneContext");
905
+
906
+ /***/ }),
907
+
908
+ /***/ 24:
909
+ /***/ (function(module, exports) {
910
+
911
+ module.exports = require("@splunk/visualizations-shared/propUtils");
902
912
 
903
913
  /***/ }),
904
914
 
905
915
  /***/ 25:
906
916
  /***/ (function(module, exports) {
907
917
 
908
- module.exports = require("@babel/runtime/helpers/typeof");
918
+ module.exports = require("@splunk/visualizations-shared/hocUtils");
909
919
 
910
920
  /***/ }),
911
921
 
912
922
  /***/ 26:
923
+ /***/ (function(module, exports) {
924
+
925
+ module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
926
+
927
+ /***/ }),
928
+
929
+ /***/ 27:
913
930
  /***/ (function(module, exports, __webpack_require__) {
914
931
 
915
932
  "use strict";
@@ -924,13 +941,13 @@ var React = __webpack_require__(1);
924
941
 
925
942
  var T = __webpack_require__(0);
926
943
 
927
- var lodash_1 = __webpack_require__(2);
944
+ var lodash_1 = __webpack_require__(3);
928
945
 
929
- var i18n_1 = __webpack_require__(3);
946
+ var i18n_1 = __webpack_require__(2);
930
947
 
931
- var Message_1 = __webpack_require__(11);
948
+ var Message_1 = __webpack_require__(10);
932
949
 
933
- var FixedSizeContainer_1 = __webpack_require__(14);
950
+ var FixedSizeContainer_1 = __webpack_require__(13);
934
951
  /**
935
952
  * @method shouldShowIconPlaceholder
936
953
  * @param {object} dataSources
@@ -1001,7 +1018,7 @@ exports.default = FixedSizeContainer_1.default(IconPlaceholder);
1001
1018
 
1002
1019
  /***/ }),
1003
1020
 
1004
- /***/ 27:
1021
+ /***/ 28:
1005
1022
  /***/ (function(module, exports, __webpack_require__) {
1006
1023
 
1007
1024
  "use strict";
@@ -1016,9 +1033,9 @@ exports.getSortingParams = exports.SortParamsPropTypes = void 0;
1016
1033
 
1017
1034
  var T = __webpack_require__(0);
1018
1035
 
1019
- var lodash_1 = __webpack_require__(2);
1036
+ var lodash_1 = __webpack_require__(3);
1020
1037
 
1021
- var DataSource_1 = __webpack_require__(37);
1038
+ var DataSource_1 = __webpack_require__(39);
1022
1039
 
1023
1040
  exports.SortParamsPropTypes = T.shape({
1024
1041
  currentSortKey: T.string,
@@ -1072,7 +1089,7 @@ exports.getSortingParams = getSortingParams;
1072
1089
 
1073
1090
  /***/ }),
1074
1091
 
1075
- /***/ 28:
1092
+ /***/ 29:
1076
1093
  /***/ (function(module, exports, __webpack_require__) {
1077
1094
 
1078
1095
  "use strict";
@@ -1085,7 +1102,7 @@ exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
1085
1102
 
1086
1103
  var T = __webpack_require__(0);
1087
1104
 
1088
- var lodash_1 = __webpack_require__(2);
1105
+ var lodash_1 = __webpack_require__(3);
1089
1106
 
1090
1107
  exports.PaginatorParamsPropTypes = T.shape({
1091
1108
  isPaging: T.bool,
@@ -1137,7 +1154,14 @@ exports.getPaginationParams = getPaginationParams;
1137
1154
 
1138
1155
  /***/ }),
1139
1156
 
1140
- /***/ 29:
1157
+ /***/ 3:
1158
+ /***/ (function(module, exports) {
1159
+
1160
+ module.exports = require("lodash");
1161
+
1162
+ /***/ }),
1163
+
1164
+ /***/ 31:
1141
1165
  /***/ (function(module, exports, __webpack_require__) {
1142
1166
 
1143
1167
  "use strict";
@@ -1166,14 +1190,7 @@ var VizCategory;
1166
1190
 
1167
1191
  /***/ }),
1168
1192
 
1169
- /***/ 3:
1170
- /***/ (function(module, exports) {
1171
-
1172
- module.exports = require("@splunk/ui-utils/i18n");
1173
-
1174
- /***/ }),
1175
-
1176
- /***/ 30:
1193
+ /***/ 32:
1177
1194
  /***/ (function(module, exports, __webpack_require__) {
1178
1195
 
1179
1196
  "use strict";
@@ -1185,39 +1202,39 @@ Object.defineProperty(exports, "__esModule", {
1185
1202
 
1186
1203
  var React = __webpack_require__(1);
1187
1204
 
1188
- var lodash_1 = __webpack_require__(2);
1205
+ var lodash_1 = __webpack_require__(3);
1189
1206
 
1190
- var getSettingsFromThemedProps_1 = __webpack_require__(31);
1207
+ var getSettingsFromThemedProps_1 = __webpack_require__(33);
1191
1208
 
1192
- var Options_1 = __webpack_require__(32);
1209
+ var Options_1 = __webpack_require__(34);
1193
1210
 
1194
- var SanitizeProps_1 = __webpack_require__(33);
1211
+ var SanitizeProps_1 = __webpack_require__(35);
1195
1212
 
1196
- var TimezoneContext_1 = __webpack_require__(21);
1213
+ var TimezoneContext_1 = __webpack_require__(23);
1197
1214
 
1198
- var moment_1 = __webpack_require__(34);
1215
+ var moment_1 = __webpack_require__(36);
1199
1216
 
1200
1217
  var styled_components_1 = __webpack_require__(4);
1201
1218
 
1202
- var SplunkVisualization_1 = __webpack_require__(35);
1219
+ var hocUtils_1 = __webpack_require__(25);
1203
1220
 
1204
- var VizBehavior_1 = __webpack_require__(5);
1221
+ var JSONSchemaUtils_1 = __webpack_require__(26);
1205
1222
 
1206
- var getSorting_1 = __webpack_require__(27);
1223
+ var SplunkVisualization_1 = __webpack_require__(37);
1207
1224
 
1208
- var getPagination_1 = __webpack_require__(28);
1225
+ var VizBehavior_1 = __webpack_require__(6);
1209
1226
 
1210
- var useDeepMemo_1 = __webpack_require__(38);
1227
+ var getSorting_1 = __webpack_require__(28);
1211
1228
 
1212
- var JSONSchemaUtils_1 = __webpack_require__(24);
1229
+ var getPagination_1 = __webpack_require__(29);
1213
1230
 
1214
- var MissingPropsMessage_1 = __webpack_require__(39);
1231
+ var useDeepMemo_1 = __webpack_require__(40);
1215
1232
 
1216
- var withEditModeCover_1 = __webpack_require__(40);
1233
+ var MissingPropsMessage_1 = __webpack_require__(41);
1217
1234
 
1218
- var withPlaceholder_1 = __webpack_require__(42);
1235
+ var withEditModeCover_1 = __webpack_require__(42);
1219
1236
 
1220
- var hocUtils_1 = __webpack_require__(8);
1237
+ var withPlaceholder_1 = __webpack_require__(43);
1221
1238
  /**
1222
1239
  * hoc that wraps a pure react visualization in a Dashboard visualization
1223
1240
  * @param {DashboardVizOpts} opts
@@ -1419,41 +1436,41 @@ exports.default = withDashboardViz;
1419
1436
 
1420
1437
  /***/ }),
1421
1438
 
1422
- /***/ 31:
1439
+ /***/ 33:
1423
1440
  /***/ (function(module, exports) {
1424
1441
 
1425
1442
  module.exports = require("@splunk/themes/getSettingsFromThemedProps");
1426
1443
 
1427
1444
  /***/ }),
1428
1445
 
1429
- /***/ 32:
1446
+ /***/ 34:
1430
1447
  /***/ (function(module, exports) {
1431
1448
 
1432
1449
  module.exports = require("@splunk/visualization-encoding/Options");
1433
1450
 
1434
1451
  /***/ }),
1435
1452
 
1436
- /***/ 33:
1453
+ /***/ 35:
1437
1454
  /***/ (function(module, exports) {
1438
1455
 
1439
1456
  module.exports = require("@splunk/visualizations-shared/SanitizeProps");
1440
1457
 
1441
1458
  /***/ }),
1442
1459
 
1443
- /***/ 34:
1460
+ /***/ 36:
1444
1461
  /***/ (function(module, exports) {
1445
1462
 
1446
1463
  module.exports = require("@splunk/moment");
1447
1464
 
1448
1465
  /***/ }),
1449
1466
 
1450
- /***/ 35:
1467
+ /***/ 37:
1451
1468
  /***/ (function(module, exports, __webpack_require__) {
1452
1469
 
1453
1470
  "use strict";
1454
1471
 
1455
1472
 
1456
- var _classCallCheck = __webpack_require__(12);
1473
+ var _classCallCheck = __webpack_require__(11);
1457
1474
 
1458
1475
  Object.defineProperty(exports, "__esModule", {
1459
1476
  value: true
@@ -1463,9 +1480,9 @@ exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
1463
1480
 
1464
1481
  var T = __webpack_require__(0);
1465
1482
 
1466
- var lodash_1 = __webpack_require__(2);
1483
+ var lodash_1 = __webpack_require__(3);
1467
1484
 
1468
- var VizActionHandler_1 = __webpack_require__(36); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
1485
+ var VizActionHandler_1 = __webpack_require__(38); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
1469
1486
 
1470
1487
 
1471
1488
  exports.INITIAL_WIDTH = 250;
@@ -1599,15 +1616,15 @@ exports.default = SplunkVisualization;
1599
1616
 
1600
1617
  /***/ }),
1601
1618
 
1602
- /***/ 36:
1619
+ /***/ 38:
1603
1620
  /***/ (function(module, exports, __webpack_require__) {
1604
1621
 
1605
1622
  "use strict";
1606
1623
 
1607
1624
 
1608
- var _classCallCheck = __webpack_require__(12);
1625
+ var _classCallCheck = __webpack_require__(11);
1609
1626
 
1610
- var _createClass = __webpack_require__(17);
1627
+ var _createClass = __webpack_require__(19);
1611
1628
 
1612
1629
  Object.defineProperty(exports, "__esModule", {
1613
1630
  value: true
@@ -1637,7 +1654,7 @@ exports.DefaultVizActionHandler = DefaultVizActionHandler;
1637
1654
 
1638
1655
  /***/ }),
1639
1656
 
1640
- /***/ 37:
1657
+ /***/ 39:
1641
1658
  /***/ (function(module, exports, __webpack_require__) {
1642
1659
 
1643
1660
  "use strict";
@@ -1651,7 +1668,14 @@ exports.validSortDirs = ['asc', 'desc', 'none'];
1651
1668
 
1652
1669
  /***/ }),
1653
1670
 
1654
- /***/ 38:
1671
+ /***/ 4:
1672
+ /***/ (function(module, exports) {
1673
+
1674
+ module.exports = require("styled-components");
1675
+
1676
+ /***/ }),
1677
+
1678
+ /***/ 40:
1655
1679
  /***/ (function(module, exports, __webpack_require__) {
1656
1680
 
1657
1681
  "use strict";
@@ -1664,7 +1688,7 @@ exports.useDeepMemo = void 0;
1664
1688
 
1665
1689
  var react_1 = __webpack_require__(1);
1666
1690
 
1667
- var lodash_1 = __webpack_require__(2);
1691
+ var lodash_1 = __webpack_require__(3);
1668
1692
  /**
1669
1693
  * This hook evaluates and stores the result of a passed function and only
1670
1694
  * re-evaluates the function when passed dependencies change.
@@ -1697,7 +1721,7 @@ exports.useDeepMemo = useDeepMemo;
1697
1721
 
1698
1722
  /***/ }),
1699
1723
 
1700
- /***/ 39:
1724
+ /***/ 41:
1701
1725
  /***/ (function(module, exports, __webpack_require__) {
1702
1726
 
1703
1727
  "use strict";
@@ -1712,11 +1736,11 @@ var React = __webpack_require__(1);
1712
1736
 
1713
1737
  var T = __webpack_require__(0);
1714
1738
 
1715
- var i18n_1 = __webpack_require__(3);
1739
+ var i18n_1 = __webpack_require__(2);
1716
1740
 
1717
- var Message_1 = __webpack_require__(11);
1741
+ var Message_1 = __webpack_require__(10);
1718
1742
 
1719
- var FixedSizeContainer_1 = __webpack_require__(14);
1743
+ var FixedSizeContainer_1 = __webpack_require__(13);
1720
1744
  /**
1721
1745
  * @method isMissing
1722
1746
  * @param {any} v
@@ -1778,14 +1802,7 @@ exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
1778
1802
 
1779
1803
  /***/ }),
1780
1804
 
1781
- /***/ 4:
1782
- /***/ (function(module, exports) {
1783
-
1784
- module.exports = require("styled-components");
1785
-
1786
- /***/ }),
1787
-
1788
- /***/ 40:
1805
+ /***/ 42:
1789
1806
  /***/ (function(module, exports, __webpack_require__) {
1790
1807
 
1791
1808
  "use strict";
@@ -1799,14 +1816,14 @@ var React = __webpack_require__(1);
1799
1816
 
1800
1817
  var styled_components_1 = __webpack_require__(4);
1801
1818
 
1802
- var hocUtils_1 = __webpack_require__(8);
1819
+ var hocUtils_1 = __webpack_require__(14);
1803
1820
 
1804
1821
  var Cover = styled_components_1.default.div.withConfig({
1805
1822
  displayName: "withEditModeCover__Cover",
1806
1823
  componentId: "sc-1gsbnxb-0"
1807
1824
  })(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
1808
1825
  var Blocker = styled_components_1.default.div.attrs({
1809
- 'data-splunk-visualization-version': "25.0.1 - de10ad954"
1826
+ 'data-splunk-visualization-version': "25.2.0 - 4373c5a66"
1810
1827
  }).withConfig({
1811
1828
  displayName: "withEditModeCover__Blocker",
1812
1829
  componentId: "sc-1gsbnxb-1"
@@ -1838,532 +1855,478 @@ exports.default = withEditModeCover;
1838
1855
 
1839
1856
  /***/ }),
1840
1857
 
1841
- /***/ 41:
1842
- /***/ (function(module, exports) {
1843
-
1844
- module.exports = require("@splunk/visualizations-shared/mapUtils");
1845
-
1846
- /***/ }),
1847
-
1848
- /***/ 42:
1858
+ /***/ 428:
1849
1859
  /***/ (function(module, exports, __webpack_require__) {
1850
1860
 
1851
1861
  "use strict";
1852
1862
 
1853
1863
 
1854
- Object.defineProperty(exports, "__esModule", {
1855
- value: true
1856
- });
1857
-
1858
- var React = __webpack_require__(1);
1859
-
1860
- var colorUtils_1 = __webpack_require__(13);
1861
-
1862
- var variables_1 = __webpack_require__(10);
1863
-
1864
- var IconPlaceholder_1 = __webpack_require__(26);
1865
-
1866
- var VizBehavior_1 = __webpack_require__(5);
1867
-
1868
- var hocUtils_1 = __webpack_require__(8);
1869
-
1870
- var withPlaceholder = function withPlaceholder(Visualization) {
1871
- var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
1872
- var config = Visualization.config;
1873
- var themes = config.themes;
1874
-
1875
- var Wrapper = function Wrapper(props) {
1876
- var _a, _b;
1877
-
1878
- var dataSources = props.dataSources,
1879
- loading = props.loading,
1880
- options = props.options,
1881
- height = props.height,
1882
- width = props.width;
1883
- var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
1884
- 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);
1885
- var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
1886
- var iconColor = variables_1.default.contentColorActive(props);
1887
-
1888
- if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
1889
- return React.createElement(IconPlaceholder_1.default, {
1890
- "data-test": "icon-placeholder",
1891
- icon: icon,
1892
- width: width,
1893
- height: height,
1894
- backgroundColor: bgColorFromTheme,
1895
- iconColor: iconColor
1896
- });
1864
+ var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
1865
+ if (k2 === undefined) k2 = k;
1866
+ Object.defineProperty(o, k2, {
1867
+ enumerable: true,
1868
+ get: function get() {
1869
+ return m[k];
1897
1870
  }
1898
-
1899
- return React.createElement(Visualization, Object.assign({}, props));
1900
- };
1901
-
1902
- hocUtils_1.extendStaticWrapperProps({
1903
- Wrapper: Wrapper,
1904
- Visualization: Visualization
1905
1871
  });
1906
- return Wrapper;
1907
- };
1908
-
1909
- exports.default = withPlaceholder;
1910
-
1911
- /***/ }),
1912
-
1913
- /***/ 46:
1914
- /***/ (function(module, exports) {
1915
-
1916
- module.exports = require("@splunk/visualization-icons");
1917
-
1918
- /***/ }),
1919
-
1920
- /***/ 5:
1921
- /***/ (function(module, exports, __webpack_require__) {
1922
-
1923
- "use strict";
1872
+ } : function (o, m, k, k2) {
1873
+ if (k2 === undefined) k2 = k;
1874
+ o[k2] = m[k];
1875
+ });
1924
1876
 
1877
+ var __exportStar = this && this.__exportStar || function (m, exports) {
1878
+ for (var p in m) {
1879
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1880
+ }
1881
+ };
1925
1882
 
1926
1883
  Object.defineProperty(exports, "__esModule", {
1927
1884
  value: true
1928
1885
  });
1929
- exports.VizBehavior = void 0;
1930
- var VizBehavior;
1931
-
1932
- (function (VizBehavior) {
1933
- /**
1934
- * Dynamic Options Behavior.
1935
- * This allows visualization options to be powered by data
1936
- *
1937
- * **Example**
1938
- *
1939
- * sparklineValues: ">primary|seriesByIndex(0)"
1940
- * would configure sparklineValues with an array of data points
1941
- * coming from the first series in the primary datasource
1942
- *
1943
- */
1944
- VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
1945
- VizBehavior["EVENTS"] = "events";
1946
- /**
1947
- * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
1948
- * missing.
1949
- * @type {string}
1950
- */
1951
-
1952
- VizBehavior["PLACEHOLDER"] = "placeholder";
1953
- VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
1954
- })(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
1886
+ exports.default = void 0;
1955
1887
 
1956
- /***/ }),
1888
+ __exportStar(__webpack_require__(147), exports);
1957
1889
 
1958
- /***/ 53:
1959
- /***/ (function(module, exports) {
1890
+ var Rectangle_1 = __webpack_require__(147);
1960
1891
 
1961
- module.exports = require("@splunk/visualization-color-palettes/editors/PresetPalettes");
1892
+ Object.defineProperty(exports, "default", {
1893
+ enumerable: true,
1894
+ get: function get() {
1895
+ return Rectangle_1.default;
1896
+ }
1897
+ });
1962
1898
 
1963
1899
  /***/ }),
1964
1900
 
1965
- /***/ 6:
1901
+ /***/ 429:
1966
1902
  /***/ (function(module, exports, __webpack_require__) {
1967
1903
 
1968
1904
  "use strict";
1969
1905
 
1970
1906
 
1971
- var _toConsumableArray = __webpack_require__(9);
1907
+ Object.defineProperty(exports, "__esModule", {
1908
+ value: true
1909
+ });
1910
+ exports.optionsSchema = void 0;
1972
1911
 
1973
- var _defineProperty = __webpack_require__(7);
1912
+ var visualization_icons_1 = __webpack_require__(47);
1974
1913
 
1975
- var __rest = this && this.__rest || function (s, e) {
1976
- var t = {};
1914
+ var schemaUtils_1 = __webpack_require__(16);
1977
1915
 
1978
- for (var p in s) {
1979
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
1980
- }
1916
+ var i18n_1 = __webpack_require__(2);
1981
1917
 
1982
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1983
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
1984
- }
1985
- return t;
1986
- };
1918
+ var PresetPalettes_1 = __webpack_require__(54);
1987
1919
 
1988
- Object.defineProperty(exports, "__esModule", {
1989
- value: true
1990
- });
1991
- exports.insertLayout = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.isDynamicOption = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
1920
+ var themes_1 = __webpack_require__(69);
1992
1921
 
1993
- var lodash_1 = __webpack_require__(2);
1922
+ var VizBehavior_1 = __webpack_require__(6);
1994
1923
 
1995
- var schemaUtils_1 = __webpack_require__(16);
1924
+ var VizCategory_1 = __webpack_require__(31);
1996
1925
 
1997
- var VizBehavior_1 = __webpack_require__(5);
1926
+ var configUtils_1 = __webpack_require__(17);
1998
1927
 
1999
- var dynamicOptionsDSLType = {
2000
- type: 'string',
2001
- pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
2002
- };
2003
- /**
2004
- * Helper function to extend an options schema with dynamic options DSL
2005
- * @param optionsSchema a visualization's options schema
2006
- * @returns an updated options schema that additionally allows strings starting with > for each option
2007
- */
1928
+ var DynamicFillColorEditor_1 = __webpack_require__(102);
2008
1929
 
2009
- function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
2010
- var enhancedOptionsSchema = {};
2011
- Object.keys(optionsSchema).forEach(function (key) {
2012
- var _a = optionsSchema[key],
2013
- title = _a.title,
2014
- description = _a.description,
2015
- readOnly = _a.readOnly,
2016
- writeOnly = _a.writeOnly,
2017
- examples = _a.examples,
2018
- defaultValue = _a.default,
2019
- type = _a.type,
2020
- properties = _a.properties,
2021
- patternProperties = _a.patternProperties,
2022
- remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
1930
+ var DynamicStrokeColorEditor_1 = __webpack_require__(103);
2023
1931
 
2024
- var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
2025
- title: title
2026
- }), description !== undefined && {
2027
- description: description
2028
- }), readOnly !== undefined && {
2029
- readOnly: readOnly
2030
- }), writeOnly !== undefined && {
2031
- writeOnly: writeOnly
2032
- }), examples !== undefined && {
2033
- examples: examples
2034
- }), defaultValue !== undefined && {
2035
- default: defaultValue
2036
- });
1932
+ var StaticFillColorEditor_1 = __webpack_require__(104);
2037
1933
 
2038
- if (type === 'object') {
2039
- enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
2040
- type: type
2041
- }), properties && {
2042
- properties: enhanceOptionsSchemaWithDynamicOptions(properties)
2043
- });
1934
+ var StaticStrokeColorEditor_1 = __webpack_require__(105);
2044
1935
 
2045
- if (patternProperties) {
2046
- var enhancedPatternProperties = {};
2047
- Object.keys(patternProperties).forEach(function (opt) {
2048
- enhancedPatternProperties = Object.assign(Object.assign({}, enhancedPatternProperties), enhanceOptionsSchemaWithDynamicOptions(_defineProperty({}, opt, patternProperties[opt])));
2049
- });
2050
- enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;
1936
+ var dataContract = {
1937
+ requiredDataSources: [],
1938
+ optionalDataSources: [{
1939
+ name: 'primary',
1940
+ description: 'DataSource that powers the visualization'
1941
+ }],
1942
+ initialRequestParams: {
1943
+ primary: {
1944
+ offset: 0,
1945
+ count: 10000
1946
+ }
1947
+ }
1948
+ };
1949
+ var size = {
1950
+ initialWidth: 300,
1951
+ initialHeight: 300
1952
+ };
1953
+ var defaultContext = {
1954
+ fillColorConfig: [{
1955
+ from: 100,
1956
+ value: '#088F44'
1957
+ }, {
1958
+ from: 80,
1959
+ to: 100,
1960
+ value: '#2EB82E'
1961
+ }, {
1962
+ from: 60,
1963
+ to: 80,
1964
+ value: '#C3CC33'
1965
+ }, {
1966
+ from: 40,
1967
+ to: 60,
1968
+ value: '#FFD442'
1969
+ }, {
1970
+ from: 20,
1971
+ to: 40,
1972
+ value: '#FFA857'
1973
+ }, {
1974
+ from: 0,
1975
+ to: 20,
1976
+ value: '#FF7149'
1977
+ }, {
1978
+ to: 0,
1979
+ value: '#FE3A3A'
1980
+ }],
1981
+ strokeColorConfig: [{
1982
+ from: 100,
1983
+ value: '#088F44'
1984
+ }, {
1985
+ from: 80,
1986
+ to: 100,
1987
+ value: '#2EB82E'
1988
+ }, {
1989
+ from: 60,
1990
+ to: 80,
1991
+ value: '#C3CC33'
1992
+ }, {
1993
+ from: 40,
1994
+ to: 60,
1995
+ value: '#FFD442'
1996
+ }, {
1997
+ from: 20,
1998
+ to: 40,
1999
+ value: '#FFA857'
2000
+ }, {
2001
+ from: 0,
2002
+ to: 20,
2003
+ value: '#FF7149'
2004
+ }, {
2005
+ to: 0,
2006
+ value: '#FE3A3A'
2007
+ }],
2008
+ fillColorMatchConfig: [{
2009
+ match: '',
2010
+ value: '#5C33FF'
2011
+ }],
2012
+ strokeColorMatchConfig: [{
2013
+ match: '',
2014
+ value: '#5C33FF'
2015
+ }]
2016
+ };
2017
+ exports.optionsSchema = {
2018
+ fillColor: {
2019
+ default: '> themes.defaultFillColor',
2020
+ description: 'Specify the fill color. You may use a dataSource to apply the color. The hex value format should be "#FFFFFF". The default for enterprise light mode is "#C3CBD4". The default for enterprise dark mode is "#31373E". The default for prisma dark mode is "#0B0C0E".',
2021
+ type: 'string'
2022
+ },
2023
+ fillOpacity: {
2024
+ description: 'Specify the opacity of the fill. Choose a number in the range of 0 - 1 (inclusive). You can also express the value as a percentage. For example, "0.80" in source or "80%" in UI.',
2025
+ type: 'number',
2026
+ default: 1
2027
+ },
2028
+ rx: {
2029
+ description: 'Specify the curvature of the horizontal corner (or border) radius with an integer or a percent greater than or equal to zero.',
2030
+ type: 'number',
2031
+ default: 0
2032
+ },
2033
+ ry: {
2034
+ description: 'Specify the curvature of the vertical corner (or border) radius with an integer or a percent greater than or equal to zero.',
2035
+ type: 'number',
2036
+ default: '> rx'
2037
+ },
2038
+ strokeColor: {
2039
+ default: '> themes.defaultStrokeColor',
2040
+ description: 'Specify the stroke color. You may use a dataSource to apply the color. The hex value format should be "#FFFFFF". The default for enterprise light mode is "#3C444D". The default for enterprise dark mode is "#C3CBD4". The default for prisma dark mode is "#ACACAD".',
2041
+ type: 'string'
2042
+ },
2043
+ strokeDashStyle: {
2044
+ description: 'Specify the size, in pixels, of dashes and spaces used to create a custom stitched outline. The value you specify applies to both the dashes and the spaces between them.',
2045
+ type: 'number',
2046
+ default: 0
2047
+ },
2048
+ strokeJoinStyle: {
2049
+ description: 'Specifies the shape to be used at the corners of paths when they are joined.',
2050
+ type: 'string',
2051
+ default: 'miter',
2052
+ pattern: schemaUtils_1.getPattern(['arcs', 'bevel', 'miter', 'miter-clip', 'round'])
2053
+ },
2054
+ strokeOpacity: {
2055
+ description: 'Specify the opacity of the stroke. Choose a number in the range of 0 - 1 (inclusive). You can also express the value as a percentage. For example, "0.80" in source or "80%" in UI.',
2056
+ type: 'number',
2057
+ default: 1
2058
+ },
2059
+ strokeWidth: {
2060
+ description: 'Specify the width of the stroke, in pixels, in the range of 1 - 25 (inclusive).',
2061
+ type: 'number',
2062
+ default: 1
2063
+ }
2064
+ };
2065
+ var themes = {
2066
+ defaultFillColor: function defaultFillColor(props) {
2067
+ return themes_1.pick({
2068
+ enterprise: {
2069
+ dark: themes_1.variables.gray25(props),
2070
+ light: themes_1.variables.gray80(props)
2071
+ },
2072
+ prisma: themes_1.variables.backgroundColorSidebar(props)
2073
+ })(props);
2074
+ },
2075
+ defaultStrokeColor: function defaultStrokeColor(props) {
2076
+ return themes_1.pick({
2077
+ enterprise: {
2078
+ dark: themes_1.variables.gray80(props),
2079
+ light: themes_1.variables.gray30(props)
2080
+ },
2081
+ prisma: themes_1.variables.neutral500(props)
2082
+ })(props);
2083
+ }
2084
+ };
2085
+ var basePresetContext = {
2086
+ fillColorEditorConfig: undefined,
2087
+ strokeColorEditorConfig: undefined
2088
+ };
2089
+ var basePresetOptions = {
2090
+ fillColor: undefined,
2091
+ strokeColor: undefined
2092
+ };
2093
+ var presets = [{
2094
+ // dummy context variables to allow for resetting of unused context states
2095
+ label: i18n_1._('None'),
2096
+ name: 'rectangle.none',
2097
+ value: {
2098
+ context: Object.assign({}, basePresetContext),
2099
+ options: Object.assign({}, basePresetOptions)
2100
+ }
2101
+ }, {
2102
+ label: i18n_1._('Fill'),
2103
+ name: 'rectangle.fill',
2104
+ value: {
2105
+ context: Object.assign(Object.assign({}, basePresetContext), {
2106
+ fillDataValue: '> primary | seriesByType("number") | lastPoint()',
2107
+ fillColorEditorConfig: defaultContext.fillColorConfig
2108
+ }),
2109
+ options: Object.assign(Object.assign({}, basePresetOptions), {
2110
+ fillColor: '> fillDataValue | rangeValue(fillColorEditorConfig)'
2111
+ })
2112
+ }
2113
+ }, {
2114
+ label: i18n_1._('Stroke'),
2115
+ name: 'rectangle.stroke',
2116
+ value: {
2117
+ context: Object.assign(Object.assign({}, basePresetContext), {
2118
+ strokeDataValue: '> primary | seriesByType("number") | lastPoint()',
2119
+ strokeColorEditorConfig: defaultContext.strokeColorConfig
2120
+ }),
2121
+ options: Object.assign(Object.assign({}, basePresetOptions), {
2122
+ strokeColor: '> strokeDataValue | rangeValue(strokeColorEditorConfig)'
2123
+ })
2124
+ }
2125
+ }, {
2126
+ label: i18n_1._('Fill & Stroke'),
2127
+ name: 'rectangle.fillAndStroke',
2128
+ value: {
2129
+ context: Object.assign(Object.assign({}, basePresetContext), {
2130
+ fillDataValue: '> primary | seriesByType("number") | lastPoint()',
2131
+ strokeDataValue: '> primary | seriesByType("number") | lastPoint()',
2132
+ fillColorEditorConfig: defaultContext.fillColorConfig,
2133
+ strokeColorEditorConfig: defaultContext.strokeColorConfig
2134
+ }),
2135
+ options: Object.assign(Object.assign({}, basePresetOptions), {
2136
+ fillColor: '> fillDataValue | rangeValue(fillColorEditorConfig)',
2137
+ strokeColor: '> strokeDataValue | rangeValue(strokeColorEditorConfig)'
2138
+ })
2139
+ }
2140
+ }];
2141
+ var editorConfig = [{
2142
+ label: i18n_1._('General'),
2143
+ layout: [[{
2144
+ label: i18n_1._('Fill Opacity (%)'),
2145
+ option: 'fillOpacity',
2146
+ editor: 'editor.percent',
2147
+ editorProps: {
2148
+ min: 0
2149
+ }
2150
+ }, {
2151
+ label: i18n_1._('Stroke Opacity (%)'),
2152
+ option: 'strokeOpacity',
2153
+ editor: 'editor.percent',
2154
+ editorProps: {
2155
+ min: 0
2156
+ }
2157
+ }], [{
2158
+ label: i18n_1._('Stroke Width'),
2159
+ option: 'strokeWidth',
2160
+ editor: 'editor.number',
2161
+ editorProps: {
2162
+ min: 0
2163
+ }
2164
+ }, {
2165
+ label: i18n_1._('Stroke Dash Style'),
2166
+ option: 'strokeDashStyle',
2167
+ editor: 'editor.number',
2168
+ editorProps: {
2169
+ min: 0
2170
+ }
2171
+ }], [{
2172
+ label: i18n_1._('Radius (px)'),
2173
+ option: 'rx',
2174
+ editor: 'editor.number',
2175
+ editorProps: {
2176
+ min: 0
2177
+ }
2178
+ }, {}]]
2179
+ }, {
2180
+ label: i18n_1._('Coloring'),
2181
+ layout: [[{
2182
+ label: 'Dynamic Elements',
2183
+ key: 'presetSelector',
2184
+ editor: 'editor.presetSelector',
2185
+ editorProps: {
2186
+ presets: presets,
2187
+ value: function value(_ref) {
2188
+ var context = _ref.context,
2189
+ options = _ref.options;
2190
+ var initialPreset = configUtils_1.getInitialPreset(context, options, presets);
2191
+ return initialPreset && initialPreset.label || null;
2051
2192
  }
2052
- } else {
2053
- enhancedOptionsSchema[key] = Object.assign(Object.assign({}, annotations), {
2054
- anyOf: [Object.assign(Object.assign({}, type !== undefined && {
2055
- type: type
2056
- }), remainingSchemaEntry), dynamicOptionsDSLType]
2057
- });
2058
2193
  }
2059
- });
2060
- return enhancedOptionsSchema;
2061
- }
2062
-
2063
- exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
2064
- /**
2065
- * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
2066
- * this function also collapse all editor panels
2067
- * @param vizConfig a Visualization Config
2068
- * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
2069
- * and containing `open: false` for all editor panels in editorConfig
2070
- */
2071
-
2072
- function enhanceConfig(vizConfig) {
2073
- var enhancedConfig = vizConfig;
2074
-
2075
- if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
2076
- enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
2077
- }
2078
-
2079
- enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
2080
- return Object.assign(Object.assign({}, config), {
2081
- open: false
2082
- });
2083
- });
2084
- return enhancedConfig;
2085
- }
2086
-
2087
- exports.enhanceConfig = enhanceConfig;
2088
- /**
2089
- * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
2090
- * Created for editor unit tests
2091
- * @param vizConfig a Visualization Config
2092
- * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
2093
- */
2094
-
2095
- function uncollapseEditorConfig(vizConfig) {
2096
- var editorPanelUncollapsedConfig = vizConfig;
2097
- editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
2098
- return Object.assign(Object.assign({}, config), {
2099
- open: true
2100
- });
2101
- });
2102
- return editorPanelUncollapsedConfig;
2103
- }
2104
-
2105
- exports.uncollapseEditorConfig = uncollapseEditorConfig;
2106
-
2107
- function isDynamicOption(option) {
2108
- return option && typeof option === 'string' && option.trim().startsWith('>') || false;
2109
- }
2110
-
2111
- exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
2112
- // this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
2113
-
2114
- /**
2115
- * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
2116
- * 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
2117
- * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
2118
- * 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
2119
- *
2120
- * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
2121
- */
2122
-
2123
- function hasCompatibleContexts(vizContext, presetContext) {
2124
- var presetContextKeys = Object.keys(presetContext);
2125
- return presetContextKeys.every(function (contextKey) {
2126
- return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
2127
- });
2128
- }
2129
- /**
2130
- * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
2131
- */
2132
-
2133
-
2134
- function hasCompatibleOptions(vizOptions, presetOptions) {
2135
- var presetOptionKeys = Object.keys(presetOptions);
2136
- return presetOptionKeys.every(function (optionKey) {
2137
- return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
2138
- });
2139
- }
2140
- /**
2141
- * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
2142
- * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
2143
- *
2144
- * @param {Object} vizContext - the current vizContext definition
2145
- * @param {Object} vizOptions - the current vizOptions definition
2146
- * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
2147
- */
2148
-
2149
-
2150
- function getInitialPreset(vizContext, vizOptions, presets) {
2151
- return presets.find(function (preset) {
2152
- var presetContext = lodash_1.get(preset, ['value', 'context'], {});
2153
- var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
2154
- var presetContextKeys = Object.keys(presetContext);
2155
- var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
2156
- // if not, then the preset is invalid in config.ts
2157
-
2158
- if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
2159
- return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
2160
- });
2161
- }
2162
-
2163
- exports.getInitialPreset = getInitialPreset;
2194
+ }], [Object.assign(Object.assign({}, StaticFillColorEditor_1.default), {
2195
+ editorProps: {
2196
+ labelPosition: 'left',
2197
+ themes: themes
2198
+ }
2199
+ })], [DynamicFillColorEditor_1.getDynamicFillColorEditor({
2200
+ defaultContext: defaultContext,
2201
+ defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
2202
+ })], [Object.assign(Object.assign({}, StaticStrokeColorEditor_1.default), {
2203
+ editorProps: {
2204
+ labelPosition: 'left',
2205
+ themes: themes
2206
+ }
2207
+ })], [DynamicStrokeColorEditor_1.getDynamicStrokeColorEditor({
2208
+ defaultContext: defaultContext,
2209
+ defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
2210
+ })]]
2211
+ }];
2164
2212
  /**
2165
- * generates number precision values for a Select editor
2166
- *
2167
- * @param {Number} numPrecisionValues - number of integer precision values to generate
2168
- * @returns {{ label: string; value; string }[]} array of { label, value } tuples
2213
+ * visualization configuration
2169
2214
  */
2170
2215
 
2171
- function generatePrecisionValues(numPrecisionValues) {
2172
- return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
2173
- return {
2174
- label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
2175
- value: i
2176
- };
2177
- });
2178
- }
2216
+ var config = {
2217
+ /**
2218
+ * unique viz key
2219
+ */
2220
+ key: 'splunk.rectangle',
2179
2221
 
2180
- exports.generatePrecisionValues = generatePrecisionValues;
2181
- /**
2182
- * insert layout in layout array, return a new layout array instead of updating the original
2183
- *
2184
- * @param {EditorLayoutConfig[][]} layout - editor layout
2185
- * @param {Number} index - the index to insert layout item(s)
2186
- * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
2187
- * @returns {EditorLayoutConfig[][]} new editor layout with insertion
2188
- */
2222
+ /**
2223
+ * viz name
2224
+ */
2225
+ name: 'Rectangle',
2226
+ category: VizCategory_1.VizCategory.SHAPES,
2189
2227
 
2190
- var insertLayout = function insertLayout(layout, index) {
2191
- for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
2192
- layoutItems[_key - 2] = arguments[_key];
2228
+ /**
2229
+ * viz icon
2230
+ */
2231
+ icon: visualization_icons_1.Rectangle,
2232
+ dataContract: dataContract,
2233
+ size: size,
2234
+ defaultContext: defaultContext,
2235
+ optionsSchema: exports.optionsSchema,
2236
+ editorConfig: editorConfig,
2237
+ supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS],
2238
+ themes: themes,
2239
+ events: {
2240
+ 'rectangle.click': {
2241
+ description: 'trigger when user clicks rectangle',
2242
+ payloadKeys: ['strokeColor', 'fillColor']
2243
+ }
2193
2244
  }
2194
-
2195
- return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
2196
2245
  };
2197
-
2198
- exports.insertLayout = insertLayout;
2199
-
2200
- /***/ }),
2201
-
2202
- /***/ 69:
2203
- /***/ (function(module, exports) {
2204
-
2205
- module.exports = require("@splunk/themes");
2206
-
2207
- /***/ }),
2208
-
2209
- /***/ 7:
2210
- /***/ (function(module, exports) {
2211
-
2212
- module.exports = require("@babel/runtime/helpers/defineProperty");
2246
+ exports.default = configUtils_1.enhanceConfig(config);
2213
2247
 
2214
2248
  /***/ }),
2215
2249
 
2216
- /***/ 8:
2250
+ /***/ 43:
2217
2251
  /***/ (function(module, exports, __webpack_require__) {
2218
2252
 
2219
2253
  "use strict";
2220
2254
 
2221
2255
 
2222
- var _typeof = __webpack_require__(25);
2223
-
2224
2256
  Object.defineProperty(exports, "__esModule", {
2225
2257
  value: true
2226
2258
  });
2227
- exports.deepMergeWithArrayPrimitiveOverrides = exports.extendStaticWrapperProps = void 0;
2228
2259
 
2229
- var lodash_1 = __webpack_require__(2);
2260
+ var React = __webpack_require__(1);
2230
2261
 
2231
- var mapUtils_1 = __webpack_require__(41);
2232
- /**
2233
- * @method extendStaticWrapperProps
2234
- * @param {Object} props
2235
- * @param {DashboardVizType} props.Wrapper
2236
- * @param {DashboardVizType} props.Visualization
2237
- */
2262
+ var colorUtils_1 = __webpack_require__(12);
2238
2263
 
2264
+ var variables_1 = __webpack_require__(9);
2239
2265
 
2240
- var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
2241
- var Wrapper = _ref.Wrapper,
2242
- Visualization = _ref.Visualization;
2243
- var extendProperties = ['propTypes', 'defaultProps', 'config'];
2244
- extendProperties.forEach(function (prop) {
2245
- if (Visualization[prop]) {
2246
- // eslint-disable-next-line no-param-reassign
2247
- Wrapper[prop] = Visualization[prop];
2248
- }
2249
- });
2250
- };
2266
+ var IconPlaceholder_1 = __webpack_require__(27);
2251
2267
 
2252
- exports.extendStaticWrapperProps = extendStaticWrapperProps;
2253
- /**
2254
- * helper to deeply merge objects while preserving arrays in earlier source objects
2255
- * 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
2256
- * 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).
2257
- * 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
2258
- * 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.
2259
- *
2260
- * @method deepMergeWithArrayPrimitiveOverrides
2261
- * @param {Object} initial - target object to merge values into
2262
- * @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
2263
- *
2264
- * @returns {Object}
2265
- */
2268
+ var VizBehavior_1 = __webpack_require__(6);
2266
2269
 
2267
- var deepMergeWithArrayPrimitiveOverrides = function deepMergeWithArrayPrimitiveOverrides(initial) {
2268
- var clone = lodash_1.cloneDeep(initial);
2270
+ var hocUtils_1 = __webpack_require__(14);
2269
2271
 
2270
- for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2271
- sources[_key - 1] = arguments[_key];
2272
- }
2272
+ var withPlaceholder = function withPlaceholder(Visualization) {
2273
+ var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
2274
+ var config = Visualization.config;
2275
+ var themes = config.themes;
2273
2276
 
2274
- sources.forEach(function (sourceToApply) {
2275
- Object.keys(sourceToApply).forEach(function (sourceKey) {
2276
- if (!Object.prototype.hasOwnProperty.call(clone, sourceKey)) {
2277
- clone[sourceKey] = lodash_1.cloneDeep(sourceToApply[sourceKey]);
2278
- }
2277
+ var Wrapper = function Wrapper(props) {
2278
+ var _a, _b;
2279
2279
 
2280
- if (clone[sourceKey] && _typeof(clone[sourceKey]) === 'object' && !Array.isArray(clone[sourceKey]) && _typeof(sourceToApply[sourceKey]) === 'object') {
2281
- clone[sourceKey] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey], sourceToApply[sourceKey]);
2282
- } else if (Array.isArray(clone[sourceKey]) && _typeof(clone[sourceKey][0]) === 'object' && !Array.isArray(clone[sourceKey][0])) {
2283
- // If option is an array of objects
2284
- for (var i = 0; i < clone[sourceKey].length; i += 1) {
2285
- if (_typeof(clone[sourceKey][i]) === 'object') {
2286
- var closestMatchIdx = mapUtils_1.findClosestMatchFromDefaultList(sourceToApply[sourceKey], clone[sourceKey][i]);
2287
-
2288
- if (closestMatchIdx > -1) {
2289
- clone[sourceKey][i] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey][i], sourceToApply[sourceKey][closestMatchIdx]);
2290
- }
2291
- }
2292
- }
2293
- }
2294
- });
2280
+ var dataSources = props.dataSources,
2281
+ loading = props.loading,
2282
+ options = props.options,
2283
+ height = props.height,
2284
+ width = props.width;
2285
+ var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
2286
+ 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);
2287
+ var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
2288
+ var iconColor = variables_1.default.contentColorActive(props);
2289
+
2290
+ if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
2291
+ return React.createElement(IconPlaceholder_1.default, {
2292
+ "data-test": "icon-placeholder",
2293
+ icon: icon,
2294
+ width: width,
2295
+ height: height,
2296
+ backgroundColor: bgColorFromTheme,
2297
+ iconColor: iconColor
2298
+ });
2299
+ }
2300
+
2301
+ return React.createElement(Visualization, Object.assign({}, props));
2302
+ };
2303
+
2304
+ hocUtils_1.extendStaticWrapperProps({
2305
+ Wrapper: Wrapper,
2306
+ Visualization: Visualization
2295
2307
  });
2296
- return clone;
2308
+ return Wrapper;
2297
2309
  };
2298
2310
 
2299
- exports.deepMergeWithArrayPrimitiveOverrides = deepMergeWithArrayPrimitiveOverrides;
2311
+ exports.default = withPlaceholder;
2300
2312
 
2301
2313
  /***/ }),
2302
2314
 
2303
- /***/ 9:
2315
+ /***/ 47:
2304
2316
  /***/ (function(module, exports) {
2305
2317
 
2306
- module.exports = require("@babel/runtime/helpers/toConsumableArray");
2318
+ module.exports = require("@splunk/visualization-icons");
2307
2319
 
2308
2320
  /***/ }),
2309
2321
 
2310
- /***/ 96:
2311
- /***/ (function(module, exports, __webpack_require__) {
2312
-
2313
- "use strict";
2314
-
2315
-
2316
- Object.defineProperty(exports, "__esModule", {
2317
- value: true
2318
- });
2319
- exports.getDynamicFillColorEditor = void 0;
2320
-
2321
- var i18n_1 = __webpack_require__(3);
2322
-
2323
- var configUtils_1 = __webpack_require__(6);
2324
-
2325
- var getDynamicFillColorEditor = function getDynamicFillColorEditor(_ref) {
2326
- var defaultContext = _ref.defaultContext,
2327
- defaultPalettesConfig = _ref.defaultPalettesConfig;
2328
- return {
2329
- label: i18n_1._('Dynamic Fill'),
2330
- option: 'fillColor',
2331
- context: 'fillColorEditorConfig',
2332
- editor: 'editor.dynamicColor',
2333
- showEditor: function showEditor(_ref2) {
2334
- var options = _ref2.options;
2335
- return configUtils_1.isDynamicOption(options.fillColor);
2336
- },
2337
- editorProps: {
2338
- labelPosition: 'left',
2339
- flyoutTitle: i18n_1._('Dynamic Coloring: Fill Color'),
2340
- formatters: [{
2341
- label: i18n_1._('Ranges'),
2342
- value: 'rangeValue',
2343
- defaults: {
2344
- fillDataValue: defaultContext.fillColorConfig
2345
- }
2346
- }, {
2347
- label: i18n_1._('Matches'),
2348
- value: 'matchValue',
2349
- defaults: {
2350
- fillDataValue: defaultContext.fillColorMatchConfig
2351
- }
2352
- }],
2353
- dataSelectors: [{
2354
- label: i18n_1._('Fill Color'),
2355
- value: 'fillDataValue'
2356
- }],
2357
- defaultPalettesConfig: defaultPalettesConfig
2358
- }
2359
- };
2360
- };
2322
+ /***/ 54:
2323
+ /***/ (function(module, exports) {
2361
2324
 
2362
- exports.getDynamicFillColorEditor = getDynamicFillColorEditor;
2325
+ module.exports = require("@splunk/visualization-color-palettes/editors/PresetPalettes");
2363
2326
 
2364
2327
  /***/ }),
2365
2328
 
2366
- /***/ 97:
2329
+ /***/ 6:
2367
2330
  /***/ (function(module, exports, __webpack_require__) {
2368
2331
 
2369
2332
  "use strict";
@@ -2372,104 +2335,60 @@ exports.getDynamicFillColorEditor = getDynamicFillColorEditor;
2372
2335
  Object.defineProperty(exports, "__esModule", {
2373
2336
  value: true
2374
2337
  });
2375
- exports.getDynamicStrokeColorEditor = void 0;
2376
-
2377
- var i18n_1 = __webpack_require__(3);
2378
-
2379
- var configUtils_1 = __webpack_require__(6);
2338
+ exports.VizBehavior = void 0;
2339
+ var VizBehavior;
2380
2340
 
2381
- var getDynamicStrokeColorEditor = function getDynamicStrokeColorEditor(_ref) {
2382
- var defaultContext = _ref.defaultContext,
2383
- defaultPalettesConfig = _ref.defaultPalettesConfig;
2384
- return {
2385
- label: i18n_1._('Dynamic Stroke'),
2386
- option: 'strokeColor',
2387
- context: 'strokeColorEditorConfig',
2388
- editor: 'editor.dynamicColor',
2389
- showEditor: function showEditor(_ref2) {
2390
- var options = _ref2.options;
2391
- return configUtils_1.isDynamicOption(options.strokeColor);
2392
- },
2393
- editorProps: {
2394
- labelPosition: 'left',
2395
- flyoutTitle: i18n_1._('Dynamic Coloring: Stroke Color'),
2396
- formatters: [{
2397
- label: i18n_1._('Ranges'),
2398
- value: 'rangeValue',
2399
- defaults: {
2400
- strokeDataValue: defaultContext.strokeColorConfig
2401
- }
2402
- }, {
2403
- label: i18n_1._('Matches'),
2404
- value: 'matchValue',
2405
- defaults: {
2406
- strokeDataValue: defaultContext.strokeColorMatchConfig
2407
- }
2408
- }],
2409
- dataSelectors: [{
2410
- label: i18n_1._('Stroke Color'),
2411
- value: 'strokeDataValue'
2412
- }],
2413
- defaultPalettesConfig: defaultPalettesConfig
2414
- }
2415
- };
2416
- };
2341
+ (function (VizBehavior) {
2342
+ /**
2343
+ * Dynamic Options Behavior.
2344
+ * This allows visualization options to be powered by data
2345
+ *
2346
+ * **Example**
2347
+ *
2348
+ * sparklineValues: ">primary|seriesByIndex(0)"
2349
+ * would configure sparklineValues with an array of data points
2350
+ * coming from the first series in the primary datasource
2351
+ *
2352
+ */
2353
+ VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
2354
+ VizBehavior["EVENTS"] = "events";
2355
+ /**
2356
+ * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
2357
+ * missing.
2358
+ * @type {string}
2359
+ */
2417
2360
 
2418
- exports.getDynamicStrokeColorEditor = getDynamicStrokeColorEditor;
2361
+ VizBehavior["PLACEHOLDER"] = "placeholder";
2362
+ VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
2363
+ })(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
2419
2364
 
2420
2365
  /***/ }),
2421
2366
 
2422
- /***/ 98:
2423
- /***/ (function(module, exports, __webpack_require__) {
2424
-
2425
- "use strict";
2426
-
2367
+ /***/ 69:
2368
+ /***/ (function(module, exports) {
2427
2369
 
2428
- Object.defineProperty(exports, "__esModule", {
2429
- value: true
2430
- });
2370
+ module.exports = require("@splunk/themes");
2431
2371
 
2432
- var i18n_1 = __webpack_require__(3);
2372
+ /***/ }),
2433
2373
 
2434
- var configUtils_1 = __webpack_require__(6);
2374
+ /***/ 7:
2375
+ /***/ (function(module, exports) {
2435
2376
 
2436
- var StaticFillColorEditor = {
2437
- label: i18n_1._('Static Fill'),
2438
- option: 'fillColor',
2439
- editor: 'editor.color',
2440
- showEditor: function showEditor(_ref) {
2441
- var options = _ref.options;
2442
- return !configUtils_1.isDynamicOption(options.fillColor);
2443
- }
2444
- };
2445
- exports.default = StaticFillColorEditor;
2377
+ module.exports = require("@babel/runtime/helpers/defineProperty");
2446
2378
 
2447
2379
  /***/ }),
2448
2380
 
2449
- /***/ 99:
2450
- /***/ (function(module, exports, __webpack_require__) {
2451
-
2452
- "use strict";
2453
-
2381
+ /***/ 8:
2382
+ /***/ (function(module, exports) {
2454
2383
 
2455
- Object.defineProperty(exports, "__esModule", {
2456
- value: true
2457
- });
2384
+ module.exports = require("@babel/runtime/helpers/toConsumableArray");
2458
2385
 
2459
- var i18n_1 = __webpack_require__(3);
2386
+ /***/ }),
2460
2387
 
2461
- var configUtils_1 = __webpack_require__(6);
2388
+ /***/ 9:
2389
+ /***/ (function(module, exports) {
2462
2390
 
2463
- var StaticStrokeColorEditor = {
2464
- label: i18n_1._('Static Stroke'),
2465
- option: 'strokeColor',
2466
- editor: 'editor.color',
2467
- showEditor: function showEditor(_ref) {
2468
- var options = _ref.options;
2469
- return !configUtils_1.isDynamicOption(options.strokeColor);
2470
- }
2471
- };
2472
- exports.default = StaticStrokeColorEditor;
2391
+ module.exports = require("@splunk/themes/variables");
2473
2392
 
2474
2393
  /***/ })
2475
2394