@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
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///external \"@splunk/visualizations-shared/SanitizeProps\"","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"styled-components\"","webpack:///external \"lodash/omit\"","webpack:///external \"lodash/isEmpty\"","webpack:///external \"@splunk/visualizations/common/utils/singleValueUtils\"","webpack:///./src/utils/propUtils.js","webpack:///external \"@splunk/themes/variables\"","webpack:///external \"@splunk/themes/pick\"","webpack:///external \"@splunk/visualizations-shared/colorConstants\"","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualizations-shared/Message\"","webpack:///external \"@splunk/visualizations/SingleValueBasic\"","webpack:///external \"lodash/pick\"","webpack:///external \"@splunk/visualizations-shared/style\"","webpack:///external \"@splunk/visualizations-shared/SizeAwareWrapper\"","webpack:///./src/visualizations/SingleValueRadial/src/components/RadialGraph.jsx","webpack:///./src/visualizations/SingleValueRadial/src/utils/displayUtils.js","webpack:///./src/visualizations/SingleValueRadial/src/components/RadialLayout.jsx","webpack:///./src/visualizations/SingleValueRadial/src/components/SingleValueRadial.jsx","webpack:///./src/visualizations/SingleValueRadial/SingleValueRadial.jsx"],"names":["propsConvert","newProps","Object","key","propsMapping","oldProps","propsDeprecate","omit","RadialGraph","progress","size","strokeWidth","backgroundColor","RADIAL_BACKGROUND_COLOR","progressColor","RADIAL_STROKE_COLOR","normalizedSize","normalizedRadius","circumference","Math","bgCircleOffset","progress80","progressWidth","strokeDashoffset","T","string","VALID_TREND_POSITIONS","MAJOR_FONT_THRESHOLD","TREND_FONT_THRESHOLD","DEFAULT_RADIAL_STROKE_WIDTH","SMALL_RADIAL_STROKE_WIDTH","getRadialColors","backgroundEnabled","getGraphColors","defaultColors","customColorFormatter","background","lighten","stroke","darken","getGraphSize","width","height","underLabel","getValueContentSize","graphSize","radialStrokeWidth","diameter","getRadialStrokeWidth","isValidPosition","computeTrendIndicatorPosition","trendIndicatorPosition","majorTextFontSize","trendTextFontSize","position","showTrendPositionStandard","showTrendIndicator","showTrendPositionBelow","showTrendPositionOutside","getRadialProgress","Number","majorValue","PositionDiv","styled","props","Column","Row","Square","UnderLabelContainer","renderIsolateTrend","trendText","trendColor","contentSize","getTrendFontSize","spaceRatio","number","RadialContent","majorColor","majorText","majorValueTitle","trendPosition","unit","unitPosition","underLabelColor","underLabelFontSize","onValueClick","showRadialGraph","radialBackgroundColor","radialStrokeColor","trendComponent","basicSingleValues","radialGraph","underLabelComponent","outsideComponent","belowTrendComponent","textAlign","SingleValueBasic","Container","toDimension","pick","VizStyleWrapper","dataTestKey","SingleValueRadial","style","majorFontSize","majorValueField","trendValue","trendFontSize","numberPrecision","shouldUseThousandSeparators","shouldAbbreviateTrendValue","defaultFontColor","enterprise","dark","variables","light","prisma","defaultBlockFontColor","computeColors","radialColors","handleValueClick","useCallback","handleValueClickCallback","renderVisualization","containerWidth","containerHeight","_","trendDisplay","valueContentSize","getUnderLabelHeight","toRemoveList","value","computeSingleValueContent","contentWidth","contentHeight","smallVizProps","isEmpty","shouldShowTrend","func","withTheme","deltaValue","deltaColor","deltaFontSize","useTrendUnits","useThousandSeparators","deprecatedProps","ReactSingleValueRadial","trendDisplayMode","withSanitizedProps"],"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,yC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AQlC0B,iBAAe,EARmB;AASlCoC,uBAAqB,EATa;AAUlC3D,cAAY,EAAE,wBAAM,CAAE;AAVY,CAAtC6D;AAaeE,oKAAkB,CAAjC,wCAAiC,CAAjC,E","file":"SingleValueRadial.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 = 71);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"@splunk/visualizations-shared/SanitizeProps\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"styled-components\");","module.exports = require(\"lodash/omit\");","module.exports = require(\"lodash/isEmpty\");","module.exports = require(\"@splunk/visualizations/common/utils/singleValueUtils\");","import omit from 'lodash/omit';\n\n/**\n * convert the old props to new props for pure visualization based on propsMapping\n * @param {Object} oldProps props used by react visualizations\n * @param {Object} propsMapping\n * @return {Object} newprops props used by pure visualizations\n */\nexport const propsConvert = (oldProps, propsMapping) => {\n const newProps = {};\n Object.keys(oldProps).forEach(propKey => {\n const key = propsMapping[propKey] || propKey;\n newProps[key] = oldProps[propKey];\n });\n return newProps;\n};\n\n/**\n * omit the deprecated props for pure visualization\n * @param {Object} props props used by react visualizations\n * @param {Array} deprecatedProps\n * @return {Object} newprops props used by pure visualizations\n */\nexport const propsDeprecate = (props, deprecatedProps) => omit(props, deprecatedProps);\n","module.exports = require(\"@splunk/themes/variables\");","module.exports = require(\"@splunk/themes/pick\");","module.exports = require(\"@splunk/visualizations-shared/colorConstants\");","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualizations-shared/Message\");","module.exports = require(\"@splunk/visualizations/SingleValueBasic\");","module.exports = require(\"lodash/pick\");","module.exports = require(\"@splunk/visualizations-shared/style\");","module.exports = require(\"@splunk/visualizations-shared/SizeAwareWrapper\");","// this is a copy of RadialGraph.jsx @ 23.5.0 before the design changes to PureSingleValueRadial were rolled out\nimport React from 'react';\nimport T from 'prop-types';\nimport { RADIAL_BACKGROUND_COLOR, RADIAL_STROKE_COLOR } from '@splunk/visualizations-shared/colorConstants';\n\nconst RadialGraph = ({\n progress,\n size = 200,\n strokeWidth,\n backgroundColor = RADIAL_BACKGROUND_COLOR,\n progressColor = RADIAL_STROKE_COLOR,\n}) => {\n const normalizedSize = size / 2;\n const normalizedRadius = normalizedSize - strokeWidth * 2;\n const circumference = normalizedRadius * 2 * Math.PI;\n const bgCircleOffset = 0.8 * circumference;\n\n const progress80 = (progress / 100) * 80;\n\n const progressWidth = (progress80 / 100) * circumference;\n\n // Offset the start of the circle to a position that makes the arc look evenly spaced\n // with the opening at the bottom\n // We use 80% of a circle (288deg), half on each side of \"0\" (144deg)\n // SVG starts drawing (0deg) at the 3 o'clock position, so add another 90 to offset this (234deg)\n // This means the arc length that we offset is 2 * PI * r * 234/360 or ...\n const strokeDashoffset = circumference * 0.65;\n\n return (\n <svg height={normalizedSize * 2} width={normalizedSize * 2}>\n <g>\n <circle\n data-test=\"background-radial\"\n stroke={backgroundColor}\n fill=\"transparent\"\n strokeWidth={strokeWidth}\n strokeDasharray={`${bgCircleOffset} ${circumference - bgCircleOffset}`}\n style={{ strokeDashoffset }}\n r={normalizedRadius}\n cx={normalizedSize}\n cy={normalizedSize}\n />\n <circle\n data-test=\"progress-radial\"\n stroke={progressColor}\n fill=\"transparent\"\n strokeWidth={strokeWidth}\n strokeDasharray={`${progressWidth} ${circumference - progressWidth}`}\n style={{ strokeDashoffset }}\n r={normalizedRadius}\n cx={normalizedSize}\n cy={normalizedSize}\n />\n </g>\n </svg>\n );\n};\n\nRadialGraph.propTypes = {\n progress: T.number,\n size: T.number,\n strokeWidth: T.number,\n backgroundColor: T.string,\n progressColor: T.string,\n};\n\nRadialGraph.defaultProps = {\n progress: 0,\n strokeWidth: 12,\n};\n\nexport default RadialGraph;\n","// this is a copy of displayUtils.js @ 23.5.0 before the design changes to PureSingleValueRadial were rolled out\nimport { RADIAL_SEVERITY_COLORS } from '@splunk/visualizations-shared/colorConstants';\nimport {\n DEFAULT_FONT,\n getGraphColors,\n lighten,\n darken,\n} from '@splunk/visualizations/common/utils/singleValueUtils';\n\nexport const VALID_TREND_POSITIONS = ['standard', 'below', 'outside'];\nexport const MAJOR_FONT_THRESHOLD = 25;\nexport const TREND_FONT_THRESHOLD = 12;\nexport const DEFAULT_RADIAL_STROKE_WIDTH = 12;\nexport const SMALL_RADIAL_STROKE_WIDTH = 6;\n\n/**\n * Get the colors for a radial graph based on severity\n * @method getRadialColors\n * @param {Object} props\n * @param {Bool} props.backgroundEnabled\n * @param {String} props.backgroundColor\n * @returns {Object} { background, stroke } colors\n */\nexport const getRadialColors = ({ backgroundEnabled, backgroundColor }) =>\n getGraphColors({\n backgroundEnabled,\n backgroundColor,\n defaultColors: RADIAL_SEVERITY_COLORS,\n customColorFormatter: color => ({ background: lighten(color), stroke: darken(color) }),\n });\n\n/**\n * Figure out the diameter of the graph\n * @method getGraphSize\n * @param {Object} props\n * @param {Number} props.width // Width of the container\n * @param {Number} props.height // Height of the container\n * @param {Number} props.underLabel // Underlabel if present\n * @returns {Number} diameter of the graph\n */\nexport const getGraphSize = ({ width, height, underLabel }) => {\n let size = Math.min(width, height);\n\n if (underLabel) {\n size -= DEFAULT_FONT;\n }\n\n return size;\n};\n\n/**\n * Get the maximum size of the container that holds the graph text\n * @method getValueContentSize\n * @param {Object} props\n * @param {Number} props.graphSize\n * @param {Number} props.radialStrokeWidth // Stroke width of the graph\n * @returns {Number} content size for showing major and trend values in radial graph\n */\nexport const getValueContentSize = ({ graphSize, radialStrokeWidth }) => {\n // Account for the graph's stroke width\n const diameter = graphSize - radialStrokeWidth;\n // Use pythagoreum theorum with circle diameter\n // to calculate the size of the sides of the square inside the circle\n return Math.floor(Math.sqrt(diameter ** 2 / 2));\n};\n\n/*\n * @method getRadialStrokeWidth\n * @param {Number} graphSize\n * @returns {Number} radial stroke width\n */\nexport const getRadialStrokeWidth = graphSize =>\n graphSize >= 90 ? DEFAULT_RADIAL_STROKE_WIDTH : SMALL_RADIAL_STROKE_WIDTH;\n\n/*\n * @method isValidPosition\n * @param {String} position\n * @returns {Bool}\n */\nexport const isValidPosition = position => VALID_TREND_POSITIONS.indexOf(position) > -1;\n\n/**\n * Compute the trend indicator position based on font size of major and trend value\n * @method computeTrendIndicatorPosition\n * @param {Object} props\n * @param {String} props.trendIndicatorPosition\n * @param {Number} props.majorTextFontSize\n * @param {Number} props.trendTextFontSize\n * @returns {String} trend indicator position in radial graph\n */\nexport const computeTrendIndicatorPosition = ({\n trendIndicatorPosition,\n majorTextFontSize,\n trendTextFontSize,\n}) => {\n let position = trendIndicatorPosition;\n\n if (!isValidPosition(position)) {\n position = 'standard';\n }\n\n if (\n position !== 'outside' &&\n (trendTextFontSize < TREND_FONT_THRESHOLD || majorTextFontSize < MAJOR_FONT_THRESHOLD)\n ) {\n position = 'below';\n }\n return position;\n};\n\n/*\n * @method showTrendPositionStandard\n * @param {Object} props\n * @param {Bool} props.showTrendIndicator\n * @param {String} props.position\n * @returns {Bool}\n */\nexport const showTrendPositionStandard = ({ showTrendIndicator, position }) =>\n showTrendIndicator && position === 'standard';\n\n/*\n * @method showTrendPositionBelow\n * @param {Object} props\n * @param {Bool} props.showTrendIndicator\n * @param {String} props.position\n * @returns {Bool}\n */\nexport const showTrendPositionBelow = ({ showTrendIndicator, position }) =>\n showTrendIndicator && position === 'below';\n\n/*\n * @method showTrendPositionOutside\n * @param {Object} props\n * @param {Bool} props.showTrendIndicator\n * @param {String} props.position\n * @returns {Bool}\n */\nexport const showTrendPositionOutside = ({ showTrendIndicator, position }) =>\n showTrendIndicator && position === 'outside';\n\n/*\n * todo: need handle max and min\n * @method getRadialProgress\n * @param {Number} majorValue\n * @returns {Number} progress bar in radial graph\n */\nexport const getRadialProgress = majorValue =>\n Number.isNaN(Number(majorValue)) ? 0 : (majorValue / Math.max(majorValue, 100)) * 100;\n","// this is a copy of RadialLayout.jsx @ 23.5.0 before the design changes to PureSingleValueRadial were rolled out\nimport React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport SingleValueBasic, { SingleValueTrendValue } from '@splunk/visualizations/SingleValueBasic';\nimport { getTrendFontSize } from '@splunk/visualizations/common/utils/singleValueUtils';\nimport RadialGraph from './RadialGraph';\nimport {\n showTrendPositionStandard,\n showTrendPositionBelow,\n showTrendPositionOutside,\n} from '../utils/displayUtils';\n\nconst PositionDiv = styled.div`\n position: absolute;\n ${props => (props.bottom ? '' : 'top: 0')};\n bottom: ${props => props.bottom || 0}px;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: ${props => props.align || 'center'};\n justify-content: center;\n`;\n\nconst Column = styled.div`\n display: flex;\n flex-direction: column;\n align-items: ${props => props.align || 'center'};\n justify-content: ${props => props.align || 'center'};\n`;\nconst Row = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n`;\n\nconst Square = styled.div`\n position: relative;\n margin: 0 auto;\n width: ${props => props.size}px;\n height: ${props => props.size}px;\n`;\n\nconst UnderLabelContainer = styled.div`\n color: ${props => props.color};\n margin-top: ${props => (props.size && `-${props.size * 0.1}px`) || 0};\n font-size: ${props => props.size || 12}px;\n`;\n\n/**\n * Render the trend indicator\n * @method renderTrendValue\n * @returns {Object}\n * @private\n */\n\nconst renderIsolateTrend = ({ trendText, trendColor, contentSize }) => {\n const trendTextFontSize = getTrendFontSize({\n width: contentSize / 2,\n height: contentSize / 4,\n trendText,\n spaceRatio: 1,\n });\n\n return (\n <SingleValueTrendValue\n fontSize={trendTextFontSize}\n color={trendColor}\n value={trendText}\n text={trendText}\n />\n );\n};\n\nrenderIsolateTrend.propTypes = {\n trendText: T.string,\n trendColor: T.string,\n contentSize: T.number,\n};\n\nconst RadialContent = ({ ...props }) => {\n const {\n majorColor,\n majorText,\n majorTextFontSize,\n majorValueTitle,\n trendColor,\n trendText,\n trendTextFontSize,\n showTrendIndicator,\n trendPosition,\n unit,\n unitPosition,\n underLabelColor,\n underLabelFontSize,\n underLabel,\n onValueClick,\n contentSize,\n showRadialGraph,\n graphSize,\n progress,\n radialBackgroundColor,\n radialStrokeColor,\n radialStrokeWidth,\n } = props;\n\n // for trend position below and outside\n const trendComponent = renderIsolateTrend({ trendText, trendColor, contentSize });\n\n const basicSingleValues = (\n <SingleValueBasic\n majorColor={majorColor}\n majorText={majorText}\n majorTextFontSize={majorTextFontSize}\n majorValueTitle={majorValueTitle}\n trendColor={trendColor}\n trendText={trendText}\n trendTextFontSize={trendTextFontSize}\n showTrendIndicator={showTrendPositionStandard({ showTrendIndicator, position: trendPosition })}\n unit={unit}\n unitPosition={unitPosition}\n onValueClick={onValueClick}\n />\n );\n const radialGraph = showRadialGraph ? (\n <RadialGraph\n size={graphSize}\n progress={progress}\n backgroundColor={radialBackgroundColor}\n progressColor={radialStrokeColor}\n strokeWidth={radialStrokeWidth}\n />\n ) : null;\n\n const underLabelComponent = underLabel ? (\n <UnderLabelContainer data-test=\"underLabel\" color={underLabelColor} size={underLabelFontSize}>\n {underLabel}\n </UnderLabelContainer>\n ) : null;\n\n const outsideComponent = showTrendPositionOutside({ showTrendIndicator, position: trendPosition }) ? (\n <Column align=\"end\" data-test=\"trend-position-outside\">\n {trendComponent}\n {underLabelComponent}\n </Column>\n ) : null;\n\n const belowTrendComponent = showTrendPositionBelow({ showTrendIndicator, position: trendPosition }) ? (\n <PositionDiv\n data-test=\"trend-position-below\"\n align=\"flex-end\"\n bottom={graphSize * 0.1}\n style={{ textAlign: 'center' }}\n >\n {trendComponent}\n </PositionDiv>\n ) : null;\n\n return (\n <Row>\n <Column>\n <Square size={graphSize}>\n {radialGraph}\n {belowTrendComponent}\n <PositionDiv>{basicSingleValues}</PositionDiv>\n </Square>\n {trendPosition !== 'outside' && underLabelComponent}\n </Column>\n {outsideComponent}\n </Row>\n );\n};\n\nRadialContent.propTypes = {\n ...SingleValueBasic.propTypes,\n trendPosition: T.string,\n contentSize: T.number,\n showRadialGraph: T.bool,\n graphSize: T.number,\n progress: T.number,\n radialBackgroundColor: T.string,\n radialStrokeColor: T.string,\n radialStrokeWidth: T.number,\n};\n\nexport default RadialContent;\n","// this is a copy of SingleValueRadial.jsx @ 23.5.0 before the design changes to PureSingleValueRadial were rolled out\nimport React, { useCallback } from 'react';\nimport T from 'prop-types';\nimport pickFromTheme from '@splunk/themes/pick';\nimport variables from '@splunk/themes/variables';\nimport styled, { withTheme } from 'styled-components';\nimport pick from 'lodash/pick';\nimport isEmpty from 'lodash/isEmpty';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport { toDimension } from '@splunk/visualizations-shared/style';\nimport SizeAwareWrapper from '@splunk/visualizations-shared/SizeAwareWrapper';\nimport Message from '@splunk/visualizations-shared/Message';\nimport {\n computeColors,\n computeSingleValueContent,\n getUnderLabelHeight,\n shouldShowTrend,\n handleValueClickCallback,\n} from '@splunk/visualizations/common/utils/singleValueUtils';\nimport RadialLayout from './RadialLayout';\nimport {\n getGraphSize,\n getValueContentSize,\n getRadialProgress,\n getRadialStrokeWidth,\n computeTrendIndicatorPosition,\n getRadialColors,\n} from '../utils/displayUtils';\n\nconst Container = styled.div`\n overflow: hidden;\n ${props => toDimension(pick(props, ['width', 'height']))};\n`;\n\nconst VizStyleWrapper = styled.div.attrs(({ dataTestKey }) => ({\n 'data-test': dataTestKey,\n}))`\n display: flex;\n justify-content: center;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background-color: ${props => props.backgroundColor};\n`;\n\nVizStyleWrapper.displayName = 'VizStyleWrapper';\n\nconst SingleValueRadial = ({ ...props }) => {\n const {\n width,\n height = 250,\n style,\n majorFontSize,\n majorValue,\n majorValueField,\n trendValue,\n trendFontSize,\n unitPosition,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n trendIndicatorPosition = 'standard',\n onValueClick,\n } = props;\n\n // calculate colors\n const defaultColors = {\n defaultFontColor: pickFromTheme({\n enterprise: {\n dark: variables.textColor(props),\n light: variables.gray20(props),\n },\n prisma: variables.contentColorActive(props),\n })(props),\n defaultBlockFontColor: pickFromTheme({\n enterprise: variables.white(props),\n prisma: variables.contentColorActive(props),\n })(props),\n };\n const { backgroundEnabled, backgroundColor, majorColor, trendColor, underLabelColor } = computeColors(\n props,\n defaultColors\n );\n\n const radialColors = getRadialColors({ backgroundEnabled, backgroundColor });\n const radialBackgroundColor = props.radialBackgroundColor || radialColors.background;\n const radialStrokeColor = props.radialStrokeColor || radialColors.stroke;\n\n const handleValueClick = useCallback(\n ev => handleValueClickCallback(ev, majorValue, majorValueField, trendValue, onValueClick),\n [onValueClick, majorValue, majorValueField, trendValue]\n );\n\n const renderVisualization = ({ width: containerWidth, height: containerHeight }) => {\n if (containerWidth < 35 || containerHeight < 35) {\n return (\n <Message\n width={containerWidth}\n height={containerHeight}\n message={_('Too small to render content')}\n level=\"info\"\n />\n );\n }\n\n // will update later based on text size\n let { trendDisplay, unit, underLabel } = props;\n let showRadialGraph = true;\n\n // calculate radial graph, major and trend content, and underlabel size\n const graphSize = getGraphSize({ width: containerWidth, height: containerHeight, underLabel });\n const radialStrokeWidth = getRadialStrokeWidth(graphSize);\n const valueContentSize = getValueContentSize({ graphSize, radialStrokeWidth });\n const underLabelFontSize = getUnderLabelHeight(graphSize * 0.1);\n\n // calculate major and trend text\n const toRemoveList = [\n { key: 'underLabel', value: '' },\n { key: 'showRadialGraph', value: false },\n { key: 'trendDisplay', value: 'off' },\n { key: 'unit', value: '' },\n ];\n const {\n majorText,\n trendText,\n majorTextFontSize,\n trendTextFontSize,\n majorValueTitle,\n smallVizProps,\n } = computeSingleValueContent({\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n trendDisplay,\n contentWidth: valueContentSize,\n contentHeight: valueContentSize,\n containerWidth,\n containerHeight,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n toRemoveList,\n });\n if (!isEmpty(smallVizProps)) {\n ({ underLabel, showRadialGraph, trendDisplay, unit } = smallVizProps);\n }\n\n // calculate trend position\n const position = computeTrendIndicatorPosition({\n trendIndicatorPosition,\n majorTextFontSize,\n trendTextFontSize,\n });\n\n // calculate radial\n const progress = getRadialProgress(majorValue);\n\n return (\n <VizStyleWrapper\n backgroundColor={backgroundColor}\n style={style}\n dataTestKey=\"SingleValueRadialWrapper\"\n >\n <RadialLayout\n data-test=\"RadialLayout\"\n majorColor={majorColor}\n majorText={majorText}\n majorTextFontSize={majorTextFontSize}\n majorValueTitle={majorValueTitle}\n trendColor={trendColor}\n trendText={trendText}\n trendTextFontSize={trendTextFontSize}\n showTrendIndicator={shouldShowTrend(trendDisplay)}\n trendPosition={position}\n unit={unit}\n unitPosition={unitPosition}\n underLabelColor={underLabelColor}\n underLabelFontSize={underLabelFontSize}\n underLabel={underLabel}\n onValueClick={handleValueClick}\n contentSize={valueContentSize * 0.7}\n showRadialGraph={showRadialGraph}\n graphSize={graphSize}\n progress={progress}\n radialBackgroundColor={radialBackgroundColor}\n radialStrokeColor={radialStrokeColor}\n radialStrokeWidth={radialStrokeWidth}\n />\n </VizStyleWrapper>\n );\n };\n\n return (\n <Container width={width} height={height}>\n <SizeAwareWrapper>\n {containerDimension => renderVisualization(containerDimension)}\n </SizeAwareWrapper>\n </Container>\n );\n};\n\nSingleValueRadial.propTypes = {\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n style: T.object,\n majorValue: T.oneOfType([T.string, T.number]),\n majorValueField: T.string,\n majorColor: T.string,\n majorFontSize: T.number,\n trendValue: T.oneOfType([T.string, T.number]),\n trendColor: T.string,\n trendFontSize: T.number,\n trendDisplay: T.string,\n trendIndicatorPosition: T.oneOf(['standard', 'below', 'outside']),\n shouldAbbreviateTrendValue: T.bool,\n backgroundColor: T.string,\n unit: T.string,\n unitPosition: T.string,\n underLabel: T.string,\n numberPrecision: T.number,\n shouldUseThousandSeparators: T.bool,\n radialBackgroundColor: T.string,\n radialStrokeColor: T.string,\n onValueClick: T.func,\n};\n\nSingleValueRadial.defaultProps = {\n width: '100%',\n height: 250,\n majorValue: 'N/A',\n majorValueField: '',\n trendDisplay: 'absolute',\n trendIndicatorPosition: 'standard',\n shouldAbbreviateTrendValue: false,\n unitPosition: 'after',\n numberPrecision: 0,\n shouldUseThousandSeparators: true,\n onValueClick: () => {},\n};\n\nexport default withTheme(SingleValueRadial);\n","import React from 'react';\nimport T from 'prop-types';\nimport { withSanitizedProps } from '@splunk/visualizations-shared/SanitizeProps';\nimport PureSingleValueRadial from './src/components/SingleValueRadial';\nimport { propsConvert, propsDeprecate } from '../../utils/propUtils';\n\n// This propsMapping is for React SingleValue to use PureSingleValue.\nconst propsMapping = {\n value: 'majorValue',\n deltaValue: 'trendValue',\n deltaColor: 'trendColor',\n deltaFontSize: 'trendFontSize',\n useTrendUnits: 'shouldAbbreviateTrendValue',\n useThousandSeparators: 'shouldUseThousandSeparators',\n};\n\nconst deprecatedProps = ['showTrendIndicator', 'trendDisplayMode'];\n\nconst ReactSingleValueRadial = ({ ...props }) => {\n let newProps = propsConvert(props, propsMapping);\n // change props\n const trendDisplay = newProps.showTrendIndicator ? newProps.trendDisplayMode : 'off';\n newProps = {\n ...propsDeprecate(newProps, deprecatedProps),\n trendDisplay,\n };\n return <PureSingleValueRadial {...newProps} />;\n};\n\nReactSingleValueRadial.propTypes = {\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n style: T.object,\n value: T.oneOfType([T.string, T.number]),\n majorColor: T.string,\n majorFontSize: T.number,\n deltaValue: T.oneOfType([T.string, T.number]),\n deltaColor: T.string,\n deltaFontSize: T.number,\n trendDisplayMode: T.string,\n trendIndicatorPosition: T.oneOf(['standard', 'below', 'outside']),\n useTrendUnits: T.bool,\n showTrendIndicator: T.bool,\n backgroundColor: T.string,\n unit: T.string,\n unitPosition: T.string,\n underLabel: T.string,\n numberPrecision: T.number,\n useThousandSeparators: T.bool,\n radialBackgroundColor: T.string,\n radialStrokeColor: T.string,\n onValueClick: T.func,\n};\n\nReactSingleValueRadial.defaultProps = {\n width: '100%',\n height: 250,\n trendDisplayMode: 'absolute',\n trendIndicatorPosition: 'standard',\n useTrendUnits: false,\n showTrendIndicator: true,\n unitPosition: 'after',\n numberPrecision: 0,\n useThousandSeparators: true,\n onValueClick: () => {},\n};\n\nexport default withSanitizedProps(ReactSingleValueRadial);\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///external \"@splunk/visualizations-shared/SanitizeProps\"","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"styled-components\"","webpack:///external \"lodash/omit\"","webpack:///external \"lodash/isEmpty\"","webpack:///external \"@splunk/visualizations/common/utils/singleValueUtils\"","webpack:///./src/utils/propUtils.js","webpack:///external \"@splunk/themes/variables\"","webpack:///external \"@splunk/themes/pick\"","webpack:///external \"@splunk/visualizations-shared/colorConstants\"","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualizations-shared/Message\"","webpack:///external \"@splunk/visualizations/SingleValueBasic\"","webpack:///external \"lodash/pick\"","webpack:///external \"@splunk/visualizations-shared/style\"","webpack:///external \"@splunk/visualizations-shared/SizeAwareWrapper\"","webpack:///./src/visualizations/SingleValueRadial/src/components/RadialGraph.jsx","webpack:///./src/visualizations/SingleValueRadial/src/utils/displayUtils.js","webpack:///./src/visualizations/SingleValueRadial/src/components/RadialLayout.jsx","webpack:///./src/visualizations/SingleValueRadial/src/components/SingleValueRadial.jsx","webpack:///./src/visualizations/SingleValueRadial/SingleValueRadial.jsx"],"names":["propsConvert","oldProps","propsMapping","newProps","Object","keys","forEach","propKey","key","propsDeprecate","props","deprecatedProps","omit","RadialGraph","_ref","progress","_ref$size","size","strokeWidth","_ref$backgroundColor","backgroundColor","RADIAL_BACKGROUND_COLOR","_ref$progressColor","progressColor","RADIAL_STROKE_COLOR","normalizedSize","normalizedRadius","circumference","Math","PI","bgCircleOffset","progress80","progressWidth","strokeDashoffset","React","createElement","height","width","stroke","fill","strokeDasharray","concat","style","r","cx","cy","propTypes","T","number","string","defaultProps","VALID_TREND_POSITIONS","MAJOR_FONT_THRESHOLD","TREND_FONT_THRESHOLD","DEFAULT_RADIAL_STROKE_WIDTH","SMALL_RADIAL_STROKE_WIDTH","getRadialColors","backgroundEnabled","getGraphColors","defaultColors","RADIAL_SEVERITY_COLORS","customColorFormatter","color","background","lighten","darken","getGraphSize","_ref2","underLabel","min","DEFAULT_FONT","getValueContentSize","_ref3","graphSize","radialStrokeWidth","diameter","floor","sqrt","pow","getRadialStrokeWidth","isValidPosition","position","indexOf","computeTrendIndicatorPosition","_ref4","trendIndicatorPosition","majorTextFontSize","trendTextFontSize","showTrendPositionStandard","_ref5","showTrendIndicator","showTrendPositionBelow","_ref6","showTrendPositionOutside","_ref7","getRadialProgress","majorValue","Number","isNaN","max","PositionDiv","styled","div","withConfig","displayName","componentId","bottom","align","Column","Row","Square","UnderLabelContainer","renderIsolateTrend","trendText","trendColor","contentSize","getTrendFontSize","spaceRatio","SingleValueTrendValue","fontSize","value","text","RadialContent","_extends","majorColor","majorText","majorValueTitle","trendPosition","unit","unitPosition","underLabelColor","underLabelFontSize","onValueClick","showRadialGraph","radialBackgroundColor","radialStrokeColor","trendComponent","basicSingleValues","SingleValueBasic","radialGraph","underLabelComponent","outsideComponent","belowTrendComponent","textAlign","_objectSpread","bool","Container","toDimension","pick","VizStyleWrapper","attrs","dataTestKey","SingleValueRadial","_props$height","majorFontSize","majorValueField","trendValue","trendFontSize","numberPrecision","shouldUseThousandSeparators","shouldAbbreviateTrendValue","_props$trendIndicator","defaultFontColor","pickFromTheme","enterprise","dark","variables","textColor","light","gray20","prisma","contentColorActive","defaultBlockFontColor","white","_computeColors","computeColors","radialColors","handleValueClick","useCallback","ev","handleValueClickCallback","renderVisualization","containerWidth","containerHeight","Message","message","_","level","trendDisplay","valueContentSize","getUnderLabelHeight","toRemoveList","_computeSingleValueCo","computeSingleValueContent","contentWidth","contentHeight","smallVizProps","isEmpty","RadialLayout","shouldShowTrend","SizeAwareWrapper","containerDimension","oneOfType","object","oneOf","func","withTheme","deltaValue","deltaColor","deltaFontSize","useTrendUnits","useThousandSeparators","ReactSingleValueRadial","trendDisplayMode","PureSingleValueRadial","withSanitizedProps"],"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,wE;;;;;;ACAA,2D;;;;;;;ACAA,kE;;;;;;ACAA,8C;;;;;;ACAA,wC;;;;;;;;;;;;;;;ACAA,2C;;;;;;ACAA,iF;;;;;;;ACAA;AAAA;AAAA;AAAA;AAA+B;;AAE/B;AACA;AACA;AACA;AACA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AiB,EAAExF,6BAAC,CAACE,MAAM;EAC3BmF,YAAY,EAAErF,6BAAC,CAAC8J;AACpB,CAAC;AAEDO,wCAAsB,CAAClK,YAAY,GAAG;EAClCb,KAAK,EAAE,MAAM;EACbD,MAAM,EAAE,GAAG;EACXiL,gBAAgB,EAAE,UAAU;EAC5BhI,sBAAsB,EAAE,UAAU;EAClC6H,aAAa,EAAE,KAAK;EACpBxH,kBAAkB,EAAE,IAAI;EACxBuC,YAAY,EAAE,OAAO;EACrB6B,eAAe,EAAE,CAAC;EAClBqD,qBAAqB,EAAE,IAAI;EAC3B/E,YAAY,EAAE,SAAAA,aAAA,EAAM,CAAC;AACzB,CAAC;AAEcmF,oKAAkB,CAACH,wCAAsB,CAAC,E","file":"SingleValueRadial.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 = 71);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"@splunk/visualizations-shared/SanitizeProps\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"styled-components\");","module.exports = require(\"lodash/omit\");","module.exports = require(\"lodash/isEmpty\");","module.exports = require(\"@splunk/visualizations/common/utils/singleValueUtils\");","import omit from 'lodash/omit';\n\n/**\n * convert the old props to new props for pure visualization based on propsMapping\n * @param {Object} oldProps props used by react visualizations\n * @param {Object} propsMapping\n * @return {Object} newprops props used by pure visualizations\n */\nexport const propsConvert = (oldProps, propsMapping) => {\n const newProps = {};\n Object.keys(oldProps).forEach(propKey => {\n const key = propsMapping[propKey] || propKey;\n newProps[key] = oldProps[propKey];\n });\n return newProps;\n};\n\n/**\n * omit the deprecated props for pure visualization\n * @param {Object} props props used by react visualizations\n * @param {Array} deprecatedProps\n * @return {Object} newprops props used by pure visualizations\n */\nexport const propsDeprecate = (props, deprecatedProps) => omit(props, deprecatedProps);\n","module.exports = require(\"@splunk/themes/variables\");","module.exports = require(\"@splunk/themes/pick\");","module.exports = require(\"@splunk/visualizations-shared/colorConstants\");","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualizations-shared/Message\");","module.exports = require(\"@splunk/visualizations/SingleValueBasic\");","module.exports = require(\"lodash/pick\");","module.exports = require(\"@splunk/visualizations-shared/style\");","module.exports = require(\"@splunk/visualizations-shared/SizeAwareWrapper\");","// this is a copy of RadialGraph.jsx @ 23.5.0 before the design changes to PureSingleValueRadial were rolled out\nimport React from 'react';\nimport T from 'prop-types';\nimport { RADIAL_BACKGROUND_COLOR, RADIAL_STROKE_COLOR } from '@splunk/visualizations-shared/colorConstants';\n\nconst RadialGraph = ({\n progress,\n size = 200,\n strokeWidth,\n backgroundColor = RADIAL_BACKGROUND_COLOR,\n progressColor = RADIAL_STROKE_COLOR,\n}) => {\n const normalizedSize = size / 2;\n const normalizedRadius = normalizedSize - strokeWidth * 2;\n const circumference = normalizedRadius * 2 * Math.PI;\n const bgCircleOffset = 0.8 * circumference;\n\n const progress80 = (progress / 100) * 80;\n\n const progressWidth = (progress80 / 100) * circumference;\n\n // Offset the start of the circle to a position that makes the arc look evenly spaced\n // with the opening at the bottom\n // We use 80% of a circle (288deg), half on each side of \"0\" (144deg)\n // SVG starts drawing (0deg) at the 3 o'clock position, so add another 90 to offset this (234deg)\n // This means the arc length that we offset is 2 * PI * r * 234/360 or ...\n const strokeDashoffset = circumference * 0.65;\n\n return (\n <svg height={normalizedSize * 2} width={normalizedSize * 2}>\n <g>\n <circle\n data-test=\"background-radial\"\n stroke={backgroundColor}\n fill=\"transparent\"\n strokeWidth={strokeWidth}\n strokeDasharray={`${bgCircleOffset} ${circumference - bgCircleOffset}`}\n style={{ strokeDashoffset }}\n r={normalizedRadius}\n cx={normalizedSize}\n cy={normalizedSize}\n />\n <circle\n data-test=\"progress-radial\"\n stroke={progressColor}\n fill=\"transparent\"\n strokeWidth={strokeWidth}\n strokeDasharray={`${progressWidth} ${circumference - progressWidth}`}\n style={{ strokeDashoffset }}\n r={normalizedRadius}\n cx={normalizedSize}\n cy={normalizedSize}\n />\n </g>\n </svg>\n );\n};\n\nRadialGraph.propTypes = {\n progress: T.number,\n size: T.number,\n strokeWidth: T.number,\n backgroundColor: T.string,\n progressColor: T.string,\n};\n\nRadialGraph.defaultProps = {\n progress: 0,\n strokeWidth: 12,\n};\n\nexport default RadialGraph;\n","// this is a copy of displayUtils.js @ 23.5.0 before the design changes to PureSingleValueRadial were rolled out\nimport { RADIAL_SEVERITY_COLORS } from '@splunk/visualizations-shared/colorConstants';\nimport {\n DEFAULT_FONT,\n getGraphColors,\n lighten,\n darken,\n} from '@splunk/visualizations/common/utils/singleValueUtils';\n\nexport const VALID_TREND_POSITIONS = ['standard', 'below', 'outside'];\nexport const MAJOR_FONT_THRESHOLD = 25;\nexport const TREND_FONT_THRESHOLD = 12;\nexport const DEFAULT_RADIAL_STROKE_WIDTH = 12;\nexport const SMALL_RADIAL_STROKE_WIDTH = 6;\n\n/**\n * Get the colors for a radial graph based on severity\n * @method getRadialColors\n * @param {Object} props\n * @param {Bool} props.backgroundEnabled\n * @param {String} props.backgroundColor\n * @returns {Object} { background, stroke } colors\n */\nexport const getRadialColors = ({ backgroundEnabled, backgroundColor }) =>\n getGraphColors({\n backgroundEnabled,\n backgroundColor,\n defaultColors: RADIAL_SEVERITY_COLORS,\n customColorFormatter: color => ({ background: lighten(color), stroke: darken(color) }),\n });\n\n/**\n * Figure out the diameter of the graph\n * @method getGraphSize\n * @param {Object} props\n * @param {Number} props.width // Width of the container\n * @param {Number} props.height // Height of the container\n * @param {Number} props.underLabel // Underlabel if present\n * @returns {Number} diameter of the graph\n */\nexport const getGraphSize = ({ width, height, underLabel }) => {\n let size = Math.min(width, height);\n\n if (underLabel) {\n size -= DEFAULT_FONT;\n }\n\n return size;\n};\n\n/**\n * Get the maximum size of the container that holds the graph text\n * @method getValueContentSize\n * @param {Object} props\n * @param {Number} props.graphSize\n * @param {Number} props.radialStrokeWidth // Stroke width of the graph\n * @returns {Number} content size for showing major and trend values in radial graph\n */\nexport const getValueContentSize = ({ graphSize, radialStrokeWidth }) => {\n // Account for the graph's stroke width\n const diameter = graphSize - radialStrokeWidth;\n // Use pythagoreum theorum with circle diameter\n // to calculate the size of the sides of the square inside the circle\n return Math.floor(Math.sqrt(diameter ** 2 / 2));\n};\n\n/*\n * @method getRadialStrokeWidth\n * @param {Number} graphSize\n * @returns {Number} radial stroke width\n */\nexport const getRadialStrokeWidth = graphSize =>\n graphSize >= 90 ? DEFAULT_RADIAL_STROKE_WIDTH : SMALL_RADIAL_STROKE_WIDTH;\n\n/*\n * @method isValidPosition\n * @param {String} position\n * @returns {Bool}\n */\nexport const isValidPosition = position => VALID_TREND_POSITIONS.indexOf(position) > -1;\n\n/**\n * Compute the trend indicator position based on font size of major and trend value\n * @method computeTrendIndicatorPosition\n * @param {Object} props\n * @param {String} props.trendIndicatorPosition\n * @param {Number} props.majorTextFontSize\n * @param {Number} props.trendTextFontSize\n * @returns {String} trend indicator position in radial graph\n */\nexport const computeTrendIndicatorPosition = ({\n trendIndicatorPosition,\n majorTextFontSize,\n trendTextFontSize,\n}) => {\n let position = trendIndicatorPosition;\n\n if (!isValidPosition(position)) {\n position = 'standard';\n }\n\n if (\n position !== 'outside' &&\n (trendTextFontSize < TREND_FONT_THRESHOLD || majorTextFontSize < MAJOR_FONT_THRESHOLD)\n ) {\n position = 'below';\n }\n return position;\n};\n\n/*\n * @method showTrendPositionStandard\n * @param {Object} props\n * @param {Bool} props.showTrendIndicator\n * @param {String} props.position\n * @returns {Bool}\n */\nexport const showTrendPositionStandard = ({ showTrendIndicator, position }) =>\n showTrendIndicator && position === 'standard';\n\n/*\n * @method showTrendPositionBelow\n * @param {Object} props\n * @param {Bool} props.showTrendIndicator\n * @param {String} props.position\n * @returns {Bool}\n */\nexport const showTrendPositionBelow = ({ showTrendIndicator, position }) =>\n showTrendIndicator && position === 'below';\n\n/*\n * @method showTrendPositionOutside\n * @param {Object} props\n * @param {Bool} props.showTrendIndicator\n * @param {String} props.position\n * @returns {Bool}\n */\nexport const showTrendPositionOutside = ({ showTrendIndicator, position }) =>\n showTrendIndicator && position === 'outside';\n\n/*\n * todo: need handle max and min\n * @method getRadialProgress\n * @param {Number} majorValue\n * @returns {Number} progress bar in radial graph\n */\nexport const getRadialProgress = majorValue =>\n Number.isNaN(Number(majorValue)) ? 0 : (majorValue / Math.max(majorValue, 100)) * 100;\n","// this is a copy of RadialLayout.jsx @ 23.5.0 before the design changes to PureSingleValueRadial were rolled out\nimport React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport SingleValueBasic, { SingleValueTrendValue } from '@splunk/visualizations/SingleValueBasic';\nimport { getTrendFontSize } from '@splunk/visualizations/common/utils/singleValueUtils';\nimport RadialGraph from './RadialGraph';\nimport {\n showTrendPositionStandard,\n showTrendPositionBelow,\n showTrendPositionOutside,\n} from '../utils/displayUtils';\n\nconst PositionDiv = styled.div`\n position: absolute;\n ${props => (props.bottom ? '' : 'top: 0')};\n bottom: ${props => props.bottom || 0}px;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: ${props => props.align || 'center'};\n justify-content: center;\n`;\n\nconst Column = styled.div`\n display: flex;\n flex-direction: column;\n align-items: ${props => props.align || 'center'};\n justify-content: ${props => props.align || 'center'};\n`;\nconst Row = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n`;\n\nconst Square = styled.div`\n position: relative;\n margin: 0 auto;\n width: ${props => props.size}px;\n height: ${props => props.size}px;\n`;\n\nconst UnderLabelContainer = styled.div`\n color: ${props => props.color};\n margin-top: ${props => (props.size && `-${props.size * 0.1}px`) || 0};\n font-size: ${props => props.size || 12}px;\n`;\n\n/**\n * Render the trend indicator\n * @method renderTrendValue\n * @returns {Object}\n * @private\n */\n\nconst renderIsolateTrend = ({ trendText, trendColor, contentSize }) => {\n const trendTextFontSize = getTrendFontSize({\n width: contentSize / 2,\n height: contentSize / 4,\n trendText,\n spaceRatio: 1,\n });\n\n return (\n <SingleValueTrendValue\n fontSize={trendTextFontSize}\n color={trendColor}\n value={trendText}\n text={trendText}\n />\n );\n};\n\nrenderIsolateTrend.propTypes = {\n trendText: T.string,\n trendColor: T.string,\n contentSize: T.number,\n};\n\nconst RadialContent = ({ ...props }) => {\n const {\n majorColor,\n majorText,\n majorTextFontSize,\n majorValueTitle,\n trendColor,\n trendText,\n trendTextFontSize,\n showTrendIndicator,\n trendPosition,\n unit,\n unitPosition,\n underLabelColor,\n underLabelFontSize,\n underLabel,\n onValueClick,\n contentSize,\n showRadialGraph,\n graphSize,\n progress,\n radialBackgroundColor,\n radialStrokeColor,\n radialStrokeWidth,\n } = props;\n\n // for trend position below and outside\n const trendComponent = renderIsolateTrend({ trendText, trendColor, contentSize });\n\n const basicSingleValues = (\n <SingleValueBasic\n majorColor={majorColor}\n majorText={majorText}\n majorTextFontSize={majorTextFontSize}\n majorValueTitle={majorValueTitle}\n trendColor={trendColor}\n trendText={trendText}\n trendTextFontSize={trendTextFontSize}\n showTrendIndicator={showTrendPositionStandard({ showTrendIndicator, position: trendPosition })}\n unit={unit}\n unitPosition={unitPosition}\n onValueClick={onValueClick}\n />\n );\n const radialGraph = showRadialGraph ? (\n <RadialGraph\n size={graphSize}\n progress={progress}\n backgroundColor={radialBackgroundColor}\n progressColor={radialStrokeColor}\n strokeWidth={radialStrokeWidth}\n />\n ) : null;\n\n const underLabelComponent = underLabel ? (\n <UnderLabelContainer data-test=\"underLabel\" color={underLabelColor} size={underLabelFontSize}>\n {underLabel}\n </UnderLabelContainer>\n ) : null;\n\n const outsideComponent = showTrendPositionOutside({ showTrendIndicator, position: trendPosition }) ? (\n <Column align=\"end\" data-test=\"trend-position-outside\">\n {trendComponent}\n {underLabelComponent}\n </Column>\n ) : null;\n\n const belowTrendComponent = showTrendPositionBelow({ showTrendIndicator, position: trendPosition }) ? (\n <PositionDiv\n data-test=\"trend-position-below\"\n align=\"flex-end\"\n bottom={graphSize * 0.1}\n style={{ textAlign: 'center' }}\n >\n {trendComponent}\n </PositionDiv>\n ) : null;\n\n return (\n <Row>\n <Column>\n <Square size={graphSize}>\n {radialGraph}\n {belowTrendComponent}\n <PositionDiv>{basicSingleValues}</PositionDiv>\n </Square>\n {trendPosition !== 'outside' && underLabelComponent}\n </Column>\n {outsideComponent}\n </Row>\n );\n};\n\nRadialContent.propTypes = {\n ...SingleValueBasic.propTypes,\n trendPosition: T.string,\n contentSize: T.number,\n showRadialGraph: T.bool,\n graphSize: T.number,\n progress: T.number,\n radialBackgroundColor: T.string,\n radialStrokeColor: T.string,\n radialStrokeWidth: T.number,\n};\n\nexport default RadialContent;\n","// this is a copy of SingleValueRadial.jsx @ 23.5.0 before the design changes to PureSingleValueRadial were rolled out\nimport React, { useCallback } from 'react';\nimport T from 'prop-types';\nimport pickFromTheme from '@splunk/themes/pick';\nimport variables from '@splunk/themes/variables';\nimport styled, { withTheme } from 'styled-components';\nimport pick from 'lodash/pick';\nimport isEmpty from 'lodash/isEmpty';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport { toDimension } from '@splunk/visualizations-shared/style';\nimport SizeAwareWrapper from '@splunk/visualizations-shared/SizeAwareWrapper';\nimport Message from '@splunk/visualizations-shared/Message';\nimport {\n computeColors,\n computeSingleValueContent,\n getUnderLabelHeight,\n shouldShowTrend,\n handleValueClickCallback,\n} from '@splunk/visualizations/common/utils/singleValueUtils';\nimport RadialLayout from './RadialLayout';\nimport {\n getGraphSize,\n getValueContentSize,\n getRadialProgress,\n getRadialStrokeWidth,\n computeTrendIndicatorPosition,\n getRadialColors,\n} from '../utils/displayUtils';\n\nconst Container = styled.div`\n overflow: hidden;\n ${props => toDimension(pick(props, ['width', 'height']))};\n`;\n\nconst VizStyleWrapper = styled.div.attrs(({ dataTestKey }) => ({\n 'data-test': dataTestKey,\n}))`\n display: flex;\n justify-content: center;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background-color: ${props => props.backgroundColor};\n`;\n\nVizStyleWrapper.displayName = 'VizStyleWrapper';\n\nconst SingleValueRadial = ({ ...props }) => {\n const {\n width,\n height = 250,\n style,\n majorFontSize,\n majorValue,\n majorValueField,\n trendValue,\n trendFontSize,\n unitPosition,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n trendIndicatorPosition = 'standard',\n onValueClick,\n } = props;\n\n // calculate colors\n const defaultColors = {\n defaultFontColor: pickFromTheme({\n enterprise: {\n dark: variables.textColor(props),\n light: variables.gray20(props),\n },\n prisma: variables.contentColorActive(props),\n })(props),\n defaultBlockFontColor: pickFromTheme({\n enterprise: variables.white(props),\n prisma: variables.contentColorActive(props),\n })(props),\n };\n const { backgroundEnabled, backgroundColor, majorColor, trendColor, underLabelColor } = computeColors(\n props,\n defaultColors\n );\n\n const radialColors = getRadialColors({ backgroundEnabled, backgroundColor });\n const radialBackgroundColor = props.radialBackgroundColor || radialColors.background;\n const radialStrokeColor = props.radialStrokeColor || radialColors.stroke;\n\n const handleValueClick = useCallback(\n ev => handleValueClickCallback(ev, majorValue, majorValueField, trendValue, onValueClick),\n [onValueClick, majorValue, majorValueField, trendValue]\n );\n\n const renderVisualization = ({ width: containerWidth, height: containerHeight }) => {\n if (containerWidth < 35 || containerHeight < 35) {\n return (\n <Message\n width={containerWidth}\n height={containerHeight}\n message={_('Too small to render content')}\n level=\"info\"\n />\n );\n }\n\n // will update later based on text size\n let { trendDisplay, unit, underLabel } = props;\n let showRadialGraph = true;\n\n // calculate radial graph, major and trend content, and underlabel size\n const graphSize = getGraphSize({ width: containerWidth, height: containerHeight, underLabel });\n const radialStrokeWidth = getRadialStrokeWidth(graphSize);\n const valueContentSize = getValueContentSize({ graphSize, radialStrokeWidth });\n const underLabelFontSize = getUnderLabelHeight(graphSize * 0.1);\n\n // calculate major and trend text\n const toRemoveList = [\n { key: 'underLabel', value: '' },\n { key: 'showRadialGraph', value: false },\n { key: 'trendDisplay', value: 'off' },\n { key: 'unit', value: '' },\n ];\n const {\n majorText,\n trendText,\n majorTextFontSize,\n trendTextFontSize,\n majorValueTitle,\n smallVizProps,\n } = computeSingleValueContent({\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n trendDisplay,\n contentWidth: valueContentSize,\n contentHeight: valueContentSize,\n containerWidth,\n containerHeight,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n toRemoveList,\n });\n if (!isEmpty(smallVizProps)) {\n ({ underLabel, showRadialGraph, trendDisplay, unit } = smallVizProps);\n }\n\n // calculate trend position\n const position = computeTrendIndicatorPosition({\n trendIndicatorPosition,\n majorTextFontSize,\n trendTextFontSize,\n });\n\n // calculate radial\n const progress = getRadialProgress(majorValue);\n\n return (\n <VizStyleWrapper\n backgroundColor={backgroundColor}\n style={style}\n dataTestKey=\"SingleValueRadialWrapper\"\n >\n <RadialLayout\n data-test=\"RadialLayout\"\n majorColor={majorColor}\n majorText={majorText}\n majorTextFontSize={majorTextFontSize}\n majorValueTitle={majorValueTitle}\n trendColor={trendColor}\n trendText={trendText}\n trendTextFontSize={trendTextFontSize}\n showTrendIndicator={shouldShowTrend(trendDisplay)}\n trendPosition={position}\n unit={unit}\n unitPosition={unitPosition}\n underLabelColor={underLabelColor}\n underLabelFontSize={underLabelFontSize}\n underLabel={underLabel}\n onValueClick={handleValueClick}\n contentSize={valueContentSize * 0.7}\n showRadialGraph={showRadialGraph}\n graphSize={graphSize}\n progress={progress}\n radialBackgroundColor={radialBackgroundColor}\n radialStrokeColor={radialStrokeColor}\n radialStrokeWidth={radialStrokeWidth}\n />\n </VizStyleWrapper>\n );\n };\n\n return (\n <Container width={width} height={height}>\n <SizeAwareWrapper>\n {containerDimension => renderVisualization(containerDimension)}\n </SizeAwareWrapper>\n </Container>\n );\n};\n\nSingleValueRadial.propTypes = {\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n style: T.object,\n majorValue: T.oneOfType([T.string, T.number]),\n majorValueField: T.string,\n majorColor: T.string,\n majorFontSize: T.number,\n trendValue: T.oneOfType([T.string, T.number]),\n trendColor: T.string,\n trendFontSize: T.number,\n trendDisplay: T.string,\n trendIndicatorPosition: T.oneOf(['standard', 'below', 'outside']),\n shouldAbbreviateTrendValue: T.bool,\n backgroundColor: T.string,\n unit: T.string,\n unitPosition: T.string,\n underLabel: T.string,\n numberPrecision: T.number,\n shouldUseThousandSeparators: T.bool,\n radialBackgroundColor: T.string,\n radialStrokeColor: T.string,\n onValueClick: T.func,\n};\n\nSingleValueRadial.defaultProps = {\n width: '100%',\n height: 250,\n majorValue: 'N/A',\n majorValueField: '',\n trendDisplay: 'absolute',\n trendIndicatorPosition: 'standard',\n shouldAbbreviateTrendValue: false,\n unitPosition: 'after',\n numberPrecision: 0,\n shouldUseThousandSeparators: true,\n onValueClick: () => {},\n};\n\nexport default withTheme(SingleValueRadial);\n","import React from 'react';\nimport T from 'prop-types';\nimport { withSanitizedProps } from '@splunk/visualizations-shared/SanitizeProps';\nimport PureSingleValueRadial from './src/components/SingleValueRadial';\nimport { propsConvert, propsDeprecate } from '../../utils/propUtils';\n\n// This propsMapping is for React SingleValue to use PureSingleValue.\nconst propsMapping = {\n value: 'majorValue',\n deltaValue: 'trendValue',\n deltaColor: 'trendColor',\n deltaFontSize: 'trendFontSize',\n useTrendUnits: 'shouldAbbreviateTrendValue',\n useThousandSeparators: 'shouldUseThousandSeparators',\n};\n\nconst deprecatedProps = ['showTrendIndicator', 'trendDisplayMode'];\n\nconst ReactSingleValueRadial = ({ ...props }) => {\n let newProps = propsConvert(props, propsMapping);\n // change props\n const trendDisplay = newProps.showTrendIndicator ? newProps.trendDisplayMode : 'off';\n newProps = {\n ...propsDeprecate(newProps, deprecatedProps),\n trendDisplay,\n };\n return <PureSingleValueRadial {...newProps} />;\n};\n\nReactSingleValueRadial.propTypes = {\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n style: T.object,\n value: T.oneOfType([T.string, T.number]),\n majorColor: T.string,\n majorFontSize: T.number,\n deltaValue: T.oneOfType([T.string, T.number]),\n deltaColor: T.string,\n deltaFontSize: T.number,\n trendDisplayMode: T.string,\n trendIndicatorPosition: T.oneOf(['standard', 'below', 'outside']),\n useTrendUnits: T.bool,\n showTrendIndicator: T.bool,\n backgroundColor: T.string,\n unit: T.string,\n unitPosition: T.string,\n underLabel: T.string,\n numberPrecision: T.number,\n useThousandSeparators: T.bool,\n radialBackgroundColor: T.string,\n radialStrokeColor: T.string,\n onValueClick: T.func,\n};\n\nReactSingleValueRadial.defaultProps = {\n width: '100%',\n height: 250,\n trendDisplayMode: 'absolute',\n trendIndicatorPosition: 'standard',\n useTrendUnits: false,\n showTrendIndicator: true,\n unitPosition: 'after',\n numberPrecision: 0,\n useThousandSeparators: true,\n onValueClick: () => {},\n};\n\nexport default withSanitizedProps(ReactSingleValueRadial);\n"],"sourceRoot":""}
package/SvgChoropleth.js CHANGED
@@ -148,31 +148,20 @@ module.exports = require("@babel/runtime/helpers/getPrototypeOf");
148
148
 
