@splunk/visualizations 25.0.1 → 25.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_Background_Color_Red.png +0 -0
  2. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_Basic.png +0 -0
  3. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Actions_Simulated_Instance.png +0 -0
  4. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Actions_for_Numeric_Field_Simulated_Instance.png +0 -0
  5. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Dark.png +0 -0
  6. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Light.png +0 -0
  7. package/.loki/reference/chrome_docker_PureVisualizations_PureMap_custom_base_layer_tile_server.png +0 -0
  8. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Background_color_cyan.png +0 -0
  9. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Unit_specified_Unit_Position_after_default.png +0 -0
  10. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Unit_specified_Unit_Position_before.png +0 -0
  11. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Background_Color_white_Under_Label_and_Unit_specified.png +0 -0
  12. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Major_Value_is_null.png +0 -0
  13. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Unit_specified_Unit_Position_after_default.png +0 -0
  14. package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Unit_specified_Unit_Position_before.png +0 -0
  15. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Area_Editor.png +0 -0
  16. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bar_Editor.png +0 -0
  17. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bubble_Editor.png +0 -0
  18. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_ChoroplethSvg_Editor.png +0 -0
  19. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Column_Editor.png +0 -0
  20. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Ellipse_Editor.png +0 -0
  21. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Events_Editor.png +0 -0
  22. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_FillerGauge_Editor.png +0 -0
  23. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Image_Editor.png +0 -0
  24. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Line_Editor.png +0 -0
  25. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_LinkGraph_Editor.png +0 -0
  26. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
  27. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Markdown_Editor.png +0 -0
  28. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_MarkerGauge_Editor.png +0 -0
  29. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Parallel_Coordinates_Editor.png +0 -0
  30. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Pie_Editor.png +0 -0
  31. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Punchcard_Editor.png +0 -0
  32. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Rectangle_Editor.png +0 -0
  33. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Sankey_Editor.png +0 -0
  34. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Scatter_Editor.png +0 -0
  35. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Editor.png +0 -0
  36. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Icon_Editor.png +0 -0
  37. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Radial_Editor.png +0 -0
  38. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Table_Editor.png +0 -0
  39. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Background_Color_Light_Blue.png +0 -0
  40. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Basic_Events.png +0 -0
  41. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Event_Actions.png +0 -0
  42. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Actions.png +0 -0
  43. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary.png +0 -0
  44. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary_Simulated_Instance.png +0 -0
  45. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Footer_Fields.png +0 -0
  46. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Footer_Fields_with_Highlight.png +0 -0
  47. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Show_Placeholder.png +0 -0
  48. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Height.png +0 -0
  49. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Percentage_50.png +0 -0
  50. package/.loki/reference/chrome_docker_Visualizations_Events_Events_With_Options.png +0 -0
  51. package/.loki/reference/chrome_docker_Visualizations_LinkGraph_LinkGraph_ES.png +0 -0
  52. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_Unit_value_after.png +0 -0
  53. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_Unit_value_before.png +0 -0
  54. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Set_The_Unit_After.png +0 -0
  55. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Set_The_Unit_Before.png +0 -0
  56. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_Unit_Value_After.png +0 -0
  57. package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_Unit_Value_Before.png +0 -0
  58. package/Area.config.js +146 -157
  59. package/Area.config.js.map +1 -1
  60. package/Area.js +459 -545
  61. package/Area.js.map +1 -1
  62. package/Bar.config.js +148 -153
  63. package/Bar.config.js.map +1 -1
  64. package/Bar.js +468 -548
  65. package/Bar.js.map +1 -1
  66. package/Bubble.config.js +143 -123
  67. package/Bubble.config.js.map +1 -1
  68. package/Bubble.js +475 -530
  69. package/Bubble.js.map +1 -1
  70. package/ChoroplethSvg.config.js +87 -81
  71. package/ChoroplethSvg.config.js.map +1 -1
  72. package/ChoroplethSvg.js +352 -422
  73. package/ChoroplethSvg.js.map +1 -1
  74. package/Column.config.js +144 -151
  75. package/Column.config.js.map +1 -1
  76. package/Column.js +463 -546
  77. package/Column.js.map +1 -1
  78. package/Ellipse.config.js +86 -80
  79. package/Ellipse.config.js.map +1 -1
  80. package/Ellipse.js +319 -389
  81. package/Ellipse.js.map +1 -1
  82. package/Events.config.js +668 -0
  83. package/Events.config.js.map +1 -0
  84. package/Events.js +3116 -0
  85. package/Events.js.map +1 -0
  86. package/FillerGauge.config.js +94 -87
  87. package/FillerGauge.config.js.map +1 -1
  88. package/FillerGauge.js +352 -415
  89. package/FillerGauge.js.map +1 -1
  90. package/Image.config.js +74 -74
  91. package/Image.config.js.map +1 -1
  92. package/Image.js +713 -801
  93. package/Image.js.map +1 -1
  94. package/Line.config.js +145 -142
  95. package/Line.config.js.map +1 -1
  96. package/Line.js +471 -538
  97. package/Line.js.map +1 -1
  98. package/LinkGraph.config.js +120 -113
  99. package/LinkGraph.config.js.map +1 -1
  100. package/LinkGraph.js +24563 -717
  101. package/LinkGraph.js.map +1 -1
  102. package/Map.config.js +107 -100
  103. package/Map.config.js.map +1 -1
  104. package/Map.js +2358 -2465
  105. package/Map.js.map +1 -1
  106. package/Markdown.config.js +112 -112
  107. package/Markdown.config.js.map +1 -1
  108. package/Markdown.js +844 -918
  109. package/Markdown.js.map +1 -1
  110. package/MarkerGauge.config.js +185 -186
  111. package/MarkerGauge.config.js.map +1 -1
  112. package/MarkerGauge.js +1274 -1363
  113. package/MarkerGauge.js.map +1 -1
  114. package/ParallelCoordinates.config.js +137 -137
  115. package/ParallelCoordinates.config.js.map +1 -1
  116. package/ParallelCoordinates.js +732 -923
  117. package/ParallelCoordinates.js.map +1 -1
  118. package/Pie.config.js +132 -132
  119. package/Pie.config.js.map +1 -1
  120. package/Pie.js +1193 -1281
  121. package/Pie.js.map +1 -1
  122. package/Punchcard.config.js +138 -138
  123. package/Punchcard.config.js.map +1 -1
  124. package/Punchcard.js +2723 -2923
  125. package/Punchcard.js.map +1 -1
  126. package/Rectangle.config.js +267 -260
  127. package/Rectangle.config.js.map +1 -1
  128. package/Rectangle.js +1107 -1188
  129. package/Rectangle.js.map +1 -1
  130. package/Sankey.config.js +149 -142
  131. package/Sankey.config.js.map +1 -1
  132. package/Sankey.js +2613 -2808
  133. package/Sankey.js.map +1 -1
  134. package/Scatter.config.js +144 -123
  135. package/Scatter.config.js.map +1 -1
  136. package/Scatter.js +1820 -1889
  137. package/Scatter.js.map +1 -1
  138. package/SingleValue.config.js +121 -114
  139. package/SingleValue.config.js.map +1 -1
  140. package/SingleValue.js +2554 -2635
  141. package/SingleValue.js.map +1 -1
  142. package/SingleValueBasic.js +34 -34
  143. package/SingleValueBasic.js.map +1 -1
  144. package/SingleValueIcon.config.js +129 -120
  145. package/SingleValueIcon.config.js.map +1 -1
  146. package/SingleValueIcon.js +994 -1212
  147. package/SingleValueIcon.js.map +1 -1
  148. package/SingleValueRadial.config.js +216 -178
  149. package/SingleValueRadial.config.js.map +1 -1
  150. package/SingleValueRadial.js +2235 -2316
  151. package/SingleValueRadial.js.map +1 -1
  152. package/Table.config.js +150 -151
  153. package/Table.config.js.map +1 -1
  154. package/Table.js +2446 -2525
  155. package/Table.js.map +1 -1
  156. package/common/Charting.js +11 -11
  157. package/common/Charting.js.map +1 -1
  158. package/common/ChartingApi.js +2 -2
  159. package/common/ChartingApi.js.map +1 -1
  160. package/common/EventsDoc.js +25 -18
  161. package/common/EventsDoc.js.map +1 -1
  162. package/common/GaugeMajorTicks.js +10 -10
  163. package/common/GaugeMajorTicks.js.map +1 -1
  164. package/common/GaugeValueMarker.js +10 -10
  165. package/common/GaugeValueMarker.js.map +1 -1
  166. package/common/OptionsDoc.js +57 -357
  167. package/common/OptionsDoc.js.map +1 -1
  168. package/common/OverviewDoc.js +22 -22
  169. package/common/OverviewDoc.js.map +1 -1
  170. package/common/SplunkVisualization.js +4 -4
  171. package/common/SplunkVisualization.js.map +1 -1
  172. package/common/SplunkVisualizationApi.js +2 -2
  173. package/common/SplunkVisualizationApi.js.map +1 -1
  174. package/common/ThemesDoc.js +21 -21
  175. package/common/ThemesDoc.js.map +1 -1
  176. package/common/chartingUtils.js +4 -4
  177. package/common/chartingUtils.js.map +1 -1
  178. package/common/docUtils.js +4 -4
  179. package/common/docUtils.js.map +1 -1
  180. package/common/gaugeUtils.js +13 -13
  181. package/common/gaugeUtils.js.map +1 -1
  182. package/common/shapeUtils.js +8 -8
  183. package/common/shapeUtils.js.map +1 -1
  184. package/common/utils/configUtils.js +17 -18
  185. package/common/utils/configUtils.js.map +1 -1
  186. package/common/utils/{JSONSchemaUtils.js → dataUtils.js} +24 -25
  187. package/common/utils/dataUtils.js.map +1 -0
  188. package/common/utils/hocUtils.js +5 -85
  189. package/common/utils/hocUtils.js.map +1 -1
  190. package/common/utils/mapUtils.js +198 -0
  191. package/common/utils/mapUtils.js.map +1 -0
  192. package/common/utils/singleValueUtils.js +15 -12
  193. package/common/utils/singleValueUtils.js.map +1 -1
  194. package/common/utils/testHelper.js +8 -8
  195. package/common/utils/testHelper.js.map +1 -1
  196. package/common/withDashboardViz.js +120 -207
  197. package/common/withDashboardViz.js.map +1 -1
  198. package/package.json +16 -14
  199. package/.loki/reference/chrome_docker_PureVisualizations_SvgChoroplethDynamic_SVG_Of_Size_Greater_Than_2_MB_Render.png +0 -0
  200. package/common/utils/JSONSchemaUtils.js.map +0 -1
@@ -144,28 +144,26 @@ module.exports = require("@splunk/ui-utils/i18n");
144
144
  /* 15 */,
145
145
  /* 16 */,
146
146
  /* 17 */,
147
- /* 18 */,
148
- /* 19 */
147
+ /* 18 */
149
148
  /***/ (function(module, exports) {
150
149
 
151
150
  module.exports = require("@splunk/visualizations-shared/Message");
152
151
 
153
152
  /***/ }),
154
- /* 20 */,
155
- /* 21 */,
156
- /* 22 */
153
+ /* 19 */,
154
+ /* 20 */
157
155
  /***/ (function(module, exports) {
158
156
 
159
157
  module.exports = require("@splunk/visualization-context/TimezoneContext");
160
158
 
161
159
  /***/ }),
