@splunk/visualizations 26.4.1 → 27.1.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 (153) hide show
  1. package/Area.config.js +1399 -1590
  2. package/Area.config.js.map +7 -1
  3. package/Area.js +3750 -4822
  4. package/Area.js.map +7 -1
  5. package/Bar.config.js +1423 -1566
  6. package/Bar.config.js.map +7 -1
  7. package/Bar.js +3856 -4884
  8. package/Bar.js.map +7 -1
  9. package/Bubble.config.js +1009 -1200
  10. package/Bubble.config.js.map +7 -1
  11. package/Bubble.js +2768 -4491
  12. package/Bubble.js.map +7 -1
  13. package/ChoroplethSvg.config.js +282 -582
  14. package/ChoroplethSvg.config.js.map +7 -1
  15. package/ChoroplethSvg.js +2032 -3808
  16. package/ChoroplethSvg.js.map +7 -1
  17. package/Column.config.js +1390 -1534
  18. package/Column.config.js.map +7 -1
  19. package/Column.js +3849 -4906
  20. package/Column.js.map +7 -1
  21. package/Ellipse.config.js +443 -774
  22. package/Ellipse.config.js.map +7 -1
  23. package/Ellipse.js +1667 -3327
  24. package/Ellipse.js.map +7 -1
  25. package/Events.config.js +207 -492
  26. package/Events.config.js.map +7 -1
  27. package/Events.js +2643 -4647
  28. package/Events.js.map +7 -1
  29. package/FillerGauge.config.js +420 -775
  30. package/FillerGauge.config.js.map +7 -1
  31. package/FillerGauge.js +2164 -4575
  32. package/FillerGauge.js.map +7 -1
  33. package/Image.config.js +144 -411
  34. package/Image.config.js.map +7 -1
  35. package/Image.js +1423 -3046
  36. package/Image.js.map +7 -1
  37. package/Line.config.js +1421 -1616
  38. package/Line.config.js.map +7 -1
  39. package/Line.js +3790 -4901
  40. package/Line.js.map +7 -1
  41. package/LinkGraph.config.js +390 -632
  42. package/LinkGraph.config.js.map +7 -1
  43. package/LinkGraph.js +5272 -6185
  44. package/LinkGraph.js.map +7 -1
  45. package/MIGRATION.md +6 -0
  46. package/Map.config.js +501 -801
  47. package/Map.config.js.map +7 -1
  48. package/Map.js +3382 -5659
  49. package/Map.js.map +7 -1
  50. package/Markdown.config.js +232 -528
  51. package/Markdown.config.js.map +7 -1
  52. package/Markdown.js +1671 -3212
  53. package/Markdown.js.map +7 -1
  54. package/MarkerGauge.config.js +308 -613
  55. package/MarkerGauge.config.js.map +7 -1
  56. package/MarkerGauge.js +2215 -4531
  57. package/MarkerGauge.js.map +7 -1
  58. package/ParallelCoordinates.config.js +282 -581
  59. package/ParallelCoordinates.config.js.map +7 -1
  60. package/ParallelCoordinates.js +2057 -4718
  61. package/ParallelCoordinates.js.map +7 -1
  62. package/Pie.config.js +278 -547
  63. package/Pie.config.js.map +7 -1
  64. package/Pie.js +2107 -3984
  65. package/Pie.js.map +7 -1
  66. package/Punchcard.config.js +291 -578
  67. package/Punchcard.config.js.map +7 -1
  68. package/Punchcard.js +2734 -5037
  69. package/Punchcard.js.map +7 -1
  70. package/Rectangle.config.js +455 -770
  71. package/Rectangle.config.js.map +7 -1
  72. package/Rectangle.js +1664 -3258
  73. package/Rectangle.js.map +7 -1
  74. package/Sankey.config.js +291 -626
  75. package/Sankey.config.js.map +7 -1
  76. package/Sankey.js +2766 -4908
  77. package/Sankey.js.map +7 -1
  78. package/Scatter.config.js +988 -1180
  79. package/Scatter.config.js.map +7 -1
  80. package/Scatter.js +2801 -4506
  81. package/Scatter.js.map +7 -1
  82. package/SingleValue.config.js +794 -1250
  83. package/SingleValue.config.js.map +7 -1
  84. package/SingleValue.js +4185 -7327
  85. package/SingleValue.js.map +7 -1
  86. package/SingleValueBasic.js +382 -1527
  87. package/SingleValueBasic.js.map +7 -1
  88. package/SingleValueIcon.config.js +757 -1207
  89. package/SingleValueIcon.config.js.map +7 -1
  90. package/SingleValueIcon.js +3427 -6293
  91. package/SingleValueIcon.js.map +7 -1
  92. package/SingleValueRadial.config.js +686 -1121
  93. package/SingleValueRadial.config.js.map +7 -1
  94. package/SingleValueRadial.js +3923 -6994
  95. package/SingleValueRadial.js.map +7 -1
  96. package/SparkLine.js +439 -746
  97. package/SparkLine.js.map +7 -1
  98. package/TRELLIS.md +16 -15
  99. package/Table.config.js +565 -879
  100. package/Table.config.js.map +7 -1
  101. package/Table.js +3260 -5334
  102. package/Table.js.map +7 -1
  103. package/common/Charting.js +617 -1498
  104. package/common/Charting.js.map +7 -1
  105. package/common/ChartingApi.js +46 -170
  106. package/common/ChartingApi.js.map +7 -1
  107. package/common/DocExampleWithVizSandbox.js +270 -473
  108. package/common/DocExampleWithVizSandbox.js.map +7 -1
  109. package/common/EventsDoc.js +172 -464
  110. package/common/EventsDoc.js.map +7 -1
  111. package/common/GaugeMajorTicks.js +249 -347
  112. package/common/GaugeMajorTicks.js.map +7 -1
  113. package/common/GaugeValueMarker.js +201 -311
  114. package/common/GaugeValueMarker.js.map +7 -1
  115. package/common/OptionsDoc.js +351 -911
  116. package/common/OptionsDoc.js.map +7 -1
  117. package/common/OverviewDoc.js +435 -769
  118. package/common/OverviewDoc.js.map +7 -1
  119. package/common/SplunkVisualization.js +116 -259
  120. package/common/SplunkVisualization.js.map +7 -1
  121. package/common/SplunkVisualizationApi.js +40 -156
  122. package/common/SplunkVisualizationApi.js.map +7 -1
  123. package/common/ThemesDoc.js +271 -420
  124. package/common/ThemesDoc.js.map +7 -1
  125. package/common/chartingUtils.js +140 -312
  126. package/common/chartingUtils.js.map +7 -1
  127. package/common/docUtils.js +148 -266
  128. package/common/docUtils.js.map +7 -1
  129. package/common/gaugeUtils.js +280 -808
  130. package/common/gaugeUtils.js.map +7 -1
  131. package/common/shapeUtils.js +106 -211
  132. package/common/shapeUtils.js.map +7 -1
  133. package/common/utils/configUtils.js +126 -252
  134. package/common/utils/configUtils.js.map +7 -1
  135. package/common/utils/dataUtils.js +217 -812
  136. package/common/utils/dataUtils.js.map +7 -1
  137. package/common/utils/featureFlagUtils.js +53 -133
  138. package/common/utils/featureFlagUtils.js.map +7 -1
  139. package/common/utils/hocUtils.js +32 -122
  140. package/common/utils/hocUtils.js.map +7 -1
  141. package/common/utils/mapUtils.js +502 -1337
  142. package/common/utils/mapUtils.js.map +7 -1
  143. package/common/utils/singleValueUtils.js +466 -1013
  144. package/common/utils/singleValueUtils.js.map +7 -1
  145. package/common/utils/testHelper.js +92 -146
  146. package/common/utils/testHelper.js.map +7 -1
  147. package/common/utils/trellisUtils.js +277 -489
  148. package/common/utils/trellisUtils.js.map +7 -1
  149. package/common/utils/urlUtils.js +28 -112
  150. package/common/utils/urlUtils.js.map +7 -1
  151. package/common/withDashboardViz.js +1191 -2431
  152. package/common/withDashboardViz.js.map +7 -1
  153. package/package.json +53 -45
