@splunk/visualizations 25.13.1 → 26.0.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 (147) hide show
  1. package/Area.config.js +216 -216
  2. package/Area.config.js.map +1 -1
  3. package/Area.js +529 -561
  4. package/Area.js.map +1 -1
  5. package/Bar.config.js +213 -213
  6. package/Bar.config.js.map +1 -1
  7. package/Bar.js +394 -386
  8. package/Bar.js.map +1 -1
  9. package/Bubble.config.js +140 -140
  10. package/Bubble.config.js.map +1 -1
  11. package/Bubble.js +313 -305
  12. package/Bubble.js.map +1 -1
  13. package/ChoroplethSvg.config.js +15 -15
  14. package/ChoroplethSvg.config.js.map +1 -1
  15. package/ChoroplethSvg.js +149 -144
  16. package/ChoroplethSvg.js.map +1 -1
  17. package/Column.config.js +205 -205
  18. package/Column.config.js.map +1 -1
  19. package/Column.js +387 -379
  20. package/Column.js.map +1 -1
  21. package/Ellipse.config.js +45 -45
  22. package/Ellipse.config.js.map +1 -1
  23. package/Ellipse.js +157 -144
  24. package/Ellipse.js.map +1 -1
  25. package/Events.config.js +11 -11
  26. package/Events.config.js.map +1 -1
  27. package/Events.js +273 -261
  28. package/Events.js.map +1 -1
  29. package/FillerGauge.config.js +46 -46
  30. package/FillerGauge.config.js.map +1 -1
  31. package/FillerGauge.js +267 -262
  32. package/FillerGauge.js.map +1 -1
  33. package/Image.config.js +8 -8
  34. package/Image.config.js.map +1 -1
  35. package/Image.js +110 -104
  36. package/Image.js.map +1 -1
  37. package/Line.config.js +220 -220
  38. package/Line.config.js.map +1 -1
  39. package/Line.js +404 -396
  40. package/Line.js.map +1 -1
  41. package/LinkGraph.config.js +27 -27
  42. package/LinkGraph.config.js.map +1 -1
  43. package/LinkGraph.js +557 -548
  44. package/LinkGraph.js.map +1 -1
  45. package/Map.config.js +71 -71
  46. package/Map.config.js.map +1 -1
  47. package/Map.js +471 -465
  48. package/Map.js.map +1 -1
  49. package/Markdown.config.js +23 -23
  50. package/Markdown.config.js.map +1 -1
  51. package/Markdown.js +151 -145
  52. package/Markdown.js.map +1 -1
  53. package/MarkerGauge.config.js +84 -84
  54. package/MarkerGauge.config.js.map +1 -1
  55. package/MarkerGauge.js +295 -289
  56. package/MarkerGauge.js.map +1 -1
  57. package/ParallelCoordinates.config.js +23 -23
  58. package/ParallelCoordinates.config.js.map +1 -1
  59. package/ParallelCoordinates.js +164 -162
  60. package/ParallelCoordinates.js.map +1 -1
  61. package/Pie.config.js +24 -24
  62. package/Pie.config.js.map +1 -1
  63. package/Pie.js +233 -228
  64. package/Pie.js.map +1 -1
  65. package/Punchcard.config.js +33 -33
  66. package/Punchcard.config.js.map +1 -1
  67. package/Punchcard.js +278 -279
  68. package/Punchcard.js.map +1 -1
  69. package/Rectangle.config.js +46 -46
  70. package/Rectangle.config.js.map +1 -1
  71. package/Rectangle.js +154 -142
  72. package/Rectangle.js.map +1 -1
  73. package/Sankey.config.js +19 -19
  74. package/Sankey.config.js.map +1 -1
  75. package/Sankey.js +281 -275
  76. package/Sankey.js.map +1 -1
  77. package/Scatter.config.js +135 -135
  78. package/Scatter.config.js.map +1 -1
  79. package/Scatter.js +304 -299
  80. package/Scatter.js.map +1 -1
  81. package/SingleValue.config.js +119 -119
  82. package/SingleValue.config.js.map +1 -1
  83. package/SingleValue.js +359 -341
  84. package/SingleValue.js.map +1 -1
  85. package/SingleValueBasic.js +14 -14
  86. package/SingleValueBasic.js.map +1 -1
  87. package/SingleValueIcon.config.js +117 -117
  88. package/SingleValueIcon.config.js.map +1 -1
  89. package/SingleValueIcon.js +373 -371
  90. package/SingleValueIcon.js.map +1 -1
  91. package/SingleValueRadial.config.js +157 -115
  92. package/SingleValueRadial.config.js.map +1 -1
  93. package/SingleValueRadial.js +1114 -540
  94. package/SingleValueRadial.js.map +1 -1
  95. package/SparkLine.js +50 -20
  96. package/SparkLine.js.map +1 -1
  97. package/Table.config.js +54 -54
  98. package/Table.config.js.map +1 -1
  99. package/Table.js +302 -286
  100. package/Table.js.map +1 -1
  101. package/common/Charting.js +41 -41
  102. package/common/Charting.js.map +1 -1
  103. package/common/EventsDoc.js +15 -14
  104. package/common/EventsDoc.js.map +1 -1
  105. package/common/GaugeMajorTicks.js +2 -2
  106. package/common/GaugeMajorTicks.js.map +1 -1
  107. package/common/GaugeValueMarker.js +2 -2
  108. package/common/GaugeValueMarker.js.map +1 -1
  109. package/common/OptionsDoc.js +22 -22
  110. package/common/OptionsDoc.js.map +1 -1
  111. package/common/OverviewDoc.js +32 -27
  112. package/common/OverviewDoc.js.map +1 -1
  113. package/common/SplunkVisualization.js +4 -4
  114. package/common/SplunkVisualization.js.map +1 -1
  115. package/common/SplunkVisualizationApi.js +2 -2
  116. package/common/SplunkVisualizationApi.js.map +1 -1
  117. package/common/ThemesDoc.js +14 -14
  118. package/common/ThemesDoc.js.map +1 -1
  119. package/common/chartingUtils.js +12 -12
  120. package/common/chartingUtils.js.map +1 -1
  121. package/common/docUtils.js +4 -4
  122. package/common/docUtils.js.map +1 -1
  123. package/common/gaugeUtils.js +112 -112
  124. package/common/gaugeUtils.js.map +1 -1
  125. package/common/shapeUtils.js +21 -15
  126. package/common/shapeUtils.js.map +1 -1
  127. package/common/utils/configUtils.js +10 -9
  128. package/common/utils/configUtils.js.map +1 -1
  129. package/common/utils/dataUtils.js +2 -2
  130. package/common/utils/dataUtils.js.map +1 -1
  131. package/common/utils/hocUtils.js +2 -2
  132. package/common/utils/hocUtils.js.map +1 -1
  133. package/common/utils/layoutUtils.js +2 -2
  134. package/common/utils/layoutUtils.js.map +1 -1
  135. package/common/utils/mapUtils.js +84 -80
  136. package/common/utils/mapUtils.js.map +1 -1
  137. package/common/utils/singleValueUtils.js +2 -2
  138. package/common/utils/singleValueUtils.js.map +1 -1
  139. package/common/utils/testHelper.js +27 -9
  140. package/common/utils/testHelper.js.map +1 -1
  141. package/common/utils/trellisUtils.js +26 -26
  142. package/common/utils/trellisUtils.js.map +1 -1
  143. package/common/utils/urlUtils.js +2 -2
  144. package/common/utils/urlUtils.js.map +1 -1
  145. package/common/withDashboardViz.js +107 -104
  146. package/common/withDashboardViz.js.map +1 -1
  147. package/package.json +19 -19
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"lodash\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///./src/common/utils/singleValueUtils.js","webpack:///external \"@splunk/visualizations-shared/numberUtils\"","webpack:///external \"@splunk/visualizations-shared/domUtils\"","webpack:///external \"@splunk/visualizations-shared/propUtils\"","webpack:///external \"@splunk/visualizations-shared/colorConstants\""],"names":["DEFAULT_FONT","DEFAULT_FONT_FAMILY","SVR_PADDING","top","bottom","left","right","shouldShowTrend","trendDisplay","isLoadingOrNoColumns","dataSources","loading","data","get","undefined","noColumns","getFormattedColor","color","defaultColor","formatColor","hasBackground","backgroundColor","isIdenticalColor","colorA","colorB","toLowerCase","getDefaultColorWithBg","_ref","defaultFontColor","defaultBlockFontColor","getMajorColor","_ref2","majorColor","getTrendColor","_ref3","trendColor","trendValue","majorValue","customizedBgColor","defaultColors","Number","isNaN","defaultBackgroundColor","isInvalidTrend","parseFloat","DELTA_GREEN","DELTA_RED","computeColors","props","backgroundEnabled","underLabelColor","computeText","_ref4","value","numberPrecision","shouldUseThousandSeparators","shouldAbbreviateTrendValue","text","isNumerial","formatNumber","useThousandSeparators","useTrendUnits","getMajorText","_ref5","getTrendText","_ref6","compute","showPercent","diff","Math","abs","val","round","isFinite","concat","computeFontSize","_ref7","width","height","fontFamily","arguments","length","fontWeight","widthInDefaultFont","computeTextSize","fontSize","min","parseInt","getMajorFontSize","_ref8","unit","majorText","_ref8$spaceRatio","spaceRatio","majorTextCalc","getTrendFontSize","_ref9","trendText","_ref9$spaceRatio","trendFontSize","getUnderLabelHeight","getUnderLabel","_ref10","underLabel","getMajorAndTrend","_ref11","majorFontSize","majorTextSpaceRatio","textContentWidth","textContentHeight","majorTextFontSize","trendTextFontSize","updateVizInSmallSpace","_ref12","toRemoveList","removeIndex","newProps","newMajorAndTrend","newTextSize","toRemove","_objectSpread","_defineProperty","key","truncateValue","toString","slice","updatedProps","computeSingleValueContent","_ref13","contentWidth","contentHeight","containerWidth","containerHeight","_getMajorAndTrend","majorValueTitle","smallVizProps","_updateVizInSmallSpac","minimallyTruncateStringToWidth","_ref14","_ref14$fontSize","_ref14$fontFamily","_ref14$fontWeight","textWidth","modifiedText","ellipsesLength","substring","computeSingleValueRadialContent","_ref15","smallViz","_getMajorAndTrend2","_getMajorAndTrend3","getGraphColors","_ref16","customColorFormatter","none","adjustRGB","rgb","delta","changeColor","ratio","hex","replace","r","substr","g","b","newR","max","floor","newG","newB","padStart","lighten","darken","handleValueClickCallback","ev","majorValueField","onValueClick","trellisEnabled","trellisSplityBy","trellisKey","payload","name"],"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,kE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACA6B;AACwD;AACZ;AACH;AACgB;AAE/E,IAAMA,YAAY,GAAG,EAAE;AACvB,IAAMC,mBAAmB,GAC5B,w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AAE;IAAEM,OAAO,EAAPA;EAAO,GAAG;AAC3C,CAAC,C;;;;;;;AC33BD,sE;;;;;;;ACAA,mE;;;;;;;ACAA,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 = 32);\n","module.exports = require(\"lodash\");","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\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.shouldAbbreviateTrendValue\n * @returns {Number} major or trend text\n */\nexport const computeText = ({\n value,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n}) => {\n let text = isNumerial(value)\n ? formatNumber(value, numberPrecision, {\n useThousandSeparators: shouldUseThousandSeparators, // todo: need update formatNumber\n useTrendUnits: shouldAbbreviateTrendValue,\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 * @returns {String} majorText\n */\nexport const getMajorText = ({ majorValue, numberPrecision, shouldUseThousandSeparators }) =>\n computeText({\n value: majorValue === null ? 'N/A' : majorValue, // if majorValue is null, use `N/A`.\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue: false,\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 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 * @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}) => {\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({ majorValue, numberPrecision, shouldUseThousandSeparators });\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 {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 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 });\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 {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 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 });\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 }));\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/numberUtils\");","module.exports = require(\"@splunk/visualizations-shared/domUtils\");","module.exports = require(\"@splunk/visualizations-shared/propUtils\");","module.exports = require(\"@splunk/visualizations-shared/colorConstants\");"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"lodash\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///./src/common/utils/singleValueUtils.js","webpack:///external \"@splunk/visualizations-shared/numberUtils\"","webpack:///external \"@splunk/visualizations-shared/domUtils\"","webpack:///external \"@splunk/visualizations-shared/propUtils\"","webpack:///external \"@splunk/visualizations-shared/colorConstants\""],"names":["DEFAULT_FONT","DEFAULT_FONT_FAMILY","SVR_PADDING","top","bottom","left","right","shouldShowTrend","trendDisplay","isLoadingOrNoColumns","dataSources","loading","data","get","undefined","noColumns","getFormattedColor","color","defaultColor","formatColor","hasBackground","backgroundColor","isIdenticalColor","colorA","colorB","toLowerCase","getDefaultColorWithBg","_ref","defaultFontColor","defaultBlockFontColor","getMajorColor","_ref2","majorColor","getTrendColor","_ref3","trendColor","trendValue","majorValue","customizedBgColor","defaultColors","Number","isNaN","defaultBackgroundColor","isInvalidTrend","parseFloat","DELTA_GREEN","DELTA_RED","computeColors","props","backgroundEnabled","underLabelColor","computeText","_ref4","value","numberPrecision","shouldUseThousandSeparators","shouldAbbreviateTrendValue","text","isNumerial","formatNumber","useThousandSeparators","useTrendUnits","getMajorText","_ref5","getTrendText","_ref6","compute","showPercent","diff","Math","abs","val","round","isFinite","concat","computeFontSize","_ref7","width","height","fontFamily","arguments","length","fontWeight","widthInDefaultFont","computeTextSize","fontSize","min","parseInt","getMajorFontSize","_ref8","unit","majorText","_ref8$spaceRatio","spaceRatio","majorTextCalc","getTrendFontSize","_ref9","trendText","_ref9$spaceRatio","trendFontSize","getUnderLabelHeight","getUnderLabel","_ref10","underLabel","getMajorAndTrend","_ref11","majorFontSize","majorTextSpaceRatio","textContentWidth","textContentHeight","majorTextFontSize","trendTextFontSize","updateVizInSmallSpace","_ref12","toRemoveList","removeIndex","newProps","newMajorAndTrend","newTextSize","toRemove","_objectSpread","_defineProperty","key","truncateValue","toString","slice","updatedProps","computeSingleValueContent","_ref13","contentWidth","contentHeight","containerWidth","containerHeight","_getMajorAndTrend","majorValueTitle","smallVizProps","_updateVizInSmallSpac","minimallyTruncateStringToWidth","_ref14","_ref14$fontSize","_ref14$fontFamily","_ref14$fontWeight","textWidth","modifiedText","ellipsesLength","substring","computeSingleValueRadialContent","_ref15","smallViz","_getMajorAndTrend2","_getMajorAndTrend3","getGraphColors","_ref16","customColorFormatter","none","adjustRGB","rgb","delta","changeColor","ratio","hex","replace","r","substr","g","b","newR","max","floor","newG","newB","padStart","lighten","darken","handleValueClickCallback","ev","majorValueField","onValueClick","trellisEnabled","trellisSplityBy","trellisKey","payload","name"],"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,kE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACA6B;AACwD;AACZ;AACH;AACgB;AAE/E,IAAMA,YAAY,GAAG,EAAE;AACvB,IAAMC,mBAAmB,GAC5B,wFAAwF;AAErF,IAAMC,WAAW,GAAG;EAAEC,GAAG,EAAE,EAAE;EAAEC,MAAM,EAAE,EAAE;EAAEC,IAAI,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;;AAEvE;AACA;AACA;AACA;AACA;AACO,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAGC,YAAY;EAAA,OAAIA,YAAY,KAAK,UAAU,IAAIA,YAAY,KAAK,SAAS;AAAA;;AAExG;AACA;AACA;AACA;AACA;AACA;AACO,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAIC,WAAW,EAAEC,OAAO,EAAK;EAC1D,IAAMC,IAAI,GAAGC,kDAAG,CAACH,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AE,GAAG,CAAC;AAAA;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAM6J,wBAAwB,GAAG,SAA3BA,wBAAwBA,CACjCC,EAAE,EACF1I,UAAU,EACV2I,eAAe,EACf5I,UAAU,EACV6I,YAAY,EAIX;EAAA,IAHDC,cAAc,GAAAlG,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAlE,SAAA,GAAAkE,SAAA,MAAG,KAAK;EAAA,IACtBmG,eAAe,GAAAnG,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAlE,SAAA,GAAAkE,SAAA,MAAG,EAAE;EAAA,IACpBoG,UAAU,GAAApG,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAlE,SAAA,GAAAkE,SAAA,MAAG,EAAE;EAEf,IAAIqG,OAAO,GAAG;IACVjJ,UAAU,EAAVA,UAAU;IACViB,KAAK,EAAEhB,UAAU;IACjBiJ,IAAI,EAAEN;EACV,CAAC;EACD,IAAIE,cAAc,EAAE;IAChBG,OAAO,GAAA7D,aAAA,CAAAA,aAAA,KAAQ6D,OAAO;MAAE,cAAc,EAAEF,eAAe;MAAE,eAAe,EAAEC;IAAU,EAAE;EAC1F;EACA,OAAOH,YAAY,CAAAzD,aAAA,CAAAA,aAAA,KAAMuD,EAAE;IAAEM,OAAO,EAAPA;EAAO,GAAG;AAC3C,CAAC,C;;;;;;;AC33BD,sE;;;;;;;ACAA,mE;;;;;;;ACAA,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 = 33);\n","module.exports = require(\"lodash\");","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\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.shouldAbbreviateTrendValue\n * @returns {Number} major or trend text\n */\nexport const computeText = ({\n value,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n}) => {\n let text = isNumerial(value)\n ? formatNumber(value, numberPrecision, {\n useThousandSeparators: shouldUseThousandSeparators, // todo: need update formatNumber\n useTrendUnits: shouldAbbreviateTrendValue,\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 * @returns {String} majorText\n */\nexport const getMajorText = ({ majorValue, numberPrecision, shouldUseThousandSeparators }) =>\n computeText({\n value: majorValue === null ? 'N/A' : majorValue, // if majorValue is null, use `N/A`.\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue: false,\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 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 * @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}) => {\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({ majorValue, numberPrecision, shouldUseThousandSeparators });\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 {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 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 });\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 {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 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 });\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 }));\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/numberUtils\");","module.exports = require(\"@splunk/visualizations-shared/domUtils\");","module.exports = require(\"@splunk/visualizations-shared/propUtils\");","module.exports = require(\"@splunk/visualizations-shared/colorConstants\");"],"sourceRoot":""}
@@ -87,7 +87,7 @@ module.exports =
87
87
  /******/