149
149
 
150
150
  var _classCallCheck = __webpack_require__(17);
151
-
152
151
  var _createClass = __webpack_require__(16);
153
-
154
152
  var _inherits = __webpack_require__(23);
155
-
156
153
  var _possibleConstructorReturn = __webpack_require__(24);
157
-
158
154
  var _getPrototypeOf = __webpack_require__(25);
159
-
160
155
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
161
-
162
156
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
163
-
164
157
  Object.defineProperty(exports, "__esModule", {
165
158
  value: true
166
159
  });
167
160
  exports.DATA_ATTRIBUTE = void 0;
168
161
  /* eslint-disable no-param-reassign */
169
-
170
162
  var React = __webpack_require__(1);
171
-
172
163
  var lodash_1 = __webpack_require__(21);
173
-
174
164
  var styled_components_1 = __webpack_require__(7);
175
-
176
165
  exports.DATA_ATTRIBUTE = 'data-value';
177
166
  var StyledSvgChoropleth = styled_components_1.default.div.withConfig({
178
167
  displayName: "SvgChoropleth__StyledSvgChoropleth",
@@ -180,24 +169,17 @@ var StyledSvgChoropleth = styled_components_1.default.div.withConfig({
180
169
  })(["display:flex;flex-direction:column;position:relative;background-color:", ";"], function (props) {
181
170
  return props.backgroundColor;
182
171
  });
183
-
184
172
  var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
185
173
  _inherits(SvgChoropleth, _React$Component);
186
-
187
174
  var _super = _createSuper(SvgChoropleth);
188
-
189
175
  function SvgChoropleth(props) {
190
176
  var _this;
191
-
192
177
  _classCallCheck(this, SvgChoropleth);
193
-
194
178
  _this = _super.call(this, props);
195
179
  _this.containerRef = React.createRef();
196
180
  _this.highlightedCountry = null;
197
-
198
181
  _this.getLocalCoords = function (clientX, clientY) {
199
182
  var rect = _this.containerRef.current.getBoundingClientRect();
200
-
201
183
  var physX = rect.left;
202
184
  var physY = rect.top;
203
185
  return {
@@ -205,40 +187,31 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
205
187
  y: clientY - physY
206
188
  };
207
189
  };
208
-
209
190
  _this.handleMapClick = function (event) {
210
191
  var clientX = event.clientX,
211
- clientY = event.clientY;
212
-
192
+ clientY = event.clientY;
213
193
  var pos = _this.getLocalCoords(clientX, clientY);
214
-
215
194
  var _this$props = _this.props,
216
- featureCollection = _this$props.featureCollection,
217
- onClick = _this$props.onClick;
195
+ featureCollection = _this$props.featureCollection,
196
+ onClick = _this$props.onClick;
218
197
  var clickedCoords = featureCollection.transformation.transformBack(pos);
219
198
  var feature = event.target;
220
199
  var wholeFeature = feature.id ? feature : feature.parentNode;
221
-
222
200
  if (onClick) {
223
201
  onClick(clickedCoords, wholeFeature.id);
224
202
  }
225
203
  };
226
-
227
204
  _this.handleFeatureEnter = function (ev) {
228
205
  var feature = ev.target;
229
-
230
206
  if (!feature.id && !feature.ownerSVGElement) {
231
207
  return;
232
208
  }
233
-
234
- var wholeFeature = feature.id ? feature : feature.parentNode; // remove the highlighted country IF we are entering a different country
235
-
209
+ var wholeFeature = feature.id ? feature : feature.parentNode;
210
+ // remove the highlighted country IF we are entering a different country
236
211
  if (_this.highlightedCountry && wholeFeature.id !== _this.highlightedCountry.id) {
237
212
  _this.unHighlightCountry();
238
213
  }
239
-
240
214
  _this.highlightCountry(wholeFeature);
241
-
242
215
  if (_this.props.onFeatureHover) {
243
216
  _this.props.onFeatureHover({
244
217
  featureId: wholeFeature.id,
@@ -247,24 +220,19 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
247
220
  });
248
221
  }
249
222
  };
250
-
251
223
  _this.handleFeatureLeave = function (ev) {
252
224
  var feature = ev.target;
253
-
254
225
  if (!feature.id && !feature.ownerSVGElement) {
255
226
  return;
256
- } // 'wholeFeature' means the SVG <g> (group) of multipolygon features
257
-
258
-
259
- var wholeFeature = feature.id ? feature : feature.parentNode; // handling feature leaving should always only deal with the highlighted feature
260
-
227
+ }
228
+ // 'wholeFeature' means the SVG <g> (group) of multipolygon features
229
+ var wholeFeature = feature.id ? feature : feature.parentNode;
230
+ // handling feature leaving should always only deal with the highlighted feature
261
231
  if (wholeFeature !== _this.highlightedCountry) {
262
232
  return;
263
233
  }
264
-
265
- _this.unHighlightCountry(); // wholeFeature.style.stroke = this.lastFeatureStroke;
266
-
267
-
234
+ _this.unHighlightCountry();
235
+ // wholeFeature.style.stroke = this.lastFeatureStroke;
268
236
  if (_this.props.onFeatureHover) {
269
237
  _this.props.onFeatureHover({
270
238
  featureId: null,
@@ -273,33 +241,28 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
273
241
  });
274
242
  }
275
243
  };
276
-
277
244
  _this.registerSvg = function (el) {
278
245
  if (!el) return;
279
246
  _this.svgDom = el;
280
247
  var _this$props2 = _this.props,
281
- _this$props2$selector = _this$props2.selector,
282
- selector = _this$props2$selector === void 0 ? '.feature' : _this$props2$selector,
283
- strokeColor = _this$props2.strokeColor,
284
- fillColor = _this$props2.fillColor;
248
+ _this$props2$selector = _this$props2.selector,
249
+ selector = _this$props2$selector === void 0 ? '.feature' : _this$props2$selector,
250
+ strokeColor = _this$props2.strokeColor,
251
+ fillColor = _this$props2.fillColor;
285
252
  _this.svgDom.onmouseover = _this.handleFeatureEnter;
286
253
  _this.svgDom.onmouseout = _this.handleFeatureLeave;
287
-
288
254
  _this.svgDom.querySelectorAll(selector).forEach(function (node) {
289
255
  node.style.stroke = strokeColor;
290
256
  node.style.fill = fillColor;
291
257
  });
292
-
293
258
  _this.updateSvg(_this.props);
294
259
  };
295
-
296
260
  var featureCollection = props.featureCollection;
297
261
  _this.state = {
298
262
  svgNode: featureCollection.getSvgNode(_this.registerSvg)
299
263
  };
300
264
  return _this;
301
265
  }
302
-
303
266
  _createClass(SvgChoropleth, [{
304
267
  key: "shouldComponentUpdate",
305
268
  value: function shouldComponentUpdate(nextProps, nextState) {
@@ -319,8 +282,8 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
319
282
  this.updateSvg(this.props);
320
283
  }
321
284
  }
322
- } // allows a provided alias like 'US-CA' to get mapped to 'California' which is the element id for the SVG shape
323
-
285
+ }
286
+ // allows a provided alias like 'US-CA' to get mapped to 'California' which is the element id for the SVG shape
324
287
  }, {
325
288
  key: "getFeatureId",
326
289
  value: function getFeatureId(alias) {
@@ -334,7 +297,6 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
334
297
  * So the highlight for South Africa will not cover up Lesotho.
335
298
  * @param {SVGElement} el
336
299
  */
337
-
338
300
  }, {
339
301
  key: "highlightCountry",
340
302
  value: function highlightCountry(el) {
@@ -356,31 +318,25 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
356
318
  if (this.highlightedCountry) {
357
319
  this.svgDom.removeChild(this.highlightedCountry);
358
320
  }
359
-
360
321
  this.highlightedCountry = null;
361
322
  }
362
323
  }, {
363
324
  key: "updateSvg",
364
325
  value: function updateSvg(props) {
365
326
  var _this2 = this;
366
-
367
327
  if (!this.svgDom) {
368
328
  return;
369
329
  }
370
-
371
330
  var _props$selector = props.selector,
372
- selector = _props$selector === void 0 ? '.feature' : _props$selector,
373
- fillColor = props.fillColor,
374
- data = props.data;
375
-
331
+ selector = _props$selector === void 0 ? '.feature' : _props$selector,
332
+ fillColor = props.fillColor,
333
+ data = props.data;
376
334
  if (!data) {
377
335
  return;
378
336
  }
379
-
380
337
  var dataHashMap = {};
381
338
  data.featureIDs.forEach(function (alias, index) {
382
339
  var featureId = _this2.getFeatureId(alias);
383
-
384
340
  dataHashMap[featureId] = {
385
341
  fill: data.fill[index],
386
342
  value: data.values[index]
@@ -390,7 +346,6 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
390
346
  var nodeData = dataHashMap[node.id];
391
347
  node.style.fill = lodash_1.get(nodeData, 'fill') || fillColor;
392
348
  var value = lodash_1.get(nodeData, 'value');
393
-
394
349
  if (value) {
395
350
  node.setAttribute(exports.DATA_ATTRIBUTE, value);
396
351
  } else {
@@ -402,8 +357,7 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
402
357
  key: "render",
403
358
  value: function render() {
404
359
  var _this$props$backgroun = this.props.backgroundColor,
405
- backgroundColor = _this$props$backgroun === void 0 ? 'transparent' : _this$props$backgroun; // note: for some reason, onclick event can't be triggered on dashboard. So change it to onMouseDown
406
-
360
+ backgroundColor = _this$props$backgroun === void 0 ? 'transparent' : _this$props$backgroun; // note: for some reason, onclick event can't be triggered on dashboard. So change it to onMouseDown
407
361
  return React.createElement(StyledSvgChoropleth, {
408
362
  "data-test": "styled-svg-choropleth",
409
363
  backgroundColor: backgroundColor,
@@ -412,10 +366,8 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
412
366
  }, this.state.svgNode);
413
367
  }
414
368
  }]);
415
-
416
369
  return SvgChoropleth;
417
370
  }(React.Component);
418
-
419
371
  exports.default = SvgChoropleth;
420
372
 
421
373
  /***/ }),
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"lodash\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///./src/visualizations/SvgChoropleth/SvgChoropleth.tsx","webpack:///external \"styled-components\""],"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;;Q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ction __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 = 36);\n","module.exports = require(\"react\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"lodash\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","/* eslint-disable no-param-reassign */\nimport * as React from 'react';\nimport { get, isEqual } from 'lodash';\nimport styled from 'styled-components';\nimport { ISvgFeatureCollection } from './src/utils/ISvgFeatureCollection';\nimport { DataPoint } from './src/utils/ICoordinateTransformation';\n\nexport const DATA_ATTRIBUTE = 'data-value';\n\nexport interface SvgChoroplethProps {\n featureCollection: ISvgFeatureCollection;\n data: { featureIDs: string[]; fill: string[]; values: any[] };\n fillColor: string;\n strokeColor: string;\n strokeHighlightColor?: string;\n backgroundColor?: string;\n selector: string;\n onFeatureHover: (params: { featureId: string; value: any; label?: string }) => void;\n onClick?: (sourceCoordinates: DataPoint, featureId: string) => void;\n}\n\nexport interface SvgChoroplethState {\n svgNode: React.ReactNode;\n}\n\nexport { GeoFeatureGroup } from './src/utils/GeoTypes';\n\ninterface StyledSvgChoroplethProps {\n readonly backgroundColor: string;\n}\n\nconst StyledSvgChoropleth = styled.div<StyledSvgChoroplethProps>`\n display: flex;\n flex-direction: column;\n position: relative;\n background-color: ${(props): string => props.backgroundColor};\n`;\n\nexport default class SvgChoropleth extends React.Component<SvgChoroplethProps, SvgChoroplethState> {\n containerRef: React.RefObject<HTMLDivElement> = React.createRef();\n\n // lastFeatureStroke: string;\n svgDom: SVGElement;\n\n highlightedCountry: SVGElement = null;\n\n constructor(props: SvgChoroplethProps) {\n super(props);\n const { featureCollection } = props;\n this.state = { svgNode: featureCollection.getSvgNode(this.registerSvg) };\n }\n\n shouldComponentUpdate(nextProps: Readonly<SvgChoroplethProps>, nextState: SvgChoroplethState): boolean {\n const shouldUpdate =\n !isEqual(nextState.svgNode, this.state.svgNode) || !isEqual(nextProps, this.props);\n return shouldUpdate;\n }\n\n componentDidUpdate(prevProps): void {\n if (this.props !== prevProps) {\n if (prevProps.featureCollection !== this.props.featureCollection) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({\n svgNode: this.props.featureCollection.getSvgNode(this.registerSvg),\n });\n } else {\n this.updateSvg(this.props);\n }\n }\n }\n\n getLocalCoords = (clientX: number, clientY: number): { x: number; y: number } => {\n const rect = this.containerRef.current.getBoundingClientRect();\n const physX = rect.left;\n const physY = rect.top;\n return { x: clientX - physX, y: clientY - physY };\n };\n\n handleMapClick = (event: React.MouseEvent<HTMLInputElement>): void => {\n const { clientX, clientY } = event;\n const pos = this.getLocalCoords(clientX, clientY);\n const { featureCollection, onClick } = this.props;\n const clickedCoords: DataPoint = featureCollection.transformation.transformBack(pos);\n const feature: SVGSVGElement = event.target as SVGSVGElement;\n const wholeFeature: SVGElement = feature.id ? feature : (feature.parentNode as SVGElement);\n if (onClick) {\n onClick(clickedCoords, wholeFeature.id);\n }\n };\n\n handleFeatureEnter = (ev: MouseEvent): void => {\n const feature: SVGSVGElement = ev.target as SVGSVGElement;\n\n if (!feature.id && !feature.ownerSVGElement) {\n return;\n }\n\n const wholeFeature: SVGElement = feature.id ? feature : (feature.parentNode as SVGElement);\n // remove the highlighted country IF we are entering a different country\n if (this.highlightedCountry && wholeFeature.id !== this.highlightedCountry.id) {\n this.unHighlightCountry();\n }\n this.highlightCountry(wholeFeature);\n\n if (this.props.onFeatureHover) {\n this.props.onFeatureHover({\n featureId: wholeFeature.id,\n label: wholeFeature.getAttribute('label_en'),\n value: wholeFeature.getAttribute(DATA_ATTRIBUTE),\n });\n }\n };\n\n handleFeatureLeave = (ev: MouseEvent): void => {\n const feature: SVGSVGElement = ev.target as SVGSVGElement;\n\n if (!feature.id && !feature.ownerSVGElement) {\n return;\n }\n\n // 'wholeFeature' means the SVG <g> (group) of multipolygon features\n const wholeFeature: SVGElement = feature.id ? feature : (feature.parentNode as SVGElement);\n // handling feature leaving should always only deal with the highlighted feature\n if (wholeFeature !== this.highlightedCountry) {\n return;\n }\n this.unHighlightCountry();\n // wholeFeature.style.stroke = this.lastFeatureStroke;\n\n if (this.props.onFeatureHover) {\n this.props.onFeatureHover({ featureId: null, value: null, label: null });\n }\n };\n\n // allows a provided alias like 'US-CA' to get mapped to 'California' which is the element id for the SVG shape\n private getFeatureId(alias: string): string {\n return this.props.featureCollection.resolveAlias(alias);\n }\n\n registerSvg = (el: SVGSVGElement): void => {\n if (!el) return;\n\n this.svgDom = el;\n\n const { selector = '.feature', strokeColor, fillColor } = this.props;\n\n this.svgDom.onmouseover = this.handleFeatureEnter;\n this.svgDom.onmouseout = this.handleFeatureLeave;\n\n this.svgDom.querySelectorAll(selector).forEach((node: HTMLElement): void => {\n node.style.stroke = strokeColor;\n node.style.fill = fillColor;\n });\n\n this.updateSvg(this.props);\n };\n\n /**\n * this method renders a copy of the polygon on top of all the others, with a highlighted boundary.\n * Technically we don't render in on top of ALL the others. There are three totally landlocked countries,\n * the first of which in our geojson file is Lesotho. These are also the last three countries in the geojson\n * file. So when we insert the highlight shape into the dom, we inert it *before* these three countries.\n * So the highlight for South Africa will not cover up Lesotho.\n * @param {SVGElement} el\n */\n highlightCountry(el: SVGElement): void {\n if (this.highlightedCountry) {\n return; // do not add more than one hovered element at a time\n }\n\n const firstLandlockedCountry = this.svgDom.querySelector(`#Lesotho`);\n const parent = el.parentNode;\n const clone: SVGElement = el.cloneNode(true) as SVGElement;\n const strokeColor = this.props.strokeHighlightColor || '#000';\n clone.style.stroke = strokeColor;\n this.highlightedCountry = clone;\n\n parent.insertBefore(clone, firstLandlockedCountry);\n }\n\n unHighlightCountry(): void {\n if (this.highlightedCountry) {\n this.svgDom.removeChild(this.highlightedCountry);\n }\n this.highlightedCountry = null;\n }\n\n updateSvg(props: SvgChoroplethProps): void {\n if (!this.svgDom) {\n return;\n }\n\n const { selector = '.feature', fillColor, data } = props;\n\n if (!data) {\n return;\n }\n const dataHashMap = {};\n\n data.featureIDs.forEach((alias, index): void => {\n const featureId = this.getFeatureId(alias);\n dataHashMap[featureId] = { fill: data.fill[index], value: data.values[index] };\n });\n this.svgDom.querySelectorAll(selector).forEach((node: HTMLElement): void => {\n const nodeData = dataHashMap[node.id];\n node.style.fill = get(nodeData, 'fill') || fillColor;\n const value = get(nodeData, 'value');\n if (value) {\n node.setAttribute(DATA_ATTRIBUTE, value);\n } else {\n node.removeAttribute(DATA_ATTRIBUTE);\n }\n });\n }\n\n render(): JSX.Element {\n const { backgroundColor = 'transparent' } = this.props;\n // note: for some reason, onclick event can't be triggered on dashboard. So change it to onMouseDown\n return (\n <StyledSvgChoropleth\n data-test=\"styled-svg-choropleth\"\n backgroundColor={backgroundColor}\n onMouseDown={this.handleMapClick}\n ref={this.containerRef}\n >\n {this.state.svgNode}\n </StyledSvgChoropleth>\n );\n }\n}\n","module.exports = require(\"styled-components\");"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"lodash\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///./src/visualizations/SvgChoropleth/SvgChoropleth.tsx","webpack:///external \"styled-components\""],"names":["React","require","lodash_1","styled_components_1","exports","DATA_ATTRIBUTE","StyledSvgChoropleth","default","div","withConfig","displayName","componentId","props","backgroundColor","SvgChoropleth","_React$Component","_inherits","_super","_createSuper","_this","_classCallCheck","call","containerRef","createRef","highlightedCountry","getLocalCoords","clientX","clientY","rect","current","getBoundingClientRect","physX","left","physY","top","x","y","handleMapClick","event","pos","_this$props","featureCollection","onClick","clickedCoords","transformation","transformBack","feature","target","wholeFeature","id","parentNode","handleFeatureEnter","ev","ownerSVGElement","unHighlightCountry","highlightCountry","onFeatureHover","featureId","label","getAttribute","value","handleFeatureLeave","registerSvg","el","svgDom","_this$props2","_this$props2$selector","selector","strokeColor","fillColor","onmouseover","onmouseout","querySelectorAll","forEach","node","style","stroke","fill","updateSvg","state","svgNode","getSvgNode","_createClass","key","shouldComponentUpdate","nextProps","nextState","shouldUpdate","isEqual","componentDidUpdate","prevProps","setState","getFeatureId","alias","resolveAlias","firstLandlockedCountry","querySelector","parent","clone","cloneNode","strokeHighlightColor","insertBefore","removeChild","_this2","_props$selector","data","dataHashMap","featureIDs","index","values","nodeData","get","setAttribute","removeAttribute","render","_this$props$backgroun","createElement","onMouseDown","ref","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,kC;;;;;;;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AChCwG,WAAW,EAAE,IAAI,CAAChF,cAAc;QAChCiF,GAAG,EAAE,IAAI,CAAChG;MAAY,GAErB,IAAI,CAACyD,KAAK,CAACC,OAAO,CACD;IAE9B;EAAC;EAAA,OAAAlE,aAAA;AAAA,EA9LsCd,KAAK,CAACuH,SAAiD;AAAlGnH,OAAA,CAAAG,OAAA,GAAAO,aAAA,C;;;;;;;ACtCA,8C","file":"SvgChoropleth.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 = 36);\n","module.exports = require(\"react\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"lodash\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","/* eslint-disable no-param-reassign */\nimport * as React from 'react';\nimport { get, isEqual } from 'lodash';\nimport styled from 'styled-components';\nimport { ISvgFeatureCollection } from './src/utils/ISvgFeatureCollection';\nimport { DataPoint } from './src/utils/ICoordinateTransformation';\n\nexport const DATA_ATTRIBUTE = 'data-value';\n\nexport interface SvgChoroplethProps {\n featureCollection: ISvgFeatureCollection;\n data: { featureIDs: string[]; fill: string[]; values: any[] };\n fillColor: string;\n strokeColor: string;\n strokeHighlightColor?: string;\n backgroundColor?: string;\n selector: string;\n onFeatureHover: (params: { featureId: string; value: any; label?: string }) => void;\n onClick?: (sourceCoordinates: DataPoint, featureId: string) => void;\n}\n\nexport interface SvgChoroplethState {\n svgNode: React.ReactNode;\n}\n\nexport { GeoFeatureGroup } from './src/utils/GeoTypes';\n\ninterface StyledSvgChoroplethProps {\n readonly backgroundColor: string;\n}\n\nconst StyledSvgChoropleth = styled.div<StyledSvgChoroplethProps>`\n display: flex;\n flex-direction: column;\n position: relative;\n background-color: ${(props): string => props.backgroundColor};\n`;\n\nexport default class SvgChoropleth extends React.Component<SvgChoroplethProps, SvgChoroplethState> {\n containerRef: React.RefObject<HTMLDivElement> = React.createRef();\n\n // lastFeatureStroke: string;\n svgDom: SVGElement;\n\n highlightedCountry: SVGElement = null;\n\n constructor(props: SvgChoroplethProps) {\n super(props);\n const { featureCollection } = props;\n this.state = { svgNode: featureCollection.getSvgNode(this.registerSvg) };\n }\n\n shouldComponentUpdate(nextProps: Readonly<SvgChoroplethProps>, nextState: SvgChoroplethState): boolean {\n const shouldUpdate =\n !isEqual(nextState.svgNode, this.state.svgNode) || !isEqual(nextProps, this.props);\n return shouldUpdate;\n }\n\n componentDidUpdate(prevProps): void {\n if (this.props !== prevProps) {\n if (prevProps.featureCollection !== this.props.featureCollection) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({\n svgNode: this.props.featureCollection.getSvgNode(this.registerSvg),\n });\n } else {\n this.updateSvg(this.props);\n }\n }\n }\n\n getLocalCoords = (clientX: number, clientY: number): { x: number; y: number } => {\n const rect = this.containerRef.current.getBoundingClientRect();\n const physX = rect.left;\n const physY = rect.top;\n return { x: clientX - physX, y: clientY - physY };\n };\n\n handleMapClick = (event: React.MouseEvent<HTMLInputElement>): void => {\n const { clientX, clientY } = event;\n const pos = this.getLocalCoords(clientX, clientY);\n const { featureCollection, onClick } = this.props;\n const clickedCoords: DataPoint = featureCollection.transformation.transformBack(pos);\n const feature: SVGSVGElement = event.target as SVGSVGElement;\n const wholeFeature: SVGElement = feature.id ? feature : (feature.parentNode as SVGElement);\n if (onClick) {\n onClick(clickedCoords, wholeFeature.id);\n }\n };\n\n handleFeatureEnter = (ev: MouseEvent): void => {\n const feature: SVGSVGElement = ev.target as SVGSVGElement;\n\n if (!feature.id && !feature.ownerSVGElement) {\n return;\n }\n\n const wholeFeature: SVGElement = feature.id ? feature : (feature.parentNode as SVGElement);\n // remove the highlighted country IF we are entering a different country\n if (this.highlightedCountry && wholeFeature.id !== this.highlightedCountry.id) {\n this.unHighlightCountry();\n }\n this.highlightCountry(wholeFeature);\n\n if (this.props.onFeatureHover) {\n this.props.onFeatureHover({\n featureId: wholeFeature.id,\n label: wholeFeature.getAttribute('label_en'),\n value: wholeFeature.getAttribute(DATA_ATTRIBUTE),\n });\n }\n };\n\n handleFeatureLeave = (ev: MouseEvent): void => {\n const feature: SVGSVGElement = ev.target as SVGSVGElement;\n\n if (!feature.id && !feature.ownerSVGElement) {\n return;\n }\n\n // 'wholeFeature' means the SVG <g> (group) of multipolygon features\n const wholeFeature: SVGElement = feature.id ? feature : (feature.parentNode as SVGElement);\n // handling feature leaving should always only deal with the highlighted feature\n if (wholeFeature !== this.highlightedCountry) {\n return;\n }\n this.unHighlightCountry();\n // wholeFeature.style.stroke = this.lastFeatureStroke;\n\n if (this.props.onFeatureHover) {\n this.props.onFeatureHover({ featureId: null, value: null, label: null });\n }\n };\n\n // allows a provided alias like 'US-CA' to get mapped to 'California' which is the element id for the SVG shape\n private getFeatureId(alias: string): string {\n return this.props.featureCollection.resolveAlias(alias);\n }\n\n registerSvg = (el: SVGSVGElement): void => {\n if (!el) return;\n\n this.svgDom = el;\n\n const { selector = '.feature', strokeColor, fillColor } = this.props;\n\n this.svgDom.onmouseover = this.handleFeatureEnter;\n this.svgDom.onmouseout = this.handleFeatureLeave;\n\n this.svgDom.querySelectorAll(selector).forEach((node: HTMLElement): void => {\n node.style.stroke = strokeColor;\n node.style.fill = fillColor;\n });\n\n this.updateSvg(this.props);\n };\n\n /**\n * this method renders a copy of the polygon on top of all the others, with a highlighted boundary.\n * Technically we don't render in on top of ALL the others. There are three totally landlocked countries,\n * the first of which in our geojson file is Lesotho. These are also the last three countries in the geojson\n * file. So when we insert the highlight shape into the dom, we inert it *before* these three countries.\n * So the highlight for South Africa will not cover up Lesotho.\n * @param {SVGElement} el\n */\n highlightCountry(el: SVGElement): void {\n if (this.highlightedCountry) {\n return; // do not add more than one hovered element at a time\n }\n\n const firstLandlockedCountry = this.svgDom.querySelector(`#Lesotho`);\n const parent = el.parentNode;\n const clone: SVGElement = el.cloneNode(true) as SVGElement;\n const strokeColor = this.props.strokeHighlightColor || '#000';\n clone.style.stroke = strokeColor;\n this.highlightedCountry = clone;\n\n parent.insertBefore(clone, firstLandlockedCountry);\n }\n\n unHighlightCountry(): void {\n if (this.highlightedCountry) {\n this.svgDom.removeChild(this.highlightedCountry);\n }\n this.highlightedCountry = null;\n }\n\n updateSvg(props: SvgChoroplethProps): void {\n if (!this.svgDom) {\n return;\n }\n\n const { selector = '.feature', fillColor, data } = props;\n\n if (!data) {\n return;\n }\n const dataHashMap = {};\n\n data.featureIDs.forEach((alias, index): void => {\n const featureId = this.getFeatureId(alias);\n dataHashMap[featureId] = { fill: data.fill[index], value: data.values[index] };\n });\n this.svgDom.querySelectorAll(selector).forEach((node: HTMLElement): void => {\n const nodeData = dataHashMap[node.id];\n node.style.fill = get(nodeData, 'fill') || fillColor;\n const value = get(nodeData, 'value');\n if (value) {\n node.setAttribute(DATA_ATTRIBUTE, value);\n } else {\n node.removeAttribute(DATA_ATTRIBUTE);\n }\n });\n }\n\n render(): JSX.Element {\n const { backgroundColor = 'transparent' } = this.props;\n // note: for some reason, onclick event can't be triggered on dashboard. So change it to onMouseDown\n return (\n <StyledSvgChoropleth\n data-test=\"styled-svg-choropleth\"\n backgroundColor={backgroundColor}\n onMouseDown={this.handleMapClick}\n ref={this.containerRef}\n >\n {this.state.svgNode}\n </StyledSvgChoropleth>\n );\n }\n}\n","module.exports = require(\"styled-components\");"],"sourceRoot":""}