@splunk/react-visualizations 25.7.1 → 25.8.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 (49) hide show
  1. package/Area.js +30 -56
  2. package/Area.js.map +1 -1
  3. package/Bar.js +26 -52
  4. package/Bar.js.map +1 -1
  5. package/Bubble.js +28 -54
  6. package/Bubble.js.map +1 -1
  7. package/Column.js +35 -62
  8. package/Column.js.map +1 -1
  9. package/FillerGauge.js +0 -2
  10. package/FillerGauge.js.map +1 -1
  11. package/GeoJsonChoropleth.js +89 -451
  12. package/GeoJsonChoropleth.js.map +1 -1
  13. package/Line.js +30 -56
  14. package/Line.js.map +1 -1
  15. package/MarkerGauge.js +0 -2
  16. package/MarkerGauge.js.map +1 -1
  17. package/Pie.js +23 -43
  18. package/Pie.js.map +1 -1
  19. package/Punchcard.js +3 -6
  20. package/Punchcard.js.map +1 -1
  21. package/Scatter.js +26 -52
  22. package/Scatter.js.map +1 -1
  23. package/SingleValue.js +13 -29
  24. package/SingleValue.js.map +1 -1
  25. package/SingleValueIcon.js +13 -30
  26. package/SingleValueIcon.js.map +1 -1
  27. package/SingleValueRadial.js +134 -182
  28. package/SingleValueRadial.js.map +1 -1
  29. package/SvgChoropleth.js +21 -69
  30. package/SvgChoropleth.js.map +1 -1
  31. package/SvgChoroplethDynamic.js +2 -11
  32. package/SvgChoroplethDynamic.js.map +1 -1
  33. package/common/Charting.js +36 -118
  34. package/common/Charting.js.map +1 -1
  35. package/common/ChartingApi.js +5 -15
  36. package/common/ChartingApi.js.map +1 -1
  37. package/common/EventsDoc.js +20 -61
  38. package/common/EventsDoc.js.map +1 -1
  39. package/common/OptionsDoc.js +5 -11
  40. package/common/OptionsDoc.js.map +1 -1
  41. package/common/props.js +0 -3
  42. package/common/props.js.map +1 -1
  43. package/package.json +9 -9
  44. package/utils/numberUtils.js +4 -4
  45. package/utils/numberUtils.js.map +1 -1
  46. package/utils/propUtils.js +2 -2
  47. package/utils/propUtils.js.map +1 -1
  48. package/utils/seriesUtils.js +0 -1
  49. package/utils/seriesUtils.js.map +1 -1
@@ -130,22 +130,15 @@ Object.defineProperty(exports, "__esModule", {
130
130
  value: true
131
131
  });
132
132
  exports.SvgChoroplethDynamic = void 0;
133
-
134
133
  var React = __webpack_require__(1);
135
-
136
134
  var T = __webpack_require__(0);
137
-
138
135
  var ChoroplethSvg_1 = __webpack_require__(70);
139
-
140
136
  var Message_1 = __webpack_require__(33);
141
-
142
137
  var i18n_1 = __webpack_require__(32);
