@splunk/visualizations 25.0.1 → 25.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_Background_Color_Red.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_Basic.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Actions_Simulated_Instance.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Actions_for_Numeric_Field_Simulated_Instance.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Dark.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Light.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_custom_base_layer_tile_server.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Background_color_cyan.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Unit_specified_Unit_Position_after_default.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Unit_specified_Unit_Position_before.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Background_Color_white_Under_Label_and_Unit_specified.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Major_Value_is_null.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Unit_specified_Unit_Position_after_default.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Unit_specified_Unit_Position_before.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Area_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bar_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bubble_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_ChoroplethSvg_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Column_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Ellipse_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Events_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_FillerGauge_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Image_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Line_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_LinkGraph_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Markdown_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_MarkerGauge_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Parallel_Coordinates_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Pie_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Punchcard_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Rectangle_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Sankey_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Scatter_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Icon_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Radial_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Table_Editor.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Background_Color_Light_Blue.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Basic_Events.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Event_Actions.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Actions.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary_Simulated_Instance.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Footer_Fields.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Footer_Fields_with_Highlight.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Show_Placeholder.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Height.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Percentage_50.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_With_Options.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_LinkGraph_LinkGraph_ES.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_Unit_value_after.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_Unit_value_before.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Set_The_Unit_After.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Set_The_Unit_Before.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_Unit_Value_After.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_Unit_Value_Before.png +0 -0
- package/Area.config.js +146 -157
- package/Area.config.js.map +1 -1
- package/Area.js +459 -545
- package/Area.js.map +1 -1
- package/Bar.config.js +148 -153
- package/Bar.config.js.map +1 -1
- package/Bar.js +468 -548
- package/Bar.js.map +1 -1
- package/Bubble.config.js +143 -123
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +475 -530
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +87 -81
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +352 -422
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +144 -151
- package/Column.config.js.map +1 -1
- package/Column.js +463 -546
- package/Column.js.map +1 -1
- package/Ellipse.config.js +86 -80
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +319 -389
- package/Ellipse.js.map +1 -1
- package/Events.config.js +668 -0
- package/Events.config.js.map +1 -0
- package/Events.js +3116 -0
- package/Events.js.map +1 -0
- package/FillerGauge.config.js +94 -87
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +352 -415
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +74 -74
- package/Image.config.js.map +1 -1
- package/Image.js +713 -801
- package/Image.js.map +1 -1
- package/Line.config.js +145 -142
- package/Line.config.js.map +1 -1
- package/Line.js +471 -538
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +120 -113
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +24563 -717
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +107 -100
- package/Map.config.js.map +1 -1
- package/Map.js +2358 -2465
- package/Map.js.map +1 -1
- package/Markdown.config.js +112 -112
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +844 -918
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +185 -186
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +1274 -1363
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +137 -137
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +732 -923
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +132 -132
- package/Pie.config.js.map +1 -1
- package/Pie.js +1193 -1281
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +138 -138
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +2723 -2923
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +267 -260
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +1107 -1188
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +149 -142
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +2613 -2808
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +144 -123
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +1820 -1889
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +121 -114
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +2554 -2635
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +34 -34
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +129 -120
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +994 -1212
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +216 -178
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +2235 -2316
- package/SingleValueRadial.js.map +1 -1
- package/Table.config.js +150 -151
- package/Table.config.js.map +1 -1
- package/Table.js +2446 -2525
- package/Table.js.map +1 -1
- package/common/Charting.js +11 -11
- package/common/Charting.js.map +1 -1
- package/common/ChartingApi.js +2 -2
- package/common/ChartingApi.js.map +1 -1
- package/common/EventsDoc.js +25 -18
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +10 -10
- package/common/GaugeMajorTicks.js.map +1 -1
- package/common/GaugeValueMarker.js +10 -10
- package/common/GaugeValueMarker.js.map +1 -1
- package/common/OptionsDoc.js +57 -357
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.js +22 -22
- package/common/OverviewDoc.js.map +1 -1
- package/common/SplunkVisualization.js +4 -4
- package/common/SplunkVisualization.js.map +1 -1
- package/common/SplunkVisualizationApi.js +2 -2
- package/common/SplunkVisualizationApi.js.map +1 -1
- package/common/ThemesDoc.js +21 -21
- package/common/ThemesDoc.js.map +1 -1
- package/common/chartingUtils.js +4 -4
- package/common/chartingUtils.js.map +1 -1
- package/common/docUtils.js +4 -4
- package/common/docUtils.js.map +1 -1
- package/common/gaugeUtils.js +13 -13
- package/common/gaugeUtils.js.map +1 -1
- package/common/shapeUtils.js +8 -8
- package/common/shapeUtils.js.map +1 -1
- package/common/utils/configUtils.js +17 -18
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/{JSONSchemaUtils.js → dataUtils.js} +24 -25
- package/common/utils/dataUtils.js.map +1 -0
- package/common/utils/hocUtils.js +5 -85
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/mapUtils.js +198 -0
- package/common/utils/mapUtils.js.map +1 -0
- package/common/utils/singleValueUtils.js +15 -12
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +8 -8
- package/common/utils/testHelper.js.map +1 -1
- package/common/withDashboardViz.js +120 -207
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +16 -14
- package/.loki/reference/chrome_docker_PureVisualizations_SvgChoroplethDynamic_SVG_Of_Size_Greater_Than_2_MB_Render.png +0 -0
- package/common/utils/JSONSchemaUtils.js.map +0 -1
package/common/OptionsDoc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///external \"styled-components\"","webpack:///external \"lodash\"","webpack:///external \"@splunk/react-ui/Heading\"","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/typeof\"","webpack:///./.storybook/utils/storybookUtils.ts","webpack:///external \"@babel/runtime/helpers/slicedToArray\"","webpack:///external \"@babel/runtime/helpers/toConsumableArray\"","webpack:///external \"@splunk/react-ui/Markdown\"","webpack:///external \"lodash/isEmpty\"","webpack:///./src/common/interfaces/VizBehavior.ts","webpack:///./src/common/OptionsDoc.jsx","webpack:///./src/common/utils/configUtils.ts","webpack:///external \"@splunk/visualizations-shared/schemaUtils\""],"names":["Option","styled","OptionName","PairContainer","PairTitle","PairValue","PairValueJSON","PropertiesWrapper","props","PropertiesContainer","PropertiesContent","isOneOfJsonSchema","item","Array","getOrType","res","one","getArrayType","isEmpty","itemType","getType","values","getDefaultValue","defaultValue","JSON","Pair","title","content","T","PropertyItems","isPatternProperty","propsItems","_","array","OptionItem","name","type","desc","enumerable","PropertiesSection","marginLeft","element","PropertiesItem","getPropertiesSection","allProperties","Object","propsInPattern","patternProperties","allPropsItems","p","pType","getOptionDisplayType","enum","pDefault","pEnumerable","getPatternOptions","OptionsDoc","options","description","key","option","mergedOptions","merge","properties","string"],"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,8C;;;;;;ACAA,mC;;;;;;;ACAA,qD;;;;;;;ACAA,kD;;;;;;ACAA,kE;;;;;;ACAA,0D;;;;;;;;;;;;;;;;;ACAA;;AAEA;AA+BA;;;;;;;;;;AAUG;;;AACI,IAAM,iBAAiB,GAAG,SAApB,iBAAoB,CAAC,aAAD;AAAA,SAC7B,aAAa,CAAC,OAAd,CAAsB,KAAtB,EAA6B,EAA7B,EA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AAIH,GAdM,CAAP;AAeH;;AA0BG;AAnBJ;;;;;AAKG;;AACH,SAAS,uBAAT,CAAiC,kBAAjC,EAA2D;AACvD,SAAO,eAAM,CAAN,EAAS,kBAAkB,GAAG,CAA9B,EAAiC,GAAjC,CACH,UAAC,CAAD;AAAA,WAAyB;AACrB,WAAK,YAAK,CAAL,gBAAY,CAAC,GAAG,CAAJ,GAAQ,GAAR,GAAc,EAA1B,SAA+B,IAAI,MAAJ,CAAW,CAAX,CAA/B,MADgB;AAErB,WAAK,EAAE;AAFc,KAAzB;AAAA,GADG,CAAP;AAMH;;AAOG;AAIJ;;;;;;;AAOG;;AACI,IAAM,YAAY,GAAG,SAAf,YAAe,CACxB,MADwB,EAExB,KAFwB;AAAA,oCAGrB,WAHqB;AAGrB,eAHqB;AAAA;;AAAA,sCAMrB,MAAM,CAAC,KAAP,CAAa,CAAb,EAAgB,KAAhB,CANqB,GAQrB,WARqB,qBAUrB,MAAM,CAAC,KAAP,CAAa,KAAb,CAVqB;AAAA,CAArB;;AAAM,uBAAY,YAAZ,C;;;;;;ACvOb,sE","file":"OptionsDoc.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 = 51);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","module.exports = require(\"styled-components\");","module.exports = require(\"lodash\");","module.exports = require(\"@splunk/react-ui/Heading\");","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/typeof\");","import { get, omit, reduce, toNumber, isString } from 'lodash';\nimport { OptionsSchema } from '../../src/common/interfaces/OptionsSchema';\nimport { isDynamicOption } from '../../src/common/utils/configUtils';\n\ninterface ArgTypeControl {\n type: string;\n options?: string[];\n min?: number;\n max?: number;\n}\n\ninterface ArgTypeEntry {\n description?: string;\n control: ArgTypeControl;\n name: string;\n defaultValue?: any;\n type: { required: boolean };\n optionType: string;\n table: {\n type: { summary: string };\n defaultValue?: { summary: any };\n category?: string;\n subcategory?: string;\n disable?: boolean;\n };\n}\n\nexport interface ArgTypes {\n [key: string]: ArgTypeEntry;\n}\n\ntype StoriesList = RegExp | string[];\n\n/**\n * Returns type options from pattern\n * @example\n * // returns ['fixed', 'absolute', 'off']\n * getPatternOptions('\\$(\\w+:)?([^$|:]+?)(\\|[|\\w]+)?\\$|^fixed$|^absolute$|^off$')\n * @example\n * // returns []\n * getPatternOptions('^>.*')\n * @param {string} patternString - visualization option type pattern\n * @return {string[]} array of type options\n */\nexport const getPatternOptions = (patternString): string[] =>\n patternString.replace(/\\$/g, '').split('|^').slice(1);\n\n/**\n * Returns Storybook display type for an option\n * @param {object} option - visualization option\n * @return {string} Storybook display type\n */\nexport const getOptionDisplayType = (option): string => {\n const { oneOf, anyOf, type, enum: en, pattern, items } = option;\n let displayTypes: string[] = [];\n\n // wrap values in quotes only if enum or pattern is string\n const conditionalQuote = type === 'string' ? '\"' : '';\n if (en && Array.isArray(en)) {\n displayTypes = en.map(e => {\n const enumQuote = typeof e === 'string' ? '\"' : '';\n return `${enumQuote}${e}${enumQuote}`;\n });\n } else if (type === 'array' && items) {\n return `${getOptionDisplayType(items)}[]`;\n } else if (anyOf && Array.isArray(anyOf)) {\n return getOptionDisplayType(anyOf[0]);\n } else if (oneOf && Array.isArray(oneOf)) {\n displayTypes = oneOf.map(item => getOptionDisplayType(item));\n } else if (Array.isArray(type)) {\n displayTypes = type;\n } else if (pattern) {\n displayTypes = getPatternOptions(pattern).map(p => `${conditionalQuote}${p}${conditionalQuote}`);\n }\n\n if (displayTypes.length > 0) {\n return `(${displayTypes.join(' | ')})`;\n }\n return type;\n};\n\n/**\n * Returns Storybook control type for an option\n * @param {object} option - visualization option\n * @param {string} optionKey - visualization option key\n * @return {ArgTypeControl} Storybook control object\n */\nexport const getOptionControl = (option, optionKey): ArgTypeControl => {\n const { anyOf } = option;\n const schema = Array.isArray(anyOf) && anyOf.length ? anyOf[0] : option;\n\n const type = Array.isArray(schema.type) ? schema.type[0] : schema.type;\n const { maximum, minimum, enum: en } = schema;\n\n const isColorOption = new RegExp(/color/, 'i').test(optionKey) && type !== 'array';\n\n if (isColorOption) {\n return { type: 'color' };\n } else if (en && Array.isArray(en)) {\n return { type: 'select', options: en };\n } else if (anyOf && type === 'string' && anyOf[0].pattern) {\n return { type: 'select', options: getPatternOptions(anyOf[0].pattern) };\n } else if (type === 'number' && (minimum || maximum)) {\n return {\n type: 'range',\n ...(typeof minimum === 'number' && { min: minimum }),\n ...(typeof maximum === 'number' && { max: maximum }),\n };\n } else if (type === 'string') {\n return { type: 'text' };\n }\n\n return { type };\n};\n\n/**\n * platform specific visualization option argTypes\n */\nconst objectTableControl = { control: { type: 'object' } };\nconst disableTableControl = { table: { disable: true } };\nexport const platformOptionArgTypes = {\n context: objectTableControl,\n dataSources: objectTableControl,\n dataSource: disableTableControl,\n options: disableTableControl,\n onEventTrigger: { action: 'eventTrigger', ...disableTableControl },\n hasEventHandlers: disableTableControl,\n};\n\n/**\n * Returns formatted Storybook argTypes for a visualization from its options schema\n * @param {OptionsSchema} options - visualization options\n * @param {string[]} requiredProps - required visualization props\n * @param {boolean} isPlatformViz - indicates if pure or platform visualization\n * @param {string} subcategory - nested property parent option name\n * @return {ArgTypes} Storybook argTypes\n */\nexport const optionsSchemaToArgTypes = ({\n options = {},\n requiredProps = [],\n isPlatformViz = false,\n subcategory = null,\n}: {\n options: OptionsSchema;\n requiredProps: string[];\n isPlatformViz?: boolean;\n subcategory?: string;\n}): ArgTypes => {\n const validObjectTypeOptions = ['lineDashStylesByField', 'seriesColorsByField'];\n let argTypes: ArgTypes = {};\n Object.keys(options).forEach(optionKey => {\n const option = get(options, optionKey);\n if (option.type === 'object' && !validObjectTypeOptions.includes(optionKey)) {\n // do not support controls for patternProperties, only nested properties\n if (option.properties) {\n argTypes = {\n ...argTypes,\n ...optionsSchemaToArgTypes({\n options: option.properties as OptionsSchema,\n isPlatformViz,\n requiredProps,\n subcategory: optionKey,\n }),\n };\n }\n } else {\n const { description, default: optionDefault } = option;\n const optionControl = getOptionControl(option, optionKey);\n const control = isPlatformViz ? { type: 'text' } : optionControl;\n const required = requiredProps.includes(optionKey);\n\n let defaultValue = optionDefault;\n if (!isPlatformViz && isDynamicOption(optionDefault as string)) {\n defaultValue = null;\n }\n\n argTypes[optionKey] = {\n description,\n control,\n name: optionKey,\n defaultValue,\n type: { required },\n optionType: optionControl.type,\n table: {\n type: { summary: getOptionDisplayType(option) },\n defaultValue: { summary: defaultValue },\n ...(subcategory && {\n category: 'Nested Options',\n subcategory,\n }),\n },\n };\n }\n });\n\n if (isPlatformViz) {\n Object.assign(argTypes, platformOptionArgTypes);\n }\n return argTypes;\n};\n\n/**\n * Helper which converts string visualization options to their required type\n * @param {any} value - option values\n * @param {string} expectedType - expected option type\n * @return {any} correctly typed option value\n */\nexport const transformOptionType = (value, expectedType = 'string'): any => {\n const isStringValue = !isDynamicOption(value) && isString(value);\n if (isStringValue && expectedType === 'boolean') return value == 'true';\n else if (isStringValue && expectedType === 'number') return toNumber(value);\n return value;\n};\n\n// stringify these fields for storybook controls' support\nconst FieldsToStringify = [\n 'layers',\n 'center',\n 'legendLabels',\n 'lineDashStylesByField',\n 'seriesColors',\n 'seriesColorsByField',\n];\n\n/**\n * Helper which returns platform visualization options from Storybook controls\n * Utilizes argTypes to determine valid and nested options\n * @param {object} args - visualization story args\n * @param {ArgTypes} argTypes - visualization argTypes\n * @return {object} visualization options\n */\nexport const getOptionsFromArgTypes = (args: Record<string, any>, argTypes: ArgTypes): Record<string, any> =>\n reduce(\n argTypes,\n (accum, val, option) => {\n const subcategory = get(val, 'table.subcategory');\n const { optionType, defaultValue } = argTypes[option];\n let controlledOption = transformOptionType(get(args, option), optionType);\n // filter options from react & json if set to default value or is undefined\n if (optionType && controlledOption != null && controlledOption !== defaultValue) {\n // parse the value if option is stringified as part of flattenVizOptions\n if (FieldsToStringify.includes(option)) {\n try {\n controlledOption = JSON.parse(controlledOption);\n } catch (e) {\n controlledOption = null;\n }\n }\n if (subcategory) {\n if (!accum[subcategory]) accum[subcategory] = {};\n accum[subcategory][option] = controlledOption;\n } else accum[option] = controlledOption;\n }\n return accum;\n },\n { ...omit(args.options, Object.keys(argTypes)) }\n );\n\n/**\n * Helper which flattens objects single depth level\n * @param {object} options - visualization options object\n * @return {object} flattened visualization options\n */\nexport const flattenVizOptions = (options: Record<string, any>): Record<string, any> => {\n const nonFlattenOptions = new Set(['y2Fields', 'overlayFields', 'gaugeRanges']);\n\n return reduce(\n options,\n (accum, val, option) => {\n if (!platformOptionArgTypes[option]) {\n if (typeof val === 'object' && FieldsToStringify.includes(option))\n accum[option] = JSON.stringify(val);\n else if (typeof val === 'object' && !nonFlattenOptions.has(option))\n accum = { ...accum, ...val };\n else accum[option] = val;\n }\n return accum;\n },\n {}\n );\n};\n/**\n * Returns value based on Storybook publishing status\n * @param {T} publishedStories - stories to include in published Storybook\n * @param {T} localStories - stories to include in local Storybook\n * @return {T} one of the two params\n */\nexport const getStoriesToInclude = <T>(publishedStories: T, localStories: T): T =>\n process.env.STORYBOOK_PUBLISH ? publishedStories : localStories;\n\n/**\n * Returns component level stories to include, defaults to innclude all stories\n * @param {StoriesList} stories - stories to include in published Storybook\n * @return {object} CSF includeStories config\n */\nexport const componentStoriesToInclude = (stories: StoriesList): object =>\n getStoriesToInclude({ includeStories: stories }, {});\n","module.exports = require(\"@babel/runtime/helpers/slicedToArray\");","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","module.exports = require(\"@splunk/react-ui/Markdown\");","module.exports = require(\"lodash/isEmpty\");","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 React from 'react';\nimport T from 'prop-types';\nimport isEmpty from 'lodash/isEmpty';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport Heading from '@splunk/react-ui/Heading';\nimport Markdown from '@splunk/react-ui/Markdown';\nimport styled from 'styled-components';\nimport { merge } from 'lodash';\nimport { getOptionDisplayType, getPatternOptions } from '../../.storybook/utils/storybookUtils';\n\nconst Option = styled.div`\n margin-top: 20px;\n`;\nconst OptionName = styled.div`\n color: #5ca300;\n padding-bottom: 5px;\n`;\nconst PairContainer = styled.div`\n margin-left: 40px;\n margin-top: 10px;\n`;\nconst PairTitle = styled.span`\n display: inline-block;\n color: #8293a7;\n width: 80px;\n`;\n\nconst PairValue = styled.span`\n font-family: 'Splunk Platform Mono', 'monospace';\n white-space: pre;\n`;\n\nconst PairValueJSON = styled.div`\n margin-left: 80px;\n pre {\n margin: 0;\n }\n code {\n font-size: 12px;\n font-family: 'Splunk Platform Mono', 'monospace';\n }\n`;\n\nconst PropertiesWrapper = styled.div`\n margin-left: ${props => (props.isPatternProperty ? 0 : 40)}px;\n margin-top: 20px;\n`;\n\nconst PropertiesContainer = styled.div`\n margin-left: ${props => (props.isPatternProperty ? 40 : 0)}px;\n margin-top: 10px;\n`;\n\nconst PropertiesContent = styled.div`\n margin-left: ${props => (props.isPatternProperty ? 40 : 0)}px;\n`;\n\n/**\n * @method isOneOfJsonSchema\n * @param {object} item\n * @returns {boolean}\n */\nconst isOneOfJsonSchema = item => item.oneOf && Array.isArray(item.oneOf);\n\n/**\n * get Or type as string\n * @method getOrType\n * @param {object} item\n * @param {string} res\n * @returns {string} res eg: (string | number)\n */\nconst getOrType = item => {\n let res = '';\n\n if (isOneOfJsonSchema(item)) {\n res = item.oneOf\n .map(one => {\n if (one.type !== 'array') {\n return one.type;\n }\n // eslint-disable-next-line no-use-before-define\n return getArrayType(one, '');\n })\n .join(' | ');\n } else if (Array.isArray(item.type)) {\n if (isEmpty(item.default)) {\n return item.type.join(' | ');\n }\n\n res = item.type.filter(itemType => itemType !== 'string').join(' | ');\n res += ' | ';\n res += `\"${item.default}\"`;\n }\n\n return res;\n};\n\n/**\n * get the array type as string\n * @method getArrayType\n * @param {object} item\n * @param {string} res\n * @returns {string} res eg: arrayOf(arrayOf(string | number | arrayOf(string | number)))\n */\nconst getArrayType = (item, res = '') => {\n if (item.type !== 'array') {\n if (Array.isArray(item.type) || isOneOfJsonSchema(item)) {\n return getOrType(item);\n }\n\n return item.type;\n }\n\n if (item.type === 'array') {\n res += 'arrayOf('; // eslint-disable-line no-param-reassign\n }\n res += getArrayType(item.items, ''); // eslint-disable-line no-param-reassign\n res += ')'; // eslint-disable-line no-param-reassign\n return res;\n};\n\n/**\n * get the type of this option item\n * @method getType\n * @param {ojbect} item option item\n * @returns {string} type\n */\nexport const getType = item => {\n if (isOneOfJsonSchema(item)) {\n return `oneOf(${getOrType(item)})`;\n }\n if (item.enum && Array.isArray(item.enum)) {\n const values =\n !isEmpty(item.enum) && typeof item.enum[0] === 'string'\n ? item.enum.map(v => `\"${v}\"`).join(', ')\n : item.enum.join(', ');\n\n return `oneOf([${values}])`;\n }\n\n if (Array.isArray(item.type)) {\n return getOrType(item);\n }\n\n if (item.type === 'array') {\n if ('items' in item) {\n return `arrayOf(${getType(item.items)})`;\n }\n return 'array';\n }\n return item.type;\n};\n\n/**\n * get the default value as string\n * @method getDefaultValue\n * @param {object | boolean | number | string} defaultValue\n * @returns {string | object[]} default value\n */\nconst getDefaultValue = defaultValue => {\n if (typeof defaultValue === 'boolean' || typeof defaultValue === 'number') {\n return defaultValue.toString();\n }\n if (Array.isArray(defaultValue)) {\n if (defaultValue.length > 1 && typeof defaultValue[0] === 'object') {\n // return the array only if the defaultValue is an object array\n return defaultValue;\n }\n const values = defaultValue.map(v => JSON.stringify(v)).join(', ');\n return `[${values}]`;\n }\n return defaultValue;\n};\n\nconst Pair = ({ title, content }) => (\n <PairContainer>\n <PairTitle>{`${title}:`}</PairTitle>\n {Array.isArray(content) ? (\n <PairValueJSON>\n <pre>\n <code>{JSON.stringify(content, null, 2)}</code>\n </pre>\n </PairValueJSON>\n ) : (\n <PairValue>{content}</PairValue>\n )}\n </PairContainer>\n);\n\nPair.propTypes = {\n title: T.string,\n content: T.oneOfType([T.string, T.arrayOf(T.object)]),\n};\n\nconst PropertyItems = ({ isPatternProperty = false, propsItems }) => (\n <PropertiesContainer isPatternProperty={isPatternProperty}>\n {isPatternProperty ? <PairTitle>{_('[fieldName]:')}</PairTitle> : null}\n <PropertiesContent isPatternProperty={isPatternProperty}>{propsItems}</PropertiesContent>\n </PropertiesContainer>\n);\n\nPropertyItems.propTypes = {\n isPatternProperty: T.bool,\n propsItems: T.array,\n};\n\nconst OptionItem = ({ name, type, desc, defaultValue, enumerable, PropertiesSection }) => (\n <Option>\n <OptionName>{name}</OptionName>\n {desc ? <Markdown style={{ marginLeft: 40 }} text={desc} /> : null}\n <Pair title={_('Type')} content={type} />\n {enumerable?.length > 0 && (\n <Pair\n title={_('oneOf')}\n content={`(${enumerable\n .map(\n entry =>\n `${typeof entry === 'string' ? '\"' : ''}${entry}${\n typeof entry === 'string' ? '\"' : ''\n }`\n )\n .join(' | ')})`}\n />\n )}\n {defaultValue && <Pair title={_('Default')} content={defaultValue} />}\n {PropertiesSection}\n </Option>\n);\n\nOptionItem.propTypes = {\n name: T.string,\n type: T.string,\n desc: T.string,\n enumerable: T.arrayOf(T.oneOfType([T.string, T.number])),\n defaultValue: T.oneOfType([T.string, T.arrayOf(T.object)]),\n PropertiesSection: T.element,\n};\n\nOptionItem.default = {\n PropertiesItem: null,\n};\n\nconst getPropertiesSection = (properties, patternProperties) => {\n let allProperties = [];\n let isPatternProperty = false;\n\n // the properties either comes from property field of the option schema item\n // or from the property field of each patternProperties of the option schema item\n // can check table tableFormat and columnFormat as examples\n if (!isEmpty(properties)) {\n allProperties = [properties];\n } else if (!isEmpty(patternProperties)) {\n Object.keys(patternProperties).forEach(patternKey => {\n const propsInPattern = patternProperties[patternKey].properties;\n if (propsInPattern) {\n allProperties.push(propsInPattern);\n }\n });\n\n isPatternProperty = true;\n }\n\n if (allProperties.length) {\n const allPropsItems = allProperties.map(props => {\n const propsItems = Object.keys(props).map(pKey => {\n const p = props[pKey];\n let pType = p.anyOf?.[0]\n ? getOptionDisplayType({ ...p.anyOf?.[0], enum: p.enum })\n : getOptionDisplayType({ ...p, enum: p.enum });\n const pDefault = getDefaultValue(p.default);\n\n let pEnumerable;\n // get nested oneOf property listing\n if (typeof p.anyOf?.[0]?.pattern === 'string') {\n pEnumerable = getPatternOptions(p.anyOf[0].pattern);\n } else if (p.anyOf?.[0]?.items?.enum?.length > 0) {\n // quick fix for nested `columnFormat` enumerables that replaces enums within brackets with raw JS types\n pType = pType.replace(/\\((.+?)\\)/g, 'string');\n pEnumerable = p.anyOf[0].items.enum;\n } else if (p.anyOf?.[0]?.items?.items?.enum?.length > 0) {\n // quick fix for nested `tableFormat` enumerables that replaces enums within brackets with raw JS types\n pType = pType.replace(/\\((.+?)\\)/g, 'string');\n pEnumerable = p.anyOf[0].items.items.enum;\n } else if (p.enum) {\n pEnumerable = p.enum;\n }\n\n // use the JS types (e.g. string, number) of the nested property if the nested property is an enumerable\n if (pEnumerable?.length) {\n pType = p.anyOf?.[0]?.type !== 'array' ? p.anyOf?.[0]?.type : pType;\n if (Array.isArray(pType)) {\n pType = pType.join(' | ');\n }\n }\n\n return (\n <OptionItem\n key={pKey}\n name={pKey}\n type={pType}\n enumerable={pEnumerable}\n desc={p.description}\n defaultValue={pDefault}\n />\n );\n });\n return (\n <PropertyItems\n key={propsItems}\n isPatternProperty={isPatternProperty}\n propsItems={propsItems}\n />\n );\n });\n\n return <PropertiesWrapper isPatternProperty={isPatternProperty}>{allPropsItems}</PropertiesWrapper>;\n }\n return null;\n};\n\nconst OptionsDoc = ({ options, description }) => (\n <div>\n {options.length === 0 ? (\n <Heading level={4}> No Options</Heading>\n ) : (\n <Heading level={4}>Options</Heading>\n )}\n {description && <div>{description}</div>}\n {Object.entries(options).map(([key, item]) => {\n let type;\n let enumerable = [];\n let PropertiesSection = null;\n\n // get oneOf property listing\n if (typeof item.anyOf?.[0]?.pattern === 'string') {\n enumerable = getPatternOptions(item.anyOf[0].pattern);\n } else if (item.enum) {\n enumerable = item.enum;\n }\n\n // get the nested options inside {option}.items.anyof. e.g. 'layers' in Map\n if (item.anyOf?.[0]?.type === 'array' && 'anyOf' in item.anyOf?.[0]?.items) {\n type = getOptionDisplayType(item);\n const { patternProperties } = item;\n // merge the 3 objects together instead of showing the longest options in the array\n const option = item.anyOf?.[0]?.items?.anyOf;\n const mergedOptions = option.reduce((prev, next) => merge(prev, next), {});\n const { properties } = mergedOptions;\n PropertiesSection = getPropertiesSection(properties, patternProperties);\n return (\n <OptionItem\n key={key}\n name={key}\n type={type}\n enumerable={enumerable}\n desc={item.description}\n PropertiesSection={PropertiesSection}\n />\n );\n }\n\n if (item.type === 'object') {\n // get properties for object type\n type = item.type;\n const { properties } = item;\n const { patternProperties } = item;\n PropertiesSection = getPropertiesSection(properties, patternProperties);\n } else if (enumerable?.length) {\n // use the JS types (e.g. string, number) of the property if the property is an enumerable\n type = item.anyOf?.[0]?.type;\n if (Array.isArray(type)) {\n type = type.join(' | ');\n }\n } else {\n type = getOptionDisplayType({ ...item.anyOf[0], enum: item.enum });\n }\n\n return (\n <OptionItem\n key={key}\n name={key}\n // item.anyOf in the config.ts is a tuple which holds [{ type, pattern, items }, { type, pattern: DYNAMIC_OPTIONS_PATTERN }]\n type={type}\n enumerable={enumerable}\n desc={item.description}\n defaultValue={getDefaultValue(item.default)}\n PropertiesSection={PropertiesSection}\n />\n );\n })}\n </div>\n);\n\nOptionsDoc.propTypes = {\n options: T.object.isRequired,\n description: T.string,\n};\n\nexport default OptionsDoc;\n","import { get, range } from 'lodash';\nimport { DYNAMIC_OPTIONS_DSL_PATTERN } from '@splunk/visualizations-shared/schemaUtils';\nimport type { JSONSchema7Definition } from 'json-schema';\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: 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 isDynamicOption,\n getInitialPreset,\n generatePrecisionValues,\n uncollapseEditorConfig,\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/schemaUtils\");"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///./.storybook/utils/storybookUtils.ts","webpack:///external \"@babel/runtime/helpers/typeof\"","webpack:///external \"@splunk/react-ui/Markdown\"","webpack:///external \"@babel/runtime/helpers/slicedToArray\"","webpack:///external \"lodash/isEmpty\"","webpack:///external \"styled-components\"","webpack:///external \"lodash\"","webpack:///external \"@splunk/react-ui/Heading\"","webpack:///./src/common/OptionsDoc.jsx","webpack:///external \"@splunk/visualizations-shared/configUtils\"","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@babel/runtime/helpers/defineProperty\""],"names":["Option","styled","OptionName","PairContainer","PairTitle","PairValue","PairValueJSON","PropertiesWrapper","props","PropertiesContainer","PropertiesContent","isOneOfJsonSchema","item","Array","getOrType","res","one","getArrayType","isEmpty","itemType","getType","values","getDefaultValue","defaultValue","JSON","Pair","title","content","T","PropertyItems","isPatternProperty","propsItems","_","array","OptionItem","name","type","desc","enumerable","PropertiesSection","marginLeft","element","PropertiesItem","getPropertiesSection","allProperties","Object","propsInPattern","patternProperties","allPropsItems","p","pType","getOptionDisplayType","enum","pDefault","pEnumerable","getPatternOptions","OptionsDoc","options","description","key","option","mergedOptions","merge","properties","string"],"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;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CA;AALJ,WAMO,qEAAID,YAAJ,QAAwB;AAAA,uCAC3B;;;AACAF,UAAI,mBAAGxB,IAAI,CAAP,uEAAGA,aAAH,CAAGA,CAAH,kDAAGA,cAAPwB;;AACA,UAAIvB,KAAK,CAALA,QAAJ,IAAIA,CAAJ,EAAyB;AACrBuB,YAAI,GAAGA,IAAI,CAAJA,KAAPA,KAAOA,CAAPA;AACH;AALE,WAMA;AACHA,UAAI,GAAGe,6FAAoB,iCAAMvC,IAAI,CAAJA,MAAN,CAAMA,CAAN;AAAqBwC,YAAI,EAAExC,IAAI,CAACwC;AAAhC,SAA3BhB;AACH;;AAED,wBACI;AACI,SAAG,EADP;AAEI,UAAI,EAFR,IAGI;AAHJ;AAII,UAAI,EAJR;AAKI,gBAAU,EALd;AAMI,UAAI,EAAExB,IAAI,CANd;AAOI,kBAAY,EAAEU,eAAe,CAACV,IAAI,CAPtC,OAOiC,CAPjC;AAQI,uBAAiB,EAAE2B;AARvB,MADJ;AAzDO,GAQV,CAPL,CADe;AAAnB;;AAyEAiB,UAAU,CAAVA,YAAuB;AACnBC,SAAO,EAAE7B,iDAAC,CAADA,OADU;AAEnB8B,aAAW,EAAE9B,iDAAC,CAACoC;AAFI,CAAvBR;AAKA,2E;;;;;;;AC9YA,sE;;;;;;;ACAA,kD;;;;;;;ACAA,kE","file":"OptionsDoc.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 = 51);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","import { get, omit, reduce, toNumber, isString } from 'lodash';\nimport { OptionsSchema } from '../../src/common/interfaces/OptionsSchema';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\n\ninterface ArgTypeControl {\n type: string;\n options?: string[];\n min?: number;\n max?: number;\n}\n\ninterface ArgTypeEntry {\n description?: string;\n control: ArgTypeControl;\n name: string;\n defaultValue?: any;\n type: { required: boolean };\n optionType: string;\n table: {\n type: { summary: string };\n defaultValue?: { summary: any };\n category?: string;\n subcategory?: string;\n disable?: boolean;\n };\n}\n\nexport interface ArgTypes {\n [key: string]: ArgTypeEntry;\n}\n\ntype StoriesList = RegExp | string[];\n\n/**\n * Returns type options from pattern\n * @example\n * // returns ['fixed', 'absolute', 'off']\n * getPatternOptions('\\$(\\w+:)?([^$|:]+?)(\\|[|\\w]+)?\\$|^fixed$|^absolute$|^off$')\n * @example\n * // returns []\n * getPatternOptions('^>.*')\n * @param {string} patternString - visualization option type pattern\n * @return {string[]} array of type options\n */\nexport const getPatternOptions = (patternString): string[] =>\n patternString.replace(/\\$/g, '').split('|^').slice(1);\n\n/**\n * Returns Storybook display type for an option\n * @param {object} option - visualization option\n * @return {string} Storybook display type\n */\nexport const getOptionDisplayType = (option): string => {\n const { oneOf, anyOf, type, enum: en, pattern, items } = option;\n let displayTypes: string[] = [];\n\n // wrap values in quotes only if enum or pattern is string\n const conditionalQuote = type === 'string' ? '\"' : '';\n if (en && Array.isArray(en)) {\n displayTypes = en.map(e => {\n const enumQuote = typeof e === 'string' ? '\"' : '';\n return `${enumQuote}${e}${enumQuote}`;\n });\n } else if (type === 'array' && items) {\n return `${getOptionDisplayType(items)}[]`;\n } else if (anyOf && Array.isArray(anyOf)) {\n return getOptionDisplayType(anyOf[0]);\n } else if (oneOf && Array.isArray(oneOf)) {\n displayTypes = oneOf.map(item => getOptionDisplayType(item));\n } else if (Array.isArray(type)) {\n displayTypes = type;\n } else if (pattern) {\n displayTypes = getPatternOptions(pattern).map(p => `${conditionalQuote}${p}${conditionalQuote}`);\n }\n\n if (displayTypes.length > 0) {\n return `(${displayTypes.join(' | ')})`;\n }\n return type;\n};\n\n/**\n * Returns Storybook control type for an option\n * @param {object} option - visualization option\n * @param {string} optionKey - visualization option key\n * @return {ArgTypeControl} Storybook control object\n */\nexport const getOptionControl = (option, optionKey): ArgTypeControl => {\n const { anyOf } = option;\n const schema = Array.isArray(anyOf) && anyOf.length ? anyOf[0] : option;\n\n const type = Array.isArray(schema.type) ? schema.type[0] : schema.type;\n const { maximum, minimum, enum: en } = schema;\n\n const isColorOption = new RegExp(/color/, 'i').test(optionKey) && type !== 'array';\n\n if (isColorOption) {\n return { type: 'color' };\n } else if (en && Array.isArray(en)) {\n return { type: 'select', options: en };\n } else if (anyOf && type === 'string' && anyOf[0].pattern) {\n return { type: 'select', options: getPatternOptions(anyOf[0].pattern) };\n } else if (type === 'number' && (minimum || maximum)) {\n return {\n type: 'range',\n ...(typeof minimum === 'number' && { min: minimum }),\n ...(typeof maximum === 'number' && { max: maximum }),\n };\n } else if (type === 'string') {\n return { type: 'text' };\n }\n\n return { type };\n};\n\n/**\n * platform specific visualization option argTypes\n */\nconst objectTableControl = { control: { type: 'object' } };\nconst disableTableControl = { table: { disable: true } };\nexport const platformOptionArgTypes = {\n context: objectTableControl,\n dataSources: objectTableControl,\n dataSource: disableTableControl,\n options: disableTableControl,\n onEventTrigger: { action: 'eventTrigger', ...disableTableControl },\n hasEventHandlers: disableTableControl,\n};\n\n/**\n * Returns formatted Storybook argTypes for a visualization from its options schema\n * @param {OptionsSchema} options - visualization options\n * @param {string[]} requiredProps - required visualization props\n * @param {boolean} isPlatformViz - indicates if pure or platform visualization\n * @param {string} subcategory - nested property parent option name\n * @return {ArgTypes} Storybook argTypes\n */\nexport const optionsSchemaToArgTypes = ({\n options = {},\n requiredProps = [],\n isPlatformViz = false,\n subcategory = null,\n}: {\n options: OptionsSchema;\n requiredProps: string[];\n isPlatformViz?: boolean;\n subcategory?: string;\n}): ArgTypes => {\n const validObjectTypeOptions = ['lineDashStylesByField', 'seriesColorsByField', 'fieldActions'];\n let argTypes: ArgTypes = {};\n Object.keys(options).forEach(optionKey => {\n const option = get(options, optionKey);\n if (option.type === 'object' && !validObjectTypeOptions.includes(optionKey)) {\n // do not support controls for patternProperties, only nested properties\n if (option.properties) {\n argTypes = {\n ...argTypes,\n ...optionsSchemaToArgTypes({\n options: option.properties as OptionsSchema,\n isPlatformViz,\n requiredProps,\n subcategory: optionKey,\n }),\n };\n }\n } else {\n const { description, default: optionDefault } = option;\n const optionControl = getOptionControl(option, optionKey);\n const control = isPlatformViz ? { type: 'text' } : optionControl;\n const required = requiredProps.includes(optionKey);\n\n let defaultValue = optionDefault;\n if (!isPlatformViz && isDynamicOption(optionDefault as string)) {\n defaultValue = null;\n }\n\n argTypes[optionKey] = {\n description,\n control,\n name: optionKey,\n defaultValue,\n type: { required },\n optionType: optionControl.type,\n table: {\n type: { summary: getOptionDisplayType(option) },\n defaultValue: { summary: defaultValue },\n ...(subcategory && {\n category: 'Nested Options',\n subcategory,\n }),\n },\n };\n }\n });\n\n if (isPlatformViz) {\n Object.assign(argTypes, platformOptionArgTypes);\n }\n return argTypes;\n};\n\n/**\n * Helper which converts string visualization options to their required type\n * @param {any} value - option values\n * @param {string} expectedType - expected option type\n * @return {any} correctly typed option value\n */\nexport const transformOptionType = (value, expectedType = 'string'): any => {\n const isStringValue = !isDynamicOption(value) && isString(value);\n if (isStringValue && expectedType === 'boolean') return value == 'true';\n else if (isStringValue && expectedType === 'number') return toNumber(value);\n return value;\n};\n\n// stringify these fields for storybook controls' support\nconst FieldsToStringify = [\n 'layers',\n 'center',\n 'eventActions',\n 'fieldActions',\n 'legendLabels',\n 'lineDashStylesByField',\n 'seriesColors',\n 'seriesColorsByField',\n 'footerFields',\n // 'footerFieldsHighlighted',\n];\n\n/**\n * Helper which returns platform visualization options from Storybook controls\n * Utilizes argTypes to determine valid and nested options\n * @param {object} args - visualization story args\n * @param {ArgTypes} argTypes - visualization argTypes\n * @return {object} visualization options\n */\nexport const getOptionsFromArgTypes = (args: Record<string, any>, argTypes: ArgTypes): Record<string, any> =>\n reduce(\n argTypes,\n (accum, val, option) => {\n const subcategory = get(val, 'table.subcategory');\n const { optionType, defaultValue } = argTypes[option];\n let controlledOption = transformOptionType(get(args, option), optionType);\n // filter options from react & json if set to default value or is undefined\n if (optionType && controlledOption != null && controlledOption !== defaultValue) {\n // parse the value if option is stringified as part of flattenVizOptions\n if (FieldsToStringify.includes(option)) {\n try {\n controlledOption = JSON.parse(controlledOption);\n } catch (e) {\n controlledOption = null;\n }\n }\n if (subcategory) {\n if (!accum[subcategory]) accum[subcategory] = {};\n accum[subcategory][option] = controlledOption;\n } else accum[option] = controlledOption;\n }\n return accum;\n },\n { ...omit(args.options, Object.keys(argTypes)) }\n );\n\n/**\n * Helper which flattens objects single depth level\n * @param {object} options - visualization options object\n * @return {object} flattened visualization options\n */\nexport const flattenVizOptions = (options: Record<string, any>): Record<string, any> => {\n const nonFlattenOptions = new Set(['y2Fields', 'overlayFields', 'gaugeRanges', 'fieldActions']);\n return reduce(\n options,\n (accum, val, option) => {\n if (!platformOptionArgTypes[option]) {\n if (typeof val === 'object' && FieldsToStringify.includes(option))\n accum[option] = JSON.stringify(val);\n else if (typeof val === 'object' && !nonFlattenOptions.has(option))\n accum = { ...accum, ...val };\n else accum[option] = val;\n }\n return accum;\n },\n {}\n );\n};\n/**\n * Returns value based on Storybook publishing status\n * @param {T} publishedStories - stories to include in published Storybook\n * @param {T} localStories - stories to include in local Storybook\n * @return {T} one of the two params\n */\nexport const getStoriesToInclude = <T>(publishedStories: T, localStories: T): T =>\n process.env.STORYBOOK_PUBLISH ? publishedStories : localStories;\n\n/**\n * Returns component level stories to include, defaults to innclude all stories\n * @param {StoriesList} stories - stories to include in published Storybook\n * @return {object} CSF includeStories config\n */\nexport const componentStoriesToInclude = (stories: StoriesList): object =>\n getStoriesToInclude({ includeStories: stories }, {});\n","module.exports = require(\"@babel/runtime/helpers/typeof\");","module.exports = require(\"@splunk/react-ui/Markdown\");","module.exports = require(\"@babel/runtime/helpers/slicedToArray\");","module.exports = require(\"lodash/isEmpty\");","module.exports = require(\"styled-components\");","module.exports = require(\"lodash\");","module.exports = require(\"@splunk/react-ui/Heading\");","import React from 'react';\nimport T from 'prop-types';\nimport isEmpty from 'lodash/isEmpty';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport Heading from '@splunk/react-ui/Heading';\nimport Markdown from '@splunk/react-ui/Markdown';\nimport styled from 'styled-components';\nimport { merge } from 'lodash';\nimport { getOptionDisplayType, getPatternOptions } from '../../.storybook/utils/storybookUtils';\n\nconst Option = styled.div`\n margin-top: 20px;\n`;\nconst OptionName = styled.div`\n color: #5ca300;\n padding-bottom: 5px;\n`;\nconst PairContainer = styled.div`\n margin-left: 40px;\n margin-top: 10px;\n`;\nconst PairTitle = styled.span`\n display: inline-block;\n color: #8293a7;\n width: 80px;\n`;\n\nconst PairValue = styled.span`\n font-family: 'Splunk Platform Mono', 'monospace';\n white-space: pre;\n`;\n\nconst PairValueJSON = styled.div`\n margin-left: 80px;\n pre {\n margin: 0;\n }\n code {\n font-size: 12px;\n font-family: 'Splunk Platform Mono', 'monospace';\n }\n`;\n\nconst PropertiesWrapper = styled.div`\n margin-left: ${props => (props.isPatternProperty ? 0 : 40)}px;\n margin-top: 20px;\n`;\n\nconst PropertiesContainer = styled.div`\n margin-left: ${props => (props.isPatternProperty ? 40 : 0)}px;\n margin-top: 10px;\n`;\n\nconst PropertiesContent = styled.div`\n margin-left: ${props => (props.isPatternProperty ? 40 : 0)}px;\n`;\n\n/**\n * @method isOneOfJsonSchema\n * @param {object} item\n * @returns {boolean}\n */\nconst isOneOfJsonSchema = item => item.oneOf && Array.isArray(item.oneOf);\n\n/**\n * get Or type as string\n * @method getOrType\n * @param {object} item\n * @param {string} res\n * @returns {string} res eg: (string | number)\n */\nconst getOrType = item => {\n let res = '';\n\n if (isOneOfJsonSchema(item)) {\n res = item.oneOf\n .map(one => {\n if (one.type !== 'array') {\n return one.type;\n }\n // eslint-disable-next-line no-use-before-define\n return getArrayType(one, '');\n })\n .join(' | ');\n } else if (Array.isArray(item.type)) {\n if (isEmpty(item.default)) {\n return item.type.join(' | ');\n }\n\n res = item.type.filter(itemType => itemType !== 'string').join(' | ');\n res += ' | ';\n res += `\"${item.default}\"`;\n }\n\n return res;\n};\n\n/**\n * get the array type as string\n * @method getArrayType\n * @param {object} item\n * @param {string} res\n * @returns {string} res eg: arrayOf(arrayOf(string | number | arrayOf(string | number)))\n */\nconst getArrayType = (item, res = '') => {\n if (item.type !== 'array') {\n if (Array.isArray(item.type) || isOneOfJsonSchema(item)) {\n return getOrType(item);\n }\n\n return item.type;\n }\n\n if (item.type === 'array') {\n res += 'arrayOf('; // eslint-disable-line no-param-reassign\n }\n res += getArrayType(item.items, ''); // eslint-disable-line no-param-reassign\n res += ')'; // eslint-disable-line no-param-reassign\n return res;\n};\n\n/**\n * get the type of this option item\n * @method getType\n * @param {ojbect} item option item\n * @returns {string} type\n */\nexport const getType = item => {\n if (isOneOfJsonSchema(item)) {\n return `oneOf(${getOrType(item)})`;\n }\n if (item.enum && Array.isArray(item.enum)) {\n const values =\n !isEmpty(item.enum) && typeof item.enum[0] === 'string'\n ? item.enum.map(v => `\"${v}\"`).join(', ')\n : item.enum.join(', ');\n\n return `oneOf([${values}])`;\n }\n\n if (Array.isArray(item.type)) {\n return getOrType(item);\n }\n\n if (item.type === 'array') {\n if ('items' in item) {\n return `arrayOf(${getType(item.items)})`;\n }\n return 'array';\n }\n return item.type;\n};\n\n/**\n * get the default value as string\n * @method getDefaultValue\n * @param {object | boolean | number | string} defaultValue\n * @returns {string | object[]} default value\n */\nconst getDefaultValue = defaultValue => {\n if (typeof defaultValue === 'boolean' || typeof defaultValue === 'number') {\n return defaultValue.toString();\n }\n if (Array.isArray(defaultValue)) {\n if (defaultValue.length > 1 && typeof defaultValue[0] === 'object') {\n // return the array only if the defaultValue is an object array\n return defaultValue;\n }\n const values = defaultValue.map(v => JSON.stringify(v)).join(', ');\n return `[${values}]`;\n }\n return defaultValue;\n};\n\nconst Pair = ({ title, content }) => (\n <PairContainer>\n <PairTitle>{`${title}:`}</PairTitle>\n {Array.isArray(content) ? (\n <PairValueJSON>\n <pre>\n <code>{JSON.stringify(content, null, 2)}</code>\n </pre>\n </PairValueJSON>\n ) : (\n <PairValue>{content}</PairValue>\n )}\n </PairContainer>\n);\n\nPair.propTypes = {\n title: T.string,\n content: T.oneOfType([T.string, T.arrayOf(T.object)]),\n};\n\nconst PropertyItems = ({ isPatternProperty = false, propsItems }) => (\n <PropertiesContainer isPatternProperty={isPatternProperty}>\n {isPatternProperty ? <PairTitle>{_('[fieldName]:')}</PairTitle> : null}\n <PropertiesContent isPatternProperty={isPatternProperty}>{propsItems}</PropertiesContent>\n </PropertiesContainer>\n);\n\nPropertyItems.propTypes = {\n isPatternProperty: T.bool,\n propsItems: T.array,\n};\n\nconst OptionItem = ({ name, type, desc, defaultValue, enumerable, PropertiesSection }) => (\n <Option>\n <OptionName>{name}</OptionName>\n {desc ? <Markdown style={{ marginLeft: 40 }} text={desc} /> : null}\n <Pair title={_('Type')} content={type} />\n {enumerable?.length > 0 && (\n <Pair\n title={_('oneOf')}\n content={`(${enumerable\n .map(\n entry =>\n `${typeof entry === 'string' ? '\"' : ''}${entry}${\n typeof entry === 'string' ? '\"' : ''\n }`\n )\n .join(' | ')})`}\n />\n )}\n {defaultValue && <Pair title={_('Default')} content={defaultValue} />}\n {PropertiesSection}\n </Option>\n);\n\nOptionItem.propTypes = {\n name: T.string,\n type: T.string,\n desc: T.string,\n enumerable: T.arrayOf(T.oneOfType([T.string, T.number])),\n defaultValue: T.oneOfType([T.string, T.arrayOf(T.object)]),\n PropertiesSection: T.element,\n};\n\nOptionItem.default = {\n PropertiesItem: null,\n};\n\nconst getPropertiesSection = (properties, patternProperties) => {\n let allProperties = [];\n let isPatternProperty = false;\n\n // the properties either comes from property field of the option schema item\n // or from the property field of each patternProperties of the option schema item\n // can check table tableFormat and columnFormat as examples\n if (!isEmpty(properties)) {\n allProperties = [properties];\n } else if (!isEmpty(patternProperties)) {\n Object.keys(patternProperties).forEach(patternKey => {\n const propsInPattern = patternProperties[patternKey].properties;\n if (propsInPattern) {\n allProperties.push(propsInPattern);\n }\n });\n\n isPatternProperty = true;\n }\n\n if (allProperties.length) {\n const allPropsItems = allProperties.map(props => {\n const propsItems = Object.keys(props).map(pKey => {\n const p = props[pKey];\n let pType = p.anyOf?.[0]\n ? getOptionDisplayType({ ...p.anyOf?.[0], enum: p.enum })\n : getOptionDisplayType({ ...p, enum: p.enum });\n const pDefault = getDefaultValue(p.default);\n\n let pEnumerable;\n // get nested oneOf property listing\n if (typeof p.anyOf?.[0]?.pattern === 'string') {\n pEnumerable = getPatternOptions(p.anyOf[0].pattern);\n } else if (p.anyOf?.[0]?.items?.enum?.length > 0) {\n // quick fix for nested `columnFormat` enumerables that replaces enums within brackets with raw JS types\n pType = pType.replace(/\\((.+?)\\)/g, 'string');\n pEnumerable = p.anyOf[0].items.enum;\n } else if (p.anyOf?.[0]?.items?.items?.enum?.length > 0) {\n // quick fix for nested `tableFormat` enumerables that replaces enums within brackets with raw JS types\n pType = pType.replace(/\\((.+?)\\)/g, 'string');\n pEnumerable = p.anyOf[0].items.items.enum;\n } else if (p.enum) {\n pEnumerable = p.enum;\n }\n\n // use the JS types (e.g. string, number) of the nested property if the nested property is an enumerable\n if (pEnumerable?.length) {\n pType = p.anyOf?.[0]?.type !== 'array' ? p.anyOf?.[0]?.type : pType;\n if (Array.isArray(pType)) {\n pType = pType.join(' | ');\n }\n }\n\n return (\n <OptionItem\n key={pKey}\n name={pKey}\n type={pType}\n enumerable={pEnumerable}\n desc={p.description}\n defaultValue={pDefault}\n />\n );\n });\n return (\n <PropertyItems\n key={propsItems}\n isPatternProperty={isPatternProperty}\n propsItems={propsItems}\n />\n );\n });\n\n return <PropertiesWrapper isPatternProperty={isPatternProperty}>{allPropsItems}</PropertiesWrapper>;\n }\n return null;\n};\n\nconst OptionsDoc = ({ options, description }) => (\n <div>\n {options.length === 0 ? (\n <Heading level={4}> No Options</Heading>\n ) : (\n <Heading level={4}>Options</Heading>\n )}\n {description && <div>{description}</div>}\n {Object.entries(options).map(([key, item]) => {\n let type;\n let enumerable = [];\n let PropertiesSection = null;\n\n // get oneOf property listing\n if (typeof item.anyOf?.[0]?.pattern === 'string') {\n enumerable = getPatternOptions(item.anyOf[0].pattern);\n } else if (item.enum) {\n enumerable = item.enum;\n }\n\n // get the nested options inside {option}.items.anyof. e.g. 'layers' in Map\n if (item.anyOf?.[0]?.type === 'array' && 'anyOf' in item.anyOf?.[0]?.items) {\n type = getOptionDisplayType(item);\n const { patternProperties } = item;\n // merge the 3 objects together instead of showing the longest options in the array\n const option = item.anyOf?.[0]?.items?.anyOf;\n const mergedOptions = option.reduce((prev, next) => merge(prev, next), {});\n const { properties } = mergedOptions;\n PropertiesSection = getPropertiesSection(properties, patternProperties);\n return (\n <OptionItem\n key={key}\n name={key}\n type={type}\n enumerable={enumerable}\n desc={item.description}\n PropertiesSection={PropertiesSection}\n />\n );\n }\n\n if (item.type === 'object') {\n // get properties for object type\n type = item.type;\n const { properties } = item;\n const { patternProperties } = item;\n PropertiesSection = getPropertiesSection(properties, patternProperties);\n } else if (enumerable?.length) {\n // use the JS types (e.g. string, number) of the property if the property is an enumerable\n type = item.anyOf?.[0]?.type;\n if (Array.isArray(type)) {\n type = type.join(' | ');\n }\n } else {\n type = getOptionDisplayType({ ...item.anyOf[0], enum: item.enum });\n }\n\n return (\n <OptionItem\n key={key}\n name={key}\n // item.anyOf in the config.ts is a tuple which holds [{ type, pattern, items }, { type, pattern: DYNAMIC_OPTIONS_PATTERN }]\n type={type}\n enumerable={enumerable}\n desc={item.description}\n defaultValue={getDefaultValue(item.default)}\n PropertiesSection={PropertiesSection}\n />\n );\n })}\n </div>\n);\n\nOptionsDoc.propTypes = {\n options: T.object.isRequired,\n description: T.string,\n};\n\nexport default OptionsDoc;\n","module.exports = require(\"@splunk/visualizations-shared/configUtils\");","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");"],"sourceRoot":""}
|
package/common/OverviewDoc.js
CHANGED
|
@@ -87,7 +87,7 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 53);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -120,7 +120,7 @@ module.exports = require("@splunk/react-ui/Heading");
|
|
|
120
120
|
|
|
121
121
|
/***/ }),
|
|
122
122
|
|
|
123
|
-
/***/
|
|
123
|
+
/***/ 53:
|
|
124
124
|
/***/ (function(module, exports, __webpack_require__) {
|
|
125
125
|
|
|
126
126
|
"use strict";
|
|
@@ -140,27 +140,27 @@ var T = __webpack_require__(1);
|
|
|
140
140
|
|
|
141
141
|
var styled_components_1 = __webpack_require__(2);
|
|
142
142
|
|
|
143
|
-
var DocExample_1 = __webpack_require__(
|
|
143
|
+
var DocExample_1 = __webpack_require__(54);
|
|
144
144
|
|
|
145
|
-
var Paragraph_1 = __webpack_require__(
|
|
145
|
+
var Paragraph_1 = __webpack_require__(55);
|
|
146
146
|
|
|
147
147
|
var Heading_1 = __webpack_require__(5);
|
|
148
148
|
|
|
149
|
-
var List_1 = __webpack_require__(
|
|
149
|
+
var List_1 = __webpack_require__(56);
|
|
150
150
|
|
|
151
|
-
var Chip_1 = __webpack_require__(
|
|
151
|
+
var Chip_1 = __webpack_require__(57);
|
|
152
152
|
|
|
153
|
-
var ChartLine_1 = __webpack_require__(
|
|
153
|
+
var ChartLine_1 = __webpack_require__(58);
|
|
154
154
|
|
|
155
|
-
var ChartBar_1 = __webpack_require__(
|
|
155
|
+
var ChartBar_1 = __webpack_require__(59);
|
|
156
156
|
|
|
157
|
-
var ChartScatter_1 = __webpack_require__(
|
|
157
|
+
var ChartScatter_1 = __webpack_require__(60);
|
|
158
158
|
|
|
159
|
-
var ChoroplethMap_1 = __webpack_require__(
|
|
159
|
+
var ChoroplethMap_1 = __webpack_require__(61);
|
|
160
160
|
|
|
161
|
-
var SplitBy_1 = __webpack_require__(
|
|
161
|
+
var SplitBy_1 = __webpack_require__(62);
|
|
162
162
|
|
|
163
|
-
var VizCategory_1 = __webpack_require__(
|
|
163
|
+
var VizCategory_1 = __webpack_require__(63);
|
|
164
164
|
|
|
165
165
|
var chipIconStyles = {
|
|
166
166
|
color: 'white'
|
|
@@ -273,70 +273,70 @@ exports.default = OverviewDoc;
|
|
|
273
273
|
|
|
274
274
|
/***/ }),
|
|
275
275
|
|
|
276
|
-
/***/
|
|
276
|
+
/***/ 54:
|
|
277
277
|
/***/ (function(module, exports) {
|
|
278
278
|
|
|
279
279
|
module.exports = require("@splunk/react-docs/DocExample");
|
|
280
280
|
|
|
281
281
|
/***/ }),
|
|
282
282
|
|
|
283
|
-
/***/
|
|
283
|
+
/***/ 55:
|
|
284
284
|
/***/ (function(module, exports) {
|
|
285
285
|
|
|
286
286
|
module.exports = require("@splunk/react-ui/Paragraph");
|
|
287
287
|
|
|
288
288
|
/***/ }),
|
|
289
289
|
|
|
290
|
-
/***/
|
|
290
|
+
/***/ 56:
|
|
291
291
|
/***/ (function(module, exports) {
|
|
292
292
|
|
|
293
293
|
module.exports = require("@splunk/react-ui/List");
|
|
294
294
|
|
|
295
295
|
/***/ }),
|
|
296
296
|
|
|
297
|
-
/***/
|
|
297
|
+
/***/ 57:
|
|
298
298
|
/***/ (function(module, exports) {
|
|
299
299
|
|
|
300
300
|
module.exports = require("@splunk/react-ui/Chip");
|
|
301
301
|
|
|
302
302
|
/***/ }),
|
|
303
303
|
|
|
304
|
-
/***/
|
|
304
|
+
/***/ 58:
|
|
305
305
|
/***/ (function(module, exports) {
|
|
306
306
|
|
|
307
307
|
module.exports = require("@splunk/react-icons/ChartLine");
|
|
308
308
|
|
|
309
309
|
/***/ }),
|
|
310
310
|
|
|
311
|
-
/***/
|
|
311
|
+
/***/ 59:
|
|
312
312
|
/***/ (function(module, exports) {
|
|
313
313
|
|
|
314
314
|
module.exports = require("@splunk/react-icons/ChartBar");
|
|
315
315
|
|
|
316
316
|
/***/ }),
|
|
317
317
|
|
|
318
|
-
/***/
|
|
318
|
+
/***/ 60:
|
|
319
319
|
/***/ (function(module, exports) {
|
|
320
320
|
|
|
321
321
|
module.exports = require("@splunk/react-icons/ChartScatter");
|
|
322
322
|
|
|
323
323
|
/***/ }),
|
|
324
324
|
|
|
325
|
-
/***/
|
|
325
|
+
/***/ 61:
|
|
326
326
|
/***/ (function(module, exports) {
|
|
327
327
|
|
|
328
328
|
module.exports = require("@splunk/react-icons/ChoroplethMap");
|
|
329
329
|
|
|
330
330
|
/***/ }),
|
|
331
331
|
|
|
332
|
-
/***/
|
|
332
|
+
/***/ 62:
|
|
333
333
|
/***/ (function(module, exports) {
|
|
334
334
|
|
|
335
335
|
module.exports = require("@splunk/react-icons/SplitBy");
|
|
336
336
|
|
|
337
337
|
/***/ }),
|
|
338
338
|
|
|
339
|
-
/***/
|
|
339
|
+
/***/ 63:
|
|
340
340
|
/***/ (function(module, exports, __webpack_require__) {
|
|
341
341
|
|
|
342
342
|
"use strict";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///external \"styled-components\"","webpack:///external \"@splunk/react-ui/Heading\"","webpack:///./src/common/OverviewDoc.tsx","webpack:///external \"@splunk/react-docs/DocExample\"","webpack:///external \"@splunk/react-ui/Paragraph\"","webpack:///external \"@splunk/react-ui/List\"","webpack:///external \"@splunk/react-ui/Chip\"","webpack:///external \"@splunk/react-icons/ChartLine\"","webpack:///external \"@splunk/react-icons/ChartBar\"","webpack:///external \"@splunk/react-icons/ChartScatter\"","webpack:///external \"@splunk/react-icons/ChoroplethMap\"","webpack:///external \"@splunk/react-icons/SplitBy\"","webpack:///./src/common/interfaces/VizCategory.ts","webpack:///external \"@babel/runtime/helpers/defineProperty\""],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFA,kC;;;;;;;ACAA,uC;;;;;;;ACAA,8C;;;;;;;ACAA,qD;;;;;;;;;;;;;;;;;;ACAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AAYA,IAAM,cAAc,GAAG;AACnB,OAAK,EAAE;AADY,CAAvB;AAIA,IAAM,QAAQ,+CACT,0BAAY,MADH,EACY;AAClB,iBAAe,EAAE,SADC;AAElB,MAAI,EAAE,oBAAC,mBAAD,EAAU;AAAC,SAAK,EAAE;AAAR,GAAV;AAFY,CADZ,8BAKT,0BAAY,WALH,EAKiB;AACvB,iBAAe,EAAE,SADM;AAEvB,MAAI,EAAE,oBAAC,kBAAD,EAAS;AAAC,SAAK,EAAE;AAAR,GAAT;AAFiB,CALjB,8BAST,0BAAY,WATH,EASiB;AACvB,iBAAe,EAAE,SADM;AAEvB,MAAI,E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AU,EAAE,UAAb;AAAyB,iBAAa,EAAE;AAAxC,GAAX,CAftB,CADJ;AAmBH,CA3BD;;AA6BA,WAAW,CAAC,SAAZ,GAAwB;AACpB,UAAQ,EAAE,CAAC,CAAC,MADQ;AAEpB,eAAa,EAAE,CAAC,CAAC;AAFG,CAAxB;AAKA,kBAAe,WAAf,C;;;;;;;ACxIA,0D;;;;;;;ACAA,uD;;;;;;;ACAA,kD;;;;;;;ACAA,kD;;;;;;;ACAA,0D;;;;;;;ACAA,yD;;;;;;;ACAA,6D;;;;;;;ACAA,8D;;;;;;;ACAA,wD;;;;;;;;;;;;;;ACAA,IAAY,WAAZ;;AAAA,WAAY,WAAZ,EAAuB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACH,CAbD,EAAY,WAAW,GAAX,8CAAW,EAAX,CAAZ,E;;;;;;;ACAA,kE","file":"OverviewDoc.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 54);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","module.exports = require(\"styled-components\");","module.exports = require(\"@splunk/react-ui/Heading\");","import * as React from 'react';\nimport * as T from 'prop-types';\nimport styled from 'styled-components';\nimport DocExample from '@splunk/react-docs/DocExample';\nimport P from '@splunk/react-ui/Paragraph';\nimport Heading from '@splunk/react-ui/Heading';\nimport List from '@splunk/react-ui/List';\nimport Chip from '@splunk/react-ui/Chip';\nimport ChartLine from '@splunk/react-icons/ChartLine';\nimport ChartBar from '@splunk/react-icons/ChartBar';\nimport ChartScatter from '@splunk/react-icons/ChartScatter';\nimport ChoroplethMap from '@splunk/react-icons/ChoroplethMap';\nimport SplitBy from '@splunk/react-icons/SplitBy';\nimport { Overview, Variation } from './interfaces/Overview';\nimport { VizCategory } from './interfaces/VizCategory';\n\ninterface VariationCode {\n code: string;\n example: () => React.ReactElement;\n}\n\ninterface OverviewProps {\n overview: Overview;\n variationCode?: Record<string, VariationCode>;\n}\n\nconst chipIconStyles = {\n color: 'white',\n};\n\nconst chipType = {\n [VizCategory.TRENDS]: {\n backgroundColor: '#66AAF9',\n icon: <ChartLine style={chipIconStyles} />,\n },\n [VizCategory.COMPARISONS]: {\n backgroundColor: '#45D4BA',\n icon: <ChartBar style={chipIconStyles} />,\n },\n [VizCategory.CORRELATION]: {\n backgroundColor: '#FB865C',\n icon: <ChartScatter style={chipIconStyles} />,\n },\n [VizCategory.SPATIAL]: {\n backgroundColor: '#E85B79',\n icon: <ChoroplethMap style={chipIconStyles} />,\n },\n [VizCategory.FLOW]: {\n backgroundColor: '#9980FF',\n icon: <SplitBy style={chipIconStyles} />,\n },\n};\n\nconst StyledChip = styled(Chip)`\n [data-test='label'] {\n color: white;\n }\n margin-left: 10px;\n margin-bottom: 10px;\n`;\n\nconst Variations = ({ variations, variationCode }): React.ReactElement => (\n <>\n {variations.map(\n (v: Variation): React.ReactElement => {\n const variationObj = variationCode[v.key];\n return (\n <DocExample key={v.key} code={variationObj.code} example={variationObj.example} {...v} />\n );\n }\n )}\n </>\n);\n\nVariations.propTypes = {\n variations: T.array,\n variationCode: T.object,\n};\n\nconst Tip = ({ tip }): React.ReactElement => <List.Item>{tip}</List.Item>;\n\nTip.propTypes = {\n tip: T.string,\n};\n\nconst Tips = ({ tips }): React.ReactElement => (\n <>\n <Heading level={3}>Tips</Heading>\n <List>\n {tips.map(\n (tip: string): React.ReactElement => (\n <Tip key={tip} tip={tip} />\n )\n )}\n </List>\n </>\n);\n\nTips.propTypes = {\n tips: T.array,\n};\n\nconst OverviewDoc = (props: OverviewProps): React.ReactElement => {\n const { typeOfViz, overview, tips, variations } = props.overview;\n const { variationCode } = props;\n const vizTypeDisplayNameMap = {\n [VizCategory.TRENDS]: 'Trend',\n [VizCategory.COMPARISONS]: 'Comparison',\n };\n const vizType = vizTypeDisplayNameMap[typeOfViz] || typeOfViz;\n return (\n <>\n {vizType && (\n <>\n Chart Type\n <StyledChip\n data-test=\"viz-type-chip\"\n backgroundColor={chipType[typeOfViz].backgroundColor}\n icon={chipType[typeOfViz].icon}\n >\n {vizType}\n </StyledChip>\n </>\n )}\n <P data-test=\"overview-description\">{overview}</P>\n <Tips data-test=\"tips\" tips={tips} />\n {variationCode && <Variations variations={variations} variationCode={variationCode} />}\n </>\n );\n};\n\nOverviewDoc.propTypes = {\n overview: T.object,\n variationCode: T.object,\n};\n\nexport default OverviewDoc;\n","module.exports = require(\"@splunk/react-docs/DocExample\");","module.exports = require(\"@splunk/react-ui/Paragraph\");","module.exports = require(\"@splunk/react-ui/List\");","module.exports = require(\"@splunk/react-ui/Chip\");","module.exports = require(\"@splunk/react-icons/ChartLine\");","module.exports = require(\"@splunk/react-icons/ChartBar\");","module.exports = require(\"@splunk/react-icons/ChartScatter\");","module.exports = require(\"@splunk/react-icons/ChoroplethMap\");","module.exports = require(\"@splunk/react-icons/SplitBy\");","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","module.exports = require(\"@babel/runtime/helpers/defineProperty\");"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///external \"styled-components\"","webpack:///external \"@splunk/react-ui/Heading\"","webpack:///./src/common/OverviewDoc.tsx","webpack:///external \"@splunk/react-docs/DocExample\"","webpack:///external \"@splunk/react-ui/Paragraph\"","webpack:///external \"@splunk/react-ui/List\"","webpack:///external \"@splunk/react-ui/Chip\"","webpack:///external \"@splunk/react-icons/ChartLine\"","webpack:///external \"@splunk/react-icons/ChartBar\"","webpack:///external \"@splunk/react-icons/ChartScatter\"","webpack:///external \"@splunk/react-icons/ChoroplethMap\"","webpack:///external \"@splunk/react-icons/SplitBy\"","webpack:///./src/common/interfaces/VizCategory.ts","webpack:///external \"@babel/runtime/helpers/defineProperty\""],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFA,kC;;;;;;;ACAA,uC;;;;;;;ACAA,8C;;;;;;;ACAA,qD;;;;;;;;;;;;;;;;;;ACAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AAYA,IAAM,cAAc,GAAG;AACnB,OAAK,EAAE;AADY,CAAvB;AAIA,IAAM,QAAQ,+CACT,0BAAY,MADH,EACY;AAClB,iBAAe,EAAE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AAI,EAAE,QAAQ,CAAC,SAAD,CAAR,CAAoB;AAHnB,GAAX,EAKK,OALL,CAFJ,CAFR,EAaI,oBAAC,mBAAD,EAAE;AAAA,iBAAW;AAAX,GAAF,EAAqC,QAArC,CAbJ,EAcI,oBAAC,IAAD,EAAK;AAAA,iBAAW,MAAX;AAAkB,QAAI,EAAE;AAAxB,GAAL,CAdJ,EAeK,aAAa,IAAI,oBAAC,UAAD,EAAW;AAAC,cAAU,EAAE,UAAb;AAAyB,iBAAa,EAAE;AAAxC,GAAX,CAftB,CADJ;AAmBH,CA3BD;;AA6BA,WAAW,CAAC,SAAZ,GAAwB;AACpB,UAAQ,EAAE,CAAC,CAAC,MADQ;AAEpB,eAAa,EAAE,CAAC,CAAC;AAFG,CAAxB;AAKA,kBAAe,WAAf,C;;;;;;;ACxIA,0D;;;;;;;ACAA,uD;;;;;;;ACAA,kD;;;;;;;ACAA,kD;;;;;;;ACAA,0D;;;;;;;ACAA,yD;;;;;;;ACAA,6D;;;;;;;ACAA,8D;;;;;;;ACAA,wD;;;;;;;;;;;;;;ACAA,IAAY,WAAZ;;AAAA,WAAY,WAAZ,EAAuB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACH,CAbD,EAAY,WAAW,GAAX,8CAAW,EAAX,CAAZ,E;;;;;;;ACAA,kE","file":"OverviewDoc.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 = 53);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","module.exports = require(\"styled-components\");","module.exports = require(\"@splunk/react-ui/Heading\");","import * as React from 'react';\nimport * as T from 'prop-types';\nimport styled from 'styled-components';\nimport DocExample from '@splunk/react-docs/DocExample';\nimport P from '@splunk/react-ui/Paragraph';\nimport Heading from '@splunk/react-ui/Heading';\nimport List from '@splunk/react-ui/List';\nimport Chip from '@splunk/react-ui/Chip';\nimport ChartLine from '@splunk/react-icons/ChartLine';\nimport ChartBar from '@splunk/react-icons/ChartBar';\nimport ChartScatter from '@splunk/react-icons/ChartScatter';\nimport ChoroplethMap from '@splunk/react-icons/ChoroplethMap';\nimport SplitBy from '@splunk/react-icons/SplitBy';\nimport { Overview, Variation } from './interfaces/Overview';\nimport { VizCategory } from './interfaces/VizCategory';\n\ninterface VariationCode {\n code: string;\n example: () => React.ReactElement;\n}\n\ninterface OverviewProps {\n overview: Overview;\n variationCode?: Record<string, VariationCode>;\n}\n\nconst chipIconStyles = {\n color: 'white',\n};\n\nconst chipType = {\n [VizCategory.TRENDS]: {\n backgroundColor: '#66AAF9',\n icon: <ChartLine style={chipIconStyles} />,\n },\n [VizCategory.COMPARISONS]: {\n backgroundColor: '#45D4BA',\n icon: <ChartBar style={chipIconStyles} />,\n },\n [VizCategory.CORRELATION]: {\n backgroundColor: '#FB865C',\n icon: <ChartScatter style={chipIconStyles} />,\n },\n [VizCategory.SPATIAL]: {\n backgroundColor: '#E85B79',\n icon: <ChoroplethMap style={chipIconStyles} />,\n },\n [VizCategory.FLOW]: {\n backgroundColor: '#9980FF',\n icon: <SplitBy style={chipIconStyles} />,\n },\n};\n\nconst StyledChip = styled(Chip)`\n [data-test='label'] {\n color: white;\n }\n margin-left: 10px;\n margin-bottom: 10px;\n`;\n\nconst Variations = ({ variations, variationCode }): React.ReactElement => (\n <>\n {variations.map(\n (v: Variation): React.ReactElement => {\n const variationObj = variationCode[v.key];\n return (\n <DocExample key={v.key} code={variationObj.code} example={variationObj.example} {...v} />\n );\n }\n )}\n </>\n);\n\nVariations.propTypes = {\n variations: T.array,\n variationCode: T.object,\n};\n\nconst Tip = ({ tip }): React.ReactElement => <List.Item>{tip}</List.Item>;\n\nTip.propTypes = {\n tip: T.string,\n};\n\nconst Tips = ({ tips }): React.ReactElement => (\n <>\n <Heading level={3}>Tips</Heading>\n <List>\n {tips.map(\n (tip: string): React.ReactElement => (\n <Tip key={tip} tip={tip} />\n )\n )}\n </List>\n </>\n);\n\nTips.propTypes = {\n tips: T.array,\n};\n\nconst OverviewDoc = (props: OverviewProps): React.ReactElement => {\n const { typeOfViz, overview, tips, variations } = props.overview;\n const { variationCode } = props;\n const vizTypeDisplayNameMap = {\n [VizCategory.TRENDS]: 'Trend',\n [VizCategory.COMPARISONS]: 'Comparison',\n };\n const vizType = vizTypeDisplayNameMap[typeOfViz] || typeOfViz;\n return (\n <>\n {vizType && (\n <>\n Chart Type\n <StyledChip\n data-test=\"viz-type-chip\"\n backgroundColor={chipType[typeOfViz].backgroundColor}\n icon={chipType[typeOfViz].icon}\n >\n {vizType}\n </StyledChip>\n </>\n )}\n <P data-test=\"overview-description\">{overview}</P>\n <Tips data-test=\"tips\" tips={tips} />\n {variationCode && <Variations variations={variations} variationCode={variationCode} />}\n </>\n );\n};\n\nOverviewDoc.propTypes = {\n overview: T.object,\n variationCode: T.object,\n};\n\nexport default OverviewDoc;\n","module.exports = require(\"@splunk/react-docs/DocExample\");","module.exports = require(\"@splunk/react-ui/Paragraph\");","module.exports = require(\"@splunk/react-ui/List\");","module.exports = require(\"@splunk/react-ui/Chip\");","module.exports = require(\"@splunk/react-icons/ChartLine\");","module.exports = require(\"@splunk/react-icons/ChartBar\");","module.exports = require(\"@splunk/react-icons/ChartScatter\");","module.exports = require(\"@splunk/react-icons/ChoroplethMap\");","module.exports = require(\"@splunk/react-icons/SplitBy\");","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","module.exports = require(\"@babel/runtime/helpers/defineProperty\");"],"sourceRoot":""}
|
|
@@ -87,7 +87,7 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 23);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -99,7 +99,7 @@ module.exports = require("prop-types");
|
|
|
99
99
|
|
|
100
100
|
/***/ }),
|
|
101
101
|
|
|
102
|
-
/***/
|
|
102
|
+
/***/ 23:
|
|
103
103
|
/***/ (function(module, exports, __webpack_require__) {
|
|
104
104
|
|
|
105
105
|
"use strict";
|
|
@@ -117,7 +117,7 @@ var T = __webpack_require__(1);
|
|
|
117
117
|
|
|
118
118
|
var lodash_1 = __webpack_require__(3);
|
|
119
119
|
|
|
120
|
-
var VizActionHandler_1 = __webpack_require__(
|
|
120
|
+
var VizActionHandler_1 = __webpack_require__(24); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
121
121
|
|
|
122
122
|
|
|
123
123
|
exports.INITIAL_WIDTH = 250;
|
|
@@ -251,7 +251,7 @@ exports.default = SplunkVisualization;
|
|
|
251
251
|
|
|
252
252
|
/***/ }),
|
|
253
253
|
|
|
254
|
-
/***/
|
|
254
|
+
/***/ 24:
|
|
255
255
|
/***/ (function(module, exports, __webpack_require__) {
|
|
256
256
|
|
|
257
257
|
"use strict";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///./src/common/SplunkVisualization.tsx","webpack:///./src/common/interfaces/VizActionHandler.ts","webpack:///external \"lodash\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\""],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFA,uC;;;;;;;;;;;;;;;;ACAA;;AACA;;AACA;;AAEA,iD,CAEA;;;AACa,wBAAgB,GAAhB;AACA,yBAAiB,GAAjB;AAEb;;AAEG;;IACG,mB;;;;AACK,gCAA+D;AAClE;;AAEG;AACH,MAAI,EAAE,CAAC,CAAC,KAAF,CAAQ,CAAC,MAAD,EAAS,MAAT,EAAiB,QAAjB,CAAR,EAAoC,UAJwB;;AAKlE;;AAEG;AACH,OAAK,EAAE,CAAC,CAAC,SAAF,CAAY,CAAC,CAAC,CAAC,MAAH,EAAW,CAAC,CAAC,MAAb,CAAZ,EAAkC,UARyB;;AASlE;;AAEG;AACH,QAAM,EAAE,CAAC,CAAC,SAAF,CAAY,CAAC,CAAC,CAAC,MAAH,EAAW,CAAC,CAAC,MAAb,CAAZ,EAAkC,UAZwB;;AAalE;;AAEG;AACH,SAAO,EAAE,CAAC,CAAC,MAhBuD;;AAiBlE;;AAEG;AAC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A,WAAgC,EAAhC;AAAA,GAVoB;AAWrC,qBAAmB,EAAE;AAAA,WAA+B,IAAI,0CAAJ,EAA/B;AAAA,GAXgB;AAYrC,iBAAe,EAAE;AAAA,WAAgC,EAAhC;AAAA,GAZoB;AAarC,SAAO,EAAE,KAb4B;AAcrC,uBAAqB,EAAE;AAdc,CAAlC;AAkBX,kBAAe,mBAAf,C;;;;;;;;;;;;;;;;;;;ICrGa,uB;;;;;;;WACT,iBAAK,CACD;AACH;;;WAED,oBAAQ;AACJ,aAAO,IAAP,CADI,CACS;AAChB;;;;;;AAPL,0D;;;;;;;ACbA,mC;;;;;;;ACAA,kE;;;;;;;ACAA,+D","file":"SplunkVisualization.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 = 25);\n","module.exports = require(\"prop-types\");","/* 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","module.exports = require(\"lodash\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///./src/common/SplunkVisualization.tsx","webpack:///./src/common/interfaces/VizActionHandler.ts","webpack:///external \"lodash\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\""],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFA,uC;;;;;;;;;;;;;;;;ACAA;;AACA;;AACA;;AAEA,iD,CAEA;;;AACa,wBAAgB,GAAhB;AACA,yBAAiB,GAAjB;AAEb;;AAEG;;IACG,mB;;;;AACK,gCAA+D;AAClE;;AAEG;AACH,MAAI,EAAE,CAAC,CAAC,KAAF,CAAQ,CAAC,MAAD,EAAS,MAAT,EAAiB,QAAjB,CAAR,EAAoC,UAJwB;;AAKlE;;AAEG;AACH,OAAK,EAAE,CAAC,CAAC,SAAF,CAAY,CAAC,CAAC,CAAC,MAAH,EAAW,CAAC,CAAC,MA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,sBAH6B;AAIrC,aAAW,EAAE,EAJwB;AAKrC,gBAAc,EAAE;AAAA,WAAgC,EAAhC;AAAA,GALqB;AAMrC,MAAI,EAAE,MAN+B;AAOrC,kBAAgB,EAAE,KAPmB;AAQrC,SAAO,EAAE,EAR4B;AASrC,SAAO,EAAE,EAT4B;AAUrC,iBAAe,EAAE;AAAA,WAAgC,EAAhC;AAAA,GAVoB;AAWrC,qBAAmB,EAAE;AAAA,WAA+B,IAAI,0CAAJ,EAA/B;AAAA,GAXgB;AAYrC,iBAAe,EAAE;AAAA,WAAgC,EAAhC;AAAA,GAZoB;AAarC,SAAO,EAAE,KAb4B;AAcrC,uBAAqB,EAAE;AAdc,CAAlC;AAkBX,kBAAe,mBAAf,C;;;;;;;;;;;;;;;;;;;ICrGa,uB;;;;;;;WACT,iBAAK,CACD;AACH;;;WAED,oBAAQ;AACJ,aAAO,IAAP,CADI,CACS;AAChB;;;;;;AAPL,0D;;;;;;;ACbA,mC;;;;;;;ACAA,kE;;;;;;;ACAA,+D","file":"SplunkVisualization.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 = 23);\n","module.exports = require(\"prop-types\");","/* 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","module.exports = require(\"lodash\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");"],"sourceRoot":""}
|
|
@@ -87,7 +87,7 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 64);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -106,7 +106,7 @@ module.exports = require("@babel/runtime/helpers/createClass");
|
|
|
106
106
|
|
|
107
107
|
/***/ }),
|
|
108
108
|
|
|
109
|
-
/***/
|
|
109
|
+
/***/ 64:
|
|
110
110
|
/***/ (function(module, exports, __webpack_require__) {
|
|
111
111
|
|
|
112
112
|
"use strict";
|