@splunk/visualizations 25.1.0 → 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 (172) 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_PureSingleValueIcon_Background_color_cyan.png +0 -0
  8. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Unit_specified_Unit_Position_after_default.png +0 -0
  9. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Unit_specified_Unit_Position_before.png +0 -0
  10. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Background_Color_white_Under_Label_and_Unit_specified.png +0 -0
  11. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Major_Value_is_null.png +0 -0
  12. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Unit_specified_Unit_Position_after_default.png +0 -0
  13. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Unit_specified_Unit_Position_before.png +0 -0
  14. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Area_Editor.png +0 -0
  15. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bar_Editor.png +0 -0
  16. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bubble_Editor.png +0 -0
  17. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_ChoroplethSvg_Editor.png +0 -0
  18. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Column_Editor.png +0 -0
  19. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Ellipse_Editor.png +0 -0
  20. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Events_Editor.png +0 -0
  21. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_FillerGauge_Editor.png +0 -0
  22. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Image_Editor.png +0 -0
  23. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Line_Editor.png +0 -0
  24. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_LinkGraph_Editor.png +0 -0
  25. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
  26. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Markdown_Editor.png +0 -0
  27. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_MarkerGauge_Editor.png +0 -0
  28. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Parallel_Coordinates_Editor.png +0 -0
  29. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Pie_Editor.png +0 -0
  30. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Punchcard_Editor.png +0 -0
  31. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Rectangle_Editor.png +0 -0
  32. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Sankey_Editor.png +0 -0
  33. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Scatter_Editor.png +0 -0
  34. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Editor.png +0 -0
  35. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Icon_Editor.png +0 -0
  36. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Radial_Editor.png +0 -0
  37. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Table_Editor.png +0 -0
  38. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Background_Color_Light_Blue.png +0 -0
  39. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Basic_Events.png +0 -0
  40. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Event_Actions.png +0 -0
  41. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Actions.png +0 -0
  42. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary.png +0 -0
  43. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary_Simulated_Instance.png +0 -0
  44. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Footer_Fields.png +0 -0
  45. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Footer_Fields_with_Highlight.png +0 -0
  46. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Show_Placeholder.png +0 -0
  47. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Height.png +0 -0
  48. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Percentage_50.png +0 -0
  49. package/.loki/reference/chrome_docker_Visualizations_Events_Events_With_Options.png +0 -0
  50. package/.loki/reference/chrome_docker_Visualizations_LinkGraph_LinkGraph_ES.png +0 -0
  51. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_Unit_value_after.png +0 -0
  52. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_Unit_value_before.png +0 -0
  53. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Set_The_Unit_After.png +0 -0
  54. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Set_The_Unit_Before.png +0 -0
  55. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_Unit_Value_After.png +0 -0
  56. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_Unit_Value_Before.png +0 -0
  57. package/Area.config.js +14 -14
  58. package/Area.config.js.map +1 -1
  59. package/Area.js +171 -160
  60. package/Area.js.map +1 -1
  61. package/Bar.config.js +14 -14
  62. package/Bar.config.js.map +1 -1
  63. package/Bar.js +171 -160
  64. package/Bar.js.map +1 -1
  65. package/Bubble.config.js +18 -11
  66. package/Bubble.config.js.map +1 -1
  67. package/Bubble.js +173 -155
  68. package/Bubble.js.map +1 -1
  69. package/ChoroplethSvg.config.js +3 -3
  70. package/ChoroplethSvg.config.js.map +1 -1
  71. package/ChoroplethSvg.js +158 -148
  72. package/ChoroplethSvg.js.map +1 -1
  73. package/Column.config.js +14 -14
  74. package/Column.config.js.map +1 -1
  75. package/Column.js +170 -160
  76. package/Column.js.map +1 -1
  77. package/Ellipse.js +125 -115
  78. package/Ellipse.js.map +1 -1
  79. package/Events.config.js +668 -0
  80. package/Events.config.js.map +1 -0
  81. package/Events.js +3116 -0
  82. package/Events.js.map +1 -0
  83. package/FillerGauge.config.js +17 -16
  84. package/FillerGauge.config.js.map +1 -1
  85. package/FillerGauge.js +159 -142
  86. package/FillerGauge.js.map +1 -1
  87. package/Image.config.js +2 -2
  88. package/Image.config.js.map +1 -1
  89. package/Image.js +109 -109
  90. package/Image.js.map +1 -1
  91. package/Line.config.js +17 -16
  92. package/Line.config.js.map +1 -1
  93. package/Line.js +180 -163
  94. package/Line.js.map +1 -1
  95. package/LinkGraph.config.js +12 -5
  96. package/LinkGraph.config.js.map +1 -1
  97. package/LinkGraph.js +24318 -387
  98. package/LinkGraph.js.map +1 -1
  99. package/Map.config.js +27 -26
  100. package/Map.config.js.map +1 -1
  101. package/Map.js +3065 -3126
  102. package/Map.js.map +1 -1
  103. package/Markdown.config.js +6 -6
  104. package/Markdown.config.js.map +1 -1
  105. package/Markdown.js +332 -332
  106. package/Markdown.js.map +1 -1
  107. package/MarkerGauge.config.js +13 -13
  108. package/MarkerGauge.config.js.map +1 -1
  109. package/MarkerGauge.js +1147 -1147
  110. package/MarkerGauge.js.map +1 -1
  111. package/ParallelCoordinates.config.js +11 -11
  112. package/ParallelCoordinates.config.js.map +1 -1
  113. package/ParallelCoordinates.js +588 -695
  114. package/ParallelCoordinates.js.map +1 -1
  115. package/Pie.config.js +13 -13
  116. package/Pie.config.js.map +1 -1
  117. package/Pie.js +1164 -1164
  118. package/Pie.js.map +1 -1
  119. package/Punchcard.config.js +11 -11
  120. package/Punchcard.config.js.map +1 -1
  121. package/Punchcard.js +2628 -2744
  122. package/Punchcard.js.map +1 -1
  123. package/Rectangle.config.js +4 -4
  124. package/Rectangle.config.js.map +1 -1
  125. package/Rectangle.js +704 -704
  126. package/Rectangle.js.map +1 -1
  127. package/Sankey.config.js +15 -15
  128. package/Sankey.config.js.map +1 -1
  129. package/Sankey.js +3124 -3245
  130. package/Sankey.js.map +1 -1
  131. package/Scatter.config.js +21 -13
  132. package/Scatter.config.js.map +1 -1
  133. package/Scatter.js +1395 -1388
  134. package/Scatter.js.map +1 -1
  135. package/SingleValue.config.js +8 -7
  136. package/SingleValue.config.js.map +1 -1
  137. package/SingleValue.js +2136 -2136
  138. package/SingleValue.js.map +1 -1
  139. package/SingleValueBasic.js +28 -28
  140. package/SingleValueBasic.js.map +1 -1
  141. package/SingleValueIcon.config.js +8 -7
  142. package/SingleValueIcon.config.js.map +1 -1
  143. package/SingleValueIcon.js +1249 -1390
  144. package/SingleValueIcon.js.map +1 -1
  145. package/SingleValueRadial.config.js +8 -7
  146. package/SingleValueRadial.config.js.map +1 -1
  147. package/SingleValueRadial.js +1926 -1926
  148. package/SingleValueRadial.js.map +1 -1
  149. package/Table.config.js +4 -4
  150. package/Table.config.js.map +1 -1
  151. package/Table.js +2158 -2155
  152. package/Table.js.map +1 -1
  153. package/common/EventsDoc.js +15 -8
  154. package/common/EventsDoc.js.map +1 -1
  155. package/common/GaugeMajorTicks.js +2 -2
  156. package/common/GaugeValueMarker.js +2 -2
  157. package/common/OptionsDoc.js +9 -8
  158. package/common/OptionsDoc.js.map +1 -1
  159. package/common/ThemesDoc.js +2 -2
  160. package/common/utils/dataUtils.js +136 -0
  161. package/common/utils/dataUtils.js.map +1 -0
  162. package/common/utils/hocUtils.js +2 -2
  163. package/common/utils/hocUtils.js.map +1 -1
  164. package/common/utils/mapUtils.js +11 -10
  165. package/common/utils/mapUtils.js.map +1 -1
  166. package/common/utils/singleValueUtils.js +3 -2
  167. package/common/utils/singleValueUtils.js.map +1 -1
  168. package/common/utils/testHelper.js +8 -8
  169. package/common/utils/testHelper.js.map +1 -1
  170. package/common/withDashboardViz.js +2 -2
  171. package/common/withDashboardViz.js.map +1 -1
  172. package/package.json +14 -12
@@ -87,41 +87,40 @@ module.exports =
87
87
  /******/
88
88
  /******/
89
89
  /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 260);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 443);
91
91
  /******/ })
92
92
  /************************************************************************/
93
- /******/ ([
94
- /* 0 */
93
+ /******/ ({
94
+
95
+ /***/ 0:
95
96
  /***/ (function(module, exports) {
96
97
 
97
98
  module.exports = require("prop-types");
98
99
 
99
100
  /***/ }),
100
- /* 1 */
101
+
102
+ /***/ 1:
101
103
  /***/ (function(module, exports) {
102
104
 
103
105
  module.exports = require("react");
104
106
 
105
107
  /***/ }),
106
- /* 2 */
107
- /***/ (function(module, exports) {
108
-
109
- module.exports = require("@splunk/ui-utils/i18n");
110
108
 
111
- /***/ }),
112
- /* 3 */
109
+ /***/ 10:
113
110
  /***/ (function(module, exports) {
114
111
 
115
- module.exports = require("lodash");
112
+ module.exports = require("@splunk/visualizations-shared/Message");
116
113
 
117
114
  /***/ }),
118
- /* 4 */
115
+
116
+ /***/ 11:
119
117
  /***/ (function(module, exports) {
120
118
 
121
- module.exports = require("styled-components");
119
+ module.exports = require("@babel/runtime/helpers/classCallCheck");
122
120
 
123
121
  /***/ }),
124
- /* 5 */
122
+
123
+ /***/ 118:
125
124
  /***/ (function(module, exports, __webpack_require__) {
126
125
 
127
126
  "use strict";
@@ -130,71 +129,156 @@ module.exports = require("styled-components");
130
129
  Object.defineProperty(exports, "__esModule", {
131
130
  value: true
132
131
  });
133
- exports.VizBehavior = void 0;
134
- var VizBehavior;
135
-
136
- (function (VizBehavior) {
137
- /**
138
- * Dynamic Options Behavior.
139
- * This allows visualization options to be powered by data
140
- *
141
- * **Example**
142
- *
143
- * sparklineValues: ">primary|seriesByIndex(0)"
144
- * would configure sparklineValues with an array of data points
145
- * coming from the first series in the primary datasource
146
- *
147
- */
148
- VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
149
- VizBehavior["EVENTS"] = "events";
150
- /**
151
- * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
152
- * missing.
153
- * @type {string}
154
- */
155
-
156
- VizBehavior["PLACEHOLDER"] = "placeholder";
157
- VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
158
- })(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
132
+ exports.defaultContext = void 0;
133
+ exports.defaultContext = {
134
+ trendColorConfig: [{
135
+ to: 0,
136
+ value: '#9E2520'
137
+ }, {
138
+ from: 0,
139
+ value: '#1C6B2D'
140
+ }],
141
+ majorColorConfig: [{
142
+ to: 20,
143
+ value: '#D41F1F'
144
+ }, {
145
+ from: 20,
146
+ to: 40,
147
+ value: '#D94E17'
148
+ }, {
149
+ from: 40,
150
+ to: 60,
151
+ value: '#CBA700'
152
+ }, {
153
+ from: 60,
154
+ to: 80,
155
+ value: '#669922'
156
+ }, {
157
+ from: 80,
158
+ value: '#118832'
159
+ }],
160
+ majorColorMatchConfig: [{
161
+ match: '',
162
+ value: '#5C33FF'
163
+ }]
164
+ };
159
165
 
160
166
  /***/ }),
161
- /* 6 */
162
- /***/ (function(module, exports) {
163
167
 
164
- module.exports = require("@babel/runtime/helpers/defineProperty");
168
+ /***/ 119:
169
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
165
170
 
166
- /***/ }),
167
- /* 7 */
168
- /***/ (function(module, exports) {
171
+ "use strict";
172
+ __webpack_require__.r(__webpack_exports__);
173
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
174
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
169
175
 
170
- module.exports = require("@babel/runtime/helpers/toConsumableArray");
176
+ var StaticMajorAndTrendLayout = [[{
177
+ label: 'Unit Position',
178
+ // todo: we need a new editor combining unit and position
179
+ option: 'unitPosition',
180
+ editor: 'editor.select',
181
+ editorProps: {
182
+ values: [{
183
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Before'),
184
+ value: 'before'
185
+ }, {
186
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('After'),
187
+ value: 'after'
188
+ }]
189
+ },
190
+ showEditor: function showEditor(_ref) {
191
+ var options = _ref.options;
192
+ return options.showValue || options.showValue === undefined;
193
+ }
194
+ }, {
195
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Unit Label'),
196
+ option: 'unit',
197
+ editor: 'editor.text',
198
+ showEditor: function showEditor(_ref2) {
199
+ var options = _ref2.options;
200
+ return options.showValue || options.showValue === undefined;
201
+ }
202
+ }], [{
203
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Precision'),
204
+ option: 'numberPrecision',
205
+ editor: 'editor.number',
206
+ editorProps: {
207
+ min: 0,
208
+ max: 20
209
+ },
210
+ showEditor: function showEditor(_ref3) {
211
+ var options = _ref3.options;
212
+ return options.showValue || options.showValue === undefined;
213
+ }
214
+ }, {
215
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Major Value Size (px)'),
216
+ option: 'majorFontSize',
217
+ editor: 'editor.number',
218
+ editorProps: {
219
+ min: 1
220
+ },
221
+ placeholder: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Auto'),
222
+ showEditor: function showEditor(_ref4) {
223
+ var options = _ref4.options;
224
+ return options.showValue || options.showValue === undefined;
225
+ }
226
+ }], [{
227
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Trend Display'),
228
+ option: 'trendDisplay',
229
+ editor: 'editor.select',
230
+ editorProps: {
231
+ values: [{
232
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Percent'),
233
+ value: 'percent'
234
+ }, {
235
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Absolute'),
236
+ value: 'absolute'
237
+ }, {
238
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Off'),
239
+ value: 'off'
240
+ }]
241
+ },
242
+ showEditor: function showEditor(_ref5) {
243
+ var options = _ref5.options;
244
+ return options.showValue || options.showValue === undefined;
245
+ }
246
+ }, {
247
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Trend Size (px)'),
248
+ option: 'trendFontSize',
249
+ editor: 'editor.number',
250
+ editorProps: {
251
+ min: 1
252
+ },
253
+ placeholder: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Auto'),
254
+ showEditor: function showEditor(_ref6) {
255
+ var options = _ref6.options;
256
+ return options.showValue || options.showValue === undefined;
257
+ },
258
+ isDisabled: function isDisabled(_ref7) {
259
+ var options = _ref7.options;
260
+ return options.trendDisplay === 'off';
261
+ }
262
+ }]];
263
+ /* harmony default export */ __webpack_exports__["default"] = (StaticMajorAndTrendLayout);
171
264
 
172
265
  /***/ }),
173
- /* 8 */
174
- /***/ (function(module, exports) {
175
-
176
- module.exports = require("@splunk/themes/variables");
177
266
 
178
- /***/ }),
179
- /* 9 */
267
+ /***/ 12:
180
268
  /***/ (function(module, exports) {
181
269
 
182
- module.exports = require("@splunk/visualizations-shared/Message");
270
+ module.exports = require("@splunk/visualizations-shared/colorUtils");
183
271
 
184
272
  /***/ }),
185
- /* 10 */
186
- /***/ (function(module, exports) {
187
273
 
188
- module.exports = require("@babel/runtime/helpers/classCallCheck");
189
-
190
- /***/ }),
191
- /* 11 */
274
+ /***/ 125:
192
275
  /***/ (function(module, exports) {
193
276
 
194
- module.exports = require("@splunk/visualizations-shared/colorUtils");
277
+ module.exports = require("@splunk/visualizations/SingleValueBasic");
195
278
 
196
279
  /***/ }),
197
- /* 12 */
280
+
281
+ /***/ 13:
198
282
  /***/ (function(module, exports, __webpack_require__) {
199
283
 
200
284
  "use strict";
@@ -208,11 +292,11 @@ var React = __webpack_require__(1);
208
292
 
209
293
  var styled_components_1 = __webpack_require__(4);
210
294
 
211
- var SizeAwareWrapper_1 = __webpack_require__(19);
295
+ var SizeAwareWrapper_1 = __webpack_require__(20);
212
296
 
213
- var style_1 = __webpack_require__(14);
297
+ var style_1 = __webpack_require__(15);
214
298
 
215
- var colorUtils_1 = __webpack_require__(11);
299
+ var colorUtils_1 = __webpack_require__(12);
216
300
 
217
301
  var Item = styled_components_1.default.div.attrs(function (_ref) {
218
302
  var width = _ref.width;
@@ -269,7 +353,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
269
353
 
270
354
  return React.createElement(FixSizeItem, {
271
355
  "data-test": "fix-size-item",
272
- "data-splunk-visualization-version": "25.1.0 - 812a9a4d8",
356
+ "data-splunk-visualization-version": "25.2.0 - 4373c5a66",
273
357
  width: width,
274
358
  height: height,
275
359
  backgroundColor: backgroundColor
@@ -290,7 +374,8 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
290
374
  exports.default = withFixedSizeContainer;
291
375
 
292
376
  /***/ }),
293
- /* 13 */
377
+
378
+ /***/ 14:
294
379
  /***/ (function(module, exports, __webpack_require__) {
295
380
 
296
381
  "use strict";
@@ -322,27 +407,65 @@ var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
322
407
  exports.extendStaticWrapperProps = extendStaticWrapperProps;
323
408
 
324
409
  /***/ }),
325
- /* 14 */
410
+
411
+ /***/ 15:
326
412
  /***/ (function(module, exports) {
327
413
 
328
414
  module.exports = require("@splunk/visualizations-shared/style");
329
415
 
330
416
  /***/ }),
331
- /* 15 */
417
+
418
+ /***/ 154:
419
+ /***/ (function(module, exports) {
420
+
421
+ module.exports = require("@splunk/react-icons/Activity");
422
+
423
+ /***/ }),
424
+
425
+ /***/ 155:
426
+ /***/ (function(module, exports) {
427
+
428
+ module.exports = require("@splunk/react-icons/Clock");
429
+
430
+ /***/ }),
431
+
432
+ /***/ 156:
433
+ /***/ (function(module, exports) {
434
+
435
+ module.exports = require("@splunk/react-icons/Pencil");
436
+
437
+ /***/ }),
438
+
439
+ /***/ 157:
440
+ /***/ (function(module, exports) {
441
+
442
+ module.exports = require("@splunk/react-icons/Star");
443
+
444
+ /***/ }),
445
+
446
+ /***/ 158:
447
+ /***/ (function(module, exports) {
448
+
449
+ module.exports = require("@splunk/react-icons/Question");
450
+
451
+ /***/ }),
452
+
453
+ /***/ 16:
332
454
  /***/ (function(module, exports) {
333
455
 
334
456
  module.exports = require("@splunk/visualizations-shared/schemaUtils");
335
457
 
336
458
  /***/ }),
337
- /* 16 */
459
+
460
+ /***/ 17:
338
461
  /***/ (function(module, exports, __webpack_require__) {
339
462
 
340
463
  "use strict";
341
464
 
342
465
 
343
- var _toConsumableArray = __webpack_require__(7);
466
+ var _toConsumableArray = __webpack_require__(8);
344
467
 
345
- var _defineProperty = __webpack_require__(6);
468
+ var _defineProperty = __webpack_require__(7);
346
469
 
347
470
  var __rest = this && this.__rest || function (s, e) {
348
471
  var t = {};
@@ -364,9 +487,9 @@ exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig
364
487
 
365
488
  var lodash_1 = __webpack_require__(3);
366
489
 
367
- var schemaUtils_1 = __webpack_require__(15);
490
+ var schemaUtils_1 = __webpack_require__(16);
368
491
 
369
- var VizBehavior_1 = __webpack_require__(5);
492
+ var VizBehavior_1 = __webpack_require__(6);
370
493
 
371
494
  var dynamicOptionsDSLType = {
372
495
  type: 'string',
@@ -570,25 +693,43 @@ var insertLayout = function insertLayout(layout, index) {
570
693
  exports.insertLayout = insertLayout;
571
694
 
572
695
  /***/ }),
573
- /* 17 */
696
+
697
+ /***/ 18:
574
698
  /***/ (function(module, exports) {
575
699
 
576
700
  module.exports = require("@splunk/visualizations-shared/configUtils");
577
701
 
578
702
  /***/ }),
579
- /* 18 */
703
+
704
+ /***/ 19:
580
705
  /***/ (function(module, exports) {
581
706
 
582
707
  module.exports = require("@babel/runtime/helpers/createClass");
583
708
 
584
709
  /***/ }),
585
- /* 19 */
710
+
711
+ /***/ 2:
712
+ /***/ (function(module, exports) {
713
+
714
+ module.exports = require("@splunk/ui-utils/i18n");
715
+
716
+ /***/ }),
717
+
718
+ /***/ 20:
586
719
  /***/ (function(module, exports) {
587
720
 
588
721
  module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
589
722
 
590
723
  /***/ }),
591
- /* 20 */
724
+
725
+ /***/ 21:
726
+ /***/ (function(module, exports) {
727
+
728
+ module.exports = require("@splunk/themes/pick");
729
+
730
+ /***/ }),
731
+
732
+ /***/ 22:
592
733
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
593
734
 
594
735
  "use strict";
@@ -623,17 +764,17 @@ __webpack_require__.r(__webpack_exports__);
623
764
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lighten", function() { return lighten; });
624
765
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darken", function() { return darken; });
625
766
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "handleValueClickCallback", function() { return handleValueClickCallback; });
626
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
767
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
627
768
  /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
628
769
  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
629
770
  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
630
- /* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26);
771
+ /* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30);
631
772
  /* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_2__);
632
- /* harmony import */ var _splunk_visualizations_shared_domUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48);
773
+ /* harmony import */ var _splunk_visualizations_shared_domUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49);
633
774
  /* harmony import */ var _splunk_visualizations_shared_domUtils__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_domUtils__WEBPACK_IMPORTED_MODULE_3__);
634
- /* harmony import */ var _splunk_visualizations_shared_propUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23);
775
+ /* harmony import */ var _splunk_visualizations_shared_propUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24);
635
776
  /* harmony import */ var _splunk_visualizations_shared_propUtils__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_propUtils__WEBPACK_IMPORTED_MODULE_4__);
636
- /* harmony import */ var _splunk_visualizations_shared_colorConstants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43);
777
+ /* harmony import */ var _splunk_visualizations_shared_colorConstants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45);
637
778
  /* harmony import */ var _splunk_visualizations_shared_colorConstants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_colorConstants__WEBPACK_IMPORTED_MODULE_5__);
638
779
 
639
780
 
@@ -1596,43 +1737,36 @@ var handleValueClickCallback = function handleValueClickCallback(ev, majorValue,
1596
1737
  };
1597
1738
 
1598
1739
  /***/ }),