143
-
144
138
  var SvgChoroplethDynamic = function SvgChoroplethDynamic(props) {
145
139
  var width = props.width,
146
- height = props.height,
147
- svg = props.svg;
148
-
140
+ height = props.height,
141
+ svg = props.svg;
149
142
  if (!svg) {
150
143
  return React.createElement(Message_1.default, {
151
144
  "data-test": "choropleth-svg-message",
@@ -154,10 +147,8 @@ var SvgChoroplethDynamic = function SvgChoroplethDynamic(props) {
154
147
  message: i18n_1._('No literal SVG is provided')
155
148
  });
156
149
  }
157
-
158
150
  return React.createElement(ChoroplethSvg_1.PureSvgChoroplethDynamic, Object.assign({}, props));
159
151
  };
160
-
161
152
  exports.SvgChoroplethDynamic = SvgChoroplethDynamic;
162
153
  exports.SvgChoroplethDynamic.propTypes = {
163
154
  width: T.oneOfType([T.string, T.number]),
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualizations-shared/Message\"","webpack:///./src/visualizations/SvgChoroplethDynamic/SvgChoroplethDynamic.tsx","webpack:///external \"@splunk/visualizations/ChoroplethSvg\""],"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,uC;;;;;;;ACAA,kC;;;;;;;ACAA,kD;;;;;;;ACAA,kE;;;;;;;;;;;;;;;ACAA;;AACA;;AACA;;AACA;;AACA;;AAEO,IAAM,oBAAoB,GAAG,SAAvB,oBAAuB,MAAK,EAAG;AAAA,MAChC,KADgC,GACT,KADS,CAChC,KADgC;AAAA,MACzB,MADyB,GACT,KADS,CACzB,MADyB;AAAA,MACjB,GADiB,GACT,KADS,CACjB,GADiB;;AAExC,MAAI,CAAC,GAAL,EAAU;AACN,WACI,oBAAC,iBAAD,EAAQ;AAAA,mBACM,wBADN;AAEJ,WAAK,EAAE,KAFH;AAGJ,YAAM,EAAE,MAHJ;AAIJ,aAAO,EAAE,SAAE,4BAAF;AAJL,KAAR,CADJ;AAQH;;AACD,SAAO,oBAAC,wCAAD,EAAyB,kBAAK,KAAL,CAAzB,CAAP;AACH,CAbM;;AAAM,+BAAoB,oBAApB;AAcb,6BAAqB,SAArB,GAAiC;AAC7B,OAAK,EAAE,CAAC,CAAC,SAAF,CAAY,CAAC,CAAC,CAAC,MAAH,EAAW,CAAC,CAAC,MAAb,CAAZ,CADsB;AAE7B,QAAM,EAAE,CAAC,CAAC,SAAF,CAAY,CAAC,CAAC,CAAC,MAAH,EAAW,CAAC,CAAC,MAAb,CAAZ,CAFqB;AAG7B,KAAG,EAAE,CAAC,CAAC;AAHsB,CAAjC;AAMA,6BAAqB,YAArB,GAAoC;AAChC,OAAK,EAAE,MADyB;AAEhC,QAAM,EAAE;AAFwB,CAApC;AAKA,kBAAe,4BAAf,C;;;;;;;AC/BA,iE","file":"SvgChoroplethDynamic.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 = 69);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualizations-shared/Message\");","import * as React from 'react';\nimport * as T from 'prop-types';\nimport { PureSvgChoroplethDynamic } from '@splunk/visualizations/ChoroplethSvg';\nimport Message from '@splunk/visualizations-shared/Message';\nimport { _ } from '@splunk/ui-utils/i18n';\n\nexport const SvgChoroplethDynamic = props => {\n const { width, height, svg } = props;\n if (!svg) {\n return (\n <Message\n data-test=\"choropleth-svg-message\"\n width={width}\n height={height}\n message={_('No literal SVG is provided')}\n />\n );\n }\n return <PureSvgChoroplethDynamic {...props} />;\n};\nSvgChoroplethDynamic.propTypes = {\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n svg: T.string,\n};\n\nSvgChoroplethDynamic.defaultProps = {\n width: '100%',\n height: 250,\n};\n\nexport default SvgChoroplethDynamic;\n","module.exports = require(\"@splunk/visualizations/ChoroplethSvg\");"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualizations-shared/Message\"","webpack:///./src/visualizations/SvgChoroplethDynamic/SvgChoroplethDynamic.tsx","webpack:///external \"@splunk/visualizations/ChoroplethSvg\""],"names":["React","require","T","ChoroplethSvg_1","Message_1","i18n_1","SvgChoroplethDynamic","props","width","height","svg","createElement","default","message","_","PureSvgChoroplethDynamic","Object","assign","exports","propTypes","oneOfType","string","number","defaultProps"],"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,uC;;;;;;;ACAA,kC;;;;;;;ACAA,kD;;;;;;;ACAA,kE;;;;;;;;;;;;;;ACAA,IAAAA,KAAA,GAAAC,mBAAA;AACA,IAAAC,CAAA,GAAAD,mBAAA;AACA,IAAAE,eAAA,GAAAF,mBAAA;AACA,IAAAG,SAAA,GAAAH,mBAAA;AACA,IAAAI,MAAA,GAAAJ,mBAAA;AAEO,IAAMK,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAGC,KAAK,EAAG;EAAA,IAChCC,KAAK,GAAkBD,KAAK,CAA5BC,KAAK;IAAEC,MAAM,GAAUF,KAAK,CAArBE,MAAM;IAAEC,GAAG,GAAKH,KAAK,CAAbG,GAAG;EAC1B,IAAI,CAACA,GAAG,EAAE;IACN,OACIV,KAAA,CAAAW,aAAA,CAACP,SAAA,CAAAQ,OAAO;MAAA,aACM,wBAAwB;MAClCJ,KAAK,EAAEA,KAAK;MACZC,MAAM,EAAEA,MAAM;MACdI,OAAO,EAAER,MAAA,CAAAS,CAAC,CAAC,4BAA4B;IAAC,EAC1C;;EAGV,OAAOd,KAAA,CAAAW,aAAA,CAACR,eAAA,CAAAY,wBAAwB,EAAAC,MAAA,CAAAC,MAAA,KAAKV,KAAK,EAAI;AAClD,CAAC;AAbYW,OAAA,CAAAZ,oBAAoB,GAAAA,oBAAA;AAcjCY,OAAA,CAAAZ,oBAAoB,CAACa,SAAS,GAAG;EAC7BX,KAAK,EAAEN,CAAC,CAACkB,SAAS,CAAC,CAAClB,CAAC,CAACmB,MAAM,EAAEnB,CAAC,CAACoB,MAAM,CAAC,CAAC;EACxCb,MAAM,EAAEP,CAAC,CAACkB,SAAS,CAAC,CAAClB,CAAC,CAACmB,MAAM,EAAEnB,CAAC,CAACoB,MAAM,CAAC,CAAC;EACzCZ,GAAG,EAAER,CAAC,CAACmB;CACV;AAEDH,OAAA,CAAAZ,oBAAoB,CAACiB,YAAY,GAAG;EAChCf,KAAK,EAAE,MAAM;EACbC,MAAM,EAAE;CACX;AAEDS,OAAA,CAAAN,OAAA,GAAeM,OAAA,CAAAZ,oBAAoB,C;;;;;;;AC/BnC,iE","file":"SvgChoroplethDynamic.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 = 69);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualizations-shared/Message\");","import * as React from 'react';\nimport * as T from 'prop-types';\nimport { PureSvgChoroplethDynamic } from '@splunk/visualizations/ChoroplethSvg';\nimport Message from '@splunk/visualizations-shared/Message';\nimport { _ } from '@splunk/ui-utils/i18n';\n\nexport const SvgChoroplethDynamic = props => {\n const { width, height, svg } = props;\n if (!svg) {\n return (\n <Message\n data-test=\"choropleth-svg-message\"\n width={width}\n height={height}\n message={_('No literal SVG is provided')}\n />\n );\n }\n return <PureSvgChoroplethDynamic {...props} />;\n};\nSvgChoroplethDynamic.propTypes = {\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n svg: T.string,\n};\n\nSvgChoroplethDynamic.defaultProps = {\n width: '100%',\n height: 250,\n};\n\nexport default SvgChoroplethDynamic;\n","module.exports = require(\"@splunk/visualizations/ChoroplethSvg\");"],"sourceRoot":""}
@@ -173,17 +173,13 @@ module.exports = require("@babel/runtime/helpers/possibleConstructorReturn");
173
173
 
