@splunk/react-visualizations 23.4.0 → 24.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///./src/utils/propUtils.js","webpack:///external \"react\"","webpack:///external \"@splunk/visualizations-shared/SanitizeProps\"","webpack:///external \"@splunk/visualizations/SingleValueRadial\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///./src/visualizations/SingleValueRadial/SingleValueRadial.jsx","webpack:///external \"lodash/omit\""],"names":["propsConvert","newProps","Object","key","propsMapping","oldProps","propsDeprecate","omit","value","deltaValue","deltaColor","deltaFontSize","useTrendUnits","useThousandSeparators","deprecatedProps","ReactSingleValueRadial","props","trendDisplay","width","T","height","style","majorColor","majorFontSize","trendDisplayMode","trendIndicatorPosition","showTrendIndicator","backgroundColor","unit","unitPosition","underLabel","numberPrecision","radialBackgroundColor","radialStrokeColor","onValueClick","func","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;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lCc,oBAAkB,EANgB;AAOlCG,cAAY,EAPsB;AAQlCE,iBAAe,EARmB;AASlClB,uBAAqB,EATa;AAUlCqB,cAAY,EAAE,wBAAM,CAAE;AAVY,CAAtCnB;AAaeqB,qKAAkB,CAAjC,sBAAiC,CAAjC,E;;;;;;;ACnEA,wC","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 = 62);\n","module.exports = require(\"prop-types\");","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(\"react\");","module.exports = require(\"@splunk/visualizations-shared/SanitizeProps\");","module.exports = require(\"@splunk/visualizations/SingleValueRadial\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","import React from 'react';\nimport T from 'prop-types';\nimport { PureSingleValueRadial } from '@splunk/visualizations/SingleValueRadial';\nimport { withSanitizedProps } from '@splunk/visualizations-shared/SanitizeProps';\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","module.exports = require(\"lodash/omit\");"],"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","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,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD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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":""}
package/SvgChoropleth.js CHANGED
@@ -87,80 +87,61 @@ module.exports =
87
87
  /******/
88
88
  /******/
89
89
  /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 29);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 36);
91
91
  /******/ })
92
92
  /************************************************************************/