1599
- /* 21 */
1600
- /***/ (function(module, exports) {
1601
-
1602
- module.exports = require("@splunk/themes/pick");
1603
1740
 
1604
- /***/ }),
1605
- /* 22 */
1741
+ /***/ 23:
1606
1742
  /***/ (function(module, exports) {
1607
1743
 
1608
1744
  module.exports = require("@splunk/visualization-context/TimezoneContext");
1609
1745
 
1610
1746
  /***/ }),
1611
- /* 23 */
1747
+
1748
+ /***/ 24:
1612
1749
  /***/ (function(module, exports) {
1613
1750
 
1614
1751
  module.exports = require("@splunk/visualizations-shared/propUtils");
1615
1752
 
1616
1753
  /***/ }),
1617
- /* 24 */
1754
+
1755
+ /***/ 25:
1618
1756
  /***/ (function(module, exports) {
1619
1757
 
1620
1758
  module.exports = require("@splunk/visualizations-shared/hocUtils");
1621
1759
 
1622
1760
  /***/ }),
1623
- /* 25 */
1761
+
1762
+ /***/ 26:
1624
1763
  /***/ (function(module, exports) {
1625
1764
 
1626
1765
  module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
1627
1766
 
1628
1767
  /***/ }),
1629
- /* 26 */
1630
- /***/ (function(module, exports) {
1631
1768
 
1632
- module.exports = require("@splunk/visualizations-shared/numberUtils");
1633
-
1634
- /***/ }),
1635
- /* 27 */
1769
+ /***/ 27:
1636
1770
  /***/ (function(module, exports, __webpack_require__) {
1637
1771
 
1638
1772
  "use strict";
@@ -1651,9 +1785,9 @@ var lodash_1 = __webpack_require__(3);
1651
1785
 
1652
1786
  var i18n_1 = __webpack_require__(2);
1653
1787
 
1654
- var Message_1 = __webpack_require__(9);
1788
+ var Message_1 = __webpack_require__(10);
1655
1789
 
1656
- var FixedSizeContainer_1 = __webpack_require__(12);
1790
+ var FixedSizeContainer_1 = __webpack_require__(13);
1657
1791
  /**
1658
1792
  * @method shouldShowIconPlaceholder
1659
1793
  * @param {object} dataSources
@@ -1723,13 +1857,14 @@ IconPlaceholder.defaultProps = {
1723
1857
  exports.default = FixedSizeContainer_1.default(IconPlaceholder);
1724
1858
 
1725
1859
  /***/ }),