174
174
 
175
175
  var _classCallCheck = __webpack_require__(7);
176
-
177
176
  var _createClass = __webpack_require__(8);
178
-
179
177
  Object.defineProperty(exports, "__esModule", {
180
178
  value: true
181
179
  });
182
-
183
180
  var ChartingApi = /*#__PURE__*/function () {
184
181
  function ChartingApi(charting) {
185
182
  _classCallCheck(this, ChartingApi);
186
-
187
183
  this.charting = charting;
188
184
  }
189
185
  /**
@@ -191,18 +187,15 @@ var ChartingApi = /*#__PURE__*/function () {
191
187
  *
192
188
  * @memberof ChartingApi
193
189
  */
194
-
195
-
196
190
  _createClass(ChartingApi, [{
197
191
  key: "highlight",
198
192
  value: function highlight() {
199
193
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
200
- xValue: '',
201
- seriesName: ''
202
- },
203
- xValue = _ref.xValue,
204
- seriesName = _ref.seriesName;
205
-
194
+ xValue: '',
195
+ seriesName: ''
196
+ },
197
+ xValue = _ref.xValue,
198
+ seriesName = _ref.seriesName;
206
199
  this.charting.chart.highlight(xValue, seriesName);
207
200
  }
208
201
  /**
@@ -210,17 +203,14 @@ var ChartingApi = /*#__PURE__*/function () {
210
203
  *
211
204
  * @memberof ChartingApi
212
205
  */
213
-
214
206
  }, {
215
207
  key: "unHighlight",
216
208
  value: function unHighlight() {
217
209
  this.charting.chart.unHighlight();
218
210
  }
219
211
  }]);
220
-
221
212
  return ChartingApi;
222
213
  }();