162
- /* 23 */
160
+ /* 21 */
163
161
  /***/ (function(module, exports) {
164
162
 
165
163
  module.exports = require("@splunk/visualizations-shared/style");
166
164
 
167
165
  /***/ }),
168
- /* 24 */
166
+ /* 22 */
169
167
  /***/ (function(module, exports, __webpack_require__) {
170
168
 
171
169
  "use strict";
@@ -233,6 +231,8 @@ var ChartingApiFunctional = /*#__PURE__*/function () {
233
231
  exports.ChartingApiFunctional = ChartingApiFunctional;
234
232
 
235
233
  /***/ }),
234
+ /* 23 */,
235
+ /* 24 */,
236
236
  /* 25 */,
237
237
  /* 26 */,
238
238
  /* 27 */,
@@ -280,19 +280,19 @@ __webpack_require__(44); // fixme, @splunk/charting should be refactor to use lo
280
280
 
281
281
  var charting_bundle_1 = __webpack_require__(45);
282
282
 
283
- var TimezoneContext_1 = __webpack_require__(22);
283
+ var TimezoneContext_1 = __webpack_require__(20);
284
284
 
285
- var style_1 = __webpack_require__(23);
285
+ var style_1 = __webpack_require__(21);
286
286
 
287
287
  var styled_components_1 = __webpack_require__(2);
288
288
 
289
- var Message_1 = __webpack_require__(19);
289
+ var Message_1 = __webpack_require__(18);
290
290
 
291
291
  var useSplunkTheme_1 = __webpack_require__(46);
292
292
 
293
293
  var themeUtils_1 = __webpack_require__(47);
294
294
 
295
- var ChartingApi_1 = __webpack_require__(24);
295
+ var ChartingApi_1 = __webpack_require__(22);
296
296
 
297
297
  exports.NO_INPLACE_PROPS = ['chart', 'chart.orientation', 'layout.splitSeries', 'chart.style', 'legend.placement'];
298
298
 
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///external \"styled-components\"","webpack:///external \"lodash\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualizations-shared/Message\"","webpack:///external \"@splunk/visualization-context/TimezoneContext\"","webpack:///external \"@splunk/visualizations-shared/style\"","webpack:///./src/common/ChartingApi.ts","webpack:///./src/common/Charting.tsx","webpack:///external \"@splunk/visualization-color-palettes\"","webpack:///external \"react-event-listener\"","webpack:///external \"@splunk/visualizations-shared/i18n\"","webpack:///external \"@splunk/charting-bundle\"","webpack:///external \"@splunk/themes/useSplunkTheme\"","webpack:///external \"@splunk/visualizations-shared/themeUtils\""],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;AClFA,kC;;;;;;ACAA,uC;;;;;;ACAA,8C;;;;;;ACAA,mC;;;;;;ACAA,kE;;;;;;;ACAA,+D;;;;;;ACAA,kD;;;;;;;;;;;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Q;AAAC,eAAO,EAAE,SAAE,WAAF,CAAV;AAA0B,aAAK,EAAC;AAAhC,OAAR,CAAP;AACH;;AAED,WAAO,oBAAC,KAAD,EAAM,kBAAK,KAAL,CAAN,CAAP;AACH,GAZD;;AAcA,SAAO,CAAC,WAAR,GAAsB,iBAAtB;AACA,SAAO,CAAC,SAAR,GAAoB,SAApB;AACA,SAAO,CAAC,YAAR,GAAuB,YAAvB;AACA,SAAO,OAAP;AACH,CAnBD,C,CAqBA;;;AACA,kBAAe,qBAAqB,CAAC,QAAD,CAApC,C;;;;;;ACvdA,iE;;;;;;ACAA,iD;;;;;;ACAA,+D;;;;;;ACAA,oD;;;;;;ACAA,0D;;;;;;ACAA,qE","file":"Charting.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 41);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","module.exports = require(\"styled-components\");","module.exports = require(\"lodash\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualizations-shared/Message\");","module.exports = require(\"@splunk/visualization-context/TimezoneContext\");","module.exports = require(\"@splunk/visualizations-shared/style\");","import jsCharting from '@splunk/charting-bundle';\n\ninterface Point {\n /**\n * Valid xValue of the chart\n *\n * @type {string|number}\n * @memberof Point\n */\n xValue?: string | number;\n\n /**\n * Valid seriesName for a chart\n *\n * @type {string}\n * @memberof Point\n */\n seriesName?: string;\n}\n\nexport class ChartingApiFunctional {\n // eslint-disable-next-line no-useless-constructor\n constructor(private chartRef: any) {}\n\n /**\n * Allows users to programmatically highlight a point on the chart\n *\n * @memberof ChartingApiFunctional\n */\n highlight({ xValue, seriesName }: Point = { xValue: '', seriesName: '' }): void {\n this.getChart().highlight(xValue, seriesName);\n }\n\n /**\n * Allows users to programmatically unhighlight all points on the chart\n *\n * @memberof ChartingApiFunctional\n */\n unHighlight(): void {\n this.getChart().unHighlight();\n }\n\n // returns chart object\n getChart(): jsCharting {\n return this.chartRef?.current;\n }\n}\n","/* eslint-disable react/no-unused-prop-types */\nimport { pick, debounce, noop } from 'lodash';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport { VIZ_CATEGORICAL } from '@splunk/visualization-color-palettes';\nimport { useEffect, useRef, useContext } from 'react';\nimport * as React from 'react';\nimport * as T from 'prop-types';\nimport EventListener from 'react-event-listener';\nimport '@splunk/visualizations-shared/i18n'; // fixme, @splunk/charting should be refactor to use locale & timezone instead of i18n functions\nimport jsCharting from '@splunk/charting-bundle';\nimport TimezoneContext, { TimezoneContextInterface } from '@splunk/visualization-context/TimezoneContext';\nimport { toDimension } from '@splunk/visualizations-shared/style';\nimport styled from 'styled-components';\nimport Message from '@splunk/visualizations-shared/Message';\nimport useSplunkTheme from '@splunk/themes/useSplunkTheme';\nimport { getChartingThemeKey } from '@splunk/visualizations-shared/themeUtils';\nimport { ChartingApiFunctional } from './ChartingApi';\n\nexport const NO_INPLACE_PROPS = [\n 'chart',\n 'chart.orientation',\n 'layout.splitSeries',\n 'chart.style',\n 'legend.placement',\n];\n\nexport const changedOptions = (curOptions: Record<string, any>, nextOptions: Record<string, any>): string[] =>\n Object.keys(curOptions)\n .filter(key => !(key in nextOptions))\n .concat(\n Object.keys(nextOptions).filter(\n key => !(key in curOptions) || curOptions[key] !== nextOptions[key]\n )\n );\n\njsCharting.enableScaledEvents();\n\nfunction usePrevious(value): Record<string, any> {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\n\nexport const canUpdateInPlace = (\n curOptions: Record<string, any>,\n nextOptions: Record<string, any>\n): boolean => {\n // if either of the options are undefined\n // it cannot update in place.\n if (!curOptions || !nextOptions) {\n return false;\n }\n return (\n !NO_INPLACE_PROPS.some(p => curOptions[p] !== nextOptions[p]) &&\n !changedOptions(curOptions, nextOptions).some(p => p.toLowerCase().endsWith('color'))\n );\n};\n\n// create 'row' payloads from 'rowContext' in the flattened format:\n// row.<fieldname>.value\nexport const updateRowPayload = (\n chartEventRowContext: Record<string, any>,\n payload: Record<string, any>\n): Record<string, any> => {\n Object.keys(chartEventRowContext || {}).forEach(key => {\n // eslint-disable-next-line no-param-reassign\n payload[`${key}.value`] = chartEventRowContext[key];\n });\n\n return payload;\n};\n\nexport interface ContainerProps {\n width: string | number;\n height: string | number;\n}\n\ntype ChartEventType = 'pointClick' | 'pointMouseOver' | 'pointMouseOut' | 'chartRangeSelect' | 'legendClick';\nenum VizChartEventType {\n POINT_CLICK = 'point.click',\n POINT_MOUSE_OUT = 'point.mouseout',\n POINT_MOUSE_OVER = 'point.mouseover',\n LEGEND_CLICK = 'legend.click',\n}\n\ninterface ChartEvent<T extends ChartEventType> extends Event {\n name: string;\n name2: string;\n value?: unknown;\n value2?: unknown;\n rowContext?: Record<string, any>;\n span?: number;\n type: T;\n}\n\n// @TODO(pwied): remove after HC upgrade to 8+\n// .highcharts-a11y-proxy-container rule addresses a HighCharts < 8 bug\n// caused by the accessibility plugin\n// https://github.com/highcharts/highcharts/issues/12883\nconst ChartingContainer = styled.div.attrs((props: ContainerProps) => ({\n 'data-test': 'charting-container',\n width: props.width,\n height: props.height,\n}))`\n & .highcharts-a11y-proxy-container {\n pointer-events: none;\n }\n overflow: hidden;\n position: relative;\n ${props => toDimension(pick(props, ['width', 'height']))};\n`;\n\nexport interface ChartingProps {\n // width in pixel or string, defaults to 100%\n width: string | number;\n // height in pixel or string\n height: string | number;\n // visualization formatting options\n options?: Record<string, any>;\n // charting dataset from jsCharting.extractChartReadyData\n chartData: Record<string, any>;\n // callbacks to trigger event\n onEventTrigger?: (...args: any[]) => void;\n onSelect?: (...args: any[]) => void;\n onClick?: (...args: any[]) => void;\n onPointMouseOver?: (...args: any[]) => void;\n onPointMouseOut?: (...args: any[]) => void;\n // Custom style on visualization\n style?: Record<string, any>;\n colorPalette?: Array<string>;\n visualizationApiRef?: (...args: any[]) => void;\n themeKey?: string;\n}\n\nconst propTypes: Record<keyof ChartingProps, T.Validator<any>> = {\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n options: T.object,\n chartData: T.object,\n onEventTrigger: T.func,\n onClick: T.func,\n onSelect: T.func,\n onPointMouseOver: T.func,\n onPointMouseOut: T.func,\n style: T.object,\n colorPalette: T.array,\n visualizationApiRef: T.func,\n themeKey: T.string,\n};\n\nconst Charting = (props: ChartingProps): React.ReactElement => {\n const container = useRef<HTMLDivElement>(null);\n const needsInit = useRef<boolean>(true);\n const chart = useRef<jsCharting>();\n const needsRedraw = useRef<boolean>(true);\n const api = useRef(new ChartingApiFunctional(chart));\n const timezone = useContext<TimezoneContextInterface>(TimezoneContext);\n\n const computeChartingSize = () => {\n if (container.current) {\n const rect = container.current.getBoundingClientRect();\n return {\n height: rect.height,\n width: rect.width,\n };\n }\n return {};\n };\n const splunkTheme = useSplunkTheme();\n const themeKey = props.themeKey ? props.themeKey : getChartingThemeKey({ splunkThemeV1: splunkTheme });\n const {\n width,\n height,\n style,\n chartData,\n options,\n colorPalette,\n onClick,\n onSelect,\n onPointMouseOut,\n onPointMouseOver,\n onEventTrigger,\n } = props;\n const prevOptions = usePrevious(options);\n const prevTimezone = usePrevious(timezone);\n\n const handleClick = (\n chartEvent: ChartEvent<'pointClick' | 'legendClick'>,\n type: VizChartEventType\n ): void => {\n let payload: Partial<ChartEvent<'pointClick' | 'legendClick'>> = pick(\n chartEvent,\n 'name2',\n 'value2',\n '_span',\n 'modifierKey'\n );\n\n payload.name = payload.name2;\n delete payload.name2;\n\n if (type === VizChartEventType.POINT_CLICK) {\n payload.value = payload.value2;\n delete payload.value2;\n\n payload = updateRowPayload(chartEvent.rowContext, payload);\n }\n\n onClick({\n type,\n originalEvent: chartEvent,\n payload,\n });\n };\n\n const destroyChart = (): void => {\n if (chart.current) {\n chart.current.destroy();\n chart.current = null;\n }\n needsRedraw.current = true;\n needsInit.current = true;\n };\n\n const handleSelect = (chartEvent: ChartEvent<'chartRangeSelect'>): void => {\n // todo: need change this after breaking all visualizations\n if (onSelect && typeof onSelect === 'function') {\n onSelect({\n type: 'range.select',\n originalEvent: chartEvent,\n payload: pick(chartEvent, 'startXIndex', 'endXIndex', 'startXValue', 'endXValue'),\n });\n\n return;\n }\n\n // the chartEvent here is a jQuery event\n onEventTrigger({\n type: 'range.select',\n originalEvent: chartEvent,\n payload: pick(chartEvent, 'startXIndex', 'endXIndex', 'startXValue', 'endXValue'),\n });\n };\n\n const handlePointMouseOut = (chartEvent: ChartEvent<'pointMouseOut'>, type: VizChartEventType): void => {\n let payload: Partial<ChartEvent<'pointMouseOut'>> = pick(\n chartEvent,\n 'name2',\n 'value2',\n '_span',\n 'modifierKey',\n 'tooltipContext'\n );\n\n payload.name = payload.name2;\n delete payload.name2;\n payload.value = payload.value2;\n delete payload.value2;\n\n payload = updateRowPayload(chartEvent.rowContext, payload);\n\n onPointMouseOut({\n type,\n originalEvent: chartEvent,\n payload,\n });\n };\n\n const handlePointMouseOver = (\n chartEvent: ChartEvent<'pointMouseOver'>,\n type: VizChartEventType\n ): void => {\n let payload: Partial<ChartEvent<'pointMouseOver'>> = pick(\n chartEvent,\n 'name2',\n 'value2',\n '_span',\n 'modifierKey',\n 'tooltipContext'\n );\n\n payload.name = payload.name2;\n delete payload.name2;\n payload.value = payload.value2;\n delete payload.value2;\n\n payload = updateRowPayload(chartEvent.rowContext, payload);\n\n onPointMouseOver({\n type,\n originalEvent: chartEvent,\n payload,\n });\n };\n\n const drawChart = (): void => {\n const updatedOptions = { ...options, shouldColorizeTooltipData: false };\n const computedChartSize = computeChartingSize();\n const computedWidth = computedChartSize.width;\n const computedHeight = computedChartSize.height;\n const serializedTimezone = timezone?.serializedTimezone;\n const ianaTimezone = timezone?.ianaTimezone;\n const utcOffset = timezone?.utcOffset;\n if (!computedWidth || !computedHeight) {\n return;\n }\n if (!chartData || !Object.keys(chartData).length) {\n return;\n }\n\n // splunk-charting layers configuration option updates.\n // when an option is removed it needs to be set to an empty string\n // to override the previous configuration\n if (prevOptions) {\n Object.keys(prevOptions).forEach(key => {\n if (updatedOptions[key] === undefined) {\n updatedOptions[key] = '';\n }\n });\n }\n\n try {\n if (needsInit.current) {\n destroyChart();\n jsCharting.setTheme(themeKey);\n if (colorPalette.length > 0) {\n jsCharting.setColorPalette(colorPalette);\n }\n chart.current = jsCharting.createChart(container.current, {\n ...updatedOptions,\n drilldown: 'all',\n ...(typeof serializedTimezone === 'string' && {\n 'time.serializedTz': serializedTimezone,\n }),\n ...(typeof ianaTimezone === 'string' && {\n 'time.ianaTimezone': ianaTimezone,\n }),\n ...(typeof utcOffset === 'number' && {\n 'time.timezoneOffset': utcOffset,\n }),\n });\n // bind event handlers\n chart.current.on('pointClick', e => {\n handleClick(e, VizChartEventType.POINT_CLICK);\n });\n chart.current.on('pointMouseOver', e => {\n handlePointMouseOver(e, VizChartEventType.POINT_MOUSE_OVER);\n });\n chart.current.on('pointMouseOut', e => {\n handlePointMouseOut(e, VizChartEventType.POINT_MOUSE_OUT);\n });\n chart.current.on('legendClick', e => {\n handleClick(e, VizChartEventType.LEGEND_CLICK);\n });\n chart.current.on('chartRangeSelect', handleSelect);\n }\n if (needsRedraw.current) {\n jsCharting.setTheme(themeKey);\n if (colorPalette.length > 0) {\n jsCharting.setColorPalette(colorPalette);\n }\n chart.current.prepareAndDraw(chartData, updatedOptions, () => {});\n }\n if (chart.current) {\n chart.current.resize(computedWidth, computedHeight);\n }\n needsInit.current = false;\n needsRedraw.current = false;\n } catch (e) {\n window.console.error('Caught error rendering chart:', e);\n }\n };\n\n const debouncedDrawChart = debounce(drawChart, 5);\n\n const onContainerMount = chartingContainer => {\n container.current = chartingContainer;\n debouncedDrawChart();\n };\n\n const prevTheme = usePrevious(themeKey);\n const prevOnClick = usePrevious(onClick);\n\n useEffect(() => {\n debouncedDrawChart();\n props.visualizationApiRef(api.current);\n return () => {\n props.visualizationApiRef(null);\n destroyChart();\n };\n }, []);\n\n useEffect(() => {\n // TODO: figure out why re-init is needed for functional components (i.e. PlatformViz) when changing theme\n // seems like redraw doesn't suffice to update the background colors\n if (\n !chart.current ||\n !canUpdateInPlace(prevOptions, options) ||\n // timezone is a simple object so this comparison should be fast\n JSON.stringify(prevTimezone) !== JSON.stringify(timezone) ||\n (!props.themeKey && prevTheme !== themeKey) ||\n prevOnClick !== onClick\n ) {\n needsInit.current = true;\n }\n needsRedraw.current = true;\n // need to immediately call drawChart upon an option or chartData change\n // otherwise a noop would occur if the onContainerMount drawChart is re-invoked when dimensions change\n drawChart();\n }, [\n JSON.stringify(options),\n JSON.stringify(chartData.toJSON()),\n JSON.stringify(chartData.annotations),\n timezone?.ianaTimezone,\n timezone?.utcOffset,\n timezone?.serializedTimezone,\n themeKey,\n onClick,\n ]);\n return (\n <ChartingContainer style={style} ref={onContainerMount} width={width} height={height}>\n <EventListener target={window} onResize={debouncedDrawChart} />\n </ChartingContainer>\n );\n};\n\nconst defaultProps: Record<keyof ChartingProps, any> = {\n width: '100%',\n height: 250,\n options: {},\n style: {},\n // todo: need remove it\n onEventTrigger: noop,\n onClick: noop,\n onSelect: noop,\n onPointMouseOver: noop,\n onPointMouseOut: noop,\n colorPalette: VIZ_CATEGORICAL,\n visualizationApiRef: noop,\n chartData: null,\n themeKey: null,\n};\n\nCharting.propTypes = propTypes;\nCharting.defaultProps = defaultProps;\n\n// allow for early return in case of empty chartData while still following hook rules\nconst withEmptyChartMessage = (Chart): React.FunctionComponent<ChartingProps> => {\n const Wrapper = (props: ChartingProps): React.ReactElement => {\n const { chartData } = props;\n\n if (!chartData) {\n return <Message message={_('No DataSource')} level=\"warning\" />;\n }\n\n if (chartData && !Object.keys(chartData).length) {\n return <Message message={_('No Result')} level=\"info\" />;\n }\n\n return <Chart {...props} />;\n };\n\n Wrapper.displayName = 'ChartingWrapper';\n Wrapper.propTypes = propTypes;\n Wrapper.defaultProps = defaultProps;\n return Wrapper;\n};\n\n// export default Charting;\nexport default withEmptyChartMessage(Charting as any);\n","module.exports = require(\"@splunk/visualization-color-palettes\");","module.exports = require(\"react-event-listener\");","module.exports = require(\"@splunk/visualizations-shared/i18n\");","module.exports = require(\"@splunk/charting-bundle\");","module.exports = require(\"@splunk/themes/useSplunkTheme\");","module.exports = require(\"@splunk/visualizations-shared/themeUtils\");"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///external \"styled-components\"","webpack:///external \"lodash\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualizations-shared/Message\"","webpack:///external \"@splunk/visualization-context/TimezoneContext\"","webpack:///external \"@splunk/visualizations-shared/style\"","webpack:///./src/common/ChartingApi.ts","webpack:///./src/common/Charting.tsx","webpack:///external \"@splunk/visualization-color-palettes\"","webpack:///external \"react-event-listener\"","webpack:///external \"@splunk/visualizations-shared/i18n\"","webpack:///external \"@splunk/charting-bundle\"","webpack:///external \"@splunk/themes/useSplunkTheme\"","webpack:///external \"@splunk/visualizations-shared/themeUtils\""],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA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AxB,C,CAEA;;AACA,IAAM,qBAAqB,GAAG,SAAxB,qBAAwB,CAAC,KAAD,EAAkD;AAC5E,MAAM,OAAO,GAAG,SAAV,OAAU,CAAC,KAAD,EAA6C;AAAA,QACjD,SADiD,GACnC,KADmC,CACjD,SADiD;;AAGzD,QAAI,CAAC,SAAL,EAAgB;AACZ,aAAO,oBAAC,iBAAD,EAAQ;AAAC,eAAO,EAAE,SAAE,eAAF,CAAV;AAA8B,aAAK,EAAC;AAApC,OAAR,CAAP;AACH;;AAED,QAAI,SAAS,IAAI,CAAC,MAAM,CAAC,IAAP,CAAY,SAAZ,EAAuB,MAAzC,EAAiD;AAC7C,aAAO,oBAAC,iBAAD,EAAQ;AAAC,eAAO,EAAE,SAAE,WAAF,CAAV;AAA0B,aAAK,EAAC;AAAhC,OAAR,CAAP;AACH;;AAED,WAAO,oBAAC,KAAD,EAAM,kBAAK,KAAL,CAAN,CAAP;AACH,GAZD;;AAcA,SAAO,CAAC,WAAR,GAAsB,iBAAtB;AACA,SAAO,CAAC,SAAR,GAAoB,SAApB;AACA,SAAO,CAAC,YAAR,GAAuB,YAAvB;AACA,SAAO,OAAP;AACH,CAnBD,C,CAqBA;;;AACA,kBAAe,qBAAqB,CAAC,QAAD,CAApC,C;;;;;;ACvdA,iE;;;;;;ACAA,iD;;;;;;ACAA,+D;;;;;;ACAA,oD;;;;;;ACAA,0D;;;;;;ACAA,qE","file":"Charting.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 41);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","module.exports = require(\"styled-components\");","module.exports = require(\"lodash\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualizations-shared/Message\");","module.exports = require(\"@splunk/visualization-context/TimezoneContext\");","module.exports = require(\"@splunk/visualizations-shared/style\");","import jsCharting from '@splunk/charting-bundle';\n\ninterface Point {\n /**\n * Valid xValue of the chart\n *\n * @type {string|number}\n * @memberof Point\n */\n xValue?: string | number;\n\n /**\n * Valid seriesName for a chart\n *\n * @type {string}\n * @memberof Point\n */\n seriesName?: string;\n}\n\nexport class ChartingApiFunctional {\n // eslint-disable-next-line no-useless-constructor\n constructor(private chartRef: any) {}\n\n /**\n * Allows users to programmatically highlight a point on the chart\n *\n * @memberof ChartingApiFunctional\n */\n highlight({ xValue, seriesName }: Point = { xValue: '', seriesName: '' }): void {\n this.getChart().highlight(xValue, seriesName);\n }\n\n /**\n * Allows users to programmatically unhighlight all points on the chart\n *\n * @memberof ChartingApiFunctional\n */\n unHighlight(): void {\n this.getChart().unHighlight();\n }\n\n // returns chart object\n getChart(): jsCharting {\n return this.chartRef?.current;\n }\n}\n","/* eslint-disable react/no-unused-prop-types */\nimport { pick, debounce, noop } from 'lodash';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport { VIZ_CATEGORICAL } from '@splunk/visualization-color-palettes';\nimport { useEffect, useRef, useContext } from 'react';\nimport * as React from 'react';\nimport * as T from 'prop-types';\nimport EventListener from 'react-event-listener';\nimport '@splunk/visualizations-shared/i18n'; // fixme, @splunk/charting should be refactor to use locale & timezone instead of i18n functions\nimport jsCharting from '@splunk/charting-bundle';\nimport TimezoneContext, { TimezoneContextInterface } from '@splunk/visualization-context/TimezoneContext';\nimport { toDimension } from '@splunk/visualizations-shared/style';\nimport styled from 'styled-components';\nimport Message from '@splunk/visualizations-shared/Message';\nimport useSplunkTheme from '@splunk/themes/useSplunkTheme';\nimport { getChartingThemeKey } from '@splunk/visualizations-shared/themeUtils';\nimport { ChartingApiFunctional } from './ChartingApi';\n\nexport const NO_INPLACE_PROPS = [\n 'chart',\n 'chart.orientation',\n 'layout.splitSeries',\n 'chart.style',\n 'legend.placement',\n];\n\nexport const changedOptions = (curOptions: Record<string, any>, nextOptions: Record<string, any>): string[] =>\n Object.keys(curOptions)\n .filter(key => !(key in nextOptions))\n .concat(\n Object.keys(nextOptions).filter(\n key => !(key in curOptions) || curOptions[key] !== nextOptions[key]\n )\n );\n\njsCharting.enableScaledEvents();\n\nfunction usePrevious(value): Record<string, any> {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\n\nexport const canUpdateInPlace = (\n curOptions: Record<string, any>,\n nextOptions: Record<string, any>\n): boolean => {\n // if either of the options are undefined\n // it cannot update in place.\n if (!curOptions || !nextOptions) {\n return false;\n }\n return (\n !NO_INPLACE_PROPS.some(p => curOptions[p] !== nextOptions[p]) &&\n !changedOptions(curOptions, nextOptions).some(p => p.toLowerCase().endsWith('color'))\n );\n};\n\n// create 'row' payloads from 'rowContext' in the flattened format:\n// row.<fieldname>.value\nexport const updateRowPayload = (\n chartEventRowContext: Record<string, any>,\n payload: Record<string, any>\n): Record<string, any> => {\n Object.keys(chartEventRowContext || {}).forEach(key => {\n // eslint-disable-next-line no-param-reassign\n payload[`${key}.value`] = chartEventRowContext[key];\n });\n\n return payload;\n};\n\nexport interface ContainerProps {\n width: string | number;\n height: string | number;\n}\n\ntype ChartEventType = 'pointClick' | 'pointMouseOver' | 'pointMouseOut' | 'chartRangeSelect' | 'legendClick';\nenum VizChartEventType {\n POINT_CLICK = 'point.click',\n POINT_MOUSE_OUT = 'point.mouseout',\n POINT_MOUSE_OVER = 'point.mouseover',\n LEGEND_CLICK = 'legend.click',\n}\n\ninterface ChartEvent<T extends ChartEventType> extends Event {\n name: string;\n name2: string;\n value?: unknown;\n value2?: unknown;\n rowContext?: Record<string, any>;\n span?: number;\n type: T;\n}\n\n// @TODO(pwied): remove after HC upgrade to 8+\n// .highcharts-a11y-proxy-container rule addresses a HighCharts < 8 bug\n// caused by the accessibility plugin\n// https://github.com/highcharts/highcharts/issues/12883\nconst ChartingContainer = styled.div.attrs((props: ContainerProps) => ({\n 'data-test': 'charting-container',\n width: props.width,\n height: props.height,\n}))`\n & .highcharts-a11y-proxy-container {\n pointer-events: none;\n }\n overflow: hidden;\n position: relative;\n ${props => toDimension(pick(props, ['width', 'height']))};\n`;\n\nexport interface ChartingProps {\n // width in pixel or string, defaults to 100%\n width: string | number;\n // height in pixel or string\n height: string | number;\n // visualization formatting options\n options?: Record<string, any>;\n // charting dataset from jsCharting.extractChartReadyData\n chartData: Record<string, any>;\n // callbacks to trigger event\n onEventTrigger?: (...args: any[]) => void;\n onSelect?: (...args: any[]) => void;\n onClick?: (...args: any[]) => void;\n onPointMouseOver?: (...args: any[]) => void;\n onPointMouseOut?: (...args: any[]) => void;\n // Custom style on visualization\n style?: Record<string, any>;\n colorPalette?: Array<string>;\n visualizationApiRef?: (...args: any[]) => void;\n themeKey?: string;\n}\n\nconst propTypes: Record<keyof ChartingProps, T.Validator<any>> = {\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n options: T.object,\n chartData: T.object,\n onEventTrigger: T.func,\n onClick: T.func,\n onSelect: T.func,\n onPointMouseOver: T.func,\n onPointMouseOut: T.func,\n style: T.object,\n colorPalette: T.array,\n visualizationApiRef: T.func,\n themeKey: T.string,\n};\n\nconst Charting = (props: ChartingProps): React.ReactElement => {\n const container = useRef<HTMLDivElement>(null);\n const needsInit = useRef<boolean>(true);\n const chart = useRef<jsCharting>();\n const needsRedraw = useRef<boolean>(true);\n const api = useRef(new ChartingApiFunctional(chart));\n const timezone = useContext<TimezoneContextInterface>(TimezoneContext);\n\n const computeChartingSize = () => {\n if (container.current) {\n const rect = container.current.getBoundingClientRect();\n return {\n height: rect.height,\n width: rect.width,\n };\n }\n return {};\n };\n const splunkTheme = useSplunkTheme();\n const themeKey = props.themeKey ? props.themeKey : getChartingThemeKey({ splunkThemeV1: splunkTheme });\n const {\n width,\n height,\n style,\n chartData,\n options,\n colorPalette,\n onClick,\n onSelect,\n onPointMouseOut,\n onPointMouseOver,\n onEventTrigger,\n } = props;\n const prevOptions = usePrevious(options);\n const prevTimezone = usePrevious(timezone);\n\n const handleClick = (\n chartEvent: ChartEvent<'pointClick' | 'legendClick'>,\n type: VizChartEventType\n ): void => {\n let payload: Partial<ChartEvent<'pointClick' | 'legendClick'>> = pick(\n chartEvent,\n 'name2',\n 'value2',\n '_span',\n 'modifierKey'\n );\n\n payload.name = payload.name2;\n delete payload.name2;\n\n if (type === VizChartEventType.POINT_CLICK) {\n payload.value = payload.value2;\n delete payload.value2;\n\n payload = updateRowPayload(chartEvent.rowContext, payload);\n }\n\n onClick({\n type,\n originalEvent: chartEvent,\n payload,\n });\n };\n\n const destroyChart = (): void => {\n if (chart.current) {\n chart.current.destroy();\n chart.current = null;\n }\n needsRedraw.current = true;\n needsInit.current = true;\n };\n\n const handleSelect = (chartEvent: ChartEvent<'chartRangeSelect'>): void => {\n // todo: need change this after breaking all visualizations\n if (onSelect && typeof onSelect === 'function') {\n onSelect({\n type: 'range.select',\n originalEvent: chartEvent,\n payload: pick(chartEvent, 'startXIndex', 'endXIndex', 'startXValue', 'endXValue'),\n });\n\n return;\n }\n\n // the chartEvent here is a jQuery event\n onEventTrigger({\n type: 'range.select',\n originalEvent: chartEvent,\n payload: pick(chartEvent, 'startXIndex', 'endXIndex', 'startXValue', 'endXValue'),\n });\n };\n\n const handlePointMouseOut = (chartEvent: ChartEvent<'pointMouseOut'>, type: VizChartEventType): void => {\n let payload: Partial<ChartEvent<'pointMouseOut'>> = pick(\n chartEvent,\n 'name2',\n 'value2',\n '_span',\n 'modifierKey',\n 'tooltipContext'\n );\n\n payload.name = payload.name2;\n delete payload.name2;\n payload.value = payload.value2;\n delete payload.value2;\n\n payload = updateRowPayload(chartEvent.rowContext, payload);\n\n onPointMouseOut({\n type,\n originalEvent: chartEvent,\n payload,\n });\n };\n\n const handlePointMouseOver = (\n chartEvent: ChartEvent<'pointMouseOver'>,\n type: VizChartEventType\n ): void => {\n let payload: Partial<ChartEvent<'pointMouseOver'>> = pick(\n chartEvent,\n 'name2',\n 'value2',\n '_span',\n 'modifierKey',\n 'tooltipContext'\n );\n\n payload.name = payload.name2;\n delete payload.name2;\n payload.value = payload.value2;\n delete payload.value2;\n\n payload = updateRowPayload(chartEvent.rowContext, payload);\n\n onPointMouseOver({\n type,\n originalEvent: chartEvent,\n payload,\n });\n };\n\n const drawChart = (): void => {\n const updatedOptions = { ...options, shouldColorizeTooltipData: false };\n const computedChartSize = computeChartingSize();\n const computedWidth = computedChartSize.width;\n const computedHeight = computedChartSize.height;\n const serializedTimezone = timezone?.serializedTimezone;\n const ianaTimezone = timezone?.ianaTimezone;\n const utcOffset = timezone?.utcOffset;\n if (!computedWidth || !computedHeight) {\n return;\n }\n if (!chartData || !Object.keys(chartData).length) {\n return;\n }\n\n // splunk-charting layers configuration option updates.\n // when an option is removed it needs to be set to an empty string\n // to override the previous configuration\n if (prevOptions) {\n Object.keys(prevOptions).forEach(key => {\n if (updatedOptions[key] === undefined) {\n updatedOptions[key] = '';\n }\n });\n }\n\n try {\n if (needsInit.current) {\n destroyChart();\n jsCharting.setTheme(themeKey);\n if (colorPalette.length > 0) {\n jsCharting.setColorPalette(colorPalette);\n }\n chart.current = jsCharting.createChart(container.current, {\n ...updatedOptions,\n drilldown: 'all',\n ...(typeof serializedTimezone === 'string' && {\n 'time.serializedTz': serializedTimezone,\n }),\n ...(typeof ianaTimezone === 'string' && {\n 'time.ianaTimezone': ianaTimezone,\n }),\n ...(typeof utcOffset === 'number' && {\n 'time.timezoneOffset': utcOffset,\n }),\n });\n // bind event handlers\n chart.current.on('pointClick', e => {\n handleClick(e, VizChartEventType.POINT_CLICK);\n });\n chart.current.on('pointMouseOver', e => {\n handlePointMouseOver(e, VizChartEventType.POINT_MOUSE_OVER);\n });\n chart.current.on('pointMouseOut', e => {\n handlePointMouseOut(e, VizChartEventType.POINT_MOUSE_OUT);\n });\n chart.current.on('legendClick', e => {\n handleClick(e, VizChartEventType.LEGEND_CLICK);\n });\n chart.current.on('chartRangeSelect', handleSelect);\n }\n if (needsRedraw.current) {\n jsCharting.setTheme(themeKey);\n if (colorPalette.length > 0) {\n jsCharting.setColorPalette(colorPalette);\n }\n chart.current.prepareAndDraw(chartData, updatedOptions, () => {});\n }\n if (chart.current) {\n chart.current.resize(computedWidth, computedHeight);\n }\n needsInit.current = false;\n needsRedraw.current = false;\n } catch (e) {\n window.console.error('Caught error rendering chart:', e);\n }\n };\n\n const debouncedDrawChart = debounce(drawChart, 5);\n\n const onContainerMount = chartingContainer => {\n container.current = chartingContainer;\n debouncedDrawChart();\n };\n\n const prevTheme = usePrevious(themeKey);\n const prevOnClick = usePrevious(onClick);\n\n useEffect(() => {\n debouncedDrawChart();\n props.visualizationApiRef(api.current);\n return () => {\n props.visualizationApiRef(null);\n destroyChart();\n };\n }, []);\n\n useEffect(() => {\n // TODO: figure out why re-init is needed for functional components (i.e. PlatformViz) when changing theme\n // seems like redraw doesn't suffice to update the background colors\n if (\n !chart.current ||\n !canUpdateInPlace(prevOptions, options) ||\n // timezone is a simple object so this comparison should be fast\n JSON.stringify(prevTimezone) !== JSON.stringify(timezone) ||\n (!props.themeKey && prevTheme !== themeKey) ||\n prevOnClick !== onClick\n ) {\n needsInit.current = true;\n }\n needsRedraw.current = true;\n // need to immediately call drawChart upon an option or chartData change\n // otherwise a noop would occur if the onContainerMount drawChart is re-invoked when dimensions change\n drawChart();\n }, [\n JSON.stringify(options),\n JSON.stringify(chartData.toJSON()),\n JSON.stringify(chartData.annotations),\n timezone?.ianaTimezone,\n timezone?.utcOffset,\n timezone?.serializedTimezone,\n themeKey,\n onClick,\n ]);\n return (\n <ChartingContainer style={style} ref={onContainerMount} width={width} height={height}>\n <EventListener target={window} onResize={debouncedDrawChart} />\n </ChartingContainer>\n );\n};\n\nconst defaultProps: Record<keyof ChartingProps, any> = {\n width: '100%',\n height: 250,\n options: {},\n style: {},\n // todo: need remove it\n onEventTrigger: noop,\n onClick: noop,\n onSelect: noop,\n onPointMouseOver: noop,\n onPointMouseOut: noop,\n colorPalette: VIZ_CATEGORICAL,\n visualizationApiRef: noop,\n chartData: null,\n themeKey: null,\n};\n\nCharting.propTypes = propTypes;\nCharting.defaultProps = defaultProps;\n\n// allow for early return in case of empty chartData while still following hook rules\nconst withEmptyChartMessage = (Chart): React.FunctionComponent<ChartingProps> => {\n const Wrapper = (props: ChartingProps): React.ReactElement => {\n const { chartData } = props;\n\n if (!chartData) {\n return <Message message={_('No DataSource')} level=\"warning\" />;\n }\n\n if (chartData && !Object.keys(chartData).length) {\n return <Message message={_('No Result')} level=\"info\" />;\n }\n\n return <Chart {...props} />;\n };\n\n Wrapper.displayName = 'ChartingWrapper';\n Wrapper.propTypes = propTypes;\n Wrapper.defaultProps = defaultProps;\n return Wrapper;\n};\n\n// export default Charting;\nexport default withEmptyChartMessage(Charting as any);\n","module.exports = require(\"@splunk/visualization-color-palettes\");","module.exports = require(\"react-event-listener\");","module.exports = require(\"@splunk/visualizations-shared/i18n\");","module.exports = require(\"@splunk/charting-bundle\");","module.exports = require(\"@splunk/themes/useSplunkTheme\");","module.exports = require(\"@splunk/visualizations-shared/themeUtils\");"],"sourceRoot":""}
@@ -87,12 +87,12 @@ module.exports =
87
87
  /******/
88
88
  /******/
89
89
  /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 24);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 22);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