1726
- /* 28 */
1860
+
1861
+ /***/ 28:
1727
1862
  /***/ (function(module, exports, __webpack_require__) {
1728
1863
 
1729
1864
  "use strict";
1730
1865
 
1731
1866
 
1732
- var _defineProperty = __webpack_require__(6);
1867
+ var _defineProperty = __webpack_require__(7);
1733
1868
 
1734
1869
  Object.defineProperty(exports, "__esModule", {
1735
1870
  value: true
@@ -1740,7 +1875,7 @@ var T = __webpack_require__(0);
1740
1875
 
1741
1876
  var lodash_1 = __webpack_require__(3);
1742
1877
 
1743
- var DataSource_1 = __webpack_require__(38);
1878
+ var DataSource_1 = __webpack_require__(39);
1744
1879
 
1745
1880
  exports.SortParamsPropTypes = T.shape({
1746
1881
  currentSortKey: T.string,
@@ -1793,7 +1928,8 @@ var getSortingParams = function getSortingParams(_ref) {
1793
1928
  exports.getSortingParams = getSortingParams;
1794
1929
 
1795
1930
  /***/ }),
1796
- /* 29 */
1931
+
1932
+ /***/ 29:
1797
1933
  /***/ (function(module, exports, __webpack_require__) {
1798
1934
 
1799
1935
  "use strict";
@@ -1857,19 +1993,34 @@ var getPaginationParams = function getPaginationParams(_ref) {
1857
1993
  exports.getPaginationParams = getPaginationParams;
1858
1994
 
1859
1995
  /***/ }),
1860
- /* 30 */
1861
- /***/ (function(module, exports, __webpack_require__) {
1862
1996
 
1863
- "use strict";
1997
+ /***/ 3:
1998
+ /***/ (function(module, exports) {
1864
1999
 
2000
+ module.exports = require("lodash");
1865
2001
 
1866
- Object.defineProperty(exports, "__esModule", {
1867
- value: true
1868
- });
1869
- exports.VizCategory = void 0;
1870
- var VizCategory;
2002
+ /***/ }),
1871
2003
 
1872
- (function (VizCategory) {
2004
+ /***/ 30:
2005
+ /***/ (function(module, exports) {
2006
+
2007
+ module.exports = require("@splunk/visualizations-shared/numberUtils");
2008
+
2009
+ /***/ }),
2010
+
2011
+ /***/ 31:
2012
+ /***/ (function(module, exports, __webpack_require__) {
2013
+
2014
+ "use strict";
2015
+
2016
+
2017
+ Object.defineProperty(exports, "__esModule", {
2018
+ value: true
2019
+ });
2020
+ exports.VizCategory = void 0;
2021
+ var VizCategory;
2022
+
2023
+ (function (VizCategory) {
1873
2024
  VizCategory["SINGLE_VALUE"] = "Single Value";
1874
2025
  VizCategory["TRENDS"] = "Trends";
1875
2026
  VizCategory["COMPARISONS"] = "Comparisons";
@@ -1885,7 +2036,8 @@ var VizCategory;
1885
2036
  })(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
1886
2037
 
1887
2038
  /***/ }),
1888
- /* 31 */
2039
+
2040
+ /***/ 32:
1889
2041
  /***/ (function(module, exports, __webpack_require__) {
1890
2042
 
1891
2043
  "use strict";
@@ -1899,37 +2051,37 @@ var React = __webpack_require__(1);
1899
2051
 
1900
2052
  var lodash_1 = __webpack_require__(3);
1901
2053
 
1902
- var getSettingsFromThemedProps_1 = __webpack_require__(32);
2054
+ var getSettingsFromThemedProps_1 = __webpack_require__(33);
1903
2055
 
1904
- var Options_1 = __webpack_require__(33);
2056
+ var Options_1 = __webpack_require__(34);
1905
2057
 
1906
- var SanitizeProps_1 = __webpack_require__(34);
2058
+ var SanitizeProps_1 = __webpack_require__(35);
1907
2059
 
1908
- var TimezoneContext_1 = __webpack_require__(22);
2060
+ var TimezoneContext_1 = __webpack_require__(23);
1909
2061
 
1910
- var moment_1 = __webpack_require__(35);
2062
+ var moment_1 = __webpack_require__(36);
1911
2063
 
1912
2064
  var styled_components_1 = __webpack_require__(4);
1913
2065
 
1914
- var hocUtils_1 = __webpack_require__(24);
2066
+ var hocUtils_1 = __webpack_require__(25);
1915
2067
 
1916
- var JSONSchemaUtils_1 = __webpack_require__(25);
2068
+ var JSONSchemaUtils_1 = __webpack_require__(26);
1917
2069
 
1918
- var SplunkVisualization_1 = __webpack_require__(36);
2070
+ var SplunkVisualization_1 = __webpack_require__(37);
1919
2071
 
1920
- var VizBehavior_1 = __webpack_require__(5);
2072
+ var VizBehavior_1 = __webpack_require__(6);
1921
2073
 
1922
2074
  var getSorting_1 = __webpack_require__(28);
1923
2075
 
1924
2076
  var getPagination_1 = __webpack_require__(29);
1925
2077
 
1926
- var useDeepMemo_1 = __webpack_require__(39);
2078
+ var useDeepMemo_1 = __webpack_require__(40);
1927
2079
 
1928
- var MissingPropsMessage_1 = __webpack_require__(40);
2080
+ var MissingPropsMessage_1 = __webpack_require__(41);
1929
2081
 
1930
- var withEditModeCover_1 = __webpack_require__(41);
2082
+ var withEditModeCover_1 = __webpack_require__(42);
1931
2083
 
1932
- var withPlaceholder_1 = __webpack_require__(42);
2084
+ var withPlaceholder_1 = __webpack_require__(43);
1933
2085
  /**
1934
2086
  * hoc that wraps a pure react visualization in a Dashboard visualization
1935
2087
  * @param {DashboardVizOpts} opts
@@ -2130,37 +2282,42 @@ var withDashboardViz = function withDashboardViz(opts) {
2130
2282
  exports.default = withDashboardViz;
2131
2283
 
2132
2284
  /***/ }),
2133
- /* 32 */
2285
+
2286
+ /***/ 33:
2134
2287
  /***/ (function(module, exports) {
2135
2288
 
2136
2289
  module.exports = require("@splunk/themes/getSettingsFromThemedProps");
2137
2290
 
2138
2291
  /***/ }),
2139
- /* 33 */
2292
+
2293
+ /***/ 34:
2140
2294
  /***/ (function(module, exports) {
2141
2295
 
2142
2296
  module.exports = require("@splunk/visualization-encoding/Options");
2143
2297
 
2144
2298
  /***/ }),
2145
- /* 34 */
2299
+
2300
+ /***/ 35:
2146
2301
  /***/ (function(module, exports) {
2147
2302
 
2148
2303
  module.exports = require("@splunk/visualizations-shared/SanitizeProps");
2149
2304
 
2150
2305
  /***/ }),
2151
- /* 35 */
2306
+
2307
+ /***/ 36:
2152
2308
  /***/ (function(module, exports) {
2153
2309
 
2154
2310
  module.exports = require("@splunk/moment");
2155
2311
 
2156
2312
  /***/ }),
2157
- /* 36 */
2313
+
2314
+ /***/ 37:
2158
2315
  /***/ (function(module, exports, __webpack_require__) {
2159
2316
 
2160
2317
  "use strict";
2161
2318
 
2162
2319
 
2163
- var _classCallCheck = __webpack_require__(10);
2320
+ var _classCallCheck = __webpack_require__(11);
2164
2321
 
2165
2322
  Object.defineProperty(exports, "__esModule", {
2166
2323
  value: true
@@ -2172,7 +2329,7 @@ var T = __webpack_require__(0);
2172
2329
 
2173
2330
  var lodash_1 = __webpack_require__(3);
2174
2331
 
2175
- var VizActionHandler_1 = __webpack_require__(37); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
2332
+ var VizActionHandler_1 = __webpack_require__(38); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
2176
2333
 
2177
2334
 
2178
2335
  exports.INITIAL_WIDTH = 250;
@@ -2305,15 +2462,16 @@ SplunkVisualization.defaultProps = {
2305
2462
  exports.default = SplunkVisualization;
2306
2463
 
2307
2464
  /***/ }),
2308
- /* 37 */
2465
+
2466
+ /***/ 38:
2309
2467
  /***/ (function(module, exports, __webpack_require__) {
2310
2468
 
2311
2469
  "use strict";
2312
2470
 
2313
2471
 
2314
- var _classCallCheck = __webpack_require__(10);
2472
+ var _classCallCheck = __webpack_require__(11);
2315
2473
 
2316
- var _createClass = __webpack_require__(18);
2474
+ var _createClass = __webpack_require__(19);
2317
2475
 
2318
2476
  Object.defineProperty(exports, "__esModule", {
2319
2477
  value: true
@@ -2342,7 +2500,8 @@ var DefaultVizActionHandler = /*#__PURE__*/function () {
2342
2500
  exports.DefaultVizActionHandler = DefaultVizActionHandler;
2343
2501
 
2344
2502
  /***/ }),
2345
- /* 38 */
2503
+
2504
+ /***/ 39:
2346
2505
  /***/ (function(module, exports, __webpack_require__) {
2347
2506
 
2348
2507
  "use strict";
@@ -2355,7 +2514,15 @@ exports.validSortDirs = void 0;
2355
2514
  exports.validSortDirs = ['asc', 'desc', 'none'];
2356
2515
 
2357
2516
  /***/ }),
2358
- /* 39 */
2517
+
2518
+ /***/ 4:
2519
+ /***/ (function(module, exports) {
2520
+
2521
+ module.exports = require("styled-components");
2522
+
2523
+ /***/ }),
2524
+
2525
+ /***/ 40:
2359
2526
  /***/ (function(module, exports, __webpack_require__) {
2360
2527
 
2361
2528
  "use strict";
@@ -2400,7 +2567,8 @@ var useDeepMemo = function useDeepMemo(fn, dependencies) {
2400
2567
  exports.useDeepMemo = useDeepMemo;
2401
2568
 
2402
2569
  /***/ }),
2403
- /* 40 */
2570
+
2571
+ /***/ 41:
2404
2572
  /***/ (function(module, exports, __webpack_require__) {
2405
2573
 
2406
2574
  "use strict";
@@ -2417,9 +2585,9 @@ var T = __webpack_require__(0);
2417
2585
 
2418
2586
  var i18n_1 = __webpack_require__(2);
2419
2587
 
2420
- var Message_1 = __webpack_require__(9);
2588
+ var Message_1 = __webpack_require__(10);
2421
2589
 
2422
- var FixedSizeContainer_1 = __webpack_require__(12);
2590
+ var FixedSizeContainer_1 = __webpack_require__(13);
2423
2591
  /**
2424
2592
  * @method isMissing
2425
2593
  * @param {any} v
@@ -2480,7 +2648,8 @@ exports.MissingPropsMessage.defaultProps = {
2480
2648
  exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
2481
2649
 
2482
2650
  /***/ }),
2483
- /* 41 */
2651
+
2652
+ /***/ 42:
2484
2653
  /***/ (function(module, exports, __webpack_require__) {
2485
2654
 
2486
2655
  "use strict";
@@ -2494,14 +2663,14 @@ var React = __webpack_require__(1);
2494
2663
 
2495
2664
  var styled_components_1 = __webpack_require__(4);
2496
2665
 
2497
- var hocUtils_1 = __webpack_require__(13);
2666
+ var hocUtils_1 = __webpack_require__(14);
2498
2667
 
2499
2668
  var Cover = styled_components_1.default.div.withConfig({
2500
2669
  displayName: "withEditModeCover__Cover",
2501
2670
  componentId: "sc-1gsbnxb-0"
2502
2671
  })(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
2503
2672
  var Blocker = styled_components_1.default.div.attrs({
2504
- 'data-splunk-visualization-version': "25.1.0 - 812a9a4d8"
2673
+ 'data-splunk-visualization-version': "25.2.0 - 4373c5a66"
2505
2674
  }).withConfig({
2506
2675
  displayName: "withEditModeCover__Blocker",
2507
2676
  componentId: "sc-1gsbnxb-1"
@@ -2532,7 +2701,8 @@ var withEditModeCover = function withEditModeCover(Visualization, disableEditMod
2532
2701
  exports.default = withEditModeCover;
2533
2702
 
2534
2703
  /***/ }),
2535
- /* 42 */
2704
+
2705
+ /***/ 43:
2536
2706
  /***/ (function(module, exports, __webpack_require__) {
2537
2707
 
2538
2708
  "use strict";
@@ -2544,15 +2714,15 @@ Object.defineProperty(exports, "__esModule", {
2544
2714
 
2545
2715
  var React = __webpack_require__(1);
2546
2716
 
2547
- var colorUtils_1 = __webpack_require__(11);
2717
+ var colorUtils_1 = __webpack_require__(12);
2548
2718
 
2549
- var variables_1 = __webpack_require__(8);
2719
+ var variables_1 = __webpack_require__(9);
2550
2720
 
2551
2721
  var IconPlaceholder_1 = __webpack_require__(27);
2552
2722
 
2553
- var VizBehavior_1 = __webpack_require__(5);
2723
+ var VizBehavior_1 = __webpack_require__(6);
2554
2724
 
2555
- var hocUtils_1 = __webpack_require__(13);
2725
+ var hocUtils_1 = __webpack_require__(14);
2556
2726
 
2557
2727
  var withPlaceholder = function withPlaceholder(Visualization) {
2558
2728
  var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
@@ -2596,826 +2766,176 @@ var withPlaceholder = function withPlaceholder(Visualization) {
2596
2766
  exports.default = withPlaceholder;
2597
2767
 
2598
2768
  /***/ }),
2599
- /* 43 */
2600
- /***/ (function(module, exports) {
2601
2769
 
2602
- module.exports = require("@splunk/visualizations-shared/colorConstants");
2770
+ /***/ 443:
2771
+ /***/ (function(module, exports, __webpack_require__) {
2603
2772
 
2604
- /***/ }),
2605
- /* 44 */,
2606
- /* 45 */,
2607
- /* 46 */,
2608
- /* 47 */
2609
- /***/ (function(module, exports) {
2773
+ "use strict";
2610
2774
 
2611
- module.exports = require("@babel/runtime/helpers/extends");
2612
2775
 
2613
- /***/ }),
2614
- /* 48 */
2615
- /***/ (function(module, exports) {
2776
+ Object.defineProperty(exports, "__esModule", {
2777
+ value: true
2778
+ });
2779
+ exports.themes = exports.computeVizProps = exports.PureSingleValueIcon = exports.config = void 0;
2616
2780
 
2617
- module.exports = require("@splunk/visualizations-shared/domUtils");
2781
+ var React = __webpack_require__(1);
2618
2782
 
2619
- /***/ }),
2620
- /* 49 */,
2621
- /* 50 */,
2622
- /* 51 */,
2623
- /* 52 */,
2624
- /* 53 */
2625
- /***/ (function(module, exports) {
2783
+ var RemoteIcon_1 = __webpack_require__(444);
2626
2784
 
2627
- module.exports = require("@splunk/visualization-color-palettes/editors/PresetPalettes");
2785
+ var iconUtils_1 = __webpack_require__(445);
2628
2786
 
2629
- /***/ }),
2630
- /* 54 */,
2631
- /* 55 */,
2632
- /* 56 */,
2633
- /* 57 */,
2634
- /* 58 */,
2635
- /* 59 */,
2636
- /* 60 */,
2637
- /* 61 */,
2638
- /* 62 */
2639
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2787
+ var SingleValueIcon_1 = __webpack_require__(464);
2640
2788
 
2641
- "use strict";
2642
- __webpack_require__.r(__webpack_exports__);
2643
- /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
2644
- /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_0__);
2789
+ var withDashboardViz_1 = __webpack_require__(32);
2790
+
2791
+ var config_1 = __webpack_require__(446);
2792
+
2793
+ exports.config = config_1.default;
2794
+ exports.PureSingleValueIcon = SingleValueIcon_1.default;
2795
+
2796
+ var computeVizProps = function computeVizProps(_ref) {
2797
+ var icon = _ref.icon,
2798
+ _ref$IconComponent = _ref.IconComponent,
2799
+ IconComponent = _ref$IconComponent === void 0 ? null : _ref$IconComponent,
2800
+ themeFunc = _ref.themeFunc;
2801
+
2802
+ if (icon && (iconUtils_1.isRemoteIcon(icon) || iconUtils_1.isDataURI(icon))) {
2803
+ // eslint-disable-next-line no-param-reassign
2804
+ IconComponent = React.createElement(RemoteIcon_1.default, {
2805
+ iconURL: icon
2806
+ });
2807
+ }
2645
2808
 
2646
- var VizStyleWrapper = styled_components__WEBPACK_IMPORTED_MODULE_0___default.a.div.attrs(function (_ref) {
2647
- var dataTestKey = _ref.dataTestKey;
2648
2809
  return {
2649
- 'data-test': dataTestKey
2810
+ IconComponent: IconComponent,
2811
+ defaultFontColor: themeFunc('defaultFontColor'),
2812
+ defaultBlockFontColor: themeFunc('defaultBlockFontColor')
2650
2813
  };
2651
- }).withConfig({
2652
- displayName: "VizStyleWrapper",
2653
- componentId: "sc-6rw6wv-0"
2654
- })(["display:flex;justify-content:center;flex-direction:column;width:100%;height:100%;background-color:", ";"], function (props) {
2655
- return props.backgroundColor;
2814
+ };
2815
+
2816
+ exports.computeVizProps = computeVizProps;
2817
+ var viz = withDashboardViz_1.default({
2818
+ ReactViz: SingleValueIcon_1.default,
2819
+ vizConfig: config_1.default,
2820
+ computeVizProps: exports.computeVizProps
2656
2821
  });
2657
- VizStyleWrapper.displayName = 'VizStyleWrapper';
2658
- /* harmony default export */ __webpack_exports__["default"] = (VizStyleWrapper);
2822
+ exports.themes = config_1.default.themes;
2823
+ exports.default = viz;
2659
2824
 
2660
2825
  /***/ }),
2661
- /* 63 */,
2662
- /* 64 */,
2663
- /* 65 */,
2664
- /* 66 */,
2665
- /* 67 */,
2666
- /* 68 */,
2667
- /* 69 */,
2668
- /* 70 */
2826
+
2827
+ /***/ 444:
2669
2828
  /***/ (function(module, exports) {
2670
2829
 
2671
- module.exports = require("lodash/pick");
2830
+ module.exports = require("@splunk/visualizations-shared/RemoteIcon");
2672
2831
 
2673
2832
  /***/ }),
2674
- /* 71 */
2833
+
2834
+ /***/ 445:
2675
2835
  /***/ (function(module, exports) {
2676
2836
 
2677
- module.exports = require("lodash/isEmpty");
2837
+ module.exports = require("@splunk/visualizations-shared/iconUtils");
2678
2838
 
2679
2839
  /***/ }),
2680
- /* 72 */,
2681
- /* 73 */,
2682
- /* 74 */,
2683
- /* 75 */,
2684
- /* 76 */,
2685
- /* 77 */
2686
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2840
+
2841
+ /***/ 446:
2842
+ /***/ (function(module, exports, __webpack_require__) {
2687
2843
 
2688
2844
  "use strict";
2689
- __webpack_require__.r(__webpack_exports__);
2690
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
2691
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
2692
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
2693
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
2694
2845
 
2695
2846
 
2696
- var StaticBackgroundColorEditor = {
2697
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Static Background'),
2698
- option: 'backgroundColor',
2699
- editor: 'editor.color',
2700
- showEditor: function showEditor(_ref) {
2701
- var options = _ref.options;
2702
- return !Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.backgroundColor);
2703
- }
2704
- };
2705
- /* harmony default export */ __webpack_exports__["default"] = (StaticBackgroundColorEditor);
2847
+ var _toConsumableArray = __webpack_require__(8);
2706
2848
 
2707
- /***/ }),
2708
- /* 78 */,
2709
- /* 79 */,
2710
- /* 80 */,
2711
- /* 81 */,
2712
- /* 82 */,
2713
- /* 83 */
2714
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2849
+ Object.defineProperty(exports, "__esModule", {
2850
+ value: true
2851
+ });
2715
2852
 
2716
- "use strict";
2717
- __webpack_require__.r(__webpack_exports__);
2718
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicMajorColorEditor", function() { return getDynamicMajorColorEditor; });
2719
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
2720
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
2721
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
2722
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
2853
+ var i18n_1 = __webpack_require__(2);
2723
2854
 
2855
+ var schemaUtils_1 = __webpack_require__(16);
2724
2856
 
2725
- var getDynamicMajorColorEditor = function getDynamicMajorColorEditor(_ref) {
2726
- var defaultContext = _ref.defaultContext,
2727
- defaultPalettesConfig = _ref.defaultPalettesConfig;
2728
- return {
2729
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic Major Value'),
2730
- option: 'majorColor',
2731
- context: 'majorColorEditorConfig',
2732
- editor: 'editor.dynamicColor',
2733
- showEditor: function showEditor(_ref2) {
2734
- var options = _ref2.options;
2735
- return Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.majorColor);
2736
- },
2737
- editorProps: {
2738
- labelPosition: 'left',
2739
- flyoutTitle: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic Coloring: Major Value'),
2740
- formatters: [{
2741
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Ranges'),
2742
- value: 'rangeValue',
2743
- defaults: {
2744
- majorValue: defaultContext.majorColorConfig
2745
- }
2746
- }, {
2747
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Matches'),
2748
- value: 'matchValue',
2749
- defaults: {
2750
- majorValue: defaultContext.majorColorMatchConfig
2751
- }
2752
- }],
2753
- dataSelectors: [{
2754
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Major Value'),
2755
- value: 'majorValue'
2756
- }],
2757
- defaultPalettesConfig: defaultPalettesConfig
2758
- }
2759
- };
2760
- };
2857
+ var PresetPalettes_1 = __webpack_require__(54);
2761
2858
 
2762
- /***/ }),
2763
- /* 84 */
2764
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2859
+ var pick_1 = __webpack_require__(21);
2765
2860
 
2766
- "use strict";
2767
- __webpack_require__.r(__webpack_exports__);
2768
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicTrendColorEditor", function() { return getDynamicTrendColorEditor; });
2769
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
2770
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
2771
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
2772
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
2861
+ var variables_1 = __webpack_require__(9);
2773
2862
 
2863
+ var configUtils_1 = __webpack_require__(18);
2774
2864
 
2775
- var getDynamicTrendColorEditor = function getDynamicTrendColorEditor(_ref) {
2776
- var defaultContext = _ref.defaultContext,
2777
- defaultPalettesConfig = _ref.defaultPalettesConfig;
2778
- return {
2779
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic Trend'),
2780
- option: 'trendColor',
2781
- context: 'trendColorEditorConfig',
2782
- editor: 'editor.dynamicColor',
2783
- showEditor: function showEditor(_ref2) {
2784
- var options = _ref2.options;
2785
- return Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.trendColor);
2786
- },
2787
- editorProps: {
2788
- labelPosition: 'left',
2789
- flyoutTitle: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic Coloring: Trend'),
2790
- formatters: [{
2791
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Ranges'),
2792
- value: 'rangeValue',
2793
- defaults: {
2794
- trendValue: defaultContext.trendColorConfig
2795
- }
2796
- }],
2797
- dataSelectors: [{
2798
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Trend'),
2799
- value: 'trendValue'
2800
- }],
2801
- defaultPalettesConfig: defaultPalettesConfig
2802
- }
2803
- };
2804
- };
2865
+ var singleValueContext_1 = __webpack_require__(118);
2805
2866
 
2806
- /***/ }),
2807
- /* 85 */
2808
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2867
+ var StaticMajorAndTrendLayout_1 = __webpack_require__(119);
2809
2868
 
2810
- "use strict";
2811
- __webpack_require__.r(__webpack_exports__);
2812
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicBackgroundColorEditor", function() { return getDynamicBackgroundColorEditor; });
2813
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
2814
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
2815
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
2816
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
2869
+ var StaticBackgroundColorEditor_1 = __webpack_require__(78);
2817
2870
 
2871
+ var StaticIconColorEditor_1 = __webpack_require__(447);
2818
2872
 
2819
- var getDynamicBackgroundColorEditor = function getDynamicBackgroundColorEditor(_ref) {
2820
- var defaultContext = _ref.defaultContext,
2821
- defaultPalettesConfig = _ref.defaultPalettesConfig;
2822
- return {
2823
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic Background'),
2824
- option: 'backgroundColor',
2825
- context: 'backgroundColorEditorConfig',
2826
- editor: 'editor.dynamicColor',
2827
- showEditor: function showEditor(_ref2) {
2828
- var options = _ref2.options;
2829
- return Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.backgroundColor);
2830
- },
2831
- editorProps: {
2832
- labelPosition: 'left',
2833
- flyoutTitle: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic Coloring: Background'),
2834
- formatters: [{
2835
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Ranges'),
2836
- value: 'rangeValue',
2837
- defaults: {
2838
- majorValue: defaultContext.majorColorConfig,
2839
- trendValue: defaultContext.trendColorConfig
2840
- }
2841
- }, {
2842
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Matches'),
2843
- value: 'matchValue',
2844
- defaults: {
2845
- majorValue: defaultContext.majorColorMatchConfig
2846
- }
2847
- }],
2848
- dataSelectors: [{
2849
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Major Value'),
2850
- value: 'majorValue'
2851
- }, {
2852
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Trend'),
2853
- value: 'trendValue'
2854
- }],
2855
- defaultPalettesConfig: defaultPalettesConfig
2856
- }
2857
- };
2858
- };
2873
+ var StaticMajorColorEditor_1 = __webpack_require__(90);
2859
2874
 
2860
- /***/ }),
2861
- /* 86 */
2862
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2875
+ var StaticTrendColorEditor_1 = __webpack_require__(91);
2863
2876
 
2864
- "use strict";
2865
- __webpack_require__.r(__webpack_exports__);
2866
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
2867
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
2868
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
2869
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
2877
+ var DynamicMajorColorEditor_1 = __webpack_require__(87);
2870
2878
 
2879
+ var DynamicTrendColorEditor_1 = __webpack_require__(88);
2871
2880
 
2872
- var StaticMajorColorEditor = {
2873
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Static Major Value'),
2874
- option: 'majorColor',
2875
- editor: 'editor.color',
2876
- showEditor: function showEditor(_ref) {
2877
- var options = _ref.options;
2878
- return !Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.majorColor);
2879
- }
2880
- };
2881
- /* harmony default export */ __webpack_exports__["default"] = (StaticMajorColorEditor);
2881
+ var DynamicBackgroundColorEditor_1 = __webpack_require__(89);
2882
2882
 
2883
- /***/ }),
2884
- /* 87 */
2885
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2883
+ var VizBehavior_1 = __webpack_require__(6);
2886
2884
 
2887
- "use strict";
2888
- __webpack_require__.r(__webpack_exports__);
2889
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
2890
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
2891
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
2892
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
2885
+ var configUtils_2 = __webpack_require__(17);
2893
2886
 
2887
+ var VizCategory_1 = __webpack_require__(31);
2894
2888
 
2895
- var StaticTrendColorEditor = {
2896
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Static Trend'),
2897
- option: 'trendColor',
2898
- editor: 'editor.color',
2899
- showEditor: function showEditor(_ref) {
2900
- var options = _ref.options;
2901
- return !Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.trendColor);
2902
- },
2903
- isDisabled: function isDisabled(_ref2) {
2904
- var options = _ref2.options;
2905
- return options.trendDisplay === 'off';
2889
+ var dataContract = {
2890
+ requiredDataSources: [{
2891
+ name: 'primary',
2892
+ description: 'DataSource that powers the visualization'
2893
+ }],
2894
+ optionalDataSources: [],
2895
+ initialRequestParams: {
2896
+ primary: {
2897
+ offset: 0,
2898
+ count: 10000
2899
+ }
2906
2900
  }
2907
2901
  };
2908
- /* harmony default export */ __webpack_exports__["default"] = (StaticTrendColorEditor);
2909
-
2910
- /***/ }),
2911
- /* 88 */,
2912
- /* 89 */,
2913
- /* 90 */,
2914
- /* 91 */,
2915
- /* 92 */,
2916
- /* 93 */,
2917
- /* 94 */,
2918
- /* 95 */,
2919
- /* 96 */,
2920
- /* 97 */,
2921
- /* 98 */,
2922
- /* 99 */,
2923
- /* 100 */,
2924
- /* 101 */,
2925
- /* 102 */,
2926
- /* 103 */,
2927
- /* 104 */,
2928
- /* 105 */,
2929
- /* 106 */,
2930
- /* 107 */,
2931
- /* 108 */,
2932
- /* 109 */,
2933
- /* 110 */,
2934
- /* 111 */
2935
- /***/ (function(module, exports, __webpack_require__) {
2936
-
2937
- "use strict";
2938
-
2939
-
2940
- Object.defineProperty(exports, "__esModule", {
2941
- value: true
2942
- });
2943
- exports.defaultContext = void 0;
2944
- exports.defaultContext = {
2945
- trendColorConfig: [{
2946
- to: 0,
2947
- value: '#9E2520'
2948
- }, {
2949
- from: 0,
2950
- value: '#1C6B2D'
2951
- }],
2952
- majorColorConfig: [{
2953
- to: 20,
2954
- value: '#D41F1F'
2955
- }, {
2956
- from: 20,
2957
- to: 40,
2958
- value: '#D94E17'
2959
- }, {
2960
- from: 40,
2961
- to: 60,
2962
- value: '#CBA700'
2963
- }, {
2964
- from: 60,
2965
- to: 80,
2966
- value: '#669922'
2967
- }, {
2968
- from: 80,
2969
- value: '#118832'
2970
- }],
2971
- majorColorMatchConfig: [{
2972
- match: '',
2973
- value: '#5C33FF'
2974
- }]
2902
+ var size = {
2903
+ initialWidth: 250,
2904
+ initialHeight: 250
2975
2905
  };
2976
-
2977
- /***/ }),
2978
- /* 112 */
2979
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2980
-
2981
- "use strict";
2982
- __webpack_require__.r(__webpack_exports__);
2983
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
2984
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
2985
-
2986
- var StaticMajorAndTrendLayout = [[{
2987
- label: 'Unit Position',
2988
- // todo: we need a new editor combining unit and position
2989
- option: 'unitPosition',
2990
- editor: 'editor.select',
2991
- editorProps: {
2992
- values: [{
2993
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Before'),
2994
- value: 'before'
2995
- }, {
2996
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('After'),
2997
- value: 'after'
2998
- }]
2906
+ var optionsSchema = {
2907
+ backgroundColor: {
2908
+ default: 'transparent',
2909
+ description: 'Specify the color for the background. You may use a dataSource to apply the color. The hex value format should be “#FFFFFF”.',
2910
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
2911
+ type: 'string'
2999
2912
  },
3000
- showEditor: function showEditor(_ref) {
3001
- var options = _ref.options;
3002
- return options.showValue || options.showValue === undefined;
3003
- }
3004
- }, {
3005
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Unit Label'),
3006
- option: 'unit',
3007
- editor: 'editor.text',
3008
- showEditor: function showEditor(_ref2) {
3009
- var options = _ref2.options;
3010
- return options.showValue || options.showValue === undefined;
3011
- }
3012
- }], [{
3013
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Precision'),
3014
- option: 'numberPrecision',
3015
- editor: 'editor.number',
3016
- editorProps: {
3017
- min: 0,
3018
- max: 20
2913
+ icon: {
2914
+ default: 'default',
2915
+ description: 'Specify an icon.',
2916
+ type: 'string'
3019
2917
  },
3020
- showEditor: function showEditor(_ref3) {
3021
- var options = _ref3.options;
3022
- return options.showValue || options.showValue === undefined;
3023
- }
3024
- }, {
3025
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Major Value Size (px)'),
3026
- option: 'majorFontSize',
3027
- editor: 'editor.number',
3028
- editorProps: {
3029
- min: 1
2918
+ iconColor: {
2919
+ default: null,
2920
+ description: 'Specify the color for the icon. You may use a dataSource to apply the color. The hex value format should be “#FFFFFF”. The default for enterprise light is "#000000". The default for enterprise dark is "#ffffff". The default for prisma dark is "rgba(255, 255, 255, 0.98)".',
2921
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
2922
+ type: 'string'
3030
2923
  },
3031
- placeholder: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Auto'),
3032
- showEditor: function showEditor(_ref4) {
3033
- var options = _ref4.options;
3034
- return options.showValue || options.showValue === undefined;
3035
- }
3036
- }], [{
3037
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Trend Display'),
3038
- option: 'trendDisplay',
3039
- editor: 'editor.select',
3040
- editorProps: {
3041
- values: [{
3042
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Percent'),
3043
- value: 'percent'
3044
- }, {
3045
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Absolute'),
3046
- value: 'absolute'
3047
- }, {
3048
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Off'),
3049
- value: 'off'
3050
- }]
2924
+ iconOpacity: {
2925
+ default: 1,
2926
+ description: 'Specify the opacity for the icon using a number between 0 and 1 (inclusive).',
2927
+ type: 'number'
3051
2928
  },
3052
- showEditor: function showEditor(_ref5) {
3053
- var options = _ref5.options;
3054
- return options.showValue || options.showValue === undefined;
3055
- }
3056
- }, {
3057
- label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Trend Size (px)'),
3058
- option: 'trendFontSize',
3059
- editor: 'editor.number',
3060
- editorProps: {
3061
- min: 1
2929
+ iconPosition: {
2930
+ default: 'before',
2931
+ description: 'Specify where to display the icon in relation to the major value.',
2932
+ type: 'string'
3062
2933
  },
3063
- placeholder: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Auto'),
3064
- showEditor: function showEditor(_ref6) {
3065
- var options = _ref6.options;
3066
- return options.showValue || options.showValue === undefined;
3067
- },
3068
- isDisabled: function isDisabled(_ref7) {
3069
- var options = _ref7.options;
3070
- return options.trendDisplay === 'off';
3071
- }
3072
- }]];
3073
- /* harmony default export */ __webpack_exports__["default"] = (StaticMajorAndTrendLayout);
3074
-
3075
- /***/ }),
3076
- /* 113 */,
3077
- /* 114 */,
3078
- /* 115 */,
3079
- /* 116 */,
3080
- /* 117 */,
3081
- /* 118 */
3082
- /***/ (function(module, exports) {
3083
-
3084
- module.exports = require("@splunk/visualizations/SingleValueBasic");
3085
-
3086
- /***/ }),
3087
- /* 119 */,
3088
- /* 120 */,
3089
- /* 121 */,
3090
- /* 122 */,
3091
- /* 123 */,
3092
- /* 124 */,
3093
- /* 125 */,
3094
- /* 126 */,
3095
- /* 127 */,
3096
- /* 128 */,
3097
- /* 129 */,
3098
- /* 130 */,
3099
- /* 131 */,
3100
- /* 132 */,
3101
- /* 133 */,
3102
- /* 134 */,
3103
- /* 135 */,
3104
- /* 136 */,
3105
- /* 137 */,
3106
- /* 138 */,
3107
- /* 139 */,
3108
- /* 140 */,
3109
- /* 141 */,
3110
- /* 142 */,
3111
- /* 143 */
3112
- /***/ (function(module, exports) {
3113
-
3114
- module.exports = require("@splunk/react-icons/Activity");
3115
-
3116
- /***/ }),
3117
- /* 144 */
3118
- /***/ (function(module, exports) {
3119
-
3120
- module.exports = require("@splunk/react-icons/Clock");
3121
-
3122
- /***/ }),
3123
- /* 145 */
3124
- /***/ (function(module, exports) {
3125
-
3126
- module.exports = require("@splunk/react-icons/Pencil");
3127
-
3128
- /***/ }),
3129
- /* 146 */
3130
- /***/ (function(module, exports) {
3131
-
3132
- module.exports = require("@splunk/react-icons/Star");
3133
-
3134
- /***/ }),
3135
- /* 147 */
3136
- /***/ (function(module, exports) {
3137
-
3138
- module.exports = require("@splunk/react-icons/Question");
3139
-
3140
- /***/ }),
3141
- /* 148 */,
3142
- /* 149 */,
3143
- /* 150 */,
3144
- /* 151 */,
3145
- /* 152 */,
3146
- /* 153 */,
3147
- /* 154 */,
3148
- /* 155 */,
3149
- /* 156 */,
3150
- /* 157 */,
3151
- /* 158 */,
3152
- /* 159 */,
3153
- /* 160 */,
3154
- /* 161 */,
3155
- /* 162 */,
3156
- /* 163 */,
3157
- /* 164 */,
3158
- /* 165 */,
3159
- /* 166 */,
3160
- /* 167 */,
3161
- /* 168 */,
3162
- /* 169 */,
3163
- /* 170 */,
3164
- /* 171 */,
3165
- /* 172 */,
3166
- /* 173 */,
3167
- /* 174 */,
3168
- /* 175 */,
3169
- /* 176 */,
3170
- /* 177 */,
3171
- /* 178 */,
3172
- /* 179 */,
3173
- /* 180 */,
3174
- /* 181 */,
3175
- /* 182 */,
3176
- /* 183 */,
3177
- /* 184 */,
3178
- /* 185 */,
3179
- /* 186 */,
3180
- /* 187 */,
3181
- /* 188 */,
3182
- /* 189 */,
3183
- /* 190 */,
3184
- /* 191 */,
3185
- /* 192 */,
3186
- /* 193 */,
3187
- /* 194 */,
3188
- /* 195 */,
3189
- /* 196 */,
3190
- /* 197 */,
3191
- /* 198 */,
3192
- /* 199 */,
3193
- /* 200 */,
3194
- /* 201 */,
3195
- /* 202 */,
3196
- /* 203 */,
3197
- /* 204 */,
3198
- /* 205 */,
3199
- /* 206 */,
3200
- /* 207 */,
3201
- /* 208 */,
3202
- /* 209 */,
3203
- /* 210 */,
3204
- /* 211 */,
3205
- /* 212 */,
3206
- /* 213 */,
3207
- /* 214 */,
3208
- /* 215 */,
3209
- /* 216 */,
3210
- /* 217 */,
3211
- /* 218 */,
3212
- /* 219 */,
3213
- /* 220 */,
3214
- /* 221 */,
3215
- /* 222 */,
3216
- /* 223 */,
3217
- /* 224 */,
3218
- /* 225 */,
3219
- /* 226 */,
3220
- /* 227 */,
3221
- /* 228 */,
3222
- /* 229 */,
3223
- /* 230 */,
3224
- /* 231 */,
3225
- /* 232 */,
3226
- /* 233 */,
3227
- /* 234 */,
3228
- /* 235 */,
3229
- /* 236 */,
3230
- /* 237 */,
3231
- /* 238 */,
3232
- /* 239 */,
3233
- /* 240 */,
3234
- /* 241 */,
3235
- /* 242 */,
3236
- /* 243 */,
3237
- /* 244 */,
3238
- /* 245 */,
3239
- /* 246 */,
3240
- /* 247 */,
3241
- /* 248 */,
3242
- /* 249 */,
3243
- /* 250 */,
3244
- /* 251 */,
3245
- /* 252 */,
3246
- /* 253 */,
3247
- /* 254 */,
3248
- /* 255 */,
3249
- /* 256 */,
3250
- /* 257 */,
3251
- /* 258 */,
3252
- /* 259 */,
3253
- /* 260 */
3254
- /***/ (function(module, exports, __webpack_require__) {
3255
-
3256
- "use strict";
3257
-
3258
-
3259
- Object.defineProperty(exports, "__esModule", {
3260
- value: true
3261
- });
3262
- exports.themes = exports.computeVizProps = exports.PureSingleValueIcon = exports.config = void 0;
3263
-
3264
- var React = __webpack_require__(1);
3265
-
3266
- var RemoteIcon_1 = __webpack_require__(261);
3267
-
3268
- var iconUtils_1 = __webpack_require__(262);
3269
-
3270
- var SingleValueIcon_1 = __webpack_require__(281);
3271
-
3272
- var withDashboardViz_1 = __webpack_require__(31);
3273
-
3274
- var config_1 = __webpack_require__(263);
3275
-
3276
- exports.config = config_1.default;
3277
- exports.PureSingleValueIcon = SingleValueIcon_1.default;
3278
-
3279
- var computeVizProps = function computeVizProps(_ref) {
3280
- var icon = _ref.icon,
3281
- _ref$IconComponent = _ref.IconComponent,
3282
- IconComponent = _ref$IconComponent === void 0 ? null : _ref$IconComponent,
3283
- themeFunc = _ref.themeFunc;
3284
-
3285
- if (icon && (iconUtils_1.isRemoteIcon(icon) || iconUtils_1.isDataURI(icon))) {
3286
- // eslint-disable-next-line no-param-reassign
3287
- IconComponent = React.createElement(RemoteIcon_1.default, {
3288
- iconURL: icon
3289
- });
3290
- }
3291
-
3292
- return {
3293
- IconComponent: IconComponent,
3294
- defaultFontColor: themeFunc('defaultFontColor'),
3295
- defaultBlockFontColor: themeFunc('defaultBlockFontColor')
3296
- };
3297
- };
3298
-
3299
- exports.computeVizProps = computeVizProps;
3300
- var viz = withDashboardViz_1.default({
3301
- ReactViz: SingleValueIcon_1.default,
3302
- vizConfig: config_1.default,
3303
- computeVizProps: exports.computeVizProps
3304
- });
3305
- exports.themes = config_1.default.themes;
3306
- exports.default = viz;
3307
-
3308
- /***/ }),
3309
- /* 261 */
3310
- /***/ (function(module, exports) {
3311
-
3312
- module.exports = require("@splunk/visualizations-shared/RemoteIcon");
3313
-
3314
- /***/ }),
3315
- /* 262 */
3316
- /***/ (function(module, exports) {
3317
-
3318
- module.exports = require("@splunk/visualizations-shared/iconUtils");
3319
-
3320
- /***/ }),
3321
- /* 263 */
3322
- /***/ (function(module, exports, __webpack_require__) {
3323
-
3324
- "use strict";
3325
-
3326
-
3327
- var _toConsumableArray = __webpack_require__(7);
3328
-
3329
- Object.defineProperty(exports, "__esModule", {
3330
- value: true
3331
- });
3332
-
3333
- var i18n_1 = __webpack_require__(2);
3334
-
3335
- var schemaUtils_1 = __webpack_require__(15);
3336
-
3337
- var PresetPalettes_1 = __webpack_require__(53);
3338
-
3339
- var pick_1 = __webpack_require__(21);
3340
-
3341
- var variables_1 = __webpack_require__(8);
3342
-
3343
- var configUtils_1 = __webpack_require__(17);
3344
-
3345
- var singleValueContext_1 = __webpack_require__(111);
3346
-
3347
- var StaticMajorAndTrendLayout_1 = __webpack_require__(112);
3348
-
3349
- var StaticBackgroundColorEditor_1 = __webpack_require__(77);
3350
-
3351
- var StaticIconColorEditor_1 = __webpack_require__(264);
3352
-
3353
- var StaticMajorColorEditor_1 = __webpack_require__(86);
3354
-
3355
- var StaticTrendColorEditor_1 = __webpack_require__(87);
3356
-
3357
- var DynamicMajorColorEditor_1 = __webpack_require__(83);
3358
-
3359
- var DynamicTrendColorEditor_1 = __webpack_require__(84);
3360
-
3361
- var DynamicBackgroundColorEditor_1 = __webpack_require__(85);
3362
-
3363
- var VizBehavior_1 = __webpack_require__(5);
3364
-
3365
- var configUtils_2 = __webpack_require__(16);
3366
-
3367
- var VizCategory_1 = __webpack_require__(30);
3368
-
3369
- var dataContract = {
3370
- requiredDataSources: [{
3371
- name: 'primary',
3372
- description: 'DataSource that powers the visualization'
3373
- }],
3374
- optionalDataSources: [],
3375
- initialRequestParams: {
3376
- primary: {
3377
- offset: 0,
3378
- count: 10000
3379
- }
3380
- }
3381
- };
3382
- var size = {
3383
- initialWidth: 250,
3384
- initialHeight: 250
3385
- };
3386
- var optionsSchema = {
3387
- backgroundColor: {
3388
- default: 'transparent',
3389
- description: 'Specify the color for the background. You may use a dataSource to apply the color. The hex value format should be “#FFFFFF”.',
3390
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
3391
- type: 'string'
3392
- },
3393
- icon: {
3394
- default: 'default',
3395
- description: 'Specify an icon.',
3396
- type: 'string'
3397
- },
3398
- iconColor: {
3399
- default: null,
3400
- description: 'Specify the color for the icon. You may use a dataSource to apply the color. The hex value format should be “#FFFFFF”. The default for enterprise light is "#000000". The default for enterprise dark is "#ffffff". The default for prisma dark is "rgba(255, 255, 255, 0.98)".',
3401
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
3402
- type: 'string'
3403
- },
3404
- iconOpacity: {
3405
- default: 1,
3406
- description: 'Specify the opacity for the icon using a number between 0 and 1 (inclusive).',
3407
- type: 'number'
3408
- },
3409
- iconPosition: {
3410
- default: 'before',
3411
- description: 'Specify where to display the icon in relation to the major value.',
3412
- type: 'string'
3413
- },
3414
- majorColor: {
3415
- default: '> themes.defaultFontColor',
3416
- description: 'Specify the color for the major value. You may use a dataSource to apply the color. The hex value format should be “#FFFFFF”. The default for enterprise light is "#000000". The default for enterprise dark is "#ffffff". The default for prisma dark is "rgba(255, 255, 255, 0.98)".',
3417
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
3418
- type: 'string'
2934
+ majorColor: {
2935
+ default: '> themes.defaultFontColor',
2936
+ description: 'Specify the color for the major value. You may use a dataSource to apply the color. The hex value format should be “#FFFFFF”. The default for enterprise light is "#000000". The default for enterprise dark is "#ffffff". The default for prisma dark is "rgba(255, 255, 255, 0.98)".',
2937
+ pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
2938
+ type: 'string'
3419
2939
  },
3420
2940
  majorFontSize: {
3421
2941
  description: 'Specify the font size (px) for the major value. By default the major value font size is calculated dynamically based on the available space.',
@@ -3710,18 +3230,19 @@ var config = {
3710
3230
  exports.default = configUtils_2.enhanceConfig(config);
3711
3231
 
3712
3232
  /***/ }),
3713
- /* 264 */
3233
+
3234
+ /***/ 447:
3714
3235
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3715
3236
 
3716
3237
  "use strict";
3717
3238
  __webpack_require__.r(__webpack_exports__);
3718
- /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
3239
+ /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
3719
3240
  /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);
3720
3241
  /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
3721
3242
  /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_1__);
3722
- /* harmony import */ var _splunk_visualizations_shared_colorConstants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43);
3243
+ /* harmony import */ var _splunk_visualizations_shared_colorConstants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
3723
3244
  /* harmony import */ var _splunk_visualizations_shared_colorConstants__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_colorConstants__WEBPACK_IMPORTED_MODULE_2__);
3724
- /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
3245
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18);
3725
3246
  /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_3__);
3726
3247
 
3727
3248
 
@@ -3744,23 +3265,15 @@ var StaticIconColorEditor = [{
3744
3265
  /* harmony default export */ __webpack_exports__["default"] = (StaticIconColorEditor);
3745
3266
 
3746
3267
  /***/ }),
3747
- /* 265 */,
3748
- /* 266 */,
3749
- /* 267 */,
3750
- /* 268 */,
3751
- /* 269 */,
3752
- /* 270 */,
3753
- /* 271 */,
3754
- /* 272 */,
3755
- /* 273 */,
3756
- /* 274 */,
3757
- /* 275 */,
3758
- /* 276 */,
3759
- /* 277 */,
3760
- /* 278 */,
3761
- /* 279 */,
3762
- /* 280 */,
3763
- /* 281 */
3268
+
3269
+ /***/ 45:
3270
+ /***/ (function(module, exports) {
3271
+
3272
+ module.exports = require("@splunk/visualizations-shared/colorConstants");
3273
+
3274
+ /***/ }),
3275
+
3276
+ /***/ 464:
3764
3277
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3765
3278
 
3766
3279
  "use strict";
@@ -3768,7 +3281,7 @@ var StaticIconColorEditor = [{
3768
3281
  __webpack_require__.r(__webpack_exports__);
3769
3282
 
3770
3283
  // EXTERNAL MODULE: external "@babel/runtime/helpers/extends"
3771
- var extends_ = __webpack_require__(47);
3284
+ var extends_ = __webpack_require__(48);
3772
3285
  var extends_default = /*#__PURE__*/__webpack_require__.n(extends_);
3773
3286
 
3774
3287
  // EXTERNAL MODULE: external "react"
@@ -3784,60 +3297,60 @@ var external_styled_components_ = __webpack_require__(4);
3784
3297
  var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
3785
3298
 
3786
3299
  // EXTERNAL MODULE: external "lodash/pick"
3787
- var pick_ = __webpack_require__(70);
3300
+ var pick_ = __webpack_require__(71);
3788
3301
  var pick_default = /*#__PURE__*/__webpack_require__.n(pick_);
3789
3302
 
3790
3303
  // EXTERNAL MODULE: external "lodash/isEmpty"
3791
- var isEmpty_ = __webpack_require__(71);
3304
+ var isEmpty_ = __webpack_require__(72);
3792
3305
  var isEmpty_default = /*#__PURE__*/__webpack_require__.n(isEmpty_);
3793
3306
 
3794
3307
  // EXTERNAL MODULE: external "@splunk/visualizations-shared/style"
3795
- var style_ = __webpack_require__(14);
3308
+ var style_ = __webpack_require__(15);
3796
3309
 
3797
3310
  // EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
3798
3311
  var i18n_ = __webpack_require__(2);
3799
3312
 
3800
3313
  // EXTERNAL MODULE: external "@splunk/visualizations-shared/SizeAwareWrapper"
3801
- var SizeAwareWrapper_ = __webpack_require__(19);
3314
+ var SizeAwareWrapper_ = __webpack_require__(20);
3802
3315
  var SizeAwareWrapper_default = /*#__PURE__*/__webpack_require__.n(SizeAwareWrapper_);
3803
3316
 
3804
3317
  // EXTERNAL MODULE: external "@splunk/visualizations-shared/Message"
3805
- var Message_ = __webpack_require__(9);
3318
+ var Message_ = __webpack_require__(10);
3806
3319
  var Message_default = /*#__PURE__*/__webpack_require__.n(Message_);
3807
3320
 
3808
3321
  // EXTERNAL MODULE: ./src/common/components/VizStyleWrapper.jsx
3809
- var VizStyleWrapper = __webpack_require__(62);
3322
+ var VizStyleWrapper = __webpack_require__(63);
3810
3323
 
3811
3324
  // EXTERNAL MODULE: external "@babel/runtime/helpers/defineProperty"
3812
- var defineProperty_ = __webpack_require__(6);
3325
+ var defineProperty_ = __webpack_require__(7);
3813
3326
  var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_);
3814
3327
 
3815
3328
  // EXTERNAL MODULE: external "@splunk/visualizations/SingleValueBasic"
3816
- var SingleValueBasic_ = __webpack_require__(118);
3329
+ var SingleValueBasic_ = __webpack_require__(125);
3817
3330
  var SingleValueBasic_default = /*#__PURE__*/__webpack_require__.n(SingleValueBasic_);
3818
3331
 
3819
3332
  // EXTERNAL MODULE: external "@splunk/react-icons/Activity"
3820
- var Activity_ = __webpack_require__(143);
3333
+ var Activity_ = __webpack_require__(154);
3821
3334
  var Activity_default = /*#__PURE__*/__webpack_require__.n(Activity_);
3822
3335
 
3823
3336
  // EXTERNAL MODULE: external "@splunk/react-icons/Clock"
3824
- var Clock_ = __webpack_require__(144);
3337
+ var Clock_ = __webpack_require__(155);
3825
3338
  var Clock_default = /*#__PURE__*/__webpack_require__.n(Clock_);
3826
3339
 
3827
3340
  // EXTERNAL MODULE: external "@splunk/react-icons/Pencil"
3828
- var Pencil_ = __webpack_require__(145);
3341
+ var Pencil_ = __webpack_require__(156);
3829
3342
  var Pencil_default = /*#__PURE__*/__webpack_require__.n(Pencil_);
3830
3343
 
3831
3344
  // EXTERNAL MODULE: external "@splunk/react-icons/Star"
3832
- var Star_ = __webpack_require__(146);
3345
+ var Star_ = __webpack_require__(157);
3833
3346
  var Star_default = /*#__PURE__*/__webpack_require__.n(Star_);
3834
3347
 
3835
3348
  // EXTERNAL MODULE: external "@splunk/react-icons/Question"
3836
- var Question_ = __webpack_require__(147);
3349
+ var Question_ = __webpack_require__(158);
3837
3350
  var Question_default = /*#__PURE__*/__webpack_require__.n(Question_);
3838
3351
 
3839
3352
  // EXTERNAL MODULE: ./src/common/utils/singleValueUtils.js
3840
- var singleValueUtils = __webpack_require__(20);
3353
+ var singleValueUtils = __webpack_require__(22);
3841
3354
 
3842
3355
  // CONCATENATED MODULE: ./src/SingleValueIcon/PureSingleValueIcon/utils/iconUtils.js
3843
3356
  // Todo: this will be replaced by IconLibrary.Registry
@@ -3986,507 +3499,853 @@ var iconUtils_getIconColor = function getIconColor(_ref7) {
3986
3499
  defaultFontColor = _ref7.defaultFontColor,
3987
3500
  defaultBlockFontColor = _ref7.defaultBlockFontColor;
3988
3501
 
3989
- if (Object(singleValueUtils["hasBackground"])(backgroundColor) && !iconColor) {
3990
- return Object(singleValueUtils["getDefaultColorWithBg"])({
3502
+ if (Object(singleValueUtils["hasBackground"])(backgroundColor) && !iconColor) {
3503
+ return Object(singleValueUtils["getDefaultColorWithBg"])({
3504
+ backgroundColor: backgroundColor,
3505
+ defaultFontColor: defaultFontColor,
3506
+ defaultBlockFontColor: defaultBlockFontColor
3507
+ });
3508
+ }
3509
+
3510
+ return Object(singleValueUtils["getFormattedColor"])(iconColor, defaultFontColor);
3511
+ };
3512
+ // CONCATENATED MODULE: ./src/SingleValueIcon/PureSingleValueIcon/IconContainer.jsx
3513
+
3514
+
3515
+
3516
+
3517
+ var StyledIconContainer = external_styled_components_default.a.div.attrs(function () {
3518
+ return {
3519
+ 'data-test': 'single-value-icon-container'
3520
+ };
3521
+ }).withConfig({
3522
+ displayName: "IconContainer__StyledIconContainer",
3523
+ componentId: "veyyld-0"
3524
+ })(["margin:0 3%;display:flex;flex-direction:row;align-items:center;justify-content:center;font-size:", "px;height:", "px;color:", ";opacity:", ";cursor:", ";"], function (props) {
3525
+ return props.fontSize;
3526
+ }, function (props) {
3527
+ return props.height;
3528
+ }, function (props) {
3529
+ return props.color;
3530
+ }, function (props) {
3531
+ return props.opacity || 1.0;
3532
+ }, function (props) {
3533
+ return props.onClick ? 'pointer' : 'inherit';
3534
+ });
3535
+
3536
+ var IconContainer_IconContainer = function IconContainer(_ref) {
3537
+ var width = _ref.width,
3538
+ height = _ref.height,
3539
+ fontSize = _ref.fontSize,
3540
+ color = _ref.color,
3541
+ opacity = _ref.opacity,
3542
+ icon = _ref.icon,
3543
+ IconComponent = _ref.IconComponent,
3544
+ onIconClick = _ref.onIconClick;
3545
+ var onClick = typeof onIconClick === 'function' ? onIconClick : undefined;
3546
+
3547
+ if (IconComponent) {
3548
+ return /*#__PURE__*/external_react_default.a.createElement(StyledIconContainer, {
3549
+ width: width,
3550
+ height: height,
3551
+ onClick: onClick
3552
+ }, IconComponent);
3553
+ } // todo: remove it after we have proper icon provider
3554
+
3555
+
3556
+ var Icon = getIcon(icon);
3557
+ return /*#__PURE__*/external_react_default.a.createElement(StyledIconContainer, {
3558
+ width: width,
3559
+ height: height,
3560
+ fontSize: fontSize,
3561
+ color: color,
3562
+ opacity: opacity,
3563
+ onClick: onClick
3564
+ }, /*#__PURE__*/external_react_default.a.createElement(Icon, null));
3565
+ };
3566
+
3567
+ IconContainer_IconContainer.propTypes = {
3568
+ width: external_prop_types_default.a.number.isRequired,
3569
+ height: external_prop_types_default.a.number.isRequired,
3570
+ fontSize: external_prop_types_default.a.number.isRequired,
3571
+ icon: external_prop_types_default.a.string.isRequired,
3572
+ IconComponent: external_prop_types_default.a.node,
3573
+ color: external_prop_types_default.a.string,
3574
+ opacity: external_prop_types_default.a.number,
3575
+ onIconClick: external_prop_types_default.a.func
3576
+ };
3577
+ /* harmony default export */ var PureSingleValueIcon_IconContainer = (IconContainer_IconContainer);
3578
+ // CONCATENATED MODULE: ./src/SingleValueIcon/PureSingleValueIcon/SingleValueIconLayout.jsx
3579
+
3580
+
3581
+
3582
+ function ownKeys(object, enumerableOnly) {
3583
+ var keys = Object.keys(object);
3584
+
3585
+ if (Object.getOwnPropertySymbols) {
3586
+ var symbols = Object.getOwnPropertySymbols(object);
3587
+ if (enumerableOnly) symbols = symbols.filter(function (sym) {
3588
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
3589
+ });
3590
+ keys.push.apply(keys, symbols);
3591
+ }
3592
+
3593
+ return keys;
3594
+ }
3595
+
3596
+ function _objectSpread(target) {
3597
+ for (var i = 1; i < arguments.length; i++) {
3598
+ var source = arguments[i] != null ? arguments[i] : {};
3599
+
3600
+ if (i % 2) {
3601
+ ownKeys(Object(source), true).forEach(function (key) {
3602
+ defineProperty_default()(target, key, source[key]);
3603
+ });
3604
+ } else if (Object.getOwnPropertyDescriptors) {
3605
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
3606
+ } else {
3607
+ ownKeys(Object(source)).forEach(function (key) {
3608
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
3609
+ });
3610
+ }
3611
+ }
3612
+
3613
+ return target;
3614
+ }
3615
+
3616
+
3617
+
3618
+
3619
+
3620
+
3621
+
3622
+ var Column = external_styled_components_default.a.div.withConfig({
3623
+ displayName: "SingleValueIconLayout__Column",
3624
+ componentId: "c8okr6-0"
3625
+ })(["display:flex;flex-direction:column;justify-content:center;height:100%;width:100%;"]);
3626
+ var IconRow = external_styled_components_default.a.div.withConfig({
3627
+ displayName: "SingleValueIconLayout__IconRow",
3628
+ componentId: "c8okr6-1"
3629
+ })(["display:flex;flex-direction:row;justify-content:center;height:100%;"]);
3630
+ var IconColumn = external_styled_components_default.a.div.withConfig({
3631
+ displayName: "SingleValueIconLayout__IconColumn",
3632
+ componentId: "c8okr6-2"
3633
+ })(["display:flex;flex-direction:column;justify-content:center;height:100%;"]);
3634
+
3635
+ var SingleValueIconLayout_SingleValueIconLayout = function SingleValueIconLayout(_ref) {
3636
+ var props = extends_default()({}, _ref);
3637
+
3638
+ var majorColor = props.majorColor,
3639
+ majorText = props.majorText,
3640
+ majorTextFontSize = props.majorTextFontSize,
3641
+ majorValueTitle = props.majorValueTitle,
3642
+ trendColor = props.trendColor,
3643
+ trendText = props.trendText,
3644
+ trendTextFontSize = props.trendTextFontSize,
3645
+ showTrendIndicator = props.showTrendIndicator,
3646
+ unit = props.unit,
3647
+ unitPosition = props.unitPosition,
3648
+ underLabel = props.underLabel,
3649
+ underLabelFontSize = props.underLabelFontSize,
3650
+ underLabelColor = props.underLabelColor,
3651
+ onValueClick = props.onValueClick,
3652
+ iconWidth = props.iconWidth,
3653
+ iconHeight = props.iconHeight,
3654
+ icon = props.icon,
3655
+ iconColor = props.iconColor,
3656
+ iconOpacity = props.iconOpacity,
3657
+ iconPosition = props.iconPosition,
3658
+ iconFontSize = props.iconFontSize,
3659
+ showValue = props.showValue,
3660
+ svgIconComponent = props.svgIconComponent;
3661
+ var iconContainer = /*#__PURE__*/external_react_default.a.createElement(PureSingleValueIcon_IconContainer, {
3662
+ width: iconWidth,
3663
+ height: iconHeight,
3664
+ fontSize: iconFontSize,
3665
+ color: iconColor,
3666
+ opacity: iconOpacity,
3667
+ icon: icon,
3668
+ IconComponent: svgIconComponent,
3669
+ onIconClick: onValueClick
3670
+ });
3671
+ var singleValueBasic = showValue ? /*#__PURE__*/external_react_default.a.createElement(SingleValueBasic_default.a, {
3672
+ majorColor: majorColor,
3673
+ majorText: majorText,
3674
+ majorTextFontSize: majorTextFontSize,
3675
+ majorValueTitle: majorValueTitle,
3676
+ trendColor: trendColor,
3677
+ trendText: trendText,
3678
+ trendTextFontSize: trendTextFontSize,
3679
+ showTrendIndicator: showTrendIndicator,
3680
+ unit: unit,
3681
+ unitPosition: unitPosition,
3682
+ underLabel: underLabel,
3683
+ underLabelFontSize: underLabelFontSize,
3684
+ underLabelColor: underLabelColor,
3685
+ onValueClick: onValueClick
3686
+ }) : null;
3687
+ var iconLayout = null;
3688
+ var showHorizontal = isHorizontal(iconPosition);
3689
+
3690
+ if (showHorizontal) {
3691
+ iconLayout = /*#__PURE__*/external_react_default.a.createElement(IconRow, null, iconPosition === 'before' && iconContainer, singleValueBasic, iconPosition === 'after' && iconContainer);
3692
+ } else {
3693
+ iconLayout = /*#__PURE__*/external_react_default.a.createElement(IconColumn, null, iconPosition === 'top' && iconContainer, singleValueBasic, iconPosition === 'below' && iconContainer);
3694
+ }
3695
+
3696
+ return /*#__PURE__*/external_react_default.a.createElement(Column, null, iconLayout);
3697
+ };
3698
+
3699
+ SingleValueIconLayout_SingleValueIconLayout.propTypes = _objectSpread(_objectSpread({}, SingleValueBasic_default.a.propTypes), {}, {
3700
+ iconWidth: external_prop_types_default.a.number,
3701
+ iconHeight: external_prop_types_default.a.number,
3702
+ icon: external_prop_types_default.a.string,
3703
+ iconPosition: external_prop_types_default.a.oneOf(['before', 'after', 'top', 'below']),
3704
+ iconColor: external_prop_types_default.a.string,
3705
+ iconOpacity: external_prop_types_default.a.number,
3706
+ iconFontSize: external_prop_types_default.a.number,
3707
+ showValue: external_prop_types_default.a.bool,
3708
+ svgIconComponent: external_prop_types_default.a.element
3709
+ });
3710
+ /* harmony default export */ var PureSingleValueIcon_SingleValueIconLayout = (SingleValueIconLayout_SingleValueIconLayout);
3711
+ // CONCATENATED MODULE: ./src/SingleValueIcon/PureSingleValueIcon/SingleValueIcon.jsx
3712
+
3713
+
3714
+
3715
+
3716
+
3717
+
3718
+
3719
+
3720
+
3721
+
3722
+
3723
+
3724
+
3725
+
3726
+ var Container = external_styled_components_default.a.div.withConfig({
3727
+ displayName: "SingleValueIcon__Container",
3728
+ componentId: "y660ip-0"
3729
+ })(["overflow:hidden;", ";"], function (props) {
3730
+ return Object(style_["toDimension"])(pick_default()(props, ['width', 'height']));
3731
+ });
3732
+
3733
+ var SingleValueIcon_SingleValueIcon = function SingleValueIcon(_ref) {
3734
+ var props = extends_default()({}, _ref);
3735
+
3736
+ var width = props.width,
3737
+ _props$height = props.height,
3738
+ height = _props$height === void 0 ? 250 : _props$height,
3739
+ style = props.style,
3740
+ majorFontSize = props.majorFontSize,
3741
+ majorValue = props.majorValue,
3742
+ majorValueField = props.majorValueField,
3743
+ trendValue = props.trendValue,
3744
+ trendFontSize = props.trendFontSize,
3745
+ unitPosition = props.unitPosition,
3746
+ numberPrecision = props.numberPrecision,
3747
+ shouldUseThousandSeparators = props.shouldUseThousandSeparators,
3748
+ shouldAbbreviateTrendValue = props.shouldAbbreviateTrendValue,
3749
+ icon = props.icon,
3750
+ iconOpacity = props.iconOpacity,
3751
+ IconComponent = props.IconComponent,
3752
+ noDataSources = props.noDataSources,
3753
+ noResult = props.noResult,
3754
+ onValueClick = props.onValueClick,
3755
+ defaultFontColor = props.defaultFontColor,
3756
+ defaultBlockFontColor = props.defaultBlockFontColor;
3757
+ var defaultColors = {
3758
+ defaultBlockFontColor: defaultBlockFontColor,
3759
+ defaultFontColor: defaultFontColor
3760
+ };
3761
+
3762
+ var _computeColors = Object(singleValueUtils["computeColors"])(props, defaultColors),
3763
+ backgroundColor = _computeColors.backgroundColor,
3764
+ majorColor = _computeColors.majorColor,
3765
+ trendColor = _computeColors.trendColor,
3766
+ underLabelColor = _computeColors.underLabelColor;
3767
+
3768
+ var iconColor = iconUtils_getIconColor({
3769
+ iconColor: props.iconColor,
3770
+ backgroundColor: backgroundColor,
3771
+ defaultFontColor: defaultColors.defaultFontColor,
3772
+ defaultBlockFontColor: defaultColors.defaultBlockFontColor
3773
+ });
3774
+ var handleValueClick = Object(external_react_["useCallback"])(function (ev) {
3775
+ return Object(singleValueUtils["handleValueClickCallback"])(ev, majorValue, majorValueField, trendValue, onValueClick);
3776
+ }, [onValueClick, majorValue, majorValueField, trendValue]);
3777
+
3778
+ var renderVisualization = function renderVisualization(_ref2) {
3779
+ var containerWidth = _ref2.width,
3780
+ containerHeight = _ref2.height;
3781
+
3782
+ if ((noDataSources || noResult) && !IconComponent) {
3783
+ return /*#__PURE__*/external_react_default.a.createElement(Message_default.a, {
3784
+ width: containerWidth,
3785
+ height: containerHeight,
3786
+ message: Object(i18n_["_"])('No Icon'),
3787
+ level: "warning"
3788
+ });
3789
+ }
3790
+
3791
+ var IconLayout = null;
3792
+
3793
+ if ((noDataSources || noResult) && IconComponent) {
3794
+ IconLayout = /*#__PURE__*/external_react_default.a.cloneElement(IconComponent, {
3795
+ width: containerWidth,
3796
+ height: containerHeight,
3797
+ color: props.iconColor,
3798
+ opacity: iconOpacity
3799
+ });
3800
+ } else {
3801
+ // will update later based on text size
3802
+ var _props$showValue = props.showValue,
3803
+ showValue = _props$showValue === void 0 ? true : _props$showValue,
3804
+ trendDisplay = props.trendDisplay,
3805
+ unit = props.unit,
3806
+ underLabel = props.underLabel,
3807
+ iconPosition = props.iconPosition;
3808
+
3809
+ if (!isValidPosition(iconPosition)) {
3810
+ iconPosition = 'before';
3811
+ }
3812
+
3813
+ var showHorizontal = isHorizontal(iconPosition);
3814
+ var iconWidth = getIconWidth({
3815
+ showHorizontal: showHorizontal,
3816
+ width: containerWidth
3817
+ });
3818
+ var iconHeight = getIconHeight({
3819
+ showHorizontal: showHorizontal,
3820
+ height: containerHeight
3821
+ });
3822
+ var svgIconComponent = null;
3823
+
3824
+ if (IconComponent) {
3825
+ svgIconComponent = /*#__PURE__*/external_react_default.a.cloneElement(IconComponent, {
3826
+ width: getSVGDimension({
3827
+ showValue: showValue,
3828
+ containerDimension: containerWidth,
3829
+ iconDimension: iconWidth,
3830
+ ratio: 0.25
3831
+ }),
3832
+ height: getSVGDimension({
3833
+ showValue: showValue,
3834
+ containerDimension: containerHeight,
3835
+ iconDimension: iconHeight,
3836
+ ratio: 0.25
3837
+ }),
3838
+ color: props.iconColor,
3839
+ opacity: iconOpacity
3840
+ });
3841
+ } // claculate major and trend text and font size
3842
+
3843
+
3844
+ var contentWidth = getValuesWidth({
3845
+ showHorizontal: showHorizontal,
3846
+ width: containerWidth
3847
+ });
3848
+ var contentHeight = getValuesHeight({
3849
+ showHorizontal: showHorizontal,
3850
+ height: containerHeight,
3851
+ iconHeight: iconHeight
3852
+ });
3853
+ var toRemoveList = [{
3854
+ key: 'underLabel',
3855
+ value: ''
3856
+ }, {
3857
+ key: 'trendDisplay',
3858
+ value: 'off'
3859
+ }, {
3860
+ key: 'unit',
3861
+ value: ''
3862
+ }, {
3863
+ key: 'showValue',
3864
+ value: false
3865
+ }];
3866
+
3867
+ var _computeSingleValueCo = Object(singleValueUtils["computeSingleValueContent"])({
3868
+ majorValue: majorValue,
3869
+ trendValue: trendValue,
3870
+ majorFontSize: majorFontSize,
3871
+ trendFontSize: trendFontSize,
3872
+ trendDisplay: trendDisplay,
3873
+ contentWidth: contentWidth,
3874
+ contentHeight: contentHeight,
3875
+ containerWidth: containerWidth,
3876
+ containerHeight: containerHeight,
3877
+ unit: unit,
3878
+ numberPrecision: numberPrecision,
3879
+ shouldUseThousandSeparators: shouldUseThousandSeparators,
3880
+ shouldAbbreviateTrendValue: shouldAbbreviateTrendValue,
3881
+ toRemoveList: toRemoveList
3882
+ }),
3883
+ majorText = _computeSingleValueCo.majorText,
3884
+ trendText = _computeSingleValueCo.trendText,
3885
+ majorTextFontSize = _computeSingleValueCo.majorTextFontSize,
3886
+ trendTextFontSize = _computeSingleValueCo.trendTextFontSize,
3887
+ majorValueTitle = _computeSingleValueCo.majorValueTitle,
3888
+ smallVizProps = _computeSingleValueCo.smallVizProps;
3889
+
3890
+ if (!isEmpty_default()(smallVizProps)) {
3891
+ showValue = smallVizProps.showValue;
3892
+ trendDisplay = smallVizProps.trendDisplay;
3893
+ underLabel = smallVizProps.underLabel;
3894
+ unit = smallVizProps.unit;
3895
+ }
3896
+
3897
+ var iconFontSize = getIconFontSize({
3898
+ showValue: showValue,
3899
+ majorTextFontSize: majorTextFontSize,
3900
+ iconWidth: iconWidth
3901
+ }); // calculate underlabel size
3902
+
3903
+ var underLabelHeight = Object(singleValueUtils["getUnderLabelHeight"])(containerHeight * 0.1);
3904
+ var underLabelFontSize = Object(singleValueUtils["getUnderLabel"])({
3905
+ underLabel: underLabel,
3906
+ width: contentWidth,
3907
+ height: underLabelHeight
3908
+ });
3909
+ IconLayout = /*#__PURE__*/external_react_default.a.createElement(PureSingleValueIcon_SingleValueIconLayout, {
3910
+ "data-test": "SingleValueIconLayout",
3911
+ majorColor: majorColor,
3912
+ majorText: majorText,
3913
+ majorTextFontSize: majorTextFontSize,
3914
+ majorValueTitle: majorValueTitle,
3915
+ trendColor: trendColor,
3916
+ trendText: trendText,
3917
+ trendTextFontSize: trendTextFontSize,
3918
+ showTrendIndicator: Object(singleValueUtils["shouldShowTrend"])(trendDisplay),
3919
+ unit: unit,
3920
+ unitPosition: unitPosition,
3921
+ underLabel: underLabel,
3922
+ underLabelFontSize: underLabelFontSize,
3923
+ underLabelColor: underLabelColor,
3924
+ showValue: showValue,
3925
+ iconWidth: iconWidth,
3926
+ iconHeight: iconHeight,
3927
+ iconFontSize: iconFontSize,
3928
+ iconColor: iconColor,
3929
+ iconOpacity: iconOpacity,
3930
+ iconPosition: iconPosition,
3931
+ icon: icon,
3932
+ svgIconComponent: svgIconComponent,
3933
+ onValueClick: handleValueClick
3934
+ });
3935
+ }
3936
+
3937
+ return /*#__PURE__*/external_react_default.a.createElement(VizStyleWrapper["default"], {
3991
3938
  backgroundColor: backgroundColor,
3992
- defaultFontColor: defaultFontColor,
3993
- defaultBlockFontColor: defaultBlockFontColor
3994
- });
3995
- }
3996
-
3997
- return Object(singleValueUtils["getFormattedColor"])(iconColor, defaultFontColor);
3998
- };
3999
- // CONCATENATED MODULE: ./src/SingleValueIcon/PureSingleValueIcon/IconContainer.jsx
4000
-
4001
-
4002
-
4003
-
4004
- var StyledIconContainer = external_styled_components_default.a.div.attrs(function () {
4005
- return {
4006
- 'data-test': 'single-value-icon-container'
3939
+ style: style,
3940
+ dataTestKey: "SingleValueIconWrapper"
3941
+ }, IconLayout);
4007
3942
  };
4008
- }).withConfig({
4009
- displayName: "IconContainer__StyledIconContainer",
4010
- componentId: "veyyld-0"
4011
- })(["margin:0 3%;display:flex;flex-direction:row;align-items:center;justify-content:center;font-size:", "px;height:", "px;color:", ";opacity:", ";cursor:", ";"], function (props) {
4012
- return props.fontSize;
4013
- }, function (props) {
4014
- return props.height;
4015
- }, function (props) {
4016
- return props.color;
4017
- }, function (props) {
4018
- return props.opacity || 1.0;
4019
- }, function (props) {
4020
- return props.onClick ? 'pointer' : 'inherit';
4021
- });
4022
-
4023
- var IconContainer_IconContainer = function IconContainer(_ref) {
4024
- var width = _ref.width,
4025
- height = _ref.height,
4026
- fontSize = _ref.fontSize,
4027
- color = _ref.color,
4028
- opacity = _ref.opacity,
4029
- icon = _ref.icon,
4030
- IconComponent = _ref.IconComponent,
4031
- onIconClick = _ref.onIconClick;
4032
- var onClick = typeof onIconClick === 'function' ? onIconClick : undefined;
4033
-
4034
- if (IconComponent) {
4035
- return /*#__PURE__*/external_react_default.a.createElement(StyledIconContainer, {
4036
- width: width,
4037
- height: height,
4038
- onClick: onClick
4039
- }, IconComponent);
4040
- } // todo: remove it after we have proper icon provider
4041
-
4042
3943
 
4043
- var Icon = getIcon(icon);
4044
- return /*#__PURE__*/external_react_default.a.createElement(StyledIconContainer, {
3944
+ return /*#__PURE__*/external_react_default.a.createElement(Container, {
4045
3945
  width: width,
4046
- height: height,
4047
- fontSize: fontSize,
4048
- color: color,
4049
- opacity: opacity,
4050
- onClick: onClick
4051
- }, /*#__PURE__*/external_react_default.a.createElement(Icon, null));
3946
+ height: height
3947
+ }, /*#__PURE__*/external_react_default.a.createElement(SizeAwareWrapper_default.a, null, function (containerDimension) {
3948
+ return renderVisualization(containerDimension);
3949
+ }));
4052
3950
  };
4053
3951
 
4054
- IconContainer_IconContainer.propTypes = {
4055
- width: external_prop_types_default.a.number.isRequired,
4056
- height: external_prop_types_default.a.number.isRequired,
4057
- fontSize: external_prop_types_default.a.number.isRequired,
4058
- icon: external_prop_types_default.a.string.isRequired,
4059
- IconComponent: external_prop_types_default.a.node,
4060
- color: external_prop_types_default.a.string,
4061
- opacity: external_prop_types_default.a.number,
4062
- onIconClick: external_prop_types_default.a.func
3952
+ SingleValueIcon_SingleValueIcon.propTypes = {
3953
+ width: external_prop_types_default.a.oneOfType([external_prop_types_default.a.string, external_prop_types_default.a.number]),
3954
+ height: external_prop_types_default.a.oneOfType([external_prop_types_default.a.string, external_prop_types_default.a.number]),
3955
+ style: external_prop_types_default.a.object,
3956
+ majorValue: external_prop_types_default.a.oneOfType([external_prop_types_default.a.string, external_prop_types_default.a.number]),
3957
+ majorValueField: external_prop_types_default.a.string,
3958
+ majorColor: external_prop_types_default.a.string,
3959
+ majorFontSize: external_prop_types_default.a.number,
3960
+ trendColor: external_prop_types_default.a.string,
3961
+ trendValue: external_prop_types_default.a.oneOfType([external_prop_types_default.a.string, external_prop_types_default.a.number]),
3962
+ trendFontSize: external_prop_types_default.a.number,
3963
+ trendDisplay: external_prop_types_default.a.oneOf(['absolute', 'percent', 'off']),
3964
+ shouldAbbreviateTrendValue: external_prop_types_default.a.bool,
3965
+ backgroundColor: external_prop_types_default.a.string,
3966
+ unit: external_prop_types_default.a.string,
3967
+ unitPosition: external_prop_types_default.a.string,
3968
+ underLabel: external_prop_types_default.a.string,
3969
+ numberPrecision: external_prop_types_default.a.number,
3970
+ shouldUseThousandSeparators: external_prop_types_default.a.bool,
3971
+ icon: external_prop_types_default.a.string,
3972
+ iconPosition: external_prop_types_default.a.oneOf(['before', 'after', 'top', 'below']),
3973
+ iconColor: external_prop_types_default.a.string,
3974
+ iconOpacity: external_prop_types_default.a.number,
3975
+ showValue: external_prop_types_default.a.bool,
3976
+ IconComponent: external_prop_types_default.a.element,
3977
+ noDataSources: external_prop_types_default.a.bool,
3978
+ noResult: external_prop_types_default.a.bool,
3979
+ onValueClick: external_prop_types_default.a.func,
3980
+ defaultFontColor: external_prop_types_default.a.string,
3981
+ defaultBlockFontColor: external_prop_types_default.a.string
4063
3982
  };
4064
- /* harmony default export */ var PureSingleValueIcon_IconContainer = (IconContainer_IconContainer);
4065
- // CONCATENATED MODULE: ./src/SingleValueIcon/PureSingleValueIcon/SingleValueIconLayout.jsx
4066
-
4067
-
3983
+ SingleValueIcon_SingleValueIcon.defaultProps = {
3984
+ width: '100%',
3985
+ height: 250,
3986
+ majorValue: 'N/A',
3987
+ majorValueField: '',
3988
+ trendDisplay: 'absolute',
3989
+ shouldAbbreviateTrendValue: false,
3990
+ numberPrecision: 0,
3991
+ shouldUseThousandSeparators: true,
3992
+ unitPosition: 'after',
3993
+ icon: 'default',
3994
+ iconPosition: 'before',
3995
+ iconOpacity: 1,
3996
+ showValue: true,
3997
+ noDataSources: false,
3998
+ noResult: false,
3999
+ onValueClick: function onValueClick() {}
4000
+ };
4001
+ /* harmony default export */ var PureSingleValueIcon_SingleValueIcon = __webpack_exports__["default"] = (SingleValueIcon_SingleValueIcon);
4068
4002
 
4069
- function ownKeys(object, enumerableOnly) {
4070
- var keys = Object.keys(object);
4003
+ /***/ }),
4071
4004
 
4072
- if (Object.getOwnPropertySymbols) {
4073
- var symbols = Object.getOwnPropertySymbols(object);
4074
- if (enumerableOnly) symbols = symbols.filter(function (sym) {
4075
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
4076
- });
4077
- keys.push.apply(keys, symbols);
4078
- }
4005
+ /***/ 48:
4006
+ /***/ (function(module, exports) {
4079
4007
 
4080
- return keys;
4081
- }
4008
+ module.exports = require("@babel/runtime/helpers/extends");
4082
4009
 
4083
- function _objectSpread(target) {
4084
- for (var i = 1; i < arguments.length; i++) {
4085
- var source = arguments[i] != null ? arguments[i] : {};
4010
+ /***/ }),
4086
4011
 
4087
- if (i % 2) {
4088
- ownKeys(Object(source), true).forEach(function (key) {
4089
- defineProperty_default()(target, key, source[key]);
4090
- });
4091
- } else if (Object.getOwnPropertyDescriptors) {
4092
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
4093
- } else {
4094
- ownKeys(Object(source)).forEach(function (key) {
4095
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
4096
- });
4097
- }
4098
- }
4012
+ /***/ 49:
4013
+ /***/ (function(module, exports) {
4099
4014
 
4100
- return target;
4101
- }
4015
+ module.exports = require("@splunk/visualizations-shared/domUtils");
4102
4016
 
4017
+ /***/ }),
4103
4018
 
4019
+ /***/ 54:
4020
+ /***/ (function(module, exports) {
4104
4021
 
4022
+ module.exports = require("@splunk/visualization-color-palettes/editors/PresetPalettes");
4105
4023
 
4024
+ /***/ }),
4106
4025
 
4026
+ /***/ 6:
4027
+ /***/ (function(module, exports, __webpack_require__) {
4107
4028
 
4029
+ "use strict";
4108
4030
 
4109
- var Column = external_styled_components_default.a.div.withConfig({
4110
- displayName: "SingleValueIconLayout__Column",
4111
- componentId: "c8okr6-0"
4112
- })(["display:flex;flex-direction:column;justify-content:center;height:100%;width:100%;"]);
4113
- var IconRow = external_styled_components_default.a.div.withConfig({
4114
- displayName: "SingleValueIconLayout__IconRow",
4115
- componentId: "c8okr6-1"
4116
- })(["display:flex;flex-direction:row;justify-content:center;height:100%;"]);
4117
- var IconColumn = external_styled_components_default.a.div.withConfig({
4118
- displayName: "SingleValueIconLayout__IconColumn",
4119
- componentId: "c8okr6-2"
4120
- })(["display:flex;flex-direction:column;justify-content:center;height:100%;"]);
4121
4031
 
4122
- var SingleValueIconLayout_SingleValueIconLayout = function SingleValueIconLayout(_ref) {
4123
- var props = extends_default()({}, _ref);
4032
+ Object.defineProperty(exports, "__esModule", {
4033
+ value: true
4034
+ });
4035
+ exports.VizBehavior = void 0;
4036
+ var VizBehavior;
4124
4037
 
4125
- var majorColor = props.majorColor,
4126
- majorText = props.majorText,
4127
- majorTextFontSize = props.majorTextFontSize,
4128
- majorValueTitle = props.majorValueTitle,
4129
- trendColor = props.trendColor,
4130
- trendText = props.trendText,
4131
- trendTextFontSize = props.trendTextFontSize,
4132
- showTrendIndicator = props.showTrendIndicator,
4133
- unit = props.unit,
4134
- unitPosition = props.unitPosition,
4135
- underLabel = props.underLabel,
4136
- underLabelFontSize = props.underLabelFontSize,
4137
- underLabelColor = props.underLabelColor,
4138
- onValueClick = props.onValueClick,
4139
- iconWidth = props.iconWidth,
4140
- iconHeight = props.iconHeight,
4141
- icon = props.icon,
4142
- iconColor = props.iconColor,
4143
- iconOpacity = props.iconOpacity,
4144
- iconPosition = props.iconPosition,
4145
- iconFontSize = props.iconFontSize,
4146
- showValue = props.showValue,
4147
- svgIconComponent = props.svgIconComponent;
4148
- var iconContainer = /*#__PURE__*/external_react_default.a.createElement(PureSingleValueIcon_IconContainer, {
4149
- width: iconWidth,
4150
- height: iconHeight,
4151
- fontSize: iconFontSize,
4152
- color: iconColor,
4153
- opacity: iconOpacity,
4154
- icon: icon,
4155
- IconComponent: svgIconComponent,
4156
- onIconClick: onValueClick
4157
- });
4158
- var singleValueBasic = showValue ? /*#__PURE__*/external_react_default.a.createElement(SingleValueBasic_default.a, {
4159
- majorColor: majorColor,
4160
- majorText: majorText,
4161
- majorTextFontSize: majorTextFontSize,
4162
- majorValueTitle: majorValueTitle,
4163
- trendColor: trendColor,
4164
- trendText: trendText,
4165
- trendTextFontSize: trendTextFontSize,
4166
- showTrendIndicator: showTrendIndicator,
4167
- unit: unit,
4168
- unitPosition: unitPosition,
4169
- underLabel: underLabel,
4170
- underLabelFontSize: underLabelFontSize,
4171
- underLabelColor: underLabelColor,
4172
- onValueClick: onValueClick
4173
- }) : null;
4174
- var iconLayout = null;
4175
- var showHorizontal = isHorizontal(iconPosition);
4038
+ (function (VizBehavior) {
4039
+ /**
4040
+ * Dynamic Options Behavior.
4041
+ * This allows visualization options to be powered by data
4042
+ *
4043
+ * **Example**
4044
+ *
4045
+ * sparklineValues: ">primary|seriesByIndex(0)"
4046
+ * would configure sparklineValues with an array of data points
4047
+ * coming from the first series in the primary datasource
4048
+ *
4049
+ */
4050
+ VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
4051
+ VizBehavior["EVENTS"] = "events";
4052
+ /**
4053
+ * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
4054
+ * missing.
4055
+ * @type {string}
4056
+ */
4176
4057
 
4177
- if (showHorizontal) {
4178
- iconLayout = /*#__PURE__*/external_react_default.a.createElement(IconRow, null, iconPosition === 'before' && iconContainer, singleValueBasic, iconPosition === 'after' && iconContainer);
4179
- } else {
4180
- iconLayout = /*#__PURE__*/external_react_default.a.createElement(IconColumn, null, iconPosition === 'top' && iconContainer, singleValueBasic, iconPosition === 'below' && iconContainer);
4181
- }
4058
+ VizBehavior["PLACEHOLDER"] = "placeholder";
4059
+ VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
4060
+ })(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
4182
4061
 
4183
- return /*#__PURE__*/external_react_default.a.createElement(Column, null, iconLayout);
4184
- };
4062
+ /***/ }),
4185
4063
 
4186
- SingleValueIconLayout_SingleValueIconLayout.propTypes = _objectSpread(_objectSpread({}, SingleValueBasic_default.a.propTypes), {}, {
4187
- iconWidth: external_prop_types_default.a.number,
4188
- iconHeight: external_prop_types_default.a.number,
4189
- icon: external_prop_types_default.a.string,
4190
- iconPosition: external_prop_types_default.a.oneOf(['before', 'after', 'top', 'below']),
4191
- iconColor: external_prop_types_default.a.string,
4192
- iconOpacity: external_prop_types_default.a.number,
4193
- iconFontSize: external_prop_types_default.a.number,
4194
- showValue: external_prop_types_default.a.bool,
4195
- svgIconComponent: external_prop_types_default.a.element
4064
+ /***/ 63:
4065
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4066
+
4067
+ "use strict";
4068
+ __webpack_require__.r(__webpack_exports__);
4069
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
4070
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_0__);
4071
+
4072
+ var VizStyleWrapper = styled_components__WEBPACK_IMPORTED_MODULE_0___default.a.div.attrs(function (_ref) {
4073
+ var dataTestKey = _ref.dataTestKey;
4074
+ return {
4075
+ 'data-test': dataTestKey
4076
+ };
4077
+ }).withConfig({
4078
+ displayName: "VizStyleWrapper",
4079
+ componentId: "sc-6rw6wv-0"
4080
+ })(["display:flex;justify-content:center;flex-direction:column;width:100%;height:100%;background-color:", ";"], function (props) {
4081
+ return props.backgroundColor;
4196
4082
  });
4197
- /* harmony default export */ var PureSingleValueIcon_SingleValueIconLayout = (SingleValueIconLayout_SingleValueIconLayout);
4198
- // CONCATENATED MODULE: ./src/SingleValueIcon/PureSingleValueIcon/SingleValueIcon.jsx
4083
+ VizStyleWrapper.displayName = 'VizStyleWrapper';
4084
+ /* harmony default export */ __webpack_exports__["default"] = (VizStyleWrapper);
4199
4085
 
4086
+ /***/ }),
4087
+
4088
+ /***/ 7:
4089
+ /***/ (function(module, exports) {
4090
+
4091
+ module.exports = require("@babel/runtime/helpers/defineProperty");
4092
+
4093
+ /***/ }),
4094
+
4095
+ /***/ 71:
4096
+ /***/ (function(module, exports) {
4097
+
4098
+ module.exports = require("lodash/pick");
4099
+
4100
+ /***/ }),
4200
4101
 
4102
+ /***/ 72:
4103
+ /***/ (function(module, exports) {
4201
4104
 
4105
+ module.exports = require("lodash/isEmpty");
4202
4106
 
4107
+ /***/ }),
4203
4108
 
4109
+ /***/ 78:
4110
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4204
4111
 
4112
+ "use strict";
4113
+ __webpack_require__.r(__webpack_exports__);
4114
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
4115
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
4116
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18);
4117
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
4205
4118
 
4206
4119
 
4120
+ var StaticBackgroundColorEditor = {
4121
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Static Background'),
4122
+ option: 'backgroundColor',
4123
+ editor: 'editor.color',
4124
+ showEditor: function showEditor(_ref) {
4125
+ var options = _ref.options;
4126
+ return !Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.backgroundColor);
4127
+ }
4128
+ };
4129
+ /* harmony default export */ __webpack_exports__["default"] = (StaticBackgroundColorEditor);
4207
4130
 
4131
+ /***/ }),
4208
4132
 
4133
+ /***/ 8:
4134
+ /***/ (function(module, exports) {
4209
4135
 
4136
+ module.exports = require("@babel/runtime/helpers/toConsumableArray");
4210
4137
 
4138
+ /***/ }),
4211
4139
 
4140
+ /***/ 87:
4141
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4212
4142
 
4213
- var Container = external_styled_components_default.a.div.withConfig({
4214
- displayName: "SingleValueIcon__Container",
4215
- componentId: "y660ip-0"
4216
- })(["overflow:hidden;", ";"], function (props) {
4217
- return Object(style_["toDimension"])(pick_default()(props, ['width', 'height']));
4218
- });
4143
+ "use strict";
4144
+ __webpack_require__.r(__webpack_exports__);
4145
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicMajorColorEditor", function() { return getDynamicMajorColorEditor; });
4146
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
4147
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
4148
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18);
4149
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
4219
4150
 
4220
- var SingleValueIcon_SingleValueIcon = function SingleValueIcon(_ref) {
4221
- var props = extends_default()({}, _ref);
4222
4151
 
4223
- var width = props.width,
4224
- _props$height = props.height,
4225
- height = _props$height === void 0 ? 250 : _props$height,
4226
- style = props.style,
4227
- majorFontSize = props.majorFontSize,
4228
- majorValue = props.majorValue,
4229
- majorValueField = props.majorValueField,
4230
- trendValue = props.trendValue,
4231
- trendFontSize = props.trendFontSize,
4232
- unitPosition = props.unitPosition,
4233
- numberPrecision = props.numberPrecision,
4234
- shouldUseThousandSeparators = props.shouldUseThousandSeparators,
4235
- shouldAbbreviateTrendValue = props.shouldAbbreviateTrendValue,
4236
- icon = props.icon,
4237
- iconOpacity = props.iconOpacity,
4238
- IconComponent = props.IconComponent,
4239
- noDataSources = props.noDataSources,
4240
- noResult = props.noResult,
4241
- onValueClick = props.onValueClick,
4242
- defaultFontColor = props.defaultFontColor,
4243
- defaultBlockFontColor = props.defaultBlockFontColor;
4244
- var defaultColors = {
4245
- defaultBlockFontColor: defaultBlockFontColor,
4246
- defaultFontColor: defaultFontColor
4152
+ var getDynamicMajorColorEditor = function getDynamicMajorColorEditor(_ref) {
4153
+ var defaultContext = _ref.defaultContext,
4154
+ defaultPalettesConfig = _ref.defaultPalettesConfig;
4155
+ return {
4156
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic Major Value'),
4157
+ option: 'majorColor',
4158
+ context: 'majorColorEditorConfig',
4159
+ editor: 'editor.dynamicColor',
4160
+ showEditor: function showEditor(_ref2) {
4161
+ var options = _ref2.options;
4162
+ return Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.majorColor);
4163
+ },
4164
+ editorProps: {
4165
+ labelPosition: 'left',
4166
+ flyoutTitle: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic Coloring: Major Value'),
4167
+ formatters: [{
4168
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Ranges'),
4169
+ value: 'rangeValue',
4170
+ defaults: {
4171
+ majorValue: defaultContext.majorColorConfig
4172
+ }
4173
+ }, {
4174
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Matches'),
4175
+ value: 'matchValue',
4176
+ defaults: {
4177
+ majorValue: defaultContext.majorColorMatchConfig
4178
+ }
4179
+ }],
4180
+ dataSelectors: [{
4181
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Major Value'),
4182
+ value: 'majorValue'
4183
+ }],
4184
+ defaultPalettesConfig: defaultPalettesConfig
4185
+ }
4247
4186
  };
4187
+ };
4248
4188
 
4249
- var _computeColors = Object(singleValueUtils["computeColors"])(props, defaultColors),
4250
- backgroundColor = _computeColors.backgroundColor,
4251
- majorColor = _computeColors.majorColor,
4252
- trendColor = _computeColors.trendColor,
4253
- underLabelColor = _computeColors.underLabelColor;
4189
+ /***/ }),
4254
4190
 
4255
- var iconColor = iconUtils_getIconColor({
4256
- iconColor: props.iconColor,
4257
- backgroundColor: backgroundColor,
4258
- defaultFontColor: defaultColors.defaultFontColor,
4259
- defaultBlockFontColor: defaultColors.defaultBlockFontColor
4260
- });
4261
- var handleValueClick = Object(external_react_["useCallback"])(function (ev) {
4262
- return Object(singleValueUtils["handleValueClickCallback"])(ev, majorValue, majorValueField, trendValue, onValueClick);
4263
- }, [onValueClick, majorValue, majorValueField, trendValue]);
4191
+ /***/ 88:
4192
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4264
4193
 
4265
- var renderVisualization = function renderVisualization(_ref2) {
4266
- var containerWidth = _ref2.width,
4267
- containerHeight = _ref2.height;
4194
+ "use strict";
4195
+ __webpack_require__.r(__webpack_exports__);
4196
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicTrendColorEditor", function() { return getDynamicTrendColorEditor; });
4197
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
4198
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
4199
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18);
4200
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
4268
4201
 
4269
- if ((noDataSources || noResult) && !IconComponent) {
4270
- return /*#__PURE__*/external_react_default.a.createElement(Message_default.a, {
4271
- width: containerWidth,
4272
- height: containerHeight,
4273
- message: Object(i18n_["_"])('No Icon'),
4274
- level: "warning"
4275
- });
4202
+
4203
+ var getDynamicTrendColorEditor = function getDynamicTrendColorEditor(_ref) {
4204
+ var defaultContext = _ref.defaultContext,
4205
+ defaultPalettesConfig = _ref.defaultPalettesConfig;
4206
+ return {
4207
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic Trend'),
4208
+ option: 'trendColor',
4209
+ context: 'trendColorEditorConfig',
4210
+ editor: 'editor.dynamicColor',
4211
+ showEditor: function showEditor(_ref2) {
4212
+ var options = _ref2.options;
4213
+ return Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.trendColor);
4214
+ },
4215
+ editorProps: {
4216
+ labelPosition: 'left',
4217
+ flyoutTitle: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic Coloring: Trend'),
4218
+ formatters: [{
4219
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Ranges'),
4220
+ value: 'rangeValue',
4221
+ defaults: {
4222
+ trendValue: defaultContext.trendColorConfig
4223
+ }
4224
+ }],
4225
+ dataSelectors: [{
4226
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Trend'),
4227
+ value: 'trendValue'
4228
+ }],
4229
+ defaultPalettesConfig: defaultPalettesConfig
4230
+ }
4231
+ };
4232
+ };
4233
+
4234
+ /***/ }),
4235
+
4236
+ /***/ 89:
4237
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4238
+
4239
+ "use strict";
4240
+ __webpack_require__.r(__webpack_exports__);
4241
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicBackgroundColorEditor", function() { return getDynamicBackgroundColorEditor; });
4242
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
4243
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
4244
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18);
4245
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
4246
+
4247
+
4248
+ var getDynamicBackgroundColorEditor = function getDynamicBackgroundColorEditor(_ref) {
4249
+ var defaultContext = _ref.defaultContext,
4250
+ defaultPalettesConfig = _ref.defaultPalettesConfig;
4251
+ return {
4252
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic Background'),
4253
+ option: 'backgroundColor',
4254
+ context: 'backgroundColorEditorConfig',
4255
+ editor: 'editor.dynamicColor',
4256
+ showEditor: function showEditor(_ref2) {
4257
+ var options = _ref2.options;
4258
+ return Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.backgroundColor);
4259
+ },
4260
+ editorProps: {
4261
+ labelPosition: 'left',
4262
+ flyoutTitle: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic Coloring: Background'),
4263
+ formatters: [{
4264
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Ranges'),
4265
+ value: 'rangeValue',
4266
+ defaults: {
4267
+ majorValue: defaultContext.majorColorConfig,
4268
+ trendValue: defaultContext.trendColorConfig
4269
+ }
4270
+ }, {
4271
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Matches'),
4272
+ value: 'matchValue',
4273
+ defaults: {
4274
+ majorValue: defaultContext.majorColorMatchConfig
4275
+ }
4276
+ }],
4277
+ dataSelectors: [{
4278
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Major Value'),
4279
+ value: 'majorValue'
4280
+ }, {
4281
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Trend'),
4282
+ value: 'trendValue'
4283
+ }],
4284
+ defaultPalettesConfig: defaultPalettesConfig
4276
4285
  }
4286
+ };
4287
+ };
4277
4288
 
4278
- var IconLayout = null;
4279
-
4280
- if ((noDataSources || noResult) && IconComponent) {
4281
- IconLayout = /*#__PURE__*/external_react_default.a.cloneElement(IconComponent, {
4282
- width: containerWidth,
4283
- height: containerHeight,
4284
- color: props.iconColor,
4285
- opacity: iconOpacity
4286
- });
4287
- } else {
4288
- // will update later based on text size
4289
- var _props$showValue = props.showValue,
4290
- showValue = _props$showValue === void 0 ? true : _props$showValue,
4291
- trendDisplay = props.trendDisplay,
4292
- unit = props.unit,
4293
- underLabel = props.underLabel,
4294
- iconPosition = props.iconPosition;
4289
+ /***/ }),
4295
4290
 
4296
- if (!isValidPosition(iconPosition)) {
4297
- iconPosition = 'before';
4298
- }
4291
+ /***/ 9:
4292
+ /***/ (function(module, exports) {
4299
4293
 
4300
- var showHorizontal = isHorizontal(iconPosition);
4301
- var iconWidth = getIconWidth({
4302
- showHorizontal: showHorizontal,
4303
- width: containerWidth
4304
- });
4305
- var iconHeight = getIconHeight({
4306
- showHorizontal: showHorizontal,
4307
- height: containerHeight
4308
- });
4309
- var svgIconComponent = null;
4294
+ module.exports = require("@splunk/themes/variables");
4310
4295
 
4311
- if (IconComponent) {
4312
- svgIconComponent = /*#__PURE__*/external_react_default.a.cloneElement(IconComponent, {
4313
- width: getSVGDimension({
4314
- showValue: showValue,
4315
- containerDimension: containerWidth,
4316
- iconDimension: iconWidth,
4317
- ratio: 0.25
4318
- }),
4319
- height: getSVGDimension({
4320
- showValue: showValue,
4321
- containerDimension: containerHeight,
4322
- iconDimension: iconHeight,
4323
- ratio: 0.25
4324
- }),
4325
- color: props.iconColor,
4326
- opacity: iconOpacity
4327
- });
4328
- } // claculate major and trend text and font size
4296
+ /***/ }),
4329
4297
 
4298
+ /***/ 90:
4299
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4330
4300
 
4331
- var contentWidth = getValuesWidth({
4332
- showHorizontal: showHorizontal,
4333
- width: containerWidth
4334
- });
4335
- var contentHeight = getValuesHeight({
4336
- showHorizontal: showHorizontal,
4337
- height: containerHeight,
4338
- iconHeight: iconHeight
4339
- });
4340
- var toRemoveList = [{
4341
- key: 'underLabel',
4342
- value: ''
4343
- }, {
4344
- key: 'trendDisplay',
4345
- value: 'off'
4346
- }, {
4347
- key: 'unit',
4348
- value: ''
4349
- }, {
4350
- key: 'showValue',
4351
- value: false
4352
- }];
4301
+ "use strict";
4302
+ __webpack_require__.r(__webpack_exports__);
4303
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
4304
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
4305
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18);
4306
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
4353
4307
 
4354
- var _computeSingleValueCo = Object(singleValueUtils["computeSingleValueContent"])({
4355
- majorValue: majorValue,
4356
- trendValue: trendValue,
4357
- majorFontSize: majorFontSize,
4358
- trendFontSize: trendFontSize,
4359
- trendDisplay: trendDisplay,
4360
- contentWidth: contentWidth,
4361
- contentHeight: contentHeight,
4362
- containerWidth: containerWidth,
4363
- containerHeight: containerHeight,
4364
- unit: unit,
4365
- numberPrecision: numberPrecision,
4366
- shouldUseThousandSeparators: shouldUseThousandSeparators,
4367
- shouldAbbreviateTrendValue: shouldAbbreviateTrendValue,
4368
- toRemoveList: toRemoveList
4369
- }),
4370
- majorText = _computeSingleValueCo.majorText,
4371
- trendText = _computeSingleValueCo.trendText,
4372
- majorTextFontSize = _computeSingleValueCo.majorTextFontSize,
4373
- trendTextFontSize = _computeSingleValueCo.trendTextFontSize,
4374
- majorValueTitle = _computeSingleValueCo.majorValueTitle,
4375
- smallVizProps = _computeSingleValueCo.smallVizProps;
4376
4308
 
4377
- if (!isEmpty_default()(smallVizProps)) {
4378
- showValue = smallVizProps.showValue;
4379
- trendDisplay = smallVizProps.trendDisplay;
4380
- underLabel = smallVizProps.underLabel;
4381
- unit = smallVizProps.unit;
4382
- }
4309
+ var StaticMajorColorEditor = {
4310
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Static Major Value'),
4311
+ option: 'majorColor',
4312
+ editor: 'editor.color',
4313
+ showEditor: function showEditor(_ref) {
4314
+ var options = _ref.options;
4315
+ return !Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.majorColor);
4316
+ }
4317
+ };
4318
+ /* harmony default export */ __webpack_exports__["default"] = (StaticMajorColorEditor);
4383
4319
 
4384
- var iconFontSize = getIconFontSize({
4385
- showValue: showValue,
4386
- majorTextFontSize: majorTextFontSize,
4387
- iconWidth: iconWidth
4388
- }); // calculate underlabel size
4320
+ /***/ }),
4389
4321
 
4390
- var underLabelHeight = Object(singleValueUtils["getUnderLabelHeight"])(containerHeight * 0.1);
4391
- var underLabelFontSize = Object(singleValueUtils["getUnderLabel"])({
4392
- underLabel: underLabel,
4393
- width: contentWidth,
4394
- height: underLabelHeight
4395
- });
4396
- IconLayout = /*#__PURE__*/external_react_default.a.createElement(PureSingleValueIcon_SingleValueIconLayout, {
4397
- "data-test": "SingleValueIconLayout",
4398
- majorColor: majorColor,
4399
- majorText: majorText,
4400
- majorTextFontSize: majorTextFontSize,
4401
- majorValueTitle: majorValueTitle,
4402
- trendColor: trendColor,
4403
- trendText: trendText,
4404
- trendTextFontSize: trendTextFontSize,
4405
- showTrendIndicator: Object(singleValueUtils["shouldShowTrend"])(trendDisplay),
4406
- unit: unit,
4407
- unitPosition: unitPosition,
4408
- underLabel: underLabel,
4409
- underLabelFontSize: underLabelFontSize,
4410
- underLabelColor: underLabelColor,
4411
- showValue: showValue,
4412
- iconWidth: iconWidth,
4413
- iconHeight: iconHeight,
4414
- iconFontSize: iconFontSize,
4415
- iconColor: iconColor,
4416
- iconOpacity: iconOpacity,
4417
- iconPosition: iconPosition,
4418
- icon: icon,
4419
- svgIconComponent: svgIconComponent,
4420
- onValueClick: handleValueClick
4421
- });
4422
- }
4322
+ /***/ 91:
4323
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4423
4324
 
4424
- return /*#__PURE__*/external_react_default.a.createElement(VizStyleWrapper["default"], {
4425
- backgroundColor: backgroundColor,
4426
- style: style,
4427
- dataTestKey: "SingleValueIconWrapper"
4428
- }, IconLayout);
4429
- };
4325
+ "use strict";
4326
+ __webpack_require__.r(__webpack_exports__);
4327
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
4328
+ /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
4329
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18);
4330
+ /* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
4430
4331
 
4431
- return /*#__PURE__*/external_react_default.a.createElement(Container, {
4432
- width: width,
4433
- height: height
4434
- }, /*#__PURE__*/external_react_default.a.createElement(SizeAwareWrapper_default.a, null, function (containerDimension) {
4435
- return renderVisualization(containerDimension);
4436
- }));
4437
- };
4438
4332
 