223
-
224
214
  exports.default = ChartingApi;
225
215
 
226
216
  /***/ }),
@@ -309,65 +299,45 @@ __webpack_require__.r(__webpack_exports__);
309
299
 
310
300
 
311
301
 
312
-
313
302
  function ownKeys(object, enumerableOnly) {
314
303
  var keys = Object.keys(object);
315
-
316
304
  if (Object.getOwnPropertySymbols) {
317
305
  var symbols = Object.getOwnPropertySymbols(object);
318
- if (enumerableOnly) symbols = symbols.filter(function (sym) {
306
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
319
307
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
320
- });
321
- keys.push.apply(keys, symbols);
308
+ })), keys.push.apply(keys, symbols);
322
309
  }
323
-
324
310
  return keys;
325
311
  }
326
-
327
312
  function _objectSpread(target) {
328
313
  for (var i = 1; i < arguments.length; i++) {
329
- var source = arguments[i] != null ? arguments[i] : {};
330
-
331
- if (i % 2) {
332
- ownKeys(Object(source), true).forEach(function (key) {
333
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(target, key, source[key]);
334
- });
335
- } else if (Object.getOwnPropertyDescriptors) {
336
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
337
- } else {
338
- ownKeys(Object(source)).forEach(function (key) {
339
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
340
- });
341
- }
314
+ var source = null != arguments[i] ? arguments[i] : {};
315
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
316
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(target, key, source[key]);
317
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
318
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
319
+ });
342
320
  }
343
-
344
321
  return target;
345
322
  }
346
-
347
323
  function _createSuper(Derived) {
348
324
  var hasNativeReflectConstruct = _isNativeReflectConstruct();
349
-
350
325
  return function _createSuperInternal() {
351
326
  var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived),
352
- result;
353
-
327
+ result;
354
328
  if (hasNativeReflectConstruct) {
355
329
  var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor;
356
-
357
330
  result = Reflect.construct(Super, arguments, NewTarget);
358
331
  } else {
359
332
  result = Super.apply(this, arguments);
360
333
  }
361
-
362
334
  return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result);
363
335
  };
364
336
  }
