@splunk/visualizations 26.2.1 → 26.3.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/Area.config.js +91 -594
- package/Area.config.js.map +1 -1
- package/Area.js +184 -689
- package/Area.js.map +1 -1
- package/Bar.config.js +92 -561
- package/Bar.config.js.map +1 -1
- package/Bar.js +184 -655
- package/Bar.js.map +1 -1
- package/Bubble.config.js +83 -482
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +177 -578
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +76 -201
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +170 -300
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +92 -599
- package/Column.config.js.map +1 -1
- package/Column.js +184 -693
- package/Column.js.map +1 -1
- package/Ellipse.config.js +82 -200
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +137 -262
- package/Ellipse.js.map +1 -1
- package/Events.config.js +61 -282
- package/Events.config.js.map +1 -1
- package/Events.js +222 -428
- package/Events.js.map +1 -1
- package/FillerGauge.config.js +90 -219
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +163 -299
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +61 -157
- package/Image.config.js.map +1 -1
- package/Image.js +130 -242
- package/Image.js.map +1 -1
- package/Line.config.js +91 -606
- package/Line.config.js.map +1 -1
- package/Line.js +184 -701
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +74 -256
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +545 -729
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +128 -1123
- package/Map.config.js.map +1 -1
- package/Map.js +309 -680
- package/Map.js.map +1 -1
- package/Markdown.config.js +61 -188
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +190 -323
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +137 -297
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +1038 -1203
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +71 -191
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +218 -343
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +72 -240
- package/Pie.config.js.map +1 -1
- package/Pie.js +214 -381
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +71 -305
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +246 -477
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +211 -347
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +274 -416
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +71 -213
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +246 -382
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +85 -463
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +825 -1202
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +114 -409
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +287 -582
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +30 -30
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +113 -378
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +268 -533
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +110 -382
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +272 -543
- package/SingleValueRadial.js.map +1 -1
- package/SparkLine.js +24 -24
- package/SparkLine.js.map +1 -1
- package/Table.config.js +74 -496
- package/Table.config.js.map +1 -1
- package/Table.js +302 -720
- package/Table.js.map +1 -1
- package/common/Charting.js +22 -34
- package/common/Charting.js.map +1 -1
- package/common/DocExampleWithVizSandbox.js +21 -21
- package/common/DocExampleWithVizSandbox.js.map +1 -1
- package/common/EventsDoc.js +18 -18
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +4 -4
- package/common/GaugeMajorTicks.js.map +1 -1
- package/common/GaugeValueMarker.js +2 -2
- package/common/GaugeValueMarker.js.map +1 -1
- package/common/OptionsDoc.js +4 -4
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.js +39 -40
- package/common/OverviewDoc.js.map +1 -1
- package/common/SplunkVisualization.js +2 -2
- package/common/SplunkVisualization.js.map +1 -1
- package/common/SplunkVisualizationApi.js +2 -2
- package/common/SplunkVisualizationApi.js.map +1 -1
- package/common/ThemesDoc.js +19 -19
- package/common/ThemesDoc.js.map +1 -1
- package/common/chartingUtils.js +2 -2
- package/common/chartingUtils.js.map +1 -1
- package/common/gaugeUtils.js +10 -10
- package/common/gaugeUtils.js.map +1 -1
- package/common/shapeUtils.js +10 -10
- package/common/shapeUtils.js.map +1 -1
- package/common/utils/configUtils.js +25 -155
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/dataUtils.js +75 -87
- package/common/utils/dataUtils.js.map +1 -1
- package/common/utils/featureFlagUtils.js +4 -4
- package/common/utils/featureFlagUtils.js.map +1 -1
- package/common/utils/hocUtils.js +2 -2
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/mapUtils.js +51 -54
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/singleValueUtils.js +7 -7
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +7 -36
- package/common/utils/testHelper.js.map +1 -1
- package/common/utils/trellisUtils.js +7 -6
- package/common/utils/trellisUtils.js.map +1 -1
- package/common/utils/urlUtils.js +2 -2
- package/common/utils/urlUtils.js.map +1 -1
- package/common/withDashboardViz.js +65 -77
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +46 -49
- package/common/utils/layoutUtils.js +0 -115
- package/common/utils/layoutUtils.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"lodash\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/toConsumableArray\"","webpack:///./src/common/interfaces/VizBehavior.ts","webpack:///./src/common/utils/configUtils.ts","webpack:///external \"@splunk/visualizations-shared/schemaUtils\""],"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,mC;;;;;;ACAA,kE;;;;;;;ACAA,qE;;;;;;;;;;;;;;;;ACAA,IAAY,WAAZ;;AAAA,WAAY,WAAZ,EAAuB;AACnB;;;;;;;;;;AAUG;AACH;AACA;AACA;AACA;;;;AAIG;;AACH;AACA;AACA;AACH,CAvBD,EAAY,WAAW,GAAX,8CAAW,EAAX,CAAZ,E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;AACA;;AAGA;;AAWA,IAAM,qBAAqB,GAAG;AAC1B,MAAI,EAAE,QADoB;AAE1B,SAAO,EAAE;AAFiB,CAA9B;AAKA;;;;AAIG;;AACH,SAAS,sCAAT,CACI,aADJ,EACwD;AAEpD,MAAM,qBAAqB,GAAkB,EAA7C;AACA,QAAM,CAAC,IAAP,CAAY,aAAZ,EAA2B,OAA3B,CAAmC,UAAC,GAAD,EAAc;AACvC,aAgBF,aAAa,CAhBX,GAgBW,CAhBX;AAAA,QAIF,KAJE,GAae,EAbf,CAIF,KAJE;AAAA,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MAAM,CAAC,IAAP,CAAY,aAAZ,CAAzB,CAJoC,CAMpC;AACA;;AACA,QAAI,iBAAiB,CAAC,MAAlB,KAA6B,CAA7B,IAAkC,gBAAgB,CAAC,MAAjB,KAA4B,CAAlE,EAAqE,OAAO,KAAP;AAErE,WACI,qBAAqB,CAAC,UAAD,EAAa,aAAb,CAArB,IACA,oBAAoB,CAAC,UAAD,EAAa,aAAb,CAFxB;AAIH,GAdM,CAAP;AAeH;;AAyBG;AAlBJ;;;;;AAKG;;AACH,SAAS,uBAAT,CAAiC,kBAAjC,EAA2D;AACvD,SAAO,oBAAM,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;;AAMG;AAKJ;;;;;;;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;;;;;;ACxOb,sE","file":"configUtils.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 = 14);\n","module.exports = require(\"lodash\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","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 DOWNSAMPLING = 'downsampling',\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 TRELLIS = 'trellis',\n}\n","import { get, range } from 'lodash';\nimport { DYNAMIC_OPTIONS_DSL_PATTERN } from '@splunk/visualizations-shared/schemaUtils';\nimport type { JSONSchema7Definition } from 'json-schema';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\nimport { VizBehavior } from '../interfaces/VizBehavior';\nimport { VizConfig } from '../interfaces/VizConfig';\nimport { OptionsSchema } from '../interfaces/OptionsSchema';\nimport { EditorLayoutConfig, EditorConfig } from '../interfaces/Editor';\n\nexport interface PresetEntry {\n name: string;\n value: any;\n label: string;\n}\n\nconst dynamicOptionsDSLType = {\n type: 'string',\n pattern: DYNAMIC_OPTIONS_DSL_PATTERN,\n} as const;\n\n/**\n * Helper function to extend an options schema with dynamic options DSL\n * @param optionsSchema a visualization's options schema\n * @returns an updated options schema that additionally allows strings starting with > for each option\n */\nfunction enhanceOptionsSchemaWithDynamicOptions(\n optionsSchema: OptionsSchema | JSONSchema7Definition\n): OptionsSchema {\n const enhancedOptionsSchema: OptionsSchema = {};\n Object.keys(optionsSchema).forEach((key): void => {\n const {\n // The next a few are schema annotations, we should leave them as is.\n // Note: in reality we don't use `readOnly`, `writeOnly` or `examples`, but they are listed here for completeness.\n // Ref: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01\n title,\n description,\n readOnly,\n writeOnly,\n examples,\n default: defaultValue,\n // The next a few need special care\n type,\n properties,\n patternProperties,\n // The rest should be handled together\n ...remainingSchemaEntry\n } = optionsSchema[key];\n\n const annotations = {\n ...(title !== undefined && { title }),\n ...(description !== undefined && { description }),\n ...(readOnly !== undefined && { readOnly }),\n ...(writeOnly !== undefined && { writeOnly }),\n ...(examples !== undefined && { examples }),\n ...(defaultValue !== undefined && { default: defaultValue }),\n };\n\n if (type === 'object') {\n enhancedOptionsSchema[key] = {\n ...remainingSchemaEntry,\n ...annotations,\n type,\n ...(properties && { properties: enhanceOptionsSchemaWithDynamicOptions(properties) }),\n };\n if (patternProperties) {\n let enhancedPatternProperties = {};\n Object.keys(patternProperties).forEach((opt): void => {\n enhancedPatternProperties = {\n ...enhancedPatternProperties,\n ...enhanceOptionsSchemaWithDynamicOptions({ [opt]: patternProperties[opt] }),\n };\n });\n enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;\n }\n } else {\n enhancedOptionsSchema[key] = {\n ...annotations,\n anyOf: [\n // we can't assume `type` is always there because there are `enum` and `const`.\n { ...(type !== undefined && { type }), ...remainingSchemaEntry },\n dynamicOptionsDSLType,\n ],\n };\n }\n });\n return enhancedOptionsSchema;\n}\n\n/**\n * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block\n * this function also collapse all editor panels\n * @param vizConfig a Visualization Config\n * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports\n * and containing `open: false` for all editor panels in editorConfig\n */\nfunction enhanceConfig(vizConfig: VizConfig): VizConfig {\n const enhancedConfig: VizConfig = { ...vizConfig };\n if (vizConfig.supports.indexOf(VizBehavior.DYNAMIC_OPTIONS) !== -1) {\n enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);\n }\n enhancedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: config.open || false };\n }\n );\n return enhancedConfig;\n}\n\n/**\n * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig\n * Created for editor unit tests\n * @param vizConfig a Visualization Config\n * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig\n */\nfunction uncollapseEditorConfig(vizConfig: VizConfig): VizConfig {\n const editorPanelUncollapsedConfig: VizConfig = { ...vizConfig };\n editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: true };\n }\n );\n return editorPanelUncollapsedConfig;\n}\n\nfunction isDynamicOption(option?: string): boolean {\n return (option && typeof option === 'string' && option.trim().startsWith('>')) || false;\n}\n\n// private helpers to improve readability of getInitialPreset\n// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset\n\n/**\n * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset\n * if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset\n * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext\n * the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up\n *\n * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values\n */\nfunction hasCompatibleContexts(\n vizContext: { [configKey: string]: any },\n presetContext: { [configKey: string]: any }\n): boolean {\n const presetContextKeys = Object.keys(presetContext);\n return presetContextKeys.every(\n (contextKey): boolean =>\n (presetContext[contextKey] === undefined && vizContext[contextKey] === undefined) ||\n (presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined)\n );\n}\n\n/**\n * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions\n */\nfunction hasCompatibleOptions(\n vizOptions: { [configKey: string]: any },\n presetOptions: { [configKey: string]: any }\n): boolean {\n const presetOptionKeys = Object.keys(presetOptions);\n return presetOptionKeys.every(\n (optionKey): boolean =>\n isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey])\n );\n}\n\n/**\n * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions\n * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure\n *\n * @param {Object} vizContext - the current vizContext definition\n * @param {Object} vizOptions - the current vizOptions definition\n * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset\n */\nfunction getInitialPreset(\n vizContext: { [configKey: string]: any },\n vizOptions: { [configKey: string]: any },\n presets: PresetEntry[]\n): PresetEntry | null {\n return presets.find((preset): boolean => {\n const presetContext = get(preset, ['value', 'context'], {});\n const presetOptions = get(preset, ['value', 'options'], {});\n const presetContextKeys = Object.keys(presetContext);\n const presetOptionKeys = Object.keys(presetOptions);\n\n // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)\n // if not, then the preset is invalid in config.ts\n if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;\n\n return (\n hasCompatibleContexts(vizContext, presetContext) &&\n hasCompatibleOptions(vizOptions, presetOptions)\n );\n });\n}\n\ninterface PrecisionOption {\n label: string;\n value: number;\n}\n\n/**\n * generates number precision values for a Select editor\n *\n * @param {Number} numPrecisionValues - number of integer precision values to generate\n * @returns {{ label: string; value; string }[]} array of { label, value } tuples\n */\nfunction generatePrecisionValues(numPrecisionValues: number): PrecisionOption[] {\n return range(0, numPrecisionValues + 1).map(\n (i): PrecisionOption => ({\n label: `${i} (0${i > 0 ? '.' : ''}${'0'.repeat(i)})`, // e.g. 0.000 for numPrecisionValues = 3\n value: i,\n })\n );\n}\n\nexport {\n enhanceConfig,\n enhanceOptionsSchemaWithDynamicOptions,\n getInitialPreset,\n generatePrecisionValues,\n uncollapseEditorConfig,\n isDynamicOption,\n};\n\n/**\n * insert layout in layout array, return a new layout array instead of updating the original\n *\n * @param {EditorLayoutConfig[][]} layout - editor layout\n * @param {Number} index - the index to insert layout item(s)\n * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert\n * @returns {EditorLayoutConfig[][]} new editor layout with insertion\n */\nexport const insertLayout = (\n layout: EditorLayoutConfig[][],\n index: number,\n ...layoutItems: EditorLayoutConfig[][]\n): EditorLayoutConfig[][] => [\n // copy part of the array before the specified index\n ...layout.slice(0, index),\n // inserted layout item\n ...layoutItems,\n // copy part of the array after the specified index\n ...layout.slice(index),\n];\n","module.exports = require(\"@splunk/visualizations-shared/schemaUtils\");"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"lodash\"","webpack:///./src/common/utils/configUtils.ts","webpack:///external \"@babel/runtime/helpers/toConsumableArray\"","webpack:///external \"@splunk/visualization-schemas\""],"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,mC;;;;;;;;;;;;;;;;;ACAA,sC,CAKA;;;AACA;;AAAS;AAAA;AAAA;AAAA;AAAsC;AAAtC;AAQT;;;;;;AAMG;;AACH,SAAS,aAAT,CAAuB,SAAvB,EAA2C;AACvC,MAAM,cAAc,qBAAmB,SAAnB,CAApB;AAEA,gBAAc,CAAC,YAAf,GAA8B,SAAS,CAAC,YA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;;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;;;;;;;ACrJb,qE;;;;;;;ACAA,0D","file":"configUtils.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 = 14);\n","module.exports = require(\"lodash\");","import { get, range } from 'lodash';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\nimport { VizConfig } from '../interfaces/VizConfig';\nimport { EditorLayoutConfig, EditorConfig } from '../interfaces/Editor';\n\n// included for backwards compatibility\nexport { enhanceOptionsSchemaWithDynamicOptions } from '@splunk/visualization-schemas';\n\nexport interface PresetEntry {\n name: string;\n value: any;\n label: string;\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\n enhancedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: config.open || false };\n }\n );\n return enhancedConfig;\n}\n\n/**\n * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig\n * Created for editor unit tests\n * @param vizConfig a Visualization Config\n * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig\n */\nfunction uncollapseEditorConfig(vizConfig: VizConfig): VizConfig {\n const editorPanelUncollapsedConfig: VizConfig = { ...vizConfig };\n editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: true };\n }\n );\n return editorPanelUncollapsedConfig;\n}\n\nfunction isDynamicOption(option?: string): boolean {\n return (option && typeof option === 'string' && option.trim().startsWith('>')) || false;\n}\n\n// private helpers to improve readability of getInitialPreset\n// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset\n\n/**\n * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset\n * if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset\n * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext\n * the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up\n *\n * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values\n */\nfunction hasCompatibleContexts(\n vizContext: { [configKey: string]: any },\n presetContext: { [configKey: string]: any }\n): boolean {\n const presetContextKeys = Object.keys(presetContext);\n return presetContextKeys.every(\n (contextKey): boolean =>\n (presetContext[contextKey] === undefined && vizContext[contextKey] === undefined) ||\n (presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined)\n );\n}\n\n/**\n * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions\n */\nfunction hasCompatibleOptions(\n vizOptions: { [configKey: string]: any },\n presetOptions: { [configKey: string]: any }\n): boolean {\n const presetOptionKeys = Object.keys(presetOptions);\n return presetOptionKeys.every(\n (optionKey): boolean =>\n isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey])\n );\n}\n\n/**\n * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions\n * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure\n *\n * @param {Object} vizContext - the current vizContext definition\n * @param {Object} vizOptions - the current vizOptions definition\n * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset\n */\nfunction getInitialPreset(\n vizContext: { [configKey: string]: any },\n vizOptions: { [configKey: string]: any },\n presets: PresetEntry[]\n): PresetEntry | null {\n return presets.find((preset): boolean => {\n const presetContext = get(preset, ['value', 'context'], {});\n const presetOptions = get(preset, ['value', 'options'], {});\n const presetContextKeys = Object.keys(presetContext);\n const presetOptionKeys = Object.keys(presetOptions);\n\n // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)\n // if not, then the preset is invalid in config.ts\n if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;\n\n return (\n hasCompatibleContexts(vizContext, presetContext) &&\n hasCompatibleOptions(vizOptions, presetOptions)\n );\n });\n}\n\ninterface PrecisionOption {\n label: string;\n value: number;\n}\n\n/**\n * generates number precision values for a Select editor\n *\n * @param {Number} numPrecisionValues - number of integer precision values to generate\n * @returns {{ label: string; value; string }[]} array of { label, value } tuples\n */\nfunction generatePrecisionValues(numPrecisionValues: number): PrecisionOption[] {\n return range(0, numPrecisionValues + 1).map(\n (i): PrecisionOption => ({\n label: `${i} (0${i > 0 ? '.' : ''}${'0'.repeat(i)})`, // e.g. 0.000 for numPrecisionValues = 3\n value: i,\n })\n );\n}\n\nexport { enhanceConfig, getInitialPreset, generatePrecisionValues, uncollapseEditorConfig, isDynamicOption };\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(\"@babel/runtime/helpers/toConsumableArray\");","module.exports = require(\"@splunk/visualization-schemas\");"],"sourceRoot":""}
|
|
@@ -87,61 +87,23 @@ 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 = 15);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ([
|
|
94
94
|
/* 0 */,
|
|
95
|
-
/* 1
|
|
96
|
-
/* 2 */
|
|
95
|
+
/* 1 */
|
|
97
96
|
/***/ (function(module, exports) {
|
|
98
97
|
|
|
99
98
|
module.exports = require("@splunk/visualizations-shared/numberUtils");
|
|
100
99
|
|
|
101
100
|
/***/ }),
|
|
101
|
+
/* 2 */,
|
|
102
102
|
/* 3 */,
|
|
103
103
|
/* 4 */,
|
|
104
104
|
/* 5 */,
|
|
105
105
|
/* 6 */,
|
|
106
|
-
/* 7
|
|
107
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
108
|
-
|
|
109
|
-
"use strict";
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
Object.defineProperty(exports, "__esModule", {
|
|
113
|
-
value: true
|
|
114
|
-
});
|
|
115
|
-
exports.VizBehavior = void 0;
|
|
116
|
-
var VizBehavior;
|
|
117
|
-
|
|
118
|
-
(function (VizBehavior) {
|
|
119
|
-
/**
|
|
120
|
-
* Dynamic Options Behavior.
|
|
121
|
-
* This allows visualization options to be powered by data
|
|
122
|
-
*
|
|
123
|
-
* **Example**
|
|
124
|
-
*
|
|
125
|
-
* sparklineValues: ">primary|seriesByIndex(0)"
|
|
126
|
-
* would configure sparklineValues with an array of data points
|
|
127
|
-
* coming from the first series in the primary datasource
|
|
128
|
-
*
|
|
129
|
-
*/
|
|
130
|
-
VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
|
|
131
|
-
VizBehavior["EVENTS"] = "events";
|
|
132
|
-
VizBehavior["DOWNSAMPLING"] = "downsampling";
|
|
133
|
-
/**
|
|
134
|
-
* Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
|
|
135
|
-
* missing.
|
|
136
|
-
* @type {string}
|
|
137
|
-
*/
|
|
138
|
-
|
|
139
|
-
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
140
|
-
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
141
|
-
VizBehavior["TRELLIS"] = "trellis";
|
|
142
|
-
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
143
|
-
|
|
144
|
-
/***/ }),
|
|
106
|
+
/* 7 */,
|
|
145
107
|
/* 8 */,
|
|
146
108
|
/* 9 */,
|
|
147
109
|
/* 10 */,
|
|
@@ -149,8 +111,7 @@ var VizBehavior;
|
|
|
149
111
|
/* 12 */,
|
|
150
112
|
/* 13 */,
|
|
151
113
|
/* 14 */,
|
|
152
|
-
/* 15
|
|
153
|
-
/* 16 */
|
|
114
|
+
/* 15 */
|
|
154
115
|
/***/ (function(module, exports, __webpack_require__) {
|
|
155
116
|
|
|
156
117
|
"use strict";
|
|
@@ -161,9 +122,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
161
122
|
});
|
|
162
123
|
exports.downsampleDataSources = exports.calculateDownsamplingThreshold = exports.calculateThresholdOnRangeSelect = exports.isDownsamplingEnabledForViz = exports.convertToArrOfObjects = void 0;
|
|
163
124
|
|
|
164
|
-
var numberUtils_1 = __webpack_require__(
|
|
125
|
+
var numberUtils_1 = __webpack_require__(1);
|
|
165
126
|
|
|
166
|
-
var interfaces_1 = __webpack_require__(
|
|
127
|
+
var interfaces_1 = __webpack_require__(16); // TODO: utilize this fn in ParallelCoordinates
|
|
167
128
|
|
|
168
129
|
|
|
169
130
|
var convertToArrOfObjects = function convertToArrOfObjects(columns, fields) {
|
|
@@ -447,6 +408,7 @@ var calculateDownsamplingThreshold = function calculateDownsamplingThreshold(_re
|
|
|
447
408
|
});
|
|
448
409
|
}
|
|
449
410
|
} catch (e) {
|
|
411
|
+
// eslint-disable-next-line no-console
|
|
450
412
|
console.error('Error occurred while setting downsample threshold on range select event', e);
|
|
451
413
|
}
|
|
452
414
|
|
|
@@ -613,6 +575,7 @@ var downsampleDataSources = function downsampleDataSources(_ref4) {
|
|
|
613
575
|
return downsampledIndices.add(downsampleIndex);
|
|
614
576
|
});
|
|
615
577
|
} catch (e) {
|
|
578
|
+
// eslint-disable-next-line no-console
|
|
616
579
|
console.error("Error occurred while downsampling column ".concat(columnIndex), e);
|
|
617
580
|
}
|
|
618
581
|
}); // update data columns with downsampled columns
|
|
@@ -624,7 +587,7 @@ var downsampleDataSources = function downsampleDataSources(_ref4) {
|
|
|
624
587
|
exports.downsampleDataSources = downsampleDataSources;
|
|
625
588
|
|
|
626
589
|
/***/ }),
|
|
627
|
-
/*
|
|
590
|
+
/* 16 */
|
|
628
591
|
/***/ (function(module, exports, __webpack_require__) {
|
|
629
592
|
|
|
630
593
|
"use strict";
|
|
@@ -659,6 +622,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
659
622
|
value: true
|
|
660
623
|
});
|
|
661
624
|
|
|
625
|
+
__exportStar(__webpack_require__(17), exports);
|
|
626
|
+
|
|
662
627
|
__exportStar(__webpack_require__(18), exports);
|
|
663
628
|
|
|
664
629
|
__exportStar(__webpack_require__(19), exports);
|
|
@@ -677,11 +642,9 @@ __exportStar(__webpack_require__(25), exports);
|
|
|
677
642
|
|
|
678
643
|
__exportStar(__webpack_require__(26), exports);
|
|
679
644
|
|
|
680
|
-
__exportStar(__webpack_require__(
|
|
645
|
+
__exportStar(__webpack_require__(29), exports);
|
|
681
646
|
|
|
682
|
-
__exportStar(__webpack_require__(
|
|
683
|
-
|
|
684
|
-
__exportStar(__webpack_require__(7), exports);
|
|
647
|
+
__exportStar(__webpack_require__(30), exports);
|
|
685
648
|
|
|
686
649
|
__exportStar(__webpack_require__(31), exports);
|
|
687
650
|
|
|
@@ -695,10 +658,8 @@ __exportStar(__webpack_require__(35), exports);
|
|
|
695
658
|
|
|
696
659
|
__exportStar(__webpack_require__(36), exports);
|
|
697
660
|
|
|
698
|
-
__exportStar(__webpack_require__(37), exports);
|
|
699
|
-
|
|
700
661
|
/***/ }),
|
|
701
|
-
/*
|
|
662
|
+
/* 17 */
|
|
702
663
|
/***/ (function(module, exports, __webpack_require__) {
|
|
703
664
|
|
|
704
665
|
"use strict";
|
|
@@ -709,7 +670,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
709
670
|
});
|
|
710
671
|
|
|
711
672
|
/***/ }),
|
|
712
|
-
/*
|
|
673
|
+
/* 18 */
|
|
713
674
|
/***/ (function(module, exports, __webpack_require__) {
|
|
714
675
|
|
|
715
676
|
"use strict";
|
|
@@ -723,7 +684,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
723
684
|
});
|
|
724
685
|
|
|
725
686
|
/***/ }),
|
|
726
|
-
/*
|
|
687
|
+
/* 19 */
|
|
727
688
|
/***/ (function(module, exports, __webpack_require__) {
|
|
728
689
|
|
|
729
690
|
"use strict";
|
|
@@ -732,24 +693,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
732
693
|
Object.defineProperty(exports, "__esModule", {
|
|
733
694
|
value: true
|
|
734
695
|
});
|
|
735
|
-
exports.validOutputModes = exports.
|
|
696
|
+
exports.validOutputModes = exports.validSortDirs = void 0;
|
|
736
697
|
exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
737
|
-
exports.validSegmentationModes = ['none', 'inner'];
|
|
738
698
|
exports.validOutputModes = ['json_cols', 'json'];
|
|
739
699
|
|
|
740
700
|
/***/ }),
|
|
741
|
-
/*
|
|
742
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
743
|
-
|
|
744
|
-
"use strict";
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
Object.defineProperty(exports, "__esModule", {
|
|
748
|
-
value: true
|
|
749
|
-
});
|
|
750
|
-
|
|
751
|
-
/***/ }),
|
|
752
|
-
/* 22 */
|
|
701
|
+
/* 20 */
|
|
753
702
|
/***/ (function(module, exports, __webpack_require__) {
|
|
754
703
|
|
|
755
704
|
"use strict";
|
|
@@ -760,7 +709,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
760
709
|
});
|
|
761
710
|
|
|
762
711
|
/***/ }),
|
|
763
|
-
/*
|
|
712
|
+
/* 21 */
|
|
764
713
|
/***/ (function(module, exports, __webpack_require__) {
|
|
765
714
|
|
|
766
715
|
"use strict";
|
|
@@ -771,7 +720,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
771
720
|
});
|
|
772
721
|
|
|
773
722
|
/***/ }),
|
|
774
|
-
/*
|
|
723
|
+
/* 22 */
|
|
775
724
|
/***/ (function(module, exports, __webpack_require__) {
|
|
776
725
|
|
|
777
726
|
"use strict";
|
|
@@ -782,7 +731,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
782
731
|
});
|
|
783
732
|
|
|
784
733
|
/***/ }),
|
|
785
|
-
/*
|
|
734
|
+
/* 23 */
|
|
786
735
|
/***/ (function(module, exports, __webpack_require__) {
|
|
787
736
|
|
|
788
737
|
"use strict";
|
|
@@ -793,7 +742,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
793
742
|
});
|
|
794
743
|
|
|
795
744
|
/***/ }),
|
|
796
|
-
/*
|
|
745
|
+
/* 24 */
|
|
797
746
|
/***/ (function(module, exports, __webpack_require__) {
|
|
798
747
|
|
|
799
748
|
"use strict";
|
|
@@ -804,7 +753,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
804
753
|
});
|
|
805
754
|
|
|
806
755
|
/***/ }),
|
|
807
|
-
/*
|
|
756
|
+
/* 25 */
|
|
808
757
|
/***/ (function(module, exports, __webpack_require__) {
|
|
809
758
|
|
|
810
759
|
"use strict";
|
|
@@ -815,15 +764,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
815
764
|
});
|
|
816
765
|
|
|
817
766
|
/***/ }),
|
|
818
|
-
/*
|
|
767
|
+
/* 26 */
|
|
819
768
|
/***/ (function(module, exports, __webpack_require__) {
|
|
820
769
|
|
|
821
770
|
"use strict";
|
|
822
771
|
|
|
823
772
|
|
|
824
|
-
var _classCallCheck = __webpack_require__(
|
|
773
|
+
var _classCallCheck = __webpack_require__(27);
|
|
825
774
|
|
|
826
|
-
var _createClass = __webpack_require__(
|
|
775
|
+
var _createClass = __webpack_require__(28);
|
|
827
776
|
|
|
828
777
|
Object.defineProperty(exports, "__esModule", {
|
|
829
778
|
value: true
|
|
@@ -852,19 +801,58 @@ var DefaultVizActionHandler = /*#__PURE__*/function () {
|
|
|
852
801
|
exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
853
802
|
|
|
854
803
|
/***/ }),
|
|
855
|
-
/*
|
|
804
|
+
/* 27 */
|
|
856
805
|
/***/ (function(module, exports) {
|
|
857
806
|
|
|
858
807
|
module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
859
808
|
|
|
860
809
|
/***/ }),
|
|
861
|
-
/*
|
|
810
|
+
/* 28 */
|
|
862
811
|
/***/ (function(module, exports) {
|
|
863
812
|
|
|
864
813
|
module.exports = require("@babel/runtime/helpers/createClass");
|
|
865
814
|
|
|
866
815
|
/***/ }),
|
|
867
|
-
/*
|
|
816
|
+
/* 29 */
|
|
817
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
818
|
+
|
|
819
|
+
"use strict";
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
Object.defineProperty(exports, "__esModule", {
|
|
823
|
+
value: true
|
|
824
|
+
});
|
|
825
|
+
exports.VizBehavior = void 0;
|
|
826
|
+
var VizBehavior;
|
|
827
|
+
|
|
828
|
+
(function (VizBehavior) {
|
|
829
|
+
/**
|
|
830
|
+
* Dynamic Options Behavior.
|
|
831
|
+
* This allows visualization options to be powered by data
|
|
832
|
+
*
|
|
833
|
+
* **Example**
|
|
834
|
+
*
|
|
835
|
+
* sparklineValues: ">primary|seriesByIndex(0)"
|
|
836
|
+
* would configure sparklineValues with an array of data points
|
|
837
|
+
* coming from the first series in the primary datasource
|
|
838
|
+
*
|
|
839
|
+
*/
|
|
840
|
+
VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
|
|
841
|
+
VizBehavior["EVENTS"] = "events";
|
|
842
|
+
VizBehavior["DOWNSAMPLING"] = "downsampling";
|
|
843
|
+
/**
|
|
844
|
+
* Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
|
|
845
|
+
* missing.
|
|
846
|
+
* @type {string}
|
|
847
|
+
*/
|
|
848
|
+
|
|
849
|
+
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
850
|
+
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
851
|
+
VizBehavior["TRELLIS"] = "trellis";
|
|
852
|
+
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
853
|
+
|
|
854
|
+
/***/ }),
|
|
855
|
+
/* 30 */
|
|
868
856
|
/***/ (function(module, exports, __webpack_require__) {
|
|
869
857
|
|
|
870
858
|
"use strict";
|
|
@@ -892,7 +880,7 @@ var VizCategory;
|
|
|
892
880
|
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
893
881
|
|
|
894
882
|
/***/ }),
|
|
895
|
-
/*
|
|
883
|
+
/* 31 */
|
|
896
884
|
/***/ (function(module, exports, __webpack_require__) {
|
|
897
885
|
|
|
898
886
|
"use strict";
|
|
@@ -903,7 +891,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
903
891
|
});
|
|
904
892
|
|
|
905
893
|
/***/ }),
|
|
906
|
-
/*
|
|
894
|
+
/* 32 */
|
|
907
895
|
/***/ (function(module, exports, __webpack_require__) {
|
|
908
896
|
|
|
909
897
|
"use strict";
|
|
@@ -914,7 +902,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
914
902
|
});
|
|
915
903
|
|
|
916
904
|
/***/ }),
|
|
917
|
-
/*
|
|
905
|
+
/* 33 */
|
|
918
906
|
/***/ (function(module, exports, __webpack_require__) {
|
|
919
907
|
|
|
920
908
|
"use strict";
|
|
@@ -925,7 +913,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
925
913
|
});
|
|
926
914
|
|
|
927
915
|
/***/ }),
|
|
928
|
-
/*
|
|
916
|
+
/* 34 */
|
|
929
917
|
/***/ (function(module, exports, __webpack_require__) {
|
|
930
918
|
|
|
931
919
|
"use strict";
|
|
@@ -936,7 +924,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
936
924
|
});
|
|
937
925
|
|
|
938
926
|
/***/ }),
|
|
939
|
-
/*
|
|
927
|
+
/* 35 */
|
|
940
928
|
/***/ (function(module, exports, __webpack_require__) {
|
|
941
929
|
|
|
942
930
|
"use strict";
|
|
@@ -947,7 +935,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
947
935
|
});
|
|
948
936
|
|
|
949
937
|
/***/ }),
|
|
950
|
-
/*
|
|
938
|
+
/* 36 */
|
|
951
939
|
/***/ (function(module, exports, __webpack_require__) {
|
|
952
940
|
|
|
953
941
|
"use strict";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/visualizations-shared/numberUtils\"","webpack:///./src/common/interfaces/VizBehavior.ts","webpack:///./src/common/utils/dataUtils.ts","webpack:///./src/common/interfaces/index.ts","webpack:///./src/common/interfaces/DataContract.ts","webpack:///./src/common/interfaces/DataSource.ts","webpack:///./src/common/interfaces/VizActionHandler.ts","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///./src/common/interfaces/VizCategory.ts"],"names":[],"mappings":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AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA,+C;;;;;;;;;;;;;;;;;;;AClBA;;AAEG;;;;;;;;;;;;;;;;;ACgBU,wBAAgB,CAAC,KAAD,EAAQ,MAAR,EAAgB,MAAhB,CAAhB;AAEA,iCAAyB,CAAC,MAAD,EAAS,OAAT,CAAzB;AAEA,2BAAmB,CAAC,WAAD,EAAc,MAAd,CAAnB,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICTA,uB;;;;;;;WACT,iBAAK,CACD;AACH;;;WAED,oBAAQ;AACJ,aAAO,IAAP,CADI,CACS;AAChB;;;;;;AAPL,0D;;;;;;ACbA,kE;;;;;;ACAA,+D;;;;;;;;;;;;;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","file":"dataUtils.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 = 16);\n","module.exports = require(\"@splunk/visualizations-shared/numberUtils\");","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 DOWNSAMPLING = 'downsampling',\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 TRELLIS = 'trellis',\n}\n","import type { FieldEntry } from '@splunk/visualizations-shared/dataSourceUtils';\nimport { startsWithNumber } from '@splunk/visualizations-shared/numberUtils';\nimport type { DashboardVizProps, DataSource, VizConfig } from '../interfaces';\nimport { VizBehavior } from '../interfaces';\nimport { ChartEvent } from '../interfaces/ChartEvent';\n\n// TODO: utilize this fn in ParallelCoordinates\n\nexport const convertToArrOfObjects = (columns: (string | any[])[], fields: any[]): any[] => {\n if (!columns || !columns[0] || !columns[0].length) return [];\n\n const data = [];\n\n for (let i = 0; i < columns[0].length; i += 1) {\n const newObj = {};\n fields.forEach((field, index) => {\n const fieldName = typeof field === 'string' ? field : field.name;\n if (columns[index][i] === '') {\n newObj[fieldName] = null;\n } else {\n newObj[fieldName] = columns[index][i];\n }\n });\n data.push(newObj);\n }\n\n return data;\n};\n\n// LTTB algorithm which can be used to downsample time series data while striving to maintain\n// the spikes and overall shape of the chart\n// Copied from https://github.com/sveinn-steinarsson/flot-downsample/blob/0815010016fc94b1bbc6a010afb8aad13ada6d0d/jquery.flot.downsample.js\n// Modifications include:\n// 1) Convert to modern JavaScript(use const, let, and use array.push to push to last element of array)\n// 2) Convert to camel case\n// 3) Convert to TS and also return the indices of the points that are in the downsampled result.\n// 4) Add a new parameter preferredDownsampleIndices that correspond to the indices of points\n// that should be used in case of a tie of the max area in a bucket\nconst largestTriangleThreeBuckets = (\n data: [Date | number, number][],\n threshold: number,\n preferredDownsampleIndices: Set<number>\n): { downsampledData: [Date | number, number][]; downsampledIndices: number[] } => {\n const dataLength = data.length;\n const downsampledIndices = [];\n if (threshold >= dataLength || threshold === 0) {\n const allIndices = data.map((values, index) => index);\n return { downsampledData: data, downsampledIndices: allIndices }; // Nothing to do\n }\n\n const sampled: [Date | number, number][] = [];\n let sampledIndex = 0;\n\n // Bucket size. Leave room for start and end data points\n const every = (dataLength - 2) / (threshold - 2);\n\n let a = 0; // Initially a is the first point in the triangle\n let maxAreaPoint: [Date | number, number];\n let maxArea: number | undefined;\n let area: number | undefined;\n let nextA: number | undefined;\n\n sampled.push(data[a]); // Always add the first point\n downsampledIndices.push(0);\n\n // eslint-disable-next-line no-plusplus\n for (let i = 0; i < threshold - 2; i++) {\n // Calculate point average for next bucket (containing c)\n let avgX = 0;\n let avgY = 0;\n let avgRangeStart = Math.floor((i + 1) * every) + 1;\n let avgRangeEnd = Math.floor((i + 2) * every) + 1;\n avgRangeEnd = avgRangeEnd < dataLength ? avgRangeEnd : dataLength;\n\n const avgRangeLength = avgRangeEnd - avgRangeStart;\n\n // eslint-disable-next-line no-plusplus\n for (; avgRangeStart < avgRangeEnd; avgRangeStart++) {\n avgX += Number(data[avgRangeStart][0]); // * 1 enforces Number (value may be Date)\n avgY += data[avgRangeStart][1] * 1;\n }\n avgX /= avgRangeLength;\n avgY /= avgRangeLength;\n\n // Get the range for this bucket\n let rangeOffs = Math.floor((i + 0) * every) + 1;\n const rangeTo = Math.floor((i + 1) * every) + 1;\n\n // Point a\n const pointAX = Number(data[a][0]); // Enforce Number (value may be Date)\n const pointAY = data[a][1] * 1;\n\n // eslint-disable-next-line no-multi-assign\n maxArea = area = -1;\n let maxAreaIndex = rangeOffs;\n\n // eslint-disable-next-line no-plusplus\n for (; rangeOffs < rangeTo; rangeOffs++) {\n // Calculate triangle area over three buckets\n area =\n Math.abs(\n (pointAX - avgX) * (data[rangeOffs][1] - pointAY) -\n (pointAX - Number(data[rangeOffs][0])) * (avgY - pointAY)\n ) * 0.5;\n // Modification: try to downsample the least amount of points possible when there are multiple series\n // If all points in a bucket have the same area, prioritize the one with an x index\n // that also existed from another series so we don't add another point unnecessarily.\n // By default LTTB picks the leftmost point in the bucket\n if (area > maxArea || (area === maxArea && preferredDownsampleIndices.has(rangeOffs))) {\n maxArea = area;\n maxAreaPoint = data[rangeOffs];\n nextA = rangeOffs; // Next a is this b\n // Modification: save the index of the point with the most area\n maxAreaIndex = rangeOffs;\n }\n }\n\n // eslint-disable-next-line no-plusplus\n sampled[sampledIndex++] = maxAreaPoint; // Pick this point from the bucket\n downsampledIndices.push(maxAreaIndex);\n a = nextA; // This a is the next a (chosen b)\n }\n\n // eslint-disable-next-line no-plusplus\n sampled[sampledIndex++] = data[dataLength - 1]; // Always add last\n downsampledIndices.push(dataLength - 1);\n\n return { downsampledData: sampled, downsampledIndices };\n};\n\nexport type DownsampleOptions = { threshold: number } & Pick<DashboardVizProps, 'dataSources' | 'options'>;\n\ntype CoerceYColumnResult = {\n canDownsampleColumn: boolean;\n canLooselyCoerceSomeValues: boolean;\n coercedColumn: number[];\n};\n\n/**\n * Strictly coerces the entire column to numbers if it only consists of numeric strings or numbers. Also determines\n * if at least one of the values in the column can be loosely coerced to a number.\n * If the column cannot be strictly downsampled (if it contains nulls or non-numeric strings), returns an empty array and\n * returns that it cannot downsample the column.\n */\nconst strictlyCoerceYColumn = (column: string[] | number[]): CoerceYColumnResult => {\n // Splunk charting allows for numbers in formats such as negative hex that\n // Number() does not support and also allows loose coercion of hex numbers (but not other formats)\n // We want to identify columns which contain at least one value that can be loosely coerced\n const canLooselyCoerceSomeValues = column.findIndex(value => startsWithNumber(`${value}`)) >= 0;\n\n // If not all values in column can be strictly coerced to a number, we do not downsample\n const coercedColumn: number[] = [];\n const canDownsampleColumn = !column.some(value => {\n const coercedValue = Number(value);\n // if it can't be parsed or isn't safe, fail\n if (\n Number.isNaN(coercedValue) ||\n coercedValue <= Number.MIN_SAFE_INTEGER ||\n coercedValue >= Number.MAX_SAFE_INTEGER ||\n (typeof value !== 'string' && typeof value !== 'number')\n ) {\n return true;\n }\n // save value and continue to next\n coercedColumn.push(coercedValue);\n return false;\n });\n\n return {\n canDownsampleColumn,\n canLooselyCoerceSomeValues,\n coercedColumn: canDownsampleColumn ? coercedColumn : [],\n };\n};\n\n/**\n * Tries to coerce the x-column to numbers or dates, if it is eligible for downsampling.\n * Only strictly increasing x-columns are eligible for downsampling.\n * If the column is not eligible for downsampling, returns an empty array.\n */\nconst strictlyCoerceXColumn = (column: string[], fieldType: string): Date[] | number[] => {\n if (fieldType === 'number') {\n const coercedXColumn = column.map(xValue => Number(xValue));\n if (isColumnStrictlyIncreasing(coercedXColumn, fieldType)) {\n return coercedXColumn;\n }\n } else if (fieldType === 'time') {\n const coercedXColumn = column.map(xValue => new Date(xValue));\n if (isColumnStrictlyIncreasing(coercedXColumn, fieldType)) {\n return coercedXColumn;\n }\n }\n return [];\n};\n\nexport const isDownsamplingEnabledForViz = ({ vizConfig }: { vizConfig: VizConfig }) => {\n return vizConfig.supports?.includes(VizBehavior.DOWNSAMPLING);\n};\n\nexport const calculateThresholdOnRangeSelect = ({\n firstIndex,\n lastIndex,\n dataSources,\n width,\n}: Pick<DashboardVizProps, 'dataSources'> & {\n firstIndex: number;\n lastIndex: number;\n width: number | string;\n}): number => {\n const window = lastIndex - firstIndex + 1;\n const ratio = Math.round(Number(dataSources?.primary?.data?.columns[0]?.length / window) * 10) / 10;\n return Math.round(ratio * Number(width));\n};\n\n/**\n * Calculates the downsampling threshold based on the range selection. If search zoom is enabled or there is no selection,\n * then returns the width of the visualization.\n *\n * Otherwise calculates the threshold based on the ratio of the window selected compared to the size of the non-downsampled\n * data sources. Returns null if the chart event's dataset does not match the passed in primary data source or if the chart is zoomed\n * in for a categorical chart.\n */\nexport const calculateDownsamplingThreshold = ({\n enableSearchZoom,\n dataSources,\n selectChartEvent,\n width,\n xField,\n y2Fields,\n}: {\n enableSearchZoom: boolean;\n dataSources: Record<string, DataSource> | null;\n selectChartEvent: ChartEvent<'chartRangeSelect'> | null;\n width: number;\n xField: string;\n y2Fields?: string[];\n}): number | null => {\n if (enableSearchZoom || !selectChartEvent) {\n return Number(width);\n }\n\n const primaryDataSource = dataSources?.primary;\n if (!primaryDataSource) {\n return null;\n }\n\n const { startXIndex, endXIndex, currentTarget } = selectChartEvent;\n\n try {\n const xFieldIndex = primaryDataSource?.data?.fields.findIndex((field: { name: string }) => {\n return field.name === xField;\n });\n const downsampledXFieldIndex = currentTarget.dataSet?.fields.findIndex(field => field === xField);\n\n if (xFieldIndex === -1 || downsampledXFieldIndex === -1) {\n return null;\n }\n\n const fullSeries = primaryDataSource?.data?.columns[xFieldIndex];\n const downsampledSeries = currentTarget.dataSet.seriesList[downsampledXFieldIndex];\n\n const firstIndex = fullSeries.findIndex(x => {\n return downsampledSeries[startXIndex] === x;\n });\n const lastIndex = fullSeries.findIndex(x => {\n return downsampledSeries[endXIndex] === x;\n });\n\n // For charts with categorical x-axis (charts with an xField that isn't _time), do not support\n // re-calculating downsampling threshold if the chart is zoomed in until SPL-259458 is fixed\n // Also do not support re-calculating downsampling threshold for zoomed-in charts with y2\n // until SPL-259611 is fixed\n if (xField !== '_time' || y2Fields?.length) {\n return firstIndex === 0 && lastIndex === fullSeries.length - 1 ? width : null;\n }\n\n if (firstIndex >= 0 && lastIndex >= 0 && firstIndex <= lastIndex) {\n return calculateThresholdOnRangeSelect({\n firstIndex,\n lastIndex,\n dataSources,\n width,\n });\n }\n } catch (e) {\n console.error('Error occurred while setting downsample threshold on range select event', e);\n }\n\n return null;\n};\n\nconst isColumnStrictlyIncreasing = (column: (number | Date)[], fieldType: 'number' | 'time') => {\n return column.every((value, index) => {\n if (fieldType === 'number') {\n if (Number.isNaN(value)) {\n return false;\n }\n }\n\n if (fieldType === 'time') {\n if (Number.isNaN((value as Date).getTime())) {\n return false;\n }\n }\n if (index === 0) {\n return true;\n }\n return value > column[index - 1];\n });\n};\n\n/**\n * Verifies that all of the columns that are displayed in a chart can be downsampled. Valid columns that can be\n * displayed are those that contain at least one number. We can only downsample columns that only consist of numbers.\n *\n * If all columns can be downsampled, returns the x column coerced to time/number and y columns coerced to numbers.\n * If not all columns can be downsampled, then returns empty arrays for both x and y\n */\nconst tryToCoerceAllDisplayedFields = (\n ds: DataSource,\n xField: string,\n yFields: Set<string>,\n fieldTypes: string[]\n): { xColumn: Date[] | number[]; yColumns: number[][] } => {\n let xColumn: Date[] | number[] = [];\n const yColumns: number[][] = [];\n\n const canDownsample = !ds.data.fields.some((field, index) => {\n const fieldName = (field as FieldEntry).name ?? field;\n const fieldType = fieldTypes[index] ?? 'unknown';\n const column = ds.data.columns[index];\n let hasDisplayedColumnThatCantBeDownsampled = false;\n\n if (fieldName === xField) {\n xColumn = strictlyCoerceXColumn(column, fieldType);\n } else if (yFields.has(fieldName)) {\n const { coercedColumn, canLooselyCoerceSomeValues, canDownsampleColumn } = strictlyCoerceYColumn(\n ds.data.columns[index]\n );\n // do not perform downsampling if a column can possibly be displayed but cannot\n // be downsampled using LTTB\n hasDisplayedColumnThatCantBeDownsampled = canLooselyCoerceSomeValues && !canDownsampleColumn;\n if (hasDisplayedColumnThatCantBeDownsampled) {\n return true;\n }\n if (canDownsampleColumn) {\n yColumns.push(coercedColumn);\n }\n }\n return false;\n });\n\n if (canDownsample) {\n return { xColumn, yColumns };\n }\n return { xColumn: [], yColumns: [] };\n};\n\nconst pickIndicesFromDataSource = (ds: DataSource, indices: Set<number>): DataSource => {\n const sortedIndices = Array.from(indices).sort((a: number, b: number) => a - b);\n const slicedColumns = [];\n ds.data.columns.forEach(column => {\n const slicedColumn = [];\n sortedIndices.forEach(index => {\n slicedColumn.push(column[index]);\n });\n slicedColumns.push(slicedColumn);\n });\n\n // update data columns with downsampled columns\n return {\n ...ds,\n data: {\n ...ds.data,\n columns: slicedColumns,\n },\n };\n};\n\nexport const downsampleDataSources = ({ dataSources, threshold, options }: DownsampleOptions) => {\n const primaryDS = dataSources?.primary;\n // only downsample time series when number of data points are over threshold\n const numPoints = primaryDS?.data?.columns[0]?.length ?? 0;\n if (Number.isNaN(threshold) || numPoints <= threshold || threshold < 2) {\n return dataSources;\n }\n\n const { xField, yFields, fieldTypes } = options;\n if (!xField || !yFields?.length || !fieldTypes?.length) {\n return dataSources;\n }\n\n const nonInternalYFields = new Set<string>(yFields.filter(yField => !yField.startsWith('_')));\n const maxPointsInDownsample = Math.min(nonInternalYFields.size * threshold, numPoints);\n\n // Do not try to downsample if there are too many downsampled pts\n // At the worst case, each series has non-overlapping downsampled pts\n // which will mean that all points will be included in the downsampled result\n // This will just lead to additional overhead due to coercing each\n // x and y field to number\n if (maxPointsInDownsample >= numPoints) {\n return dataSources;\n }\n\n const { xColumn, yColumns } = tryToCoerceAllDisplayedFields(\n primaryDS,\n xField,\n nonInternalYFields,\n fieldTypes\n );\n\n if (!yColumns.length || !xColumn.length) {\n return dataSources;\n }\n\n const downsampledDataSources = { ...dataSources };\n const downsampledIndices = new Set<number>();\n\n yColumns.forEach((yColumn, columnIndex) => {\n // perform LTTB downsampling for current series, LTTB takes an [x, y] pair\n const xyPair: [Date | number, number][] = yColumn.map((yValue, index) => {\n return [xColumn[index], yValue];\n });\n\n try {\n const { downsampledIndices: downsampledIndicesForSeries } = largestTriangleThreeBuckets(\n xyPair,\n threshold,\n downsampledIndices\n );\n downsampledIndicesForSeries.forEach(downsampleIndex => downsampledIndices.add(downsampleIndex));\n } catch (e) {\n console.error(`Error occurred while downsampling column ${columnIndex}`, e);\n }\n });\n // update data columns with downsampled columns\n downsampledDataSources.primary = pickIndicesFromDataSource(primaryDS, downsampledIndices);\n\n return downsampledDataSources;\n};\n","export * from './DashboardVizProps';\nexport * from './DataContract';\nexport * from './DataSource';\nexport * from './DefaultContext';\nexport * from './Editor';\nexport * from './ExtendedDashViz';\nexport * from './Object';\nexport * from './OptionsSchema';\nexport * from './Overview';\nexport * from './ThemedDefaults';\nexport * from './VizActionHandler';\nexport * from './VizBehavior';\nexport * from './VizCategory';\nexport * from './VizConfig';\nexport * from './VizEvent';\nexport * from './VizProps';\nexport * from './VizRegistry';\nexport * from './VizSize';\nexport * from './VizStatus';\n","/**\n * A data structure used at runtime to wire up a visualization.\n */\n\ninterface InitialRequestParams {\n [key: string]: Record<string, unknown> | ((options?: Record<string, unknown>) => Record<string, unknown>);\n}\nexport interface DataContract {\n requiredDataSources: {\n name: string;\n description: string;\n }[];\n optionalDataSources?: {\n name: string;\n description: string;\n }[];\n initialRequestParams: InitialRequestParams; // TODO define better than object?\n}\n","import { FieldEntry } from '@splunk/visualizations-shared/dataSourceUtils';\n\nexport interface JsonColumnData {\n fields: FieldEntry[] | string[];\n columns: string[][];\n}\n\nexport type HighlightedSourceMap = Record<string, Record<string, boolean>>;\nexport type TagsMap = Record<string, Record<string, string[]>>;\n\nexport interface Meta {\n totalCount: number;\n sid: string;\n app: string;\n highlighted?: HighlightedSourceMap;\n tags?: TagsMap;\n}\n\nexport const validSortDirs = ['asc', 'desc', 'none'] as const;\nexport type SortDirType = typeof validSortDirs[number];\nexport const validSegmentationModes = ['none', 'inner'] as const;\nexport type SegmentationType = typeof validSegmentationModes[number];\nexport const validOutputModes = ['json_cols', 'json'] as const;\nexport type OutputModeType = typeof validOutputModes[number];\n\nexport interface RequestParams {\n count?: number;\n offset?: number;\n sort?: {\n [sortKey: string]: SortDirType;\n };\n segmentation?: SegmentationType;\n // eslint-disable-next-line camelcase\n output_mode?: OutputModeType;\n}\n\nexport interface DataSource {\n requestParams: Partial<RequestParams>;\n onRequestParamsChange?: (p: Record<string, unknown>) => void;\n data: JsonColumnData;\n error?: { level: string; message: string };\n meta: Partial<Meta>;\n}\n\nexport interface DataSourceMeta {\n requestParams: Partial<RequestParams>;\n meta: Partial<Meta>;\n onRequestParamsChange: (payload: RequestParams) => void;\n}\n","/* 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(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","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"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/visualizations-shared/numberUtils\"","webpack:///./src/common/utils/dataUtils.ts","webpack:///./src/common/interfaces/index.ts","webpack:///./src/common/interfaces/DataContract.ts","webpack:///./src/common/interfaces/DataSource.ts","webpack:///./src/common/interfaces/VizActionHandler.ts","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///./src/common/interfaces/VizBehavior.ts","webpack:///./src/common/interfaces/VizCategory.ts"],"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;;;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Y,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","file":"dataUtils.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 = 15);\n","module.exports = require(\"@splunk/visualizations-shared/numberUtils\");","import type { FieldEntry } from '@splunk/visualizations-shared/dataSourceUtils';\nimport { startsWithNumber } from '@splunk/visualizations-shared/numberUtils';\nimport type { DashboardVizProps, DataSource, VizConfig } from '../interfaces';\nimport { VizBehavior } from '../interfaces';\nimport { ChartEvent } from '../interfaces/ChartEvent';\n\n// TODO: utilize this fn in ParallelCoordinates\n\nexport const convertToArrOfObjects = (columns: (string | any[])[], fields: any[]): any[] => {\n if (!columns || !columns[0] || !columns[0].length) return [];\n\n const data = [];\n\n for (let i = 0; i < columns[0].length; i += 1) {\n const newObj = {};\n fields.forEach((field, index) => {\n const fieldName = typeof field === 'string' ? field : field.name;\n if (columns[index][i] === '') {\n newObj[fieldName] = null;\n } else {\n newObj[fieldName] = columns[index][i];\n }\n });\n data.push(newObj);\n }\n\n return data;\n};\n\n// LTTB algorithm which can be used to downsample time series data while striving to maintain\n// the spikes and overall shape of the chart\n// Copied from https://github.com/sveinn-steinarsson/flot-downsample/blob/0815010016fc94b1bbc6a010afb8aad13ada6d0d/jquery.flot.downsample.js\n// Modifications include:\n// 1) Convert to modern JavaScript(use const, let, and use array.push to push to last element of array)\n// 2) Convert to camel case\n// 3) Convert to TS and also return the indices of the points that are in the downsampled result.\n// 4) Add a new parameter preferredDownsampleIndices that correspond to the indices of points\n// that should be used in case of a tie of the max area in a bucket\nconst largestTriangleThreeBuckets = (\n data: [Date | number, number][],\n threshold: number,\n preferredDownsampleIndices: Set<number>\n): { downsampledData: [Date | number, number][]; downsampledIndices: number[] } => {\n const dataLength = data.length;\n const downsampledIndices = [];\n if (threshold >= dataLength || threshold === 0) {\n const allIndices = data.map((values, index) => index);\n return { downsampledData: data, downsampledIndices: allIndices }; // Nothing to do\n }\n\n const sampled: [Date | number, number][] = [];\n let sampledIndex = 0;\n\n // Bucket size. Leave room for start and end data points\n const every = (dataLength - 2) / (threshold - 2);\n\n let a = 0; // Initially a is the first point in the triangle\n let maxAreaPoint: [Date | number, number];\n let maxArea: number | undefined;\n let area: number | undefined;\n let nextA: number | undefined;\n\n sampled.push(data[a]); // Always add the first point\n downsampledIndices.push(0);\n\n // eslint-disable-next-line no-plusplus\n for (let i = 0; i < threshold - 2; i++) {\n // Calculate point average for next bucket (containing c)\n let avgX = 0;\n let avgY = 0;\n let avgRangeStart = Math.floor((i + 1) * every) + 1;\n let avgRangeEnd = Math.floor((i + 2) * every) + 1;\n avgRangeEnd = avgRangeEnd < dataLength ? avgRangeEnd : dataLength;\n\n const avgRangeLength = avgRangeEnd - avgRangeStart;\n\n // eslint-disable-next-line no-plusplus\n for (; avgRangeStart < avgRangeEnd; avgRangeStart++) {\n avgX += Number(data[avgRangeStart][0]); // * 1 enforces Number (value may be Date)\n avgY += data[avgRangeStart][1] * 1;\n }\n avgX /= avgRangeLength;\n avgY /= avgRangeLength;\n\n // Get the range for this bucket\n let rangeOffs = Math.floor((i + 0) * every) + 1;\n const rangeTo = Math.floor((i + 1) * every) + 1;\n\n // Point a\n const pointAX = Number(data[a][0]); // Enforce Number (value may be Date)\n const pointAY = data[a][1] * 1;\n\n // eslint-disable-next-line no-multi-assign\n maxArea = area = -1;\n let maxAreaIndex = rangeOffs;\n\n // eslint-disable-next-line no-plusplus\n for (; rangeOffs < rangeTo; rangeOffs++) {\n // Calculate triangle area over three buckets\n area =\n Math.abs(\n (pointAX - avgX) * (data[rangeOffs][1] - pointAY) -\n (pointAX - Number(data[rangeOffs][0])) * (avgY - pointAY)\n ) * 0.5;\n // Modification: try to downsample the least amount of points possible when there are multiple series\n // If all points in a bucket have the same area, prioritize the one with an x index\n // that also existed from another series so we don't add another point unnecessarily.\n // By default LTTB picks the leftmost point in the bucket\n if (area > maxArea || (area === maxArea && preferredDownsampleIndices.has(rangeOffs))) {\n maxArea = area;\n maxAreaPoint = data[rangeOffs];\n nextA = rangeOffs; // Next a is this b\n // Modification: save the index of the point with the most area\n maxAreaIndex = rangeOffs;\n }\n }\n\n // eslint-disable-next-line no-plusplus\n sampled[sampledIndex++] = maxAreaPoint; // Pick this point from the bucket\n downsampledIndices.push(maxAreaIndex);\n a = nextA; // This a is the next a (chosen b)\n }\n\n // eslint-disable-next-line no-plusplus\n sampled[sampledIndex++] = data[dataLength - 1]; // Always add last\n downsampledIndices.push(dataLength - 1);\n\n return { downsampledData: sampled, downsampledIndices };\n};\n\nexport type DownsampleOptions = { threshold: number } & Pick<DashboardVizProps, 'dataSources' | 'options'>;\n\ntype CoerceYColumnResult = {\n canDownsampleColumn: boolean;\n canLooselyCoerceSomeValues: boolean;\n coercedColumn: number[];\n};\n\n/**\n * Strictly coerces the entire column to numbers if it only consists of numeric strings or numbers. Also determines\n * if at least one of the values in the column can be loosely coerced to a number.\n * If the column cannot be strictly downsampled (if it contains nulls or non-numeric strings), returns an empty array and\n * returns that it cannot downsample the column.\n */\nconst strictlyCoerceYColumn = (column: string[] | number[]): CoerceYColumnResult => {\n // Splunk charting allows for numbers in formats such as negative hex that\n // Number() does not support and also allows loose coercion of hex numbers (but not other formats)\n // We want to identify columns which contain at least one value that can be loosely coerced\n const canLooselyCoerceSomeValues = column.findIndex(value => startsWithNumber(`${value}`)) >= 0;\n\n // If not all values in column can be strictly coerced to a number, we do not downsample\n const coercedColumn: number[] = [];\n const canDownsampleColumn = !column.some(value => {\n const coercedValue = Number(value);\n // if it can't be parsed or isn't safe, fail\n if (\n Number.isNaN(coercedValue) ||\n coercedValue <= Number.MIN_SAFE_INTEGER ||\n coercedValue >= Number.MAX_SAFE_INTEGER ||\n (typeof value !== 'string' && typeof value !== 'number')\n ) {\n return true;\n }\n // save value and continue to next\n coercedColumn.push(coercedValue);\n return false;\n });\n\n return {\n canDownsampleColumn,\n canLooselyCoerceSomeValues,\n coercedColumn: canDownsampleColumn ? coercedColumn : [],\n };\n};\n\n/**\n * Tries to coerce the x-column to numbers or dates, if it is eligible for downsampling.\n * Only strictly increasing x-columns are eligible for downsampling.\n * If the column is not eligible for downsampling, returns an empty array.\n */\nconst strictlyCoerceXColumn = (column: string[], fieldType: string): Date[] | number[] => {\n if (fieldType === 'number') {\n const coercedXColumn = column.map(xValue => Number(xValue));\n if (isColumnStrictlyIncreasing(coercedXColumn, fieldType)) {\n return coercedXColumn;\n }\n } else if (fieldType === 'time') {\n const coercedXColumn = column.map(xValue => new Date(xValue));\n if (isColumnStrictlyIncreasing(coercedXColumn, fieldType)) {\n return coercedXColumn;\n }\n }\n return [];\n};\n\nexport const isDownsamplingEnabledForViz = ({ vizConfig }: { vizConfig: VizConfig }) => {\n return vizConfig.supports?.includes(VizBehavior.DOWNSAMPLING);\n};\n\nexport const calculateThresholdOnRangeSelect = ({\n firstIndex,\n lastIndex,\n dataSources,\n width,\n}: Pick<DashboardVizProps, 'dataSources'> & {\n firstIndex: number;\n lastIndex: number;\n width: number | string;\n}): number => {\n const window = lastIndex - firstIndex + 1;\n const ratio = Math.round(Number(dataSources?.primary?.data?.columns[0]?.length / window) * 10) / 10;\n return Math.round(ratio * Number(width));\n};\n\n/**\n * Calculates the downsampling threshold based on the range selection. If search zoom is enabled or there is no selection,\n * then returns the width of the visualization.\n *\n * Otherwise calculates the threshold based on the ratio of the window selected compared to the size of the non-downsampled\n * data sources. Returns null if the chart event's dataset does not match the passed in primary data source or if the chart is zoomed\n * in for a categorical chart.\n */\nexport const calculateDownsamplingThreshold = ({\n enableSearchZoom,\n dataSources,\n selectChartEvent,\n width,\n xField,\n y2Fields,\n}: {\n enableSearchZoom: boolean;\n dataSources: Record<string, DataSource> | null;\n selectChartEvent: ChartEvent<'chartRangeSelect'> | null;\n width: number;\n xField: string;\n y2Fields?: string[];\n}): number | null => {\n if (enableSearchZoom || !selectChartEvent) {\n return Number(width);\n }\n\n const primaryDataSource = dataSources?.primary;\n if (!primaryDataSource) {\n return null;\n }\n\n const { startXIndex, endXIndex, currentTarget } = selectChartEvent;\n\n try {\n const xFieldIndex = primaryDataSource?.data?.fields.findIndex((field: { name: string }) => {\n return field.name === xField;\n });\n const downsampledXFieldIndex = currentTarget.dataSet?.fields.findIndex(field => field === xField);\n\n if (xFieldIndex === -1 || downsampledXFieldIndex === -1) {\n return null;\n }\n\n const fullSeries = primaryDataSource?.data?.columns[xFieldIndex];\n const downsampledSeries = currentTarget.dataSet.seriesList[downsampledXFieldIndex];\n\n const firstIndex = fullSeries.findIndex(x => {\n return downsampledSeries[startXIndex] === x;\n });\n const lastIndex = fullSeries.findIndex(x => {\n return downsampledSeries[endXIndex] === x;\n });\n\n // For charts with categorical x-axis (charts with an xField that isn't _time), do not support\n // re-calculating downsampling threshold if the chart is zoomed in until SPL-259458 is fixed\n // Also do not support re-calculating downsampling threshold for zoomed-in charts with y2\n // until SPL-259611 is fixed\n if (xField !== '_time' || y2Fields?.length) {\n return firstIndex === 0 && lastIndex === fullSeries.length - 1 ? width : null;\n }\n\n if (firstIndex >= 0 && lastIndex >= 0 && firstIndex <= lastIndex) {\n return calculateThresholdOnRangeSelect({\n firstIndex,\n lastIndex,\n dataSources,\n width,\n });\n }\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('Error occurred while setting downsample threshold on range select event', e);\n }\n\n return null;\n};\n\nconst isColumnStrictlyIncreasing = (column: (number | Date)[], fieldType: 'number' | 'time') => {\n return column.every((value, index) => {\n if (fieldType === 'number') {\n if (Number.isNaN(value)) {\n return false;\n }\n }\n\n if (fieldType === 'time') {\n if (Number.isNaN((value as Date).getTime())) {\n return false;\n }\n }\n if (index === 0) {\n return true;\n }\n return value > column[index - 1];\n });\n};\n\n/**\n * Verifies that all of the columns that are displayed in a chart can be downsampled. Valid columns that can be\n * displayed are those that contain at least one number. We can only downsample columns that only consist of numbers.\n *\n * If all columns can be downsampled, returns the x column coerced to time/number and y columns coerced to numbers.\n * If not all columns can be downsampled, then returns empty arrays for both x and y\n */\nconst tryToCoerceAllDisplayedFields = (\n ds: DataSource,\n xField: string,\n yFields: Set<string>,\n fieldTypes: string[]\n): { xColumn: Date[] | number[]; yColumns: number[][] } => {\n let xColumn: Date[] | number[] = [];\n const yColumns: number[][] = [];\n\n const canDownsample = !ds.data.fields.some((field, index) => {\n const fieldName = (field as FieldEntry).name ?? field;\n const fieldType = fieldTypes[index] ?? 'unknown';\n const column = ds.data.columns[index];\n let hasDisplayedColumnThatCantBeDownsampled = false;\n\n if (fieldName === xField) {\n xColumn = strictlyCoerceXColumn(column, fieldType);\n } else if (yFields.has(fieldName)) {\n const { coercedColumn, canLooselyCoerceSomeValues, canDownsampleColumn } = strictlyCoerceYColumn(\n ds.data.columns[index]\n );\n // do not perform downsampling if a column can possibly be displayed but cannot\n // be downsampled using LTTB\n hasDisplayedColumnThatCantBeDownsampled = canLooselyCoerceSomeValues && !canDownsampleColumn;\n if (hasDisplayedColumnThatCantBeDownsampled) {\n return true;\n }\n if (canDownsampleColumn) {\n yColumns.push(coercedColumn);\n }\n }\n return false;\n });\n\n if (canDownsample) {\n return { xColumn, yColumns };\n }\n return { xColumn: [], yColumns: [] };\n};\n\nconst pickIndicesFromDataSource = (ds: DataSource, indices: Set<number>): DataSource => {\n const sortedIndices = Array.from(indices).sort((a: number, b: number) => a - b);\n const slicedColumns = [];\n ds.data.columns.forEach(column => {\n const slicedColumn = [];\n sortedIndices.forEach(index => {\n slicedColumn.push(column[index]);\n });\n slicedColumns.push(slicedColumn);\n });\n\n // update data columns with downsampled columns\n return {\n ...ds,\n data: {\n ...ds.data,\n columns: slicedColumns,\n },\n };\n};\n\nexport const downsampleDataSources = ({ dataSources, threshold, options }: DownsampleOptions) => {\n const primaryDS = dataSources?.primary;\n // only downsample time series when number of data points are over threshold\n const numPoints = primaryDS?.data?.columns[0]?.length ?? 0;\n if (Number.isNaN(threshold) || numPoints <= threshold || threshold < 2) {\n return dataSources;\n }\n\n const { xField, yFields, fieldTypes } = options;\n if (!xField || !yFields?.length || !fieldTypes?.length) {\n return dataSources;\n }\n\n const nonInternalYFields = new Set<string>(yFields.filter(yField => !yField.startsWith('_')));\n const maxPointsInDownsample = Math.min(nonInternalYFields.size * threshold, numPoints);\n\n // Do not try to downsample if there are too many downsampled pts\n // At the worst case, each series has non-overlapping downsampled pts\n // which will mean that all points will be included in the downsampled result\n // This will just lead to additional overhead due to coercing each\n // x and y field to number\n if (maxPointsInDownsample >= numPoints) {\n return dataSources;\n }\n\n const { xColumn, yColumns } = tryToCoerceAllDisplayedFields(\n primaryDS,\n xField,\n nonInternalYFields,\n fieldTypes\n );\n\n if (!yColumns.length || !xColumn.length) {\n return dataSources;\n }\n\n const downsampledDataSources = { ...dataSources };\n const downsampledIndices = new Set<number>();\n\n yColumns.forEach((yColumn, columnIndex) => {\n // perform LTTB downsampling for current series, LTTB takes an [x, y] pair\n const xyPair: [Date | number, number][] = yColumn.map((yValue, index) => {\n return [xColumn[index], yValue];\n });\n\n try {\n const { downsampledIndices: downsampledIndicesForSeries } = largestTriangleThreeBuckets(\n xyPair,\n threshold,\n downsampledIndices\n );\n downsampledIndicesForSeries.forEach(downsampleIndex => downsampledIndices.add(downsampleIndex));\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(`Error occurred while downsampling column ${columnIndex}`, e);\n }\n });\n // update data columns with downsampled columns\n downsampledDataSources.primary = pickIndicesFromDataSource(primaryDS, downsampledIndices);\n\n return downsampledDataSources;\n};\n","export * from './DashboardVizProps';\nexport * from './DataContract';\nexport * from './DataSource';\nexport * from './DefaultContext';\nexport * from './Editor';\nexport * from './ExtendedDashViz';\nexport * from './Object';\nexport * from './Overview';\nexport * from './ThemedDefaults';\nexport * from './VizActionHandler';\nexport * from './VizBehavior';\nexport * from './VizCategory';\nexport * from './VizConfig';\nexport * from './VizEvent';\nexport * from './VizProps';\nexport * from './VizRegistry';\nexport * from './VizSize';\nexport * from './VizStatus';\n","/**\n * A data structure used at runtime to wire up a visualization.\n */\n\ninterface InitialRequestParams {\n [key: string]: Record<string, unknown> | ((options?: Record<string, unknown>) => Record<string, unknown>);\n}\nexport interface DataContract {\n requiredDataSources: {\n name: string;\n description: string;\n }[];\n optionalDataSources?: {\n name: string;\n description: string;\n }[];\n initialRequestParams: InitialRequestParams; // TODO define better than object?\n}\n","import { FieldEntry } from '@splunk/visualizations-shared/dataSourceUtils';\nimport { validSegmentationModes } from '@splunk/visualization-schemas';\n\nexport interface JsonColumnData {\n fields: FieldEntry[] | string[];\n columns: string[][];\n}\n\nexport type HighlightedSourceMap = Record<string, Record<string, boolean>>;\nexport type TagsMap = Record<string, Record<string, string[]>>;\n\nexport interface Meta {\n totalCount: number;\n sid: string;\n app: string;\n highlighted?: HighlightedSourceMap;\n tags?: TagsMap;\n}\n\nexport const validSortDirs = ['asc', 'desc', 'none'] as const;\nexport type SortDirType = typeof validSortDirs[number];\nexport type SegmentationType = typeof validSegmentationModes[number];\nexport const validOutputModes = ['json_cols', 'json'] as const;\nexport type OutputModeType = typeof validOutputModes[number];\n\nexport interface RequestParams {\n count?: number;\n offset?: number;\n sort?: {\n [sortKey: string]: SortDirType;\n };\n segmentation?: SegmentationType;\n // eslint-disable-next-line camelcase\n output_mode?: OutputModeType;\n}\n\nexport interface DataSource {\n requestParams: Partial<RequestParams>;\n onRequestParamsChange?: (p: Record<string, unknown>) => void;\n data: JsonColumnData;\n error?: { level: string; message: string };\n meta: Partial<Meta>;\n}\n\nexport interface DataSourceMeta {\n requestParams: Partial<RequestParams>;\n meta: Partial<Meta>;\n onRequestParamsChange: (payload: RequestParams) => void;\n}\n","/* 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(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","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 DOWNSAMPLING = 'downsampling',\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 TRELLIS = 'trellis',\n}\n","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"],"sourceRoot":""}
|