@splunk/react-visualizations 25.7.2 → 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.
- package/Area.js +30 -56
- package/Area.js.map +1 -1
- package/Bar.js +26 -52
- package/Bar.js.map +1 -1
- package/Bubble.js +28 -54
- package/Bubble.js.map +1 -1
- package/Column.js +35 -62
- package/Column.js.map +1 -1
- package/FillerGauge.js +0 -2
- package/FillerGauge.js.map +1 -1
- package/GeoJsonChoropleth.js +89 -451
- package/GeoJsonChoropleth.js.map +1 -1
- package/Line.js +30 -56
- package/Line.js.map +1 -1
- package/MarkerGauge.js +0 -2
- package/MarkerGauge.js.map +1 -1
- package/Pie.js +23 -43
- package/Pie.js.map +1 -1
- package/Punchcard.js +3 -6
- package/Punchcard.js.map +1 -1
- package/Scatter.js +26 -52
- package/Scatter.js.map +1 -1
- package/SingleValue.js +13 -29
- package/SingleValue.js.map +1 -1
- package/SingleValueIcon.js +13 -30
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.js +134 -182
- package/SingleValueRadial.js.map +1 -1
- package/SvgChoropleth.js +21 -69
- package/SvgChoropleth.js.map +1 -1
- package/SvgChoroplethDynamic.js +2 -11
- package/SvgChoroplethDynamic.js.map +1 -1
- package/common/Charting.js +36 -118
- package/common/Charting.js.map +1 -1
- package/common/ChartingApi.js +5 -15
- package/common/ChartingApi.js.map +1 -1
- package/common/EventsDoc.js +20 -61
- package/common/EventsDoc.js.map +1 -1
- package/common/OptionsDoc.js +5 -11
- package/common/OptionsDoc.js.map +1 -1
- package/common/props.js +0 -3
- package/common/props.js.map +1 -1
- package/package.json +9 -9
- package/utils/numberUtils.js +4 -4
- package/utils/numberUtils.js.map +1 -1
- package/utils/propUtils.js +2 -2
- package/utils/propUtils.js.map +1 -1
- package/utils/seriesUtils.js +0 -1
- package/utils/seriesUtils.js.map +1 -1
package/common/Charting.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/assertThisInitialized\"","webpack:///external \"lodash\"","webpack:///external \"styled-components\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///external \"@splunk/charting-bundle\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\"","webpack:///./src/common/ChartingApi.ts","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualizations-shared/Message\"","webpack:///external \"react-event-listener\"","webpack:///external \"@splunk/visualization-context/TimezoneContext\"","webpack:///external \"@splunk/visualizations-shared/style\"","webpack:///./src/common/Charting.jsx","webpack:///external \"@splunk/visualizations-shared/i18n\""],"names":["NO_INPLACE_PROPS","jsCharting","changedOptions","k","a","b","ChartingContainer","styled","toDimension","pick","Charting","debounce","options","chartData","themeKey","colorPalette","updatedOptions","shouldColorizeTooltipData","width","height","serializedTimezone","get","ianaTimezone","utcOffset","drilldown","window","rect","type","originalEvent","payload","nextOptions","nextProps","nextData","currentOptions","currentData","isEqual","style","onContainerMount","drawChart","_","curOptions","p","Component","T","onEventTrigger","onClick","onSelect","onPointMouseOver","onPointMouseOut","visualizationApiRef","func","TimezoneContext"],"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;QAC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AACQC,gBAAc,EAAED,kDAAC,CApBF;AAqBfE,SAAO,EAAEF,kDAAC,CArBK;AAsBfG,UAAQ,EAAEH,kDAAC,CAtBI;AAuBfI,kBAAgB,EAAEJ,kDAAC,CAvBJ;AAwBfK,iBAAe,EAAEL,kDAAC,CAxBH;;AAyBf;AACR;AACA;AACQP,OAAK,EAAEO,kDAAC,CA5BO;AA6Bf7B,UAAQ,EAAE6B,kDAAC,CA7BI;AA8Bf5B,cAAY,EAAE4B,kDAAC,CA9BA;AA+BfM,qBAAmB,EAAEN,kDAAC,CAACO;AA/BR,C;;6EADFxC,Q,kBAmCK;AAClBQ,OAAK,EADa;AAElBN,SAAO,EAFW;AAGlBwB,OAAK,EAHa;AAIlB;AACAQ,gBAAc,EAAE,0BAAM,CALJ;AAMlB;AACAC,SAAO,EAPW;AAQlBC,UAAQ,EARU;AASlBC,kBAAgB,EAAE,4BAAM,CATN;AAUlBC,iBAAe,EAAE,2BAAM,CAVL;AAWlBjC,cAAY,EAXM;AAYlBkC,qBAAmB,EAAE,+BAAM,CAAE;AAZX,C;;6EAnCLvC,Q,iBAkDIyC,qF;;;;;;;;ACrFzB,+D","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 = 23);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/assertThisInitialized\");","module.exports = require(\"lodash\");","module.exports = require(\"styled-components\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","module.exports = require(\"@splunk/charting-bundle\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");","interface 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}\nclass ChartingApi {\n charting;\n\n constructor(charting) {\n this.charting = charting;\n }\n\n /**\n * Allows users to programmatically highlight a point on the chart\n *\n * @memberof ChartingApi\n */\n highlight({ xValue, seriesName }: Point = { xValue: '', seriesName: '' }) {\n this.charting.chart.highlight(xValue, seriesName);\n }\n\n /**\n * Allows users to programmatically unhighlight all points on the chart\n *\n * @memberof ChartingApi\n */\n unHighlight() {\n this.charting.chart.unHighlight();\n }\n}\n\nexport default ChartingApi;\n","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualizations-shared/Message\");","module.exports = require(\"react-event-listener\");","module.exports = require(\"@splunk/visualization-context/TimezoneContext\");","module.exports = require(\"@splunk/visualizations-shared/style\");","/* eslint-disable import/first, react/prop-types */\nimport { pick, debounce, isEqual, get } from 'lodash';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport React, { Component } from 'react';\nimport 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 TimezoneContext from '@splunk/visualization-context/TimezoneContext';\nimport jsCharting from '@splunk/charting-bundle';\nimport { toDimension } from '@splunk/visualizations-shared/style';\nimport styled from 'styled-components';\nimport Message from '@splunk/visualizations-shared/Message';\nimport ChartingApi from './ChartingApi';\n\nexport const NO_INPLACE_PROPS = [\n 'chart',\n 'chart.orientation',\n 'layout.splitSeries',\n 'chart.style',\n 'legend.placement',\n];\n\njsCharting.enableScaledEvents();\n\nexport const changedOptions = (a, b) =>\n Object.keys(a)\n .filter(k => !(k in b))\n .concat(Object.keys(b).filter(k => !(k in a) || a[k] !== b[k]));\n\nconst ChartingContainer = styled.div`\n overflow: hidden;\n position: relative;\n ${props => toDimension(pick(props, ['width', 'height']))};\n`;\n\nexport default class Charting extends Component {\n static propTypes = {\n /**\n * width in pixel or string, defaults to 100%\n */\n width: T.oneOfType([T.string, T.number]),\n /**\n * height in pixel or string\n */\n height: T.oneOfType([T.string, T.number]),\n /**\n * visualization formatting options\n */\n options: T.object,\n /**\n * charting dataset from jsCharting.extractChartReadyData\n */\n chartData: T.object,\n /**\n * callbacks to trigger event\n */\n onEventTrigger: T.func,\n onClick: T.func,\n onSelect: T.func,\n onPointMouseOver: T.func,\n onPointMouseOut: T.func,\n /**\n * Custom style on visualization\n */\n style: T.object,\n themeKey: T.string,\n colorPalette: T.array,\n visualizationApiRef: T.func,\n };\n\n static defaultProps = {\n width: '100%',\n options: {},\n style: {},\n // todo: need remove it\n onEventTrigger: () => {},\n // todo: need change to a function\n onClick: null,\n onSelect: null,\n onPointMouseOver: () => {},\n onPointMouseOut: () => {},\n colorPalette: [],\n visualizationApiRef: () => {},\n };\n\n static contextType = TimezoneContext;\n\n /**\n * Check if a chart can be updated without re-init\n */\n static canUpdateInPlace(curOptions, nextOptions) {\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 drawChart = debounce(() => {\n const { options, chartData, themeKey, colorPalette } = this.props;\n const updatedOptions = { ...options, shouldColorizeTooltipData: false };\n const { width, height } = this.computeChartingSize();\n const serializedTimezone = get(this, ['context', 'serializedTimezone']);\n const ianaTimezone = get(this, ['context', 'ianaTimezone']);\n const utcOffset = get(this, ['context', 'utcOffset']);\n if (!width || !height) {\n return;\n }\n if (!chartData || !chartData.length) {\n return;\n }\n try {\n if (this.needsInit) {\n this.destroyChart();\n jsCharting.setTheme(themeKey);\n if (colorPalette.length > 0) {\n jsCharting.setColorPalette(colorPalette);\n }\n this.chart = jsCharting.createChart(this.container, {\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 this.chart.on('pointClick', e => {\n this.handleClick(e, 'point.click');\n });\n this.chart.on('pointMouseOver', e => {\n this.handlePointMouseOver(e, 'point.mouseover');\n });\n this.chart.on('pointMouseOut', e => {\n this.handlePointMouseOut(e, 'point.mouseout');\n });\n this.chart.on('legendClick', e => {\n this.handleClick(e, 'legend.click');\n });\n this.chart.on('chartRangeSelect', this.handleSelect);\n }\n if (this.needsRedraw) {\n jsCharting.setTheme(themeKey);\n if (colorPalette.length > 0) {\n jsCharting.setColorPalette(colorPalette);\n }\n this.chart.prepareAndDraw(chartData, updatedOptions, () => {});\n }\n if (this.chart) {\n this.chart.resize(width, height);\n }\n this.needsInit = false;\n this.needsRedraw = false;\n } catch (e) {\n window.console.error('Caught error rendering chart:', e);\n }\n }, 5);\n\n constructor(props, context) {\n super(props, context);\n this.needsInit = true;\n this.needsRedraw = true;\n this.container = null;\n this.api = new ChartingApi(this);\n }\n\n componentDidMount() {\n this.drawChart();\n this.props.visualizationApiRef(this.api);\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillReceiveProps(nextProps) {\n const { options: nextOptions, chartData: nextData } = nextProps;\n const { options: currentOptions, chartData: currentData } = this.props;\n if (!this.chart || !Charting.canUpdateInPlace(currentOptions, nextOptions)) {\n this.needsInit = true;\n }\n if (\n !isEqual(currentOptions, nextOptions) ||\n !isEqual(currentData.toJSON(), nextData.toJSON()) ||\n !isEqual(currentData.annotations, nextData.annotations)\n ) {\n this.needsRedraw = true;\n }\n }\n\n componentDidUpdate() {\n this.drawChart();\n }\n\n componentWillUnmount() {\n this.props.visualizationApiRef(null);\n this.destroyChart();\n }\n\n onContainerMount = container => {\n this.container = container;\n this.drawChart();\n };\n\n computeChartingSize = () => {\n if (this.container) {\n const rect = this.container.getBoundingClientRect();\n return {\n height: rect.height,\n width: rect.width,\n };\n }\n return {};\n };\n\n handleClick = (chartEvent, type) => {\n // todo: need change this after breaking all visualizations\n if (this.props.onClick && typeof this.props.onClick === 'function') {\n this.props.onClick({\n type,\n originalEvent: chartEvent,\n payload: pick(\n chartEvent,\n 'name',\n 'value',\n 'name2',\n 'value2',\n '_span',\n 'rowContext',\n 'modifierKey'\n ),\n });\n\n return;\n }\n\n // todo: need remove it after breaking all visualizations\n // the chartEvent here is a jQuery event\n this.props.onEventTrigger({\n type,\n originalEvent: chartEvent,\n payload: pick(\n chartEvent,\n 'name',\n 'value',\n 'name2',\n 'value2',\n '_span',\n 'rowContext',\n 'modifierKey'\n ),\n });\n };\n\n handlePointMouseOver = (chartEvent, type) => {\n this.props.onPointMouseOver({\n type,\n originalEvent: chartEvent,\n payload: pick(\n chartEvent,\n 'name',\n 'value',\n 'name2',\n 'value2',\n '_span',\n 'rowContext',\n 'modifierKey',\n 'tooltipContext'\n ),\n });\n };\n\n handlePointMouseOut = (chartEvent, type) => {\n this.props.onPointMouseOut({\n type,\n originalEvent: chartEvent,\n payload: pick(\n chartEvent,\n 'name',\n 'value',\n 'name2',\n 'value2',\n '_span',\n 'rowContext',\n 'modifierKey',\n 'tooltipContext'\n ),\n });\n };\n\n handleSelect = chartEvent => {\n // todo: need change this after breaking all visualizations\n if (this.props.onSelect && typeof this.props.onSelect === 'function') {\n this.props.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 this.props.onEventTrigger({\n type: 'range.select',\n originalEvent: chartEvent,\n payload: pick(chartEvent, 'startXIndex', 'endXIndex', 'startXValue', 'endXValue'),\n });\n };\n\n destroyChart() {\n if (this.chart) {\n this.chart.destroy();\n this.chart = null;\n }\n this.needsRedraw = true;\n this.needsInit = true;\n }\n\n render() {\n const { width, height, style, chartData } = this.props;\n return (\n <ChartingContainer style={style} width={width} height={height} ref={this.onContainerMount}>\n <EventListener target={window} onResize={this.drawChart} />\n {!chartData && <Message text={_('No DataSource')} level=\"warning\" />}\n {chartData && !chartData.length && <Message text={_('No Result')} level=\"info\" />}\n </ChartingContainer>\n );\n }\n}\n","module.exports = require(\"@splunk/visualizations-shared/i18n\");"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/assertThisInitialized\"","webpack:///external \"lodash\"","webpack:///external \"styled-components\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///external \"@splunk/charting-bundle\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\"","webpack:///./src/common/ChartingApi.ts","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualizations-shared/Message\"","webpack:///external \"react-event-listener\"","webpack:///external \"@splunk/visualization-context/TimezoneContext\"","webpack:///external \"@splunk/visualizations-shared/style\"","webpack:///./src/common/Charting.jsx","webpack:///external \"@splunk/visualizations-shared/i18n\""],"names":["ChartingApi","charting","_classCallCheck","_createClass","key","value","highlight","_ref","arguments","length","undefined","xValue","seriesName","chart","unHighlight","exports","default","NO_INPLACE_PROPS","jsCharting","enableScaledEvents","changedOptions","a","b","Object","keys","filter","k","concat","ChartingContainer","styled","div","withConfig","displayName","componentId","props","toDimension","pick","Charting","_Component","_inherits","_super","_createSuper","context","_this","call","_defineProperty","_assertThisInitialized","debounce","_this$props","options","chartData","themeKey","colorPalette","updatedOptions","_objectSpread","shouldColorizeTooltipData","_this$computeCharting","computeChartingSize","width","height","serializedTimezone","get","ianaTimezone","utcOffset","needsInit","destroyChart","setTheme","setColorPalette","createChart","container","drilldown","on","e","handleClick","handlePointMouseOver","handlePointMouseOut","handleSelect","needsRedraw","prepareAndDraw","resize","window","console","error","drawChart","rect","getBoundingClientRect","chartEvent","type","onClick","originalEvent","payload","onEventTrigger","onPointMouseOver","onPointMouseOut","onSelect","api","componentDidMount","visualizationApiRef","UNSAFE_componentWillReceiveProps","nextProps","nextOptions","nextData","_this$props2","currentOptions","currentData","canUpdateInPlace","isEqual","toJSON","annotations","componentDidUpdate","componentWillUnmount","destroy","render","_this$props3","style","React","createElement","ref","onContainerMount","EventListener","target","onResize","Message","text","_","level","curOptions","some","p","toLowerCase","endsWith","Component","T","oneOfType","string","number","object","func","array","TimezoneContext"],"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,kE;;;;;;ACAA,yE;;;;;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mF,kDAAC,CAACI,MAAM;EACjB;AACR;AACA;EACQtF,SAAS,EAAEkF,kDAAC,CAACI,MAAM;EACnB;AACR;AACA;EACQ7C,cAAc,EAAEyC,kDAAC,CAACK,IAAI;EACtBjD,OAAO,EAAE4C,kDAAC,CAACK,IAAI;EACf3C,QAAQ,EAAEsC,kDAAC,CAACK,IAAI;EAChB7C,gBAAgB,EAAEwC,kDAAC,CAACK,IAAI;EACxB5C,eAAe,EAAEuC,kDAAC,CAACK,IAAI;EACvB;AACR;AACA;EACQvB,KAAK,EAAEkB,kDAAC,CAACI,MAAM;EACfrF,QAAQ,EAAEiF,kDAAC,CAACE,MAAM;EAClBlF,YAAY,EAAEgF,kDAAC,CAACM,KAAK;EACrBzC,mBAAmB,EAAEmC,kDAAC,CAACK;AAC3B,CAAC;AAAA5F,4EAAA,CAjCgBR,QAAQ,kBAmCH;EAClBqB,KAAK,EAAE,MAAM;EACbT,OAAO,EAAE,CAAC,CAAC;EACXiE,KAAK,EAAE,CAAC,CAAC;EACT;EACAvB,cAAc,EAAE,SAAAA,eAAA,EAAM,CAAC,CAAC;EACxB;EACAH,OAAO,EAAE,IAAI;EACbM,QAAQ,EAAE,IAAI;EACdF,gBAAgB,EAAE,SAAAA,iBAAA,EAAM,CAAC,CAAC;EAC1BC,eAAe,EAAE,SAAAA,gBAAA,EAAM,CAAC,CAAC;EACzBzC,YAAY,EAAE,EAAE;EAChB6C,mBAAmB,EAAE,SAAAA,oBAAA,EAAM,CAAC;AAChC,CAAC;AAAApD,4EAAA,CAhDgBR,QAAQ,iBAkDJsG,qFAAe;;;;;;;ACrFxC,+D","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 = 23);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/assertThisInitialized\");","module.exports = require(\"lodash\");","module.exports = require(\"styled-components\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","module.exports = require(\"@splunk/charting-bundle\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");","interface 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}\nclass ChartingApi {\n charting;\n\n constructor(charting) {\n this.charting = charting;\n }\n\n /**\n * Allows users to programmatically highlight a point on the chart\n *\n * @memberof ChartingApi\n */\n highlight({ xValue, seriesName }: Point = { xValue: '', seriesName: '' }) {\n this.charting.chart.highlight(xValue, seriesName);\n }\n\n /**\n * Allows users to programmatically unhighlight all points on the chart\n *\n * @memberof ChartingApi\n */\n unHighlight() {\n this.charting.chart.unHighlight();\n }\n}\n\nexport default ChartingApi;\n","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualizations-shared/Message\");","module.exports = require(\"react-event-listener\");","module.exports = require(\"@splunk/visualization-context/TimezoneContext\");","module.exports = require(\"@splunk/visualizations-shared/style\");","/* eslint-disable import/first, react/prop-types */\nimport { pick, debounce, isEqual, get } from 'lodash';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport React, { Component } from 'react';\nimport 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 TimezoneContext from '@splunk/visualization-context/TimezoneContext';\nimport jsCharting from '@splunk/charting-bundle';\nimport { toDimension } from '@splunk/visualizations-shared/style';\nimport styled from 'styled-components';\nimport Message from '@splunk/visualizations-shared/Message';\nimport ChartingApi from './ChartingApi';\n\nexport const NO_INPLACE_PROPS = [\n 'chart',\n 'chart.orientation',\n 'layout.splitSeries',\n 'chart.style',\n 'legend.placement',\n];\n\njsCharting.enableScaledEvents();\n\nexport const changedOptions = (a, b) =>\n Object.keys(a)\n .filter(k => !(k in b))\n .concat(Object.keys(b).filter(k => !(k in a) || a[k] !== b[k]));\n\nconst ChartingContainer = styled.div`\n overflow: hidden;\n position: relative;\n ${props => toDimension(pick(props, ['width', 'height']))};\n`;\n\nexport default class Charting extends Component {\n static propTypes = {\n /**\n * width in pixel or string, defaults to 100%\n */\n width: T.oneOfType([T.string, T.number]),\n /**\n * height in pixel or string\n */\n height: T.oneOfType([T.string, T.number]),\n /**\n * visualization formatting options\n */\n options: T.object,\n /**\n * charting dataset from jsCharting.extractChartReadyData\n */\n chartData: T.object,\n /**\n * callbacks to trigger event\n */\n onEventTrigger: T.func,\n onClick: T.func,\n onSelect: T.func,\n onPointMouseOver: T.func,\n onPointMouseOut: T.func,\n /**\n * Custom style on visualization\n */\n style: T.object,\n themeKey: T.string,\n colorPalette: T.array,\n visualizationApiRef: T.func,\n };\n\n static defaultProps = {\n width: '100%',\n options: {},\n style: {},\n // todo: need remove it\n onEventTrigger: () => {},\n // todo: need change to a function\n onClick: null,\n onSelect: null,\n onPointMouseOver: () => {},\n onPointMouseOut: () => {},\n colorPalette: [],\n visualizationApiRef: () => {},\n };\n\n static contextType = TimezoneContext;\n\n /**\n * Check if a chart can be updated without re-init\n */\n static canUpdateInPlace(curOptions, nextOptions) {\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 drawChart = debounce(() => {\n const { options, chartData, themeKey, colorPalette } = this.props;\n const updatedOptions = { ...options, shouldColorizeTooltipData: false };\n const { width, height } = this.computeChartingSize();\n const serializedTimezone = get(this, ['context', 'serializedTimezone']);\n const ianaTimezone = get(this, ['context', 'ianaTimezone']);\n const utcOffset = get(this, ['context', 'utcOffset']);\n if (!width || !height) {\n return;\n }\n if (!chartData || !chartData.length) {\n return;\n }\n try {\n if (this.needsInit) {\n this.destroyChart();\n jsCharting.setTheme(themeKey);\n if (colorPalette.length > 0) {\n jsCharting.setColorPalette(colorPalette);\n }\n this.chart = jsCharting.createChart(this.container, {\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 this.chart.on('pointClick', e => {\n this.handleClick(e, 'point.click');\n });\n this.chart.on('pointMouseOver', e => {\n this.handlePointMouseOver(e, 'point.mouseover');\n });\n this.chart.on('pointMouseOut', e => {\n this.handlePointMouseOut(e, 'point.mouseout');\n });\n this.chart.on('legendClick', e => {\n this.handleClick(e, 'legend.click');\n });\n this.chart.on('chartRangeSelect', this.handleSelect);\n }\n if (this.needsRedraw) {\n jsCharting.setTheme(themeKey);\n if (colorPalette.length > 0) {\n jsCharting.setColorPalette(colorPalette);\n }\n this.chart.prepareAndDraw(chartData, updatedOptions, () => {});\n }\n if (this.chart) {\n this.chart.resize(width, height);\n }\n this.needsInit = false;\n this.needsRedraw = false;\n } catch (e) {\n window.console.error('Caught error rendering chart:', e);\n }\n }, 5);\n\n constructor(props, context) {\n super(props, context);\n this.needsInit = true;\n this.needsRedraw = true;\n this.container = null;\n this.api = new ChartingApi(this);\n }\n\n componentDidMount() {\n this.drawChart();\n this.props.visualizationApiRef(this.api);\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillReceiveProps(nextProps) {\n const { options: nextOptions, chartData: nextData } = nextProps;\n const { options: currentOptions, chartData: currentData } = this.props;\n if (!this.chart || !Charting.canUpdateInPlace(currentOptions, nextOptions)) {\n this.needsInit = true;\n }\n if (\n !isEqual(currentOptions, nextOptions) ||\n !isEqual(currentData.toJSON(), nextData.toJSON()) ||\n !isEqual(currentData.annotations, nextData.annotations)\n ) {\n this.needsRedraw = true;\n }\n }\n\n componentDidUpdate() {\n this.drawChart();\n }\n\n componentWillUnmount() {\n this.props.visualizationApiRef(null);\n this.destroyChart();\n }\n\n onContainerMount = container => {\n this.container = container;\n this.drawChart();\n };\n\n computeChartingSize = () => {\n if (this.container) {\n const rect = this.container.getBoundingClientRect();\n return {\n height: rect.height,\n width: rect.width,\n };\n }\n return {};\n };\n\n handleClick = (chartEvent, type) => {\n // todo: need change this after breaking all visualizations\n if (this.props.onClick && typeof this.props.onClick === 'function') {\n this.props.onClick({\n type,\n originalEvent: chartEvent,\n payload: pick(\n chartEvent,\n 'name',\n 'value',\n 'name2',\n 'value2',\n '_span',\n 'rowContext',\n 'modifierKey'\n ),\n });\n\n return;\n }\n\n // todo: need remove it after breaking all visualizations\n // the chartEvent here is a jQuery event\n this.props.onEventTrigger({\n type,\n originalEvent: chartEvent,\n payload: pick(\n chartEvent,\n 'name',\n 'value',\n 'name2',\n 'value2',\n '_span',\n 'rowContext',\n 'modifierKey'\n ),\n });\n };\n\n handlePointMouseOver = (chartEvent, type) => {\n this.props.onPointMouseOver({\n type,\n originalEvent: chartEvent,\n payload: pick(\n chartEvent,\n 'name',\n 'value',\n 'name2',\n 'value2',\n '_span',\n 'rowContext',\n 'modifierKey',\n 'tooltipContext'\n ),\n });\n };\n\n handlePointMouseOut = (chartEvent, type) => {\n this.props.onPointMouseOut({\n type,\n originalEvent: chartEvent,\n payload: pick(\n chartEvent,\n 'name',\n 'value',\n 'name2',\n 'value2',\n '_span',\n 'rowContext',\n 'modifierKey',\n 'tooltipContext'\n ),\n });\n };\n\n handleSelect = chartEvent => {\n // todo: need change this after breaking all visualizations\n if (this.props.onSelect && typeof this.props.onSelect === 'function') {\n this.props.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 this.props.onEventTrigger({\n type: 'range.select',\n originalEvent: chartEvent,\n payload: pick(chartEvent, 'startXIndex', 'endXIndex', 'startXValue', 'endXValue'),\n });\n };\n\n destroyChart() {\n if (this.chart) {\n this.chart.destroy();\n this.chart = null;\n }\n this.needsRedraw = true;\n this.needsInit = true;\n }\n\n render() {\n const { width, height, style, chartData } = this.props;\n return (\n <ChartingContainer style={style} width={width} height={height} ref={this.onContainerMount}>\n <EventListener target={window} onResize={this.drawChart} />\n {!chartData && <Message text={_('No DataSource')} level=\"warning\" />}\n {chartData && !chartData.length && <Message text={_('No Result')} level=\"info\" />}\n </ChartingContainer>\n );\n }\n}\n","module.exports = require(\"@splunk/visualizations-shared/i18n\");"],"sourceRoot":""}
|
package/common/ChartingApi.js
CHANGED
|
@@ -99,17 +99,13 @@ module.exports =
|
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
var _classCallCheck = __webpack_require__(7);
|
|
102
|
-
|
|
103
102
|
var _createClass = __webpack_require__(8);
|
|
104
|
-
|
|
105
103
|
Object.defineProperty(exports, "__esModule", {
|
|
106
104
|
value: true
|
|
107
105
|
});
|
|
108
|
-
|
|
109
106
|
var ChartingApi = /*#__PURE__*/function () {
|
|
110
107
|
function ChartingApi(charting) {
|
|
111
108
|
_classCallCheck(this, ChartingApi);
|
|
112
|
-
|
|
113
109
|
this.charting = charting;
|
|
114
110
|
}
|
|
115
111
|
/**
|
|
@@ -117,18 +113,15 @@ var ChartingApi = /*#__PURE__*/function () {
|
|
|
117
113
|
*
|
|
118
114
|
* @memberof ChartingApi
|
|
119
115
|
*/
|
|
120
|
-
|
|
121
|
-
|
|
122
116
|
_createClass(ChartingApi, [{
|
|
123
117
|
key: "highlight",
|
|
124
118
|
value: function highlight() {
|
|
125
119
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
120
|
+
xValue: '',
|
|
121
|
+
seriesName: ''
|
|
122
|
+
},
|
|
123
|
+
xValue = _ref.xValue,
|
|
124
|
+
seriesName = _ref.seriesName;
|
|
132
125
|
this.charting.chart.highlight(xValue, seriesName);
|
|
133
126
|
}
|
|
134
127
|
/**
|
|
@@ -136,17 +129,14 @@ var ChartingApi = /*#__PURE__*/function () {
|
|
|
136
129
|
*
|
|
137
130
|
* @memberof ChartingApi
|
|
138
131
|
*/
|
|
139
|
-
|
|
140
132
|
}, {
|
|
141
133
|
key: "unHighlight",
|
|
142
134
|
value: function unHighlight() {
|
|
143
135
|
this.charting.chart.unHighlight();
|
|
144
136
|
}
|
|
145
137
|
}]);
|
|
146
|
-
|
|
147
138
|
return ChartingApi;
|
|
148
139
|
}();
|
|
149
|
-
|
|
150
140
|
exports.default = ChartingApi;
|
|
151
141
|
|
|
152
142
|
/***/ }),
|
|
@@ -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
|
|
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":["ChartingApi","charting","_classCallCheck","_createClass","key","value","highlight","_ref","arguments","length","undefined","xValue","seriesName","chart","unHighlight","exports","default"],"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;;;;;;;;;;;;;;;;ICjEMA,WAAW;EAGb,SAAAA,YAAYC,QAAQ;IAAAC,eAAA,OAAAF,WAAA;IAChB,IAAI,CAACC,QAAQ,GAAGA,QAAQ;EAC5B;EAEA;;;;;EAAAE,YAAA,CAAAH,WAAA;IAAAI,GAAA;IAAAC,KAAA,EAKA,SAAAC,UAAA,EAAwE;MAAA,IAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAA9B;UAAEG,MAAM,EAAE,EAAE;UAAEC,UAAU,EAAE;QAAE,CAAE;QAA5DD,MAAM,GAAAJ,IAAA,CAANI,MAAM;QAAEC,UAAU,GAAAL,IAAA,CAAVK,UAAU;MAC1B,IAAI,CAACX,QAAQ,CAACY,KAAK,CAACP,SAAS,CAACK,MAAM,EAAEC,UAAU,CAAC;IACrD;IAEA;;;;;EAAA;IAAAR,GAAA;IAAAC,KAAA,EAKA,SAAAS,YAAA,EAAW;MACP,IAAI,CAACb,QAAQ,CAACY,KAAK,CAACC,WAAW,EAAE;IACrC;EAAC;EAAA,OAAAd,WAAA;AAAA;AAGLe,OAAA,CAAAC,OAAA,GAAehB,WAAW,C;;;;;;;AC3C1B,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 = 15);\n","interface 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}\nclass ChartingApi {\n charting;\n\n constructor(charting) {\n this.charting = charting;\n }\n\n /**\n * Allows users to programmatically highlight a point on the chart\n *\n * @memberof ChartingApi\n */\n highlight({ xValue, seriesName }: Point = { xValue: '', seriesName: '' }) {\n this.charting.chart.highlight(xValue, seriesName);\n }\n\n /**\n * Allows users to programmatically unhighlight all points on the chart\n *\n * @memberof ChartingApi\n */\n unHighlight() {\n this.charting.chart.unHighlight();\n }\n}\n\nexport default ChartingApi;\n","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");"],"sourceRoot":""}
|
package/common/EventsDoc.js
CHANGED
|
@@ -227,31 +227,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
227
227
|
|
|
228
228
|
|
|
229
229
|
|
|
230
|
-
|
|
231
230
|
function _createSuper(Derived) {
|
|
232
231
|
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
233
|
-
|
|
234
232
|
return function _createSuperInternal() {
|
|
235
233
|
var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived),
|
|
236
|
-
|
|
237
|
-
|
|
234
|
+
result;
|
|
238
235
|
if (hasNativeReflectConstruct) {
|
|
239
236
|
var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor;
|
|
240
|
-
|
|
241
237
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
242
238
|
} else {
|
|
243
239
|
result = Super.apply(this, arguments);
|
|
244
240
|
}
|
|
245
|
-
|
|
246
241
|
return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result);
|
|
247
242
|
};
|
|
248
243
|
}
|
|
249
|
-
|
|
250
244
|
function _isNativeReflectConstruct() {
|
|
251
245
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
252
246
|
if (Reflect.construct.sham) return false;
|
|
253
247
|
if (typeof Proxy === "function") return true;
|
|
254
|
-
|
|
255
248
|
try {
|
|
256
249
|
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
257
250
|
return true;
|
|
@@ -259,38 +252,25 @@ function _isNativeReflectConstruct() {
|
|
|
259
252
|
return false;
|
|
260
253
|
}
|
|
261
254
|
}
|
|
262
|
-
|
|
263
255
|
function ownKeys(object, enumerableOnly) {
|
|
264
256
|
var keys = Object.keys(object);
|
|
265
|
-
|
|
266
257
|
if (Object.getOwnPropertySymbols) {
|
|
267
258
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
268
|
-
|
|
259
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
269
260
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
270
|
-
});
|
|
271
|
-
keys.push.apply(keys, symbols);
|
|
261
|
+
})), keys.push.apply(keys, symbols);
|
|
272
262
|
}
|
|
273
|
-
|
|
274
263
|
return keys;
|
|
275
264
|
}
|
|
276
|
-
|
|
277
265
|
function _objectSpread(target) {
|
|
278
266
|
for (var i = 1; i < arguments.length; i++) {
|
|
279
|
-
var source = arguments[i]
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
286
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
287
|
-
} else {
|
|
288
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
289
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
290
|
-
});
|
|
291
|
-
}
|
|
267
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
268
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
269
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(target, key, source[key]);
|
|
270
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
271
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
272
|
+
});
|
|
292
273
|
}
|
|
293
|
-
|
|
294
274
|
return target;
|
|
295
275
|
}
|
|
296
276
|
/* eslint-disable react/prop-types */
|
|
@@ -300,8 +280,6 @@ function _objectSpread(target) {
|
|
|
300
280
|
|
|
301
281
|
|
|
302
282
|
|
|
303
|
-
|
|
304
|
-
|
|
305
283
|
var EventTester = styled_components__WEBPACK_IMPORTED_MODULE_13___default.a.div.withConfig({
|
|
306
284
|
displayName: "EventsDoc__EventTester",
|
|
307
285
|
componentId: "hb6mi7-0"
|
|
@@ -314,10 +292,9 @@ var EventName = styled_components__WEBPACK_IMPORTED_MODULE_13___default.a.div.wi
|
|
|
314
292
|
displayName: "EventsDoc__EventName",
|
|
315
293
|
componentId: "hb6mi7-2"
|
|
316
294
|
})(["color:#5ca300;padding-bottom:5px;"]);
|
|
317
|
-
|
|
318
295
|
var EventItem = function EventItem(_ref) {
|
|
319
296
|
var name = _ref.name,
|
|
320
|
-
|
|
297
|
+
desc = _ref.desc;
|
|
321
298
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(Event, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(EventName, null, name), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_ui_Markdown__WEBPACK_IMPORTED_MODULE_11___default.a, {
|
|
322
299
|
style: {
|
|
323
300
|
marginLeft: 40
|
|
@@ -325,12 +302,10 @@ var EventItem = function EventItem(_ref) {
|
|
|
325
302
|
text: desc
|
|
326
303
|
}));
|
|
327
304
|
};
|
|
328
|
-
|
|
329
305
|
EventItem.propTypes = {
|
|
330
306
|
name: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string,
|
|
331
307
|
desc: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string
|
|
332
308
|
};
|
|
333
|
-
|
|
334
309
|
var EventsDesc = function EventsDesc(_ref2) {
|
|
335
310
|
var events = _ref2.events;
|
|
336
311
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", null, events.length === 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_ui_Heading__WEBPACK_IMPORTED_MODULE_10___default.a, {
|
|
@@ -343,27 +318,22 @@ var EventsDesc = function EventsDesc(_ref2) {
|
|
|
343
318
|
}, e));
|
|
344
319
|
}));
|
|
345
320
|
};
|
|
346
|
-
|
|
347
321
|
EventsDesc.propTypes = {
|
|
348
322
|
events: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.array.isRequired
|
|
349
323
|
};
|
|
350
|
-
|
|
351
324
|
var VisualiationExample = function VisualiationExample(_ref3) {
|
|
352
325
|
var event = _ref3.event,
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
326
|
+
Visualization = _ref3.Visualization,
|
|
327
|
+
vizProps = _ref3.vizProps,
|
|
328
|
+
onPointClick = _ref3.onPointClick,
|
|
329
|
+
onPointMouseOver = _ref3.onPointMouseOver,
|
|
330
|
+
onPointMouseOut = _ref3.onPointMouseOut,
|
|
331
|
+
onLegendClick = _ref3.onLegendClick,
|
|
332
|
+
onRangeSelect = _ref3.onRangeSelect;
|
|
361
333
|
var eventToDisplay = _objectSpread({}, event);
|
|
362
|
-
|
|
363
334
|
if (eventToDisplay.originalEvent != null) {
|
|
364
335
|
eventToDisplay.originalEvent = '...Original Event instance...';
|
|
365
336
|
}
|
|
366
|
-
|
|
367
337
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(EventTester, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_ui_Heading__WEBPACK_IMPORTED_MODULE_10___default.a, {
|
|
368
338
|
level: 4
|
|
369
339
|
}, "Test Visualization"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(Visualization, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_7___default()({}, vizProps, {
|
|
@@ -379,44 +349,35 @@ var VisualiationExample = function VisualiationExample(_ref3) {
|
|
|
379
349
|
expandChildren: true
|
|
380
350
|
})));
|
|
381
351
|
};
|
|
382
|
-
|
|
383
352
|
VisualiationExample.propTypes = {
|
|
384
353
|
event: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object,
|
|
385
354
|
Visualization: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.any,
|
|
386
355
|
vizProps: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object
|
|
387
356
|
};
|
|
388
|
-
|
|
389
357
|
var EventsDoc = /*#__PURE__*/function (_Component) {
|
|
390
358
|
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(EventsDoc, _Component);
|
|
391
|
-
|
|
392
359
|
var _super = _createSuper(EventsDoc);
|
|
393
|
-
|
|
394
360
|
function EventsDoc(props, context) {
|
|
395
361
|
var _this;
|
|
396
|
-
|
|
397
362
|
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, EventsDoc);
|
|
398
|
-
|
|
399
363
|
_this = _super.call(this, props, context);
|
|
400
|
-
|
|
401
364
|
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "handleEvent", function (e) {
|
|
402
365
|
_this.setState({
|
|
403
366
|
e: e
|
|
404
367
|
});
|
|
405
368
|
});
|
|
406
|
-
|
|
407
369
|
_this.state = {
|
|
408
370
|
e: null
|
|
409
371
|
};
|
|
410
372
|
return _this;
|
|
411
373
|
}
|
|
412
|
-
|
|
413
374
|
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(EventsDoc, [{
|
|
414
375
|
key: "render",
|
|
415
376
|
value: function render() {
|
|
416
377
|
var _this$props = this.props,
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
378
|
+
Visualization = _this$props.Visualization,
|
|
379
|
+
events = _this$props.events,
|
|
380
|
+
vizProps = _this$props.vizProps;
|
|
420
381
|
var e = this.state.e;
|
|
421
382
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(EventsDesc, {
|
|
422
383
|
events: events
|
|
@@ -432,10 +393,8 @@ var EventsDoc = /*#__PURE__*/function (_Component) {
|
|
|
432
393
|
}));
|
|
433
394
|
}
|
|
434
395
|
}]);
|
|
435
|
-
|
|
436
396
|
return EventsDoc;
|
|
437
397
|
}(react__WEBPACK_IMPORTED_MODULE_8__["Component"]);
|
|
438
|
-
|
|
439
398
|
EventsDoc.propTypes = {
|
|
440
399
|
events: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.array,
|
|
441
400
|
Visualization: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.any,
|
package/common/EventsDoc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/assertThisInitialized\"","webpack:///external \"styled-components\"","webpack:///external \"@splunk/react-ui/Heading\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\"","webpack:///external \"@splunk/react-ui/Markdown\"","webpack:///external \"@splunk/react-ui/JSONTree\"","webpack:///./src/common/EventsDoc.jsx"],"names":["EventTester","styled","Event","EventName","EventItem","name","desc","marginLeft","T","string","EventsDesc","events","e","isRequired","VisualiationExample","event","Visualization","vizProps","onPointClick","onPointMouseOver","onPointMouseOut","onLegendClick","onRangeSelect","eventToDisplay","object","EventsDoc","handleEvent","Component"],"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,kE;;;;;;ACAA,yE;;;;;;;ACAA,8C;;;;;;ACAA,qD;;;;;;ACAA,kE;;;;;;ACAA,+D;;;;;;ACAA,kE;;;;;;;ACAA,2D;;;;;;ACAA,4D;;;;;;ACAA,6E;;;;;;ACAA,sD;;;;;;;;;;;;ACAA,sD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,IAAMA,WAAW,GAAGC,yDAAM,CAAT,GAAGA,CAAH,UAAGA,CAAH;AAAA;AAAA;AAAA,CAAGA,EAAH,CAAjB,kBAAiB,CAAGA,CAApB;AAIA,IAAMC,KAAK,GAAGD,yDAAM,CAAT,GAAGA,CAAH,UAAGA,CAAH;AAAA;AAAA;AAAA,CAAGA,EAAH,CAAX,kBAAW,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UAAQ,EAAET,iDAAC,CAACgB;AAHM,CAAtBC;AAMA,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 = 25);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/assertThisInitialized\");","module.exports = require(\"styled-components\");","module.exports = require(\"@splunk/react-ui/Heading\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");","module.exports = require(\"@splunk/react-ui/Markdown\");","module.exports = require(\"@splunk/react-ui/JSONTree\");","/* eslint-disable react/prop-types */\nimport React, { Component } 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 {events.length === 0 ? <Heading level={4}>No Events</Heading> : <Heading level={4}>Events</Heading>}\n {events.map(e => (\n <EventItem key={e.name} {...e} />\n ))}\n </div>\n);\n\nEventsDesc.propTypes = {\n events: T.array.isRequired,\n};\n\nconst VisualiationExample = ({\n event,\n Visualization,\n vizProps,\n onPointClick,\n onPointMouseOver,\n onPointMouseOut,\n onLegendClick,\n onRangeSelect,\n}) => {\n const eventToDisplay = {\n ...event,\n };\n if (eventToDisplay.originalEvent != null) {\n eventToDisplay.originalEvent = '...Original Event instance...';\n }\n return (\n <div>\n <EventTester>\n <Heading level={4}>Test Visualization</Heading>\n <Visualization\n {...vizProps}\n onPointClick={onPointClick}\n onPointMouseOver={onPointMouseOver}\n onPointMouseOut={onPointMouseOut}\n onLegendClick={onLegendClick}\n onRangeSelect={onRangeSelect}\n />\n </EventTester>\n <Heading level={4}>Event Monitor</Heading>\n <div>\n <JSONTree json={eventToDisplay} expandChildren />\n </div>\n </div>\n );\n};\n\nVisualiationExample.propTypes = {\n event: T.object,\n Visualization: T.any,\n vizProps: 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 const { Visualization, events, vizProps } = this.props;\n const { e } = this.state;\n return (\n <div>\n <EventsDesc events={events} />\n {Visualization && (\n <VisualiationExample\n event={e}\n Visualization={Visualization}\n vizProps={vizProps}\n onPointClick={this.handleEvent}\n onPointMouseOver={this.handleEvent}\n onPointMouseOut={this.handleEvent}\n onLegendClick={this.handleEvent}\n onRangeSelect={this.handleEvent}\n />\n )}\n </div>\n );\n }\n}\n\nEventsDoc.propTypes = {\n events: T.array,\n Visualization: T.any,\n vizProps: T.object,\n};\n\nexport default EventsDoc;\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/assertThisInitialized\"","webpack:///external \"styled-components\"","webpack:///external \"@splunk/react-ui/Heading\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\"","webpack:///external \"@splunk/react-ui/Markdown\"","webpack:///external \"@splunk/react-ui/JSONTree\"","webpack:///./src/common/EventsDoc.jsx"],"names":["EventTester","styled","div","withConfig","displayName","componentId","Event","EventName","EventItem","_ref","name","desc","React","createElement","Markdown","style","marginLeft","text","propTypes","T","string","EventsDesc","_ref2","events","length","Heading","level","map","e","_extends","key","array","isRequired","VisualiationExample","_ref3","event","Visualization","vizProps","onPointClick","onPointMouseOver","onPointMouseOut","onLegendClick","onRangeSelect","eventToDisplay","_objectSpread","originalEvent","JSONTree","json","expandChildren","object","any","EventsDoc","_Component","_inherits","_super","_createSuper","props","context","_this","_classCallCheck","call","_defineProperty","_assertThisInitialized","setState","state","_createClass","value","render","_this$props","handleEvent","Component"],"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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;IACP,CAAC;IAAC,OAAA8B,KAAA;EACN;EAACO,yEAAA,CAAAd,SAAA;IAAArB,GAAA;IAAAoC,KAAA,EAQD,SAAAC,OAAA,EAAS;MAAA,IAAAC,WAAA,GACuC,IAAI,CAACZ,KAAK;QAA9CpB,aAAa,GAAAgC,WAAA,CAAbhC,aAAa;QAAEb,MAAM,GAAA6C,WAAA,CAAN7C,MAAM;QAAEc,QAAQ,GAAA+B,WAAA,CAAR/B,QAAQ;MAAA,IAC/BT,CAAC,GAAK,IAAI,CAACoC,KAAK,CAAhBpC,CAAC;MACT,oBACIhB,4CAAA,CAAAC,aAAA,2BACID,4CAAA,CAAAC,aAAA,CAACQ,UAAU;QAACE,MAAM,EAAEA;MAAO,EAAG,EAC7Ba,aAAa,iBACVxB,4CAAA,CAAAC,aAAA,CAACoB,mBAAmB;QAChBE,KAAK,EAAEP,CAAE;QACTQ,aAAa,EAAEA,aAAc;QAC7BC,QAAQ,EAAEA,QAAS;QACnBC,YAAY,EAAE,IAAI,CAAC+B,WAAY;QAC/B9B,gBAAgB,EAAE,IAAI,CAAC8B,WAAY;QACnC7B,eAAe,EAAE,IAAI,CAAC6B,WAAY;QAClC5B,aAAa,EAAE,IAAI,CAAC4B,WAAY;QAChC3B,aAAa,EAAE,IAAI,CAAC2B;MAAY,EAEvC,CACC;IAEd;EAAC;EAAA,OAAAlB,SAAA;AAAA,EAlCmBmB,+CAAS;AAqCjCnB,SAAS,CAACjC,SAAS,GAAG;EAClBK,MAAM,EAAEJ,iDAAC,CAACY,KAAK;EACfK,aAAa,EAAEjB,iDAAC,CAAC+B,GAAG;EACpBb,QAAQ,EAAElB,iDAAC,CAAC8B;AAChB,CAAC;AAEcE,wEAAS,E","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 = 25);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/assertThisInitialized\");","module.exports = require(\"styled-components\");","module.exports = require(\"@splunk/react-ui/Heading\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");","module.exports = require(\"@splunk/react-ui/Markdown\");","module.exports = require(\"@splunk/react-ui/JSONTree\");","/* eslint-disable react/prop-types */\nimport React, { Component } 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 {events.length === 0 ? <Heading level={4}>No Events</Heading> : <Heading level={4}>Events</Heading>}\n {events.map(e => (\n <EventItem key={e.name} {...e} />\n ))}\n </div>\n);\n\nEventsDesc.propTypes = {\n events: T.array.isRequired,\n};\n\nconst VisualiationExample = ({\n event,\n Visualization,\n vizProps,\n onPointClick,\n onPointMouseOver,\n onPointMouseOut,\n onLegendClick,\n onRangeSelect,\n}) => {\n const eventToDisplay = {\n ...event,\n };\n if (eventToDisplay.originalEvent != null) {\n eventToDisplay.originalEvent = '...Original Event instance...';\n }\n return (\n <div>\n <EventTester>\n <Heading level={4}>Test Visualization</Heading>\n <Visualization\n {...vizProps}\n onPointClick={onPointClick}\n onPointMouseOver={onPointMouseOver}\n onPointMouseOut={onPointMouseOut}\n onLegendClick={onLegendClick}\n onRangeSelect={onRangeSelect}\n />\n </EventTester>\n <Heading level={4}>Event Monitor</Heading>\n <div>\n <JSONTree json={eventToDisplay} expandChildren />\n </div>\n </div>\n );\n};\n\nVisualiationExample.propTypes = {\n event: T.object,\n Visualization: T.any,\n vizProps: 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 const { Visualization, events, vizProps } = this.props;\n const { e } = this.state;\n return (\n <div>\n <EventsDesc events={events} />\n {Visualization && (\n <VisualiationExample\n event={e}\n Visualization={Visualization}\n vizProps={vizProps}\n onPointClick={this.handleEvent}\n onPointMouseOver={this.handleEvent}\n onPointMouseOut={this.handleEvent}\n onLegendClick={this.handleEvent}\n onRangeSelect={this.handleEvent}\n />\n )}\n </div>\n );\n }\n}\n\nEventsDoc.propTypes = {\n events: T.array,\n Visualization: T.any,\n vizProps: T.object,\n};\n\nexport default EventsDoc;\n"],"sourceRoot":""}
|
package/common/OptionsDoc.js
CHANGED
|
@@ -163,23 +163,20 @@ var PairText = styled_components__WEBPACK_IMPORTED_MODULE_5___default.a.span.wit
|
|
|
163
163
|
displayName: "OptionsDoc__PairText",
|
|
164
164
|
componentId: "w7bvh2-4"
|
|
165
165
|
})([""]);
|
|
166
|
-
|
|
167
166
|
var Pair = function Pair(_ref) {
|
|
168
167
|
var title = _ref.title,
|
|
169
|
-
|
|
168
|
+
text = _ref.text;
|
|
170
169
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(PairContainer, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(PairTitle, null, "".concat(title, ":")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(PairText, null, text));
|
|
171
170
|
};
|
|
172
|
-
|
|
173
171
|
Pair.propTypes = {
|
|
174
172
|
title: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
175
173
|
text: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string
|
|
176
174
|
};
|
|
177
|
-
|
|
178
175
|
var OptionItem = function OptionItem(_ref2) {
|
|
179
176
|
var name = _ref2.name,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
177
|
+
type = _ref2.type,
|
|
178
|
+
desc = _ref2.desc,
|
|
179
|
+
defaultValue = _ref2.defaultValue;
|
|
183
180
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Option, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(OptionName, null, name), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_splunk_react_ui_Markdown__WEBPACK_IMPORTED_MODULE_4___default.a, {
|
|
184
181
|
style: {
|
|
185
182
|
marginLeft: 40
|
|
@@ -193,17 +190,15 @@ var OptionItem = function OptionItem(_ref2) {
|
|
|
193
190
|
text: defaultValue
|
|
194
191
|
}));
|
|
195
192
|
};
|
|
196
|
-
|
|
197
193
|
OptionItem.propTypes = {
|
|
198
194
|
name: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
199
195
|
type: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
200
196
|
desc: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
|
|
201
197
|
defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string
|
|
202
198
|
};
|
|
203
|
-
|
|
204
199
|
var OptionsDoc = function OptionsDoc(_ref3) {
|
|
205
200
|
var options = _ref3.options,
|
|
206
|
-
|
|
201
|
+
description = _ref3.description;
|
|
207
202
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("div", null, options.length === 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_splunk_react_ui_Heading__WEBPACK_IMPORTED_MODULE_3___default.a, {
|
|
208
203
|
level: 4
|
|
209
204
|
}, " No Options") : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_splunk_react_ui_Heading__WEBPACK_IMPORTED_MODULE_3___default.a, {
|
|
@@ -216,7 +211,6 @@ var OptionsDoc = function OptionsDoc(_ref3) {
|
|
|
216
211
|
}, d));
|
|
217
212
|
}));
|
|
218
213
|
};
|
|
219
|
-
|
|
220
214
|
OptionsDoc.propTypes = {
|
|
221
215
|
options: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.array.isRequired,
|
|
222
216
|
description: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string
|