94
94
 
95
- /***/ 24:
95
+ /***/ 22:
96
96
  /***/ (function(module, exports, __webpack_require__) {
97
97
 
98
98
  "use strict";
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/common/ChartingApi.ts","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\""],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;;;;;IC9Da,qB;AACT;AACA,iCAAoB,QAApB,EAAiC;AAAA;;AAAb;AAAiB;AAErC;;;;AAIG;;;;;WACH,qBAAwE;AAAA,qFAA9B;AAAE,cAAM,EAAE,EAAV;AAAc,kBAAU,EAAE;AAA1B,OAA8B;AAAA,UAA5D,MAA4D,QAA5D,MAA4D;AAAA,UAApD,UAAoD,QAApD,UAAoD;;AACpE,WAAK,QAAL,GAAgB,SAAhB,CAA0B,MAA1B,EAAkC,UAAlC;AACH;AAED;;;;AAIG;;;;WACH,uBAAW;AACP,WAAK,QAAL,GAAgB,WAAhB;AACH,K,CAED;;;;WACA,oBAAQ;;;AACJ,aAAO,WAAK,QAAL,MAAa,IAAb,IAAa,aAAb,GAAa,MAAb,GAAa,GAAE,OAAtB;AACH;;;;;;AAzBL,sD;;;;;;;ACpBA,kE;;;;;;;ACAA,+D","file":"ChartingApi.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 24);\n","import jsCharting from '@splunk/charting-bundle';\n\ninterface Point {\n /**\n * Valid xValue of the chart\n *\n * @type {string|number}\n * @memberof Point\n */\n xValue?: string | number;\n\n /**\n * Valid seriesName for a chart\n *\n * @type {string}\n * @memberof Point\n */\n seriesName?: string;\n}\n\nexport class ChartingApiFunctional {\n // eslint-disable-next-line no-useless-constructor\n constructor(private chartRef: any) {}\n\n /**\n * Allows users to programmatically highlight a point on the chart\n *\n * @memberof ChartingApiFunctional\n */\n highlight({ xValue, seriesName }: Point = { xValue: '', seriesName: '' }): void {\n this.getChart().highlight(xValue, seriesName);\n }\n\n /**\n * Allows users to programmatically unhighlight all points on the chart\n *\n * @memberof ChartingApiFunctional\n */\n unHighlight(): void {\n this.getChart().unHighlight();\n }\n\n // returns chart object\n getChart(): jsCharting {\n return this.chartRef?.current;\n }\n}\n","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/common/ChartingApi.ts","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\""],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;;;;;IC9Da,qB;AACT;AACA,iCAAoB,QAApB,EAAiC;AAAA;;AAAb;AAAiB;AAErC;;;;AAIG;;;;;WACH,qBAAwE;AAAA,qFAA9B;AAAE,cAAM,EAAE,EAAV;AAAc,kBAAU,EAAE;AAA1B,OAA8B;AAAA,UAA5D,MAA4D,QAA5D,MAA4D;AAAA,UAApD,UAAoD,QAApD,UAAoD;;AACpE,WAAK,QAAL,GAAgB,SAAhB,CAA0B,MAA1B,EAAkC,UAAlC;AACH;AAED;;;;AAIG;;;;WACH,uBAAW;AACP,WAAK,QAAL,GAAgB,WAAhB;AACH,K,CAED;;;;WACA,oBAAQ;;;AACJ,aAAO,WAAK,QAAL,MAAa,IAAb,IAAa,aAAb,GAAa,MAAb,GAAa,GAAE,OAAtB;AACH;;;;;;AAzBL,sD;;;;;;;ACpBA,kE;;;;;;;ACAA,+D","file":"ChartingApi.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 22);\n","import jsCharting from '@splunk/charting-bundle';\n\ninterface Point {\n /**\n * Valid xValue of the chart\n *\n * @type {string|number}\n * @memberof Point\n */\n xValue?: string | number;\n\n /**\n * Valid seriesName for a chart\n *\n * @type {string}\n * @memberof Point\n */\n seriesName?: string;\n}\n\nexport class ChartingApiFunctional {\n // eslint-disable-next-line no-useless-constructor\n constructor(private chartRef: any) {}\n\n /**\n * Allows users to programmatically highlight a point on the chart\n *\n * @memberof ChartingApiFunctional\n */\n highlight({ xValue, seriesName }: Point = { xValue: '', seriesName: '' }): void {\n this.getChart().highlight(xValue, seriesName);\n }\n\n /**\n * Allows users to programmatically unhighlight all points on the chart\n *\n * @memberof ChartingApiFunctional\n */\n unHighlight(): void {\n this.getChart().unHighlight();\n }\n\n // returns chart object\n getChart(): jsCharting {\n return this.chartRef?.current;\n }\n}\n","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");"],"sourceRoot":""}
@@ -135,25 +135,25 @@ module.exports = require("@babel/runtime/helpers/createClass");
135
135
  module.exports = require("@babel/runtime/helpers/defineProperty");
136
136
 
137
137
  /***/ }),
