@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 \"lodash\"","webpack:///external \"@splunk/visualizations-shared/numberUtils\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@splunk/visualizations-shared/domUtils\"","webpack:///./src/common/utils/singleValueUtils.js","webpack:///external \"@splunk/visualizations-shared/propUtils\"","webpack:///external \"@splunk/visualizations-shared/colorConstants\""],"names":["DEFAULT_FONT","DEFAULT_FONT_FAMILY","SVR_PADDING","top","bottom","left","right","getAligment","alignMap","center","shouldShowTrend","trendDisplay","isLoadingOrNoColumns","data","get","noColumns","loading","getFormattedColor","formatColor","hasBackground","backgroundColor","isIdenticalColor","colorA","colorB","getDefaultColorWithBg","defaultFontColor","defaultBlockFontColor","getMajorColor","majorColor","getTrendColor","trendColor","trendValue","majorValue","customizedBgColor","defaultColors","Number","defaultBackgroundColor","isInvalidTrend","parseFloat","computeColors","props","backgroundEnabled","underLabelColor","computeText","value","numberPrecision","shouldUseThousandSeparators","shouldAbbreviateValue","text","formatNumber","useThousandSeparators","useTrendUnits","getMajorText","shouldAbbreviateMajorValue","getTrendText","shouldAbbreviateTrendValue","compute","isNumerial","showPercent","diff","Math","val","computeFontSize","width","height","fontFamily","fontWeight","widthInDefaultFont","computeTextSize","fontSize","parseInt","getMajorFontSize","unit","majorText","spaceRatio","majorTextCalc","getTrendFontSize","trendText","trendFontSize","getUnderLabelHeight","getUnderLabel","underLabel","getMajorAndTrend","majorFontSize","majorTextSpaceRatio","textContentWidth","textContentHeight","majorTextFontSize","trendTextFontSize","updateVizInSmallSpace","toRemoveList","removeIndex","newProps","newMajorAndTrend","newTextSize","toRemove","truncateValue","updatedProps","computeSingleValueContent","contentWidth","contentHeight","containerWidth","containerHeight","majorValueTitle","smallVizProps","minimallyTruncateStringToWidth","textWidth","modifiedText","ellipsesLength","computeSingleValueRadialContent","smallViz","getGraphColors","customColorFormatter","adjustRGB","rgb","changeColor","hex","color","r","g","b","newR","newG","newB","ratio","lighten","darken","handleValueClickCallback","trellisEnabled","trellisSplityBy","trellisKey","payload","name","majorValueField","onValueClick"],"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,mC;;;;;;;ACAA,sE;;;;;;;ACAA,kE;;;;;;;ACAA,mE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AAEO,IAAMA,YAAY,GAAlB;AACA,IAAMC,mBAAmB,GAAzB;AAGA,IAAMC,WA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WAAO;AAAiB,sBAAjB;AAAkD,uBAAiBD;AAAnE,MAAPC;AACH;;AACD,SAAOG,YAAY;AAAUH,WAAO,EAAPA;AAAV,KAAnB;AAlBG,E;;;;;;;ACr4BP,oE;;;;;;;ACAA,yE","file":"singleValueUtils.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 = 54);\n","module.exports = require(\"lodash\");","module.exports = require(\"@splunk/visualizations-shared/numberUtils\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@splunk/visualizations-shared/domUtils\");","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(\"@splunk/visualizations-shared/propUtils\");","module.exports = require(\"@splunk/visualizations-shared/colorConstants\");"],"sourceRoot":""}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/common/utils/singleValueUtils.js", "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"],
4
+ "sourcesContent": ["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 \"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"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AACA,oBAA+B;AAC/B,2BAAc;AACd,IAAO,iBAAS,aAAa,gBAA8B,wBAAU;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAA,iBAA+B;AAC/B,gCAAc;AACd,IAAO,sBAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,6BAAc;AACd,IAAO,mBAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,8BAAc;AACd,IAAO,oBAAS,aAAaA,iBA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,eAAO,UAAU,MAAM,EAAE;AACzB,eAAO,UAAU,MAAM,EAAE;AACzB,eAAO,UAAU,MAAM,EAAE;AAAA,MAC7B;AAAA,IACJ,OAAO;AACH,aAAO,UAAU,MAAM,EAAE;AACzB,aAAO,UAAU,MAAM,EAAE;AACzB,aAAO,UAAU,MAAM,EAAE;AAAA,IAC7B;AAAA,EACJ;AAEA,SACI,IAAI,KAAK,SAAS,EAAE,EAAE,SAAS,GAAG,CAAC,CAAC,GACjC,KAAK,SAAS,EAAE,EAAE,SAAS,GAAG,CAAC,CAAC,GAChC,KAAK,SAAS,EAAE,EAAE,SAAS,GAAG,CAAC,CAAC;AAE3C;AASO,IAAM,UAAU,WAAS,YAAY,OAAO,GAAG;AAS/C,IAAM,SAAS,WAAS,YAAY,OAAO,GAAG;AAa9C,IAAM,2BAA2B,CACpC,IACA,YACA,iBACA,YACA,cACA,iBAAiB,OACjB,iBAAiB,IACjB,aAAa,OAEb,aAAa,iCACN,KADM;AAAA,EAET,SAAS;AAAA,IACL;AAAA,IACA,OAAO;AAAA,IACP,MAAM;AAAA,KACF,kBAAkB,EAAE,gBAAgB,gBAAgB,iBAAiB,WAAW;AAE5F,EAAC;AAOE,IAAM,2BAA2B,aAAW;AAC/C,QAAM,6BACF,QAAQ,eAAe,uDACvB,QAAQ,iBAAiB;AAE7B,SAAO,6BACD,EAAE,YAAY,2DAA2D,IACzE,CAAC;AACX;",
6
+ "names": ["defaultImport", "defaultImport", "defaultImport", "defaultImport"]
7
+ }
@@ -1,148 +1,94 @@
1
- /*!
2
- * Copyright © 2024 Splunk Inc.
3
- * SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
4
- * in part without a valid written license from Splunk Inc. is PROHIBITED.
5
- */
6
- module.exports =
7
- /******/ (function(modules) { // webpackBootstrap
8
- /******/ // The module cache
9
- /******/ var installedModules = {};
10
- /******/
11
- /******/ // The require function
12
- /******/ function __webpack_require__(moduleId) {
13
- /******/
14
- /******/ // Check if module is in cache
15
- /******/ if(installedModules[moduleId]) {
16
- /******/ return installedModules[moduleId].exports;
17
- /******/ }
18
- /******/ // Create a new module (and put it into the cache)
19
- /******/ var module = installedModules[moduleId] = {
20
- /******/ i: moduleId,
21
- /******/ l: false,
22
- /******/ exports: {}
23
- /******/ };
24
- /******/
25
- /******/ // Execute the module function
26
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
27
- /******/
28
- /******/ // Flag the module as loaded
29
- /******/ module.l = true;
30
- /******/
31
- /******/ // Return the exports of the module
32
- /******/ return module.exports;
33
- /******/ }
34
- /******/
35
- /******/
36
- /******/ // expose the modules object (__webpack_modules__)
37
- /******/ __webpack_require__.m = modules;
38
- /******/
39
- /******/ // expose the module cache
40
- /******/ __webpack_require__.c = installedModules;
41
- /******/
42
- /******/ // define getter function for harmony exports
43
- /******/ __webpack_require__.d = function(exports, name, getter) {
44
- /******/ if(!__webpack_require__.o(exports, name)) {
45
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
46
- /******/ }
47
- /******/ };
48
- /******/
49
- /******/ // define __esModule on exports
50
- /******/ __webpack_require__.r = function(exports) {
51
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
52
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
53
- /******/ }
54
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
55
- /******/ };
56
- /******/
57
- /******/ // create a fake namespace object
58
- /******/ // mode & 1: value is a module id, require it
59
- /******/ // mode & 2: merge all properties of value into the ns
60
- /******/ // mode & 4: return value when already ns object
61
- /******/ // mode & 8|1: behave like require
62
- /******/ __webpack_require__.t = function(value, mode) {
63
- /******/ if(mode & 1) value = __webpack_require__(value);
64
- /******/ if(mode & 8) return value;
65
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
66
- /******/ var ns = Object.create(null);
67
- /******/ __webpack_require__.r(ns);
68
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
69
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
70
- /******/ return ns;
71
- /******/ };
72
- /******/
73
- /******/ // getDefaultExport function for compatibility with non-harmony modules
74
- /******/ __webpack_require__.n = function(module) {
75
- /******/ var getter = module && module.__esModule ?
76
- /******/ function getDefault() { return module['default']; } :
77
- /******/ function getModuleExports() { return module; };
78
- /******/ __webpack_require__.d(getter, 'a', getter);
79
- /******/ return getter;
80
- /******/ };
81
- /******/
82
- /******/ // Object.prototype.hasOwnProperty.call
83
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
84
- /******/
85
- /******/ // __webpack_public_path__
86
- /******/ __webpack_require__.p = "";
87
- /******/
88
- /******/
89
- /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 55);
91
- /******/ })
92
- /************************************************************************/
93
- /******/ ({
94
-
95
- /***/ 4:
96
- /***/ (function(module, exports) {
97
-
98
- module.exports = require("react");
99
-
100
- /***/ }),
101
-
102
- /***/ 55:
103
- /***/ (function(module, exports, __webpack_require__) {
104
-
105
- "use strict";
106
-
107
-
108
- Object.defineProperty(exports, "__esModule", {
109
- value: true
110
- });
111
- exports.renderWithTheme = void 0;
112
-
113
- var React = __webpack_require__(4);
114
-
115
- var react_1 = __webpack_require__(56);
116
-
117
- var SplunkThemeProvider_1 = __webpack_require__(57);
118
-
119
- var renderWithTheme = function renderWithTheme(Component) {
120
- var themeToTest = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
121
- return (0, react_1.render)(React.createElement(SplunkThemeProvider_1.default, {
122
- additionalThemeProperties: Object.assign({}, themeToTest),
123
- colorScheme: "light",
124
- density: "comfortable",
125
- family: "enterprise"
126
- }, Component));
1
+ /* Copyright © 2020 Splunk Inc.
2
+ SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
3
+ in part without a valid written license from Splunk Inc. is PROHIBITED. */
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
127
23
  };
24
+ var __export = (target, all) => {
25
+ for (var name in all)
26
+ __defProp(target, name, { get: all[name], enumerable: true });
27
+ };
28
+ var __copyProps = (to, from, except, desc) => {
29
+ if (from && typeof from === "object" || typeof from === "function") {
30
+ for (let key of __getOwnPropNames(from))
31
+ if (!__hasOwnProp.call(to, key) && key !== except)
32
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
33
+ }
34
+ return to;
35
+ };
36
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
37
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
38
+ // If the importer is in node compatibility mode or this is not an ESM
39
+ // file that has been converted to a CommonJS file using a Babel-
40
+ // compatible transform (i.e. "__esModule" has not been set), then set
41
+ // "default" to the CommonJS "module.exports" for node compatibility.
42
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
43
+ mod
44
+ ));
45
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
46
+
47
+ // src/common/utils/testHelper.tsx
48
+ var testHelper_exports = {};
49
+ __export(testHelper_exports, {
50
+ renderWithTheme: () => renderWithTheme
51
+ });
52
+ module.exports = __toCommonJS(testHelper_exports);
128
53
 
129
- exports.renderWithTheme = renderWithTheme;
130
-
131
- /***/ }),
132
-
133
- /***/ 56:
134
- /***/ (function(module, exports) {
135
-
136
- module.exports = require("@testing-library/react");
137
-
138
- /***/ }),
139
-
140
- /***/ 57:
141
- /***/ (function(module, exports) {
142
-
143
- module.exports = require("@splunk/themes/SplunkThemeProvider");
144
-
145
- /***/ })
146
-
147
- /******/ });
148
- //# sourceMappingURL=testHelper.js.map
54
+ // esm-externals:react
55
+ var react_exports = {};
56
+ __export(react_exports, {
57
+ default: () => react_default
58
+ });
59
+ var defaultImport = __toESM(require("react"));
60
+ __reExport(react_exports, require("react"));
61
+ var react_default = "default" in defaultImport ? defaultImport.default : defaultImport;
62
+
63
+ // esm-externals:@testing-library/react
64
+ var react_exports2 = {};
65
+ __export(react_exports2, {
66
+ default: () => react_default2
67
+ });
68
+ var defaultImport2 = __toESM(require("@testing-library/react"));
69
+ __reExport(react_exports2, require("@testing-library/react"));
70
+ var react_default2 = "default" in defaultImport2 ? defaultImport2.default : defaultImport2;
71
+
72
+ // esm-externals:@splunk/themes/SplunkThemeProvider
73
+ var SplunkThemeProvider_exports = {};
74
+ __export(SplunkThemeProvider_exports, {
75
+ default: () => SplunkThemeProvider_default
76
+ });
77
+ var defaultImport3 = __toESM(require("@splunk/themes/SplunkThemeProvider"));
78
+ __reExport(SplunkThemeProvider_exports, require("@splunk/themes/SplunkThemeProvider"));
79
+ var SplunkThemeProvider_default = "default" in defaultImport3 ? defaultImport3.default : defaultImport3;
80
+
81
+ // src/common/utils/testHelper.tsx
82
+ var renderWithTheme = (Component, themeToTest = {}) => (0, react_exports2.render)(
83
+ /* @__PURE__ */ react_exports.createElement(
84
+ SplunkThemeProvider_default,
85
+ {
86
+ additionalThemeProperties: __spreadValues({}, themeToTest),
87
+ colorScheme: "light",
88
+ density: "comfortable",
89
+ family: "enterprise"
90
+ },
91
+ Component
92
+ )
93
+ );
94
+ //# sourceMappingURL=testHelper.js.map
@@ -1 +1,7 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///./src/common/utils/testHelper.tsx","webpack:///external \"@testing-library/react\"","webpack:///external \"@splunk/themes/SplunkThemeProvider\""],"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;;AACA;;AACA;;AAEO,IAAM,eAAe,GAAG,SAAlB,eAAkB,CAAC,SAAD;AAAA,MAAgC,WAAhC,uEAA8C,EAA9C;AAAA,SAC3B,oBACI,oBAAC,6BAAD,EAAoB;AAChB,6BAAyB,oBAAO,WAAP,CADT;AAEhB,eAAW,EAAC,OAFI;AAGhB,WAAO,EAAC,aAHQ;AAIhB,UAAM,EAAC;AAJS,GAApB,EAMK,SANL,CADJ,CAD2B;AAAA,CAAxB;;AAAM,0BAAe,eAAf,C;;;;;;;ACJb,mD;;;;;;;ACAA,+D","file":"testHelper.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 = 55);\n","module.exports = require(\"react\");","import * as React from 'react';\nimport { render, RenderResult } from '@testing-library/react';\nimport SplunkThemeProvider from '@splunk/themes/SplunkThemeProvider';\n\nexport const renderWithTheme = (Component: React.ReactElement, themeToTest = {}): RenderResult =>\n render(\n <SplunkThemeProvider\n additionalThemeProperties={{ ...themeToTest }}\n colorScheme=\"light\"\n density=\"comfortable\"\n family=\"enterprise\"\n >\n {Component}\n </SplunkThemeProvider>\n );\n","module.exports = require(\"@testing-library/react\");","module.exports = require(\"@splunk/themes/SplunkThemeProvider\");"],"sourceRoot":""}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/common/utils/testHelper.tsx", "esm-externals:react", "esm-externals:@testing-library/react", "esm-externals:@splunk/themes/SplunkThemeProvider"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { render, RenderResult } from '@testing-library/react';\nimport SplunkThemeProvider from '@splunk/themes/SplunkThemeProvider';\n\nexport const renderWithTheme = (Component: React.ReactElement, themeToTest = {}): RenderResult =>\n render(\n <SplunkThemeProvider\n additionalThemeProperties={{ ...themeToTest }}\n colorScheme=\"light\"\n density=\"comfortable\"\n family=\"enterprise\"\n >\n {Component}\n </SplunkThemeProvider>\n );\n", "\nimport * as defaultImport from \"react\";\nexport * from \"react\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@testing-library/react\";\nexport * from \"@testing-library/react\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/themes/SplunkThemeProvider\";\nexport * from \"@splunk/themes/SplunkThemeProvider\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AACA,oBAA+B;AAC/B,0BAAc;AACd,IAAO,gBAAS,aAAa,gBAA8B,wBAAU;;;ACHrE,IAAAA,iBAAA;AAAA,SAAAA,gBAAA;AAAA,iBAAAC;AAAA;AACA,IAAAC,iBAA+B;AAC/B,WAAAC,gBAAc;AACd,IAAOC,iBAAS,aAAaF,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAG,iBAA+B;AAC/B,wCAAc;AACd,IAAO,8BAAS,aAAaA,iBAA8B,yBAAUA;;;AHC9D,IAAM,kBAAkB,CAAC,WAA+B,cAAc,CAAC,UAC1E;AAAA,EACI;AAAA,IAAC;AAAA;AAAA,MACG,2BAA2B,mBAAK;AAAA,MAChC,aAAY;AAAA,MACZ,SAAQ;AAAA,MACR,QAAO;AAAA;AAAA,IAEN;AAAA,EACL;AACJ;",
6
+ "names": ["react_exports", "react_default", "defaultImport", "react_exports", "react_default", "defaultImport"]
7
+ }