@@ -1 +1,7 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///external \"@splunk/visualizations-shared/numberUtils\"","webpack:///./src/SingleValueBasic/TrendValue.jsx","webpack:///./src/SingleValueBasic/MajorValue.jsx","webpack:///./src/SingleValueBasic/SingleValueBasic.jsx","webpack:///external \"@splunk/react-icons/enterprise/ArrowUp\"","webpack:///external \"@splunk/react-icons/enterprise/ArrowDown\"","webpack:///external \"cssesc\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///./src/common/utils/singleValueUtils.js","webpack:///external \"lodash\"","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualizations-shared/propUtils\"","webpack:///external \"styled-components\"","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///external \"@splunk/visualizations-shared/colorConstants\"","webpack:///external \"@splunk/visualizations-shared/domUtils\""],"names":["Column","styled","props","parseInt","Text","SingleValueContent","fontSize","color","value","text","TrendIndicator","ariaLabel","parseFloat","_","T","string","Row","validUnitPositions","unitPosition","title","onValueClick","unit","sanitizedUnit","cssesc","wrap","quotes","sanitizedUnitPosition","handleKeyDown","e","getAligment","SingleValueBasic","majorColor","majorTextFontSize","majorText","majorValueTitle","trendColor","trendTextFontSize","trendText","showTrendIndicator","underLabel","underLabelFontSize","underLabelColor","align","trendIndicatorEnabled","SingleValueTrendValue","DEFAULT_FONT","DEFAULT_FONT_FAMILY","SVR_PADDING","top","bottom","left","right","alignMap","center","shouldShowTrend","trendDisplay","isLoadingOrNoColumns","data","get","noColumns","loading","getFormattedColor","formatColor","hasBackground","backgroundColor","isIdenticalColor","colorA","colorB","getDefaultColorWithBg","defaultFontColor","defaultBlockFontColor","getMajorColor","getTrendColor","trendValue","majorValue","customizedBgColor","defaultColors","Number","defaultBackgroundColor","isInvalidTrend","computeColors","backgroundEnabled","computeText","numberPrecision","shouldUseThousandSeparators","shouldAbbreviateValue","formatNumber","useThousandSeparators","useTrendUnits","getMajorText","shouldAbbreviateMajorValue","getTrendText","shouldAbbreviateTrendValue","compute","isNumerial","showPercent","diff","Math","val","computeFontSize","width","height","fontFamily","fontWeight","widthInDefaultFont","computeTextSize","getMajorFontSize","spaceRatio","majorTextCalc","getTrendFontSize","trendFontSize","getUnderLabelHeight","getUnderLabel","getMajorAndTrend","majorFontSize","majorTextSpaceRatio","textContentWidth","textContentHeight","updateVizInSmallSpace","toRemoveList","removeIndex","newProps","newMajorAndTrend","newTextSize","toRemove","truncateValue","updatedProps","computeSingleValueContent","contentWidth","contentHeight","containerWidth","containerHeight","smallVizProps","minimallyTruncateStringToWidth","textWidth","modifiedText","ellipsesLength","computeSingleValueRadialContent","smallViz","getGraphColors","customColorFormatter","adjustRGB","rgb","changeColor","hex","r","g","b","newR","newG","newB","ratio","lighten","darken","handleValueClickCallback","trellisEnabled","trellisSplityBy","trellisKey","payload","name","majorValueField"],"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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AACA;AACA;AACA;AACA;AACA;;;AACO,IAAME,OAAO,GAAG,SAAVA,OAAU,QAAK;AAAA,SAAIT,WAAW,QAAf,GAAe,CAAf;AAArB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,IAAMU,MAAM,GAAG,SAATA,MAAS,QAAK;AAAA,SAAIV,WAAW,QAAf,GAAe,CAAf;AAApB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,IAAMW,wBAAwB,GAAG,SAA3BA,wBAA2B,4DASnC;AAAA,MAHDC,cAGC,uEAHgB,KAGhB;AAAA,MAFDC,eAEC,uEAFiB,EAEjB;AAAA,MADDC,UACC,uEADY,EACZ;AACD,MAAIC,OAAO,GAAG;AACVrF,cAAU,EADA;AAEVjE,SAAK,EAFK;AAGVuJ,QAAI,EAAEC;AAHI,GAAd;;AAKA,sBAAoB;AAChBF,WAAO;AAAiB,sBAAjB;AAAkD,uBAAiBD;AAAnE,MAAPC;AACH;;AACD,SAAO1I,YAAY;AAAU0I,WAAO,EAAPA;AAAV,KAAnB;AAlBG,E;;;;;;;ACr4BP,mC;;;;;;;ACAA,kD;;;;;;;ACAA,oE;;;;;;;ACAA,8C;;;;;;;ACAA,2D;;;;;;;ACAA,yE;;;;;;;ACAA,mE","file":"SingleValueBasic.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 = 101);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"@splunk/visualizations-shared/numberUtils\");","import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport ArrowUp from '@splunk/react-icons/enterprise/ArrowUp';\nimport ArrowDown from '@splunk/react-icons/enterprise/ArrowDown';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport { DEFAULT_FONT_FAMILY } from '../common/utils/singleValueUtils';\n\nconst Column = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: ${props => props.justify || 'flex-end'};\n height: ${props => props.size || 12}px;\n ${props => (props.size ? `margin: 0 ${parseInt(props.size, 10) * 0.2 || 5}px;` : '')};\n`;\n\nconst Text = styled.div`\n white-space: nowrap;\n font-size: ${props => props.size || 12}px;\n color: ${props => props.color || '#000'};\n font-family: ${DEFAULT_FONT_FAMILY};\n height: ${props => props.size || 12}px;\n line-height: ${props => props.size || 12}px;\n display: flex;\n align-self: baseline;\n ${props => (props.size ? `margin-left: ${parseInt(props.size, 10) * 0.2 || 5}px;` : '')};\n`;\n\nconst SingleValueContent = ({ fontSize, color, value, text }) => {\n let TrendIndicator = false;\n let ariaLabel = false;\n\n if (parseFloat(value, 10) > 0) {\n TrendIndicator = ArrowUp;\n ariaLabel = _('increase');\n } else if (parseFloat(value, 10) < 0) {\n TrendIndicator = ArrowDown;\n ariaLabel = _('decrease');\n }\n\n return (\n <Column justify=\"flex-end\" size={fontSize}>\n <Text data-test=\"trendValueIndicator\" size={fontSize} color={color}>\n {TrendIndicator && <TrendIndicator aria-label={ariaLabel} />}\n </Text>\n <Text data-test=\"trendValue\" size={fontSize} color={color}>\n {`${text}`}\n </Text>\n </Column>\n );\n};\n\nSingleValueContent.propTypes = {\n fontSize: T.number,\n color: T.string,\n value: T.oneOfType([T.string, T.number]),\n text: T.string,\n};\n\nexport default SingleValueContent;\n","import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport cssesc from 'cssesc';\nimport { DEFAULT_FONT_FAMILY } from '../common/utils/singleValueUtils';\n\nconst Row = styled.div`\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n justify-content: left;\n height: ${props => props.size}px;\n line-height: ${props => props.size}px;\n`;\n\nconst Text = styled.div`\n white-space: nowrap;\n height: 100%;\n font-size: ${props => props.size || 12}px;\n color: ${props => props.color};\n font-family: ${DEFAULT_FONT_FAMILY};\n font-weight: bold;\n &:hover {\n text-decoration: ${props => (props.showUnderline ? 'underline' : 'inherit')};\n cursor: ${props => (props.showUnderline ? 'pointer' : 'inherit')};\n }\n ${props => {\n if (!props.pseudoContent || !props.pseudoContentPosition) {\n return '';\n }\n return `&:${props.pseudoContentPosition} {\n // by default this pseudo element would inherit text-decoration from main element\n // and text-decoration could not be overwritten.\n // adding display: inline-block makes text decoration independent from main element.\n // => the unit will not be underlined if a user hovers over the main value\n display: inline-block;\n font-size: ${props.pseudoContentFontSize}px;\n position: relative;\n font-weight: normal;\n content: ${props.pseudoContent};\n }`;\n }}\n`;\n\nconst validUnitPositions = ['before', 'after'];\n\nconst SingleValueContent = ({ color, fontSize, unitPosition, title, value, onValueClick, unit }) => {\n let sanitizedUnit;\n let sanitizedUnitPosition;\n\n if (typeof unit === 'string') {\n sanitizedUnit = cssesc(unit, { wrap: true, quotes: 'double' });\n if (typeof unitPosition === 'string' && validUnitPositions.includes(unitPosition)) {\n sanitizedUnitPosition = unitPosition;\n } else {\n sanitizedUnitPosition = 'after';\n }\n }\n\n const handleKeyDown = e => {\n if (e.keyCode !== 13) {\n return;\n }\n e.preventDefault();\n onValueClick(e);\n };\n\n return (\n <Row size={fontSize}>\n <Text\n data-test=\"majorValue\"\n color={color}\n onClick={e => typeof onValueClick === 'function' && onValueClick(e)}\n showUnderline={!!onValueClick}\n size={fontSize}\n title={title}\n pseudoContent={sanitizedUnit}\n pseudoContentPosition={sanitizedUnitPosition}\n pseudoContentFontSize={fontSize * 0.6}\n tabIndex=\"0\"\n role=\"button\"\n onKeyDown={handleKeyDown}\n >\n {value}\n </Text>\n </Row>\n );\n};\n\nSingleValueContent.propTypes = {\n color: T.string,\n fontSize: T.number,\n unit: T.string,\n unitPosition: T.oneOf(validUnitPositions),\n value: T.oneOfType([T.string, T.number]),\n title: T.oneOfType([T.string, T.number]),\n onValueClick: T.oneOfType([T.bool, T.func]),\n};\n\nexport default SingleValueContent;\n","import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport { DEFAULT_FONT_FAMILY, getAligment } from '../common/utils/singleValueUtils';\nimport TrendValue from './TrendValue';\nimport MajorValue from './MajorValue';\n\nconst Column = styled.div`\n display: flex;\n flex-direction: column;\n align-self: center;\n justify-content: center;\n`;\n\nconst Row = styled.div`\n display: flex;\n flex-direction: row;\n align-items: ${props => props.alignItems || 'center'};\n justify-content: ${props => getAligment(props.align)};\n`;\n\nconst Text = styled.div`\n font-weight: normal;\n white-space: nowrap;\n font-size: ${props => props.size || 12}px;\n color: ${props => props.color || '#000'};\n font-family: ${DEFAULT_FONT_FAMILY};\n height: ${props => props.size || 12}px;\n line-height: 1.2;\n margin: ${props => props.margin || 'inherit'};\n`;\n\nconst SingleValueBasic = ({ ...props }) => {\n const {\n majorColor,\n majorTextFontSize,\n majorText,\n majorValueTitle,\n trendColor,\n trendTextFontSize,\n trendText,\n showTrendIndicator,\n unit,\n unitPosition,\n underLabel,\n underLabelFontSize,\n underLabelColor,\n onValueClick,\n align,\n } = props;\n const trendIndicatorEnabled = trendText !== '' && showTrendIndicator;\n\n return (\n <Column>\n <Row\n alignItems=\"baseline\"\n align={align}\n data-test={`single-value-row-align-${getAligment(align)}`}\n >\n <MajorValue\n color={majorColor}\n fontSize={majorTextFontSize}\n unit={unit}\n unitPosition={unitPosition}\n value={majorText}\n title={majorValueTitle}\n onValueClick={onValueClick}\n />\n {trendIndicatorEnabled && (\n // Passing the same value for value and text is a temporary hold until completion of https://jira.splunk.com/browse/SCP-21371\n <TrendValue\n fontSize={trendTextFontSize}\n color={trendColor}\n value={trendText}\n text={trendText}\n />\n )}\n </Row>\n {underLabel && (\n <Row\n justify=\"center\"\n align={align}\n data-test={`single-value-row-align-${getAligment(align)}`}\n >\n <Text\n data-test=\"underLabel\"\n size={underLabelFontSize}\n color={underLabelColor}\n margin=\"0 6px\"\n >\n {underLabel}\n </Text>\n </Row>\n )}\n </Column>\n );\n};\n\nSingleValueBasic.propTypes = {\n majorText: T.string,\n majorColor: T.string,\n majorTextFontSize: T.number,\n majorValueTitle: T.string,\n trendText: T.string,\n trendTextFontSize: T.number,\n trendColor: T.string,\n showTrendIndicator: T.bool,\n unit: T.string,\n unitPosition: T.oneOf(['before', 'after']),\n underLabel: T.string,\n underLabelFontSize: T.number,\n underLabelColor: T.string,\n onValueClick: T.oneOfType([T.bool, T.func]),\n align: T.string,\n};\n\nexport const SingleValueTrendValue = TrendValue;\nexport default SingleValueBasic;\n","module.exports = require(\"@splunk/react-icons/enterprise/ArrowUp\");","module.exports = require(\"@splunk/react-icons/enterprise/ArrowDown\");","module.exports = require(\"cssesc\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","import { get } from 'lodash';\nimport { isNumerial, formatNumber } from '@splunk/visualizations-shared/numberUtils';\nimport { computeTextSize } from '@splunk/visualizations-shared/domUtils';\nimport { formatColor } from '@splunk/visualizations-shared/propUtils';\nimport { DELTA_GREEN, DELTA_RED } from '@splunk/visualizations-shared/colorConstants';\n\nexport const DEFAULT_FONT = 12;\nexport const DEFAULT_FONT_FAMILY =\n '\"Splunk Platform Sans\", \"Proxima Nova\", \"Helvetica Neue\", Helvetica, Arial, sans-serif';\n\nexport const SVR_PADDING = { top: 12, bottom: 12, left: 16, right: 16 };\n\nexport const getAligment = align => {\n const alignMap = {\n left: 'start',\n center: 'center',\n right: 'end',\n };\n return alignMap[align] || 'center';\n};\n\n/**\n * @method shouldShowTrend\n * @param {String} trendDisplay\n * @returns {Bool}\n */\nexport const shouldShowTrend = trendDisplay => trendDisplay === 'absolute' || trendDisplay === 'percent';\n\n/**\n * @method isLoadingOrNoColumns\n * @param {Object} dataSources\n * @param {Boolean} loading\n * @returns {Boolean} return true if loading or without columns in dataSources\n */\nexport const isLoadingOrNoColumns = (dataSources, loading) => {\n const data = get(dataSources, 'primary.data.columns[0]', undefined);\n const noColumns = data === undefined;\n return loading || noColumns;\n};\n\n/**\n * Retrieve the valid formatted color\n * @method getFormattedColor\n * @param {String} color\n * @param {String} defaultColor\n * @returns {String} the formatted color\n */\nexport const getFormattedColor = (color, defaultColor) => formatColor(color) || formatColor(defaultColor);\n\n/**\n * Determines if there is a background color\n * @method hasBackground\n * @param {String} backgroundColor\n * @returns true for non-transparent background color\n */\nexport const hasBackground = backgroundColor => !!backgroundColor && backgroundColor !== 'transparent';\n\n/**\n * @method isIdenticalColor\n * @param {String} colorA\n * @param {String} colorB\n * @returns {Boolean}\n */\nexport const isIdenticalColor = (colorA, colorB) =>\n !!colorA && !!colorB && formatColor(colorA.toLowerCase()) === formatColor(colorB.toLowerCase());\n\n/*\n * @method getDefaultColorWithBg\n * @param {Object} props\n * @param {String} props.backgroundColor\n * @param {String} props.defaultFontColor\n * @param {String} props.defaultBlockFontColor\n * @returns {String} defaultColor\n */\nexport const getDefaultColorWithBg = ({ backgroundColor, defaultFontColor, defaultBlockFontColor }) =>\n isIdenticalColor(backgroundColor, defaultBlockFontColor) ? defaultFontColor : defaultBlockFontColor;\n\n/*\n * @method getMajorColor\n * return formatted majorColor.\n * @param {Object} props\n * @param {String} props.majorColor\n * @param {String} props.backgroundColor\n * @param {String} props.defaultFontColor\n * @param {String} props.defaultBlockFontColor\n * @returns {String} majorColor\n */\nexport const getMajorColor = ({ majorColor, backgroundColor, defaultFontColor, defaultBlockFontColor }) => {\n // If backgroundColor is set, but no majorColor,\n // the default majorColor will turn to be defaultBlockFontColor.\n // eg: major color will turn to be white in enterprise mode.\n // however, if the bgColor is the same as defaultBlockFontColor, use defaultFontColor.\n if (hasBackground(backgroundColor) && !majorColor) {\n return getDefaultColorWithBg({\n backgroundColor,\n defaultFontColor,\n defaultBlockFontColor,\n });\n }\n\n return getFormattedColor(majorColor, defaultFontColor);\n};\n\n/**\n * Get the color for the trend components\n * @method getTrendColor\n * @param {Object} props\n * @param {String} props.trendColor The trendColor value determined from encoding\n * @param {Number} props.trendValue\n * @param {Number} props.majorValue\n * @param {String} props.customizedBgColor\n * @param {String} props.trendDisplay absolute || percent || off\n * @param {Object} defaultColors\n * @returns {String} trendColor\n */\nexport const getTrendColor = ({\n trendColor,\n trendValue,\n majorValue,\n customizedBgColor,\n trendDisplay,\n defaultColors,\n}) => {\n if (trendColor) {\n return trendColor;\n }\n\n if (Number.isNaN(Number(trendValue))) {\n return undefined;\n }\n\n const { defaultFontColor, defaultBlockFontColor, defaultBackgroundColor } = defaultColors;\n\n // if user defined a backgroundColor, the default trend color will be defaultBlockFontColor\n if (\n hasBackground(customizedBgColor) &&\n !isIdenticalColor(customizedBgColor, defaultBackgroundColor) &&\n !isIdenticalColor(customizedBgColor, defaultBlockFontColor)\n ) {\n return defaultBlockFontColor;\n }\n\n // if trendDisplay is percent, and trendValue === value\n // the trend percent = trendValue / (value - trendValue) will return Infinity\n const isInvalidTrend = trendDisplay === 'percent' && trendValue === parseFloat(majorValue);\n\n if (trendValue === 0 || isInvalidTrend) {\n return defaultFontColor;\n }\n\n return trendValue > 0 ? DELTA_GREEN : DELTA_RED;\n};\n\n/**\n * Computes visualization properties for display component\n * @method computeColors\n * @param {Object} props all viz props\n * @param {Object} defaultColors defaultColors from theme\n * @returns {Object} result\n * @returns {Boolean} backgroundEnabled\n * @returns {String} backgroundColor\n * @returns {String} majorColor\n * @returns {String} trendColor\n * @returns {String} underLabelColor\n */\nexport const computeColors = (props, defaultColors) => {\n const backgroundColor = getFormattedColor(props.backgroundColor, defaultColors.defaultBackgroundColor);\n const backgroundEnabled = hasBackground(backgroundColor);\n const majorColor = getMajorColor({\n majorColor: props.majorColor,\n backgroundColor,\n defaultFontColor: defaultColors.defaultFontColor,\n defaultBlockFontColor: defaultColors.defaultBlockFontColor,\n });\n const trendColor = getTrendColor({\n trendColor: props.trendColor,\n trendValue: props.trendValue,\n majorValue: props.majorValue,\n customizedBgColor: props.backgroundColor,\n trendDisplay: props.trendDisplay,\n defaultColors,\n });\n // todo: need change it to not depend on majorColor\n const underLabelColor = majorColor;\n\n return {\n backgroundColor,\n backgroundEnabled,\n majorColor,\n trendColor,\n underLabelColor,\n };\n};\n\n/**\n * Format and return the value (major/trend)\n * @method computeText\n * @param {Object} props\n * @param {Number} props.value // The major/trend value\n * @param {Number} props.numberPrecision\n * @param {Bool} props.shouldUseThousandSeparators\n * @param {Bool} props.shouldAbbreviateValue\n * @returns {Number} major or trend text\n */\nexport const computeText = ({\n value,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateValue,\n}) => {\n let text = isNumerial(value)\n ? formatNumber(value, numberPrecision, {\n useThousandSeparators: shouldUseThousandSeparators, // todo: need update formatNumber\n useTrendUnits: shouldAbbreviateValue,\n })\n : value;\n // When text is undefined, return empty string\n text = text || '';\n return text;\n};\n\n/*\n * @method getMajorText\n * @param {Object} props\n * @param {Number} props.majorValue\n * @param {Number} props.numberPrecision\n * @param {Bool} props.shouldUseThousandSeparators\n * @param {Bool} props.shouldAbbreviateMajorValue\n * @returns {String} majorText\n */\nexport const getMajorText = ({\n majorValue,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateMajorValue,\n}) =>\n computeText({\n value: majorValue === null ? 'N/A' : majorValue, // if majorValue is null, use `N/A`.\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateValue: shouldAbbreviateMajorValue,\n });\n\n/*\n * @method getTrendText\n * @param {Object} props\n * @param {Number} props.majorValue\n * @param {Number} props.trendValue\n * @param {String} props.trendDisplay\n * @param {Number} props.numberPrecision\n * @param {Bool} props.shouldUseThousandSeparators\n * @param {Bool} props.shouldAbbreviateTrendValue\n * @returns {String} trendText\n */\nexport const getTrendText = ({\n majorValue,\n trendValue,\n trendDisplay,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n}) => {\n const compute = value =>\n computeText({\n value,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateValue: shouldAbbreviateTrendValue,\n });\n\n if (trendValue === '' || !isNumerial(trendValue)) {\n return '';\n }\n const showPercent = trendDisplay === 'percent';\n if (!showPercent) {\n return compute(trendValue);\n }\n\n const diff = Math.abs(trendValue - majorValue);\n let val = Math.round((trendValue / diff) * 100);\n if (trendValue === 0 && diff === 0) {\n val = 0;\n }\n\n if (!Number.isFinite(val)) {\n return 'N/A';\n }\n const text = compute(val);\n\n return `${text}%`;\n};\n\n/**\n * Helper to determine the font size for an element\n * @method computeFontSize\n * @param {String} text The string to find a size for\n * @param {Object} dimensions\n * @param {Number} dimensions.width The width of the container\n * @param {Number} dimensions.height The height of the container\n * @param {String} [fontFamily='\"Splunk Platform Sans\" ...'] The font being used\n * @param {String} [fontWeight='normal'] Boldness of font\n * @returns {Number} The size to use for fontSize styles\n */\nexport const computeFontSize = (\n text,\n { width, height },\n fontFamily = DEFAULT_FONT_FAMILY,\n fontWeight = 'normal'\n) => {\n const widthInDefaultFont = computeTextSize(text, `${fontWeight} ${DEFAULT_FONT}px ${fontFamily}`);\n const fontSize = Math.min(\n (width / widthInDefaultFont) * DEFAULT_FONT,\n (height / DEFAULT_FONT) * DEFAULT_FONT\n );\n return parseInt(fontSize, 10);\n};\n\n/*\n * @method getMajorFontSize\n * @param {Object} props\n * @param {Number} props.width\n * @param {Number} props.height\n * @param {String} props.unit\n * @param {String} props.majorText\n * @param {Number} props.spaceRatio\n * @returns {Number} majorFontSize\n */\nexport const getMajorFontSize = ({ width, height, unit, majorText, spaceRatio = 1 }) => {\n const majorTextCalc = unit ? `${unit}${majorText}` : majorText;\n return computeFontSize(majorTextCalc, {\n width: width * spaceRatio,\n height,\n });\n};\n\n/*\n * @method getTrendFontSize\n * @param {Object} props\n * @param {Number} props.width\n * @param {Number} props.height\n * @param {String} props.trendText\n * @param {Number} props.spaceRatio\n * @returns {Number} trendFontSize\n */\nexport const getTrendFontSize = ({ width, height, trendText, spaceRatio = 1 }) => {\n let trendFontSize = 12;\n if (spaceRatio > 0) {\n trendFontSize = computeFontSize(trendText, {\n width: width * spaceRatio,\n height,\n });\n trendFontSize = parseInt(trendFontSize, 10) * spaceRatio;\n }\n return trendFontSize;\n};\n\n/*\n * The height of underLabel should no more than 12px\n * @param {Number} height\n * @return {Number} height || DEFAULT_FONT\n */\nexport const getUnderLabelHeight = height => (height > DEFAULT_FONT ? DEFAULT_FONT : height);\n\n/*\n * @param {Object} config\n * @param {String} underLabel\n * @param {Number} width width of underLabel\n * @param {Number} height height of underLabel\n * @param {Number} fond size of underLabel\n */\nexport const getUnderLabel = ({ underLabel, width, height }) =>\n // todo: may need truncate underLabel later\n computeFontSize(underLabel, {\n width,\n height,\n });\n\n/**\n * Compute value and font size for major and trend\n * @method getMajorAndTrend\n * @param {Object} props\n * @param {Number} props.width // Width of the text container\n * @param {Number} props.height // Height of the text container\n * @param {Number} props.majorValue // Major value\n * @param {Number} props.trendValue // Trend value\n * @param {Number} props.majorFontSize\n * @param {Number} props.trendFontSize\n * @param {String} props.trendDisplay\n * @param {String} props.unit // Unit for the value\n * @param {Number} props.numberPrecision\n * @param {Bool} props.shouldUseThousandSeparators\n * @param {Bool} props.shouldAbbreviateTrendValue\n * @param {Bool} props.shouldAbbreviateMajorValue\n * @returns {Number, Number, Number, Number} Major text, trend text, major text size, trend text size\n */\nexport const getMajorAndTrend = ({\n width,\n height,\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n trendDisplay,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n shouldAbbreviateMajorValue,\n}) => {\n const majorTextSpaceRatio = isNumerial(trendValue) && shouldShowTrend(trendDisplay) ? 0.6 : 1;\n const textContentWidth = width * 0.9;\n const textContentHeight = height * 0.9;\n const majorText = getMajorText({\n majorValue,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateMajorValue,\n });\n const majorTextFontSize =\n majorFontSize ||\n getMajorFontSize({\n width: textContentWidth,\n height: textContentHeight,\n unit,\n majorText,\n spaceRatio: majorTextSpaceRatio,\n });\n const trendText = getTrendText({\n majorValue,\n trendValue,\n trendDisplay,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n });\n\n const trendTextFontSize =\n trendFontSize ||\n getTrendFontSize({\n width: textContentWidth,\n height: textContentHeight,\n trendText,\n spaceRatio: 1 - majorTextSpaceRatio,\n });\n\n return {\n majorText,\n majorTextFontSize,\n trendText,\n trendTextFontSize,\n };\n};\n\n/*\n * @method updateVizInSmallSpace\n * @param {Object} props\n * @param {Number} props.width // Width of the text container\n * @param {Number} props.height // Height of the text container\n * @param {Object} props.toRemoveList\n * @param {Number} props.majorValue // Major value\n * @param {Number} props.trendValue // Trend value\n * @param {Number} props.majorFontSize\n * @param {Number} props.trendFontSize\n * @param {Number} props.majorTextFontSize\n * @param {String} props.unit // Unit for the value\n * @param {Number} props.numberPrecision\n * @param {Bool} props.shouldUseThousandSeparators\n * @param {Bool} props.shouldAbbreviateTrendValue\n * @returns {Object} results\n * @returns {Object} results.newMajorAndTrend\n * @returns {Object} results.updatedProps\n */\nexport const updateVizInSmallSpace = ({\n width,\n height,\n toRemoveList,\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n majorTextFontSize,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n}) => {\n let removeIndex = 0;\n let newProps = {}; // options need to be updated\n let newMajorAndTrend = {};\n let newTextSize = majorTextFontSize;\n\n // remove info on viz to make textFontSize >= 12px;\n while (newTextSize < 12 && removeIndex < toRemoveList.length) {\n const toRemove = toRemoveList[removeIndex];\n newProps = {\n ...newProps,\n ...{\n [toRemove.key]: toRemove.value,\n },\n };\n\n newMajorAndTrend = getMajorAndTrend({\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n width,\n height,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n ...newProps,\n });\n\n newTextSize = newMajorAndTrend.majorTextFontSize;\n removeIndex += 1;\n }\n\n // truncate text if textFontSize is still less than 12\n if (newTextSize < 12) {\n const truncateValue = `${majorValue.toString().slice(0, 3)}...`;\n newMajorAndTrend = getMajorAndTrend({\n majorValue: truncateValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n width,\n height,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n ...newProps,\n });\n }\n\n return { newMajorAndTrend, updatedProps: newProps };\n};\n\n/*\n * @method computeSingleValueContent\n * @param {Object} props\n * @param {Number} props.contentWidth\n * @param {Number} props.contentHeight\n * @param {Number} props.containerWidth\n * @param {Number} props.containerHeight\n * @param {Number} props.majorValue // Major value\n * @param {Number} props.trendValue // Trend value\n * @param {Number} props.majorFontSize\n * @param {Number} props.trendFontSize\n * @param {String} props.trendDisplay\n * @param {String} props.unit // Unit for the value\n * @param {Number} props.numberPrecision\n * @param {Bool} props.shouldUseThousandSeparators\n * @param {Bool} props.shouldAbbreviateTrendValue\n * @param {Bool} props.shouldAbbreviateMajorValue\n * @param {Object} props.toRemoveList\n * @returns {Object} results\n * @returns {String} results.majorText\n * @returns {String} results.trendText\n * @returns {Number} results.majorTextFontSize\n * @returns {Number} results.trendTextFontSize\n * @returns {String} results.majorValueTitle\n * @returns {Object} results.smallVizProps\n */\nexport const computeSingleValueContent = ({\n contentWidth,\n contentHeight,\n containerWidth,\n containerHeight,\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n trendDisplay,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n shouldAbbreviateMajorValue,\n toRemoveList,\n}) => {\n let { majorText, trendText, majorTextFontSize, trendTextFontSize } = getMajorAndTrend({\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n trendDisplay,\n width: contentWidth,\n height: contentHeight,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n shouldAbbreviateMajorValue,\n });\n const majorValueTitle = majorText;\n let smallVizProps = {};\n\n // update viz in small space\n // if textFontSize is less than 12, remove extra info like sparkline, trendvalue, unit\n // or truncate major value to make the major font size >= 12\n if (majorTextFontSize < 12) {\n const { newMajorAndTrend, updatedProps } = updateVizInSmallSpace({\n width: containerWidth,\n height: containerHeight,\n toRemoveList,\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n majorTextFontSize,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n });\n\n ({ majorText, trendText, majorTextFontSize, trendTextFontSize } = newMajorAndTrend);\n smallVizProps = updatedProps;\n }\n return {\n majorText,\n trendText,\n majorTextFontSize,\n trendTextFontSize,\n majorValueTitle,\n smallVizProps,\n };\n};\n\nexport const minimallyTruncateStringToWidth = ({\n text,\n fontSize = DEFAULT_FONT,\n fontFamily = DEFAULT_FONT_FAMILY,\n fontWeight = 'normal',\n containerWidth,\n}) => {\n let textWidth = computeTextSize(text, `${fontWeight} ${fontSize}px ${fontFamily}`);\n let modifiedText = text;\n\n const ellipsesLength = computeTextSize('...', `${fontWeight} ${fontSize}px ${fontFamily}`);\n // `containerWidth - ellipsesLength > 0` condition ensures space even exists for text.\n if (containerWidth - ellipsesLength > 0 && textWidth > containerWidth) {\n // Truncates the content such that the truncated value + ellipses fit within the allocated space for the ellipses.\n // `textWidth > containerWidth - ellipsesLength` condition checks if text + ellipses exceeds container width.\n // `text.length > 1` condition included to keep at least the first number.\n while (textWidth + ellipsesLength > containerWidth && modifiedText.length > 1) {\n modifiedText = modifiedText.substring(0, modifiedText.length - 1);\n textWidth = computeTextSize(modifiedText, `normal ${fontSize}px ${fontFamily}`);\n }\n\n modifiedText = `${modifiedText}...`;\n }\n\n return modifiedText;\n};\n\n/*\n * @method computeSingleValueRadialContent\n * @param {Object} props\n * @param {Number} props.contentWidth\n * @param {Number} props.contentHeight\n * @param {Number} props.containerWidth\n * @param {Number} props.containerHeight\n * @param {Number} props.majorValue // Major value\n * @param {Number} props.trendValue // Trend value\n * @param {Number} props.majorFontSize\n * @param {Number} props.trendFontSize\n * @param {String} props.trendDisplay\n * @param {String} props.unit // Unit for the value\n * @param {Number} props.numberPrecision\n * @param {Bool} props.shouldUseThousandSeparators\n * @param {Bool} props.shouldAbbreviateTrendValue\n * @param {Bool} props.shouldAbbreviateMajorValue,\n * @param {Object} props.toRemoveList\n * @param {Bool} props.smallViz\n * @returns {Object} results\n * @returns {String} results.majorText\n * @returns {String} results.trendText\n * @returns {Number} results.majorTextFontSize\n * @returns {Number} results.trendTextFontSize\n * @returns {String} results.majorValueTitle\n * @returns {Object} results.smallVizProps\n */\nexport const computeSingleValueRadialContent = ({\n contentWidth,\n contentHeight,\n containerWidth,\n containerHeight,\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n trendDisplay,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n shouldAbbreviateMajorValue,\n smallViz,\n}) => {\n let { majorText, trendText, majorTextFontSize, trendTextFontSize } = getMajorAndTrend({\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n trendDisplay,\n width: contentWidth,\n height: contentHeight,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n shouldAbbreviateMajorValue,\n });\n\n const majorValueTitle = majorText;\n let smallVizProps = {};\n\n // custom logic for viz in small space\n // if not showing the radial graph (if `smallViz` is true), then compute truncated major value\n // and font sizes\n if (smallViz) {\n const truncateValue = minimallyTruncateStringToWidth({\n text: majorValue,\n fontWeight: 'bold',\n fontSize: 12,\n containerWidth,\n });\n\n ({ majorText, trendText, majorTextFontSize, trendTextFontSize } = getMajorAndTrend({\n majorValue: truncateValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n width: containerWidth,\n height: containerHeight,\n unit,\n trendDisplay,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n shouldAbbreviateMajorValue,\n }));\n\n smallVizProps = {\n trendDisplay,\n unit,\n };\n }\n\n return {\n majorText,\n trendText,\n majorTextFontSize,\n trendTextFontSize,\n majorValueTitle,\n smallVizProps,\n };\n};\n\n/**\n * Get the colors for a graph\n *\n * @method getGraphColors\n * @param {Object} options\n * @param {Bool} options.backgroundEnabled // Flag to turn on color mode\n * @param {String} options.backgroundColor // The current background color, overrides trend background color\n * @param {Object} options.defaultColors // Default colors by severity\n * @param {Function} options.customColorFormatter // must return { background, stroke } given a color\n * @returns {Object} { background, stroke } colors\n * @private\n */\nexport const getGraphColors = ({\n backgroundEnabled,\n backgroundColor,\n defaultColors,\n customColorFormatter,\n}) => {\n // Only do custom colors in block mode\n if (backgroundEnabled) {\n // Check if the user defined colors to use\n if (backgroundColor && typeof customColorFormatter === 'function') {\n return customColorFormatter(backgroundColor);\n }\n }\n\n return defaultColors.none;\n};\n\n/**\n * Adjust rgb value if it equals to 0 or 255\n * @method adjustRGB\n * @param {Number} rgb [0 - 255]\n * @param {Number} delta\n * @returns {Number} adjusted rgb\n * @private\n */\nexport const adjustRGB = (rgb, delta) => {\n if (rgb === 255) {\n return rgb - delta;\n }\n\n if (rgb === 0) {\n return rgb + delta;\n }\n\n return rgb;\n};\n\n/**\n * Modifies colors by multiplying by a given ratio\n * @method changeColor\n * @param {String} color // Color to modify\n * @param {Number} ratio // Float to modify color\n * @returns {String} new color\n * @private\n */\nconst changeColor = (color, ratio) => {\n const hex = color.replace(/(0x|#)/, '');\n const r = parseInt(hex.substr(0, 2), 16);\n const g = parseInt(hex.substr(2, 2), 16);\n const b = parseInt(hex.substr(4, 2), 16);\n\n // Multiply by given ratio, make sure is between 0 and 255;\n let newR = Math.max(Math.min(Math.floor(r * ratio), 255), 0);\n let newG = Math.max(Math.min(Math.floor(g * ratio), 255), 0);\n let newB = Math.max(Math.min(Math.floor(b * ratio), 255), 0);\n\n // If the color is not changed\n // case 1: the color is (0, 0 0)\n // lighten color (80, 80, 80)\n // darken color (40, 40, 40)\n // case 2: the color is (255, 255, 255)\n // lighten color (235, 235, 235)\n // darken color (175, 175, 175)\n // case 3: the color is e.g. (0, 255, 0)\n // new color (20, 235, 20)\n if (newR === r && newG === g && newB === b) {\n if (newR === 0 && newG === 0 && newB === 0) {\n if (ratio > 1) {\n newR = adjustRGB(newR, 80);\n newG = adjustRGB(newG, 80);\n newB = adjustRGB(newB, 80);\n } else {\n newR = adjustRGB(newR, 40);\n newG = adjustRGB(newG, 40);\n newB = adjustRGB(newB, 40);\n }\n } else if (newR === 255 && newG === 255 && newB === 255) {\n if (ratio > 1) {\n newR = adjustRGB(newR, 20);\n newG = adjustRGB(newG, 20);\n newB = adjustRGB(newB, 20);\n } else {\n newR = adjustRGB(newR, 80);\n newG = adjustRGB(newG, 80);\n newB = adjustRGB(newB, 80);\n }\n } else {\n newR = adjustRGB(newR, 20);\n newG = adjustRGB(newG, 20);\n newB = adjustRGB(newB, 20);\n }\n }\n\n return (\n `#${newR.toString(16).padStart(2, 0)}` +\n `${newG.toString(16).padStart(2, 0)}` +\n `${newB.toString(16).padStart(2, 0)}`\n );\n};\n\n/**\n * Lighten a given color\n * @method lighten\n * @param {String} color\n * @returns {String}\n * @private\n */\nexport const lighten = color => changeColor(color, 1.3);\n\n/**\n * Darkens a given color\n * @method darken\n * @param {String} color\n * @returns {String}\n * @private\n */\nexport const darken = color => changeColor(color, 0.5);\n\n/** consistent token structure: handle callback to add value and name in event payload\n * @method handleValueClickCallback\n * @param {Object} ev\n * @param {String | Number} majorValue\n * @param {String} majorValueField\n * @param {Number} trendValue\n * @param {Function} onValueClick\n */\nexport const handleValueClickCallback = (\n ev,\n majorValue,\n majorValueField,\n trendValue,\n onValueClick,\n trellisEnabled = false,\n trellisSplityBy = '',\n trellisKey = ''\n) => {\n let payload = {\n trendValue,\n value: majorValue,\n name: majorValueField,\n };\n if (trellisEnabled) {\n payload = { ...payload, 'trellis.name': trellisSplityBy, 'trellis.value': trellisKey };\n }\n return onValueClick({ ...ev, payload });\n};\n","module.exports = require(\"lodash\");","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualizations-shared/propUtils\");","module.exports = require(\"styled-components\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@splunk/visualizations-shared/colorConstants\");","module.exports = require(\"@splunk/visualizations-shared/domUtils\");"],"sourceRoot":""}
1
+ {
2
+ "version": 3,
3
+ "sources": ["src/SingleValueBasic/SingleValueBasic.jsx", "esm-externals:react", "esm-externals:prop-types", "esm-externals:styled-components", "esm-externals:lodash", "esm-externals:@splunk/visualizations-shared/numberUtils", "esm-externals:@splunk/visualizations-shared/domUtils", "esm-externals:@splunk/visualizations-shared/propUtils", "esm-externals:@splunk/visualizations-shared/colorConstants", "src/common/utils/singleValueUtils.js", "esm-externals:@splunk/react-icons/enterprise/ArrowUp", "esm-externals:@splunk/react-icons/enterprise/ArrowDown", "esm-externals:@splunk/ui-utils/i18n", "src/SingleValueBasic/TrendValue.jsx", "esm-externals:cssesc", "src/SingleValueBasic/MajorValue.jsx"],
4
+ "sourcesContent": ["import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport { DEFAULT_FONT_FAMILY, getAligment } from '../common/utils/singleValueUtils';\nimport TrendValue from './TrendValue';\nimport MajorValue from './MajorValue';\n\nconst Column = styled.div`\n display: flex;\n flex-direction: column;\n align-self: center;\n justify-content: center;\n`;\n\nconst Row = styled.div`\n display: flex;\n flex-direction: row;\n align-items: ${props => props.alignItems || 'center'};\n justify-content: ${props => getAligment(props.align)};\n`;\n\nconst Text = styled.div`\n font-weight: normal;\n white-space: nowrap;\n font-size: ${props => props.size || 12}px;\n color: ${props => props.color || '#000'};\n font-family: ${DEFAULT_FONT_FAMILY};\n height: ${props => props.size || 12}px;\n line-height: 1.2;\n margin: ${props => props.margin || 'inherit'};\n`;\n\nconst SingleValueBasic = ({ ...props }) => {\n const {\n majorColor,\n majorTextFontSize,\n majorText,\n majorValueTitle,\n trendColor,\n trendTextFontSize,\n trendText,\n showTrendIndicator,\n unit,\n unitPosition,\n underLabel,\n underLabelFontSize,\n underLabelColor,\n onValueClick,\n align,\n } = props;\n const trendIndicatorEnabled = trendText !== '' && showTrendIndicator;\n\n return (\n <Column>\n <Row\n alignItems=\"baseline\"\n align={align}\n data-test={`single-value-row-align-${getAligment(align)}`}\n >\n <MajorValue\n color={majorColor}\n fontSize={majorTextFontSize}\n unit={unit}\n unitPosition={unitPosition}\n value={majorText}\n title={majorValueTitle}\n onValueClick={onValueClick}\n />\n {trendIndicatorEnabled && (\n // Passing the same value for value and text is a temporary hold until completion of https://jira.splunk.com/browse/SCP-21371\n <TrendValue\n fontSize={trendTextFontSize}\n color={trendColor}\n value={trendText}\n text={trendText}\n />\n )}\n </Row>\n {underLabel && (\n <Row\n justify=\"center\"\n align={align}\n data-test={`single-value-row-align-${getAligment(align)}`}\n >\n <Text\n data-test=\"underLabel\"\n size={underLabelFontSize}\n color={underLabelColor}\n margin=\"0 6px\"\n >\n {underLabel}\n </Text>\n </Row>\n )}\n </Column>\n );\n};\n\nSingleValueBasic.propTypes = {\n majorText: T.string,\n majorColor: T.string,\n majorTextFontSize: T.number,\n majorValueTitle: T.string,\n trendText: T.string,\n trendTextFontSize: T.number,\n trendColor: T.string,\n showTrendIndicator: T.bool,\n unit: T.string,\n unitPosition: T.oneOf(['before', 'after']),\n underLabel: T.string,\n underLabelFontSize: T.number,\n underLabelColor: T.string,\n onValueClick: T.oneOfType([T.bool, T.func]),\n align: T.string,\n};\n\nexport const SingleValueTrendValue = TrendValue;\nexport default SingleValueBasic;\n", "\nimport * as defaultImport from \"react\";\nexport * from \"react\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"prop-types\";\nexport * from \"prop-types\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"styled-components\";\nexport * from \"styled-components\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"lodash\";\nexport * from \"lodash\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualizations-shared/numberUtils\";\nexport * from \"@splunk/visualizations-shared/numberUtils\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualizations-shared/domUtils\";\nexport * from \"@splunk/visualizations-shared/domUtils\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualizations-shared/propUtils\";\nexport * from \"@splunk/visualizations-shared/propUtils\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualizations-shared/colorConstants\";\nexport * from \"@splunk/visualizations-shared/colorConstants\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "import { get } from 'lodash';\nimport { isNumerial, formatNumber } from '@splunk/visualizations-shared/numberUtils';\nimport { computeTextSize } from '@splunk/visualizations-shared/domUtils';\nimport { formatColor } from '@splunk/visualizations-shared/propUtils';\nimport { DELTA_GREEN, DELTA_RED } from '@splunk/visualizations-shared/colorConstants';\n\nexport const DEFAULT_FONT = 12;\nexport const DEFAULT_FONT_FAMILY =\n '\"Splunk Platform Sans\", \"Proxima Nova\", \"Helvetica Neue\", Helvetica, Arial, sans-serif';\n\nexport const SVR_PADDING = { top: 12, bottom: 12, left: 16, right: 16 };\n\nexport const getAligment = align => {\n const alignMap = {\n left: 'start',\n center: 'center',\n right: 'end',\n };\n return alignMap[align] || 'center';\n};\n\n/**\n * @method shouldShowTrend\n * @param {String} trendDisplay\n * @returns {Bool}\n */\nexport const shouldShowTrend = trendDisplay => trendDisplay === 'absolute' || trendDisplay === 'percent';\n\n/**\n * @method isLoadingOrNoColumns\n * @param {Object} dataSources\n * @param {Boolean} loading\n * @returns {Boolean} return true if loading or without columns in dataSources\n */\nexport const isLoadingOrNoColumns = (dataSources, loading) => {\n const data = get(dataSources, 'primary.data.columns[0]', undefined);\n const noColumns = data === undefined;\n return loading || noColumns;\n};\n\n/**\n * Retrieve the valid formatted color\n * @method getFormattedColor\n * @param {String} color\n * @param {String} defaultColor\n * @returns {String} the formatted color\n */\nexport const getFormattedColor = (color, defaultColor) => formatColor(color) || formatColor(defaultColor);\n\n/**\n * Determines if there is a background color\n * @method hasBackground\n * @param {String} backgroundColor\n * @returns true for non-transparent background color\n */\nexport const hasBackground = backgroundColor => !!backgroundColor && backgroundColor !== 'transparent';\n\n/**\n * @method isIdenticalColor\n * @param {String} colorA\n * @param {String} colorB\n * @returns {Boolean}\n */\nexport const isIdenticalColor = (colorA, colorB) =>\n !!colorA && !!colorB && formatColor(colorA.toLowerCase()) === formatColor(colorB.toLowerCase());\n\n/*\n * @method getDefaultColorWithBg\n * @param {Object} props\n * @param {String} props.backgroundColor\n * @param {String} props.defaultFontColor\n * @param {String} props.defaultBlockFontColor\n * @returns {String} defaultColor\n */\nexport const getDefaultColorWithBg = ({ backgroundColor, defaultFontColor, defaultBlockFontColor }) =>\n isIdenticalColor(backgroundColor, defaultBlockFontColor) ? defaultFontColor : defaultBlockFontColor;\n\n/*\n * @method getMajorColor\n * return formatted majorColor.\n * @param {Object} props\n * @param {String} props.majorColor\n * @param {String} props.backgroundColor\n * @param {String} props.defaultFontColor\n * @param {String} props.defaultBlockFontColor\n * @returns {String} majorColor\n */\nexport const getMajorColor = ({ majorColor, backgroundColor, defaultFontColor, defaultBlockFontColor }) => {\n // If backgroundColor is set, but no majorColor,\n // the default majorColor will turn to be defaultBlockFontColor.\n // eg: major color will turn to be white in enterprise mode.\n // however, if the bgColor is the same as defaultBlockFontColor, use defaultFontColor.\n if (hasBackground(backgroundColor) && !majorColor) {\n return getDefaultColorWithBg({\n backgroundColor,\n defaultFontColor,\n defaultBlockFontColor,\n });\n }\n\n return getFormattedColor(majorColor, defaultFontColor);\n};\n\n/**\n * Get the color for the trend components\n * @method getTrendColor\n * @param {Object} props\n * @param {String} props.trendColor The trendColor value determined from encoding\n * @param {Number} props.trendValue\n * @param {Number} props.majorValue\n * @param {String} props.customizedBgColor\n * @param {String} props.trendDisplay absolute || percent || off\n * @param {Object} defaultColors\n * @returns {String} trendColor\n */\nexport const getTrendColor = ({\n trendColor,\n trendValue,\n majorValue,\n customizedBgColor,\n trendDisplay,\n defaultColors,\n}) => {\n if (trendColor) {\n return trendColor;\n }\n\n if (Number.isNaN(Number(trendValue))) {\n return undefined;\n }\n\n const { defaultFontColor, defaultBlockFontColor, defaultBackgroundColor } = defaultColors;\n\n // if user defined a backgroundColor, the default trend color will be defaultBlockFontColor\n if (\n hasBackground(customizedBgColor) &&\n !isIdenticalColor(customizedBgColor, defaultBackgroundColor) &&\n !isIdenticalColor(customizedBgColor, defaultBlockFontColor)\n ) {\n return defaultBlockFontColor;\n }\n\n // if trendDisplay is percent, and trendValue === value\n // the trend percent = trendValue / (value - trendValue) will return Infinity\n const isInvalidTrend = trendDisplay === 'percent' && trendValue === parseFloat(majorValue);\n\n if (trendValue === 0 || isInvalidTrend) {\n return defaultFontColor;\n }\n\n return trendValue > 0 ? DELTA_GREEN : DELTA_RED;\n};\n\n/**\n * Computes visualization properties for display component\n * @method computeColors\n * @param {Object} props all viz props\n * @param {Object} defaultColors defaultColors from theme\n * @returns {Object} result\n * @returns {Boolean} backgroundEnabled\n * @returns {String} backgroundColor\n * @returns {String} majorColor\n * @returns {String} trendColor\n * @returns {String} underLabelColor\n */\nexport const computeColors = (props, defaultColors) => {\n const backgroundColor = getFormattedColor(props.backgroundColor, defaultColors.defaultBackgroundColor);\n const backgroundEnabled = hasBackground(backgroundColor);\n const majorColor = getMajorColor({\n majorColor: props.majorColor,\n backgroundColor,\n defaultFontColor: defaultColors.defaultFontColor,\n defaultBlockFontColor: defaultColors.defaultBlockFontColor,\n });\n const trendColor = getTrendColor({\n trendColor: props.trendColor,\n trendValue: props.trendValue,\n majorValue: props.majorValue,\n customizedBgColor: props.backgroundColor,\n trendDisplay: props.trendDisplay,\n defaultColors,\n });\n // todo: need change it to not depend on majorColor\n const underLabelColor = majorColor;\n\n return {\n backgroundColor,\n backgroundEnabled,\n majorColor,\n trendColor,\n underLabelColor,\n };\n};\n\n/**\n * Format and return the value (major/trend)\n * @method computeText\n * @param {Object} props\n * @param {Number} props.value // The major/trend value\n * @param {Number} props.numberPrecision\n * @param {Bool} props.shouldUseThousandSeparators\n * @param {Bool} props.shouldAbbreviateValue\n * @returns {Number} major or trend text\n */\nexport const computeText = ({\n value,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateValue,\n}) => {\n let text = isNumerial(value)\n ? formatNumber(value, numberPrecision, {\n useThousandSeparators: shouldUseThousandSeparators, // todo: need update formatNumber\n useTrendUnits: shouldAbbreviateValue,\n })\n : value;\n // When text is undefined, return empty string\n text = text || '';\n return text;\n};\n\n/*\n * @method getMajorText\n * @param {Object} props\n * @param {Number} props.majorValue\n * @param {Number} props.numberPrecision\n * @param {Bool} props.shouldUseThousandSeparators\n * @param {Bool} props.shouldAbbreviateMajorValue\n * @returns {String} majorText\n */\nexport const getMajorText = ({\n majorValue,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateMajorValue,\n}) =>\n computeText({\n value: majorValue === null ? 'N/A' : majorValue, // if majorValue is null, use `N/A`.\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateValue: shouldAbbreviateMajorValue,\n });\n\n/*\n * @method getTrendText\n * @param {Object} props\n * @param {Number} props.majorValue\n * @param {Number} props.trendValue\n * @param {String} props.trendDisplay\n * @param {Number} props.numberPrecision\n * @param {Bool} props.shouldUseThousandSeparators\n * @param {Bool} props.shouldAbbreviateTrendValue\n * @returns {String} trendText\n */\nexport const getTrendText = ({\n majorValue,\n trendValue,\n trendDisplay,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n}) => {\n const compute = value =>\n computeText({\n value,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateValue: shouldAbbreviateTrendValue,\n });\n\n if (trendValue === '' || !isNumerial(trendValue)) {\n return '';\n }\n const showPercent = trendDisplay === 'percent';\n if (!showPercent) {\n return compute(trendValue);\n }\n\n const diff = Math.abs(trendValue - majorValue);\n let val = Math.round((trendValue / diff) * 100);\n if (trendValue === 0 && diff === 0) {\n val = 0;\n }\n\n if (!Number.isFinite(val)) {\n return 'N/A';\n }\n const text = compute(val);\n\n return `${text}%`;\n};\n\n/**\n * Helper to determine the font size for an element\n * @method computeFontSize\n * @param {String} text The string to find a size for\n * @param {Object} dimensions\n * @param {Number} dimensions.width The width of the container\n * @param {Number} dimensions.height The height of the container\n * @param {String} [fontFamily='\"Splunk Platform Sans\" ...'] The font being used\n * @param {String} [fontWeight='normal'] Boldness of font\n * @returns {Number} The size to use for fontSize styles\n */\nexport const computeFontSize = (\n text,\n { width, height },\n fontFamily = DEFAULT_FONT_FAMILY,\n fontWeight = 'normal'\n) => {\n const widthInDefaultFont = computeTextSize(text, `${fontWeight} ${DEFAULT_FONT}px ${fontFamily}`);\n const fontSize = Math.min(\n (width / widthInDefaultFont) * DEFAULT_FONT,\n (height / DEFAULT_FONT) * DEFAULT_FONT\n );\n return parseInt(fontSize, 10);\n};\n\n/*\n * @method getMajorFontSize\n * @param {Object} props\n * @param {Number} props.width\n * @param {Number} props.height\n * @param {String} props.unit\n * @param {String} props.majorText\n * @param {Number} props.spaceRatio\n * @returns {Number} majorFontSize\n */\nexport const getMajorFontSize = ({ width, height, unit, majorText, spaceRatio = 1 }) => {\n const majorTextCalc = unit ? `${unit}${majorText}` : majorText;\n return computeFontSize(majorTextCalc, {\n width: width * spaceRatio,\n height,\n });\n};\n\n/*\n * @method getTrendFontSize\n * @param {Object} props\n * @param {Number} props.width\n * @param {Number} props.height\n * @param {String} props.trendText\n * @param {Number} props.spaceRatio\n * @returns {Number} trendFontSize\n */\nexport const getTrendFontSize = ({ width, height, trendText, spaceRatio = 1 }) => {\n let trendFontSize = 12;\n if (spaceRatio > 0) {\n trendFontSize = computeFontSize(trendText, {\n width: width * spaceRatio,\n height,\n });\n trendFontSize = parseInt(trendFontSize, 10) * spaceRatio;\n }\n return trendFontSize;\n};\n\n/*\n * The height of underLabel should no more than 12px\n * @param {Number} height\n * @return {Number} height || DEFAULT_FONT\n */\nexport const getUnderLabelHeight = height => (height > DEFAULT_FONT ? DEFAULT_FONT : height);\n\n/*\n * @param {Object} config\n * @param {String} underLabel\n * @param {Number} width width of underLabel\n * @param {Number} height height of underLabel\n * @param {Number} fond size of underLabel\n */\nexport const getUnderLabel = ({ underLabel, width, height }) =>\n // todo: may need truncate underLabel later\n computeFontSize(underLabel, {\n width,\n height,\n });\n\n/**\n * Compute value and font size for major and trend\n * @method getMajorAndTrend\n * @param {Object} props\n * @param {Number} props.width // Width of the text container\n * @param {Number} props.height // Height of the text container\n * @param {Number} props.majorValue // Major value\n * @param {Number} props.trendValue // Trend value\n * @param {Number} props.majorFontSize\n * @param {Number} props.trendFontSize\n * @param {String} props.trendDisplay\n * @param {String} props.unit // Unit for the value\n * @param {Number} props.numberPrecision\n * @param {Bool} props.shouldUseThousandSeparators\n * @param {Bool} props.shouldAbbreviateTrendValue\n * @param {Bool} props.shouldAbbreviateMajorValue\n * @returns {Number, Number, Number, Number} Major text, trend text, major text size, trend text size\n */\nexport const getMajorAndTrend = ({\n width,\n height,\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n trendDisplay,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n shouldAbbreviateMajorValue,\n}) => {\n const majorTextSpaceRatio = isNumerial(trendValue) && shouldShowTrend(trendDisplay) ? 0.6 : 1;\n const textContentWidth = width * 0.9;\n const textContentHeight = height * 0.9;\n const majorText = getMajorText({\n majorValue,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateMajorValue,\n });\n const majorTextFontSize =\n majorFontSize ||\n getMajorFontSize({\n width: textContentWidth,\n height: textContentHeight,\n unit,\n majorText,\n spaceRatio: majorTextSpaceRatio,\n });\n const trendText = getTrendText({\n majorValue,\n trendValue,\n trendDisplay,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n });\n\n const trendTextFontSize =\n trendFontSize ||\n getTrendFontSize({\n width: textContentWidth,\n height: textContentHeight,\n trendText,\n spaceRatio: 1 - majorTextSpaceRatio,\n });\n\n return {\n majorText,\n majorTextFontSize,\n trendText,\n trendTextFontSize,\n };\n};\n\n/*\n * @method updateVizInSmallSpace\n * @param {Object} props\n * @param {Number} props.width // Width of the text container\n * @param {Number} props.height // Height of the text container\n * @param {Object} props.toRemoveList\n * @param {Number} props.majorValue // Major value\n * @param {Number} props.trendValue // Trend value\n * @param {Number} props.majorFontSize\n * @param {Number} props.trendFontSize\n * @param {Number} props.majorTextFontSize\n * @param {String} props.unit // Unit for the value\n * @param {Number} props.numberPrecision\n * @param {Bool} props.shouldUseThousandSeparators\n * @param {Bool} props.shouldAbbreviateTrendValue\n * @returns {Object} results\n * @returns {Object} results.newMajorAndTrend\n * @returns {Object} results.updatedProps\n */\nexport const updateVizInSmallSpace = ({\n width,\n height,\n toRemoveList,\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n majorTextFontSize,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n}) => {\n let removeIndex = 0;\n let newProps = {}; // options need to be updated\n let newMajorAndTrend = {};\n let newTextSize = majorTextFontSize;\n\n // remove info on viz to make textFontSize >= 12px;\n while (newTextSize < 12 && removeIndex < toRemoveList.length) {\n const toRemove = toRemoveList[removeIndex];\n newProps = {\n ...newProps,\n ...{\n [toRemove.key]: toRemove.value,\n },\n };\n\n newMajorAndTrend = getMajorAndTrend({\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n width,\n height,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n ...newProps,\n });\n\n newTextSize = newMajorAndTrend.majorTextFontSize;\n removeIndex += 1;\n }\n\n // truncate text if textFontSize is still less than 12\n if (newTextSize < 12) {\n const truncateValue = `${majorValue.toString().slice(0, 3)}...`;\n newMajorAndTrend = getMajorAndTrend({\n majorValue: truncateValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n width,\n height,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n ...newProps,\n });\n }\n\n return { newMajorAndTrend, updatedProps: newProps };\n};\n\n/*\n * @method computeSingleValueContent\n * @param {Object} props\n * @param {Number} props.contentWidth\n * @param {Number} props.contentHeight\n * @param {Number} props.containerWidth\n * @param {Number} props.containerHeight\n * @param {Number} props.majorValue // Major value\n * @param {Number} props.trendValue // Trend value\n * @param {Number} props.majorFontSize\n * @param {Number} props.trendFontSize\n * @param {String} props.trendDisplay\n * @param {String} props.unit // Unit for the value\n * @param {Number} props.numberPrecision\n * @param {Bool} props.shouldUseThousandSeparators\n * @param {Bool} props.shouldAbbreviateTrendValue\n * @param {Bool} props.shouldAbbreviateMajorValue\n * @param {Object} props.toRemoveList\n * @returns {Object} results\n * @returns {String} results.majorText\n * @returns {String} results.trendText\n * @returns {Number} results.majorTextFontSize\n * @returns {Number} results.trendTextFontSize\n * @returns {String} results.majorValueTitle\n * @returns {Object} results.smallVizProps\n */\nexport const computeSingleValueContent = ({\n contentWidth,\n contentHeight,\n containerWidth,\n containerHeight,\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n trendDisplay,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n shouldAbbreviateMajorValue,\n toRemoveList,\n}) => {\n let { majorText, trendText, majorTextFontSize, trendTextFontSize } = getMajorAndTrend({\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n trendDisplay,\n width: contentWidth,\n height: contentHeight,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n shouldAbbreviateMajorValue,\n });\n const majorValueTitle = majorText;\n let smallVizProps = {};\n\n // update viz in small space\n // if textFontSize is less than 12, remove extra info like sparkline, trendvalue, unit\n // or truncate major value to make the major font size >= 12\n if (majorTextFontSize < 12) {\n const { newMajorAndTrend, updatedProps } = updateVizInSmallSpace({\n width: containerWidth,\n height: containerHeight,\n toRemoveList,\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n majorTextFontSize,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n });\n\n ({ majorText, trendText, majorTextFontSize, trendTextFontSize } = newMajorAndTrend);\n smallVizProps = updatedProps;\n }\n return {\n majorText,\n trendText,\n majorTextFontSize,\n trendTextFontSize,\n majorValueTitle,\n smallVizProps,\n };\n};\n\nexport const minimallyTruncateStringToWidth = ({\n text,\n fontSize = DEFAULT_FONT,\n fontFamily = DEFAULT_FONT_FAMILY,\n fontWeight = 'normal',\n containerWidth,\n}) => {\n let textWidth = computeTextSize(text, `${fontWeight} ${fontSize}px ${fontFamily}`);\n let modifiedText = text;\n\n const ellipsesLength = computeTextSize('...', `${fontWeight} ${fontSize}px ${fontFamily}`);\n // `containerWidth - ellipsesLength > 0` condition ensures space even exists for text.\n if (containerWidth - ellipsesLength > 0 && textWidth > containerWidth) {\n // Truncates the content such that the truncated value + ellipses fit within the allocated space for the ellipses.\n // `textWidth > containerWidth - ellipsesLength` condition checks if text + ellipses exceeds container width.\n // `text.length > 1` condition included to keep at least the first number.\n while (textWidth + ellipsesLength > containerWidth && modifiedText.length > 1) {\n modifiedText = modifiedText.substring(0, modifiedText.length - 1);\n textWidth = computeTextSize(modifiedText, `normal ${fontSize}px ${fontFamily}`);\n }\n\n modifiedText = `${modifiedText}...`;\n }\n\n return modifiedText;\n};\n\n/*\n * @method computeSingleValueRadialContent\n * @param {Object} props\n * @param {Number} props.contentWidth\n * @param {Number} props.contentHeight\n * @param {Number} props.containerWidth\n * @param {Number} props.containerHeight\n * @param {Number} props.majorValue // Major value\n * @param {Number} props.trendValue // Trend value\n * @param {Number} props.majorFontSize\n * @param {Number} props.trendFontSize\n * @param {String} props.trendDisplay\n * @param {String} props.unit // Unit for the value\n * @param {Number} props.numberPrecision\n * @param {Bool} props.shouldUseThousandSeparators\n * @param {Bool} props.shouldAbbreviateTrendValue\n * @param {Bool} props.shouldAbbreviateMajorValue,\n * @param {Object} props.toRemoveList\n * @param {Bool} props.smallViz\n * @returns {Object} results\n * @returns {String} results.majorText\n * @returns {String} results.trendText\n * @returns {Number} results.majorTextFontSize\n * @returns {Number} results.trendTextFontSize\n * @returns {String} results.majorValueTitle\n * @returns {Object} results.smallVizProps\n */\nexport const computeSingleValueRadialContent = ({\n contentWidth,\n contentHeight,\n containerWidth,\n containerHeight,\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n trendDisplay,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n shouldAbbreviateMajorValue,\n smallViz,\n}) => {\n let { majorText, trendText, majorTextFontSize, trendTextFontSize } = getMajorAndTrend({\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n trendDisplay,\n width: contentWidth,\n height: contentHeight,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n shouldAbbreviateMajorValue,\n });\n\n const majorValueTitle = majorText;\n let smallVizProps = {};\n\n // custom logic for viz in small space\n // if not showing the radial graph (if `smallViz` is true), then compute truncated major value\n // and font sizes\n if (smallViz) {\n const truncateValue = minimallyTruncateStringToWidth({\n text: majorValue,\n fontWeight: 'bold',\n fontSize: 12,\n containerWidth,\n });\n\n ({ majorText, trendText, majorTextFontSize, trendTextFontSize } = getMajorAndTrend({\n majorValue: truncateValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n width: containerWidth,\n height: containerHeight,\n unit,\n trendDisplay,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n shouldAbbreviateMajorValue,\n }));\n\n smallVizProps = {\n trendDisplay,\n unit,\n };\n }\n\n return {\n majorText,\n trendText,\n majorTextFontSize,\n trendTextFontSize,\n majorValueTitle,\n smallVizProps,\n };\n};\n\n/**\n * Get the colors for a graph\n *\n * @method getGraphColors\n * @param {Object} options\n * @param {Bool} options.backgroundEnabled // Flag to turn on color mode\n * @param {String} options.backgroundColor // The current background color, overrides trend background color\n * @param {Object} options.defaultColors // Default colors by severity\n * @param {Function} options.customColorFormatter // must return { background, stroke } given a color\n * @returns {Object} { background, stroke } colors\n * @private\n */\nexport const getGraphColors = ({\n backgroundEnabled,\n backgroundColor,\n defaultColors,\n customColorFormatter,\n}) => {\n // Only do custom colors in block mode\n if (backgroundEnabled) {\n // Check if the user defined colors to use\n if (backgroundColor && typeof customColorFormatter === 'function') {\n return customColorFormatter(backgroundColor);\n }\n }\n\n return defaultColors.none;\n};\n\n/**\n * Adjust rgb value if it equals to 0 or 255\n * @method adjustRGB\n * @param {Number} rgb [0 - 255]\n * @param {Number} delta\n * @returns {Number} adjusted rgb\n * @private\n */\nexport const adjustRGB = (rgb, delta) => {\n if (rgb === 255) {\n return rgb - delta;\n }\n\n if (rgb === 0) {\n return rgb + delta;\n }\n\n return rgb;\n};\n\n/**\n * Modifies colors by multiplying by a given ratio\n * @method changeColor\n * @param {String} color // Color to modify\n * @param {Number} ratio // Float to modify color\n * @returns {String} new color\n * @private\n */\nconst changeColor = (color, ratio) => {\n const hex = color.replace(/(0x|#)/, '');\n const r = parseInt(hex.substr(0, 2), 16);\n const g = parseInt(hex.substr(2, 2), 16);\n const b = parseInt(hex.substr(4, 2), 16);\n\n // Multiply by given ratio, make sure is between 0 and 255;\n let newR = Math.max(Math.min(Math.floor(r * ratio), 255), 0);\n let newG = Math.max(Math.min(Math.floor(g * ratio), 255), 0);\n let newB = Math.max(Math.min(Math.floor(b * ratio), 255), 0);\n\n // If the color is not changed\n // case 1: the color is (0, 0 0)\n // lighten color (80, 80, 80)\n // darken color (40, 40, 40)\n // case 2: the color is (255, 255, 255)\n // lighten color (235, 235, 235)\n // darken color (175, 175, 175)\n // case 3: the color is e.g. (0, 255, 0)\n // new color (20, 235, 20)\n if (newR === r && newG === g && newB === b) {\n if (newR === 0 && newG === 0 && newB === 0) {\n if (ratio > 1) {\n newR = adjustRGB(newR, 80);\n newG = adjustRGB(newG, 80);\n newB = adjustRGB(newB, 80);\n } else {\n newR = adjustRGB(newR, 40);\n newG = adjustRGB(newG, 40);\n newB = adjustRGB(newB, 40);\n }\n } else if (newR === 255 && newG === 255 && newB === 255) {\n if (ratio > 1) {\n newR = adjustRGB(newR, 20);\n newG = adjustRGB(newG, 20);\n newB = adjustRGB(newB, 20);\n } else {\n newR = adjustRGB(newR, 80);\n newG = adjustRGB(newG, 80);\n newB = adjustRGB(newB, 80);\n }\n } else {\n newR = adjustRGB(newR, 20);\n newG = adjustRGB(newG, 20);\n newB = adjustRGB(newB, 20);\n }\n }\n\n return (\n `#${newR.toString(16).padStart(2, 0)}` +\n `${newG.toString(16).padStart(2, 0)}` +\n `${newB.toString(16).padStart(2, 0)}`\n );\n};\n\n/**\n * Lighten a given color\n * @method lighten\n * @param {String} color\n * @returns {String}\n * @private\n */\nexport const lighten = color => changeColor(color, 1.3);\n\n/**\n * Darkens a given color\n * @method darken\n * @param {String} color\n * @returns {String}\n * @private\n */\nexport const darken = color => changeColor(color, 0.5);\n\n/** consistent token structure: handle callback to add value and name in event payload\n * @method handleValueClickCallback\n * @param {Object} ev\n * @param {String | Number} majorValue\n * @param {String} majorValueField\n * @param {Number} trendValue\n * @param {Function} onValueClick\n * @param {Boolean} trellisEnabled\n * @param {String} trellisSplitBy\n * @param {String} trellisKey\n */\nexport const handleValueClickCallback = (\n ev,\n majorValue,\n majorValueField,\n trendValue,\n onValueClick,\n trellisEnabled = false,\n trellisSplitBy = '',\n trellisKey = ''\n) =>\n onValueClick({\n ...ev,\n payload: {\n trendValue,\n value: majorValue,\n name: majorValueField,\n ...(trellisEnabled && { 'trellis.name': trellisSplitBy, 'trellis.value': trellisKey }),\n },\n });\n\n/** handle trend color when trend display is percent\n * @method getTrendColorWithPercent\n * @param {Object} options\n * @returns {Object}\n */\nexport const getTrendColorWithPercent = options => {\n const shouldUsePercentTrendColor =\n options.trendColor === '> trendValue | rangeValue(trendColorEditorConfig)' &&\n options.trendDisplay === 'percent';\n\n return shouldUsePercentTrendColor\n ? { trendColor: '> trendValuePercent | rangeValue(trendColorEditorConfig)' }\n : {};\n};\n", "\nimport * as defaultImport from \"@splunk/react-icons/enterprise/ArrowUp\";\nexport * from \"@splunk/react-icons/enterprise/ArrowUp\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/react-icons/enterprise/ArrowDown\";\nexport * from \"@splunk/react-icons/enterprise/ArrowDown\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/ui-utils/i18n\";\nexport * from \"@splunk/ui-utils/i18n\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport ArrowUp from '@splunk/react-icons/enterprise/ArrowUp';\nimport ArrowDown from '@splunk/react-icons/enterprise/ArrowDown';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport { DEFAULT_FONT_FAMILY } from '../common/utils/singleValueUtils';\n\nconst Column = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: ${props => props.justify || 'flex-end'};\n height: ${props => props.size || 12}px;\n ${props => (props.size ? `margin: 0 ${parseInt(props.size, 10) * 0.2 || 5}px;` : '')};\n`;\n\nconst Text = styled.div`\n white-space: nowrap;\n font-size: ${props => props.size || 12}px;\n color: ${props => props.color || '#000'};\n font-family: ${DEFAULT_FONT_FAMILY};\n height: ${props => props.size || 12}px;\n line-height: ${props => props.size || 12}px;\n display: flex;\n align-self: baseline;\n ${props => (props.size ? `margin-left: ${parseInt(props.size, 10) * 0.2 || 5}px;` : '')};\n`;\n\nconst TrendValue = ({ fontSize, color, value, text }) => {\n let TrendIndicator = false;\n let ariaLabel = false;\n\n if (parseFloat(value, 10) > 0) {\n TrendIndicator = ArrowUp;\n ariaLabel = _('increase');\n } else if (parseFloat(value, 10) < 0) {\n TrendIndicator = ArrowDown;\n ariaLabel = _('decrease');\n }\n\n return (\n <Column justify=\"flex-end\" size={fontSize}>\n <Text data-test=\"trendValueIndicator\" size={fontSize} color={color}>\n {TrendIndicator && <TrendIndicator aria-label={ariaLabel} />}\n </Text>\n <Text data-test=\"trendValue\" size={fontSize} color={color}>\n {`${text}`}\n </Text>\n </Column>\n );\n};\n\nTrendValue.propTypes = {\n fontSize: T.number,\n color: T.string,\n value: T.oneOfType([T.string, T.number]),\n text: T.string,\n};\n\nexport default TrendValue;\n", "\nimport * as defaultImport from \"cssesc\";\nexport * from \"cssesc\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport cssesc from 'cssesc';\nimport { DEFAULT_FONT_FAMILY } from '../common/utils/singleValueUtils';\n\nconst Row = styled.div`\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n justify-content: left;\n height: ${props => props.size}px;\n line-height: ${props => props.size}px;\n`;\n\nconst Text = styled.div`\n white-space: nowrap;\n height: 100%;\n font-size: ${props => props.size || 12}px;\n color: ${props => props.color};\n font-family: ${DEFAULT_FONT_FAMILY};\n font-weight: bold;\n &:hover {\n text-decoration: ${props => (props.showUnderline ? 'underline' : 'inherit')};\n cursor: ${props => (props.showUnderline ? 'pointer' : 'inherit')};\n }\n ${props => {\n if (!props.pseudoContent || !props.pseudoContentPosition) {\n return '';\n }\n return `&:${props.pseudoContentPosition} {\n // by default this pseudo element would inherit text-decoration from main element\n // and text-decoration could not be overwritten.\n // adding display: inline-block makes text decoration independent from main element.\n // => the unit will not be underlined if a user hovers over the main value\n display: inline-block;\n font-size: ${props.pseudoContentFontSize}px;\n position: relative;\n font-weight: normal;\n content: ${props.pseudoContent};\n }`;\n }}\n`;\n\nconst validUnitPositions = ['before', 'after'];\n\nconst MajorValue = ({ color, fontSize, unitPosition, title, value, onValueClick, unit }) => {\n let sanitizedUnit;\n let sanitizedUnitPosition;\n\n if (typeof unit === 'string') {\n sanitizedUnit = cssesc(unit, { wrap: true, quotes: 'double' });\n if (typeof unitPosition === 'string' && validUnitPositions.includes(unitPosition)) {\n sanitizedUnitPosition = unitPosition;\n } else {\n sanitizedUnitPosition = 'after';\n }\n }\n\n const handleKeyDown = e => {\n if (e.keyCode !== 13) {\n return;\n }\n e.preventDefault();\n onValueClick(e);\n };\n\n return (\n <Row size={fontSize}>\n <Text\n data-test=\"majorValue\"\n color={color}\n onClick={e => typeof onValueClick === 'function' && onValueClick(e)}\n showUnderline={!!onValueClick}\n size={fontSize}\n title={title}\n pseudoContent={sanitizedUnit}\n pseudoContentPosition={sanitizedUnitPosition}\n pseudoContentFontSize={fontSize * 0.6}\n tabIndex=\"0\"\n role=\"button\"\n onKeyDown={handleKeyDown}\n >\n {value}\n </Text>\n </Row>\n );\n};\n\nMajorValue.propTypes = {\n color: T.string,\n fontSize: T.number,\n unit: T.string,\n unitPosition: T.oneOf(validUnitPositions),\n value: T.oneOfType([T.string, T.number]),\n title: T.oneOfType([T.string, T.number]),\n onValueClick: T.oneOfType([T.bool, T.func]),\n};\n\nexport default MajorValue;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AACA,oBAA+B;AAC/B,0BAAc;AACd,IAAO,gBAAS,aAAa,gBAA8B,wBAAU;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAA,iBAA+B;AAC/B,+BAAc;AACd,IAAO,qBAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,sCAAc;AACd,IAAO,4BAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,2BAAc;AACd,IAAO,iBAAS,aAAaA,iBAA8B,yBA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OAAO;AAAA,QACP,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,QACP;AAAA;AAAA,IACJ;AAAA,IACC;AAAA,IAEG;AAAA,MAAC;AAAA;AAAA,QACG,UAAU;AAAA,QACV,OAAO;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA;AAAA,IACV;AAAA,EAER,GACC,cACG;AAAA,IAACA;AAAA,IAAA;AAAA,MACG,SAAQ;AAAA,MACR;AAAA,MACA,aAAW,0BAA0B,YAAY,KAAK,CAAC;AAAA;AAAA,IAEvD;AAAA,MAACC;AAAA,MAAA;AAAA,QACG,aAAU;AAAA,QACV,MAAM;AAAA,QACN,OAAO;AAAA,QACP,QAAO;AAAA;AAAA,MAEN;AAAA,IACL;AAAA,EACJ,CAER;AAER;AAEA,iBAAiB,YAAY;AAAA,EACzB,WAAW,mBAAE;AAAA,EACb,YAAY,mBAAE;AAAA,EACd,mBAAmB,mBAAE;AAAA,EACrB,iBAAiB,mBAAE;AAAA,EACnB,WAAW,mBAAE;AAAA,EACb,mBAAmB,mBAAE;AAAA,EACrB,YAAY,mBAAE;AAAA,EACd,oBAAoB,mBAAE;AAAA,EACtB,MAAM,mBAAE;AAAA,EACR,cAAc,mBAAE,MAAM,CAAC,UAAU,OAAO,CAAC;AAAA,EACzC,YAAY,mBAAE;AAAA,EACd,oBAAoB,mBAAE;AAAA,EACtB,iBAAiB,mBAAE;AAAA,EACnB,cAAc,mBAAE,UAAU,CAAC,mBAAE,MAAM,mBAAE,IAAI,CAAC;AAAA,EAC1C,OAAO,mBAAE;AACb;AAEO,IAAM,wBAAwB;AACrC,IAAO,2BAAQ;",
6
+ "names": ["defaultImport", "defaultImport", "defaultImport", "defaultImport", "defaultImport", "defaultImport", "defaultImport", "defaultImport", "defaultImport", "defaultImport", "defaultImport", "Text", "Column", "Row", "Text"]
7
+ }