138
- /* 9 */,
139
- /* 10 */
138
+ /* 9 */
140
139
  /***/ (function(module, exports) {
141
140
 
142
141
  module.exports = require("@babel/runtime/helpers/extends");
143
142
 
144
143
  /***/ }),
144
+ /* 10 */,
145
145
  /* 11 */,
146
146
  /* 12 */,
147
147
  /* 13 */,
148
- /* 14 */,
149
- /* 15 */,
150
- /* 16 */,
151
- /* 17 */
148
+ /* 14 */
152
149
  /***/ (function(module, exports) {
153
150
 
154
151
  module.exports = require("@splunk/react-ui/Markdown");
155
152
 
156
153
  /***/ }),
154
+ /* 15 */,
155
+ /* 16 */,
156
+ /* 17 */,
157
157
  /* 18 */,
158
158
  /* 19 */,
159
159
  /* 20 */,
@@ -163,20 +163,20 @@ module.exports = require("@splunk/react-ui/Markdown");
163
163
  /* 24 */,
164
164
  /* 25 */,
165
165
  /* 26 */,
166
- /* 27 */,
167
- /* 28 */,
168
- /* 29 */
166
+ /* 27 */
169
167
  /***/ (function(module, exports) {
170
168
 
171
169
  module.exports = require("@babel/runtime/helpers/inherits");
172
170
 
173
171
  /***/ }),