4439
- SingleValueIcon_SingleValueIcon.propTypes = {
4440
- width: external_prop_types_default.a.oneOfType([external_prop_types_default.a.string, external_prop_types_default.a.number]),
4441
- height: external_prop_types_default.a.oneOfType([external_prop_types_default.a.string, external_prop_types_default.a.number]),
4442
- style: external_prop_types_default.a.object,
4443
- majorValue: external_prop_types_default.a.oneOfType([external_prop_types_default.a.string, external_prop_types_default.a.number]),
4444
- majorValueField: external_prop_types_default.a.string,
4445
- majorColor: external_prop_types_default.a.string,
4446
- majorFontSize: external_prop_types_default.a.number,
4447
- trendColor: external_prop_types_default.a.string,
4448
- trendValue: external_prop_types_default.a.oneOfType([external_prop_types_default.a.string, external_prop_types_default.a.number]),
4449
- trendFontSize: external_prop_types_default.a.number,
4450
- trendDisplay: external_prop_types_default.a.oneOf(['absolute', 'percent', 'off']),
4451
- shouldAbbreviateTrendValue: external_prop_types_default.a.bool,
4452
- backgroundColor: external_prop_types_default.a.string,
4453
- unit: external_prop_types_default.a.string,
4454
- unitPosition: external_prop_types_default.a.string,
4455
- underLabel: external_prop_types_default.a.string,
4456
- numberPrecision: external_prop_types_default.a.number,
4457
- shouldUseThousandSeparators: external_prop_types_default.a.bool,
4458
- icon: external_prop_types_default.a.string,
4459
- iconPosition: external_prop_types_default.a.oneOf(['before', 'after', 'top', 'below']),
4460
- iconColor: external_prop_types_default.a.string,
4461
- iconOpacity: external_prop_types_default.a.number,
4462
- showValue: external_prop_types_default.a.bool,
4463
- IconComponent: external_prop_types_default.a.element,
4464
- noDataSources: external_prop_types_default.a.bool,
4465
- noResult: external_prop_types_default.a.bool,
4466
- onValueClick: external_prop_types_default.a.func,
4467
- defaultFontColor: external_prop_types_default.a.string,
4468
- defaultBlockFontColor: external_prop_types_default.a.string
4469
- };
4470
- SingleValueIcon_SingleValueIcon.defaultProps = {
4471
- width: '100%',
4472
- height: 250,
4473
- majorValue: 'N/A',
4474
- majorValueField: '',
4475
- trendDisplay: 'absolute',
4476
- shouldAbbreviateTrendValue: false,
4477
- numberPrecision: 0,
4478
- shouldUseThousandSeparators: true,
4479
- unitPosition: 'after',
4480
- icon: 'default',
4481
- iconPosition: 'before',
4482
- iconOpacity: 1,
4483
- showValue: true,
4484
- noDataSources: false,
4485
- noResult: false,
4486
- onValueClick: function onValueClick() {}
4333
+ var StaticTrendColorEditor = {
4334
+ label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Static Trend'),
4335
+ option: 'trendColor',
4336
+ editor: 'editor.color',
4337
+ showEditor: function showEditor(_ref) {
4338
+ var options = _ref.options;
4339
+ return !Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.trendColor);
4340
+ },
4341
+ isDisabled: function isDisabled(_ref2) {
4342
+ var options = _ref2.options;
4343
+ return options.trendDisplay === 'off';
4344
+ }
4487
4345
  };
4488
- /* harmony default export */ var PureSingleValueIcon_SingleValueIcon = __webpack_exports__["default"] = (SingleValueIcon_SingleValueIcon);
4346
+ /* harmony default export */ __webpack_exports__["default"] = (StaticTrendColorEditor);
4489
4347
 
4490
4348
  /***/ })
4491
- /******/ ]);
4349
+
4350
+ /******/ });
4492
4351
  //# sourceMappingURL=SingleValueIcon.js.map