@splunk/visualizations 25.3.1 → 25.3.3

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 (94) hide show
  1. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Actions_Simulated_Instance.png +0 -0
  2. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Actions_for_Numeric_Field_Simulated_Instance.png +0 -0
  3. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_ChoroplethSvg_Editor.png +0 -0
  4. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Ellipse_Editor.png +0 -0
  5. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_FillerGauge_Editor.png +0 -0
  6. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_LinkGraph_Editor.png +0 -0
  7. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
  8. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Markdown_Editor.png +0 -0
  9. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_MarkerGauge_Editor.png +0 -0
  10. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Parallel_Coordinates_Editor.png +0 -0
  11. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Pie_Editor.png +0 -0
  12. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Punchcard_Editor.png +0 -0
  13. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Rectangle_Editor.png +0 -0
  14. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Sankey_Editor.png +0 -0
  15. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Editor.png +0 -0
  16. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Icon_Editor.png +0 -0
  17. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Radial_Editor.png +0 -0
  18. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Table_Editor.png +0 -0
  19. package/.loki/reference/chrome_docker_Visualizations_LinkGraph_LinkGraph_ES.png +0 -0
  20. package/Area.js +2 -2
  21. package/Bar.js +2 -2
  22. package/Bubble.js +2 -2
  23. package/ChoroplethSvg.config.js +6 -6
  24. package/ChoroplethSvg.config.js.map +1 -1
  25. package/ChoroplethSvg.js +22 -22
  26. package/ChoroplethSvg.js.map +1 -1
  27. package/Column.js +2 -2
  28. package/Ellipse.config.js +38 -41
  29. package/Ellipse.config.js.map +1 -1
  30. package/Ellipse.js +51 -54
  31. package/Ellipse.js.map +1 -1
  32. package/Events.js +10 -9
  33. package/Events.js.map +1 -1
  34. package/FillerGauge.config.js +8 -8
  35. package/FillerGauge.config.js.map +1 -1
  36. package/FillerGauge.js +17 -17
  37. package/FillerGauge.js.map +1 -1
  38. package/Image.js +2 -2
  39. package/Line.js +2 -2
  40. package/LinkGraph.config.js +13 -13
  41. package/LinkGraph.config.js.map +1 -1
  42. package/LinkGraph.js +66 -44
  43. package/LinkGraph.js.map +1 -1
  44. package/Map.config.js +3 -3
  45. package/Map.config.js.map +1 -1
  46. package/Map.js +10 -10
  47. package/Map.js.map +1 -1
  48. package/Markdown.config.js +6 -6
  49. package/Markdown.config.js.map +1 -1
  50. package/Markdown.js +19 -19
  51. package/Markdown.js.map +1 -1
  52. package/MarkerGauge.config.js +5 -5
  53. package/MarkerGauge.config.js.map +1 -1
  54. package/MarkerGauge.js +13 -13
  55. package/MarkerGauge.js.map +1 -1
  56. package/ParallelCoordinates.config.js +3 -3
  57. package/ParallelCoordinates.config.js.map +1 -1
  58. package/ParallelCoordinates.js +5 -5
  59. package/ParallelCoordinates.js.map +1 -1
  60. package/Pie.config.js +10 -16
  61. package/Pie.config.js.map +1 -1
  62. package/Pie.js +14 -20
  63. package/Pie.js.map +1 -1
  64. package/Punchcard.config.js +23 -24
  65. package/Punchcard.config.js.map +1 -1
  66. package/Punchcard.js +27 -28
  67. package/Punchcard.js.map +1 -1
  68. package/Rectangle.config.js +41 -44
  69. package/Rectangle.config.js.map +1 -1
  70. package/Rectangle.js +53 -56
  71. package/Rectangle.js.map +1 -1
  72. package/Sankey.config.js +6 -6
  73. package/Sankey.config.js.map +1 -1
  74. package/Sankey.js +13 -13
  75. package/Sankey.js.map +1 -1
  76. package/Scatter.js +2 -2
  77. package/SingleValue.config.js +17 -17
  78. package/SingleValue.config.js.map +1 -1
  79. package/SingleValue.js +21 -21
  80. package/SingleValue.js.map +1 -1
  81. package/SingleValueIcon.config.js +20 -20
  82. package/SingleValueIcon.config.js.map +1 -1
  83. package/SingleValueIcon.js +22 -22
  84. package/SingleValueIcon.js.map +1 -1
  85. package/SingleValueRadial.config.js +15 -15
  86. package/SingleValueRadial.config.js.map +1 -1
  87. package/SingleValueRadial.js +17 -17
  88. package/SingleValueRadial.js.map +1 -1
  89. package/Table.config.js +11 -11
  90. package/Table.config.js.map +1 -1
  91. package/Table.js +29 -20
  92. package/Table.js.map +1 -1
  93. package/common/withDashboardViz.js +2 -2
  94. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///external \"@splunk/visualizations-shared/Message\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@splunk/visualizations-shared/colorUtils\"","webpack:///./src/common/hocs/FixedSizeContainer.tsx","webpack:///./src/common/utils/hocUtils.ts","webpack:///external \"@splunk/visualizations-shared/style\"","webpack:///external \"@splunk/visualizations-shared/schemaUtils\"","webpack:///./src/common/utils/configUtils.ts","webpack:///external \"@splunk/visualizations-shared/configUtils\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualizations-shared/SizeAwareWrapper\"","webpack:///external \"@splunk/themes/pick\"","webpack:///./src/common/utils/singleValueUtils.js","webpack:///external \"@splunk/visualization-context/TimezoneContext\"","webpack:///external \"@splunk/visualizations-shared/propUtils\"","webpack:///external \"@splunk/visualizations-shared/hocUtils\"","webpack:///external \"@splunk/visualizations-shared/JSONSchemaUtils\"","webpack:///./src/common/components/IconPlaceholder.tsx","webpack:///./src/common/hooks/getSorting.ts","webpack:///./src/common/hooks/getPagination.ts","webpack:///external \"lodash\"","webpack:///external \"@splunk/visualizations-shared/numberUtils\"","webpack:///./src/common/interfaces/VizCategory.ts","webpack:///./src/common/withDashboardViz.tsx","webpack:///external \"@splunk/themes/getSettingsFromThemedProps\"","webpack:///external \"@splunk/visualization-encoding/Options\"","webpack:///external \"@splunk/visualizations-shared/SanitizeProps\"","webpack:///external \"@splunk/moment\"","webpack:///./src/common/SplunkVisualization.tsx","webpack:///./src/common/interfaces/VizActionHandler.ts","webpack:///./src/common/interfaces/DataSource.ts","webpack:///external \"styled-components\"","webpack:///./src/common/hooks/useDeepMemo.ts","webpack:///./src/common/components/MissingPropsMessage.tsx","webpack:///./src/common/hocs/withEditModeCover.tsx","webpack:///./src/common/hocs/withPlaceholder.tsx","webpack:///external \"@splunk/visualization-icons/placeholders\"","webpack:///external \"@splunk/visualizations-shared/colorConstants\"","webpack:///./src/SingleValueRadial/SingleValueRadial.tsx","webpack:///./src/SingleValueRadial/config.ts","webpack:///./src/common/editorConfig/RadialBackgroundColor.ts","webpack:///external \"@splunk/visualization-icons\"","webpack:///./src/SingleValueRadial/PureSingleValueRadial/RadialGraph.jsx","webpack:///./src/SingleValueRadial/PureSingleValueRadial/utils/displayUtils.js","webpack:///./src/SingleValueRadial/PureSingleValueRadial/RadialLayout.jsx","webpack:///./src/SingleValueRadial/PureSingleValueRadial/SingleValueRadial.jsx","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///external \"@splunk/visualizations-shared/domUtils\"","webpack:///external \"@splunk/visualization-color-palettes/editors/PresetPalettes\"","webpack:///./src/common/interfaces/VizBehavior.ts","webpack:///./src/common/components/VizStyleWrapper.jsx","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///./src/SingleValueBasic/TrendValue.jsx","webpack:///./src/SingleValueBasic/MajorValue.jsx","webpack:///./src/SingleValueBasic/SingleValueBasic.jsx","webpack:///external \"lodash/pick\"","webpack:///external \"lodash/isEmpty\"","webpack:///external \"@splunk/react-icons/ArrowUp\"","webpack:///external \"@splunk/react-icons/ArrowDown\"","webpack:///external \"cssesc\"","webpack:///./src/common/editorConfig/StaticBackgroundColorEditor.js","webpack:///external \"@babel/runtime/helpers/toConsumableArray\"","webpack:///./src/common/editorConfig/DynamicMajorColorEditor.js","webpack:///./src/common/editorConfig/DynamicTrendColorEditor.js","webpack:///external \"@splunk/themes/variables\"","webpack:///./src/common/editorConfig/DynamicBackgroundColorEditor.js","webpack:///./src/common/editorConfig/StaticMajorColorEditor.js","webpack:///./src/common/editorConfig/StaticTrendColorEditor.js"],"names":["DEFAULT_FONT","DEFAULT_FONT_FAMILY","SVR_PADDING","top","bottom","left","right","shouldShowTrend","trendDisplay","isLoadingOrNoColumns","data","get","noColumns","loading","getFormattedColor","formatColor","hasBackground","backgroundColor","isIdenticalColor","colorA","colorB","getDefaultColorWithBg","defaultFontColor","defaultBlockFontColor","getMajorColor","majorColor","getTrendColor","trendColor","trendValue","majorValue","customizedBgColor","defaultColors","Number","defaultBackgroundColor","isInvalidTrend","parseFloat","computeColors","props","backgroundEnabled","underLabelColor","computeText","value","numberPrecision","shouldUseThousandSeparators","shouldAbbreviateTrendValue","text","formatNumber","useThousandSeparators","useTrendUnits","getMajorText","getTrendText","compute","isNumerial","showPercent","diff","Math","val","computeFontSize","width","height","fontFamily","fontWeight","widthInDefaultFont","computeTextSize","fontSize","parseInt","getMajorFontSize","unit","majorText","spaceRatio","majorTextCalc","getTrendFontSize","trendText","trendFontSize","getUnderLabelHeight","getUnderLabel","underLabel","getMajorAndTrend","majorFontSize","majorTextSpaceRatio","textContentWidth","textContentHeight","majorTextFontSize","trendTextFontSize","updateVizInSmallSpace","toRemoveList","removeIndex","newProps","newMajorAndTrend","newTextSize","toRemove","truncateValue","updatedProps","computeSingleValueContent","contentWidth","contentHeight","containerWidth","containerHeight","majorValueTitle","smallVizProps","minimallyTruncateStringToWidth","textWidth","modifiedText","ellipsesLength","computeSingleValueRadialContent","smallViz","getGraphColors","customColorFormatter","adjustRGB","rgb","changeColor","hex","color","r","g","b","newR","newG","newB","ratio","lighten","darken","handleValueClickCallback","payload","name","majorValueField","onValueClick","RadialGraph","progress","strokeWidth","RADIAL_BACKGROUND_COLOR","progressColor","RADIAL_STROKE_COLOR","semicircleRadius","circumference","bgCircleOffset","progress50","progressWidth","strokeDashoffset","T","number","VALID_TREND_POSITIONS","MAJOR_FONT_THRESHOLD","TREND_FONT_THRESHOLD","DEFAULT_RADIAL_STROKE_WIDTH","SMALL_RADIAL_STROKE_WIDTH","getRadialColors","background","stroke","getRadialGraphDimensions","radius","getRadialHelperDimensions","innerArcRadius","halfContentWidth","helperArcRadius","getValueContentSize","graphSize","radialStrokeWidth","diameter","getRadialStrokeWidth","graphHeight","isValidPosition","showTrendPositionStandard","showTrendIndicator","position","showTrendPositionBelow","showTrendPositionOutside","getRadialProgress","TextContainer","styled","lineHeight","marginLeft","margin","GraphContainer","UnderLabelContainer","UnderLabelText","RadialContent","unitPosition","showRadialGraph","radialBackgroundColor","radialStrokeColor","graphWidth","underLabelStrokeColor","fillVacantSpace","underLabelHeight","underLabelWidth","basicSingleValues","radialGraph","underLabelComponent","SingleValueBasic","trendPosition","string","Container","toDimension","pick","SingleValueRadial","style","maxValue","enterprise","dark","variables","light","prisma","radialColors","handleValueClick","useCallback","renderVisualization","isEmpty","trendIndicatorPosition","func","withTheme","VizStyleWrapper","dataTestKey","Column","Text","SingleValueContent","TrendIndicator","Row","validUnitPositions","title","sanitizedUnit","cssesc","wrap","quotes","sanitizedUnitPosition","handleKeyDown","e","underLabelFontSize","trendIndicatorEnabled","SingleValueTrendValue","StaticBackgroundColorEditor","label","_","option","editor","showEditor","options","isDynamicOption","getDynamicMajorColorEditor","defaultContext","defaultPalettesConfig","context","editorProps","labelPosition","flyoutTitle","formatters","defaults","majorColorConfig","majorColorMatchConfig","dataSelectors","getDynamicTrendColorEditor","trendColorConfig","getDynamicBackgroundColorEditor","StaticMajorColorEditor","StaticTrendColorEditor","isDisabled"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFA,kC;;;;;;;ACAA,uC;;;;;;;ACAA,kE;;;;;;;ACAA,kE;;;;;;;ACAA,qE;;;;;;;;;;;;;;ACAA;;AACA;;AACA;;AACA;;AACA;;AAWA,IAAM,IAAI,GAAG,4BAAO,GAAP,CAAW,KAAX,CAA4B;AAAA,MAAG,KAAH,QAAG,KAAH;AAAA,SAAgB;AACrD,SAAK,EAAE;AACH,WAAK,EAAE,aAAK,KAAL;AADJ;AAD8C,GAAhB;AAAA,CAA5B,CAAH;AAAA;AAAA;AAAA,kDAMc,UAAC,KAAD;AAAA,SACf,qBAAQ,KAAK,CAAC,eAAd,KAAkC,KAAK,CAAC,eAAzC,IAA6D,KAAK,CAAC,KAAN,CAAY,sBADzD;AAAA,CANd,CAAV,C,CAgBA;;AACA,IAAM,WAAW,GAAG,4BAAO,GAAP,CAAW,KAAX,CAAmC;AAAA,MAAG,KAAH,SAAG,KAAH;A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U,EAAEkN,cAAc,CAACS;AADrB;AAHd,OATQ,CAHH;AAoBTC,mBAAa,EAAE,CACX;AACIlB,aAAK,EAAEC,+DAAC,CADZ,aACY,CADZ;AAEI/L,aAAK,EAAE;AAFX,OADW,EAKX;AACI8L,aAAK,EAAEC,+DAAC,CADZ,OACY,CADZ;AAEI/L,aAAK,EAAE;AAFX,OALW,CApBN;AA8BTuM,2BAAqB,EAArBA;AA9BS;AAN8E,GAAhD;AAAxC,E;;;;;;;;ACHP;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA,IAAMa,sBAAsB,GAAG;AAC3BtB,OAAK,EAAEC,+DAAC,CADmB,oBACnB,CADmB;AAE3BC,QAAM,EAFqB;AAG3BC,QAAM,EAHqB;AAI3BC,YAAU,EAAE;AAAA,QAAGC,OAAH;AAAA,WAAiB,CAACC,iGAAe,CAACD,OAAO,CAAzC,UAAiC,CAAjC;AAAA;AAJe,CAA/B;AAOA,uF;;;;;;;;ACVA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA,IAAMkB,sBAAsB,GAAG;AAC3BvB,OAAK,EAAEC,+DAAC,CADmB,cACnB,CADmB;AAE3BC,QAAM,EAFqB;AAG3BC,QAAM,EAHqB;AAI3BC,YAAU,EAAE;AAAA,QAAGC,OAAH;AAAA,WAAiB,CAACC,iGAAe,CAACD,OAAO,CAAzC,UAAiC,CAAjC;AAJe;AAK3BmB,YAAU,EAAE;AAAA,QAAGnB,OAAH;AAAA,WAAiBA,OAAO,CAAPA,iBAAjB;AAAA;AALe,CAA/B;AAQA,uF","file":"SingleValueRadial.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 453);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","module.exports = require(\"@splunk/visualizations-shared/Message\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@splunk/visualizations-shared/colorUtils\");","import * as React from 'react';\nimport styled from 'styled-components';\nimport SizeAwareWrapper from '@splunk/visualizations-shared/SizeAwareWrapper';\nimport { toPx } from '@splunk/visualizations-shared/style';\nimport { isColor } from '@splunk/visualizations-shared/colorUtils';\n\n// Global provided via webpack\n// eslint-disable-next-line no-underscore-dangle\ndeclare const __VISION_VERSION__: string;\n\ninterface ItemProps {\n backgroundColor?: string;\n width?: string | number;\n}\n\nconst Item = styled.div.attrs<ItemProps>(({ width }) => ({\n style: {\n width: toPx(width),\n },\n}))<ItemProps>`\n position: relative;\n background-color: ${(props): string =>\n (isColor(props.backgroundColor) && props.backgroundColor) || props.theme.defaultBackgroundColor}};\n`;\n\ninterface FixSizeItemProps {\n backgroundColor?: string;\n height?: string | number;\n width?: string | number;\n}\n\n// Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291\nconst FixSizeItem = styled.div.attrs<FixSizeItemProps>(({ width, height }): {\n style: { width?: string; height?: string };\n} => ({\n style: {\n ...(width && { width: toPx(width) }),\n ...(height && { height: toPx(height) }),\n },\n}))<FixSizeItemProps>`\n position: relative;\n flex-direction: column;\n flex: 1;\n display: flex;\n background-color: ${(props): string =>\n (isColor(props.backgroundColor) && props.backgroundColor) || props.theme.defaultBackgroundColor}};\n`;\n\nconst ItemContent = styled.div`\n position: relative;\n min-height: 100px;\n width: 100%;\n`;\n\nconst FixSizeItemContent = styled.div`\n min-height: 0px;\n flex: 1;\n position: relative;\n box-sizing: border-box;\n`;\n\ninterface HeightAndWidthProps {\n width?: string | number;\n height?: string | number;\n backgroundColor?: string;\n}\n\nconst withFixedSizeContainer = <P extends HeightAndWidthProps>(\n Viz: React.ComponentType<P>\n): React.ComponentType<P> => {\n const FixedSizeContainer = (props: P): React.ReactElement => {\n const { width, height, backgroundColor } = props;\n\n if (!height) {\n return (\n <Item data-test=\"item\" width={width} backgroundColor={backgroundColor}>\n <ItemContent>\n <Viz {...props} />\n </ItemContent>\n </Item>\n );\n }\n return (\n <FixSizeItem\n data-test=\"fix-size-item\"\n data-splunk-visualization-version={__VISION_VERSION__}\n width={width}\n height={height}\n backgroundColor={backgroundColor}\n >\n <FixSizeItemContent>\n <SizeAwareWrapper>\n {({ width: newWidth, height: newHeight }): React.ReactElement => (\n <Viz {...props} width={newWidth} height={newHeight} />\n )}\n </SizeAwareWrapper>\n </FixSizeItemContent>\n </FixSizeItem>\n );\n };\n FixedSizeContainer.displayName = 'withFixedSizeContainer';\n return FixedSizeContainer;\n};\n\nexport default withFixedSizeContainer;\n","import { DashboardVizProps } from '../interfaces/DashboardVizProps';\n\nexport type DashboardVizType = React.ComponentType<DashboardVizProps>;\n\n/**\n * @method extendStaticWrapperProps\n * @param {Object} props\n * @param {DashboardVizType} props.Wrapper\n * @param {DashboardVizType} props.Visualization\n */\nexport const extendStaticWrapperProps = ({\n Wrapper,\n Visualization,\n}: {\n [key: string]: DashboardVizType;\n}): void => {\n const extendProperties = ['propTypes', 'defaultProps', 'config'];\n extendProperties.forEach((prop: string): void => {\n if (Visualization[prop]) {\n // eslint-disable-next-line no-param-reassign\n Wrapper[prop] = Visualization[prop];\n }\n });\n};\n","module.exports = require(\"@splunk/visualizations-shared/style\");","module.exports = require(\"@splunk/visualizations-shared/schemaUtils\");","import { get, range } from 'lodash';\nimport { DYNAMIC_OPTIONS_DSL_PATTERN } from '@splunk/visualizations-shared/schemaUtils';\nimport type { JSONSchema7Definition } from 'json-schema';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\nimport { VizBehavior } from '../interfaces/VizBehavior';\nimport { VizConfig } from '../interfaces/VizConfig';\nimport { OptionsSchema } from '../interfaces/OptionsSchema';\nimport { EditorLayoutConfig, EditorConfig } from '../interfaces/Editor';\n\nexport interface PresetEntry {\n name: string;\n value: any;\n label: string;\n}\n\nconst dynamicOptionsDSLType = {\n type: 'string',\n pattern: DYNAMIC_OPTIONS_DSL_PATTERN,\n} as const;\n\n/**\n * Helper function to extend an options schema with dynamic options DSL\n * @param optionsSchema a visualization's options schema\n * @returns an updated options schema that additionally allows strings starting with > for each option\n */\nfunction enhanceOptionsSchemaWithDynamicOptions(\n optionsSchema: OptionsSchema | JSONSchema7Definition\n): OptionsSchema {\n const enhancedOptionsSchema: OptionsSchema = {};\n Object.keys(optionsSchema).forEach((key): void => {\n const {\n // The next a few are schema annotations, we should leave them as is.\n // Note: in reality we don't use `readOnly`, `writeOnly` or `examples`, but they are listed here for completeness.\n // Ref: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01\n title,\n description,\n readOnly,\n writeOnly,\n examples,\n default: defaultValue,\n // The next a few need special care\n type,\n properties,\n patternProperties,\n // The rest should be handled together\n ...remainingSchemaEntry\n } = optionsSchema[key];\n\n const annotations = {\n ...(title !== undefined && { title }),\n ...(description !== undefined && { description }),\n ...(readOnly !== undefined && { readOnly }),\n ...(writeOnly !== undefined && { writeOnly }),\n ...(examples !== undefined && { examples }),\n ...(defaultValue !== undefined && { default: defaultValue }),\n };\n\n if (type === 'object') {\n enhancedOptionsSchema[key] = {\n ...remainingSchemaEntry,\n ...annotations,\n type,\n ...(properties && { properties: enhanceOptionsSchemaWithDynamicOptions(properties) }),\n };\n if (patternProperties) {\n let enhancedPatternProperties = {};\n Object.keys(patternProperties).forEach((opt): void => {\n enhancedPatternProperties = {\n ...enhancedPatternProperties,\n ...enhanceOptionsSchemaWithDynamicOptions({ [opt]: patternProperties[opt] }),\n };\n });\n enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;\n }\n } else {\n enhancedOptionsSchema[key] = {\n ...annotations,\n anyOf: [\n // we can't assume `type` is always there because there are `enum` and `const`.\n { ...(type !== undefined && { type }), ...remainingSchemaEntry },\n dynamicOptionsDSLType,\n ],\n };\n }\n });\n return enhancedOptionsSchema;\n}\n\n/**\n * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block\n * this function also collapse all editor panels\n * @param vizConfig a Visualization Config\n * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports\n * and containing `open: false` for all editor panels in editorConfig\n */\nfunction enhanceConfig(vizConfig: VizConfig): VizConfig {\n const enhancedConfig: VizConfig = { ...vizConfig };\n if (vizConfig.supports.indexOf(VizBehavior.DYNAMIC_OPTIONS) !== -1) {\n enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);\n }\n enhancedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: config.open || false };\n }\n );\n return enhancedConfig;\n}\n\n/**\n * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig\n * Created for editor unit tests\n * @param vizConfig a Visualization Config\n * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig\n */\nfunction uncollapseEditorConfig(vizConfig: VizConfig): VizConfig {\n const editorPanelUncollapsedConfig: VizConfig = { ...vizConfig };\n editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: true };\n }\n );\n return editorPanelUncollapsedConfig;\n}\n\nfunction isDynamicOption(option?: string): boolean {\n return (option && typeof option === 'string' && option.trim().startsWith('>')) || false;\n}\n\n// private helpers to improve readability of getInitialPreset\n// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset\n\n/**\n * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset\n * if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset\n * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext\n * the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up\n *\n * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values\n */\nfunction hasCompatibleContexts(\n vizContext: { [configKey: string]: any },\n presetContext: { [configKey: string]: any }\n): boolean {\n const presetContextKeys = Object.keys(presetContext);\n return presetContextKeys.every(\n (contextKey): boolean =>\n (presetContext[contextKey] === undefined && vizContext[contextKey] === undefined) ||\n (presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined)\n );\n}\n\n/**\n * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions\n */\nfunction hasCompatibleOptions(\n vizOptions: { [configKey: string]: any },\n presetOptions: { [configKey: string]: any }\n): boolean {\n const presetOptionKeys = Object.keys(presetOptions);\n return presetOptionKeys.every(\n (optionKey): boolean =>\n isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey])\n );\n}\n\n/**\n * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions\n * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure\n *\n * @param {Object} vizContext - the current vizContext definition\n * @param {Object} vizOptions - the current vizOptions definition\n * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset\n */\nfunction getInitialPreset(\n vizContext: { [configKey: string]: any },\n vizOptions: { [configKey: string]: any },\n presets: PresetEntry[]\n): PresetEntry | null {\n return presets.find((preset): boolean => {\n const presetContext = get(preset, ['value', 'context'], {});\n const presetOptions = get(preset, ['value', 'options'], {});\n const presetContextKeys = Object.keys(presetContext);\n const presetOptionKeys = Object.keys(presetOptions);\n\n // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)\n // if not, then the preset is invalid in config.ts\n if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;\n\n return (\n hasCompatibleContexts(vizContext, presetContext) &&\n hasCompatibleOptions(vizOptions, presetOptions)\n );\n });\n}\n\ninterface PrecisionOption {\n label: string;\n value: number;\n}\n\n/**\n * generates number precision values for a Select editor\n *\n * @param {Number} numPrecisionValues - number of integer precision values to generate\n * @returns {{ label: string; value; string }[]} array of { label, value } tuples\n */\nfunction generatePrecisionValues(numPrecisionValues: number): PrecisionOption[] {\n return range(0, numPrecisionValues + 1).map(\n (i): PrecisionOption => ({\n label: `${i} (0${i > 0 ? '.' : ''}${'0'.repeat(i)})`, // e.g. 0.000 for numPrecisionValues = 3\n value: i,\n })\n );\n}\n\nexport {\n enhanceConfig,\n enhanceOptionsSchemaWithDynamicOptions,\n getInitialPreset,\n generatePrecisionValues,\n uncollapseEditorConfig,\n isDynamicOption,\n};\n\n/**\n * insert layout in layout array, return a new layout array instead of updating the original\n *\n * @param {EditorLayoutConfig[][]} layout - editor layout\n * @param {Number} index - the index to insert layout item(s)\n * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert\n * @returns {EditorLayoutConfig[][]} new editor layout with insertion\n */\nexport const insertLayout = (\n layout: EditorLayoutConfig[][],\n index: number,\n ...layoutItems: EditorLayoutConfig[][]\n): EditorLayoutConfig[][] => [\n // copy part of the array before the specified index\n ...layout.slice(0, index),\n // inserted layout item\n ...layoutItems,\n // copy part of the array after the specified index\n ...layout.slice(index),\n];\n","module.exports = require(\"@splunk/visualizations-shared/configUtils\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualizations-shared/SizeAwareWrapper\");","module.exports = require(\"@splunk/themes/pick\");","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 = backgroundEnabled ? majorColor : defaultColors.defaultFontColor;\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 = (ev, majorValue, majorValueField, trendValue, onValueClick) => {\n const payload = {\n trendValue,\n value: majorValue,\n name: majorValueField,\n };\n\n return onValueClick({ ...ev, payload });\n};\n","module.exports = require(\"@splunk/visualization-context/TimezoneContext\");","module.exports = require(\"@splunk/visualizations-shared/propUtils\");","module.exports = require(\"@splunk/visualizations-shared/hocUtils\");","module.exports = require(\"@splunk/visualizations-shared/JSONSchemaUtils\");","import * as React from 'react';\nimport * as T from 'prop-types';\nimport { get } from 'lodash';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport Message from '@splunk/visualizations-shared/Message';\nimport { DataSource } from '../interfaces/DataSource';\nimport withFixedSizeContainer from '../hocs/FixedSizeContainer';\n\n/**\n * @method shouldShowIconPlaceholder\n * @param {object} dataSources\n * @param {boolean} loading\n * @returns {boolean}\n */\nexport const shouldShowIconPlaceholder = (\n dataSources: { [name: string]: DataSource },\n loading = false\n): boolean => {\n const data = get(dataSources, 'primary.data.columns[0]', undefined);\n const noData = data === undefined;\n const fields = get(dataSources, 'primary.data.fields[0]', undefined);\n const noFields = fields === undefined;\n return loading || noData || noFields;\n};\n\nexport interface IconPlaceholderProps {\n icon?: React.ComponentClass<any>;\n width?: string | number;\n height?: string | number;\n backgroundColor?: string;\n iconColor?: string;\n}\n\nconst propTypes: Record<keyof IconPlaceholderProps, T.Validator<any>> = {\n icon: T.func,\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n // eslint-disable-next-line react/no-unused-prop-types\n backgroundColor: T.string,\n iconColor: T.string,\n};\n\n/**\n * @method IconPlaceholder\n * @param {IconPlaceholderProps} props\n * @returns {React.ReactElement}\n */\nconst IconPlaceholder = (props: IconPlaceholderProps): React.ReactElement => {\n const { width, height, icon, iconColor } = props;\n if (icon) {\n return React.createElement(icon, {\n style: {\n left: '50%',\n top: '50%',\n color: iconColor,\n opacity: 0.15,\n position: 'absolute',\n transform: 'translate(-50%, -50%)',\n },\n width: '50%',\n height: '50%',\n });\n }\n\n return <Message width={width} height={height} level=\"warning\" message={_('No DataSource Connected')} />;\n};\n\nIconPlaceholder.propTypes = propTypes;\nIconPlaceholder.defaultProps = {\n width: '100%',\n height: 250,\n};\n\nexport default withFixedSizeContainer(IconPlaceholder);\n","import * as T from 'prop-types';\nimport { has, isFunction } from 'lodash';\nimport { DataSourceMeta, SortDirType, validSortDirs } from '../interfaces/DataSource';\n\nexport interface SortParams {\n currentSortKey?: undefined | string;\n currentSortDir?: undefined | SortDirType;\n onSort?: (e: MouseEvent, { sortKey, sortDir }: { sortKey: string; sortDir: SortDirType }) => void;\n}\n\nexport const SortParamsPropTypes = T.shape({\n currentSortKey: T.string,\n currentSortDir: T.oneOf(validSortDirs),\n onSort: T.func,\n});\n\nexport const getSortingParams = ({ requestParams, onRequestParamsChange }: DataSourceMeta): SortParams => {\n let currentSortKey;\n let currentSortDir;\n\n const nextSortDirMap = {\n asc: 'desc',\n desc: 'asc',\n none: 'asc',\n };\n\n let onSort;\n if (isFunction(onRequestParamsChange)) {\n if (requestParams && has(requestParams, 'sort')) {\n currentSortKey = Object.keys(requestParams.sort).shift();\n currentSortDir = requestParams.sort[currentSortKey];\n }\n\n // undid memoization since there is a dependency on requestParams, which is a deeply nested object\n onSort = (e, { sortKey, sortDir }): void => {\n if (typeof sortKey === 'string') {\n const nextSortDir = has(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';\n onRequestParamsChange({\n ...requestParams,\n ...{ offset: 0, sort: { [sortKey]: nextSortDir } },\n });\n } else {\n onRequestParamsChange(requestParams);\n }\n };\n }\n\n return {\n currentSortKey,\n currentSortDir,\n onSort,\n };\n};\n","import * as T from 'prop-types';\nimport { cloneDeep, isFunction, noop } from 'lodash';\nimport { DataSourceMeta, RequestParams } from '../interfaces/DataSource';\n\nexport interface OnChangeParams {\n page?: number;\n count?: number;\n}\nexport interface PaginatorParams {\n isPaging?: boolean;\n current?: number;\n totalPages?: number;\n onChange?: (e: MouseEvent, x: OnChangeParams) => void;\n}\n\nexport const PaginatorParamsPropTypes = T.shape({\n isPaging: T.bool,\n current: T.number,\n totalPages: T.number,\n onChange: T.func,\n});\n\nexport const getPaginationParams = ({\n requestParams,\n meta,\n onRequestParamsChange,\n}: DataSourceMeta): PaginatorParams => {\n const totalCount = (meta && meta.totalCount) || 0;\n const offset = (requestParams && requestParams.offset) || 0;\n const count = requestParams && requestParams.count;\n const totalPages = typeof count === 'number' && count > 0 ? Math.ceil(totalCount / count) : 0;\n const current = typeof count === 'number' && count > 0 ? Math.floor(offset / count) + 1 : 0;\n const isPaging = totalPages > 1 && isFunction(onRequestParamsChange);\n\n const onChangeHandler = (e, { page, count: countArg }: OnChangeParams): void => {\n const newParams: RequestParams = cloneDeep(requestParams);\n\n if (typeof countArg === 'number') {\n newParams.count = countArg;\n newParams.offset = 0;\n }\n\n const pageCount = typeof newParams.count === 'number' ? newParams.count : 10;\n if (typeof page === 'number' && page > 0) {\n newParams.count = pageCount;\n newParams.offset = (page - 1) * pageCount;\n }\n\n onRequestParamsChange(newParams);\n };\n\n return {\n isPaging,\n current,\n totalPages,\n onChange: isFunction(onRequestParamsChange) ? onChangeHandler : noop,\n };\n};\n","module.exports = require(\"lodash\");","module.exports = require(\"@splunk/visualizations-shared/numberUtils\");","export enum VizCategory {\n SINGLE_VALUE = 'Single Value',\n TRENDS = 'Trends',\n COMPARISONS = 'Comparisons',\n TABLE = 'Table',\n GAUGE = 'Gauge',\n DISTRIBUTIONS = 'Distributions',\n CHOROPLETH = 'Choropleth Maps',\n SHAPES = 'Shapes',\n MISC = 'misc',\n FLOW = 'Flow',\n CORRELATION = 'Correlation',\n SPATIAL = 'Spatial',\n}\n","import * as React from 'react';\nimport { camelCase, has, get, defaultsDeep } from 'lodash';\nimport getSettingsFromThemedProps from '@splunk/themes/getSettingsFromThemedProps';\nimport { Options as Opts } from '@splunk/visualization-encoding/Options';\nimport { withSanitizedProps } from '@splunk/visualizations-shared/SanitizeProps';\nimport TimezoneContext from '@splunk/visualization-context/TimezoneContext';\nimport moment from '@splunk/moment';\n\nimport { withTheme } from 'styled-components';\nimport { deepMergeWithArrayPrimitiveOverrides } from '@splunk/visualizations-shared/hocUtils';\nimport { pickFieldFromJSONSchema } from '@splunk/visualizations-shared/JSONSchemaUtils';\nimport SplunkVisualization from './SplunkVisualization';\nimport type { DashboardVizProps, DataSource, VizConfig, VizProps } from './interfaces';\nimport { VizBehavior } from './interfaces/VizBehavior';\nimport { getSortingParams } from './hooks/getSorting';\nimport { getPaginationParams } from './hooks/getPagination';\nimport { useDeepMemo } from './hooks/useDeepMemo';\nimport MissingPropsMessage, { missingKeys } from './components/MissingPropsMessage';\nimport withEditModeCover from './hocs/withEditModeCover';\nimport withPlaceholder from './hocs/withPlaceholder';\nimport { ChartingProps } from './Charting';\n\ntype HOC = (props: DashboardVizProps) => React.ReactElement<DashboardVizProps>;\nexport interface DashboardVizOpts {\n ReactViz: React.ComponentType<ChartingProps | VizProps>; // we will wrap this in DashboardViz (see const DashboardViz = ...)\n vizConfig: VizConfig;\n computeVizProps?: (props) => any;\n disableEditModeCover?: boolean;\n useIconPlaceholder?: (\n dataSources: { [name: string]: DataSource },\n loading: boolean,\n options: Record<string, unknown>\n ) => boolean;\n}\n\n/**\n * hoc that wraps a pure react visualization in a Dashboard visualization\n * @param {DashboardVizOpts} opts\n * @returns {HOC}\n */\nconst withDashboardViz = (opts: DashboardVizOpts): HOC => {\n const {\n ReactViz,\n vizConfig,\n computeVizProps = () => {},\n disableEditModeCover,\n useIconPlaceholder,\n } = opts;\n\n // sanitizing props before sending them to reactviz.\n const SanitizedReactViz = withSanitizedProps(ReactViz);\n const defaultOptions = pickFieldFromJSONSchema(vizConfig.optionsSchema, 'default');\n\n const DashboardViz = (props: DashboardVizProps): React.ReactElement<DashboardVizProps> => {\n const {\n mode,\n hasEventHandlers,\n dataSources, // type of { [key: string]: DataSource }\n options,\n context = {},\n width,\n height,\n onComputedProps,\n onEventTrigger,\n theme,\n onRequestParamsChange,\n } = props;\n const { serializedTimezone } = React.useContext(TimezoneContext);\n if (serializedTimezone) {\n /*\n @splunk/moment currently does not allow us to customize the timezone on a per visualization basis.\n This ensures that if a timezone was provided via TimezoneContext @splunk/moment time formatting\n will use it.\n\n @TODO(pwied):\n - remove when we moved away from @splunk/moment\n - provide timezone context to dynamic option evaluation phase\n */\n if (!moment.getDefaultSplunkTimezone()) {\n moment.setDefaultSplunkTimezone(serializedTimezone);\n }\n }\n const themeFunc = themeVar => vizConfig.themes[themeVar]?.(props);\n const bgColorFromTheme = themeFunc('defaultBackgroundColor');\n const {\n family: currentThemeFamily,\n colorScheme: currentThemeColorScheme,\n density: currentThemeDensity,\n } = getSettingsFromThemedProps({ theme });\n\n let evaluatedOptions: Opts = {}; // evaluatedOptions need to be initialized as an empty object\n evaluatedOptions = useDeepMemo((): Record<string, unknown> => {\n try {\n return Opts.evaluate(\n {\n context: defaultsDeep({}, context, vizConfig.defaultContext),\n options: deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions),\n },\n dataSources,\n themeFunc\n );\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(`unexpected error evaluating options: + ${e.message}`);\n return {};\n }\n }, [\n currentThemeFamily,\n currentThemeColorScheme,\n currentThemeDensity,\n options,\n context,\n dataSources,\n serializedTimezone,\n ]);\n\n // useEffect hook needs to be initialized before any early returns\n // this is in accordance with the order of hook calls being the same on each render https://reactjs.org/docs/hooks-rules.html#explanation\n React.useEffect((): void => {\n onComputedProps(evaluatedOptions);\n });\n\n // present warning message if any required props are missing\n const { requiredProps = [], supports } = vizConfig;\n const missing = missingKeys(requiredProps, evaluatedOptions);\n if (missing.length > 0 && supports.includes(VizBehavior.PLACEHOLDER)) {\n return (\n <MissingPropsMessage\n data-test=\"missing-props-message\"\n width={width}\n height={height}\n missingProps={missing}\n backgroundColor={bgColorFromTheme}\n />\n );\n }\n\n // events\n const eventCallbackProps = {};\n if (hasEventHandlers && mode === 'view' && vizConfig.supports.indexOf(VizBehavior.EVENTS) > -1) {\n const supportedEvents = vizConfig.events;\n Object.keys(supportedEvents).forEach((eventName): void => {\n const eventCallbackPropName = camelCase(`on.${eventName}`);\n eventCallbackProps[eventCallbackPropName] = null;\n // todo: refactor single value and single value icon to send payload from viz\n // then remove these lines\n const { payloadKeys } = supportedEvents[eventName];\n let payload = {};\n if (Array.isArray(payloadKeys) && payloadKeys.length) {\n payloadKeys.forEach(p => {\n payload[p] = evaluatedOptions[p];\n });\n }\n\n eventCallbackProps[eventCallbackPropName] = (ev): Record<string, unknown> => {\n if (ev && ev.payload) {\n payload = ev.payload;\n }\n\n return onEventTrigger({ originalEvent: ev, payload, type: eventName });\n };\n });\n }\n // compute pure viz props which are not from options\n const computedVizProps = computeVizProps({\n ...props,\n ...evaluatedOptions,\n ...eventCallbackProps,\n themeFunc,\n });\n\n /**\n * PAGE_AND_SORT behavior\n *\n * Some visualizations, like table, requires metadata about the datasource,\n * like total number of results, current count, offset, and sort, for rendering\n * paginator and sorting direction. In this approach, the visualization\n * allow users to set 'paginateDataSourceKey' to select which datasource\n * should the visualization extract the metadata from. It defaults to 'primary' datasource.\n * The visualization config should set the PAGE_AND_SORT behavior to receive\n * 'requestParams', 'meta' and onRequestParams callback as props.\n *\n * In future, we could automatically detect which all datasources are being used\n * and bind those magically to pagination/sorting behavior.\n */\n let dataSourceMetadata = {};\n const OptionKey = 'paginateDataSourceKey';\n const paginateDataSourceKey =\n (has(evaluatedOptions, OptionKey) && evaluatedOptions[OptionKey]) || 'primary';\n if (\n vizConfig.supports.indexOf(VizBehavior.PAGE_AND_SORT) > -1 &&\n has(dataSources, paginateDataSourceKey)\n ) {\n const requestParams = get(dataSources, [paginateDataSourceKey, 'requestParams'], {});\n const meta = get(dataSources, [paginateDataSourceKey, 'meta'], {});\n const handleRequestParamsChange = (payload: Record<string, unknown>): void =>\n onRequestParamsChange(paginateDataSourceKey, payload);\n\n const sortParams = getSortingParams({\n requestParams,\n meta,\n onRequestParamsChange: handleRequestParamsChange,\n });\n\n const paginatorParams = getPaginationParams({\n requestParams,\n meta,\n onRequestParamsChange: handleRequestParamsChange,\n });\n\n dataSourceMetadata = {\n sortParams,\n paginatorParams,\n };\n }\n\n return (\n <SanitizedReactViz\n mode={mode}\n width={width}\n height={height}\n {...evaluatedOptions}\n {...computedVizProps}\n {...eventCallbackProps}\n {...dataSourceMetadata}\n />\n );\n };\n\n DashboardViz.propTypes = {\n ...SplunkVisualization.propTypes,\n ...ReactViz.propTypes,\n };\n\n DashboardViz.defaultProps = {\n ...SplunkVisualization.defaultProps,\n ...ReactViz.defaultProps,\n // using withTheme requires component to receive theme prop. In case the consumer did not provide ThemeProvider, a default empty object will prevent warnings.\n theme: {},\n };\n // attach viz config\n DashboardViz.config = vizConfig;\n\n // @ts-ignore: TODO fix sc upgrade TS issues\n return withTheme(\n withPlaceholder(withEditModeCover(DashboardViz, disableEditModeCover), useIconPlaceholder)\n );\n};\n\nexport default withDashboardViz;\n","module.exports = require(\"@splunk/themes/getSettingsFromThemedProps\");","module.exports = require(\"@splunk/visualization-encoding/Options\");","module.exports = require(\"@splunk/visualizations-shared/SanitizeProps\");","module.exports = require(\"@splunk/moment\");","/* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */\nimport * as T from 'prop-types';\nimport { noop } from 'lodash';\nimport { DashboardVizProps } from './interfaces/DashboardVizProps';\nimport { DefaultVizActionHandler } from './interfaces/VizActionHandler';\n\n// this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations\nexport const INITIAL_WIDTH = 250;\nexport const INITIAL_HEIGHT = 250;\n\n/**\n * A Splunk visualization\n */\nclass SplunkVisualization {\n static propTypes: Record<keyof DashboardVizProps, T.Validator<any>> = {\n /**\n * display mode\n */\n mode: T.oneOf(['view', 'edit', 'export']).isRequired,\n /**\n * width in pixel or string, defaults to 100%\n */\n width: T.oneOfType([T.string, T.number]).isRequired,\n /**\n * height in pixel or string\n */\n height: T.oneOfType([T.string, T.number]).isRequired,\n /**\n * visualization context used for dynamic option evaluation\n */\n context: T.object,\n /**\n * visualization formatting options\n */\n options: T.object,\n /**\n * A callback to update formatting options\n */\n onOptionsChange: T.func,\n /**\n * datasource state which include data and request params, object key indicate the datasource type.\n */\n dataSources: T.objectOf(\n T.shape({\n /**\n * current request params\n */\n requestParams: T.object,\n /**\n * current dataset\n */\n data: T.shape({\n fields: T.array,\n columns: T.array,\n }),\n /**\n * error\n */\n error: T.shape({\n level: T.string,\n message: T.string,\n }),\n /**\n * meta data that came with the dataset\n */\n meta: T.object,\n })\n ),\n /**\n * A callback to trigger event\n */\n onEventTrigger: T.func,\n /**\n * Inform viz if there are handlers listening to events\n */\n hasEventHandlers: T.bool,\n /**\n * A callback to communicate computed props to a consumer\n */\n onComputedProps: T.func,\n /**\n * A callback to obtain visualization api\n */\n vizActionHandlerRef: T.func,\n\n loading: T.bool,\n theme: T.object,\n /**\n * A callback to request new data with updated request params\n */\n onRequestParamsChange: T.func,\n };\n\n /**\n *\n */\n static defaultProps: DashboardVizProps = {\n // BaseVisualization in dashboard-visualizations uses 100% for width but 250 for height\n width: '100%',\n height: INITIAL_HEIGHT,\n dataSources: {},\n onEventTrigger: (): Record<string, unknown> => ({}),\n mode: 'view',\n hasEventHandlers: false,\n options: {},\n context: {},\n onOptionsChange: (): Record<string, unknown> => ({}),\n vizActionHandlerRef: (): DefaultVizActionHandler => new DefaultVizActionHandler(),\n onComputedProps: (): Record<string, unknown> => ({}),\n loading: false,\n onRequestParamsChange: noop,\n };\n}\n\nexport default SplunkVisualization;\n","/* eslint-disable class-methods-use-this */\nexport interface VizActionHandler {\n /**\n * put focus on the visualization\n */\n focus(): void;\n\n /**\n * compute snapshot of this visualization\n */\n snapshot(): Record<string, unknown>; // (This is for pdf export)\n}\n\nexport class DefaultVizActionHandler {\n focus(): void {\n // noop\n }\n\n snapshot(): Record<string, unknown> {\n return null; // noop\n }\n}\n","/**\n * represents the data in a raw columnar format, resulting from a splunk\n * query request.\n */\nexport interface FieldEntry {\n name: string;\n}\n\nexport interface JsonColumnData {\n fields: FieldEntry[] | string[];\n columns: string[][];\n}\nexport interface Meta {\n totalCount: number;\n}\n\nexport const validSortDirs = ['asc', 'desc', 'none'] as const;\nexport type SortDirType = typeof validSortDirs[number];\n\nexport interface RequestParams {\n count?: number;\n offset?: number;\n sort?: {\n [sortKey: string]: SortDirType;\n };\n}\n\nexport interface DataSource {\n requestParams: Partial<RequestParams>;\n onRequestParamsChange?: (p: Record<string, unknown>) => void;\n data: JsonColumnData;\n error?: { level: string; message: string };\n meta: Partial<Meta>;\n}\n\nexport interface DataSourceMeta {\n requestParams: Partial<RequestParams>;\n meta: Partial<Meta>;\n onRequestParamsChange: (payload: RequestParams) => void;\n}\n","module.exports = require(\"styled-components\");","import { useRef } from 'react';\nimport { isEqual } from 'lodash';\n\n/**\n * This hook evaluates and stores the result of a passed function and only\n * re-evaluates the function when passed dependencies change.\n *\n * It is different from the internal React useMemo in the following aspects:\n * - it only stores the last evaluated result\n * - it uses a deep equality check to determine if dependencies have changed\n *\n * Inspired by apollo-client's useDeepMemo\n *\n * @param fn the function to be executed and\n * @param dependencies an array of dependencies\n */\nexport const useDeepMemo = <FnReturnType, DepType>(\n fn: () => FnReturnType,\n dependencies: DepType\n): FnReturnType => {\n const ref = useRef<{ dependencies: DepType; value: FnReturnType }>();\n if (!ref.current || !isEqual(dependencies, ref.current.dependencies)) {\n ref.current = {\n dependencies,\n value: fn(),\n };\n }\n return ref.current.value;\n};\n","import * as React from 'react';\nimport * as T from 'prop-types';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport Message from '@splunk/visualizations-shared/Message';\nimport withFixedSizeContainer from '../hocs/FixedSizeContainer';\n\n/**\n * @method isMissing\n * @param {any} v\n * @returns {boolean} true if the input value === null or undefined\n */\nexport const isMissing = (v): boolean => {\n return v === null || v === undefined;\n};\n\n/**\n * @method misskingKeys\n * @param {string[]} keys\n * @param {object} target\n * @returns {string[]} the keys of missing required props\n */\nexport const missingKeys = (keys: string[], target: Record<string, unknown>): string[] =>\n keys.filter(k => isMissing(target[k]));\n\nexport interface MissingPropsProps {\n width?: string | number;\n height?: string | number;\n missingProps: string[];\n backgroundColor?: string;\n}\n\nconst propTypes: Record<keyof MissingPropsProps, T.Validator<any>> = {\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n // eslint-disable-next-line react/no-unused-prop-types\n backgroundColor: T.string,\n missingProps: T.arrayOf(T.string),\n};\n\n/**\n * @method MissingPropsMessage\n * @param {MissingPropsProps} props\n * @returns {React.ReactElement}\n */\nexport const MissingPropsMessage = (props: MissingPropsProps): React.ReactElement => {\n const { width, height, missingProps } = props;\n return (\n <Message\n data-test=\"message\"\n width={width}\n height={height}\n message={_(`Missing property: ${missingProps.join(', ')}`)}\n />\n );\n};\n\nMissingPropsMessage.propTypes = propTypes;\nMissingPropsMessage.defaultProps = {\n width: '100%',\n height: 250,\n};\nexport default withFixedSizeContainer(MissingPropsMessage);\n","import * as React from 'react';\nimport styled from 'styled-components';\nimport { DashboardVizProps } from '../interfaces/DashboardVizProps';\nimport { ExtendedDashViz } from '../interfaces/ExtendedDashViz';\nimport { extendStaticWrapperProps } from '../utils/hocUtils';\n\n// Global provided via webpack\n// eslint-disable-next-line no-underscore-dangle\ndeclare const __VISION_VERSION__: string;\n\nconst Cover = styled.div`\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n`;\n\nconst Blocker = styled.div.attrs({\n 'data-splunk-visualization-version': __VISION_VERSION__,\n})`\n position: relative;\n width: 100%;\n height: 100%;\n`;\n\n/**\n * HOC that renders a cover layer in edit mode\n * @method withEditModeCover\n * @param {ExtendedDashViz} Visualization\n * @returns {ExtendedDashViz} Wrapper\n */\nconst withEditModeCover = (\n Visualization: ExtendedDashViz,\n disableEditModeCover?: boolean\n): ExtendedDashViz => {\n const Wrapper = (props: DashboardVizProps): React.ReactElement<DashboardVizProps> => {\n const { mode } = props;\n const showEditCover = mode === 'edit' && !disableEditModeCover;\n\n return (\n <Blocker>\n <Visualization {...props} />\n {showEditCover && <Cover data-test=\"edit-mode-cover\" />}\n </Blocker>\n );\n };\n extendStaticWrapperProps({ Wrapper, Visualization });\n return Wrapper as ExtendedDashViz;\n};\n\nexport default withEditModeCover;\n","import * as React from 'react';\nimport { isColor } from '@splunk/visualizations-shared/colorUtils';\nimport variables from '@splunk/themes/variables';\nimport IconPlaceholder, { shouldShowIconPlaceholder } from '../components/IconPlaceholder';\nimport { VizBehavior } from '../interfaces/VizBehavior';\nimport { DashboardVizProps } from '../interfaces/DashboardVizProps';\nimport { DataSource } from '../interfaces/DataSource';\nimport { ExtendedDashViz } from '../interfaces/ExtendedDashViz';\nimport { extendStaticWrapperProps } from '../utils/hocUtils';\n\ntype useIconPlaceholderType = (\n dataSources: { [name: string]: DataSource },\n loading: boolean,\n options: Record<string, unknown>\n) => boolean;\n\nconst withPlaceholder = (\n Visualization: ExtendedDashViz,\n useIconPlaceholder: useIconPlaceholderType = shouldShowIconPlaceholder\n): ExtendedDashViz => {\n const { config } = Visualization;\n const { themes } = config;\n\n const Wrapper = (props: DashboardVizProps): React.ReactElement<DashboardVizProps> => {\n const { dataSources, loading, options, height, width } = props;\n\n const showPlaceholder = useIconPlaceholder(dataSources, loading, options);\n const bgColorFromTheme = isColor(options?.backgroundColor)\n ? options?.backgroundColor\n : themes?.defaultBackgroundColor?.(props);\n\n const icon = config.placeholderIcon ?? config.icon;\n const iconColor = variables.contentColorActive(props);\n\n if (config.supports.includes(VizBehavior.PLACEHOLDER) && showPlaceholder) {\n return (\n <IconPlaceholder\n data-test=\"icon-placeholder\"\n icon={icon}\n width={width}\n height={height}\n backgroundColor={bgColorFromTheme}\n iconColor={iconColor}\n />\n );\n }\n\n return <Visualization {...props} />;\n };\n extendStaticWrapperProps({ Wrapper, Visualization });\n return Wrapper as ExtendedDashViz;\n};\n\nexport default withPlaceholder;\n","module.exports = require(\"@splunk/visualization-icons/placeholders\");","module.exports = require(\"@splunk/visualizations-shared/colorConstants\");","import SingleValueRadial from './PureSingleValueRadial/SingleValueRadial';\nimport withDashboardViz from '../common/withDashboardViz';\nimport vizConfig from './config';\n\nexport const config = vizConfig;\nexport const PureSingleValueRadial = SingleValueRadial;\n// TODO: proper theming support for SVR when we come back to SVR viz\nexport const PureSingleValueRadialThemes = {};\nexport default withDashboardViz({ ReactViz: SingleValueRadial, vizConfig });\n","import { _ } from '@splunk/ui-utils/i18n';\nimport { COLOR_OR_TOKEN_PATTERN_WITH_RGBA, getPattern } from '@splunk/visualizations-shared/schemaUtils';\nimport pick from '@splunk/themes/pick';\nimport variables from '@splunk/themes/variables';\nimport { defaultPalettesConfig } from '@splunk/visualization-color-palettes/editors/PresetPalettes';\nimport { SingleValueRadial as SingleValueRadialIcon } from '@splunk/visualization-icons';\nimport { SingleValueRadial as SingleValueRadialPlaceholderIcon } from '@splunk/visualization-icons/placeholders';\nimport { VizConfig } from '../common/interfaces/VizConfig';\nimport { DataContract } from '../common/interfaces/DataContract';\nimport { VizSize } from '../common/interfaces/VizSize';\nimport { DefaultContext } from '../common/interfaces/DefaultContext';\nimport { OptionsSchema } from '../common/interfaces/OptionsSchema';\nimport { EditorConfig } from '../common/interfaces/Editor';\nimport { VizBehavior } from '../common/interfaces/VizBehavior';\nimport { ThemedDefaults } from '../common/interfaces/ThemedDefaults';\nimport { PresetEntry, enhanceConfig, getInitialPreset } from '../common/utils/configUtils';\nimport { VizCategory } from '../common/interfaces/VizCategory';\nimport { getDynamicMajorColorEditor } from '../common/editorConfig/DynamicMajorColorEditor';\nimport { getDynamicTrendColorEditor } from '../common/editorConfig/DynamicTrendColorEditor';\nimport { getDynamicBackgroundColorEditor } from '../common/editorConfig/DynamicBackgroundColorEditor';\nimport StaticMajorColorEditor from '../common/editorConfig/StaticMajorColorEditor';\nimport StaticTrendColorEditor from '../common/editorConfig/StaticTrendColorEditor';\nimport StaticBackgroundColorEditor from '../common/editorConfig/StaticBackgroundColorEditor';\nimport getRadialBackgroundColorEditor from '../common/editorConfig/RadialBackgroundColor';\n\nconst dataContract: DataContract = {\n requiredDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n optionalDataSources: [],\n initialRequestParams: {\n primary: { offset: 0, count: 10000 },\n },\n};\n\nconst size: VizSize = {\n initialWidth: 250,\n initialHeight: 250,\n};\n\nconst defaultContext: DefaultContext = {\n trendColorConfig: [\n {\n to: 0,\n value: '#9E2520',\n },\n {\n from: 0,\n value: '#1C6B2D',\n },\n ],\n majorColorConfig: [\n { to: 20, value: '#D41F1F' },\n { from: 20, to: 40, value: '#D94E17' },\n { from: 40, to: 60, value: '#CBA700' },\n { from: 60, to: 80, value: '#669922' },\n { from: 80, value: '#118832' },\n ],\n majorColorMatchConfig: [{ match: '', value: '#5C33FF' }],\n};\n\nconst optionsSchema: OptionsSchema = {\n backgroundColor: {\n default: '> themes.defaultBackgroundColor',\n description:\n 'Specify the color for the background. The hex value format should be “#ffffff”. The default for enterprise light is \"#ffffff\". The default for enterprise dark is \"#000000\". The default for prisma dark is \"#0b0c0e\".',\n pattern: COLOR_OR_TOKEN_PATTERN_WITH_RGBA,\n type: 'string',\n },\n majorColor: {\n default: '> themes.defaultFontColor',\n description:\n 'Specify the color for the major value. You may use a dataSource to apply the color. The hex value format should be “#ffffff”. The default for enterprise light is \"#000000\". The default for enterprise dark is \"#ffffff\". The default for prisma dark is \"rgba(255, 255, 255, 0.98)\".',\n pattern: COLOR_OR_TOKEN_PATTERN_WITH_RGBA,\n type: 'string',\n },\n majorValue: {\n default: '> primary | seriesByPrioritizedTypes(\"number\", \"string\", \"time\") | lastPoint()',\n description: 'Specify the dataSource applied to the major value.',\n type: ['string', 'number'],\n },\n majorValueField: {\n default: '> majorValue | getField()',\n description: 'Specify the field that should be mapped to the major value.',\n type: 'string',\n },\n maxValue: {\n default: 100,\n description: 'Specify the value the radial fills up to.',\n type: 'number',\n },\n numberPrecision: {\n default: 0,\n maximum: 20,\n minimum: 0,\n description:\n 'Specify the number of decimal places to display. For example, to display 3 decimal places, use a value of 3. The maximum value is 20.',\n type: 'number',\n },\n radialBackgroundColor: {\n default: '> themes.defaultRadialBackgroundColor',\n description:\n 'Specify the color for the radial background. The hex value format should be “#ffffff”. The default for enterprise light is \"rgba(0, 0, 0, 0.1)\". The default for enterprise dark is \"rgba(255, 255, 255, 0.15)\". The default for prisma dark is \"rgba(255, 255, 255, 0.15)\".',\n pattern: COLOR_OR_TOKEN_PATTERN_WITH_RGBA,\n type: 'string',\n },\n radialStrokeColor: {\n default: '> majorColor',\n description:\n 'Specify the color for the radial. You may use a dataSource to apply the color. The hex value format should be “#ffffff”. The default for enterprise light is \"#000000\". The default for enterprise dark is \"#ffffff\". The default for prisma dark is \"rgba(255, 255, 255, 0.98)\".',\n pattern: COLOR_OR_TOKEN_PATTERN_WITH_RGBA,\n type: 'string',\n },\n shouldAbbreviateTrendValue: {\n default: false,\n description:\n 'Specify whether to abbreviate the trend value to 2 decimal points. A magnitude unit will be displayed.',\n type: 'boolean',\n },\n shouldUseThousandSeparators: {\n default: true,\n description: 'Specify whether numeric values use commas as thousandths separaters.',\n type: 'boolean',\n },\n trendColor: {\n default: '> themes.defaultFontColor',\n description:\n 'Specify the color for the trend value. You may use a dataSource to apply the color. The hex value format should be “#FFFFFF”. The default for enterprise light is \"#000000\". The default for enterprise dark is \"#ffffff\". The default for prisma dark is \"rgba(255, 255, 255, 0.98)\".',\n pattern: COLOR_OR_TOKEN_PATTERN_WITH_RGBA,\n type: 'string',\n },\n trendDisplay: {\n default: 'absolute',\n description: 'Specify how to display the trend value.',\n pattern: getPattern(['percent', 'absolute', 'off']),\n type: 'string',\n },\n trendValue: {\n default: '> primary | seriesByPrioritizedTypes(\"number\", \"string\", \"time\") | delta(-2)', // todo: may need update delta method\n description: 'Specify the dataSource applied to the trend value.',\n type: 'number',\n },\n underLabel: { description: 'Specify the text that appears below the major value.', type: 'string' },\n unit: {\n description: 'Specify text to show next to the major value.',\n type: 'string',\n },\n unitPosition: {\n default: 'after',\n description: 'Specify whether the unit text should appear before or after the major value.',\n pattern: getPattern(['before', 'after']),\n type: 'string',\n },\n};\n\nconst basePresetContext = {\n majorColorEditorConfig: undefined,\n trendColorEditorConfig: undefined,\n backgroundColorEditorConfig: undefined,\n};\n\nconst basePresetOptions = {\n majorColor: undefined,\n trendColor: undefined,\n backgroundColor: undefined,\n};\n\nconst presets: PresetEntry[] = [\n {\n // dummy context variables to allow for resetting of unused context states\n label: _('None'),\n name: 'singleValueRadial.none',\n value: {\n context: { ...basePresetContext },\n options: { ...basePresetOptions },\n },\n },\n {\n label: _('Major Value'),\n name: 'singleValueRadial.majorValue',\n value: {\n context: {\n ...basePresetContext,\n majorColorEditorConfig: defaultContext.majorColorConfig,\n },\n options: {\n ...basePresetOptions,\n majorColor: '> majorValue | rangeValue(majorColorEditorConfig)',\n },\n },\n },\n {\n label: _('Major Value & Trend'),\n name: 'singleValueRadial.majorValueAndTrend',\n value: {\n context: {\n ...basePresetContext,\n majorColorEditorConfig: defaultContext.majorColorConfig,\n trendColorEditorConfig: defaultContext.trendColorConfig,\n },\n options: {\n ...basePresetOptions,\n majorColor: '> majorValue | rangeValue(majorColorEditorConfig)',\n trendColor: '> trendValue | rangeValue(trendColorEditorConfig)',\n },\n },\n },\n {\n label: _('Trend'),\n name: 'singleValueRadial.trend',\n value: {\n context: {\n ...basePresetContext,\n trendColorEditorConfig: defaultContext.trendColorConfig,\n },\n options: {\n ...basePresetOptions,\n trendColor: '> trendValue | rangeValue(trendColorEditorConfig)',\n },\n },\n },\n {\n label: _('Background'),\n name: 'singleValueRadial.background',\n value: {\n context: {\n ...basePresetContext,\n backgroundColorEditorConfig: defaultContext.majorColorConfig,\n },\n options: {\n ...basePresetOptions,\n backgroundColor: '> majorValue | rangeValue(backgroundColorEditorConfig)',\n },\n },\n },\n];\n\nconst themes: ThemedDefaults = {\n defaultFontColor: props =>\n pick({\n enterprise: {\n dark: variables.white(props),\n light: variables.black(props),\n },\n prisma: variables.contentColorActive(props),\n })(props),\n defaultBackgroundColor: props =>\n pick({\n enterprise: {\n dark: variables.black(props),\n light: variables.white(props),\n },\n prisma: variables.backgroundColorSidebar(props),\n })(props),\n defaultRadialBackgroundColor: props =>\n pick({\n enterprise: {\n dark: 'rgba(255, 255, 255, 0.15)',\n light: 'rgba(0, 0, 0, 0.1)',\n },\n prisma: variables.interactiveColorBackgroundDisabled(props),\n })(props),\n};\n\nconst editorConfig: EditorConfig[] = [\n {\n label: _('Major Value & Trend'),\n layout: [\n [\n {\n label: 'Unit Position',\n option: 'unitPosition',\n editor: 'editor.select',\n editorProps: {\n values: [\n { label: _('Before'), value: 'before' },\n { label: _('After'), value: 'after' },\n ],\n },\n },\n {\n label: _('Unit Label'),\n option: 'unit',\n editor: 'editor.text',\n },\n ],\n [\n {\n label: _('Precision'),\n option: 'numberPrecision',\n editor: 'editor.number',\n editorProps: {\n min: 0,\n max: 20,\n },\n },\n {\n label: _('Trend Display'),\n option: 'trendDisplay',\n editor: 'editor.select',\n editorProps: {\n values: [\n { label: _('Percent'), value: 'percent' },\n { label: _('Absolute'), value: 'absolute' },\n { label: _('Off'), value: 'off' },\n ],\n },\n },\n ],\n ],\n },\n {\n label: _('Coloring'),\n layout: [\n [\n {\n label: 'Dynamic Elements',\n key: 'presetSelector',\n editor: 'editor.presetSelector',\n editorProps: {\n presets,\n value: ({ context, options }) => {\n const initialPreset = getInitialPreset(context, options, presets);\n return (initialPreset && initialPreset.label) || null;\n },\n },\n },\n ],\n [\n {\n ...StaticMajorColorEditor,\n editorProps: {\n labelPosition: 'left',\n themes,\n },\n },\n ],\n [getDynamicMajorColorEditor({ defaultContext, defaultPalettesConfig })],\n [\n {\n ...StaticTrendColorEditor,\n editorProps: {\n labelPosition: 'left',\n themes,\n },\n },\n ],\n [getDynamicTrendColorEditor({ defaultContext, defaultPalettesConfig })],\n getRadialBackgroundColorEditor({ labelPosition: 'left', themes }),\n [\n {\n ...StaticBackgroundColorEditor,\n editorProps: {\n labelPosition: 'left',\n themes,\n },\n },\n ],\n [getDynamicBackgroundColorEditor({ defaultContext, defaultPalettesConfig })],\n ],\n },\n];\n/**\n * visualization configuration\n */\nconst config: VizConfig = {\n /**\n * unique viz key\n */\n key: 'splunk.singlevalueradial',\n /**\n * viz name\n */\n name: 'Single Value Radial',\n category: VizCategory.SINGLE_VALUE,\n /**\n * viz icon\n */\n icon: SingleValueRadialIcon,\n placeholderIcon: SingleValueRadialPlaceholderIcon,\n dataContract,\n size,\n defaultContext,\n optionsSchema,\n editorConfig,\n events: {\n 'value.click': {\n description: 'trigger when user clicks major value',\n payloadKeys: ['majorValue', 'trendValue'],\n },\n },\n supports: [VizBehavior.DYNAMIC_OPTIONS, VizBehavior.EVENTS, VizBehavior.PLACEHOLDER],\n themes,\n};\n\nexport default enhanceConfig(config);\n","import { _ } from '@splunk/ui-utils/i18n';\nimport { EditorLayoutConfig } from '../interfaces/Editor';\nimport { ThemedDefaults } from '../interfaces/ThemedDefaults';\n\ninterface RadialBackgroundEditorProps {\n label?: string;\n themes: ThemedDefaults;\n labelPosition?: string;\n}\n\nconst radialBackground: ({\n label,\n themes,\n labelPosition,\n}: RadialBackgroundEditorProps) => EditorLayoutConfig[] = ({ label, themes, labelPosition }) => [\n {\n label: _(label || 'Radial Background'),\n option: 'radialBackgroundColor',\n editor: 'editor.color',\n editorProps: {\n labelPosition: labelPosition || 'top',\n themes,\n },\n },\n];\n\nexport default radialBackground;\n","module.exports = require(\"@splunk/visualization-icons\");","import React from 'react';\nimport T from 'prop-types';\nimport { RADIAL_BACKGROUND_COLOR, RADIAL_STROKE_COLOR } from '@splunk/visualizations-shared/colorConstants';\n\nconst RadialGraph = ({\n progress,\n strokeWidth,\n backgroundColor = RADIAL_BACKGROUND_COLOR,\n progressColor = RADIAL_STROKE_COLOR,\n width = 200,\n height = 200,\n}) => {\n const semicircleRadius = height - strokeWidth / 2;\n\n const circumference = semicircleRadius * 2 * Math.PI;\n const bgCircleOffset = 0.5 * circumference;\n\n const progress50 = (progress / 100) * 50;\n const progressWidth = (progress50 / 100) * circumference;\n const strokeDashoffset = circumference * 0.5;\n\n return (\n <svg height={height} width={width} data-test=\"radial-visualization\">\n <g>\n <circle\n data-test=\"background-radial\"\n stroke={backgroundColor}\n fill=\"transparent\"\n strokeWidth={strokeWidth}\n strokeDasharray={`${bgCircleOffset} ${circumference - bgCircleOffset}`}\n style={{ strokeDashoffset }}\n r={semicircleRadius}\n cx={width / 2}\n cy={semicircleRadius + strokeWidth / 2}\n />\n <circle\n data-test=\"progress-radial\"\n stroke={progressColor}\n fill=\"transparent\"\n strokeWidth={strokeWidth}\n strokeDasharray={`${progressWidth} ${circumference - progressWidth}`}\n style={{ strokeDashoffset }}\n r={semicircleRadius}\n cx={width / 2}\n cy={semicircleRadius + strokeWidth / 2}\n />\n </g>\n </svg>\n );\n};\n\nRadialGraph.propTypes = {\n progress: T.number,\n strokeWidth: T.number,\n backgroundColor: T.string,\n progressColor: T.string,\n width: T.number,\n height: T.number,\n};\n\nRadialGraph.defaultProps = {\n progress: 0,\n strokeWidth: 12,\n};\n\nexport default RadialGraph;\n","import { RADIAL_SEVERITY_COLORS } from '@splunk/visualizations-shared/colorConstants';\nimport { getGraphColors, lighten, darken, SVR_PADDING } from '../../../common/utils/singleValueUtils';\n\nexport const VALID_TREND_POSITIONS = ['standard', 'below', 'outside'];\nexport const MAJOR_FONT_THRESHOLD = 25;\nexport const TREND_FONT_THRESHOLD = 12;\nexport const DEFAULT_RADIAL_STROKE_WIDTH = 16;\nexport const SMALL_RADIAL_STROKE_WIDTH = 6;\n\n/**\n * Get the colors for a radial graph based on severity\n * @method getRadialColors\n * @param {Object} props\n * @param {Bool} props.backgroundEnabled\n * @param {String} props.backgroundColor\n * @returns {Object} { background, stroke } colors\n */\nexport const getRadialColors = ({ backgroundEnabled, backgroundColor }) =>\n getGraphColors({\n backgroundEnabled,\n backgroundColor,\n defaultColors: RADIAL_SEVERITY_COLORS,\n customColorFormatter: color => ({ background: lighten(color), stroke: darken(color) }),\n });\n\n/**\n * Figure out the dimensions of the graph\n * @method getRadialGraphDimensions\n * @param {Object} props\n * @param {Number} props.width // Width of the container\n * @param {Number} props.height // Height of the container\n * @returns {Number} width and height of the graph\n */\nexport const getRadialGraphDimensions = ({ width, height }) => {\n // height * 2 because we are fitting only half of a circle inside the container\n const radius = Math.min(width, height * 2) / 2;\n\n return {\n width: width - SVR_PADDING.left - SVR_PADDING.right,\n height: radius - SVR_PADDING.top - SVR_PADDING.bottom,\n };\n};\n\n/**\n * Figure out the dimensions of the content container for SVR\n * @method getRadialHelperDimensions\n * @param {Object} props\n * @param {Number} props.width // Width of the visualization space\n * @param {Number} props.height // Height of the visualization space\n * @returns {Number} width and height of the content graph\n */\nexport const getRadialHelperDimensions = ({ height, strokeWidth = DEFAULT_RADIAL_STROKE_WIDTH }) => {\n // The radius of the visualization is equal to the height\n const semicircleRadius = height - strokeWidth / 2; // The inner part of the arc is strokeWidth / 2 inset.\n const innerArcRadius = semicircleRadius * 0.9;\n const halfContentWidth = innerArcRadius * 0.7;\n const contentHeight = Math.floor(Math.sqrt(innerArcRadius ** 2 - halfContentWidth ** 2));\n\n return {\n contentWidth: halfContentWidth * 2,\n contentHeight,\n helperArcRadius: innerArcRadius,\n semicircleRadius,\n };\n};\n\n/**\n * Get the maximum size of the container that holds the graph text\n * @method getValueContentSize\n * @param {Object} props\n * @param {Number} props.graphSize\n * @param {Number} props.radialStrokeWidth // Stroke width of the graph\n * @returns {Number} content size for showing major and trend values in radial graph\n */\nexport const getValueContentSize = ({ graphSize, radialStrokeWidth }) => {\n // Account for the graph's stroke width\n const diameter = graphSize - radialStrokeWidth;\n // Use pythagoreum theorum with circle diameter\n // to calculate the size of the sides of the square inside the circle\n return Math.floor(Math.sqrt(diameter ** 2 / 2));\n};\n\n/*\n * @method getRadialStrokeWidth\n * @param {Number} graphHeight\n * @returns {Number} radial stroke width\n */\nexport const getRadialStrokeWidth = graphHeight =>\n graphHeight >= 90 ? DEFAULT_RADIAL_STROKE_WIDTH : SMALL_RADIAL_STROKE_WIDTH;\n\n/*\n * @method isValidPosition\n * @param {String} position\n * @returns {Bool}\n */\nexport const isValidPosition = position => VALID_TREND_POSITIONS.indexOf(position) > -1;\n\n/*\n * @method showTrendPositionStandard\n * @param {Object} props\n * @param {Bool} props.showTrendIndicator\n * @param {String} props.position\n * @returns {Bool}\n */\nexport const showTrendPositionStandard = ({ showTrendIndicator, position }) =>\n showTrendIndicator && position === 'standard';\n\n/*\n * @method showTrendPositionBelow\n * @param {Object} props\n * @param {Bool} props.showTrendIndicator\n * @param {String} props.position\n * @returns {Bool}\n */\nexport const showTrendPositionBelow = ({ showTrendIndicator, position }) =>\n showTrendIndicator && position === 'below';\n\n/*\n * @method showTrendPositionOutside\n * @param {Object} props\n * @param {Bool} props.showTrendIndicator\n * @param {String} props.position\n * @returns {Bool}\n */\nexport const showTrendPositionOutside = ({ showTrendIndicator, position }) =>\n showTrendIndicator && position === 'outside';\n\n/*\n * need to handle max and min\n * @method getRadialProgress\n * @param {Number} majorValue\n * @returns {Number} progress bar in radial graph\n */\nexport const getRadialProgress = (majorValue, maxValue) =>\n Number.isNaN(Number(majorValue)) ||\n Number.isNaN(Number(maxValue)) ||\n (majorValue < 0 && majorValue < maxValue)\n ? 0\n : (majorValue / maxValue) * 100;\n","import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport SingleValueBasic from '../../SingleValueBasic/SingleValueBasic';\nimport RadialGraph from './RadialGraph';\nimport { getRadialHelperDimensions } from './utils/displayUtils';\n\nconst TextContainer = styled.div`\n position: ${props => (props.smallViz ? 'relative' : 'absolute')};\n left: 0;\n bottom: 0;\n\n width: 100%;\n display: flex;\n align-items: ${props => props.align || 'center'};\n justify-content: center;\n flex-direction: column;\n\n // To ensure the major text is flush with the bottom of the text container when radial is shown.\n [data-test='majorValue'] {\n ${props => !props.smallViz && { lineHeight: 'normal' }}\n\n ::before {\n font-size: inherit;\n vertical-align: unset;\n top: unset;\n }\n\n ::after {\n font-size: inherit;\n vertical-align: unset;\n top: unset;\n }\n }\n\n // To ensure the trend text is flush with the bottom of the text container, and prevents weird spacing behavior at very small trend text sizes\n [data-test='trendValueIndicator'] {\n align-items: flex-end;\n ${props => props.smallViz && { marginLeft: '1px' }}\n }\n\n // Prevents weird spacing behavior at very small sizes.\n [data-test='trendValue'] {\n ${props => props.smallViz && { marginLeft: '1px' }}\n }\n\n div[class^='TrendValue__Column'] {\n ${props => props.smallViz && { margin: '0 1px' }}\n }\n`;\n\nconst GraphContainer = styled.div`\n position: relative;\n margin: 0 auto;\n width: ${props => props.width}px;\n height: ${props => props.height}px;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n`;\n\nconst UnderLabelContainer = styled.div`\n display: flex;\n flex: 0 0 ${props => props.underLabelHeight}px; // Changes depending on height of underLabel.\n align-items: flex-end;\n`;\n\nconst UnderLabelText = styled.span`\n color: ${props => props.color};\n -webkit-text-stroke: 0.5px ${props => props.strokeColor};\n font-size: 12px;\n\n // Prevent overflow of text beyond inner arc radius.\n max-width: ${props => props.maxWidth}px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nconst RadialContent = ({ ...props }) => {\n const {\n majorColor,\n majorText,\n majorTextFontSize,\n majorValueTitle,\n trendColor,\n trendText,\n trendTextFontSize,\n showTrendIndicator,\n unit,\n unitPosition,\n underLabelColor,\n underLabel,\n onValueClick,\n showRadialGraph,\n progress,\n radialBackgroundColor,\n radialStrokeColor,\n radialStrokeWidth,\n graphWidth,\n graphHeight,\n underLabelStrokeColor,\n } = props;\n\n const { semicircleRadius, helperArcRadius } = getRadialHelperDimensions({\n height: graphHeight,\n strokeWidth: radialStrokeWidth,\n });\n\n // Two cases for filling underLabel space: either the semicircle radius is insufficiently sized for text\n // or the radial visualization has been disabled (first condition reached first when making smaller).\n const fillVacantSpace = semicircleRadius < 50 || !showRadialGraph;\n\n // If filling the vacant space, no height on underLabel container. Otherwise, the underLabel height is 20% of the helperArcRadius (min 20px).\n const underLabelHeight = fillVacantSpace ? 0 : Math.max(helperArcRadius * 0.2, 20);\n const underLabelWidth = helperArcRadius * 2;\n\n const basicSingleValues = (\n <SingleValueBasic\n majorColor={majorColor}\n majorText={majorText}\n majorTextFontSize={majorTextFontSize}\n majorValueTitle={majorValueTitle}\n trendColor={trendColor}\n trendText={trendText}\n trendTextFontSize={trendTextFontSize}\n showTrendIndicator={showTrendIndicator}\n unit={unit}\n unitPosition={unitPosition}\n onValueClick={onValueClick}\n />\n );\n\n const radialGraph = showRadialGraph ? (\n <RadialGraph\n progress={progress}\n backgroundColor={radialBackgroundColor}\n progressColor={radialStrokeColor}\n strokeWidth={radialStrokeWidth}\n width={graphWidth}\n height={graphHeight}\n />\n ) : null;\n\n const underLabelComponent = (\n <UnderLabelContainer underLabelHeight={underLabelHeight}>\n {!fillVacantSpace && underLabel && (\n <UnderLabelText\n data-test=\"underLabel\"\n maxWidth={underLabelWidth * 0.9} // buffer for overflow ellipses\n color={underLabelColor}\n strokeColor={underLabelStrokeColor}\n title={underLabel}\n >\n {underLabel}\n </UnderLabelText>\n )}\n </UnderLabelContainer>\n );\n\n return (\n <GraphContainer width={graphWidth} height={graphHeight}>\n {radialGraph}\n <TextContainer smallViz={!showRadialGraph} height={graphHeight}>\n {basicSingleValues}\n {underLabelComponent}\n </TextContainer>\n </GraphContainer>\n );\n};\n\nRadialContent.propTypes = {\n ...SingleValueBasic.propTypes,\n trendPosition: T.string,\n showRadialGraph: T.bool,\n progress: T.number,\n radialBackgroundColor: T.string,\n radialStrokeColor: T.string,\n radialStrokeWidth: T.number,\n graphWidth: T.number,\n graphHeight: T.number,\n underLabelStrokeColor: T.string,\n};\n\nexport default RadialContent;\n","import React, { useCallback } from 'react';\nimport T from 'prop-types';\nimport pickFromTheme from '@splunk/themes/pick';\nimport variables from '@splunk/themes/variables';\nimport styled, { withTheme } from 'styled-components';\nimport pick from 'lodash/pick';\nimport isEmpty from 'lodash/isEmpty';\nimport { toDimension } from '@splunk/visualizations-shared/style';\nimport SizeAwareWrapper from '@splunk/visualizations-shared/SizeAwareWrapper';\nimport VizStyleWrapper from '../../common/components/VizStyleWrapper';\nimport RadialLayout from './RadialLayout';\nimport {\n computeColors,\n computeSingleValueRadialContent,\n shouldShowTrend,\n handleValueClickCallback,\n} from '../../common/utils/singleValueUtils';\nimport {\n getRadialGraphDimensions,\n getRadialHelperDimensions,\n getRadialProgress,\n getRadialStrokeWidth,\n getRadialColors,\n} from './utils/displayUtils';\n\nconst Container = styled.div`\n overflow: hidden;\n ${props => toDimension(pick(props, ['width', 'height']))};\n`;\n\nconst SingleValueRadial = ({ ...props }) => {\n const {\n width,\n height = 250,\n style,\n majorFontSize,\n majorValue,\n majorValueField,\n maxValue,\n trendValue,\n trendFontSize,\n unitPosition,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n onValueClick,\n } = props;\n\n // calculate colors\n const defaultColors = {\n defaultFontColor: pickFromTheme({\n enterprise: {\n dark: variables.textColor(props),\n light: variables.gray20(props),\n },\n prisma: variables.contentColorActive(props),\n })(props),\n defaultBlockFontColor: pickFromTheme({\n enterprise: variables.white(props),\n prisma: variables.contentColorActive(props),\n })(props),\n };\n const { backgroundEnabled, backgroundColor, majorColor, trendColor, underLabelColor } = computeColors(\n props,\n defaultColors\n );\n\n const radialColors = getRadialColors({ backgroundEnabled, backgroundColor });\n const radialBackgroundColor = props.radialBackgroundColor || radialColors.background;\n const radialStrokeColor = props.radialStrokeColor || radialColors.stroke;\n const underLabelStrokeColor = backgroundEnabled ? backgroundColor : 'transparent';\n\n const handleValueClick = useCallback(\n ev => handleValueClickCallback(ev, majorValue, majorValueField, trendValue, onValueClick),\n [onValueClick, majorValue, majorValueField, trendValue]\n );\n\n const renderVisualization = ({ width: containerWidth, height: containerHeight }) => {\n const { underLabel } = props;\n let { trendDisplay, unit } = props;\n\n // calculate radial graph dimensions, strokewidth, and major and trend content dimensions\n let { width: graphWidth, height: graphHeight } = getRadialGraphDimensions({\n width: containerWidth,\n height: containerHeight,\n });\n\n // Radial stroke width is stepped to lower value at lower sizes.\n const radialStrokeWidth = getRadialStrokeWidth(graphHeight);\n\n let { contentWidth, contentHeight } = getRadialHelperDimensions({\n height: graphHeight - radialStrokeWidth / 2,\n strokeWidth: radialStrokeWidth,\n });\n\n // Subtract half of the stroke width for the exact internal radius.\n const semicircleRadius = graphHeight - radialStrokeWidth / 2;\n // If radius drops below 20px, hide the radial graph. The dependency of this variable on font size is removed, and it now only depends on semicircle radius.\n const showRadialGraph = semicircleRadius >= 20;\n\n // If not showing the radial graph, then can forgo padding logic and use original container dimensions for content sizing computation.\n if (!showRadialGraph) {\n graphWidth = containerWidth;\n contentWidth = containerWidth;\n graphHeight = containerHeight;\n contentHeight = containerHeight;\n }\n\n const {\n majorText,\n trendText,\n majorTextFontSize,\n trendTextFontSize,\n majorValueTitle,\n smallVizProps,\n } = computeSingleValueRadialContent({\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n trendDisplay,\n contentWidth,\n contentHeight, // buffer for height of div\n containerWidth: containerWidth * 0.9,\n containerHeight: containerHeight * 0.9,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n smallViz: !showRadialGraph,\n });\n\n if (!isEmpty(smallVizProps)) {\n ({ trendDisplay, unit } = smallVizProps);\n }\n\n // calculate radial progress\n const progress = getRadialProgress(majorValue, maxValue);\n\n return (\n <VizStyleWrapper\n backgroundColor={backgroundColor}\n style={style}\n dataTestKey=\"SingleValueRadialWrapper\"\n >\n <RadialLayout\n data-test=\"RadialLayout\"\n majorColor={majorColor}\n majorText={majorText}\n majorTextFontSize={majorTextFontSize}\n majorValueTitle={majorValueTitle}\n trendColor={trendColor}\n trendText={trendText}\n trendTextFontSize={trendTextFontSize}\n showTrendIndicator={shouldShowTrend(trendDisplay)}\n unit={unit}\n unitPosition={unitPosition}\n underLabelColor={underLabelColor}\n underLabel={underLabel}\n onValueClick={handleValueClick}\n showRadialGraph={showRadialGraph}\n progress={progress}\n radialBackgroundColor={radialBackgroundColor}\n radialStrokeColor={radialStrokeColor}\n radialStrokeWidth={radialStrokeWidth}\n graphWidth={graphWidth}\n graphHeight={graphHeight}\n underLabelStrokeColor={underLabelStrokeColor}\n />\n </VizStyleWrapper>\n );\n };\n\n return (\n <Container width={width} height={height}>\n <SizeAwareWrapper>\n {containerDimension => renderVisualization(containerDimension)}\n </SizeAwareWrapper>\n </Container>\n );\n};\n\nSingleValueRadial.propTypes = {\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n style: T.object,\n majorValue: T.oneOfType([T.string, T.number]),\n majorValueField: T.string,\n majorColor: T.string,\n majorFontSize: T.number,\n maxValue: T.number,\n trendValue: T.oneOfType([T.string, T.number]),\n trendColor: T.string,\n trendFontSize: T.number,\n trendDisplay: T.string,\n trendIndicatorPosition: T.oneOf(['standard', 'below', 'outside']),\n shouldAbbreviateTrendValue: T.bool,\n backgroundColor: T.string,\n unit: T.string,\n unitPosition: T.string,\n underLabel: T.string,\n numberPrecision: T.number,\n shouldUseThousandSeparators: T.bool,\n radialBackgroundColor: T.string,\n radialStrokeColor: T.string,\n onValueClick: T.func,\n};\n\nSingleValueRadial.defaultProps = {\n width: '100%',\n height: 250,\n majorValue: 'N/A',\n majorValueField: '',\n maxValue: 100,\n trendDisplay: 'absolute',\n trendIndicatorPosition: 'standard',\n shouldAbbreviateTrendValue: false,\n unitPosition: 'after',\n numberPrecision: 0,\n shouldUseThousandSeparators: true,\n onValueClick: () => {},\n};\n\nexport default withTheme(SingleValueRadial);\n","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@splunk/visualizations-shared/domUtils\");","module.exports = require(\"@splunk/visualization-color-palettes/editors/PresetPalettes\");","export enum VizBehavior {\n /**\n * Dynamic Options Behavior.\n * This allows visualization options to be powered by data\n *\n * **Example**\n *\n * sparklineValues: \">primary|seriesByIndex(0)\"\n * would configure sparklineValues with an array of data points\n * coming from the first series in the primary datasource\n *\n */\n DYNAMIC_OPTIONS = 'dynamic-options',\n EVENTS = 'events',\n /**\n * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is\n * missing.\n * @type {string}\n */\n PLACEHOLDER = 'placeholder',\n PAGE_AND_SORT = 'page-and-sort',\n}\n","import styled from 'styled-components';\n\nconst VizStyleWrapper = styled.div.attrs(({ dataTestKey }) => ({\n 'data-test': dataTestKey,\n}))`\n display: flex;\n justify-content: center;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background-color: ${props => props.backgroundColor};\n`;\n\nVizStyleWrapper.displayName = 'VizStyleWrapper';\n\nexport default VizStyleWrapper;\n","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport ArrowUp from '@splunk/react-icons/ArrowUp';\nimport ArrowDown from '@splunk/react-icons/ArrowDown';\nimport { DEFAULT_FONT_FAMILY } from '../common/utils/singleValueUtils';\n\nconst Column = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: ${props => props.justify || 'flex-end'};\n height: ${props => props.size || 12}px;\n ${props => (props.size ? `margin: 0 ${parseInt(props.size, 10) * 0.2 || 5}px;` : '')};\n`;\n\nconst Text = styled.div`\n white-space: nowrap;\n font-size: ${props => props.size || 12}px;\n color: ${props => props.color || '#000'};\n font-family: ${DEFAULT_FONT_FAMILY};\n height: ${props => props.size || 12}px;\n line-height: ${props => props.size || 12}px;\n display: flex;\n align-self: baseline;\n ${props => (props.size ? `margin-left: ${parseInt(props.size, 10) * 0.2 || 5}px;` : '')};\n`;\n\nconst SingleValueContent = ({ fontSize, color, value, text }) => {\n let TrendIndicator = false;\n\n if (parseFloat(value, 10) > 0) {\n TrendIndicator = ArrowUp;\n } else if (parseFloat(value, 10) < 0) {\n TrendIndicator = ArrowDown;\n }\n\n return (\n <Column justify=\"flex-end\" size={fontSize}>\n <Text data-test=\"trendValueIndicator\" size={fontSize} color={color}>\n {TrendIndicator && <TrendIndicator />}\n </Text>\n <Text data-test=\"trendValue\" size={fontSize} color={color}>\n {`${text}`}\n </Text>\n </Column>\n );\n};\n\nSingleValueContent.propTypes = {\n fontSize: T.number,\n color: T.string,\n value: T.oneOfType([T.string, T.number]),\n text: T.string,\n};\n\nexport default SingleValueContent;\n","import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport cssesc from 'cssesc';\nimport { DEFAULT_FONT_FAMILY } from '../common/utils/singleValueUtils';\n\nconst Row = styled.div`\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n justify-content: left;\n height: ${props => props.size}px;\n line-height: ${props => props.size}px;\n`;\n\nconst Text = styled.div`\n white-space: nowrap;\n height: 100%;\n font-size: ${props => props.size || 12}px;\n color: ${props => props.color};\n font-family: ${DEFAULT_FONT_FAMILY};\n font-weight: bold;\n &:hover {\n text-decoration: ${props => (props.showUnderline ? 'underline' : 'inherit')};\n cursor: ${props => (props.showUnderline ? 'pointer' : 'inherit')};\n }\n ${props => {\n if (!props.pseudoContent || !props.pseudoContentPosition) {\n return '';\n }\n return `&:${props.pseudoContentPosition} {\n // by default this pseudo element would inherit text-decoration from main element\n // and text-decoration could not be overwritten.\n // adding display: inline-block makes text decoration independent from main element.\n // => the unit will not be underlined if a user hovers over the main value\n display: inline-block;\n font-size: ${props.pseudoContentFontSize}px;\n position: relative;\n font-weight: normal;\n content: ${props.pseudoContent};\n }`;\n }}\n`;\n\nconst validUnitPositions = ['before', 'after'];\n\nconst SingleValueContent = ({ color, fontSize, unitPosition, title, value, onValueClick, unit }) => {\n let sanitizedUnit;\n let sanitizedUnitPosition;\n\n if (typeof unit === 'string') {\n sanitizedUnit = cssesc(unit, { wrap: true, quotes: 'double' });\n if (typeof unitPosition === 'string' && validUnitPositions.includes(unitPosition)) {\n sanitizedUnitPosition = unitPosition;\n } else {\n sanitizedUnitPosition = 'after';\n }\n }\n\n const handleKeyDown = e => {\n if (e.keyCode !== 13) {\n return;\n }\n e.preventDefault();\n onValueClick(e);\n };\n\n return (\n <Row size={fontSize}>\n <Text\n data-test=\"majorValue\"\n color={color}\n onClick={e => typeof onValueClick === 'function' && onValueClick(e)}\n showUnderline={!!onValueClick}\n size={fontSize}\n title={title}\n pseudoContent={sanitizedUnit}\n pseudoContentPosition={sanitizedUnitPosition}\n pseudoContentFontSize={fontSize * 0.6}\n tabIndex=\"0\"\n role=\"button\"\n onKeyDown={handleKeyDown}\n >\n {value}\n </Text>\n </Row>\n );\n};\n\nSingleValueContent.propTypes = {\n color: T.string,\n fontSize: T.number,\n unit: T.string,\n unitPosition: T.oneOf(validUnitPositions),\n value: T.oneOfType([T.string, T.number]),\n title: T.oneOfType([T.string, T.number]),\n onValueClick: T.func,\n};\n\nexport default SingleValueContent;\n","import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport { DEFAULT_FONT_FAMILY } from '../common/utils/singleValueUtils';\nimport TrendValue from './TrendValue';\nimport MajorValue from './MajorValue';\n\nconst Column = styled.div`\n display: flex;\n flex-direction: column;\n align-self: center;\n justify-content: center;\n`;\n\nconst Row = styled.div`\n display: flex;\n flex-direction: row;\n align-items: ${props => props.align || 'center'};\n justify-content: center;\n`;\n\nconst Text = styled.div`\n font-weight: normal;\n white-space: nowrap;\n font-size: ${props => props.size || 12}px;\n color: ${props => props.color || '#000'};\n font-family: ${DEFAULT_FONT_FAMILY};\n height: ${props => props.size || 12}px;\n line-height: 1.2;\n`;\n\nconst SingleValueBasic = ({ ...props }) => {\n const {\n majorColor,\n majorTextFontSize,\n majorText,\n majorValueTitle,\n trendColor,\n trendTextFontSize,\n trendText,\n showTrendIndicator,\n unit,\n unitPosition,\n underLabel,\n underLabelFontSize,\n underLabelColor,\n onValueClick,\n } = props;\n const trendIndicatorEnabled = trendText !== '' && showTrendIndicator;\n\n return (\n <Column>\n <Row align=\"baseline\">\n <MajorValue\n data-test=\"MajorValue\"\n color={majorColor}\n fontSize={majorTextFontSize}\n unit={unit}\n unitPosition={unitPosition}\n value={majorText}\n title={majorValueTitle}\n onValueClick={onValueClick}\n />\n {trendIndicatorEnabled && (\n // Passing the same value for value and text is a temporary hold until completion of https://jira.splunk.com/browse/SCP-21371\n <TrendValue\n data-test=\"TrendIndicator\"\n fontSize={trendTextFontSize}\n color={trendColor}\n value={trendText}\n text={trendText}\n />\n )}\n </Row>\n {underLabel && (\n <Row justify=\"center\">\n <Text data-test=\"underLabel\" size={underLabelFontSize} color={underLabelColor}>\n {underLabel}\n </Text>\n </Row>\n )}\n </Column>\n );\n};\n\nSingleValueBasic.propTypes = {\n majorText: T.string,\n majorColor: T.string,\n majorTextFontSize: T.number,\n majorValueTitle: T.string,\n trendText: T.string,\n trendTextFontSize: T.number,\n trendColor: T.string,\n showTrendIndicator: T.bool,\n unit: T.string,\n unitPosition: T.oneOf(['before', 'after']),\n underLabel: T.string,\n underLabelFontSize: T.number,\n underLabelColor: T.string,\n onValueClick: T.func,\n};\n\nexport const SingleValueTrendValue = TrendValue;\nexport default SingleValueBasic;\n","module.exports = require(\"lodash/pick\");","module.exports = require(\"lodash/isEmpty\");","module.exports = require(\"@splunk/react-icons/ArrowUp\");","module.exports = require(\"@splunk/react-icons/ArrowDown\");","module.exports = require(\"cssesc\");","import { _ } from '@splunk/ui-utils/i18n';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\n\nconst StaticBackgroundColorEditor = {\n label: _('Static Background'),\n option: 'backgroundColor',\n editor: 'editor.color',\n showEditor: ({ options }) => !isDynamicOption(options.backgroundColor),\n};\n\nexport default StaticBackgroundColorEditor;\n","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","import { _ } from '@splunk/ui-utils/i18n';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\n\nexport const getDynamicMajorColorEditor = ({ defaultContext, defaultPalettesConfig }) => ({\n label: _('Dynamic Major Value'),\n option: 'majorColor',\n context: 'majorColorEditorConfig',\n editor: 'editor.dynamicColor',\n showEditor: ({ options }) => isDynamicOption(options.majorColor),\n editorProps: {\n labelPosition: 'left',\n flyoutTitle: _('Dynamic Coloring: Major Value'),\n formatters: [\n {\n label: _('Ranges'),\n value: 'rangeValue',\n defaults: {\n majorValue: defaultContext.majorColorConfig,\n },\n },\n {\n label: _('Matches'),\n value: 'matchValue',\n defaults: {\n majorValue: defaultContext.majorColorMatchConfig,\n },\n },\n ],\n dataSelectors: [\n {\n label: _('Major Value'),\n value: 'majorValue',\n },\n ],\n defaultPalettesConfig,\n },\n});\n","import { _ } from '@splunk/ui-utils/i18n';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\n\nexport const getDynamicTrendColorEditor = ({ defaultContext, defaultPalettesConfig }) => ({\n label: _('Dynamic Trend'),\n option: 'trendColor',\n context: 'trendColorEditorConfig',\n editor: 'editor.dynamicColor',\n showEditor: ({ options }) => isDynamicOption(options.trendColor),\n editorProps: {\n labelPosition: 'left',\n flyoutTitle: _('Dynamic Coloring: Trend'),\n formatters: [\n {\n label: _('Ranges'),\n value: 'rangeValue',\n defaults: {\n trendValue: defaultContext.trendColorConfig,\n },\n },\n ],\n dataSelectors: [\n {\n label: _('Trend'),\n value: 'trendValue',\n },\n ],\n defaultPalettesConfig,\n },\n});\n","module.exports = require(\"@splunk/themes/variables\");","import { _ } from '@splunk/ui-utils/i18n';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\n\nexport const getDynamicBackgroundColorEditor = ({ defaultContext, defaultPalettesConfig }) => ({\n label: _('Dynamic Background'),\n option: 'backgroundColor',\n context: 'backgroundColorEditorConfig',\n editor: 'editor.dynamicColor',\n showEditor: ({ options }) => isDynamicOption(options.backgroundColor),\n editorProps: {\n labelPosition: 'left',\n flyoutTitle: _('Dynamic Coloring: Background'),\n formatters: [\n {\n label: _('Ranges'),\n value: 'rangeValue',\n defaults: {\n majorValue: defaultContext.majorColorConfig,\n trendValue: defaultContext.trendColorConfig,\n },\n },\n {\n label: _('Matches'),\n value: 'matchValue',\n defaults: {\n majorValue: defaultContext.majorColorMatchConfig,\n },\n },\n ],\n dataSelectors: [\n {\n label: _('Major Value'),\n value: 'majorValue',\n },\n {\n label: _('Trend'),\n value: 'trendValue',\n },\n ],\n defaultPalettesConfig,\n },\n});\n","import { _ } from '@splunk/ui-utils/i18n';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\n\nconst StaticMajorColorEditor = {\n label: _('Static Major Value'),\n option: 'majorColor',\n editor: 'editor.color',\n showEditor: ({ options }) => !isDynamicOption(options.majorColor),\n};\n\nexport default StaticMajorColorEditor;\n","import { _ } from '@splunk/ui-utils/i18n';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\n\nconst StaticTrendColorEditor = {\n label: _('Static Trend'),\n option: 'trendColor',\n editor: 'editor.color',\n showEditor: ({ options }) => !isDynamicOption(options.trendColor),\n isDisabled: ({ options }) => options.trendDisplay === 'off',\n};\n\nexport default StaticTrendColorEditor;\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///external \"@splunk/visualizations-shared/Message\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@splunk/visualizations-shared/colorUtils\"","webpack:///./src/common/hocs/FixedSizeContainer.tsx","webpack:///./src/common/utils/hocUtils.ts","webpack:///external \"@splunk/visualizations-shared/style\"","webpack:///external \"@splunk/visualizations-shared/schemaUtils\"","webpack:///./src/common/utils/configUtils.ts","webpack:///external \"@splunk/visualizations-shared/configUtils\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualizations-shared/SizeAwareWrapper\"","webpack:///external \"@splunk/themes/pick\"","webpack:///./src/common/utils/singleValueUtils.js","webpack:///external \"@splunk/visualization-context/TimezoneContext\"","webpack:///external \"@splunk/visualizations-shared/propUtils\"","webpack:///external \"@splunk/visualizations-shared/hocUtils\"","webpack:///external \"@splunk/visualizations-shared/JSONSchemaUtils\"","webpack:///./src/common/components/IconPlaceholder.tsx","webpack:///./src/common/hooks/getSorting.ts","webpack:///./src/common/hooks/getPagination.ts","webpack:///external \"lodash\"","webpack:///external \"@splunk/visualizations-shared/numberUtils\"","webpack:///./src/common/interfaces/VizCategory.ts","webpack:///./src/common/withDashboardViz.tsx","webpack:///external \"@splunk/themes/getSettingsFromThemedProps\"","webpack:///external \"@splunk/visualization-encoding/Options\"","webpack:///external \"@splunk/visualizations-shared/SanitizeProps\"","webpack:///external \"@splunk/moment\"","webpack:///./src/common/SplunkVisualization.tsx","webpack:///./src/common/interfaces/VizActionHandler.ts","webpack:///./src/common/interfaces/DataSource.ts","webpack:///external \"styled-components\"","webpack:///./src/common/hooks/useDeepMemo.ts","webpack:///./src/common/components/MissingPropsMessage.tsx","webpack:///./src/common/hocs/withEditModeCover.tsx","webpack:///./src/common/hocs/withPlaceholder.tsx","webpack:///external \"@splunk/visualization-icons/placeholders\"","webpack:///external \"@splunk/visualizations-shared/colorConstants\"","webpack:///./src/SingleValueRadial/SingleValueRadial.tsx","webpack:///./src/SingleValueRadial/config.ts","webpack:///./src/common/editorConfig/RadialBackgroundColor.ts","webpack:///external \"@splunk/visualization-icons\"","webpack:///./src/SingleValueRadial/PureSingleValueRadial/RadialGraph.jsx","webpack:///./src/SingleValueRadial/PureSingleValueRadial/utils/displayUtils.js","webpack:///./src/SingleValueRadial/PureSingleValueRadial/RadialLayout.jsx","webpack:///./src/SingleValueRadial/PureSingleValueRadial/SingleValueRadial.jsx","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///external \"@splunk/visualizations-shared/domUtils\"","webpack:///external \"@splunk/visualization-color-palettes/editors/PresetPalettes\"","webpack:///./src/common/interfaces/VizBehavior.ts","webpack:///./src/common/components/VizStyleWrapper.jsx","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///./src/SingleValueBasic/TrendValue.jsx","webpack:///./src/SingleValueBasic/MajorValue.jsx","webpack:///./src/SingleValueBasic/SingleValueBasic.jsx","webpack:///external \"lodash/pick\"","webpack:///external \"lodash/isEmpty\"","webpack:///external \"@splunk/react-icons/ArrowUp\"","webpack:///external \"@splunk/react-icons/ArrowDown\"","webpack:///external \"cssesc\"","webpack:///./src/common/editorConfig/StaticBackgroundColorEditor.js","webpack:///external \"@babel/runtime/helpers/toConsumableArray\"","webpack:///./src/common/editorConfig/DynamicMajorColorEditor.js","webpack:///./src/common/editorConfig/DynamicTrendColorEditor.js","webpack:///external \"@splunk/themes/variables\"","webpack:///./src/common/editorConfig/DynamicBackgroundColorEditor.js","webpack:///./src/common/editorConfig/StaticMajorColorEditor.js","webpack:///./src/common/editorConfig/StaticTrendColorEditor.js"],"names":["DEFAULT_FONT","DEFAULT_FONT_FAMILY","SVR_PADDING","top","bottom","left","right","shouldShowTrend","trendDisplay","isLoadingOrNoColumns","data","get","noColumns","loading","getFormattedColor","formatColor","hasBackground","backgroundColor","isIdenticalColor","colorA","colorB","getDefaultColorWithBg","defaultFontColor","defaultBlockFontColor","getMajorColor","majorColor","getTrendColor","trendColor","trendValue","majorValue","customizedBgColor","defaultColors","Number","defaultBackgroundColor","isInvalidTrend","parseFloat","computeColors","props","backgroundEnabled","underLabelColor","computeText","value","numberPrecision","shouldUseThousandSeparators","shouldAbbreviateTrendValue","text","formatNumber","useThousandSeparators","useTrendUnits","getMajorText","getTrendText","compute","isNumerial","showPercent","diff","Math","val","computeFontSize","width","height","fontFamily","fontWeight","widthInDefaultFont","computeTextSize","fontSize","parseInt","getMajorFontSize","unit","majorText","spaceRatio","majorTextCalc","getTrendFontSize","trendText","trendFontSize","getUnderLabelHeight","getUnderLabel","underLabel","getMajorAndTrend","majorFontSize","majorTextSpaceRatio","textContentWidth","textContentHeight","majorTextFontSize","trendTextFontSize","updateVizInSmallSpace","toRemoveList","removeIndex","newProps","newMajorAndTrend","newTextSize","toRemove","truncateValue","updatedProps","computeSingleValueContent","contentWidth","contentHeight","containerWidth","containerHeight","majorValueTitle","smallVizProps","minimallyTruncateStringToWidth","textWidth","modifiedText","ellipsesLength","computeSingleValueRadialContent","smallViz","getGraphColors","customColorFormatter","adjustRGB","rgb","changeColor","hex","color","r","g","b","newR","newG","newB","ratio","lighten","darken","handleValueClickCallback","payload","name","majorValueField","onValueClick","RadialGraph","progress","strokeWidth","RADIAL_BACKGROUND_COLOR","progressColor","RADIAL_STROKE_COLOR","semicircleRadius","circumference","bgCircleOffset","progress50","progressWidth","strokeDashoffset","T","number","VALID_TREND_POSITIONS","MAJOR_FONT_THRESHOLD","TREND_FONT_THRESHOLD","DEFAULT_RADIAL_STROKE_WIDTH","SMALL_RADIAL_STROKE_WIDTH","getRadialColors","background","stroke","getRadialGraphDimensions","radius","getRadialHelperDimensions","innerArcRadius","halfContentWidth","helperArcRadius","getValueContentSize","graphSize","radialStrokeWidth","diameter","getRadialStrokeWidth","graphHeight","isValidPosition","showTrendPositionStandard","showTrendIndicator","position","showTrendPositionBelow","showTrendPositionOutside","getRadialProgress","TextContainer","styled","lineHeight","marginLeft","margin","GraphContainer","UnderLabelContainer","UnderLabelText","RadialContent","unitPosition","showRadialGraph","radialBackgroundColor","radialStrokeColor","graphWidth","underLabelStrokeColor","fillVacantSpace","underLabelHeight","underLabelWidth","basicSingleValues","radialGraph","underLabelComponent","SingleValueBasic","trendPosition","string","Container","toDimension","pick","SingleValueRadial","style","maxValue","enterprise","dark","variables","light","prisma","radialColors","handleValueClick","useCallback","renderVisualization","isEmpty","trendIndicatorPosition","func","withTheme","VizStyleWrapper","dataTestKey","Column","Text","SingleValueContent","TrendIndicator","Row","validUnitPositions","title","sanitizedUnit","cssesc","wrap","quotes","sanitizedUnitPosition","handleKeyDown","e","underLabelFontSize","trendIndicatorEnabled","SingleValueTrendValue","StaticBackgroundColorEditor","label","_","option","editor","showEditor","options","isDynamicOption","getDynamicMajorColorEditor","defaultContext","defaultPalettesConfig","context","editorProps","labelPosition","flyoutTitle","formatters","defaults","majorColorConfig","majorColorMatchConfig","dataSelectors","getDynamicTrendColorEditor","trendColorConfig","getDynamicBackgroundColorEditor","StaticMajorColorEditor","StaticTrendColorEditor","isDisabled"],"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;Q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G3BC,QAAM,EAHqB;AAI3BC,YAAU,EAAE;AAAA,QAAGC,OAAH;AAAA,WAAiB,CAACC,iGAAe,CAACD,OAAO,CAAzC,UAAiC,CAAjC;AAAA;AAJe,CAA/B;AAOA,uF;;;;;;;;ACVA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA,IAAMkB,sBAAsB,GAAG;AAC3BvB,OAAK,EAAEC,+DAAC,CADmB,cACnB,CADmB;AAE3BC,QAAM,EAFqB;AAG3BC,QAAM,EAHqB;AAI3BC,YAAU,EAAE;AAAA,QAAGC,OAAH;AAAA,WAAiB,CAACC,iGAAe,CAACD,OAAO,CAAzC,UAAiC,CAAjC;AAJe;AAK3BmB,YAAU,EAAE;AAAA,QAAGnB,OAAH;AAAA,WAAiBA,OAAO,CAAPA,iBAAjB;AAAA;AALe,CAA/B;AAQA,uF","file":"SingleValueRadial.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 453);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","module.exports = require(\"@splunk/visualizations-shared/Message\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@splunk/visualizations-shared/colorUtils\");","import * as React from 'react';\nimport styled from 'styled-components';\nimport SizeAwareWrapper from '@splunk/visualizations-shared/SizeAwareWrapper';\nimport { toPx } from '@splunk/visualizations-shared/style';\nimport { isColor } from '@splunk/visualizations-shared/colorUtils';\n\n// Global provided via webpack\n// eslint-disable-next-line no-underscore-dangle\ndeclare const __VISION_VERSION__: string;\n\ninterface ItemProps {\n backgroundColor?: string;\n width?: string | number;\n}\n\nconst Item = styled.div.attrs<ItemProps>(({ width }) => ({\n style: {\n width: toPx(width),\n },\n}))<ItemProps>`\n position: relative;\n background-color: ${(props): string =>\n (isColor(props.backgroundColor) && props.backgroundColor) || props.theme.defaultBackgroundColor}};\n`;\n\ninterface FixSizeItemProps {\n backgroundColor?: string;\n height?: string | number;\n width?: string | number;\n}\n\n// Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291\nconst FixSizeItem = styled.div.attrs<FixSizeItemProps>(({ width, height }): {\n style: { width?: string; height?: string };\n} => ({\n style: {\n ...(width && { width: toPx(width) }),\n ...(height && { height: toPx(height) }),\n },\n}))<FixSizeItemProps>`\n position: relative;\n flex-direction: column;\n flex: 1;\n display: flex;\n background-color: ${(props): string =>\n (isColor(props.backgroundColor) && props.backgroundColor) || props.theme.defaultBackgroundColor}};\n`;\n\nconst ItemContent = styled.div`\n position: relative;\n min-height: 100px;\n width: 100%;\n`;\n\nconst FixSizeItemContent = styled.div`\n min-height: 0px;\n flex: 1;\n position: relative;\n box-sizing: border-box;\n`;\n\ninterface HeightAndWidthProps {\n width?: string | number;\n height?: string | number;\n backgroundColor?: string;\n}\n\nconst withFixedSizeContainer = <P extends HeightAndWidthProps>(\n Viz: React.ComponentType<P>\n): React.ComponentType<P> => {\n const FixedSizeContainer = (props: P): React.ReactElement => {\n const { width, height, backgroundColor } = props;\n\n if (!height) {\n return (\n <Item data-test=\"item\" width={width} backgroundColor={backgroundColor}>\n <ItemContent>\n <Viz {...props} />\n </ItemContent>\n </Item>\n );\n }\n return (\n <FixSizeItem\n data-test=\"fix-size-item\"\n data-splunk-visualization-version={__VISION_VERSION__}\n width={width}\n height={height}\n backgroundColor={backgroundColor}\n >\n <FixSizeItemContent>\n <SizeAwareWrapper>\n {({ width: newWidth, height: newHeight }): React.ReactElement => (\n <Viz {...props} width={newWidth} height={newHeight} />\n )}\n </SizeAwareWrapper>\n </FixSizeItemContent>\n </FixSizeItem>\n );\n };\n FixedSizeContainer.displayName = 'withFixedSizeContainer';\n return FixedSizeContainer;\n};\n\nexport default withFixedSizeContainer;\n","import { DashboardVizProps } from '../interfaces/DashboardVizProps';\n\nexport type DashboardVizType = React.ComponentType<DashboardVizProps>;\n\n/**\n * @method extendStaticWrapperProps\n * @param {Object} props\n * @param {DashboardVizType} props.Wrapper\n * @param {DashboardVizType} props.Visualization\n */\nexport const extendStaticWrapperProps = ({\n Wrapper,\n Visualization,\n}: {\n [key: string]: DashboardVizType;\n}): void => {\n const extendProperties = ['propTypes', 'defaultProps', 'config'];\n extendProperties.forEach((prop: string): void => {\n if (Visualization[prop]) {\n // eslint-disable-next-line no-param-reassign\n Wrapper[prop] = Visualization[prop];\n }\n });\n};\n","module.exports = require(\"@splunk/visualizations-shared/style\");","module.exports = require(\"@splunk/visualizations-shared/schemaUtils\");","import { get, range } from 'lodash';\nimport { DYNAMIC_OPTIONS_DSL_PATTERN } from '@splunk/visualizations-shared/schemaUtils';\nimport type { JSONSchema7Definition } from 'json-schema';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\nimport { VizBehavior } from '../interfaces/VizBehavior';\nimport { VizConfig } from '../interfaces/VizConfig';\nimport { OptionsSchema } from '../interfaces/OptionsSchema';\nimport { EditorLayoutConfig, EditorConfig } from '../interfaces/Editor';\n\nexport interface PresetEntry {\n name: string;\n value: any;\n label: string;\n}\n\nconst dynamicOptionsDSLType = {\n type: 'string',\n pattern: DYNAMIC_OPTIONS_DSL_PATTERN,\n} as const;\n\n/**\n * Helper function to extend an options schema with dynamic options DSL\n * @param optionsSchema a visualization's options schema\n * @returns an updated options schema that additionally allows strings starting with > for each option\n */\nfunction enhanceOptionsSchemaWithDynamicOptions(\n optionsSchema: OptionsSchema | JSONSchema7Definition\n): OptionsSchema {\n const enhancedOptionsSchema: OptionsSchema = {};\n Object.keys(optionsSchema).forEach((key): void => {\n const {\n // The next a few are schema annotations, we should leave them as is.\n // Note: in reality we don't use `readOnly`, `writeOnly` or `examples`, but they are listed here for completeness.\n // Ref: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01\n title,\n description,\n readOnly,\n writeOnly,\n examples,\n default: defaultValue,\n // The next a few need special care\n type,\n properties,\n patternProperties,\n // The rest should be handled together\n ...remainingSchemaEntry\n } = optionsSchema[key];\n\n const annotations = {\n ...(title !== undefined && { title }),\n ...(description !== undefined && { description }),\n ...(readOnly !== undefined && { readOnly }),\n ...(writeOnly !== undefined && { writeOnly }),\n ...(examples !== undefined && { examples }),\n ...(defaultValue !== undefined && { default: defaultValue }),\n };\n\n if (type === 'object') {\n enhancedOptionsSchema[key] = {\n ...remainingSchemaEntry,\n ...annotations,\n type,\n ...(properties && { properties: enhanceOptionsSchemaWithDynamicOptions(properties) }),\n };\n if (patternProperties) {\n let enhancedPatternProperties = {};\n Object.keys(patternProperties).forEach((opt): void => {\n enhancedPatternProperties = {\n ...enhancedPatternProperties,\n ...enhanceOptionsSchemaWithDynamicOptions({ [opt]: patternProperties[opt] }),\n };\n });\n enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;\n }\n } else {\n enhancedOptionsSchema[key] = {\n ...annotations,\n anyOf: [\n // we can't assume `type` is always there because there are `enum` and `const`.\n { ...(type !== undefined && { type }), ...remainingSchemaEntry },\n dynamicOptionsDSLType,\n ],\n };\n }\n });\n return enhancedOptionsSchema;\n}\n\n/**\n * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block\n * this function also collapse all editor panels\n * @param vizConfig a Visualization Config\n * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports\n * and containing `open: false` for all editor panels in editorConfig\n */\nfunction enhanceConfig(vizConfig: VizConfig): VizConfig {\n const enhancedConfig: VizConfig = { ...vizConfig };\n if (vizConfig.supports.indexOf(VizBehavior.DYNAMIC_OPTIONS) !== -1) {\n enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);\n }\n enhancedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: config.open || false };\n }\n );\n return enhancedConfig;\n}\n\n/**\n * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig\n * Created for editor unit tests\n * @param vizConfig a Visualization Config\n * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig\n */\nfunction uncollapseEditorConfig(vizConfig: VizConfig): VizConfig {\n const editorPanelUncollapsedConfig: VizConfig = { ...vizConfig };\n editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: true };\n }\n );\n return editorPanelUncollapsedConfig;\n}\n\nfunction isDynamicOption(option?: string): boolean {\n return (option && typeof option === 'string' && option.trim().startsWith('>')) || false;\n}\n\n// private helpers to improve readability of getInitialPreset\n// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset\n\n/**\n * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset\n * if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset\n * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext\n * the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up\n *\n * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values\n */\nfunction hasCompatibleContexts(\n vizContext: { [configKey: string]: any },\n presetContext: { [configKey: string]: any }\n): boolean {\n const presetContextKeys = Object.keys(presetContext);\n return presetContextKeys.every(\n (contextKey): boolean =>\n (presetContext[contextKey] === undefined && vizContext[contextKey] === undefined) ||\n (presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined)\n );\n}\n\n/**\n * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions\n */\nfunction hasCompatibleOptions(\n vizOptions: { [configKey: string]: any },\n presetOptions: { [configKey: string]: any }\n): boolean {\n const presetOptionKeys = Object.keys(presetOptions);\n return presetOptionKeys.every(\n (optionKey): boolean =>\n isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey])\n );\n}\n\n/**\n * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions\n * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure\n *\n * @param {Object} vizContext - the current vizContext definition\n * @param {Object} vizOptions - the current vizOptions definition\n * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset\n */\nfunction getInitialPreset(\n vizContext: { [configKey: string]: any },\n vizOptions: { [configKey: string]: any },\n presets: PresetEntry[]\n): PresetEntry | null {\n return presets.find((preset): boolean => {\n const presetContext = get(preset, ['value', 'context'], {});\n const presetOptions = get(preset, ['value', 'options'], {});\n const presetContextKeys = Object.keys(presetContext);\n const presetOptionKeys = Object.keys(presetOptions);\n\n // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)\n // if not, then the preset is invalid in config.ts\n if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;\n\n return (\n hasCompatibleContexts(vizContext, presetContext) &&\n hasCompatibleOptions(vizOptions, presetOptions)\n );\n });\n}\n\ninterface PrecisionOption {\n label: string;\n value: number;\n}\n\n/**\n * generates number precision values for a Select editor\n *\n * @param {Number} numPrecisionValues - number of integer precision values to generate\n * @returns {{ label: string; value; string }[]} array of { label, value } tuples\n */\nfunction generatePrecisionValues(numPrecisionValues: number): PrecisionOption[] {\n return range(0, numPrecisionValues + 1).map(\n (i): PrecisionOption => ({\n label: `${i} (0${i > 0 ? '.' : ''}${'0'.repeat(i)})`, // e.g. 0.000 for numPrecisionValues = 3\n value: i,\n })\n );\n}\n\nexport {\n enhanceConfig,\n enhanceOptionsSchemaWithDynamicOptions,\n getInitialPreset,\n generatePrecisionValues,\n uncollapseEditorConfig,\n isDynamicOption,\n};\n\n/**\n * insert layout in layout array, return a new layout array instead of updating the original\n *\n * @param {EditorLayoutConfig[][]} layout - editor layout\n * @param {Number} index - the index to insert layout item(s)\n * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert\n * @returns {EditorLayoutConfig[][]} new editor layout with insertion\n */\nexport const insertLayout = (\n layout: EditorLayoutConfig[][],\n index: number,\n ...layoutItems: EditorLayoutConfig[][]\n): EditorLayoutConfig[][] => [\n // copy part of the array before the specified index\n ...layout.slice(0, index),\n // inserted layout item\n ...layoutItems,\n // copy part of the array after the specified index\n ...layout.slice(index),\n];\n","module.exports = require(\"@splunk/visualizations-shared/configUtils\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualizations-shared/SizeAwareWrapper\");","module.exports = require(\"@splunk/themes/pick\");","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 = backgroundEnabled ? majorColor : defaultColors.defaultFontColor;\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 = (ev, majorValue, majorValueField, trendValue, onValueClick) => {\n const payload = {\n trendValue,\n value: majorValue,\n name: majorValueField,\n };\n\n return onValueClick({ ...ev, payload });\n};\n","module.exports = require(\"@splunk/visualization-context/TimezoneContext\");","module.exports = require(\"@splunk/visualizations-shared/propUtils\");","module.exports = require(\"@splunk/visualizations-shared/hocUtils\");","module.exports = require(\"@splunk/visualizations-shared/JSONSchemaUtils\");","import * as React from 'react';\nimport * as T from 'prop-types';\nimport { get } from 'lodash';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport Message from '@splunk/visualizations-shared/Message';\nimport { DataSource } from '../interfaces/DataSource';\nimport withFixedSizeContainer from '../hocs/FixedSizeContainer';\n\n/**\n * @method shouldShowIconPlaceholder\n * @param {object} dataSources\n * @param {boolean} loading\n * @returns {boolean}\n */\nexport const shouldShowIconPlaceholder = (\n dataSources: { [name: string]: DataSource },\n loading = false\n): boolean => {\n const data = get(dataSources, 'primary.data.columns[0]', undefined);\n const noData = data === undefined;\n const fields = get(dataSources, 'primary.data.fields[0]', undefined);\n const noFields = fields === undefined;\n return loading || noData || noFields;\n};\n\nexport interface IconPlaceholderProps {\n icon?: React.ComponentClass<any>;\n width?: string | number;\n height?: string | number;\n backgroundColor?: string;\n iconColor?: string;\n}\n\nconst propTypes: Record<keyof IconPlaceholderProps, T.Validator<any>> = {\n icon: T.func,\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n // eslint-disable-next-line react/no-unused-prop-types\n backgroundColor: T.string,\n iconColor: T.string,\n};\n\n/**\n * @method IconPlaceholder\n * @param {IconPlaceholderProps} props\n * @returns {React.ReactElement}\n */\nconst IconPlaceholder = (props: IconPlaceholderProps): React.ReactElement => {\n const { width, height, icon, iconColor } = props;\n if (icon) {\n return React.createElement(icon, {\n style: {\n left: '50%',\n top: '50%',\n color: iconColor,\n opacity: 0.15,\n position: 'absolute',\n transform: 'translate(-50%, -50%)',\n },\n width: '50%',\n height: '50%',\n });\n }\n\n return <Message width={width} height={height} level=\"warning\" message={_('No DataSource Connected')} />;\n};\n\nIconPlaceholder.propTypes = propTypes;\nIconPlaceholder.defaultProps = {\n width: '100%',\n height: 250,\n};\n\nexport default withFixedSizeContainer(IconPlaceholder);\n","import * as T from 'prop-types';\nimport { has, isFunction } from 'lodash';\nimport { DataSourceMeta, SortDirType, validSortDirs } from '../interfaces/DataSource';\n\nexport interface SortParams {\n currentSortKey?: undefined | string;\n currentSortDir?: undefined | SortDirType;\n onSort?: (e: MouseEvent, { sortKey, sortDir }: { sortKey: string; sortDir: SortDirType }) => void;\n}\n\nexport const SortParamsPropTypes = T.shape({\n currentSortKey: T.string,\n currentSortDir: T.oneOf(validSortDirs),\n onSort: T.func,\n});\n\nexport const getSortingParams = ({ requestParams, onRequestParamsChange }: DataSourceMeta): SortParams => {\n let currentSortKey;\n let currentSortDir;\n\n const nextSortDirMap = {\n asc: 'desc',\n desc: 'asc',\n none: 'asc',\n };\n\n let onSort;\n if (isFunction(onRequestParamsChange)) {\n if (requestParams && has(requestParams, 'sort')) {\n currentSortKey = Object.keys(requestParams.sort).shift();\n currentSortDir = requestParams.sort[currentSortKey];\n }\n\n // undid memoization since there is a dependency on requestParams, which is a deeply nested object\n onSort = (e, { sortKey, sortDir }): void => {\n if (typeof sortKey === 'string') {\n const nextSortDir = has(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';\n onRequestParamsChange({\n ...requestParams,\n ...{ offset: 0, sort: { [sortKey]: nextSortDir } },\n });\n } else {\n onRequestParamsChange(requestParams);\n }\n };\n }\n\n return {\n currentSortKey,\n currentSortDir,\n onSort,\n };\n};\n","import * as T from 'prop-types';\nimport { cloneDeep, isFunction, noop } from 'lodash';\nimport { DataSourceMeta, RequestParams } from '../interfaces/DataSource';\n\nexport interface OnChangeParams {\n page?: number;\n count?: number;\n}\nexport interface PaginatorParams {\n isPaging?: boolean;\n current?: number;\n totalPages?: number;\n onChange?: (e: MouseEvent, x: OnChangeParams) => void;\n}\n\nexport const PaginatorParamsPropTypes = T.shape({\n isPaging: T.bool,\n current: T.number,\n totalPages: T.number,\n onChange: T.func,\n});\n\nexport const getPaginationParams = ({\n requestParams,\n meta,\n onRequestParamsChange,\n}: DataSourceMeta): PaginatorParams => {\n const totalCount = (meta && meta.totalCount) || 0;\n const offset = (requestParams && requestParams.offset) || 0;\n const count = requestParams && requestParams.count;\n const totalPages = typeof count === 'number' && count > 0 ? Math.ceil(totalCount / count) : 0;\n const current = typeof count === 'number' && count > 0 ? Math.floor(offset / count) + 1 : 0;\n const isPaging = totalPages > 1 && isFunction(onRequestParamsChange);\n\n const onChangeHandler = (e, { page, count: countArg }: OnChangeParams): void => {\n const newParams: RequestParams = cloneDeep(requestParams);\n\n if (typeof countArg === 'number') {\n newParams.count = countArg;\n newParams.offset = 0;\n }\n\n const pageCount = typeof newParams.count === 'number' ? newParams.count : 10;\n if (typeof page === 'number' && page > 0) {\n newParams.count = pageCount;\n newParams.offset = (page - 1) * pageCount;\n }\n\n onRequestParamsChange(newParams);\n };\n\n return {\n isPaging,\n current,\n totalPages,\n onChange: isFunction(onRequestParamsChange) ? onChangeHandler : noop,\n };\n};\n","module.exports = require(\"lodash\");","module.exports = require(\"@splunk/visualizations-shared/numberUtils\");","export enum VizCategory {\n SINGLE_VALUE = 'Single Value',\n TRENDS = 'Trends',\n COMPARISONS = 'Comparisons',\n TABLE = 'Table',\n GAUGE = 'Gauge',\n DISTRIBUTIONS = 'Distributions',\n CHOROPLETH = 'Choropleth Maps',\n SHAPES = 'Shapes',\n MISC = 'misc',\n FLOW = 'Flow',\n CORRELATION = 'Correlation',\n SPATIAL = 'Spatial',\n}\n","import * as React from 'react';\nimport { camelCase, has, get, defaultsDeep } from 'lodash';\nimport getSettingsFromThemedProps from '@splunk/themes/getSettingsFromThemedProps';\nimport { Options as Opts } from '@splunk/visualization-encoding/Options';\nimport { withSanitizedProps } from '@splunk/visualizations-shared/SanitizeProps';\nimport TimezoneContext from '@splunk/visualization-context/TimezoneContext';\nimport moment from '@splunk/moment';\n\nimport { withTheme } from 'styled-components';\nimport { deepMergeWithArrayPrimitiveOverrides } from '@splunk/visualizations-shared/hocUtils';\nimport { pickFieldFromJSONSchema } from '@splunk/visualizations-shared/JSONSchemaUtils';\nimport SplunkVisualization from './SplunkVisualization';\nimport type { DashboardVizProps, DataSource, VizConfig, VizProps } from './interfaces';\nimport { VizBehavior } from './interfaces/VizBehavior';\nimport { getSortingParams } from './hooks/getSorting';\nimport { getPaginationParams } from './hooks/getPagination';\nimport { useDeepMemo } from './hooks/useDeepMemo';\nimport MissingPropsMessage, { missingKeys } from './components/MissingPropsMessage';\nimport withEditModeCover from './hocs/withEditModeCover';\nimport withPlaceholder from './hocs/withPlaceholder';\nimport { ChartingProps } from './Charting';\n\ntype HOC = (props: DashboardVizProps) => React.ReactElement<DashboardVizProps>;\nexport interface DashboardVizOpts {\n ReactViz: React.ComponentType<ChartingProps | VizProps>; // we will wrap this in DashboardViz (see const DashboardViz = ...)\n vizConfig: VizConfig;\n computeVizProps?: (props) => any;\n disableEditModeCover?: boolean;\n useIconPlaceholder?: (\n dataSources: { [name: string]: DataSource },\n loading: boolean,\n options: Record<string, unknown>\n ) => boolean;\n}\n\n/**\n * hoc that wraps a pure react visualization in a Dashboard visualization\n * @param {DashboardVizOpts} opts\n * @returns {HOC}\n */\nconst withDashboardViz = (opts: DashboardVizOpts): HOC => {\n const {\n ReactViz,\n vizConfig,\n computeVizProps = () => {},\n disableEditModeCover,\n useIconPlaceholder,\n } = opts;\n\n // sanitizing props before sending them to reactviz.\n const SanitizedReactViz = withSanitizedProps(ReactViz);\n const defaultOptions = pickFieldFromJSONSchema(vizConfig.optionsSchema, 'default');\n\n const DashboardViz = (props: DashboardVizProps): React.ReactElement<DashboardVizProps> => {\n const {\n mode,\n hasEventHandlers,\n dataSources, // type of { [key: string]: DataSource }\n options,\n context = {},\n width,\n height,\n onComputedProps,\n onEventTrigger,\n theme,\n onRequestParamsChange,\n } = props;\n const { serializedTimezone } = React.useContext(TimezoneContext);\n if (serializedTimezone) {\n /*\n @splunk/moment currently does not allow us to customize the timezone on a per visualization basis.\n This ensures that if a timezone was provided via TimezoneContext @splunk/moment time formatting\n will use it.\n\n @TODO(pwied):\n - remove when we moved away from @splunk/moment\n - provide timezone context to dynamic option evaluation phase\n */\n if (!moment.getDefaultSplunkTimezone()) {\n moment.setDefaultSplunkTimezone(serializedTimezone);\n }\n }\n const themeFunc = themeVar => vizConfig.themes[themeVar]?.(props);\n const bgColorFromTheme = themeFunc('defaultBackgroundColor');\n const {\n family: currentThemeFamily,\n colorScheme: currentThemeColorScheme,\n density: currentThemeDensity,\n } = getSettingsFromThemedProps({ theme });\n\n let evaluatedOptions: Opts = {}; // evaluatedOptions need to be initialized as an empty object\n evaluatedOptions = useDeepMemo((): Record<string, unknown> => {\n try {\n return Opts.evaluate(\n {\n context: defaultsDeep({}, context, vizConfig.defaultContext),\n options: deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions),\n },\n dataSources,\n themeFunc\n );\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(`unexpected error evaluating options: + ${e.message}`);\n return {};\n }\n }, [\n currentThemeFamily,\n currentThemeColorScheme,\n currentThemeDensity,\n options,\n context,\n dataSources,\n serializedTimezone,\n ]);\n\n // useEffect hook needs to be initialized before any early returns\n // this is in accordance with the order of hook calls being the same on each render https://reactjs.org/docs/hooks-rules.html#explanation\n React.useEffect((): void => {\n onComputedProps(evaluatedOptions);\n });\n\n // present warning message if any required props are missing\n const { requiredProps = [], supports } = vizConfig;\n const missing = missingKeys(requiredProps, evaluatedOptions);\n if (missing.length > 0 && supports.includes(VizBehavior.PLACEHOLDER)) {\n return (\n <MissingPropsMessage\n data-test=\"missing-props-message\"\n width={width}\n height={height}\n missingProps={missing}\n backgroundColor={bgColorFromTheme}\n />\n );\n }\n\n // events\n const eventCallbackProps = {};\n if (hasEventHandlers && mode === 'view' && vizConfig.supports.indexOf(VizBehavior.EVENTS) > -1) {\n const supportedEvents = vizConfig.events;\n Object.keys(supportedEvents).forEach((eventName): void => {\n const eventCallbackPropName = camelCase(`on.${eventName}`);\n eventCallbackProps[eventCallbackPropName] = null;\n // todo: refactor single value and single value icon to send payload from viz\n // then remove these lines\n const { payloadKeys } = supportedEvents[eventName];\n let payload = {};\n if (Array.isArray(payloadKeys) && payloadKeys.length) {\n payloadKeys.forEach(p => {\n payload[p] = evaluatedOptions[p];\n });\n }\n\n eventCallbackProps[eventCallbackPropName] = (ev): Record<string, unknown> => {\n if (ev && ev.payload) {\n payload = ev.payload;\n }\n\n return onEventTrigger({ originalEvent: ev, payload, type: eventName });\n };\n });\n }\n // compute pure viz props which are not from options\n const computedVizProps = computeVizProps({\n ...props,\n ...evaluatedOptions,\n ...eventCallbackProps,\n themeFunc,\n });\n\n /**\n * PAGE_AND_SORT behavior\n *\n * Some visualizations, like table, requires metadata about the datasource,\n * like total number of results, current count, offset, and sort, for rendering\n * paginator and sorting direction. In this approach, the visualization\n * allow users to set 'paginateDataSourceKey' to select which datasource\n * should the visualization extract the metadata from. It defaults to 'primary' datasource.\n * The visualization config should set the PAGE_AND_SORT behavior to receive\n * 'requestParams', 'meta' and onRequestParams callback as props.\n *\n * In future, we could automatically detect which all datasources are being used\n * and bind those magically to pagination/sorting behavior.\n */\n let dataSourceMetadata = {};\n const OptionKey = 'paginateDataSourceKey';\n const paginateDataSourceKey =\n (has(evaluatedOptions, OptionKey) && evaluatedOptions[OptionKey]) || 'primary';\n if (\n vizConfig.supports.indexOf(VizBehavior.PAGE_AND_SORT) > -1 &&\n has(dataSources, paginateDataSourceKey)\n ) {\n const requestParams = get(dataSources, [paginateDataSourceKey, 'requestParams'], {});\n const meta = get(dataSources, [paginateDataSourceKey, 'meta'], {});\n const handleRequestParamsChange = (payload: Record<string, unknown>): void =>\n onRequestParamsChange(paginateDataSourceKey, payload);\n\n const sortParams = getSortingParams({\n requestParams,\n meta,\n onRequestParamsChange: handleRequestParamsChange,\n });\n\n const paginatorParams = getPaginationParams({\n requestParams,\n meta,\n onRequestParamsChange: handleRequestParamsChange,\n });\n\n dataSourceMetadata = {\n sortParams,\n paginatorParams,\n };\n }\n\n return (\n <SanitizedReactViz\n mode={mode}\n width={width}\n height={height}\n {...evaluatedOptions}\n {...computedVizProps}\n {...eventCallbackProps}\n {...dataSourceMetadata}\n />\n );\n };\n\n DashboardViz.propTypes = {\n ...SplunkVisualization.propTypes,\n ...ReactViz.propTypes,\n };\n\n DashboardViz.defaultProps = {\n ...SplunkVisualization.defaultProps,\n ...ReactViz.defaultProps,\n // using withTheme requires component to receive theme prop. In case the consumer did not provide ThemeProvider, a default empty object will prevent warnings.\n theme: {},\n };\n // attach viz config\n DashboardViz.config = vizConfig;\n\n // @ts-ignore: TODO fix sc upgrade TS issues\n return withTheme(\n withPlaceholder(withEditModeCover(DashboardViz, disableEditModeCover), useIconPlaceholder)\n );\n};\n\nexport default withDashboardViz;\n","module.exports = require(\"@splunk/themes/getSettingsFromThemedProps\");","module.exports = require(\"@splunk/visualization-encoding/Options\");","module.exports = require(\"@splunk/visualizations-shared/SanitizeProps\");","module.exports = require(\"@splunk/moment\");","/* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */\nimport * as T from 'prop-types';\nimport { noop } from 'lodash';\nimport { DashboardVizProps } from './interfaces/DashboardVizProps';\nimport { DefaultVizActionHandler } from './interfaces/VizActionHandler';\n\n// this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations\nexport const INITIAL_WIDTH = 250;\nexport const INITIAL_HEIGHT = 250;\n\n/**\n * A Splunk visualization\n */\nclass SplunkVisualization {\n static propTypes: Record<keyof DashboardVizProps, T.Validator<any>> = {\n /**\n * display mode\n */\n mode: T.oneOf(['view', 'edit', 'export']).isRequired,\n /**\n * width in pixel or string, defaults to 100%\n */\n width: T.oneOfType([T.string, T.number]).isRequired,\n /**\n * height in pixel or string\n */\n height: T.oneOfType([T.string, T.number]).isRequired,\n /**\n * visualization context used for dynamic option evaluation\n */\n context: T.object,\n /**\n * visualization formatting options\n */\n options: T.object,\n /**\n * A callback to update formatting options\n */\n onOptionsChange: T.func,\n /**\n * datasource state which include data and request params, object key indicate the datasource type.\n */\n dataSources: T.objectOf(\n T.shape({\n /**\n * current request params\n */\n requestParams: T.object,\n /**\n * current dataset\n */\n data: T.shape({\n fields: T.array,\n columns: T.array,\n }),\n /**\n * error\n */\n error: T.shape({\n level: T.string,\n message: T.string,\n }),\n /**\n * meta data that came with the dataset\n */\n meta: T.object,\n })\n ),\n /**\n * A callback to trigger event\n */\n onEventTrigger: T.func,\n /**\n * Inform viz if there are handlers listening to events\n */\n hasEventHandlers: T.bool,\n /**\n * A callback to communicate computed props to a consumer\n */\n onComputedProps: T.func,\n /**\n * A callback to obtain visualization api\n */\n vizActionHandlerRef: T.func,\n\n loading: T.bool,\n theme: T.object,\n /**\n * A callback to request new data with updated request params\n */\n onRequestParamsChange: T.func,\n };\n\n /**\n *\n */\n static defaultProps: DashboardVizProps = {\n // BaseVisualization in dashboard-visualizations uses 100% for width but 250 for height\n width: '100%',\n height: INITIAL_HEIGHT,\n dataSources: {},\n onEventTrigger: (): Record<string, unknown> => ({}),\n mode: 'view',\n hasEventHandlers: false,\n options: {},\n context: {},\n onOptionsChange: (): Record<string, unknown> => ({}),\n vizActionHandlerRef: (): DefaultVizActionHandler => new DefaultVizActionHandler(),\n onComputedProps: (): Record<string, unknown> => ({}),\n loading: false,\n onRequestParamsChange: noop,\n };\n}\n\nexport default SplunkVisualization;\n","/* eslint-disable class-methods-use-this */\nexport interface VizActionHandler {\n /**\n * put focus on the visualization\n */\n focus(): void;\n\n /**\n * compute snapshot of this visualization\n */\n snapshot(): Record<string, unknown>; // (This is for pdf export)\n}\n\nexport class DefaultVizActionHandler {\n focus(): void {\n // noop\n }\n\n snapshot(): Record<string, unknown> {\n return null; // noop\n }\n}\n","/**\n * represents the data in a raw columnar format, resulting from a splunk\n * query request.\n */\nexport interface FieldEntry {\n name: string;\n}\n\nexport interface JsonColumnData {\n fields: FieldEntry[] | string[];\n columns: string[][];\n}\nexport interface Meta {\n totalCount: number;\n}\n\nexport const validSortDirs = ['asc', 'desc', 'none'] as const;\nexport type SortDirType = typeof validSortDirs[number];\n\nexport interface RequestParams {\n count?: number;\n offset?: number;\n sort?: {\n [sortKey: string]: SortDirType;\n };\n}\n\nexport interface DataSource {\n requestParams: Partial<RequestParams>;\n onRequestParamsChange?: (p: Record<string, unknown>) => void;\n data: JsonColumnData;\n error?: { level: string; message: string };\n meta: Partial<Meta>;\n}\n\nexport interface DataSourceMeta {\n requestParams: Partial<RequestParams>;\n meta: Partial<Meta>;\n onRequestParamsChange: (payload: RequestParams) => void;\n}\n","module.exports = require(\"styled-components\");","import { useRef } from 'react';\nimport { isEqual } from 'lodash';\n\n/**\n * This hook evaluates and stores the result of a passed function and only\n * re-evaluates the function when passed dependencies change.\n *\n * It is different from the internal React useMemo in the following aspects:\n * - it only stores the last evaluated result\n * - it uses a deep equality check to determine if dependencies have changed\n *\n * Inspired by apollo-client's useDeepMemo\n *\n * @param fn the function to be executed and\n * @param dependencies an array of dependencies\n */\nexport const useDeepMemo = <FnReturnType, DepType>(\n fn: () => FnReturnType,\n dependencies: DepType\n): FnReturnType => {\n const ref = useRef<{ dependencies: DepType; value: FnReturnType }>();\n if (!ref.current || !isEqual(dependencies, ref.current.dependencies)) {\n ref.current = {\n dependencies,\n value: fn(),\n };\n }\n return ref.current.value;\n};\n","import * as React from 'react';\nimport * as T from 'prop-types';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport Message from '@splunk/visualizations-shared/Message';\nimport withFixedSizeContainer from '../hocs/FixedSizeContainer';\n\n/**\n * @method isMissing\n * @param {any} v\n * @returns {boolean} true if the input value === null or undefined\n */\nexport const isMissing = (v): boolean => {\n return v === null || v === undefined;\n};\n\n/**\n * @method misskingKeys\n * @param {string[]} keys\n * @param {object} target\n * @returns {string[]} the keys of missing required props\n */\nexport const missingKeys = (keys: string[], target: Record<string, unknown>): string[] =>\n keys.filter(k => isMissing(target[k]));\n\nexport interface MissingPropsProps {\n width?: string | number;\n height?: string | number;\n missingProps: string[];\n backgroundColor?: string;\n}\n\nconst propTypes: Record<keyof MissingPropsProps, T.Validator<any>> = {\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n // eslint-disable-next-line react/no-unused-prop-types\n backgroundColor: T.string,\n missingProps: T.arrayOf(T.string),\n};\n\n/**\n * @method MissingPropsMessage\n * @param {MissingPropsProps} props\n * @returns {React.ReactElement}\n */\nexport const MissingPropsMessage = (props: MissingPropsProps): React.ReactElement => {\n const { width, height, missingProps } = props;\n return (\n <Message\n data-test=\"message\"\n width={width}\n height={height}\n message={_(`Missing property: ${missingProps.join(', ')}`)}\n />\n );\n};\n\nMissingPropsMessage.propTypes = propTypes;\nMissingPropsMessage.defaultProps = {\n width: '100%',\n height: 250,\n};\nexport default withFixedSizeContainer(MissingPropsMessage);\n","import * as React from 'react';\nimport styled from 'styled-components';\nimport { DashboardVizProps } from '../interfaces/DashboardVizProps';\nimport { ExtendedDashViz } from '../interfaces/ExtendedDashViz';\nimport { extendStaticWrapperProps } from '../utils/hocUtils';\n\n// Global provided via webpack\n// eslint-disable-next-line no-underscore-dangle\ndeclare const __VISION_VERSION__: string;\n\nconst Cover = styled.div`\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n`;\n\nconst Blocker = styled.div.attrs({\n 'data-splunk-visualization-version': __VISION_VERSION__,\n})`\n position: relative;\n width: 100%;\n height: 100%;\n`;\n\n/**\n * HOC that renders a cover layer in edit mode\n * @method withEditModeCover\n * @param {ExtendedDashViz} Visualization\n * @returns {ExtendedDashViz} Wrapper\n */\nconst withEditModeCover = (\n Visualization: ExtendedDashViz,\n disableEditModeCover?: boolean\n): ExtendedDashViz => {\n const Wrapper = (props: DashboardVizProps): React.ReactElement<DashboardVizProps> => {\n const { mode } = props;\n const showEditCover = mode === 'edit' && !disableEditModeCover;\n\n return (\n <Blocker>\n <Visualization {...props} />\n {showEditCover && <Cover data-test=\"edit-mode-cover\" />}\n </Blocker>\n );\n };\n extendStaticWrapperProps({ Wrapper, Visualization });\n return Wrapper as ExtendedDashViz;\n};\n\nexport default withEditModeCover;\n","import * as React from 'react';\nimport { isColor } from '@splunk/visualizations-shared/colorUtils';\nimport variables from '@splunk/themes/variables';\nimport IconPlaceholder, { shouldShowIconPlaceholder } from '../components/IconPlaceholder';\nimport { VizBehavior } from '../interfaces/VizBehavior';\nimport { DashboardVizProps } from '../interfaces/DashboardVizProps';\nimport { DataSource } from '../interfaces/DataSource';\nimport { ExtendedDashViz } from '../interfaces/ExtendedDashViz';\nimport { extendStaticWrapperProps } from '../utils/hocUtils';\n\ntype useIconPlaceholderType = (\n dataSources: { [name: string]: DataSource },\n loading: boolean,\n options: Record<string, unknown>\n) => boolean;\n\nconst withPlaceholder = (\n Visualization: ExtendedDashViz,\n useIconPlaceholder: useIconPlaceholderType = shouldShowIconPlaceholder\n): ExtendedDashViz => {\n const { config } = Visualization;\n const { themes } = config;\n\n const Wrapper = (props: DashboardVizProps): React.ReactElement<DashboardVizProps> => {\n const { dataSources, loading, options, height, width } = props;\n\n const showPlaceholder = useIconPlaceholder(dataSources, loading, options);\n const bgColorFromTheme = isColor(options?.backgroundColor)\n ? options?.backgroundColor\n : themes?.defaultBackgroundColor?.(props);\n\n const icon = config.placeholderIcon ?? config.icon;\n const iconColor = variables.contentColorActive(props);\n\n if (config.supports.includes(VizBehavior.PLACEHOLDER) && showPlaceholder) {\n return (\n <IconPlaceholder\n data-test=\"icon-placeholder\"\n icon={icon}\n width={width}\n height={height}\n backgroundColor={bgColorFromTheme}\n iconColor={iconColor}\n />\n );\n }\n\n return <Visualization {...props} />;\n };\n extendStaticWrapperProps({ Wrapper, Visualization });\n return Wrapper as ExtendedDashViz;\n};\n\nexport default withPlaceholder;\n","module.exports = require(\"@splunk/visualization-icons/placeholders\");","module.exports = require(\"@splunk/visualizations-shared/colorConstants\");","import SingleValueRadial from './PureSingleValueRadial/SingleValueRadial';\nimport withDashboardViz from '../common/withDashboardViz';\nimport vizConfig from './config';\n\nexport const config = vizConfig;\nexport const PureSingleValueRadial = SingleValueRadial;\n// TODO: proper theming support for SVR when we come back to SVR viz\nexport const PureSingleValueRadialThemes = {};\nexport default withDashboardViz({ ReactViz: SingleValueRadial, vizConfig });\n","import { _ } from '@splunk/ui-utils/i18n';\nimport { COLOR_OR_TOKEN_PATTERN_WITH_RGBA, getPattern } from '@splunk/visualizations-shared/schemaUtils';\nimport pick from '@splunk/themes/pick';\nimport variables from '@splunk/themes/variables';\nimport { defaultPalettesConfig } from '@splunk/visualization-color-palettes/editors/PresetPalettes';\nimport { SingleValueRadial as SingleValueRadialIcon } from '@splunk/visualization-icons';\nimport { SingleValueRadial as SingleValueRadialPlaceholderIcon } from '@splunk/visualization-icons/placeholders';\nimport { VizConfig } from '../common/interfaces/VizConfig';\nimport { DataContract } from '../common/interfaces/DataContract';\nimport { VizSize } from '../common/interfaces/VizSize';\nimport { DefaultContext } from '../common/interfaces/DefaultContext';\nimport { OptionsSchema } from '../common/interfaces/OptionsSchema';\nimport { EditorConfig } from '../common/interfaces/Editor';\nimport { VizBehavior } from '../common/interfaces/VizBehavior';\nimport { ThemedDefaults } from '../common/interfaces/ThemedDefaults';\nimport { PresetEntry, enhanceConfig, getInitialPreset } from '../common/utils/configUtils';\nimport { VizCategory } from '../common/interfaces/VizCategory';\nimport { getDynamicMajorColorEditor } from '../common/editorConfig/DynamicMajorColorEditor';\nimport { getDynamicTrendColorEditor } from '../common/editorConfig/DynamicTrendColorEditor';\nimport { getDynamicBackgroundColorEditor } from '../common/editorConfig/DynamicBackgroundColorEditor';\nimport StaticMajorColorEditor from '../common/editorConfig/StaticMajorColorEditor';\nimport StaticTrendColorEditor from '../common/editorConfig/StaticTrendColorEditor';\nimport StaticBackgroundColorEditor from '../common/editorConfig/StaticBackgroundColorEditor';\nimport getRadialBackgroundColorEditor from '../common/editorConfig/RadialBackgroundColor';\n\nconst dataContract: DataContract = {\n requiredDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n optionalDataSources: [],\n initialRequestParams: {\n primary: { offset: 0, count: 10000 },\n },\n};\n\nconst size: VizSize = {\n initialWidth: 250,\n initialHeight: 250,\n};\n\nconst defaultContext: DefaultContext = {\n trendColorConfig: [\n {\n to: 0,\n value: '#9E2520',\n },\n {\n from: 0,\n value: '#1C6B2D',\n },\n ],\n majorColorConfig: [\n { to: 20, value: '#D41F1F' },\n { from: 20, to: 40, value: '#D94E17' },\n { from: 40, to: 60, value: '#CBA700' },\n { from: 60, to: 80, value: '#669922' },\n { from: 80, value: '#118832' },\n ],\n majorColorMatchConfig: [{ match: '', value: '#5C33FF' }],\n};\n\nconst optionsSchema: OptionsSchema = {\n backgroundColor: {\n default: '> themes.defaultBackgroundColor',\n description:\n 'Specify the color for the background. The hex value format should be “#ffffff”. The default for enterprise light is \"#ffffff\". The default for enterprise dark is \"#000000\". The default for prisma dark is \"#0b0c0e\".',\n pattern: COLOR_OR_TOKEN_PATTERN_WITH_RGBA,\n type: 'string',\n },\n majorColor: {\n default: '> themes.defaultFontColor',\n description:\n 'Specify the color for the major value. You may use a dataSource to apply the color. The hex value format should be “#ffffff”. The default for enterprise light is \"#000000\". The default for enterprise dark is \"#ffffff\". The default for prisma dark is \"rgba(255, 255, 255, 0.98)\".',\n pattern: COLOR_OR_TOKEN_PATTERN_WITH_RGBA,\n type: 'string',\n },\n majorValue: {\n default: '> primary | seriesByPrioritizedTypes(\"number\", \"string\", \"time\") | lastPoint()',\n description: 'Specify the dataSource applied to the major value.',\n type: ['string', 'number'],\n },\n majorValueField: {\n default: '> majorValue | getField()',\n description: 'Specify the field that should be mapped to the major value.',\n type: 'string',\n },\n maxValue: {\n default: 100,\n description: 'Specify the value the radial fills up to.',\n type: 'number',\n },\n numberPrecision: {\n default: 0,\n maximum: 20,\n minimum: 0,\n description:\n 'Specify the number of decimal places to display. For example, to display 3 decimal places, use a value of 3. The maximum value is 20.',\n type: 'number',\n },\n radialBackgroundColor: {\n default: '> themes.defaultRadialBackgroundColor',\n description:\n 'Specify the color for the radial background. The hex value format should be “#ffffff”. The default for enterprise light is \"rgba(0, 0, 0, 0.1)\". The default for enterprise dark is \"rgba(255, 255, 255, 0.15)\". The default for prisma dark is \"rgba(255, 255, 255, 0.15)\".',\n pattern: COLOR_OR_TOKEN_PATTERN_WITH_RGBA,\n type: 'string',\n },\n radialStrokeColor: {\n default: '> majorColor',\n description:\n 'Specify the color for the radial. You may use a dataSource to apply the color. The hex value format should be “#ffffff”. The default for enterprise light is \"#000000\". The default for enterprise dark is \"#ffffff\". The default for prisma dark is \"rgba(255, 255, 255, 0.98)\".',\n pattern: COLOR_OR_TOKEN_PATTERN_WITH_RGBA,\n type: 'string',\n },\n shouldAbbreviateTrendValue: {\n default: false,\n description:\n 'Specify whether to abbreviate the trend value to 2 decimal points. A magnitude unit will be displayed.',\n type: 'boolean',\n },\n shouldUseThousandSeparators: {\n default: true,\n description: 'Specify whether numeric values use commas as thousandths separaters.',\n type: 'boolean',\n },\n trendColor: {\n default: '> themes.defaultFontColor',\n description:\n 'Specify the color for the trend value. You may use a dataSource to apply the color. The hex value format should be “#FFFFFF”. The default for enterprise light is \"#000000\". The default for enterprise dark is \"#ffffff\". The default for prisma dark is \"rgba(255, 255, 255, 0.98)\".',\n pattern: COLOR_OR_TOKEN_PATTERN_WITH_RGBA,\n type: 'string',\n },\n trendDisplay: {\n default: 'absolute',\n description: 'Specify how to display the trend value.',\n pattern: getPattern(['percent', 'absolute', 'off']),\n type: 'string',\n },\n trendValue: {\n default: '> primary | seriesByPrioritizedTypes(\"number\", \"string\", \"time\") | delta(-2)', // todo: may need update delta method\n description: 'Specify the dataSource applied to the trend value.',\n type: 'number',\n },\n underLabel: { description: 'Specify the text that appears below the major value.', type: 'string' },\n unit: {\n description: 'Specify text to show next to the major value.',\n type: 'string',\n },\n unitPosition: {\n default: 'after',\n description: 'Specify whether the unit text should appear before or after the major value.',\n pattern: getPattern(['before', 'after']),\n type: 'string',\n },\n};\n\nconst basePresetContext = {\n majorColorEditorConfig: undefined,\n trendColorEditorConfig: undefined,\n backgroundColorEditorConfig: undefined,\n};\n\nconst basePresetOptions = {\n majorColor: undefined,\n trendColor: undefined,\n backgroundColor: undefined,\n};\n\nconst presets: PresetEntry[] = [\n {\n // dummy context variables to allow for resetting of unused context states\n label: _('None'),\n name: 'singleValueRadial.none',\n value: {\n context: { ...basePresetContext },\n options: { ...basePresetOptions },\n },\n },\n {\n label: _('Major Value'),\n name: 'singleValueRadial.majorValue',\n value: {\n context: {\n ...basePresetContext,\n majorColorEditorConfig: defaultContext.majorColorConfig,\n },\n options: {\n ...basePresetOptions,\n majorColor: '> majorValue | rangeValue(majorColorEditorConfig)',\n },\n },\n },\n {\n label: _('Major Value & Trend'),\n name: 'singleValueRadial.majorValueAndTrend',\n value: {\n context: {\n ...basePresetContext,\n majorColorEditorConfig: defaultContext.majorColorConfig,\n trendColorEditorConfig: defaultContext.trendColorConfig,\n },\n options: {\n ...basePresetOptions,\n majorColor: '> majorValue | rangeValue(majorColorEditorConfig)',\n trendColor: '> trendValue | rangeValue(trendColorEditorConfig)',\n },\n },\n },\n {\n label: _('Trend'),\n name: 'singleValueRadial.trend',\n value: {\n context: {\n ...basePresetContext,\n trendColorEditorConfig: defaultContext.trendColorConfig,\n },\n options: {\n ...basePresetOptions,\n trendColor: '> trendValue | rangeValue(trendColorEditorConfig)',\n },\n },\n },\n {\n label: _('Background'),\n name: 'singleValueRadial.background',\n value: {\n context: {\n ...basePresetContext,\n backgroundColorEditorConfig: defaultContext.majorColorConfig,\n },\n options: {\n ...basePresetOptions,\n backgroundColor: '> majorValue | rangeValue(backgroundColorEditorConfig)',\n },\n },\n },\n];\n\nconst themes: ThemedDefaults = {\n defaultFontColor: props =>\n pick({\n enterprise: {\n dark: variables.white(props),\n light: variables.black(props),\n },\n prisma: variables.contentColorActive(props),\n })(props),\n defaultBackgroundColor: props =>\n pick({\n enterprise: {\n dark: variables.black(props),\n light: variables.white(props),\n },\n prisma: variables.backgroundColorSidebar(props),\n })(props),\n defaultRadialBackgroundColor: props =>\n pick({\n enterprise: {\n dark: 'rgba(255, 255, 255, 0.15)',\n light: 'rgba(0, 0, 0, 0.1)',\n },\n prisma: variables.interactiveColorBackgroundDisabled(props),\n })(props),\n};\n\nconst editorConfig: EditorConfig[] = [\n {\n label: _('Major value & trend'),\n layout: [\n [\n {\n label: 'Unit position',\n option: 'unitPosition',\n editor: 'editor.select',\n editorProps: {\n values: [\n { label: _('Before'), value: 'before' },\n { label: _('After'), value: 'after' },\n ],\n },\n },\n {\n label: _('Unit label'),\n option: 'unit',\n editor: 'editor.text',\n },\n ],\n [\n {\n label: _('Precision'),\n option: 'numberPrecision',\n editor: 'editor.number',\n editorProps: {\n min: 0,\n max: 20,\n },\n },\n {\n label: _('Trend display'),\n option: 'trendDisplay',\n editor: 'editor.select',\n editorProps: {\n values: [\n { label: _('Percent'), value: 'percent' },\n { label: _('Absolute'), value: 'absolute' },\n { label: _('Off'), value: 'off' },\n ],\n },\n },\n ],\n ],\n },\n {\n label: _('Coloring'),\n layout: [\n [\n {\n label: 'Dynamic elements',\n key: 'presetSelector',\n editor: 'editor.presetSelector',\n editorProps: {\n presets,\n value: ({ context, options }) => {\n const initialPreset = getInitialPreset(context, options, presets);\n return (initialPreset && initialPreset.label) || null;\n },\n },\n },\n ],\n [\n {\n ...StaticMajorColorEditor,\n editorProps: {\n labelPosition: 'left',\n themes,\n },\n },\n ],\n [getDynamicMajorColorEditor({ defaultContext, defaultPalettesConfig })],\n [\n {\n ...StaticTrendColorEditor,\n editorProps: {\n labelPosition: 'left',\n themes,\n },\n },\n ],\n [getDynamicTrendColorEditor({ defaultContext, defaultPalettesConfig })],\n getRadialBackgroundColorEditor({ labelPosition: 'left', themes }),\n [\n {\n ...StaticBackgroundColorEditor,\n editorProps: {\n labelPosition: 'left',\n themes,\n },\n },\n ],\n [getDynamicBackgroundColorEditor({ defaultContext, defaultPalettesConfig })],\n ],\n },\n];\n/**\n * visualization configuration\n */\nconst config: VizConfig = {\n /**\n * unique viz key\n */\n key: 'splunk.singlevalueradial',\n /**\n * viz name\n */\n name: 'Single Value Radial',\n category: VizCategory.SINGLE_VALUE,\n /**\n * viz icon\n */\n icon: SingleValueRadialIcon,\n placeholderIcon: SingleValueRadialPlaceholderIcon,\n dataContract,\n size,\n defaultContext,\n optionsSchema,\n editorConfig,\n events: {\n 'value.click': {\n description: 'trigger when user clicks major value',\n payloadKeys: ['majorValue', 'trendValue'],\n },\n },\n supports: [VizBehavior.DYNAMIC_OPTIONS, VizBehavior.EVENTS, VizBehavior.PLACEHOLDER],\n themes,\n};\n\nexport default enhanceConfig(config);\n","import { _ } from '@splunk/ui-utils/i18n';\nimport { EditorLayoutConfig } from '../interfaces/Editor';\nimport { ThemedDefaults } from '../interfaces/ThemedDefaults';\n\ninterface RadialBackgroundEditorProps {\n label?: string;\n themes: ThemedDefaults;\n labelPosition?: string;\n}\n\nconst radialBackground: ({\n label,\n themes,\n labelPosition,\n}: RadialBackgroundEditorProps) => EditorLayoutConfig[] = ({ label, themes, labelPosition }) => [\n {\n label: _(label || 'Radial background'),\n option: 'radialBackgroundColor',\n editor: 'editor.color',\n editorProps: {\n labelPosition: labelPosition || 'top',\n themes,\n },\n },\n];\n\nexport default radialBackground;\n","module.exports = require(\"@splunk/visualization-icons\");","import React from 'react';\nimport T from 'prop-types';\nimport { RADIAL_BACKGROUND_COLOR, RADIAL_STROKE_COLOR } from '@splunk/visualizations-shared/colorConstants';\n\nconst RadialGraph = ({\n progress,\n strokeWidth,\n backgroundColor = RADIAL_BACKGROUND_COLOR,\n progressColor = RADIAL_STROKE_COLOR,\n width = 200,\n height = 200,\n}) => {\n const semicircleRadius = height - strokeWidth / 2;\n\n const circumference = semicircleRadius * 2 * Math.PI;\n const bgCircleOffset = 0.5 * circumference;\n\n const progress50 = (progress / 100) * 50;\n const progressWidth = (progress50 / 100) * circumference;\n const strokeDashoffset = circumference * 0.5;\n\n return (\n <svg height={height} width={width} data-test=\"radial-visualization\">\n <g>\n <circle\n data-test=\"background-radial\"\n stroke={backgroundColor}\n fill=\"transparent\"\n strokeWidth={strokeWidth}\n strokeDasharray={`${bgCircleOffset} ${circumference - bgCircleOffset}`}\n style={{ strokeDashoffset }}\n r={semicircleRadius}\n cx={width / 2}\n cy={semicircleRadius + strokeWidth / 2}\n />\n <circle\n data-test=\"progress-radial\"\n stroke={progressColor}\n fill=\"transparent\"\n strokeWidth={strokeWidth}\n strokeDasharray={`${progressWidth} ${circumference - progressWidth}`}\n style={{ strokeDashoffset }}\n r={semicircleRadius}\n cx={width / 2}\n cy={semicircleRadius + strokeWidth / 2}\n />\n </g>\n </svg>\n );\n};\n\nRadialGraph.propTypes = {\n progress: T.number,\n strokeWidth: T.number,\n backgroundColor: T.string,\n progressColor: T.string,\n width: T.number,\n height: T.number,\n};\n\nRadialGraph.defaultProps = {\n progress: 0,\n strokeWidth: 12,\n};\n\nexport default RadialGraph;\n","import { RADIAL_SEVERITY_COLORS } from '@splunk/visualizations-shared/colorConstants';\nimport { getGraphColors, lighten, darken, SVR_PADDING } from '../../../common/utils/singleValueUtils';\n\nexport const VALID_TREND_POSITIONS = ['standard', 'below', 'outside'];\nexport const MAJOR_FONT_THRESHOLD = 25;\nexport const TREND_FONT_THRESHOLD = 12;\nexport const DEFAULT_RADIAL_STROKE_WIDTH = 16;\nexport const SMALL_RADIAL_STROKE_WIDTH = 6;\n\n/**\n * Get the colors for a radial graph based on severity\n * @method getRadialColors\n * @param {Object} props\n * @param {Bool} props.backgroundEnabled\n * @param {String} props.backgroundColor\n * @returns {Object} { background, stroke } colors\n */\nexport const getRadialColors = ({ backgroundEnabled, backgroundColor }) =>\n getGraphColors({\n backgroundEnabled,\n backgroundColor,\n defaultColors: RADIAL_SEVERITY_COLORS,\n customColorFormatter: color => ({ background: lighten(color), stroke: darken(color) }),\n });\n\n/**\n * Figure out the dimensions of the graph\n * @method getRadialGraphDimensions\n * @param {Object} props\n * @param {Number} props.width // Width of the container\n * @param {Number} props.height // Height of the container\n * @returns {Number} width and height of the graph\n */\nexport const getRadialGraphDimensions = ({ width, height }) => {\n // height * 2 because we are fitting only half of a circle inside the container\n const radius = Math.min(width, height * 2) / 2;\n\n return {\n width: width - SVR_PADDING.left - SVR_PADDING.right,\n height: radius - SVR_PADDING.top - SVR_PADDING.bottom,\n };\n};\n\n/**\n * Figure out the dimensions of the content container for SVR\n * @method getRadialHelperDimensions\n * @param {Object} props\n * @param {Number} props.width // Width of the visualization space\n * @param {Number} props.height // Height of the visualization space\n * @returns {Number} width and height of the content graph\n */\nexport const getRadialHelperDimensions = ({ height, strokeWidth = DEFAULT_RADIAL_STROKE_WIDTH }) => {\n // The radius of the visualization is equal to the height\n const semicircleRadius = height - strokeWidth / 2; // The inner part of the arc is strokeWidth / 2 inset.\n const innerArcRadius = semicircleRadius * 0.9;\n const halfContentWidth = innerArcRadius * 0.7;\n const contentHeight = Math.floor(Math.sqrt(innerArcRadius ** 2 - halfContentWidth ** 2));\n\n return {\n contentWidth: halfContentWidth * 2,\n contentHeight,\n helperArcRadius: innerArcRadius,\n semicircleRadius,\n };\n};\n\n/**\n * Get the maximum size of the container that holds the graph text\n * @method getValueContentSize\n * @param {Object} props\n * @param {Number} props.graphSize\n * @param {Number} props.radialStrokeWidth // Stroke width of the graph\n * @returns {Number} content size for showing major and trend values in radial graph\n */\nexport const getValueContentSize = ({ graphSize, radialStrokeWidth }) => {\n // Account for the graph's stroke width\n const diameter = graphSize - radialStrokeWidth;\n // Use pythagoreum theorum with circle diameter\n // to calculate the size of the sides of the square inside the circle\n return Math.floor(Math.sqrt(diameter ** 2 / 2));\n};\n\n/*\n * @method getRadialStrokeWidth\n * @param {Number} graphHeight\n * @returns {Number} radial stroke width\n */\nexport const getRadialStrokeWidth = graphHeight =>\n graphHeight >= 90 ? DEFAULT_RADIAL_STROKE_WIDTH : SMALL_RADIAL_STROKE_WIDTH;\n\n/*\n * @method isValidPosition\n * @param {String} position\n * @returns {Bool}\n */\nexport const isValidPosition = position => VALID_TREND_POSITIONS.indexOf(position) > -1;\n\n/*\n * @method showTrendPositionStandard\n * @param {Object} props\n * @param {Bool} props.showTrendIndicator\n * @param {String} props.position\n * @returns {Bool}\n */\nexport const showTrendPositionStandard = ({ showTrendIndicator, position }) =>\n showTrendIndicator && position === 'standard';\n\n/*\n * @method showTrendPositionBelow\n * @param {Object} props\n * @param {Bool} props.showTrendIndicator\n * @param {String} props.position\n * @returns {Bool}\n */\nexport const showTrendPositionBelow = ({ showTrendIndicator, position }) =>\n showTrendIndicator && position === 'below';\n\n/*\n * @method showTrendPositionOutside\n * @param {Object} props\n * @param {Bool} props.showTrendIndicator\n * @param {String} props.position\n * @returns {Bool}\n */\nexport const showTrendPositionOutside = ({ showTrendIndicator, position }) =>\n showTrendIndicator && position === 'outside';\n\n/*\n * need to handle max and min\n * @method getRadialProgress\n * @param {Number} majorValue\n * @returns {Number} progress bar in radial graph\n */\nexport const getRadialProgress = (majorValue, maxValue) =>\n Number.isNaN(Number(majorValue)) ||\n Number.isNaN(Number(maxValue)) ||\n (majorValue < 0 && majorValue < maxValue)\n ? 0\n : (majorValue / maxValue) * 100;\n","import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport SingleValueBasic from '../../SingleValueBasic/SingleValueBasic';\nimport RadialGraph from './RadialGraph';\nimport { getRadialHelperDimensions } from './utils/displayUtils';\n\nconst TextContainer = styled.div`\n position: ${props => (props.smallViz ? 'relative' : 'absolute')};\n left: 0;\n bottom: 0;\n\n width: 100%;\n display: flex;\n align-items: ${props => props.align || 'center'};\n justify-content: center;\n flex-direction: column;\n\n // To ensure the major text is flush with the bottom of the text container when radial is shown.\n [data-test='majorValue'] {\n ${props => !props.smallViz && { lineHeight: 'normal' }}\n\n ::before {\n font-size: inherit;\n vertical-align: unset;\n top: unset;\n }\n\n ::after {\n font-size: inherit;\n vertical-align: unset;\n top: unset;\n }\n }\n\n // To ensure the trend text is flush with the bottom of the text container, and prevents weird spacing behavior at very small trend text sizes\n [data-test='trendValueIndicator'] {\n align-items: flex-end;\n ${props => props.smallViz && { marginLeft: '1px' }}\n }\n\n // Prevents weird spacing behavior at very small sizes.\n [data-test='trendValue'] {\n ${props => props.smallViz && { marginLeft: '1px' }}\n }\n\n div[class^='TrendValue__Column'] {\n ${props => props.smallViz && { margin: '0 1px' }}\n }\n`;\n\nconst GraphContainer = styled.div`\n position: relative;\n margin: 0 auto;\n width: ${props => props.width}px;\n height: ${props => props.height}px;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n`;\n\nconst UnderLabelContainer = styled.div`\n display: flex;\n flex: 0 0 ${props => props.underLabelHeight}px; // Changes depending on height of underLabel.\n align-items: flex-end;\n`;\n\nconst UnderLabelText = styled.span`\n color: ${props => props.color};\n -webkit-text-stroke: 0.5px ${props => props.strokeColor};\n font-size: 12px;\n\n // Prevent overflow of text beyond inner arc radius.\n max-width: ${props => props.maxWidth}px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nconst RadialContent = ({ ...props }) => {\n const {\n majorColor,\n majorText,\n majorTextFontSize,\n majorValueTitle,\n trendColor,\n trendText,\n trendTextFontSize,\n showTrendIndicator,\n unit,\n unitPosition,\n underLabelColor,\n underLabel,\n onValueClick,\n showRadialGraph,\n progress,\n radialBackgroundColor,\n radialStrokeColor,\n radialStrokeWidth,\n graphWidth,\n graphHeight,\n underLabelStrokeColor,\n } = props;\n\n const { semicircleRadius, helperArcRadius } = getRadialHelperDimensions({\n height: graphHeight,\n strokeWidth: radialStrokeWidth,\n });\n\n // Two cases for filling underLabel space: either the semicircle radius is insufficiently sized for text\n // or the radial visualization has been disabled (first condition reached first when making smaller).\n const fillVacantSpace = semicircleRadius < 50 || !showRadialGraph;\n\n // If filling the vacant space, no height on underLabel container. Otherwise, the underLabel height is 20% of the helperArcRadius (min 20px).\n const underLabelHeight = fillVacantSpace ? 0 : Math.max(helperArcRadius * 0.2, 20);\n const underLabelWidth = helperArcRadius * 2;\n\n const basicSingleValues = (\n <SingleValueBasic\n majorColor={majorColor}\n majorText={majorText}\n majorTextFontSize={majorTextFontSize}\n majorValueTitle={majorValueTitle}\n trendColor={trendColor}\n trendText={trendText}\n trendTextFontSize={trendTextFontSize}\n showTrendIndicator={showTrendIndicator}\n unit={unit}\n unitPosition={unitPosition}\n onValueClick={onValueClick}\n />\n );\n\n const radialGraph = showRadialGraph ? (\n <RadialGraph\n progress={progress}\n backgroundColor={radialBackgroundColor}\n progressColor={radialStrokeColor}\n strokeWidth={radialStrokeWidth}\n width={graphWidth}\n height={graphHeight}\n />\n ) : null;\n\n const underLabelComponent = (\n <UnderLabelContainer underLabelHeight={underLabelHeight}>\n {!fillVacantSpace && underLabel && (\n <UnderLabelText\n data-test=\"underLabel\"\n maxWidth={underLabelWidth * 0.9} // buffer for overflow ellipses\n color={underLabelColor}\n strokeColor={underLabelStrokeColor}\n title={underLabel}\n >\n {underLabel}\n </UnderLabelText>\n )}\n </UnderLabelContainer>\n );\n\n return (\n <GraphContainer width={graphWidth} height={graphHeight}>\n {radialGraph}\n <TextContainer smallViz={!showRadialGraph} height={graphHeight}>\n {basicSingleValues}\n {underLabelComponent}\n </TextContainer>\n </GraphContainer>\n );\n};\n\nRadialContent.propTypes = {\n ...SingleValueBasic.propTypes,\n trendPosition: T.string,\n showRadialGraph: T.bool,\n progress: T.number,\n radialBackgroundColor: T.string,\n radialStrokeColor: T.string,\n radialStrokeWidth: T.number,\n graphWidth: T.number,\n graphHeight: T.number,\n underLabelStrokeColor: T.string,\n};\n\nexport default RadialContent;\n","import React, { useCallback } from 'react';\nimport T from 'prop-types';\nimport pickFromTheme from '@splunk/themes/pick';\nimport variables from '@splunk/themes/variables';\nimport styled, { withTheme } from 'styled-components';\nimport pick from 'lodash/pick';\nimport isEmpty from 'lodash/isEmpty';\nimport { toDimension } from '@splunk/visualizations-shared/style';\nimport SizeAwareWrapper from '@splunk/visualizations-shared/SizeAwareWrapper';\nimport VizStyleWrapper from '../../common/components/VizStyleWrapper';\nimport RadialLayout from './RadialLayout';\nimport {\n computeColors,\n computeSingleValueRadialContent,\n shouldShowTrend,\n handleValueClickCallback,\n} from '../../common/utils/singleValueUtils';\nimport {\n getRadialGraphDimensions,\n getRadialHelperDimensions,\n getRadialProgress,\n getRadialStrokeWidth,\n getRadialColors,\n} from './utils/displayUtils';\n\nconst Container = styled.div`\n overflow: hidden;\n ${props => toDimension(pick(props, ['width', 'height']))};\n`;\n\nconst SingleValueRadial = ({ ...props }) => {\n const {\n width,\n height = 250,\n style,\n majorFontSize,\n majorValue,\n majorValueField,\n maxValue,\n trendValue,\n trendFontSize,\n unitPosition,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n onValueClick,\n } = props;\n\n // calculate colors\n const defaultColors = {\n defaultFontColor: pickFromTheme({\n enterprise: {\n dark: variables.textColor(props),\n light: variables.gray20(props),\n },\n prisma: variables.contentColorActive(props),\n })(props),\n defaultBlockFontColor: pickFromTheme({\n enterprise: variables.white(props),\n prisma: variables.contentColorActive(props),\n })(props),\n };\n const { backgroundEnabled, backgroundColor, majorColor, trendColor, underLabelColor } = computeColors(\n props,\n defaultColors\n );\n\n const radialColors = getRadialColors({ backgroundEnabled, backgroundColor });\n const radialBackgroundColor = props.radialBackgroundColor || radialColors.background;\n const radialStrokeColor = props.radialStrokeColor || radialColors.stroke;\n const underLabelStrokeColor = backgroundEnabled ? backgroundColor : 'transparent';\n\n const handleValueClick = useCallback(\n ev => handleValueClickCallback(ev, majorValue, majorValueField, trendValue, onValueClick),\n [onValueClick, majorValue, majorValueField, trendValue]\n );\n\n const renderVisualization = ({ width: containerWidth, height: containerHeight }) => {\n const { underLabel } = props;\n let { trendDisplay, unit } = props;\n\n // calculate radial graph dimensions, strokewidth, and major and trend content dimensions\n let { width: graphWidth, height: graphHeight } = getRadialGraphDimensions({\n width: containerWidth,\n height: containerHeight,\n });\n\n // Radial stroke width is stepped to lower value at lower sizes.\n const radialStrokeWidth = getRadialStrokeWidth(graphHeight);\n\n let { contentWidth, contentHeight } = getRadialHelperDimensions({\n height: graphHeight - radialStrokeWidth / 2,\n strokeWidth: radialStrokeWidth,\n });\n\n // Subtract half of the stroke width for the exact internal radius.\n const semicircleRadius = graphHeight - radialStrokeWidth / 2;\n // If radius drops below 20px, hide the radial graph. The dependency of this variable on font size is removed, and it now only depends on semicircle radius.\n const showRadialGraph = semicircleRadius >= 20;\n\n // If not showing the radial graph, then can forgo padding logic and use original container dimensions for content sizing computation.\n if (!showRadialGraph) {\n graphWidth = containerWidth;\n contentWidth = containerWidth;\n graphHeight = containerHeight;\n contentHeight = containerHeight;\n }\n\n const {\n majorText,\n trendText,\n majorTextFontSize,\n trendTextFontSize,\n majorValueTitle,\n smallVizProps,\n } = computeSingleValueRadialContent({\n majorValue,\n trendValue,\n majorFontSize,\n trendFontSize,\n trendDisplay,\n contentWidth,\n contentHeight, // buffer for height of div\n containerWidth: containerWidth * 0.9,\n containerHeight: containerHeight * 0.9,\n unit,\n numberPrecision,\n shouldUseThousandSeparators,\n shouldAbbreviateTrendValue,\n smallViz: !showRadialGraph,\n });\n\n if (!isEmpty(smallVizProps)) {\n ({ trendDisplay, unit } = smallVizProps);\n }\n\n // calculate radial progress\n const progress = getRadialProgress(majorValue, maxValue);\n\n return (\n <VizStyleWrapper\n backgroundColor={backgroundColor}\n style={style}\n dataTestKey=\"SingleValueRadialWrapper\"\n >\n <RadialLayout\n data-test=\"RadialLayout\"\n majorColor={majorColor}\n majorText={majorText}\n majorTextFontSize={majorTextFontSize}\n majorValueTitle={majorValueTitle}\n trendColor={trendColor}\n trendText={trendText}\n trendTextFontSize={trendTextFontSize}\n showTrendIndicator={shouldShowTrend(trendDisplay)}\n unit={unit}\n unitPosition={unitPosition}\n underLabelColor={underLabelColor}\n underLabel={underLabel}\n onValueClick={handleValueClick}\n showRadialGraph={showRadialGraph}\n progress={progress}\n radialBackgroundColor={radialBackgroundColor}\n radialStrokeColor={radialStrokeColor}\n radialStrokeWidth={radialStrokeWidth}\n graphWidth={graphWidth}\n graphHeight={graphHeight}\n underLabelStrokeColor={underLabelStrokeColor}\n />\n </VizStyleWrapper>\n );\n };\n\n return (\n <Container width={width} height={height}>\n <SizeAwareWrapper>\n {containerDimension => renderVisualization(containerDimension)}\n </SizeAwareWrapper>\n </Container>\n );\n};\n\nSingleValueRadial.propTypes = {\n width: T.oneOfType([T.string, T.number]),\n height: T.oneOfType([T.string, T.number]),\n style: T.object,\n majorValue: T.oneOfType([T.string, T.number]),\n majorValueField: T.string,\n majorColor: T.string,\n majorFontSize: T.number,\n maxValue: T.number,\n trendValue: T.oneOfType([T.string, T.number]),\n trendColor: T.string,\n trendFontSize: T.number,\n trendDisplay: T.string,\n trendIndicatorPosition: T.oneOf(['standard', 'below', 'outside']),\n shouldAbbreviateTrendValue: T.bool,\n backgroundColor: T.string,\n unit: T.string,\n unitPosition: T.string,\n underLabel: T.string,\n numberPrecision: T.number,\n shouldUseThousandSeparators: T.bool,\n radialBackgroundColor: T.string,\n radialStrokeColor: T.string,\n onValueClick: T.func,\n};\n\nSingleValueRadial.defaultProps = {\n width: '100%',\n height: 250,\n majorValue: 'N/A',\n majorValueField: '',\n maxValue: 100,\n trendDisplay: 'absolute',\n trendIndicatorPosition: 'standard',\n shouldAbbreviateTrendValue: false,\n unitPosition: 'after',\n numberPrecision: 0,\n shouldUseThousandSeparators: true,\n onValueClick: () => {},\n};\n\nexport default withTheme(SingleValueRadial);\n","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@splunk/visualizations-shared/domUtils\");","module.exports = require(\"@splunk/visualization-color-palettes/editors/PresetPalettes\");","export enum VizBehavior {\n /**\n * Dynamic Options Behavior.\n * This allows visualization options to be powered by data\n *\n * **Example**\n *\n * sparklineValues: \">primary|seriesByIndex(0)\"\n * would configure sparklineValues with an array of data points\n * coming from the first series in the primary datasource\n *\n */\n DYNAMIC_OPTIONS = 'dynamic-options',\n EVENTS = 'events',\n /**\n * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is\n * missing.\n * @type {string}\n */\n PLACEHOLDER = 'placeholder',\n PAGE_AND_SORT = 'page-and-sort',\n}\n","import styled from 'styled-components';\n\nconst VizStyleWrapper = styled.div.attrs(({ dataTestKey }) => ({\n 'data-test': dataTestKey,\n}))`\n display: flex;\n justify-content: center;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background-color: ${props => props.backgroundColor};\n`;\n\nVizStyleWrapper.displayName = 'VizStyleWrapper';\n\nexport default VizStyleWrapper;\n","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport ArrowUp from '@splunk/react-icons/ArrowUp';\nimport ArrowDown from '@splunk/react-icons/ArrowDown';\nimport { DEFAULT_FONT_FAMILY } from '../common/utils/singleValueUtils';\n\nconst Column = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: ${props => props.justify || 'flex-end'};\n height: ${props => props.size || 12}px;\n ${props => (props.size ? `margin: 0 ${parseInt(props.size, 10) * 0.2 || 5}px;` : '')};\n`;\n\nconst Text = styled.div`\n white-space: nowrap;\n font-size: ${props => props.size || 12}px;\n color: ${props => props.color || '#000'};\n font-family: ${DEFAULT_FONT_FAMILY};\n height: ${props => props.size || 12}px;\n line-height: ${props => props.size || 12}px;\n display: flex;\n align-self: baseline;\n ${props => (props.size ? `margin-left: ${parseInt(props.size, 10) * 0.2 || 5}px;` : '')};\n`;\n\nconst SingleValueContent = ({ fontSize, color, value, text }) => {\n let TrendIndicator = false;\n\n if (parseFloat(value, 10) > 0) {\n TrendIndicator = ArrowUp;\n } else if (parseFloat(value, 10) < 0) {\n TrendIndicator = ArrowDown;\n }\n\n return (\n <Column justify=\"flex-end\" size={fontSize}>\n <Text data-test=\"trendValueIndicator\" size={fontSize} color={color}>\n {TrendIndicator && <TrendIndicator />}\n </Text>\n <Text data-test=\"trendValue\" size={fontSize} color={color}>\n {`${text}`}\n </Text>\n </Column>\n );\n};\n\nSingleValueContent.propTypes = {\n fontSize: T.number,\n color: T.string,\n value: T.oneOfType([T.string, T.number]),\n text: T.string,\n};\n\nexport default SingleValueContent;\n","import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport cssesc from 'cssesc';\nimport { DEFAULT_FONT_FAMILY } from '../common/utils/singleValueUtils';\n\nconst Row = styled.div`\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n justify-content: left;\n height: ${props => props.size}px;\n line-height: ${props => props.size}px;\n`;\n\nconst Text = styled.div`\n white-space: nowrap;\n height: 100%;\n font-size: ${props => props.size || 12}px;\n color: ${props => props.color};\n font-family: ${DEFAULT_FONT_FAMILY};\n font-weight: bold;\n &:hover {\n text-decoration: ${props => (props.showUnderline ? 'underline' : 'inherit')};\n cursor: ${props => (props.showUnderline ? 'pointer' : 'inherit')};\n }\n ${props => {\n if (!props.pseudoContent || !props.pseudoContentPosition) {\n return '';\n }\n return `&:${props.pseudoContentPosition} {\n // by default this pseudo element would inherit text-decoration from main element\n // and text-decoration could not be overwritten.\n // adding display: inline-block makes text decoration independent from main element.\n // => the unit will not be underlined if a user hovers over the main value\n display: inline-block;\n font-size: ${props.pseudoContentFontSize}px;\n position: relative;\n font-weight: normal;\n content: ${props.pseudoContent};\n }`;\n }}\n`;\n\nconst validUnitPositions = ['before', 'after'];\n\nconst SingleValueContent = ({ color, fontSize, unitPosition, title, value, onValueClick, unit }) => {\n let sanitizedUnit;\n let sanitizedUnitPosition;\n\n if (typeof unit === 'string') {\n sanitizedUnit = cssesc(unit, { wrap: true, quotes: 'double' });\n if (typeof unitPosition === 'string' && validUnitPositions.includes(unitPosition)) {\n sanitizedUnitPosition = unitPosition;\n } else {\n sanitizedUnitPosition = 'after';\n }\n }\n\n const handleKeyDown = e => {\n if (e.keyCode !== 13) {\n return;\n }\n e.preventDefault();\n onValueClick(e);\n };\n\n return (\n <Row size={fontSize}>\n <Text\n data-test=\"majorValue\"\n color={color}\n onClick={e => typeof onValueClick === 'function' && onValueClick(e)}\n showUnderline={!!onValueClick}\n size={fontSize}\n title={title}\n pseudoContent={sanitizedUnit}\n pseudoContentPosition={sanitizedUnitPosition}\n pseudoContentFontSize={fontSize * 0.6}\n tabIndex=\"0\"\n role=\"button\"\n onKeyDown={handleKeyDown}\n >\n {value}\n </Text>\n </Row>\n );\n};\n\nSingleValueContent.propTypes = {\n color: T.string,\n fontSize: T.number,\n unit: T.string,\n unitPosition: T.oneOf(validUnitPositions),\n value: T.oneOfType([T.string, T.number]),\n title: T.oneOfType([T.string, T.number]),\n onValueClick: T.func,\n};\n\nexport default SingleValueContent;\n","import React from 'react';\nimport T from 'prop-types';\nimport styled from 'styled-components';\nimport { DEFAULT_FONT_FAMILY } from '../common/utils/singleValueUtils';\nimport TrendValue from './TrendValue';\nimport MajorValue from './MajorValue';\n\nconst Column = styled.div`\n display: flex;\n flex-direction: column;\n align-self: center;\n justify-content: center;\n`;\n\nconst Row = styled.div`\n display: flex;\n flex-direction: row;\n align-items: ${props => props.align || 'center'};\n justify-content: center;\n`;\n\nconst Text = styled.div`\n font-weight: normal;\n white-space: nowrap;\n font-size: ${props => props.size || 12}px;\n color: ${props => props.color || '#000'};\n font-family: ${DEFAULT_FONT_FAMILY};\n height: ${props => props.size || 12}px;\n line-height: 1.2;\n`;\n\nconst SingleValueBasic = ({ ...props }) => {\n const {\n majorColor,\n majorTextFontSize,\n majorText,\n majorValueTitle,\n trendColor,\n trendTextFontSize,\n trendText,\n showTrendIndicator,\n unit,\n unitPosition,\n underLabel,\n underLabelFontSize,\n underLabelColor,\n onValueClick,\n } = props;\n const trendIndicatorEnabled = trendText !== '' && showTrendIndicator;\n\n return (\n <Column>\n <Row align=\"baseline\">\n <MajorValue\n data-test=\"MajorValue\"\n color={majorColor}\n fontSize={majorTextFontSize}\n unit={unit}\n unitPosition={unitPosition}\n value={majorText}\n title={majorValueTitle}\n onValueClick={onValueClick}\n />\n {trendIndicatorEnabled && (\n // Passing the same value for value and text is a temporary hold until completion of https://jira.splunk.com/browse/SCP-21371\n <TrendValue\n data-test=\"TrendIndicator\"\n fontSize={trendTextFontSize}\n color={trendColor}\n value={trendText}\n text={trendText}\n />\n )}\n </Row>\n {underLabel && (\n <Row justify=\"center\">\n <Text data-test=\"underLabel\" size={underLabelFontSize} color={underLabelColor}>\n {underLabel}\n </Text>\n </Row>\n )}\n </Column>\n );\n};\n\nSingleValueBasic.propTypes = {\n majorText: T.string,\n majorColor: T.string,\n majorTextFontSize: T.number,\n majorValueTitle: T.string,\n trendText: T.string,\n trendTextFontSize: T.number,\n trendColor: T.string,\n showTrendIndicator: T.bool,\n unit: T.string,\n unitPosition: T.oneOf(['before', 'after']),\n underLabel: T.string,\n underLabelFontSize: T.number,\n underLabelColor: T.string,\n onValueClick: T.func,\n};\n\nexport const SingleValueTrendValue = TrendValue;\nexport default SingleValueBasic;\n","module.exports = require(\"lodash/pick\");","module.exports = require(\"lodash/isEmpty\");","module.exports = require(\"@splunk/react-icons/ArrowUp\");","module.exports = require(\"@splunk/react-icons/ArrowDown\");","module.exports = require(\"cssesc\");","import { _ } from '@splunk/ui-utils/i18n';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\n\nconst StaticBackgroundColorEditor = {\n label: _('Static background'),\n option: 'backgroundColor',\n editor: 'editor.color',\n showEditor: ({ options }) => !isDynamicOption(options.backgroundColor),\n};\n\nexport default StaticBackgroundColorEditor;\n","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","import { _ } from '@splunk/ui-utils/i18n';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\n\nexport const getDynamicMajorColorEditor = ({ defaultContext, defaultPalettesConfig }) => ({\n label: _('Dynamic major value'),\n option: 'majorColor',\n context: 'majorColorEditorConfig',\n editor: 'editor.dynamicColor',\n showEditor: ({ options }) => isDynamicOption(options.majorColor),\n editorProps: {\n labelPosition: 'left',\n flyoutTitle: _('Dynamic coloring: major value'),\n formatters: [\n {\n label: _('Ranges'),\n value: 'rangeValue',\n defaults: {\n majorValue: defaultContext.majorColorConfig,\n },\n },\n {\n label: _('Matches'),\n value: 'matchValue',\n defaults: {\n majorValue: defaultContext.majorColorMatchConfig,\n },\n },\n ],\n dataSelectors: [\n {\n label: _('Major Value'),\n value: 'majorValue',\n },\n ],\n defaultPalettesConfig,\n },\n});\n","import { _ } from '@splunk/ui-utils/i18n';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\n\nexport const getDynamicTrendColorEditor = ({ defaultContext, defaultPalettesConfig }) => ({\n label: _('Dynamic trend'),\n option: 'trendColor',\n context: 'trendColorEditorConfig',\n editor: 'editor.dynamicColor',\n showEditor: ({ options }) => isDynamicOption(options.trendColor),\n editorProps: {\n labelPosition: 'left',\n flyoutTitle: _('Dynamic coloring: trend'),\n formatters: [\n {\n label: _('Ranges'),\n value: 'rangeValue',\n defaults: {\n trendValue: defaultContext.trendColorConfig,\n },\n },\n ],\n dataSelectors: [\n {\n label: _('Trend'),\n value: 'trendValue',\n },\n ],\n defaultPalettesConfig,\n },\n});\n","module.exports = require(\"@splunk/themes/variables\");","import { _ } from '@splunk/ui-utils/i18n';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\n\nexport const getDynamicBackgroundColorEditor = ({ defaultContext, defaultPalettesConfig }) => ({\n label: _('Dynamic background'),\n option: 'backgroundColor',\n context: 'backgroundColorEditorConfig',\n editor: 'editor.dynamicColor',\n showEditor: ({ options }) => isDynamicOption(options.backgroundColor),\n editorProps: {\n labelPosition: 'left',\n flyoutTitle: _('Dynamic coloring: background'),\n formatters: [\n {\n label: _('Ranges'),\n value: 'rangeValue',\n defaults: {\n majorValue: defaultContext.majorColorConfig,\n trendValue: defaultContext.trendColorConfig,\n },\n },\n {\n label: _('Matches'),\n value: 'matchValue',\n defaults: {\n majorValue: defaultContext.majorColorMatchConfig,\n },\n },\n ],\n dataSelectors: [\n {\n label: _('Major Value'),\n value: 'majorValue',\n },\n {\n label: _('Trend'),\n value: 'trendValue',\n },\n ],\n defaultPalettesConfig,\n },\n});\n","import { _ } from '@splunk/ui-utils/i18n';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\n\nconst StaticMajorColorEditor = {\n label: _('Static major value'),\n option: 'majorColor',\n editor: 'editor.color',\n showEditor: ({ options }) => !isDynamicOption(options.majorColor),\n};\n\nexport default StaticMajorColorEditor;\n","import { _ } from '@splunk/ui-utils/i18n';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\n\nconst StaticTrendColorEditor = {\n label: _('Static trend'),\n option: 'trendColor',\n editor: 'editor.color',\n showEditor: ({ options }) => !isDynamicOption(options.trendColor),\n isDisabled: ({ options }) => options.trendDisplay === 'off',\n};\n\nexport default StaticTrendColorEditor;\n"],"sourceRoot":""}