174
- /* 30 */
172
+ /* 28 */
175
173
  /***/ (function(module, exports) {
176
174
 
177
175
  module.exports = require("@babel/runtime/helpers/getPrototypeOf");
178
176
 
179
177
  /***/ }),
178
+ /* 29 */,
179
+ /* 30 */,
180
180
  /* 31 */,
181
181
  /* 32 */,
182
182
  /* 33 */
@@ -214,7 +214,7 @@ module.exports = require("@splunk/react-ui/JSONTree");
214
214
 
215
215
  "use strict";
216
216
  __webpack_require__.r(__webpack_exports__);
217
- /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
217
+ /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
218
218
  /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
219
219
  /* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33);
220
220
  /* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__);
@@ -224,11 +224,11 @@ __webpack_require__.r(__webpack_exports__);
224
224
  /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);
225
225
  /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6);
226
226
  /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);
227
- /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29);
227
+ /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27);
228
228
  /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);
229
229
  /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(34);
230
230
  /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__);
231
- /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30);
231
+ /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(28);
232
232
  /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__);
233
233
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(0);
234
234
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__);
@@ -236,7 +236,7 @@ __webpack_require__.r(__webpack_exports__);
236
236
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_9__);
237
237
  /* harmony import */ var _splunk_react_ui_Heading__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(5);