88
88
  /******/
89
89
  /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 33);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 34);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
@@ -99,7 +99,7 @@ module.exports = require("react");
99
99
 
100
100
  /***/ }),
101
101
 
102
- /***/ 33:
102
+ /***/ 34:
103
103
  /***/ (function(module, exports, __webpack_require__) {
104
104
 
105
105
  "use strict";
@@ -108,14 +108,16 @@ module.exports = require("react");
108
108
  Object.defineProperty(exports, "__esModule", {
109
109
  value: true
110
110
  });
111
- exports.mountWithTheme = void 0;
111
+ exports.renderWithTheme = exports.mountWithTheme = void 0;
112
112
  var React = __webpack_require__(3);
113
- var enzyme_1 = __webpack_require__(34);
114
- var SplunkThemeProvider_1 = __webpack_require__(35);
113
+ var enzyme_1 = __webpack_require__(35);
114
+ var react_1 = __webpack_require__(36);
115
+ var SplunkThemeProvider_1 = __webpack_require__(37);
115
116
  /* eslint-disable react/prop-types, react/display-name */
117
+ // TODO - Remove this enzyme method after all dependent test cases converted to RTL
116
118
  var mountWithTheme = function mountWithTheme(Component) {
117
119
  var themeToTest = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
118
- return enzyme_1.mount(Component, {
120
+ return (0, enzyme_1.mount)(Component, {
119
121
  wrappingComponent: function wrappingComponent(_ref) {
120
122
  var children = _ref.children;
121
123
  return React.createElement(SplunkThemeProvider_1.default, {
@@ -128,18 +130,34 @@ var mountWithTheme = function mountWithTheme(Component) {
128
130
  });
129
131
  };
130
132
  exports.mountWithTheme = mountWithTheme;
131
- /* eslint-enable react/prop-types, react/display-name */
133
+ var renderWithTheme = function renderWithTheme(Component) {
134
+ var themeToTest = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
135
+ return (0, react_1.render)(React.createElement(SplunkThemeProvider_1.default, {
136
+ additionalThemeProperties: Object.assign({}, themeToTest),
137
+ colorScheme: "light",
138
+ density: "comfortable",
139
+ family: "enterprise"
140
+ }, Component));
141
+ };
142
+ exports.renderWithTheme = renderWithTheme;
132
143
 
133
144
  /***/ }),
134
145
 
135
- /***/ 34:
146
+ /***/ 35:
136
147
  /***/ (function(module, exports) {
137
148
 
138
149
  module.exports = require("enzyme");
139
150
 
140
151
  /***/ }),
141
152
 
142
- /***/ 35:
153
+ /***/ 36:
154
+ /***/ (function(module, exports) {
155
+
156
+ module.exports = require("@testing-library/react");
157
+
158
+ /***/ }),
159
+
160
+ /***/ 37:
143
161
  /***/ (function(module, exports) {
144
162
 
145
163
  module.exports = require("@splunk/themes/SplunkThemeProvider");
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///./src/common/utils/testHelper.tsx","webpack:///external \"enzyme\"","webpack:///external \"@splunk/themes/SplunkThemeProvider\""],"names":["React","require","enzyme_1","SplunkThemeProvider_1","mountWithTheme","Component","themeToTest","arguments","length","undefined","mount","wrappingComponent","_ref","children","createElement","default","additionalThemeProperties","Object","assign","colorScheme","density","family","exports"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;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+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 = 33);\n","module.exports = require(\"react\");","import * as React from 'react';\nimport { mount, ReactWrapper } from 'enzyme';\nimport SplunkThemeProvider from '@splunk/themes/SplunkThemeProvider';\n\n/* eslint-disable react/prop-types, react/display-name */\nexport const mountWithTheme = (Component: React.ReactElement, themeToTest = {}): ReactWrapper =>\n mount(Component, {\n wrappingComponent: ({ children }): React.ReactElement => (\n <SplunkThemeProvider\n additionalThemeProperties={{ ...themeToTest }}\n colorScheme=\"light\"\n density=\"comfortable\"\n family=\"enterprise\"\n >\n {children}\n </SplunkThemeProvider>\n ),\n });\n/* eslint-enable react/prop-types, react/display-name */\n","module.exports = require(\"enzyme\");","module.exports = require(\"@splunk/themes/SplunkThemeProvider\");"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///./src/common/utils/testHelper.tsx","webpack:///external \"enzyme\"","webpack:///external \"@testing-library/react\"","webpack:///external \"@splunk/themes/SplunkThemeProvider\""],"names":["React","require","enzyme_1","react_1","SplunkThemeProvider_1","mountWithTheme","Component","themeToTest","arguments","length","undefined","mount","wrappingComponent","_ref","children","createElement","default","additionalThemeProperties","Object","assign","colorScheme","density","family","exports","renderWithTheme","render"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAE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B,SAA6B;EAAA,IAAEC,WAAW,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,OAC3E,IAAAL,OAAA,CAAAsB,MAAM,EACFzB,KAAA,CAAAe,aAAA,CAACX,qBAAA,CAAAY,OAAmB;IAChBC,yBAAyB,EAAAC,MAAA,CAAAC,MAAA,KAAOZ,WAAW;IAC3Ca,WAAW,EAAC,OAAO;IACnBC,OAAO,EAAC,aAAa;IACrBC,MAAM,EAAC;EAAY,GAElBhB,SAAS,CACQ,CACzB;AAAA;AAVQiB,OAAA,CAAAC,eAAe,GAAAA,eAAA,C;;;;;;;ACrB5B,mC;;;;;;;ACAA,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 = 34);\n","module.exports = require(\"react\");","import * as React from 'react';\nimport { mount, ReactWrapper } from 'enzyme';\nimport { render, RenderResult } from '@testing-library/react';\nimport SplunkThemeProvider from '@splunk/themes/SplunkThemeProvider';\n\n/* eslint-disable react/prop-types, react/display-name */\n// TODO - Remove this enzyme method after all dependent test cases converted to RTL\nexport const mountWithTheme = (Component: React.ReactElement, themeToTest = {}): ReactWrapper =>\n mount(Component, {\n wrappingComponent: ({ children }): React.ReactElement => (\n <SplunkThemeProvider\n additionalThemeProperties={{ ...themeToTest }}\n colorScheme=\"light\"\n density=\"comfortable\"\n family=\"enterprise\"\n >\n {children}\n </SplunkThemeProvider>\n ),\n });\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(\"enzyme\");","module.exports = require(\"@testing-library/react\");","module.exports = require(\"@splunk/themes/SplunkThemeProvider\");"],"sourceRoot":""}
@@ -87,7 +87,7 @@ module.exports =
87
87
  /******/
88
88
  /******/
89
89
  /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 36);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 38);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
@@ -106,7 +106,7 @@ module.exports = require("@babel/runtime/helpers/toConsumableArray");
106
106
 
107
107
  /***/ }),
108
108
 
109
- /***/ 36:
109
+ /***/ 38:
110
110
  /***/ (function(module, exports, __webpack_require__) {
111
111
 
112
112
  "use strict";
@@ -118,7 +118,7 @@ Object.defineProperty(exports, "__esModule", {
118
118
  });
119
119
  exports.getTrellisDataSourcesBySplitMode = exports.dataSourcesSplitByModeStatsorUnknown = exports.dataSourcesSplitByModeChart = exports.dataSourcesSplitByModeTimechart = exports.dataSourcesSplitByAggregationsStats = exports.dataSourcesSplitByAggregationsTimechartAndChart = exports.dataSourcesSplitByAggregationsUnknown = exports.AGGREGATIONS = void 0;
120
120
  var lodash_1 = __webpack_require__(0);
121
- var trellisUtils_1 = __webpack_require__(37);
121
+ var trellisUtils_1 = __webpack_require__(39);
122
122
  exports.AGGREGATIONS = 'aggregations';
123
123
  /**
124
124
  * There can be certain SPL cmds that can produce dataSource without a specific field meta info (like group_by_rank, split_by_field etc),
@@ -139,7 +139,7 @@ var dataSourcesSplitByAggregationsUnknown = function dataSourcesSplitByAggregati
139
139
  for (var i = 0; i < fields.length; i += 1) {
140
140
  var fieldName = fields[i].name;
141
141
  if (!(fieldName === null || fieldName === void 0 ? void 0 : fieldName.startsWith('_'))) {
142
- splitDataSources[fieldName] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
142
+ splitDataSources[fieldName] = (0, lodash_1.cloneDeep)((0, lodash_1.omit)(dataSource, ['primary.data.fields', 'primary.data.columns']));
143
143
  splitDataSources[fieldName].primary.data.fields = [fields[i]];
144
144
  splitDataSources[fieldName].primary.data.columns = [columns[i]];
145
145
  }
@@ -161,12 +161,12 @@ var dataSourcesSplitByAggregationsTimechartAndChart = function dataSourcesSplitB
161
161
  var splitByFields = [];
162
162
  var errorCode = null;
163
163
  if (typeof fields[0] !== 'string') {
164
- splitByFields = trellisUtils_1.extractDataSourceAggregationKeysChart(fields);
164
+ splitByFields = (0, trellisUtils_1.extractDataSourceAggregationKeysChart)(fields);
165
165
  }
166
166
  if (splitByFields && splitByFields.length > 0) {
167
167
  splitDataSources = {};
168
168
  splitByFields.forEach(function (splitByField) {
169
- splitDataSources[splitByField] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
169
+ splitDataSources[splitByField] = (0, lodash_1.cloneDeep)((0, lodash_1.omit)(dataSource, ['primary.data.fields', 'primary.data.columns']));
170
170
  splitDataSources[splitByField].primary.data.fields = [fields[0]];
171
171
  splitDataSources[splitByField].primary.data.columns = [columns[0]];
172
172
  fields.forEach(function (field, idx) {
@@ -185,7 +185,7 @@ var dataSourcesSplitByAggregationsTimechartAndChart = function dataSourcesSplitB
185
185
  for (var i = 1; i < fields.length; i += 1) {
186
186
  var fieldName = fields[i].name;
187
187
  if (!(fieldName === null || fieldName === void 0 ? void 0 : fieldName.startsWith('_'))) {
188
- splitDataSources[fieldName] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
188
+ splitDataSources[fieldName] = (0, lodash_1.cloneDeep)((0, lodash_1.omit)(dataSource, ['primary.data.fields', 'primary.data.columns']));
189
189
  splitDataSources[fieldName].primary.data.fields = [fields[0], fields[i]];
190
190
  splitDataSources[fieldName].primary.data.columns = [columns[0], columns[i]];
191
191
  }
@@ -207,12 +207,12 @@ var dataSourcesSplitByAggregationsStats = function dataSourcesSplitByAggregation
207
207
  var splitByFields = [];
208
208
  var errorCode = null;
209
209
  if (typeof fields[0] !== 'string') {
210
- splitByFields = trellisUtils_1.extractDataSourceAggregationKeysStats(fields);
210
+ splitByFields = (0, trellisUtils_1.extractDataSourceAggregationKeysStats)(fields);
211
211
  }
212
212
  if (splitByFields && splitByFields.length > 0) {
213
213
  splitDataSources = {};
214
214
  splitByFields.forEach(function (splitByField) {
215
- splitDataSources[splitByField] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
215
+ splitDataSources[splitByField] = (0, lodash_1.cloneDeep)((0, lodash_1.omit)(dataSource, ['primary.data.fields', 'primary.data.columns']));
216
216
  splitDataSources[splitByField].primary.data.fields = [fields[0]];
217
217
  splitDataSources[splitByField].primary.data.columns = [columns[0]];
218
218
  var idx = fields.findIndex(function (field) {
@@ -240,11 +240,11 @@ var dataSourcesSplitByModeTimechart = function dataSourcesSplitByModeTimechart(d
240
240
  var splitByFields = [];
241
241
  var errorCode = null;
242
242
  if (typeof fields[0] !== 'string') {
243
- splitByFields = trellisUtils_1.extractSplitByFieldsChartFields(fields);
243
+ splitByFields = (0, trellisUtils_1.extractSplitByFieldsChartFields)(fields);
244
244
  }
245
245
  if (splitByFields && splitByFields.indexOf(splitBy) > -1) {
246
246
  splitDataSources = {};
247
- var dataSourceKeys = trellisUtils_1.extractDataSourceAggregationKeysChart(fields);
247
+ var dataSourceKeys = (0, trellisUtils_1.extractDataSourceAggregationKeysChart)(fields);
248
248
  var valueKeys = [];
249
249
  for (var i = 1; i < fields.length; i += 1) {
250
250
  // not including internal fields
@@ -253,7 +253,7 @@ var dataSourcesSplitByModeTimechart = function dataSourcesSplitByModeTimechart(d
253
253
  }
254
254
  }
255
255
  valueKeys.forEach(function (val) {
256
- splitDataSources[val] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
256
+ splitDataSources[val] = (0, lodash_1.cloneDeep)((0, lodash_1.omit)(dataSource, ['primary.data.fields', 'primary.data.columns']));
257
257
  splitDataSources[val].primary.data.fields = [{
258
258
  name: fields[0].name
259
259
  }].concat(_toConsumableArray(dataSourceKeys.map(function (k) {
@@ -287,7 +287,7 @@ var dataSourcesSplitByModeChart = function dataSourcesSplitByModeChart(dataSourc
287
287
  var splitByFields = [];
288
288
  var errorCode = null;
289
289
  if (typeof fields[0] !== 'string') {
290
- splitByFields = trellisUtils_1.extractSplitByFieldsChartFields(fields);
290
+ splitByFields = (0, trellisUtils_1.extractSplitByFieldsChartFields)(fields);
291
291
  }
292
292
  if (splitByFields && splitByFields.indexOf(splitBy) > -1) {
293
293
  splitDataSources = {};
@@ -297,7 +297,7 @@ var dataSourcesSplitByModeChart = function dataSourcesSplitByModeChart(dataSourc
297
297
  var otherSplitBy = splitByFields.filter(function (f) {
298
298
  return f !== splitBy;
299
299
  });
300
- var dataSourceKeys = trellisUtils_1.extractDataSourceAggregationKeysChart(fields);
300
+ var dataSourceKeys = (0, trellisUtils_1.extractDataSourceAggregationKeysChart)(fields);
301
301
  var nonDataSourceAggregations = [];
302
302
  if (!dataSourceKeys.length && fields[0].groupby_rank === '0' && fields.length && !fields[1].groupby_rank) {
303
303
  /* check for another aggregation scenario where no key 'data_source' will be returned (applies for both chart and stats cmd)
@@ -325,9 +325,9 @@ var dataSourcesSplitByModeChart = function dataSourcesSplitByModeChart(dataSourc
325
325
  }
326
326
  if (splitByFieldIdx === 0) {
327
327
  // if splitBy is the first field, split row wise
328
- var valueKeys = lodash_1.cloneDeep(columns[0]);
328
+ var valueKeys = (0, lodash_1.cloneDeep)(columns[0]);
329
329
  valueKeys.forEach(function (val, idx) {
330
- splitDataSources[val] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
330
+ splitDataSources[val] = (0, lodash_1.cloneDeep)((0, lodash_1.omit)(dataSource, ['primary.data.fields', 'primary.data.columns']));
331
331
  splitDataSources[val].primary.data.fields = [];
332
332
  if (otherSplitBy.length) {
333
333
  splitDataSources[val].primary.data.fields = [{
@@ -435,7 +435,7 @@ var dataSourcesSplitByModeChart = function dataSourcesSplitByModeChart(dataSourc
435
435
  _valueKeys.push(fields[_i2].splitby_value ? fields[_i2].splitby_value : fields[_i2].name);
436
436
  }
437
437
  _valueKeys.forEach(function (val) {
438
- splitDataSources[val] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
438
+ splitDataSources[val] = (0, lodash_1.cloneDeep)((0, lodash_1.omit)(dataSource, ['primary.data.fields', 'primary.data.columns']));
439
439
  splitDataSources[val].primary.data.fields = [{
440
440
  name: otherSplitBy[0]
441
441
  }].concat(_toConsumableArray(dataSourceKeys.map(function (k) {
@@ -474,7 +474,7 @@ var dataSourcesSplitByModeStatsorUnknown = function dataSourcesSplitByModeStatso
474
474
  var splitByFields = [];
475
475
  var errorCode = null;
476
476
  if (typeof fields[0] !== 'string') {
477
- splitByFields = splitMode !== trellisUtils_1.UNKNOWN ? trellisUtils_1.extractSplitByFieldsForStats(fields) : trellisUtils_1.extractSplitByFieldsForUnknown(fields);
477
+ splitByFields = splitMode !== trellisUtils_1.UNKNOWN ? (0, trellisUtils_1.extractSplitByFieldsForStats)(fields) : (0, trellisUtils_1.extractSplitByFieldsForUnknown)(fields);
478
478
  }
479
479
  var splitByIndex = fields === null || fields === void 0 ? void 0 : fields.findIndex(function (field) {
480
480
  return field === splitBy || field.name === splitBy;
@@ -489,12 +489,12 @@ var dataSourcesSplitByModeStatsorUnknown = function dataSourcesSplitByModeStatso
489
489
  splitDataSources[val].push(idx);
490
490
  }
491
491
  });
492
- var cloneFields = lodash_1.cloneDeep(fields);
492
+ var cloneFields = (0, lodash_1.cloneDeep)(fields);
493
493
  cloneFields.splice(splitByIndex, 1);
494
494
  var valueKeys = Object.keys(splitDataSources);
495
495
  valueKeys.forEach(function (val) {
496
- var valIndices = lodash_1.cloneDeep(splitDataSources[val]);
497
- splitDataSources[val] = lodash_1.cloneDeep(lodash_1.omit(dataSource, ['primary.data.fields', 'primary.data.columns']));
496
+ var valIndices = (0, lodash_1.cloneDeep)(splitDataSources[val]);
497
+ splitDataSources[val] = (0, lodash_1.cloneDeep)((0, lodash_1.omit)(dataSource, ['primary.data.fields', 'primary.data.columns']));
498
498
  splitDataSources[val].primary.data.fields = cloneFields;
499
499
  splitDataSources[val].primary.data.columns = [];
500
500
  columns.forEach(function (col, idx) {
@@ -519,13 +519,13 @@ var getTrellisDataSourcesBySplitMode = function getTrellisDataSourcesBySplitMode
519
519
  var result = null;
520
520
  try {
521
521
  if (splitMode === trellisUtils_1.TIMECHART) {
522
- result = trellisSplitBy === exports.AGGREGATIONS ? exports.dataSourcesSplitByAggregationsTimechartAndChart(dataSources) : exports.dataSourcesSplitByModeTimechart(dataSources, trellisSplitBy);
522
+ result = trellisSplitBy === exports.AGGREGATIONS ? (0, exports.dataSourcesSplitByAggregationsTimechartAndChart)(dataSources) : (0, exports.dataSourcesSplitByModeTimechart)(dataSources, trellisSplitBy);
523
523
  } else if (splitMode === trellisUtils_1.STATS) {
524
- result = trellisSplitBy === exports.AGGREGATIONS ? exports.dataSourcesSplitByAggregationsStats(dataSources) : exports.dataSourcesSplitByModeStatsorUnknown(dataSources, trellisSplitBy, trellisUtils_1.STATS);
524
+ result = trellisSplitBy === exports.AGGREGATIONS ? (0, exports.dataSourcesSplitByAggregationsStats)(dataSources) : (0, exports.dataSourcesSplitByModeStatsorUnknown)(dataSources, trellisSplitBy, trellisUtils_1.STATS);
525
525
  } else if (splitMode === trellisUtils_1.CHART) {
526
- result = trellisSplitBy === exports.AGGREGATIONS ? exports.dataSourcesSplitByAggregationsTimechartAndChart(dataSources) : exports.dataSourcesSplitByModeChart(dataSources, trellisSplitBy);
526
+ result = trellisSplitBy === exports.AGGREGATIONS ? (0, exports.dataSourcesSplitByAggregationsTimechartAndChart)(dataSources) : (0, exports.dataSourcesSplitByModeChart)(dataSources, trellisSplitBy);
527
527
  } else if (splitMode === trellisUtils_1.UNKNOWN) {
528
- result = trellisSplitBy === exports.AGGREGATIONS ? exports.dataSourcesSplitByAggregationsUnknown(dataSources) : exports.dataSourcesSplitByModeStatsorUnknown(dataSources, trellisSplitBy, trellisUtils_1.UNKNOWN);
528
+ result = trellisSplitBy === exports.AGGREGATIONS ? (0, exports.dataSourcesSplitByAggregationsUnknown)(dataSources) : (0, exports.dataSourcesSplitByModeStatsorUnknown)(dataSources, trellisSplitBy, trellisUtils_1.UNKNOWN);
529
529
  }
530
530
  } catch (ex) {
531
531
  console.error('getTrellisDataSourcesBySplitMode ', ex);
@@ -540,7 +540,7 @@ exports.getTrellisDataSourcesBySplitMode = getTrellisDataSourcesBySplitMode;
540
540
 
541
541
  /***/ }),
542
542
 
543
- /***/ 37:
543
+ /***/ 39:
544
544
  /***/ (function(module, exports) {
545
545
 
546
546
  module.exports = require("@splunk/visualizations-shared/trellisUtils");