93
- /******/ ([
94
- /* 0 */,
95
- /* 1 */,
96
- /* 2 */
93
+ /******/ ({
94
+
95
+ /***/ 1:
97
96
  /***/ (function(module, exports) {
98
97
 
99
98
  module.exports = require("react");
100
99
 
101
100
  /***/ }),
102
- /* 3 */,
103
- /* 4 */,
104
- /* 5 */,
105
- /* 6 */,
106
- /* 7 */,
107
- /* 8 */,
108
- /* 9 */,
109
- /* 10 */,
110
- /* 11 */,
111
- /* 12 */
112
- /***/ (function(module, exports) {
113
-
114
- module.exports = require("styled-components");
115
101
 
116
- /***/ }),
117
- /* 13 */,
118
- /* 14 */,
119
- /* 15 */,
120
- /* 16 */
102
+ /***/ 16:
121
103
  /***/ (function(module, exports) {
122
104
 
123
105
  module.exports = require("@babel/runtime/helpers/createClass");
124
106
 
125
107
  /***/ }),
126
- /* 17 */
108
+
109
+ /***/ 17:
127
110
  /***/ (function(module, exports) {
128
111
 
129
112
  module.exports = require("@babel/runtime/helpers/classCallCheck");
130
113
 
131
114
  /***/ }),
132
- /* 18 */,
133
- /* 19 */,
134
- /* 20 */
115
+
116
+ /***/ 21:
135
117
  /***/ (function(module, exports) {
136
118
 
137
119
  module.exports = require("lodash");
138
120
 
139
121
  /***/ }),
140
- /* 21 */
122
+
123
+ /***/ 23:
141
124
  /***/ (function(module, exports) {
142
125
 
143
126
  module.exports = require("@babel/runtime/helpers/inherits");
144
127
 
145
128
  /***/ }),
146
- /* 22 */
129
+
130
+ /***/ 24:
147
131
  /***/ (function(module, exports) {
148
132
 
149
133
  module.exports = require("@babel/runtime/helpers/possibleConstructorReturn");
150
134
 
151
135
  /***/ }),
152
- /* 23 */
136
+
137
+ /***/ 25:
153
138
  /***/ (function(module, exports) {
154
139
 
155
140
  module.exports = require("@babel/runtime/helpers/getPrototypeOf");
156
141
 
157
142
  /***/ }),
158
- /* 24 */,
159
- /* 25 */,
160
- /* 26 */,
161
- /* 27 */,
162
- /* 28 */,
163
- /* 29 */
143
+
144
+ /***/ 36:
164
145
  /***/ (function(module, exports, __webpack_require__) {
165
146
 
166
147
  "use strict";
@@ -170,11 +151,11 @@ var _classCallCheck = __webpack_require__(17);
170
151
 
171
152
  var _createClass = __webpack_require__(16);
172
153
 
173
- var _inherits = __webpack_require__(21);
154
+ var _inherits = __webpack_require__(23);
174
155
 
175
- var _possibleConstructorReturn = __webpack_require__(22);
156
+ var _possibleConstructorReturn = __webpack_require__(24);
176
157
 
177
- var _getPrototypeOf = __webpack_require__(23);
158
+ var _getPrototypeOf = __webpack_require__(25);
178
159
 
179
160
  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); }; }
180
161
 
@@ -184,12 +165,13 @@ Object.defineProperty(exports, "__esModule", {
184
165
  value: true
185
166
  });
186
167
  exports.DATA_ATTRIBUTE = void 0;
168
+ /* eslint-disable no-param-reassign */
187
169
 
188
- var React = __webpack_require__(2);
170
+ var React = __webpack_require__(1);
189
171
 
190
- var lodash_1 = __webpack_require__(20);
172
+ var lodash_1 = __webpack_require__(21);
191
173
 
192
- var styled_components_1 = __webpack_require__(12);
174
+ var styled_components_1 = __webpack_require__(7);
193
175
 
194
176
  exports.DATA_ATTRIBUTE = 'data-value';
195
177
  var StyledSvgChoropleth = styled_components_1.default.div.withConfig({
@@ -249,7 +231,7 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
249
231
  return;
250
232
  }
251
233
 
252
- var wholeFeature = feature.id ? feature : feature.parentNode; //remove the highlighted country IF we are entering a different country
234
+ var wholeFeature = feature.id ? feature : feature.parentNode; // remove the highlighted country IF we are entering a different country
253
235
 
254
236
  if (_this.highlightedCountry && wholeFeature.id !== _this.highlightedCountry.id) {
255
237
  _this.unHighlightCountry();
@@ -274,13 +256,13 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
274
256
  } // 'wholeFeature' means the SVG <g> (group) of multipolygon features
275
257
 
276
258
 
277
- var wholeFeature = feature.id ? feature : feature.parentNode; //handling feature leaving should always only deal with the highlighted feature
259
+ var wholeFeature = feature.id ? feature : feature.parentNode; // handling feature leaving should always only deal with the highlighted feature
278
260
 
279
261
  if (wholeFeature !== _this.highlightedCountry) {
280
262
  return;
281
263
  }
282
264
 
283
- _this.unHighlightCountry(); //wholeFeature.style.stroke = this.lastFeatureStroke;
265
+ _this.unHighlightCountry(); // wholeFeature.style.stroke = this.lastFeatureStroke;
284
266
 
285
267
 
286
268
  if (_this.props.onFeatureHover) {
@@ -329,6 +311,7 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
329
311
  value: function componentDidUpdate(prevProps) {
330
312
  if (this.props !== prevProps) {
331
313
  if (prevProps.featureCollection !== this.props.featureCollection) {
314
+ // eslint-disable-next-line react/no-did-update-set-state
332
315
  this.setState({
333
316
  svgNode: this.props.featureCollection.getSvgNode(this.registerSvg)
334
317
  });
@@ -336,6 +319,12 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
336
319
  this.updateSvg(this.props);
337
320
  }
338
321
  }
322
+ } // allows a provided alias like 'US-CA' to get mapped to 'California' which is the element id for the SVG shape
323
+
324
+ }, {
325
+ key: "getFeatureId",
326
+ value: function getFeatureId(alias) {
327
+ return this.props.featureCollection.resolveAlias(alias);
339
328
  }
340
329
  /**
341
330
  * this method renders a copy of the polygon on top of all the others, with a highlighted boundary.
@@ -408,12 +397,6 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
408
397
  node.removeAttribute(exports.DATA_ATTRIBUTE);
409
398
  }
410
399
  });
411
- } //allows a provided alias like 'US-CA' to get mapped to 'California' which is the element id for the SVG shape
412
-
413
- }, {
414
- key: "getFeatureId",
415
- value: function getFeatureId(alias) {
416
- return this.props.featureCollection.resolveAlias(alias);
417
400
  }
418
401
  }, {
419
402
  key: "render",
@@ -435,6 +418,14 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
435
418
 
436
419
  exports.default = SvgChoropleth;
437
420
 
421
+ /***/ }),
422
+
423
+ /***/ 7:
424
+ /***/ (function(module, exports) {
425
+
426
+ module.exports = require("styled-components");
427
+
438
428
  /***/ })
439
- /******/ ]);
429
+
430
+ /******/ });
440
431
  //# sourceMappingURL=SvgChoropleth.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"styled-components\"","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"],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;Q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AACH;;;WAED,kBAAM;AAAA,kCAC0C,KAAK,KAD/C,CACM,eADN;AAAA,UACM,eADN,sCACwB,aADxB,0BAEF;;AACA,aACI,oBAAC,mBAAD,EAAoB;AAAA,qBACN,uBADM;AAEhB,uBAAe,EAAE,eAFD;AAGhB,mBAAW,EAAE,KAAK,cAHF;AAIhB,WAAG,EAAE,KAAK;AAJM,OAApB,EAMK,KAAK,KAAL,CAAW,OANhB,CADJ;AAUH;;;;EA3LsC,KAAK,CAAC,S;;AAAjD,gC","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 = 29);\n","module.exports = require(\"react\");","module.exports = require(\"styled-components\");","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\");","import * as React from 'react';\nimport { get, isEqual } from 'lodash';\nimport { ISvgFeatureCollection } from './src/utils/ISvgFeatureCollection';\nimport { DataPoint } from './src/utils/ICoordinateTransformation';\nimport styled from 'styled-components';\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 //lastFeatureStroke: string;\n svgDom: SVGElement;\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 this.setState({\n svgNode: this.props.featureCollection.getSvgNode(this.registerSvg),\n });\n } else {\n this.updateSvg(this.props);\n }\n }\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 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 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 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 //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 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"],"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":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFA,kC;;;;;;;ACAA,+D;;;;;;;ACAA,kE;;;;;;;ACAA,mC;;;;;;;ACAA,4D;;;;;;;ACAA,6E;;;;;;;ACAA,kE;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;AACA;;AACA;;AACA;;AAIa,yBAAiB,YAAjB;AAwBb,IAAM,mBAAmB,GAAG,4BAAO,GAAV;AAAA;AAAA;AAAA,oFAID,UAAC,KAAD;AAAA,SAAmB,KAAK,CAAC,eAAzB;AAAA,CAJC,CAAzB;;IAOqB,a;;;;;AAQjB,yBAAY,KAAZ,EAAqC;AAAA;;AAAA;;AACjC,8BAAM,KAAN;AARJ,yBAAgD,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4B;AACvE,YAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,EAAN,CAA5B;AACA,YAAI,CAAC,KAAL,CAAW,IAAX,GAAkB,aAAI,QAAJ,EAAc,MAAd,KAAyB,SAA3C;AACA,YAAM,KAAK,GAAG,aAAI,QAAJ,EAAc,OAAd,CAAd;;AACA,YAAI,KAAJ,EAAW;AACP,cAAI,CAAC,YAAL,CAAkB,sBAAlB,EAAkC,KAAlC;AACH,SAFD,MAEO;AACH,cAAI,CAAC,eAAL,CAAqB,sBAArB;AACH;AACJ,OATD;AAUH;;;WAED,kBAAM;AAAA,kCAC0C,KAAK,KAD/C,CACM,eADN;AAAA,UACM,eADN,sCACwB,aADxB,0BAEF;;AACA,aACI,oBAAC,mBAAD,EAAoB;AAAA,qBACN,uBADM;AAEhB,uBAAe,EAAE,eAFD;AAGhB,mBAAW,EAAE,KAAK,cAHF;AAIhB,WAAG,EAAE,KAAK;AAJM,OAApB,EAMK,KAAK,KAAL,CAAW,OANhB,CADJ;AAUH;;;;EA9LsC,KAAK,CAAC,S;;AAAjD,gC;;;;;;;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":""}