365
-
366
337
  function _isNativeReflectConstruct() {
367
338
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
368
339
  if (Reflect.construct.sham) return false;
369
340
  if (typeof Proxy === "function") return true;
370
-
371
341
  try {
372
342
  Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
373
343
  return true;
@@ -381,8 +351,6 @@ function _isNativeReflectConstruct() {
381
351
 
382
352
 
383
353
 
384
-
385
-
386
354
  // fixme, @splunk/charting should be refactor to use locale & timezone instead of i18n functions
387
355
 
388
356
 
@@ -390,7 +358,6 @@ function _isNativeReflectConstruct() {
390
358
 
391
359
 
392
360
 
393
-
394
361
  var NO_INPLACE_PROPS = ['chart', 'chart.orientation', 'layout.splitSeries', 'chart.style', 'legend.placement'];
395
362
  _splunk_charting_bundle__WEBPACK_IMPORTED_MODULE_14___default.a.enableScaledEvents();
396
363
  var changedOptions = function changedOptions(a, b) {
@@ -406,56 +373,41 @@ var ChartingContainer = styled_components__WEBPACK_IMPORTED_MODULE_16___default.
406
373
  })(["overflow:hidden;position:relative;", ";"], function (props) {
407
374
  return Object(_splunk_visualizations_shared_style__WEBPACK_IMPORTED_MODULE_15__["toDimension"])(Object(lodash__WEBPACK_IMPORTED_MODULE_7__["pick"])(props, ['width', 'height']));
408
375
  });
409
-
410
376
  var Charting = /*#__PURE__*/function (_Component) {
411
377
  _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(Charting, _Component);
412
-
413
378
  var _super = _createSuper(Charting);
414
-
415
379
  function Charting(props, context) {
416
380
  var _this;
417
-
418
381
  _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Charting);
419
-
420
382
  _this = _super.call(this, props, context);
421
-
422
383
  _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "drawChart", Object(lodash__WEBPACK_IMPORTED_MODULE_7__["debounce"])(function () {
423
384
  var _this$props = _this.props,
424
- options = _this$props.options,
425
- chartData = _this$props.chartData,
426
- themeKey = _this$props.themeKey,
427
- colorPalette = _this$props.colorPalette;
428
-
385
+ options = _this$props.options,
386
+ chartData = _this$props.chartData,
387
+ themeKey = _this$props.themeKey,
388
+ colorPalette = _this$props.colorPalette;
429
389
  var updatedOptions = _objectSpread(_objectSpread({}, options), {}, {
430
390
  shouldColorizeTooltipData: false
431
391
  });
432
-
433
392
  var _this$computeCharting = _this.computeChartingSize(),
434
- width = _this$computeCharting.width,
435
- height = _this$computeCharting.height;
436
-
393
+ width = _this$computeCharting.width,
394
+ height = _this$computeCharting.height;
437
395
  var serializedTimezone = Object(lodash__WEBPACK_IMPORTED_MODULE_7__["get"])(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), ['context', 'serializedTimezone']);
438
396
  var ianaTimezone = Object(lodash__WEBPACK_IMPORTED_MODULE_7__["get"])(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), ['context', 'ianaTimezone']);
439
397
  var utcOffset = Object(lodash__WEBPACK_IMPORTED_MODULE_7__["get"])(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), ['context', 'utcOffset']);
440
-
441
398
  if (!width || !height) {
442
399
  return;
443
400
  }
444
-
445
401
  if (!chartData || !chartData.length) {
446
402
  return;
447
403
  }
448
-
449
404
  try {
450
405
  if (_this.needsInit) {
451
406
  _this.destroyChart();
452
-
453
407
  _splunk_charting_bundle__WEBPACK_IMPORTED_MODULE_14___default.a.setTheme(themeKey);
454
-
455
408
  if (colorPalette.length > 0) {
456
409
  _splunk_charting_bundle__WEBPACK_IMPORTED_MODULE_14___default.a.setColorPalette(colorPalette);
457
410
  }
458
-
459
411
  _this.chart = _splunk_charting_bundle__WEBPACK_IMPORTED_MODULE_14___default.a.createChart(_this.container, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, updatedOptions), {}, {
460
412
  drilldown: 'all'
461
413
  }, typeof serializedTimezone === 'string' && {
@@ -464,67 +416,52 @@ var Charting = /*#__PURE__*/function (_Component) {
464
416
  'time.ianaTimezone': ianaTimezone
465
417
  }), typeof utcOffset === 'number' && {
466
418
  'time.timezoneOffset': utcOffset
467
- })); // bind event handlers
468
-
419
+ }));
420
+ // bind event handlers
469
421
  _this.chart.on('pointClick', function (e) {
470
422
  _this.handleClick(e, 'point.click');
471
423
  });
472
-
473
424
  _this.chart.on('pointMouseOver', function (e) {
474
425
  _this.handlePointMouseOver(e, 'point.mouseover');
475
426
  });
476
-
477
427
  _this.chart.on('pointMouseOut', function (e) {
478
428
  _this.handlePointMouseOut(e, 'point.mouseout');
479
429
  });
480
-
481
430
  _this.chart.on('legendClick', function (e) {
482
431
  _this.handleClick(e, 'legend.click');
483
432
  });
484
-
485
433
  _this.chart.on('chartRangeSelect', _this.handleSelect);
486
434
  }
487
-
488
435
  if (_this.needsRedraw) {
489
436
  _splunk_charting_bundle__WEBPACK_IMPORTED_MODULE_14___default.a.setTheme(themeKey);
490
-
491
437
  if (colorPalette.length > 0) {
492
438
  _splunk_charting_bundle__WEBPACK_IMPORTED_MODULE_14___default.a.setColorPalette(colorPalette);
493
439
  }
494
-
495
440
  _this.chart.prepareAndDraw(chartData, updatedOptions, function () {});
496
441
  }
497
-
498
442
  if (_this.chart) {
499
443
  _this.chart.resize(width, height);
500
444
  }
501
-
502
445
  _this.needsInit = false;
503
446
  _this.needsRedraw = false;
504
447
  } catch (e) {
505
448
  window.console.error('Caught error rendering chart:', e);
506
449
  }