238
238
  /* harmony import */ var _splunk_react_ui_Heading__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_ui_Heading__WEBPACK_IMPORTED_MODULE_10__);
239
- /* harmony import */ var _splunk_react_ui_Markdown__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(17);
239
+ /* harmony import */ var _splunk_react_ui_Markdown__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(14);
240
240
  /* harmony import */ var _splunk_react_ui_Markdown__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_ui_Markdown__WEBPACK_IMPORTED_MODULE_11__);
241
241
  /* harmony import */ var _splunk_react_ui_JSONTree__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(35);
242
242
  /* harmony import */ var _splunk_react_ui_JSONTree__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_ui_JSONTree__WEBPACK_IMPORTED_MODULE_12__);
@@ -357,10 +357,13 @@ EventItem.propTypes = {
357
357
  };
358
358
 
359
359
  var EventsDesc = function EventsDesc(_ref2) {
360
- var events = _ref2.events;
360
+ var events = _ref2.events,
361
+ vizType = _ref2.vizType;
361
362
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_ui_Heading__WEBPACK_IMPORTED_MODULE_10___default.a, {
362
363
  level: 4
363
- }, Object.keys(events).length === 0 ? 'No Events' : 'Events'), Object.keys(events).map(function (eventName) {
364
+ }, Object.keys(events).length !== 0 || vizType === 'splunk.events' ? 'Events' : 'No Events'), vizType === 'splunk.events' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_ui_Markdown__WEBPACK_IMPORTED_MODULE_11___default.a, {
365
+ text: "Events are dynamically added via the `eventActions` and `fieldActions` options for the Events visualization."
366
+ }), Object.keys(events).map(function (eventName) {
364
367
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(EventItem, {
365
368
  key: eventName,
366
369
  name: eventName,
@@ -370,7 +373,8 @@ var EventsDesc = function EventsDesc(_ref2) {
370
373
  };
371
374
 
372
375
  EventsDesc.propTypes = {
373
- events: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object.isRequired
376
+ events: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object.isRequired,
377
+ vizType: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string
374
378
  };
375
379
 
376
380
  var VisExample = /*#__PURE__*/function (_PureComponent) {
@@ -462,8 +466,11 @@ var EventsDoc = /*#__PURE__*/function (_Component) {
462
466
  _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(EventsDoc, [{
463
467
  key: "render",
464
468
  value: function render() {
469
+ var _this$props2, _this$props2$Visualiz, _this$props2$Visualiz2;
470
+
465
471
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(EventsDesc, {
466
- events: this.props.events
472
+ events: this.props.events,
473
+ vizType: (_this$props2 = this.props) === null || _this$props2 === void 0 ? void 0 : (_this$props2$Visualiz = _this$props2.Visualization) === null || _this$props2$Visualiz === void 0 ? void 0 : (_this$props2$Visualiz2 = _this$props2$Visualiz.config) === null || _this$props2$Visualiz2 === void 0 ? void 0 : _this$props2$Visualiz2.key
467
474
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(VisExample, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, this.props, {
468
475
  onEventTrigger: this.handleEvent
469
476
  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(EventExample, {
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///external \"styled-components\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@splunk/react-ui/Heading\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///external \"@splunk/react-ui/Markdown\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///external \"@babel/runtime/helpers/assertThisInitialized\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\"","webpack:///external \"@splunk/react-ui/JSONTree\"","webpack:///./src/common/EventsDoc.jsx"],"names":["EventTester","styled","Event","EventName","EventItem","name","desc","marginLeft","T","string","EventsDesc","events","Object","description","isRequired","VisExample","options","Visualization","dsState","onEventTrigger","PureComponent","func","EventExample","event","eventToDisplay","object","EventsDoc","e","handleEvent","Component","any"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAs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,iDAAC,CAACiB;AADY,CAAzBH;;IAIMI,S;;;;;AACF,qCAA4B;AAAA;;AAAA;;AACxB;;AADwB,4LAOd,aAAK;AACf,qBAAc;AACVC,SAAC,EAADA;AADU,OAAd;AARwB;;AAExB,kBAAa;AACTA,OAAC,EAAE;AADM,KAAb;AAFwB;AAK3B;;;;WAQD,kBAAS;AACL,0BACI,qFACI;AAAY,cAAM,EAAE,WAAWhB;AAA/B,QADJ,eAEI,iJAAgB,KAAhB;AAA4B,sBAAc,EAAE,KAAKiB;AAAjD,SAFJ,eAGI;AAAc,aAAK,EAAE,WAAWD;AAAhC,QAHJ,CADJ;AAOH;;;;EAtBmBE,+C;;AAyBxBH,SAAS,CAATA,YAAsB;AAClBV,SAAO,EAAER,iDAAC,CADQ;AAElBG,QAAM,EAAEH,iDAAC,CAFS;AAGlBU,SAAO,EAAEV,iDAAC,CAHQ;AAIlBS,eAAa,EAAET,iDAAC,CAACsB;AAJC,CAAtBJ;AAOA,0E","file":"EventsDoc.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 48);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","module.exports = require(\"styled-components\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@splunk/react-ui/Heading\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@splunk/react-ui/Markdown\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","module.exports = require(\"@babel/runtime/helpers/assertThisInitialized\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");","module.exports = require(\"@splunk/react-ui/JSONTree\");","/* eslint-disable react/no-multi-comp */\n/* eslint-disable max-classes-per-file */\nimport React, { Component, PureComponent } from 'react';\nimport T from 'prop-types';\nimport Heading from '@splunk/react-ui/Heading';\nimport Markdown from '@splunk/react-ui/Markdown';\nimport JSONTree from '@splunk/react-ui/JSONTree';\nimport styled from 'styled-components';\n\nconst EventTester = styled.div`\n margin-top: 50px;\n`;\n\nconst Event = styled.div`\n margin-top: 20px;\n`;\nconst EventName = styled.div`\n color: #5ca300;\n padding-bottom: 5px;\n`;\n\nconst EventItem = ({ name, desc }) => (\n <Event>\n <EventName>{name}</EventName>\n <Markdown style={{ marginLeft: 40 }} text={desc} />\n </Event>\n);\n\nEventItem.propTypes = {\n name: T.string,\n desc: T.string,\n};\n\nconst EventsDesc = ({ events }) => (\n <div>\n <Heading level={4}>{Object.keys(events).length === 0 ? 'No Events' : 'Events'}</Heading>\n {Object.keys(events).map(eventName => (\n <EventItem key={eventName} name={eventName} desc={events[eventName].description} />\n ))}\n </div>\n);\n\nEventsDesc.propTypes = {\n events: T.object.isRequired,\n};\n\nclass VisExample extends PureComponent {\n render() {\n const { options = {}, Visualization, dsState, onEventTrigger } = this.props;\n return (\n <EventTester>\n <Heading level={4}>Test Visualization</Heading>\n <Visualization\n options={options}\n dataSources={dsState}\n onEventTrigger={onEventTrigger}\n hasEventHandlers\n />\n </EventTester>\n );\n }\n}\n\nVisExample.propTypes = {\n options: T.object,\n Visualization: T.any,\n dsState: T.object,\n onEventTrigger: T.func,\n};\n\nconst EventExample = ({ event }) => {\n const eventToDisplay = {\n ...event,\n };\n if (eventToDisplay.originalEvent != null) {\n eventToDisplay.originalEvent = '...Original Event instance...';\n }\n\n return (\n <React.Fragment>\n <Heading level={4}>Event Monitor</Heading>\n <div>\n <JSONTree json={eventToDisplay} expandChildren />\n </div>\n </React.Fragment>\n );\n};\n\nEventExample.propTypes = {\n event: T.object,\n};\n\nclass EventsDoc extends Component {\n constructor(props, context) {\n super(props, context);\n this.state = {\n e: null,\n };\n }\n\n handleEvent = e => {\n this.setState({\n e,\n });\n };\n\n render() {\n return (\n <div>\n <EventsDesc events={this.props.events} />\n <VisExample {...this.props} onEventTrigger={this.handleEvent} />\n <EventExample event={this.state.e} />\n </div>\n );\n }\n}\n\nEventsDoc.propTypes = {\n options: T.object,\n events: T.object,\n dsState: T.object,\n Visualization: T.any,\n};\n\nexport default EventsDoc;\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///external \"styled-components\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@splunk/react-ui/Heading\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///external \"@splunk/react-ui/Markdown\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///external \"@babel/runtime/helpers/assertThisInitialized\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\"","webpack:///external \"@splunk/react-ui/JSONTree\"","webpack:///./src/common/EventsDoc.jsx"],"names":["EventTester","styled","Event","EventName","EventItem","name","desc","marginLeft","T","string","EventsDesc","events","vizType","Object","description","VisExample","options","Visualization","dsState","onEventTrigger","PureComponent","func","EventExample","event","eventToDisplay","object","EventsDoc","e","key","handleEvent","Component","any"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;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GnBU,SAAO,EAAEV,iDAAC,CAHS;AAInBW,gBAAc,EAAEX,iDAAC,CAACa;AAJC,CAAvBN;;AAOA,IAAMO,YAAY,GAAG,SAAfA,YAAe,QAAe;AAAA,MAAZC,KAAY,SAAZA,KAAY;;AAChC,MAAMC,cAAc,qBAApB,KAAoB,CAApB;;AAGA,MAAIA,cAAc,CAAdA,iBAAJ,MAA0C;AACtCA,kBAAc,CAAdA;AACH;;AAED,sBACI,2DAAC,4CAAD,8BACI;AAAS,SAAK,EAAE;AAAhB,KADJ,eACI,CADJ,eAEI,qFACI;AAAU,QAAI,EAAd;AAAgC,kBAAc;AAA9C,IADJ,CAFJ,CADJ;AARJ;;AAkBAF,YAAY,CAAZA,YAAyB;AACrBC,OAAK,EAAEf,iDAAC,CAACiB;AADY,CAAzBH;;IAIMI,S;;;;;AACF,qCAA4B;AAAA;;AAAA;;AACxB;;AADwB,4LAOd,aAAK;AACf,qBAAc;AACVC,SAAC,EAADA;AADU,OAAd;AARwB;;AAExB,kBAAa;AACTA,OAAC,EAAE;AADM,KAAb;AAFwB;AAK3B;;;;WAQD,kBAAS;AAAA;;AACL,0BACI,qFACI;AAAY,cAAM,EAAE,WAApB;AAAuC,eAAO,kBAAE,KAAF,+EAAE,aAAF,iGAAE,sBAAF,iEAAE,uBAAmCC;AAAnF,QADJ,eAEI,iJAAgB,KAAhB;AAA4B,sBAAc,EAAE,KAAKC;AAAjD,SAFJ,eAGI;AAAc,aAAK,EAAE,WAAWF;AAAhC,QAHJ,CADJ;AAOH;;;;EAtBmBG,+C;;AAyBxBJ,SAAS,CAATA,YAAsB;AAClBV,SAAO,EAAER,iDAAC,CADQ;AAElBG,QAAM,EAAEH,iDAAC,CAFS;AAGlBU,SAAO,EAAEV,iDAAC,CAHQ;AAIlBS,eAAa,EAAET,iDAAC,CAACuB;AAJC,CAAtBL;AAOA,0E","file":"EventsDoc.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 48);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","module.exports = require(\"styled-components\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@splunk/react-ui/Heading\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@splunk/react-ui/Markdown\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","module.exports = require(\"@babel/runtime/helpers/assertThisInitialized\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");","module.exports = require(\"@splunk/react-ui/JSONTree\");","/* eslint-disable react/no-multi-comp */\n/* eslint-disable max-classes-per-file */\nimport React, { Component, PureComponent } from 'react';\nimport T from 'prop-types';\nimport Heading from '@splunk/react-ui/Heading';\nimport Markdown from '@splunk/react-ui/Markdown';\nimport JSONTree from '@splunk/react-ui/JSONTree';\nimport styled from 'styled-components';\n\nconst EventTester = styled.div`\n margin-top: 50px;\n`;\n\nconst Event = styled.div`\n margin-top: 20px;\n`;\nconst EventName = styled.div`\n color: #5ca300;\n padding-bottom: 5px;\n`;\n\nconst EventItem = ({ name, desc }) => (\n <Event>\n <EventName>{name}</EventName>\n <Markdown style={{ marginLeft: 40 }} text={desc} />\n </Event>\n);\n\nEventItem.propTypes = {\n name: T.string,\n desc: T.string,\n};\n\nconst EventsDesc = ({ events, vizType }) => (\n <div>\n <Heading level={4}>\n {Object.keys(events).length !== 0 || vizType === 'splunk.events' ? 'Events' : 'No Events'}\n </Heading>\n {vizType === 'splunk.events' && (\n <Markdown text=\"Events are dynamically added via the `eventActions` and `fieldActions` options for the Events visualization.\" />\n )}\n {Object.keys(events).map(eventName => (\n <EventItem key={eventName} name={eventName} desc={events[eventName].description} />\n ))}\n </div>\n);\n\nEventsDesc.propTypes = {\n events: T.object.isRequired,\n vizType: T.string,\n};\n\nclass VisExample extends PureComponent {\n render() {\n const { options = {}, Visualization, dsState, onEventTrigger } = this.props;\n return (\n <EventTester>\n <Heading level={4}>Test Visualization</Heading>\n <Visualization\n options={options}\n dataSources={dsState}\n onEventTrigger={onEventTrigger}\n hasEventHandlers\n />\n </EventTester>\n );\n }\n}\n\nVisExample.propTypes = {\n options: T.object,\n Visualization: T.any,\n dsState: T.object,\n onEventTrigger: T.func,\n};\n\nconst EventExample = ({ event }) => {\n const eventToDisplay = {\n ...event,\n };\n if (eventToDisplay.originalEvent != null) {\n eventToDisplay.originalEvent = '...Original Event instance...';\n }\n\n return (\n <React.Fragment>\n <Heading level={4}>Event Monitor</Heading>\n <div>\n <JSONTree json={eventToDisplay} expandChildren />\n </div>\n </React.Fragment>\n );\n};\n\nEventExample.propTypes = {\n event: T.object,\n};\n\nclass EventsDoc extends Component {\n constructor(props, context) {\n super(props, context);\n this.state = {\n e: null,\n };\n }\n\n handleEvent = e => {\n this.setState({\n e,\n });\n };\n\n render() {\n return (\n <div>\n <EventsDesc events={this.props.events} vizType={this.props?.Visualization?.config?.key} />\n <VisExample {...this.props} onEventTrigger={this.handleEvent} />\n <EventExample event={this.state.e} />\n </div>\n );\n }\n}\n\nEventsDoc.propTypes = {\n options: T.object,\n events: T.object,\n dsState: T.object,\n Visualization: T.any,\n};\n\nexport default EventsDoc;\n"],"sourceRoot":""}
@@ -106,14 +106,7 @@ module.exports = require("prop-types");
106
106
 
107
107
  /***/ }),
108
108
 
109
- /***/ 10:
110
- /***/ (function(module, exports) {
111
-
112
- module.exports = require("@babel/runtime/helpers/extends");
113
-
114
- /***/ }),
115
-
116
- /***/ 14:
109
+ /***/ 15:
117
110
  /***/ (function(module, exports) {
118
111
 
119
112
  module.exports = require("@splunk/visualizations-shared/numberUtils");
@@ -134,7 +127,7 @@ module.exports = require("styled-components");
134
127
  __webpack_require__.r(__webpack_exports__);
135
128
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MajorTick", function() { return MajorTick; });
136
129
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "positionMajorTick", function() { return positionMajorTick; });
137
- /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
130
+ /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
138
131
  /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
139
132
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
140
133
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
@@ -142,7 +135,7 @@ __webpack_require__.r(__webpack_exports__);
142
135
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
143
136
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2);
144
137
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_3__);
145
- /* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14);
138
+ /* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15);
146
139
  /* harmony import */ var _splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_numberUtils__WEBPACK_IMPORTED_MODULE_4__);
147
140
 
148
141
 
@@ -380,6 +373,13 @@ MajorTicks.defaultProps = {
380
373
  };
381
374
  /* harmony default export */ __webpack_exports__["default"] = (MajorTicks);
382
375
 
376
+ /***/ }),
377
+
378
+ /***/ 9:
379
+ /***/ (function(module, exports) {
380
+
381
+ module.exports = require("@babel/runtime/helpers/extends");
382
+
383
383
  /***/ })
384
384
 
385
385
  /******/ });
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///external \"@splunk/visualizations-shared/numberUtils\"","webpack:///external \"styled-components\"","webpack:///./src/common/GaugeMajorTicks.jsx"],"names":["DEFAULT_NUM_OF_TICKS","TICK_LENGTH_DELTA","TICK_LABEL_PADDING_FACTOR","MajorTickLine","styled","props","MajorTickLabel","MajorTick","index","x1","y1","x2","y2","showLabels","label","labelX","labelY","majorTickStrokeColor","majorTickFillColor","formatNumber","useThousandSeparators","useTrendUnits","T","string","positionMajorTick","width","height","startX","startY","orientation","numOfTicks","i","y","x","MajorTicks","min","max","majorUnit","usePercentageRange","range","Number","majorTicks","parseInt","extraNumOfTicks","Math"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;Q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,YAAU,EALY;AAMtByB,oBAAkB,EAAE;AANE,CAA1BJ;AASA,2E","file":"GaugeMajorTicks.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 49);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@splunk/visualizations-shared/numberUtils\");","module.exports = require(\"styled-components\");","import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport { isNumerial, formatNumber } from '@splunk/visualizations-shared/numberUtils';\n\nconst DEFAULT_NUM_OF_TICKS = 5;\nconst TICK_LENGTH_DELTA = 5;\nconst TICK_LABEL_PADDING_FACTOR = 3.2;\n\nconst MajorTickLine = styled.line`\n stroke: ${props => props.majorTickStrokeColor};\n stroke-width: 2px;\n stroke-dasharray: ${props => (props.index === 0 ? 0 : 3)};\n`;\n\nconst MajorTickLabel = styled.text`\n font-size: 12px;\n font-family: Splunk Platform Sans, sans-serif;\n line-height: 19px;\n fill: ${props => props.majorTickFillColor};\n text-anchor: middle;\n text-align: center;\n`;\n\nexport const MajorTick = ({\n index,\n x1,\n y1,\n x2,\n y2,\n showLabels,\n label,\n labelX,\n labelY,\n majorTickStrokeColor,\n majorTickFillColor,\n}) => (\n <g>\n <MajorTickLine\n index={index}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n majorTickStrokeColor={majorTickStrokeColor}\n />\n {showLabels && (\n <MajorTickLabel x={labelX} y={labelY} majorTickFillColor={majorTickFillColor}>\n {isNumerial(label)\n ? formatNumber(label, 0, {\n useThousandSeparators: true,\n useTrendUnits: true,\n })\n : label}\n </MajorTickLabel>\n )}\n </g>\n);\n\nMajorTick.propTypes = {\n index: T.number,\n x1: T.number,\n y1: T.number,\n x2: T.number,\n y2: T.number,\n showLabels: T.bool,\n label: T.oneOfType([T.string, T.number]),\n labelX: T.number,\n labelY: T.number,\n majorTickStrokeColor: T.string,\n majorTickFillColor: T.string,\n};\n\n/**\n * calculate position for each major tick\n * @method positionMajorTick\n * @param {Object} input\n * @param {Number} input.width\n * @param {Number} input.height\n * @param {Number} input.startX start x for rendering the first major tick\n * @param {Number} input.startY start y for rendering the first major tick\n * @param {String} input.orientation\n * @param {Number} input.numOfTicks how many ticks need to render\n * @param {Number} input.i index of major tick\n * @return {Object} MajorTick positions\n */\nexport const positionMajorTick = ({ width, height, startX, startY, orientation, numOfTicks, i }) => {\n let x1 = startX;\n let y1 = startY;\n let x2 = startX;\n let y2 = startY;\n let labelX = startX;\n let labelY;\n\n if (orientation === 'vertical') {\n const y = (height / numOfTicks) * (numOfTicks - i) + startY;\n x1 -= TICK_LENGTH_DELTA;\n y1 = y;\n x2 += width + TICK_LENGTH_DELTA;\n y2 = y;\n labelX += width + TICK_LENGTH_DELTA * TICK_LABEL_PADDING_FACTOR;\n labelY = y;\n } else {\n const x = (width / numOfTicks) * i + startX;\n x1 = x;\n y1 -= TICK_LENGTH_DELTA;\n x2 = x;\n y2 += height + TICK_LENGTH_DELTA;\n labelX = x;\n labelY = y2 + 16;\n }\n\n return { x1, y1, x2, y2, labelX, labelY };\n};\n\nconst MajorTicks = ({ ...props }) => {\n const {\n width,\n height,\n startX,\n startY,\n min,\n max,\n majorUnit,\n orientation,\n showLabels,\n usePercentageRange,\n majorTickFillColor,\n majorTickStrokeColor,\n } = props;\n\n const range = max - min;\n const numOfTicks =\n majorUnit === 'auto' || Number.isNaN(Number(majorUnit)) || majorUnit <= 0\n ? DEFAULT_NUM_OF_TICKS\n : range / majorUnit;\n const majorTicks = [];\n\n for (let i = 0; i <= numOfTicks; i += 1) {\n const { x1, y1, x2, y2, labelX, labelY } = positionMajorTick({\n width,\n height,\n startX,\n startY,\n orientation,\n numOfTicks,\n i,\n });\n const label = usePercentageRange\n ? `${parseInt((i / numOfTicks - min / range) * 100, 10)}%`\n : parseInt(min + (range / numOfTicks) * i, 10);\n\n majorTicks.push(\n <MajorTick\n key={i}\n index={i}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n showLabels={showLabels}\n label={label}\n labelX={labelX}\n labelY={labelY}\n majorTickFillColor={majorTickFillColor}\n majorTickStrokeColor={majorTickStrokeColor}\n />\n );\n }\n\n // if the gauge is not divided evenly, put the last tick at the end of the gauge\n if (!Number.isInteger(numOfTicks)) {\n const extraNumOfTicks = Math.ceil(numOfTicks);\n const { x1, y1, x2, y2, labelX, labelY } = positionMajorTick({\n width,\n height,\n startX,\n startY,\n orientation,\n numOfTicks: extraNumOfTicks,\n i: extraNumOfTicks,\n });\n\n majorTicks.push(\n <MajorTick\n key={extraNumOfTicks}\n id={extraNumOfTicks}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n showLabels={showLabels}\n label={usePercentageRange ? '100%' : max}\n labelX={labelX}\n labelY={labelY}\n majorTickFillColor={majorTickFillColor}\n majorTickStrokeColor={majorTickStrokeColor}\n />\n );\n }\n\n return <g>{majorTicks}</g>;\n};\n\nMajorTicks.propTypes = {\n width: T.number,\n height: T.number,\n startX: T.number,\n startY: T.number,\n min: T.number,\n max: T.number,\n majorUnit: T.oneOfType([T.string, T.number]),\n orientation: T.string,\n showLabels: T.bool,\n usePercentageRange: T.bool,\n majorTickFillColor: T.string,\n majorTickStrokeColor: T.string,\n};\n\nMajorTicks.defaultProps = {\n min: 0,\n max: 100,\n majorUnit: 'auto',\n orientation: 'horizontal',\n showLabels: true,\n usePercentageRange: false,\n};\n\nexport default MajorTicks;\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///external \"@splunk/visualizations-shared/numberUtils\"","webpack:///external \"styled-components\"","webpack:///./src/common/GaugeMajorTicks.jsx","webpack:///external \"@babel/runtime/helpers/extends\""],"names":["DEFAULT_NUM_OF_TICKS","TICK_LENGTH_DELTA","TICK_LABEL_PADDING_FACTOR","MajorTickLine","styled","props","MajorTickLabel","MajorTick","index","x1","y1","x2","y2","showLabels","label","labelX","labelY","majorTickStrokeColor","majorTickFillColor","formatNumber","useThousandSeparators","useTrendUnits","T","string","positionMajorTick","width","height","startX","startY","orientation","numOfTicks","i","y","x","MajorTicks","min","max","majorUnit","usePercentageRange","range","Number","majorTicks","parseInt","extraNumOfTicks","Math"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFA,kC;;;;;;;ACAA,uC;;;;;;;ACAA,sE;;;;;;;ACAA,8C;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AAEA,IAAMA,oBAAoB,GAA1B;AACA,IAAMC,iBAAiB,GAAvB;AACA,IAAMC,yBAAyB,GAA/B;AAEA,IAAMC,aAAa,GAAGC,wDA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EAVV;AAWI,wBAAkB,EAXtB;AAYI,0BAAoB,EAAErB;AAZ1B,MADJwB;AAgBH;;AAED,sBAAO,sEAAP,UAAO,CAAP;AAtFJ;;AAyFAP,UAAU,CAAVA,YAAuB;AACnBT,OAAK,EAAEH,iDAAC,CADW;AAEnBI,QAAM,EAAEJ,iDAAC,CAFU;AAGnBK,QAAM,EAAEL,iDAAC,CAHU;AAInBM,QAAM,EAAEN,iDAAC,CAJU;AAKnBa,KAAG,EAAEb,iDAAC,CALa;AAMnBc,KAAG,EAAEd,iDAAC,CANa;AAOnBe,WAAS,EAAEf,iDAAC,CAADA,UAAY,CAACA,iDAAC,CAAF,QAAWA,iDAAC,CAPhB,MAOI,CAAZA,CAPQ;AAQnBO,aAAW,EAAEP,iDAAC,CARK;AASnBT,YAAU,EAAES,iDAAC,CATM;AAUnBgB,oBAAkB,EAAEhB,iDAAC,CAVF;AAWnBJ,oBAAkB,EAAEI,iDAAC,CAXF;AAYnBL,sBAAoB,EAAEK,iDAAC,CAACC;AAZL,CAAvBW;AAeAA,UAAU,CAAVA,eAA0B;AACtBC,KAAG,EADmB;AAEtBC,KAAG,EAFmB;AAGtBC,WAAS,EAHa;AAItBR,aAAW,EAJW;AAKtBhB,YAAU,EALY;AAMtByB,oBAAkB,EAAE;AANE,CAA1BJ;AASA,2E;;;;;;;ACpOA,2D","file":"GaugeMajorTicks.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 49);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","module.exports = require(\"@splunk/visualizations-shared/numberUtils\");","module.exports = require(\"styled-components\");","import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport { isNumerial, formatNumber } from '@splunk/visualizations-shared/numberUtils';\n\nconst DEFAULT_NUM_OF_TICKS = 5;\nconst TICK_LENGTH_DELTA = 5;\nconst TICK_LABEL_PADDING_FACTOR = 3.2;\n\nconst MajorTickLine = styled.line`\n stroke: ${props => props.majorTickStrokeColor};\n stroke-width: 2px;\n stroke-dasharray: ${props => (props.index === 0 ? 0 : 3)};\n`;\n\nconst MajorTickLabel = styled.text`\n font-size: 12px;\n font-family: Splunk Platform Sans, sans-serif;\n line-height: 19px;\n fill: ${props => props.majorTickFillColor};\n text-anchor: middle;\n text-align: center;\n`;\n\nexport const MajorTick = ({\n index,\n x1,\n y1,\n x2,\n y2,\n showLabels,\n label,\n labelX,\n labelY,\n majorTickStrokeColor,\n majorTickFillColor,\n}) => (\n <g>\n <MajorTickLine\n index={index}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n majorTickStrokeColor={majorTickStrokeColor}\n />\n {showLabels && (\n <MajorTickLabel x={labelX} y={labelY} majorTickFillColor={majorTickFillColor}>\n {isNumerial(label)\n ? formatNumber(label, 0, {\n useThousandSeparators: true,\n useTrendUnits: true,\n })\n : label}\n </MajorTickLabel>\n )}\n </g>\n);\n\nMajorTick.propTypes = {\n index: T.number,\n x1: T.number,\n y1: T.number,\n x2: T.number,\n y2: T.number,\n showLabels: T.bool,\n label: T.oneOfType([T.string, T.number]),\n labelX: T.number,\n labelY: T.number,\n majorTickStrokeColor: T.string,\n majorTickFillColor: T.string,\n};\n\n/**\n * calculate position for each major tick\n * @method positionMajorTick\n * @param {Object} input\n * @param {Number} input.width\n * @param {Number} input.height\n * @param {Number} input.startX start x for rendering the first major tick\n * @param {Number} input.startY start y for rendering the first major tick\n * @param {String} input.orientation\n * @param {Number} input.numOfTicks how many ticks need to render\n * @param {Number} input.i index of major tick\n * @return {Object} MajorTick positions\n */\nexport const positionMajorTick = ({ width, height, startX, startY, orientation, numOfTicks, i }) => {\n let x1 = startX;\n let y1 = startY;\n let x2 = startX;\n let y2 = startY;\n let labelX = startX;\n let labelY;\n\n if (orientation === 'vertical') {\n const y = (height / numOfTicks) * (numOfTicks - i) + startY;\n x1 -= TICK_LENGTH_DELTA;\n y1 = y;\n x2 += width + TICK_LENGTH_DELTA;\n y2 = y;\n labelX += width + TICK_LENGTH_DELTA * TICK_LABEL_PADDING_FACTOR;\n labelY = y;\n } else {\n const x = (width / numOfTicks) * i + startX;\n x1 = x;\n y1 -= TICK_LENGTH_DELTA;\n x2 = x;\n y2 += height + TICK_LENGTH_DELTA;\n labelX = x;\n labelY = y2 + 16;\n }\n\n return { x1, y1, x2, y2, labelX, labelY };\n};\n\nconst MajorTicks = ({ ...props }) => {\n const {\n width,\n height,\n startX,\n startY,\n min,\n max,\n majorUnit,\n orientation,\n showLabels,\n usePercentageRange,\n majorTickFillColor,\n majorTickStrokeColor,\n } = props;\n\n const range = max - min;\n const numOfTicks =\n majorUnit === 'auto' || Number.isNaN(Number(majorUnit)) || majorUnit <= 0\n ? DEFAULT_NUM_OF_TICKS\n : range / majorUnit;\n const majorTicks = [];\n\n for (let i = 0; i <= numOfTicks; i += 1) {\n const { x1, y1, x2, y2, labelX, labelY } = positionMajorTick({\n width,\n height,\n startX,\n startY,\n orientation,\n numOfTicks,\n i,\n });\n const label = usePercentageRange\n ? `${parseInt((i / numOfTicks - min / range) * 100, 10)}%`\n : parseInt(min + (range / numOfTicks) * i, 10);\n\n majorTicks.push(\n <MajorTick\n key={i}\n index={i}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n showLabels={showLabels}\n label={label}\n labelX={labelX}\n labelY={labelY}\n majorTickFillColor={majorTickFillColor}\n majorTickStrokeColor={majorTickStrokeColor}\n />\n );\n }\n\n // if the gauge is not divided evenly, put the last tick at the end of the gauge\n if (!Number.isInteger(numOfTicks)) {\n const extraNumOfTicks = Math.ceil(numOfTicks);\n const { x1, y1, x2, y2, labelX, labelY } = positionMajorTick({\n width,\n height,\n startX,\n startY,\n orientation,\n numOfTicks: extraNumOfTicks,\n i: extraNumOfTicks,\n });\n\n majorTicks.push(\n <MajorTick\n key={extraNumOfTicks}\n id={extraNumOfTicks}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n showLabels={showLabels}\n label={usePercentageRange ? '100%' : max}\n labelX={labelX}\n labelY={labelY}\n majorTickFillColor={majorTickFillColor}\n majorTickStrokeColor={majorTickStrokeColor}\n />\n );\n }\n\n return <g>{majorTicks}</g>;\n};\n\nMajorTicks.propTypes = {\n width: T.number,\n height: T.number,\n startX: T.number,\n startY: T.number,\n min: T.number,\n max: T.number,\n majorUnit: T.oneOfType([T.string, T.number]),\n orientation: T.string,\n showLabels: T.bool,\n usePercentageRange: T.bool,\n majorTickFillColor: T.string,\n majorTickStrokeColor: T.string,\n};\n\nMajorTicks.defaultProps = {\n min: 0,\n max: 100,\n majorUnit: 'auto',\n orientation: 'horizontal',\n showLabels: true,\n usePercentageRange: false,\n};\n\nexport default MajorTicks;\n","module.exports = require(\"@babel/runtime/helpers/extends\");"],"sourceRoot":""}