@@ -87,7 +87,7 @@ module.exports =
87
87
  /******/
88
88
  /******/
89
89
  /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 63);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 69);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
@@ -99,14 +99,28 @@ module.exports = require("prop-types");
99
99
 
100
100
  /***/ }),
101
101
 
102
- /***/ 2:
102
+ /***/ 1:
103
103
  /***/ (function(module, exports) {
104
104
 
105
105
  module.exports = require("react");
106
106
 
107
107
  /***/ }),
108
108
 
109
- /***/ 63:
109
+ /***/ 32:
110
+ /***/ (function(module, exports) {
111
+
112
+ module.exports = require("@splunk/ui-utils/i18n");
113
+
114
+ /***/ }),
115
+
116
+ /***/ 33:
117
+ /***/ (function(module, exports) {
118
+
119
+ module.exports = require("@splunk/visualizations-shared/Message");
120
+
121
+ /***/ }),
122
+
123
+ /***/ 69:
110
124
  /***/ (function(module, exports, __webpack_require__) {
111
125
 
112
126
  "use strict";
@@ -117,15 +131,15 @@ Object.defineProperty(exports, "__esModule", {
117
131
  });
118
132
  exports.SvgChoroplethDynamic = void 0;
119
133
 
120
- var React = __webpack_require__(2);
134
+ var React = __webpack_require__(1);
121
135
 
122
136
  var T = __webpack_require__(0);
123
137
 
124
- var ChoroplethSvg_1 = __webpack_require__(64);
138
+ var ChoroplethSvg_1 = __webpack_require__(70);
125
139
 
126
- var Message_1 = __webpack_require__(65);
140
+ var Message_1 = __webpack_require__(33);
127
141
 
128
- var i18n_1 = __webpack_require__(66);
142
+ var i18n_1 = __webpack_require__(32);
129
143
 
130
144
  var SvgChoroplethDynamic = function SvgChoroplethDynamic(props) {
131
145
  var width = props.width,
@@ -158,25 +172,11 @@ exports.default = exports.SvgChoroplethDynamic;
158
172
 
159
173
  /***/ }),
160
174
 
161
- /***/ 64:
175
+ /***/ 70:
162
176
  /***/ (function(module, exports) {
163
177
 
164
178
  module.exports = require("@splunk/visualizations/ChoroplethSvg");
165
179
 
166
- /***/ }),
167
-
168
- /***/ 65:
169
- /***/ (function(module, exports) {
170
-
171
- module.exports = require("@splunk/visualizations-shared/Message");
172
-
173
- /***/ }),
174
-
175
- /***/ 66:
176
- /***/ (function(module, exports) {
177
-
178
- module.exports = require("@splunk/ui-utils/i18n");
179
-
180
180
  /***/ })
181
181
 
182
182
  /******/ });
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///./src/visualizations/SvgChoroplethDynamic/SvgChoroplethDynamic.tsx","webpack:///external \"@splunk/visualizations/ChoroplethSvg\"","webpack:///external \"@splunk/visualizations-shared/Message\"","webpack:///external \"@splunk/ui-utils/i18n\""],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFA,uC;;;;;;;ACAA,kC;;;;;;;;;;;;;;;ACAA;;AACA;;AACA;;AACA;;AACA;;AAEO,IAAM,oBAAoB,GAAG,SAAvB,oBAAuB,MAAK,EAAG;AAAA,MAChC,KADgC,GACT,KADS,CAChC,KADgC;AAAA,MACzB,MADyB,GACT,KADS,CACzB,MADyB;AAAA,MACjB,GADiB,GACT,KADS,CACjB,GADiB;;AAExC,MAAI,CAAC,GAAL,EAAU;AACN,WACI,oBAAC,iBAAD,EAAQ;AAAA,mBACM,wBADN;AAEJ,WAAK,EAAE,KAFH;AAGJ,YAAM,EAAE,MAHJ;AAIJ,aAAO,EAAE,SAAE,4BAAF;AAJL,KAAR,CADJ;AAQH;;AACD,SAAO,oBAAC,wCAAD,EAAyB,kBAAK,KAAL,CAAzB,CAAP;AACH,CAbM;;AAAM,+BAAoB,oBAApB;AAcb,6BAAqB,SAArB,GAAiC;AAC7B,OAAK,EAAE,CAAC,CAAC,SAAF,CAAY,CAAC,CAAC,CAAC,MAAH,EAAW,CAAC,CAAC,MAAb,CAAZ,CADsB;AAE7B,QAAM,EAAE,CAAC,CAAC,SAAF,CAAY,CAAC,CAAC,CAAC,MAAH,EAAW,CAAC,CAAC,MAAb,CAAZ,CAFqB;AAG7B,KAAG,EAAE,CAAC,CAAC;AAHsB,CAAjC;AAMA,6BAAqB,YAArB,GAAoC;AAChC,OAAK,EAAE,MADyB;AAEhC,QAAM,EAAE;AAFwB,CAApC;AAKA,kBAAe,4BAAf,C;;;;;;;AC/BA,iE;;;;;;;ACAA,kE;;;;;;;ACAA,kD","file":"SvgChoroplethDynamic.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 63);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","import * as React from 'react';\nimport * as T from 'prop-types';\nimport { PureSvgChoroplethDynamic } from '@splunk/visualizations/ChoroplethSvg';\nimport Message from '@splunk/visualizations-shared/Message';\nimport { _ } from '@splunk/ui-utils/i18n';\n\nexport const SvgChoroplethDynamic = props => {\n const { width, height, svg } = props;\n if (!svg) {\n return (\n <Message\n data-test=\"choropleth-svg-message\"\n width={width}\n height={height}\n message={_('No literal SVG is provided')}\n />\n );\n }\n return <PureSvgChoroplethDynamic {...props} />;\n};\nSvgChoroplethDynamic.propTypes = {\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n svg: T.string,\n};\n\nSvgChoroplethDynamic.defaultProps = {\n width: '100%',\n height: 250,\n};\n\nexport default SvgChoroplethDynamic;\n","module.exports = require(\"@splunk/visualizations/ChoroplethSvg\");","module.exports = require(\"@splunk/visualizations-shared/Message\");","module.exports = require(\"@splunk/ui-utils/i18n\");"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualizations-shared/Message\"","webpack:///./src/visualizations/SvgChoroplethDynamic/SvgChoroplethDynamic.tsx","webpack:///external \"@splunk/visualizations/ChoroplethSvg\""],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;Q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AC,MAAb,CAAZ,CAFqB;AAG7B,KAAG,EAAE,CAAC,CAAC;AAHsB,CAAjC;AAMA,6BAAqB,YAArB,GAAoC;AAChC,OAAK,EAAE,MADyB;AAEhC,QAAM,EAAE;AAFwB,CAApC;AAKA,kBAAe,4BAAf,C;;;;;;;AC/BA,iE","file":"SvgChoroplethDynamic.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 69);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualizations-shared/Message\");","import * as React from 'react';\nimport * as T from 'prop-types';\nimport { PureSvgChoroplethDynamic } from '@splunk/visualizations/ChoroplethSvg';\nimport Message from '@splunk/visualizations-shared/Message';\nimport { _ } from '@splunk/ui-utils/i18n';\n\nexport const SvgChoroplethDynamic = props => {\n const { width, height, svg } = props;\n if (!svg) {\n return (\n <Message\n data-test=\"choropleth-svg-message\"\n width={width}\n height={height}\n message={_('No literal SVG is provided')}\n />\n );\n }\n return <PureSvgChoroplethDynamic {...props} />;\n};\nSvgChoroplethDynamic.propTypes = {\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n svg: T.string,\n};\n\nSvgChoroplethDynamic.defaultProps = {\n width: '100%',\n height: 250,\n};\n\nexport default SvgChoroplethDynamic;\n","module.exports = require(\"@splunk/visualizations/ChoroplethSvg\");"],"sourceRoot":""}