507
450
  }, 5));
508
-
509
451
  _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "onContainerMount", function (container) {
510
452
  _this.container = container;
511
-
512
453
  _this.drawChart();
513
454
  });
514
-
515
455
  _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "computeChartingSize", function () {
516
456
  if (_this.container) {
517
457
  var rect = _this.container.getBoundingClientRect();
518
-
519
458
  return {
520
459
  height: rect.height,
521
460
  width: rect.width
522
461
  };
523
462
  }
524
-
525
463
  return {};
526
464
  });
527
-
528
465
  _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "handleClick", function (chartEvent, type) {
529
466
  // todo: need change this after breaking all visualizations
530
467
  if (_this.props.onClick && typeof _this.props.onClick === 'function') {
@@ -533,19 +470,17 @@ var Charting = /*#__PURE__*/function (_Component) {
533
470
  originalEvent: chartEvent,
534
471
  payload: Object(lodash__WEBPACK_IMPORTED_MODULE_7__["pick"])(chartEvent, 'name', 'value', 'name2', 'value2', '_span', 'rowContext', 'modifierKey')
535
472
  });
536
-
537
473
  return;
538
- } // todo: need remove it after breaking all visualizations
539
- // the chartEvent here is a jQuery event
540
-
474
+ }
541
475
 
476
+ // todo: need remove it after breaking all visualizations
477
+ // the chartEvent here is a jQuery event
542
478
  _this.props.onEventTrigger({
543
479
  type: type,
544
480
  originalEvent: chartEvent,
545
481
  payload: Object(lodash__WEBPACK_IMPORTED_MODULE_7__["pick"])(chartEvent, 'name', 'value', 'name2', 'value2', '_span', 'rowContext', 'modifierKey')
546
482
  });
547
483
  });
548
-
549
484
  _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "handlePointMouseOver", function (chartEvent, type) {
550
485
  _this.props.onPointMouseOver({
551
486
  type: type,
@@ -553,7 +488,6 @@ var Charting = /*#__PURE__*/function (_Component) {
553
488
  payload: Object(lodash__WEBPACK_IMPORTED_MODULE_7__["pick"])(chartEvent, 'name', 'value', 'name2', 'value2', '_span', 'rowContext', 'modifierKey', 'tooltipContext')
554
489
  });
555
490
  });
556
-
557
491
  _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "handlePointMouseOut", function (chartEvent, type) {
558
492
  _this.props.onPointMouseOut({
559
493
  type: type,
@@ -561,7 +495,6 @@ var Charting = /*#__PURE__*/function (_Component) {
561
495
  payload: Object(lodash__WEBPACK_IMPORTED_MODULE_7__["pick"])(chartEvent, 'name', 'value', 'name2', 'value2', '_span', 'rowContext', 'modifierKey', 'tooltipContext')
562
496
  });
563
497
  });
564
-
565
498
  _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "handleSelect", function (chartEvent) {
566
499
  // todo: need change this after breaking all visualizations
567
500
  if (_this.props.onSelect && typeof _this.props.onSelect === 'function') {
@@ -570,45 +503,41 @@ var Charting = /*#__PURE__*/function (_Component) {
570
503
  originalEvent: chartEvent,
571
504
  payload: Object(lodash__WEBPACK_IMPORTED_MODULE_7__["pick"])(chartEvent, 'startXIndex', 'endXIndex', 'startXValue', 'endXValue')
572
505
  });
573
-
574
506
  return;
575
- } // the chartEvent here is a jQuery event
576
-
507
+ }
577
508
 
509
+ // the chartEvent here is a jQuery event
578
510
  _this.props.onEventTrigger({
579
511
  type: 'range.select',
580
512
  originalEvent: chartEvent,
581
513
  payload: Object(lodash__WEBPACK_IMPORTED_MODULE_7__["pick"])(chartEvent, 'startXIndex', 'endXIndex', 'startXValue', 'endXValue')
582
514
  });
583
515
  });
584
-
585
516
  _this.needsInit = true;
586
517
  _this.needsRedraw = true;
587
518
  _this.container = null;
588
519
  _this.api = new _ChartingApi__WEBPACK_IMPORTED_MODULE_18___default.a(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this));
589
520
  return _this;
590
521
  }
591
-
592
522
  _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Charting, [{
593
523
  key: "componentDidMount",
594
524
  value: function componentDidMount() {
595
525
  this.drawChart();
596
526
  this.props.visualizationApiRef(this.api);
597
- } // eslint-disable-next-line camelcase
527
+ }
598
528
 
529
+ // eslint-disable-next-line camelcase
599
530
  }, {
600
531
  key: "UNSAFE_componentWillReceiveProps",
601
532
  value: function UNSAFE_componentWillReceiveProps(nextProps) {
602
533
  var nextOptions = nextProps.options,
603
- nextData = nextProps.chartData;
534
+ nextData = nextProps.chartData;
604
535
  var _this$props2 = this.props,
605
- currentOptions = _this$props2.options,
606
- currentData = _this$props2.chartData;
607
-
536
+ currentOptions = _this$props2.options,
537
+ currentData = _this$props2.chartData;
608
538
  if (!this.chart || !Charting.canUpdateInPlace(currentOptions, nextOptions)) {
609
539
  this.needsInit = true;
610
540
  }
611
-
612
541
  if (!Object(lodash__WEBPACK_IMPORTED_MODULE_7__["isEqual"])(currentOptions, nextOptions) || !Object(lodash__WEBPACK_IMPORTED_MODULE_7__["isEqual"])(currentData.toJSON(), nextData.toJSON()) || !Object(lodash__WEBPACK_IMPORTED_MODULE_7__["isEqual"])(currentData.annotations, nextData.annotations)) {
613
542
  this.needsRedraw = true;
614
543
  }
@@ -631,7 +560,6 @@ var Charting = /*#__PURE__*/function (_Component) {
631
560
  this.chart.destroy();
632
561
  this.chart = null;
633
562
  }
634
-
635
563
  this.needsRedraw = true;
636
564
  this.needsInit = true;
637
565
  }
@@ -639,10 +567,10 @@ var Charting = /*#__PURE__*/function (_Component) {
639
567
  key: "render",
640
568
  value: function render() {
641
569
  var _this$props3 = this.props,
642
- width = _this$props3.width,
643
- height = _this$props3.height,
644
- style = _this$props3.style,
645
- chartData = _this$props3.chartData;
570
+ width = _this$props3.width,
571
+ height = _this$props3.height,
572
+ style = _this$props3.style,
573
+ chartData = _this$props3.chartData;
646
574
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(ChartingContainer, {
647
575
  style: style,
648
576
  width: width,
@@ -673,31 +601,25 @@ var Charting = /*#__PURE__*/function (_Component) {
673
601
  });
674
602
  }
675
603
  }]);
676
-
677
604
  return Charting;
678
605
  }(react__WEBPACK_IMPORTED_MODULE_9__["Component"]);
679
-
680
606
  _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(Charting, "propTypes", {
681
607
  /**
682
608
  * width in pixel or string, defaults to 100%
683
609
  */
684
610
  width: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.number]),
685
-
686
611
  /**
687
612
  * height in pixel or string
688
613
  */
689
614
  height: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.number]),
690
-
691
615
  /**
692
616
  * visualization formatting options
693
617
  */
694
618
  options: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.object,
695
-
696
619
  /**
697
620
  * charting dataset from jsCharting.extractChartReadyData
698
621
  */
699
622
  chartData: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.object,
700
-
701
623
  /**
702
624
  * callbacks to trigger event
703
625
  */
@@ -706,7 +628,6 @@ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(Cha
706
628
  onSelect: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.func,
707
629
  onPointMouseOver: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.func,
708
630
  onPointMouseOut: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.func,
709
-
710
631
  /**
711
632
  * Custom style on visualization
712
633
  */
@@ -715,7 +636,6 @@ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(Cha
715
636
  colorPalette: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.array,
716
637
  visualizationApiRef: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.func
717
638
  });
718
-
719
639
  _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(Charting, "defaultProps", {
720
640
  width: '100%',
721
641
  options: {},
@@ -730,11 +650,9 @@ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(Cha
730
650
  colorPalette: [],
731
651
  visualizationApiRef: function visualizationApiRef() {}
732
652
  });
733
-
734
653
  _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(Charting, "contextType", _splunk_visualization_context_TimezoneContext__WEBPACK_IMPORTED_MODULE_13___default.a);
735
654
 
736
655
 
737
-
738
656
  /***/ }),
739
657
  /* 24 */
740
658
  /***/ (function(module, exports) {