@splunk/visualization-encoding-parsers 25.7.1 → 25.8.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/Base.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"lodash/isEmpty\"","webpack:///external \"@babel/runtime/helpers/typeof\"","webpack:///external \"lodash/isNumber\"","webpack:///external \"chroma-js\"","webpack:///external \"lodash/isUndefined\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/slicedToArray\"","webpack:///external \"lodash/findIndex\"","webpack:///external \"lodash/clone\"","webpack:///external \"lodash/find\"","webpack:///external \"lodash/isFinite\"","webpack:///./src/util/format.js","webpack:///./src/util/types.js","webpack:///./src/Base.js"],"names":["hasOwnProperty","Object","prototype","rangeFormat","ranges","values","Array","Number","floatVal","parseFloat","i","valueIndex","Math","categoryFormat","categories","rangeValueFormat","floatValue","matchValueFormat","matches","defaultValue","undefined","defaultResult","isUndefined","matchResult","find","match","NON_NUMERIC_RANGE_ERROR","VALUES_AND_RANGES_HAVE_DIFFERENT_LENGTH","INVALID_VALUE","colorGradientFormat","colorValues","colorRanges","chroma","data","min","max","a","errorHandler","errorColor","upperVal","lowerVal","tau","value","upperColor","lowerColor","formatters","rangevalue","matchvalue","gradient","MAX_LOGGED_FORMATTER_ERRORS","newFormatterErrorHandler","errorCount","handlerFunc","getFormatter","formatCfg","console","getDataTypeForPoint","isFinite","isNumber","Date","inferDataTypeFromSample","typeMatches","time","number","string","unknown","dataSample","typeCount","returnType","drawSample","getDataForDataSourceType","fields","columns","parseFieldRangeReference","fieldIndexRangeStr","isFieldIndexRange","fromFieldIndexStr","toFieldIndexStr","fromFieldIndex","toFieldIndex","parseIndexBasedFieldReference","indices","fieldReferenceStr","dataSourceName","fieldRange","fieldIndex","columnIndex","parseNameBasedFieldReference","fieldNameStr","splitedStr","fieldName","getDataForIndexBasedFieldReference","dataForRange","endIndex","isNegative","absoluteIndex","correctedFieldIndex","isNegativeColumnIndex","correctColumnIndex","fieldData","getDataForNameBasedFieldReference","findIndex","field","getDataForFieldReference","fieldReference","dataFromDefault","type","indexBasedRegx","nameBasedRegx","isIndexBasedReference","isNameBasedReference","dataSourceType","format","formatValue","isEmpty","mergeEncoding","userDefinedEncoding","mergedEncoding","defaultEncoding","isDefault","parse","encoding","parsedOutput","_meta","fieldNames","types","clone","replacedKey","dataForFieldReference","entry"],"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,2C;;;;;;ACAA,0D;;;;;;ACAA,4C;;;;;;ACAA,sC;;;;;;ACAA,+C;;;;;;;ACAA,kE;;;;;;ACAA,iE;;;;;;ACAA,6C;;;;;;ACAA,yC;;;;;;ACAA,wC;;;;;;ACAA,4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;IAEQA,qB,GAAmBC,MAAM,CAACC,SAAPD,CAAnBD,c;AAED,IAAMG,WAAW,GAAG,SAAdA,WAAc,QAAoC;AAAA,iFAAP,EAAO;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,CAApBA;AACAA,kBAAY,CAAZA,wBAAqC,qBAAqB,CAArB,IAA0B,iBAAK;AAAA,eAAIO,KAAK,CAAT;AAF9B,OAED,CAArCP,CAFsC,CAEoD;AAC1F;;AACAA,kBAAY,CAAZA,mBAAgC,qBAAqB,CAArB,IAA0B,iBAAK;AAAA,eAC3D9D,uBAAuB,CAACS,UAAU,CAAC4D,KAAK,CADmB,IACzB,CAAX,CADoC;AAA/DP,OAAgC,CAAhCA;AAJJ,WAOO;AAAA,UACKhC,SADL,GACyBsC,qBADzB;AAAA,UACgB/F,IADhB,GACyB+F,qBADzB;;AAEH,qBAAe;AACXN,oBAAY,CAAZA,GAAY,CAAZA;AACAA,oBAAY,CAAZA,wBAFW,SAEXA,CAFW,CAEqC;AAChD;;AACAA,oBAAY,CAAZA,mBAAgC9D,uBAAuB,CAACS,UAAU,CAAlEqD,IAAkE,CAAX,CAAvDA;AACH;AACJ;AA7CLzH;AAgDA;AAxDG,E","file":"Base.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 33);\n","module.exports = require(\"lodash/isEmpty\");","module.exports = require(\"@babel/runtime/helpers/typeof\");","module.exports = require(\"lodash/isNumber\");","module.exports = require(\"chroma-js\");","module.exports = require(\"lodash/isUndefined\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/slicedToArray\");","module.exports = require(\"lodash/findIndex\");","module.exports = require(\"lodash/clone\");","module.exports = require(\"lodash/find\");","module.exports = require(\"lodash/isFinite\");","import chroma from 'chroma-js';\nimport isUndefined from 'lodash/isUndefined';\nimport find from 'lodash/find';\n\nconst { hasOwnProperty } = Object.prototype;\n\nexport const rangeFormat = (value, { ranges, values } = {}) => {\n if (Array.isArray(ranges) && Array.isArray(values) && !Number.isNaN(value)) {\n const floatVal = parseFloat(value);\n for (let i = 0; i < ranges.length; i += 1) {\n // bad range value\n if (Number.isNaN(Number(ranges[i]))) {\n // Could not format value: Ranges are required to be numbers. Falling back to original value\n return value;\n }\n // value is less than the range limit\n if (floatVal <= parseFloat(ranges[i])) {\n const valueIndex = Math.min(i, values.length - 1); // correct the index if there are more range items than values\n if (values[valueIndex]) {\n return values[valueIndex];\n }\n }\n }\n if (floatVal > parseFloat(ranges[ranges.length - 1])) {\n return values[values.length - 1];\n }\n }\n // Could not format value: Ranges and Value are required to be numbers\n return value;\n};\n\nexport const categoryFormat = (value, { categories, values }) => {\n if (!(Array.isArray(categories) && Array.isArray(values) && categories.length === values.length)) {\n // Could not format value: categories & values should be arrays of the same length. Falling back to original value\n return value;\n }\n const valueIndex = categories.indexOf(value);\n if (valueIndex > -1) {\n return values[valueIndex];\n }\n // Could not format value: Category does not exist. Falling back to original value\n return value;\n};\n\n/**\n * based on a range configuration this formatter maps the value to a value specified in a range.\n * the range fitting follows this criteria: `range.from <= value < range.to` so the `to` value is not included\n * A range can be defined as either a closed bound range: `{ from: 10, to: 20, value: 'foo' }`\n * or an open bound range:\n * `{ to: 20, value: 'bar' }` (open lower bound)\n * `{ from: 100, value: 'oof' }` (open upper bound)\n *\n * @param {string} value from data\n * @param {object} formatConfig\n * @param {Object[]} formatConfig.ranges\n */\nexport const rangeValueFormat = (value, { ranges = [] }) => {\n const floatValue = parseFloat(value);\n if (Number.isNaN(Number(value))) {\n return value;\n }\n for (let i = 0; i < ranges.length; i += 1) {\n if (\n // open upper bound: value is bigger than or equal to open upper bound start (from)\n (i === 0 && hasOwnProperty.call(ranges[i], 'from') && floatValue >= ranges[i].from) ||\n // inbetween: value falls into from - to range\n (floatValue >= ranges[i].from && floatValue < ranges[i].to) ||\n // open lower bound: value is smaller than or equal to open lower bound end (to)\n (i === ranges.length - 1 && hasOwnProperty.call(ranges[i], 'to') && floatValue < ranges[i].to)\n ) {\n return ranges[i].value;\n }\n }\n return value;\n};\n\n/**\n * this formatter maps the value to a value specified in a list of potential matches .\n * if the value passed is a match for what is provided in `matches[i].match`, we return that mapped value `matches[i].value`.\n * If there is not match in the array and there is a `defaultValue` provided we return that value. If there is not a match in the list\n * and no defaultValue is passed, we return the original `value`\n * `{ match: 'cherry', value: 'red' }` (exact match)\n *\n * @param {string} value from data\n * @param {object} formatConfig\n * @param {Object[]} formatConfig.matches\n * @param {object} formatConfig.defaultValue\n */\nexport const matchValueFormat = (value, { matches = [], defaultValue = undefined }) => {\n const defaultResult = isUndefined(defaultValue) ? value : defaultValue;\n const matchResult = find(matches, match => match.match && match.match === value);\n\n return isUndefined(matchResult) ? defaultResult : matchResult.value;\n};\n\nexport const NON_NUMERIC_RANGE_ERROR =\n 'Could not format value: Ranges are required to be numbers. Falling back to first color';\nexport const VALUES_AND_RANGES_HAVE_DIFFERENT_LENGTH =\n 'gradient ranges and values must have the same number of elements';\nexport const INVALID_VALUE = 'Could not format value for gradient:';\n\n/**\n * based on ranges and values this formatter maps the value to an interpolated color\n *\n * @param {string} value from data (string representation of number)\n * @param {object} formatConfig\n * @param {number[]} formatConfig.ranges value ranges\n * @param {string[]} formatConfig.values color stops to interpolate from\n * @param {string[]} data the data to be formatted\n * @param errorHandler function\n */\nexport const colorGradientFormat = (value, { ranges, values }, data, errorHandler) => {\n let colorValues = values;\n let colorRanges = ranges;\n function errorColor() {\n return colorValues ? chroma(colorValues[0]).hex().toUpperCase() : '#000';\n }\n if (!Number.isNaN(Number(value))) {\n // set default values for gradient colors if values not explicit\n if (!colorValues) {\n colorValues = ['white', 'red'];\n }\n\n if (colorValues.length === 1) {\n colorValues.unshift('white'); // force color bin to have a lower bound color\n }\n // set default values for ranges if ranges not explicit\n if (!ranges) {\n if (data && data.length > 0) {\n const min = data.length > 0 ? Math.min.apply(null, data) : undefined;\n const max = data.length > 0 ? Math.max.apply(null, data) : undefined;\n colorRanges = [min];\n for (let i = 1; i < colorValues.length - 1; i += 1) {\n colorRanges.push(min + (i * (max - min)) / (colorValues.length - 1));\n }\n colorRanges.push(max);\n } else {\n colorRanges = [0, 1]; // no data values, so just make the range from zero to 1\n }\n }\n\n if (colorRanges.length === 1) {\n colorRanges.push(colorRanges[0]); // force range to be at least two values\n }\n colorRanges.sort((a, b) => a - b); // force ascending order of range stops\n if (colorRanges.length !== colorValues.length) {\n errorHandler(VALUES_AND_RANGES_HAVE_DIFFERENT_LENGTH);\n return errorColor();\n }\n\n const floatVal = parseFloat(value);\n\n // don't let value be outside the allowed range\n if (floatVal > parseFloat(colorRanges[colorRanges.length - 1])) {\n return chroma(colorValues[colorValues.length - 1])\n .hex()\n .toUpperCase(); // high end\n }\n if (floatVal < parseFloat(colorRanges[0])) {\n return chroma(colorValues[0]).hex().toUpperCase(); // low end\n }\n\n // find the color gradient range that the value is inside\n for (let i = 1; i < colorRanges.length; i += 1) {\n // bad range value\n if (Number.isNaN(Number(colorRanges[i]))) {\n // eslint-disable-next-line\n errorHandler(NON_NUMERIC_RANGE_ERROR);\n return errorColor();\n }\n\n const upperVal = colorRanges[i];\n if (floatVal <= upperVal) {\n // if value is inside the bin\n const lowerVal = colorRanges[i - 1];\n let tau = (value - lowerVal) / (upperVal - lowerVal);\n\n // deal with special case when the upper and lower and bounds of the colorRange is equal\n if (upperVal === lowerVal) {\n if (value === 0) {\n // user prolly expects lower end of color range if value is zero\n tau = 0;\n } else {\n tau = 1; // otherwise use the upper bound\n }\n }\n\n const upperColor = colorValues[i];\n const lowerColor = colorValues[i - 1];\n return chroma.scale([lowerColor, upperColor])(tau).hex().toUpperCase();\n }\n }\n }\n // eslint-disable-next-line\n errorHandler(`${INVALID_VALUE} ${value}`);\n return errorColor();\n};\n\nconst formatters = {\n rangevalue: rangeValueFormat,\n matchvalue: matchValueFormat,\n gradient: colorGradientFormat,\n};\n\nexport const MAX_LOGGED_FORMATTER_ERRORS = 10;\nexport const newFormatterErrorHandler = (maxErrors, handlerFunc) => {\n let errorCount = 0;\n return msg => {\n if (errorCount < maxErrors) {\n handlerFunc(msg);\n }\n errorCount += 1;\n };\n};\n\n/**\n * returns a formatter function based on a format config\n * @param {Object} formatCfg formatter config\n * @param {number[]} formatCfg.ranges an array of numeric ranges that will be used to map to values. requires formatCfg.values\n * @param {*[]} formatCfg.values an array of values to map to. can be used with formatCfg.ranges or formatCfg.categories or formatCfg.gradient\n * @param {string[]|number[]} formatCfg.categories an array of categories. categories are used for a 1:1 mapping to values. requires formatCfg.values\n * @param {number[]} data the data to be formatted\n */\nexport const getFormatter = (data, formatCfg = {}) => {\n if (formatCfg.type) {\n if (formatters[formatCfg.type]) {\n // @TODO(pwied):\n // future: should formatters have prepare stage where params are validated\n // and additional formatting context is generated (e.g. min & max value)\n return value =>\n formatters[formatCfg.type](\n value,\n formatCfg,\n data,\n // eslint-disable-next-line no-console\n newFormatterErrorHandler(MAX_LOGGED_FORMATTER_ERRORS, msg => console.warn(msg))\n );\n }\n return value => value;\n }\n // @TODO(pwied):\n // - remove post beta deadline\n // - move to formatters with type option\n // - leaving it here for now because Choropleth builds on it\n const { ranges, values } = formatCfg;\n if (values) {\n if (ranges) {\n return value => rangeFormat(value, formatCfg);\n }\n\n if (formatCfg.categories) {\n return value => categoryFormat(value, formatCfg);\n }\n }\n // eslint-disable-next-line\n console.warn('Could not find a formatter. Falling back to identity fn');\n return value => value;\n};\n","import isNumber from 'lodash/isNumber';\nimport isFinite from 'lodash/isFinite';\n\n/**\n * getDataTypeForPoint\n * naive implementation of checking for the data type of a single data point\n * number > time > string > unknown\n * starting with number because a Date.parse(number) is a valid date\n *\n * @param {any} dataPoint\n * @return {string} type\n */\nexport const getDataTypeForPoint = dataPoint => {\n if (isFinite(+dataPoint) && isNumber(+dataPoint)) {\n return 'number';\n }\n if (!Number.isNaN(Date.parse(dataPoint))) {\n return 'time';\n }\n if (typeof dataPoint === 'string') {\n return 'string';\n }\n // nulls, objects, etc\n return 'unknown';\n};\n\n/**\n * inferDataTypeFromSample\n * based on a number of data points this function determines the data type for all of them\n * and returns the most common data type (naive type inference)\n *\n * @param {Array} dataSample an array of arbitrary size containing data points of any data type\n * @return {string} type the most common type in the sample\n */\nexport const inferDataTypeFromSample = dataSample => {\n const typeMatches = {\n time: 0,\n number: 0,\n string: 0,\n unknown: 0,\n };\n dataSample.forEach(point => {\n typeMatches[getDataTypeForPoint(point)] += 1;\n });\n let typeCount = -1;\n let returnType = 'unknown';\n Object.keys(typeMatches).forEach(key => {\n if (typeMatches[key] > typeCount) {\n typeCount = typeMatches[key];\n returnType = key;\n }\n });\n return returnType;\n};\n\n/**\n * based on a data array (e.g. one data column) this function returns a tiny sample of it\n * @TODO: very naive approach. there's papers with more advanced techniques but for now this should be very fast\n *\n * @param {Array} data to draw a sample from\n * @return {Array} a sample of the passed data\n */\nexport const drawSample = data => {\n if (data.length > 2) {\n return [data[0], data[Math.floor(data.length / 2)], data[data.length - 1]];\n }\n if (data.length === 2) {\n return [data[0], data[1]];\n }\n // small enough to check everything\n return data;\n};\n","import findIndex from 'lodash/findIndex';\nimport isNumber from 'lodash/isNumber';\nimport isEmpty from 'lodash/isEmpty';\nimport clone from 'lodash/clone';\nimport { getFormatter } from './util/format';\nimport { inferDataTypeFromSample, drawSample } from './util/types';\n\nconst getDataForDataSourceType = (data, dataSourceType) => {\n if (!dataSourceType || !data[dataSourceType] || !data[dataSourceType].data) {\n // @TODO: warn about datasource type not being found\n return {\n fields: [],\n columns: [],\n };\n }\n return data[dataSourceType].data;\n};\n/*\n * parse fieldIndexRangeStr\n * @param {String} fieldIndexRangeStr '0:', '0:5', ':5'\n * @returns {Object} info about parsed range if there is any\n */\nexport const parseFieldRangeReference = fieldIndexRangeStr => {\n if (!fieldIndexRangeStr || fieldIndexRangeStr.indexOf(':') === -1) {\n return {\n isFieldIndexRange: false,\n };\n }\n const [fromFieldIndexStr, toFieldIndexStr] = fieldIndexRangeStr.split(':');\n return {\n isFieldIndexRange: true,\n fromFieldIndex:\n Number.isNaN(Number(fromFieldIndexStr)) || !fromFieldIndexStr ? 0 : Number(fromFieldIndexStr),\n toFieldIndex:\n Number.isNaN(Number(toFieldIndexStr)) || !toFieldIndexStr ? -1 : Number(toFieldIndexStr),\n };\n};\n/*\n * parse fieldReferenceStr to get field index and column index for user defined encoding. e.g. 'primary[1][123]'\n * @param {String} fieldReferenceStr 'primary[1][123]'\n * @returns {Object} { fieldIndex: 1, columnIndex: 123, isFieldIndexRange: true, fromFieldIndexRange: 0, toFieldIndexRange: 3 }\n */\nexport const parseIndexBasedFieldReference = fieldReferenceStr => {\n const indices = fieldReferenceStr\n .replace(/^[A-Za-z0-9]+/, '')\n .replace(/\\[/g, '')\n .replace(/\\]/g, ',')\n .split(',');\n const dataSourceName = fieldReferenceStr.match(/^[A-Za-z0-9]+/)[0];\n const fieldRange = parseFieldRangeReference(indices[0]);\n return {\n dataSourceName,\n fieldIndex: Number.isNaN(Number(indices[0])) || !indices[0] ? null : Number(indices[0]),\n columnIndex: Number.isNaN(Number(indices[1])) || !indices[1] ? null : Number(indices[1]),\n ...fieldRange,\n };\n};\n\n/*\n * parse fieldReferenceStr to get field name and column index for user defined encoding. e.g. 'primary.color[123]'\n * @param {String} fieldReferenceStr 'primary.color[123]'\n * @returns {Object} { fieldName: 'color', columnIndex: 123 }\n */\nexport const parseNameBasedFieldReference = fieldReferenceStr => {\n const dataSourceName = fieldReferenceStr.match(/^[A-Za-z0-9]+/)[0];\n const fieldNameStr = fieldReferenceStr.split('.')[1];\n const splitedStr = fieldNameStr.split('[');\n const fieldName = splitedStr[0];\n const columnIndex = splitedStr[1] ? Number(splitedStr[1].replace(']', '')) : null;\n\n return { dataSourceName, fieldName, columnIndex };\n};\n\nconst getDataForIndexBasedFieldReference = (data, fieldReferenceStr) => {\n const { fields, columns } = data;\n const {\n dataSourceName,\n isFieldIndexRange,\n fromFieldIndex,\n toFieldIndex,\n fieldIndex,\n columnIndex,\n } = parseIndexBasedFieldReference(fieldReferenceStr);\n\n if (isFieldIndexRange) {\n const dataForRange = [];\n if (fromFieldIndex > -1) {\n const endIndex =\n toFieldIndex > -1 ? Math.min(fields.length - 1, toFieldIndex) : fields.length + toFieldIndex;\n for (let i = fromFieldIndex; i <= endIndex; i += 1) {\n dataForRange.push(\n getDataForIndexBasedFieldReference(data, `${dataSourceName}[${i}][${columnIndex}]`)\n );\n }\n return dataForRange;\n }\n }\n\n if (isNumber(fieldIndex)) {\n const isNegative = fieldIndex < 0;\n const absoluteIndex = Math.abs(fieldIndex);\n if (\n (isNegative && absoluteIndex > fields.length) ||\n (!isNegative && fieldIndex > fields.length - 1)\n ) {\n // The field index is out of bounds\n return {};\n }\n const correctedFieldIndex = isNegative ? fields.length - absoluteIndex : fieldIndex;\n const fieldName =\n typeof fields[correctedFieldIndex] === 'object'\n ? fields[correctedFieldIndex].name\n : fields[correctedFieldIndex];\n\n let fieldData;\n if (isNumber(columnIndex)) {\n const isNegativeColumnIndex = columnIndex < 0;\n\n if (\n (isNegativeColumnIndex && columnIndex < -columns[correctedFieldIndex].length) ||\n columnIndex >= columns[correctedFieldIndex].length\n ) {\n // The column index is out of bounds\n return {};\n }\n const correctColumnIndex = isNegativeColumnIndex\n ? columns[correctedFieldIndex].length + columnIndex\n : columnIndex;\n fieldData = columns[correctedFieldIndex].map(\n () => columns[correctedFieldIndex][correctColumnIndex]\n );\n } else {\n fieldData = columns[correctedFieldIndex];\n }\n return {\n fieldName,\n data: fieldData,\n };\n }\n return {};\n};\n\nconst getDataForNameBasedFieldReference = (data, fieldReferenceStr) => {\n const { fields, columns } = data;\n const { fieldName, columnIndex } = parseNameBasedFieldReference(fieldReferenceStr); // <datasource>.<fieldname>[0]\n\n if (fieldName) {\n const fieldIndex = findIndex(fields, field =>\n typeof field === 'object' ? field.name === fieldName : field === fieldName\n );\n if (fieldIndex > -1) {\n let fieldData;\n if (isNumber(columnIndex)) {\n const isNegativeColumnIndex = columnIndex < 0;\n\n if (\n (isNegativeColumnIndex && columnIndex < -columns[fieldIndex].length) ||\n columnIndex >= columns[fieldIndex].length\n ) {\n // The column index is out of bounds\n return {};\n }\n const correctColumnIndex = isNegativeColumnIndex\n ? columns[fieldIndex].length + columnIndex\n : columnIndex;\n fieldData = columns[fieldIndex].map(() => columns[fieldIndex][correctColumnIndex]);\n } else {\n fieldData = columns[fieldIndex];\n }\n return {\n fieldName,\n data: fieldData,\n };\n }\n // eslint-disable-next-line\n console.warn(`field '${fieldName}' not available.`);\n return {};\n }\n return {};\n};\n\nconst getDataForFieldReference = (dataSources, fieldReference) => {\n let fieldReferenceStr = fieldReference;\n let formatValue;\n if (Array.isArray(fieldReference) && !fieldReference.isDefault) {\n return fieldReference.map(ref => getDataForFieldReference(dataSources, ref));\n }\n // if the reference is a default and there is multiple default fields to fall back\n if (fieldReference.isDefault && Array.isArray(fieldReference.field)) {\n // iterate through all defaults and check whether the data type matches the expected type\n for (let i = 0; i < fieldReference.field.length; i += 1) {\n fieldReferenceStr = fieldReference.field[i];\n const dataFromDefault = getDataForFieldReference(dataSources, fieldReferenceStr);\n if (Array.isArray(dataFromDefault.data)) {\n const type = inferDataTypeFromSample(drawSample(dataFromDefault.data));\n if (fieldReference.type.indexOf(type) > -1) {\n return dataFromDefault;\n }\n }\n }\n // if none of the defaults matched the data type use the last default\n }\n if (typeof fieldReference === 'object') {\n const { field } = fieldReference;\n if (field && !Array.isArray(field)) {\n fieldReferenceStr = field;\n }\n }\n\n const indexBasedRegx = /^[A-Za-z0-9_]+\\[.*\\].*$/;\n const nameBasedRegx = /^[A-Za-z0-9_]+\\..*$/;\n const isIndexBasedReference = indexBasedRegx.test(fieldReferenceStr);\n const isNameBasedReference = nameBasedRegx.test(fieldReferenceStr);\n\n if (!isIndexBasedReference && !isNameBasedReference) {\n // Unable to parse the encoding. Please verify the encoding format is correct\n return {};\n }\n\n const dataSourceType = fieldReferenceStr.match(/^(.*?)(\\.|\\[)/)[1];\n const data = getDataForDataSourceType(dataSources, dataSourceType);\n let fieldData;\n\n if (isIndexBasedReference) {\n fieldData = getDataForIndexBasedFieldReference(data, fieldReferenceStr);\n } else {\n fieldData = getDataForNameBasedFieldReference(data, fieldReferenceStr);\n }\n\n if (typeof fieldReference === 'object') {\n const { format } = fieldReference;\n if (format) {\n formatValue = getFormatter(fieldData.data, format);\n }\n }\n\n if (formatValue && !isEmpty(fieldData)) {\n return {\n fieldName: fieldData.fieldName,\n data: fieldData.data.map(formatValue),\n };\n }\n return fieldData;\n};\n\nexport const mergeEncoding = (defaultEncoding, userDefinedEncoding = {}) => {\n const mergedEncoding = { ...userDefinedEncoding };\n Object.keys(defaultEncoding).forEach(key => {\n if (\n isEmpty(userDefinedEncoding[key]) &&\n defaultEncoding[key].isRequired &&\n defaultEncoding[key].default\n ) {\n mergedEncoding[key] =\n typeof defaultEncoding[key].default === 'object' &&\n !Array.isArray(defaultEncoding[key].default)\n ? {\n ...defaultEncoding[key].default,\n isDefault: true,\n type: defaultEncoding[key].type,\n }\n : {\n field: defaultEncoding[key].default,\n isDefault: true,\n type: defaultEncoding[key].type,\n };\n }\n });\n return mergedEncoding;\n};\n\nexport const parse = (dataSources, encoding = {}) => {\n const parsedOutput = {\n _meta: {\n fieldNames: {},\n types: {},\n },\n };\n\n Object.keys(encoding).forEach(key => {\n let fieldReference = clone(encoding[key]);\n\n // handle the case for encoding field reference, for example fill: 'encoding.trend'\n if (\n typeof fieldReference === 'object' &&\n fieldReference.field &&\n fieldReference.field.indexOf('encoding') === 0\n ) {\n const replacedKey = fieldReference.field.split('.')[1];\n\n // return for the below invalid cases\n // `encoding.z` if `z` is not a valid field in encoding\n if (!encoding[replacedKey]) {\n // eslint-disable-next-line\n console.warn(`${key} field cannot refer to 'encoding.${replacedKey}'.`);\n }\n // if `z` is an object configuration in encoding simply extract the field when refering `encoding.z`\n const field =\n typeof encoding[replacedKey] === 'object'\n ? encoding[replacedKey].field\n : encoding[replacedKey];\n fieldReference = {\n ...fieldReference,\n field,\n };\n }\n\n const dataForFieldReference = getDataForFieldReference(dataSources, fieldReference);\n\n if (Array.isArray(dataForFieldReference)) {\n parsedOutput[key] = dataForFieldReference.map(entry => entry.data);\n parsedOutput._meta.fieldNames[key] = dataForFieldReference.map(entry => entry.fieldName); // eslint-disable-line no-underscore-dangle\n // eslint-disable-next-line no-underscore-dangle\n parsedOutput._meta.types[key] = dataForFieldReference.map(entry =>\n inferDataTypeFromSample(drawSample(entry.data))\n );\n } else {\n const { fieldName, data } = dataForFieldReference;\n if (fieldName) {\n parsedOutput[key] = data;\n parsedOutput._meta.fieldNames[key] = fieldName; // eslint-disable-line no-underscore-dangle\n // eslint-disable-next-line no-underscore-dangle\n parsedOutput._meta.types[key] = inferDataTypeFromSample(drawSample(data));\n }\n }\n });\n\n return parsedOutput;\n};\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"lodash/isEmpty\"","webpack:///external \"@babel/runtime/helpers/typeof\"","webpack:///external \"lodash/isNumber\"","webpack:///external \"chroma-js\"","webpack:///external \"lodash/isUndefined\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/slicedToArray\"","webpack:///external \"lodash/findIndex\"","webpack:///external \"lodash/clone\"","webpack:///external \"lodash/find\"","webpack:///external \"lodash/isFinite\"","webpack:///./src/util/format.js","webpack:///./src/util/types.js","webpack:///./src/Base.js"],"names":["hasOwnProperty","Object","prototype","rangeFormat","value","_ref","arguments","length","undefined","ranges","values","Array","isArray","Number","isNaN","floatVal","parseFloat","i","valueIndex","Math","min","categoryFormat","_ref2","categories","indexOf","rangeValueFormat","_ref3","_ref3$ranges","floatValue","call","from","to","matchValueFormat","_ref4","_ref4$matches","matches","_ref4$defaultValue","defaultValue","defaultResult","isUndefined","matchResult","find","match","NON_NUMERIC_RANGE_ERROR","VALUES_AND_RANGES_HAVE_DIFFERENT_LENGTH","INVALID_VALUE","colorGradientFormat","_ref5","data","errorHandler","colorValues","colorRanges","errorColor","chroma","hex","toUpperCase","unshift","apply","max","push","sort","a","b","_i","upperVal","lowerVal","tau","upperColor","lowerColor","scale","concat","formatters","rangevalue","matchvalue","gradient","MAX_LOGGED_FORMATTER_ERRORS","newFormatterErrorHandler","maxErrors","handlerFunc","errorCount","msg","getFormatter","formatCfg","type","console","warn","getDataTypeForPoint","dataPoint","isFinite","isNumber","Date","parse","inferDataTypeFromSample","dataSample","typeMatches","time","number","string","unknown","forEach","point","typeCount","returnType","keys","key","drawSample","floor","getDataForDataSourceType","dataSourceType","fields","columns","parseFieldRangeReference","fieldIndexRangeStr","isFieldIndexRange","_fieldIndexRangeStr$s","split","_fieldIndexRangeStr$s2","_slicedToArray","fromFieldIndexStr","toFieldIndexStr","fromFieldIndex","toFieldIndex","parseIndexBasedFieldReference","fieldReferenceStr","indices","replace","dataSourceName","fieldRange","_objectSpread","fieldIndex","columnIndex","parseNameBasedFieldReference","fieldNameStr","splitedStr","fieldName","getDataForIndexBasedFieldReference","_parseIndexBasedField","dataForRange","endIndex","isNegative","absoluteIndex","abs","correctedFieldIndex","_typeof","name","fieldData","isNegativeColumnIndex","correctColumnIndex","map","getDataForNameBasedFieldReference","_parseNameBasedFieldR","findIndex","field","getDataForFieldReference","dataSources","fieldReference","formatValue","isDefault","ref","dataFromDefault","indexBasedRegx","nameBasedRegx","isIndexBasedReference","test","isNameBasedReference","format","isEmpty","mergeEncoding","defaultEncoding","userDefinedEncoding","mergedEncoding","isRequired","default","encoding","parsedOutput","_meta","fieldNames","types","clone","replacedKey","dataForFieldReference","entry"],"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;;QAE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BH,KAAK,EAALA;MAAK,EACR;IACL;IAEA,IAAM4B,qBAAqB,GAAG3B,6BAAwB,CAACC,WAAW,EAAEC,cAAc,CAAC;IAEnF,IAAIhJ,KAAK,CAACC,OAAO,CAACwK,qBAAqB,CAAC,EAAE;MACtCN,YAAY,CAACtE,GAAG,CAAC,GAAG4E,qBAAqB,CAAChC,GAAG,CAAC,UAAAiC,KAAK;QAAA,OAAIA,KAAK,CAACrI,IAAI;MAAA,EAAC;MAClE8H,YAAY,CAACC,KAAK,CAACC,UAAU,CAACxE,GAAG,CAAC,GAAG4E,qBAAqB,CAAChC,GAAG,CAAC,UAAAiC,KAAK;QAAA,OAAIA,KAAK,CAAC/C,SAAS;MAAA,EAAC,CAAC,CAAC;MAC1F;MACAwC,YAAY,CAACC,KAAK,CAACE,KAAK,CAACzE,GAAG,CAAC,GAAG4E,qBAAqB,CAAChC,GAAG,CAAC,UAAAiC,KAAK;QAAA,OAC3DzF,uBAAuB,CAACa,UAAU,CAAC4E,KAAK,CAACrI,IAAI,CAAC,CAAC;MAAA,EAClD;IACL,CAAC,MAAM;MAAA,IACKsF,SAAS,GAAW8C,qBAAqB,CAAzC9C,SAAS;QAAEtF,IAAI,GAAKoI,qBAAqB,CAA9BpI,IAAI;MACvB,IAAIsF,SAAS,EAAE;QACXwC,YAAY,CAACtE,GAAG,CAAC,GAAGxD,IAAI;QACxB8H,YAAY,CAACC,KAAK,CAACC,UAAU,CAACxE,GAAG,CAAC,GAAG8B,SAAS,CAAC,CAAC;QAChD;QACAwC,YAAY,CAACC,KAAK,CAACE,KAAK,CAACzE,GAAG,CAAC,GAAGZ,uBAAuB,CAACa,UAAU,CAACzD,IAAI,CAAC,CAAC;MAC7E;IACJ;EACJ,CAAC,CAAC;EAEF,OAAO8H,YAAY;AACvB,CAAC,C","file":"Base.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 33);\n","module.exports = require(\"lodash/isEmpty\");","module.exports = require(\"@babel/runtime/helpers/typeof\");","module.exports = require(\"lodash/isNumber\");","module.exports = require(\"chroma-js\");","module.exports = require(\"lodash/isUndefined\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/slicedToArray\");","module.exports = require(\"lodash/findIndex\");","module.exports = require(\"lodash/clone\");","module.exports = require(\"lodash/find\");","module.exports = require(\"lodash/isFinite\");","import chroma from 'chroma-js';\nimport isUndefined from 'lodash/isUndefined';\nimport find from 'lodash/find';\n\nconst { hasOwnProperty } = Object.prototype;\n\nexport const rangeFormat = (value, { ranges, values } = {}) => {\n if (Array.isArray(ranges) && Array.isArray(values) && !Number.isNaN(value)) {\n const floatVal = parseFloat(value);\n for (let i = 0; i < ranges.length; i += 1) {\n // bad range value\n if (Number.isNaN(Number(ranges[i]))) {\n // Could not format value: Ranges are required to be numbers. Falling back to original value\n return value;\n }\n // value is less than the range limit\n if (floatVal <= parseFloat(ranges[i])) {\n const valueIndex = Math.min(i, values.length - 1); // correct the index if there are more range items than values\n if (values[valueIndex]) {\n return values[valueIndex];\n }\n }\n }\n if (floatVal > parseFloat(ranges[ranges.length - 1])) {\n return values[values.length - 1];\n }\n }\n // Could not format value: Ranges and Value are required to be numbers\n return value;\n};\n\nexport const categoryFormat = (value, { categories, values }) => {\n if (!(Array.isArray(categories) && Array.isArray(values) && categories.length === values.length)) {\n // Could not format value: categories & values should be arrays of the same length. Falling back to original value\n return value;\n }\n const valueIndex = categories.indexOf(value);\n if (valueIndex > -1) {\n return values[valueIndex];\n }\n // Could not format value: Category does not exist. Falling back to original value\n return value;\n};\n\n/**\n * based on a range configuration this formatter maps the value to a value specified in a range.\n * the range fitting follows this criteria: `range.from <= value < range.to` so the `to` value is not included\n * A range can be defined as either a closed bound range: `{ from: 10, to: 20, value: 'foo' }`\n * or an open bound range:\n * `{ to: 20, value: 'bar' }` (open lower bound)\n * `{ from: 100, value: 'oof' }` (open upper bound)\n *\n * @param {string} value from data\n * @param {object} formatConfig\n * @param {Object[]} formatConfig.ranges\n */\nexport const rangeValueFormat = (value, { ranges = [] }) => {\n const floatValue = parseFloat(value);\n if (Number.isNaN(Number(value))) {\n return value;\n }\n for (let i = 0; i < ranges.length; i += 1) {\n if (\n // open upper bound: value is bigger than or equal to open upper bound start (from)\n (i === 0 && hasOwnProperty.call(ranges[i], 'from') && floatValue >= ranges[i].from) ||\n // inbetween: value falls into from - to range\n (floatValue >= ranges[i].from && floatValue < ranges[i].to) ||\n // open lower bound: value is smaller than or equal to open lower bound end (to)\n (i === ranges.length - 1 && hasOwnProperty.call(ranges[i], 'to') && floatValue < ranges[i].to)\n ) {\n return ranges[i].value;\n }\n }\n return value;\n};\n\n/**\n * this formatter maps the value to a value specified in a list of potential matches .\n * if the value passed is a match for what is provided in `matches[i].match`, we return that mapped value `matches[i].value`.\n * If there is not match in the array and there is a `defaultValue` provided we return that value. If there is not a match in the list\n * and no defaultValue is passed, we return the original `value`\n * `{ match: 'cherry', value: 'red' }` (exact match)\n *\n * @param {string} value from data\n * @param {object} formatConfig\n * @param {Object[]} formatConfig.matches\n * @param {object} formatConfig.defaultValue\n */\nexport const matchValueFormat = (value, { matches = [], defaultValue = undefined }) => {\n const defaultResult = isUndefined(defaultValue) ? value : defaultValue;\n const matchResult = find(matches, match => match.match && match.match === value);\n\n return isUndefined(matchResult) ? defaultResult : matchResult.value;\n};\n\nexport const NON_NUMERIC_RANGE_ERROR =\n 'Could not format value: Ranges are required to be numbers. Falling back to first color';\nexport const VALUES_AND_RANGES_HAVE_DIFFERENT_LENGTH =\n 'gradient ranges and values must have the same number of elements';\nexport const INVALID_VALUE = 'Could not format value for gradient:';\n\n/**\n * based on ranges and values this formatter maps the value to an interpolated color\n *\n * @param {string} value from data (string representation of number)\n * @param {object} formatConfig\n * @param {number[]} formatConfig.ranges value ranges\n * @param {string[]} formatConfig.values color stops to interpolate from\n * @param {string[]} data the data to be formatted\n * @param errorHandler function\n */\nexport const colorGradientFormat = (value, { ranges, values }, data, errorHandler) => {\n let colorValues = values;\n let colorRanges = ranges;\n function errorColor() {\n return colorValues ? chroma(colorValues[0]).hex().toUpperCase() : '#000';\n }\n if (!Number.isNaN(Number(value))) {\n // set default values for gradient colors if values not explicit\n if (!colorValues) {\n colorValues = ['white', 'red'];\n }\n\n if (colorValues.length === 1) {\n colorValues.unshift('white'); // force color bin to have a lower bound color\n }\n // set default values for ranges if ranges not explicit\n if (!ranges) {\n if (data && data.length > 0) {\n const min = data.length > 0 ? Math.min.apply(null, data) : undefined;\n const max = data.length > 0 ? Math.max.apply(null, data) : undefined;\n colorRanges = [min];\n for (let i = 1; i < colorValues.length - 1; i += 1) {\n colorRanges.push(min + (i * (max - min)) / (colorValues.length - 1));\n }\n colorRanges.push(max);\n } else {\n colorRanges = [0, 1]; // no data values, so just make the range from zero to 1\n }\n }\n\n if (colorRanges.length === 1) {\n colorRanges.push(colorRanges[0]); // force range to be at least two values\n }\n colorRanges.sort((a, b) => a - b); // force ascending order of range stops\n if (colorRanges.length !== colorValues.length) {\n errorHandler(VALUES_AND_RANGES_HAVE_DIFFERENT_LENGTH);\n return errorColor();\n }\n\n const floatVal = parseFloat(value);\n\n // don't let value be outside the allowed range\n if (floatVal > parseFloat(colorRanges[colorRanges.length - 1])) {\n return chroma(colorValues[colorValues.length - 1])\n .hex()\n .toUpperCase(); // high end\n }\n if (floatVal < parseFloat(colorRanges[0])) {\n return chroma(colorValues[0]).hex().toUpperCase(); // low end\n }\n\n // find the color gradient range that the value is inside\n for (let i = 1; i < colorRanges.length; i += 1) {\n // bad range value\n if (Number.isNaN(Number(colorRanges[i]))) {\n // eslint-disable-next-line\n errorHandler(NON_NUMERIC_RANGE_ERROR);\n return errorColor();\n }\n\n const upperVal = colorRanges[i];\n if (floatVal <= upperVal) {\n // if value is inside the bin\n const lowerVal = colorRanges[i - 1];\n let tau = (value - lowerVal) / (upperVal - lowerVal);\n\n // deal with special case when the upper and lower and bounds of the colorRange is equal\n if (upperVal === lowerVal) {\n if (value === 0) {\n // user prolly expects lower end of color range if value is zero\n tau = 0;\n } else {\n tau = 1; // otherwise use the upper bound\n }\n }\n\n const upperColor = colorValues[i];\n const lowerColor = colorValues[i - 1];\n return chroma.scale([lowerColor, upperColor])(tau).hex().toUpperCase();\n }\n }\n }\n // eslint-disable-next-line\n errorHandler(`${INVALID_VALUE} ${value}`);\n return errorColor();\n};\n\nconst formatters = {\n rangevalue: rangeValueFormat,\n matchvalue: matchValueFormat,\n gradient: colorGradientFormat,\n};\n\nexport const MAX_LOGGED_FORMATTER_ERRORS = 10;\nexport const newFormatterErrorHandler = (maxErrors, handlerFunc) => {\n let errorCount = 0;\n return msg => {\n if (errorCount < maxErrors) {\n handlerFunc(msg);\n }\n errorCount += 1;\n };\n};\n\n/**\n * returns a formatter function based on a format config\n * @param {Object} formatCfg formatter config\n * @param {number[]} formatCfg.ranges an array of numeric ranges that will be used to map to values. requires formatCfg.values\n * @param {*[]} formatCfg.values an array of values to map to. can be used with formatCfg.ranges or formatCfg.categories or formatCfg.gradient\n * @param {string[]|number[]} formatCfg.categories an array of categories. categories are used for a 1:1 mapping to values. requires formatCfg.values\n * @param {number[]} data the data to be formatted\n */\nexport const getFormatter = (data, formatCfg = {}) => {\n if (formatCfg.type) {\n if (formatters[formatCfg.type]) {\n // @TODO(pwied):\n // future: should formatters have prepare stage where params are validated\n // and additional formatting context is generated (e.g. min & max value)\n return value =>\n formatters[formatCfg.type](\n value,\n formatCfg,\n data,\n // eslint-disable-next-line no-console\n newFormatterErrorHandler(MAX_LOGGED_FORMATTER_ERRORS, msg => console.warn(msg))\n );\n }\n return value => value;\n }\n // @TODO(pwied):\n // - remove post beta deadline\n // - move to formatters with type option\n // - leaving it here for now because Choropleth builds on it\n const { ranges, values } = formatCfg;\n if (values) {\n if (ranges) {\n return value => rangeFormat(value, formatCfg);\n }\n\n if (formatCfg.categories) {\n return value => categoryFormat(value, formatCfg);\n }\n }\n // eslint-disable-next-line\n console.warn('Could not find a formatter. Falling back to identity fn');\n return value => value;\n};\n","import isNumber from 'lodash/isNumber';\nimport isFinite from 'lodash/isFinite';\n\n/**\n * getDataTypeForPoint\n * naive implementation of checking for the data type of a single data point\n * number > time > string > unknown\n * starting with number because a Date.parse(number) is a valid date\n *\n * @param {any} dataPoint\n * @return {string} type\n */\nexport const getDataTypeForPoint = dataPoint => {\n if (isFinite(+dataPoint) && isNumber(+dataPoint)) {\n return 'number';\n }\n if (!Number.isNaN(Date.parse(dataPoint))) {\n return 'time';\n }\n if (typeof dataPoint === 'string') {\n return 'string';\n }\n // nulls, objects, etc\n return 'unknown';\n};\n\n/**\n * inferDataTypeFromSample\n * based on a number of data points this function determines the data type for all of them\n * and returns the most common data type (naive type inference)\n *\n * @param {Array} dataSample an array of arbitrary size containing data points of any data type\n * @return {string} type the most common type in the sample\n */\nexport const inferDataTypeFromSample = dataSample => {\n const typeMatches = {\n time: 0,\n number: 0,\n string: 0,\n unknown: 0,\n };\n dataSample.forEach(point => {\n typeMatches[getDataTypeForPoint(point)] += 1;\n });\n let typeCount = -1;\n let returnType = 'unknown';\n Object.keys(typeMatches).forEach(key => {\n if (typeMatches[key] > typeCount) {\n typeCount = typeMatches[key];\n returnType = key;\n }\n });\n return returnType;\n};\n\n/**\n * based on a data array (e.g. one data column) this function returns a tiny sample of it\n * @TODO: very naive approach. there's papers with more advanced techniques but for now this should be very fast\n *\n * @param {Array} data to draw a sample from\n * @return {Array} a sample of the passed data\n */\nexport const drawSample = data => {\n if (data.length > 2) {\n return [data[0], data[Math.floor(data.length / 2)], data[data.length - 1]];\n }\n if (data.length === 2) {\n return [data[0], data[1]];\n }\n // small enough to check everything\n return data;\n};\n","import findIndex from 'lodash/findIndex';\nimport isNumber from 'lodash/isNumber';\nimport isEmpty from 'lodash/isEmpty';\nimport clone from 'lodash/clone';\nimport { getFormatter } from './util/format';\nimport { inferDataTypeFromSample, drawSample } from './util/types';\n\nconst getDataForDataSourceType = (data, dataSourceType) => {\n if (!dataSourceType || !data[dataSourceType] || !data[dataSourceType].data) {\n // @TODO: warn about datasource type not being found\n return {\n fields: [],\n columns: [],\n };\n }\n return data[dataSourceType].data;\n};\n/*\n * parse fieldIndexRangeStr\n * @param {String} fieldIndexRangeStr '0:', '0:5', ':5'\n * @returns {Object} info about parsed range if there is any\n */\nexport const parseFieldRangeReference = fieldIndexRangeStr => {\n if (!fieldIndexRangeStr || fieldIndexRangeStr.indexOf(':') === -1) {\n return {\n isFieldIndexRange: false,\n };\n }\n const [fromFieldIndexStr, toFieldIndexStr] = fieldIndexRangeStr.split(':');\n return {\n isFieldIndexRange: true,\n fromFieldIndex:\n Number.isNaN(Number(fromFieldIndexStr)) || !fromFieldIndexStr ? 0 : Number(fromFieldIndexStr),\n toFieldIndex:\n Number.isNaN(Number(toFieldIndexStr)) || !toFieldIndexStr ? -1 : Number(toFieldIndexStr),\n };\n};\n/*\n * parse fieldReferenceStr to get field index and column index for user defined encoding. e.g. 'primary[1][123]'\n * @param {String} fieldReferenceStr 'primary[1][123]'\n * @returns {Object} { fieldIndex: 1, columnIndex: 123, isFieldIndexRange: true, fromFieldIndexRange: 0, toFieldIndexRange: 3 }\n */\nexport const parseIndexBasedFieldReference = fieldReferenceStr => {\n const indices = fieldReferenceStr\n .replace(/^[A-Za-z0-9]+/, '')\n .replace(/\\[/g, '')\n .replace(/\\]/g, ',')\n .split(',');\n const dataSourceName = fieldReferenceStr.match(/^[A-Za-z0-9]+/)[0];\n const fieldRange = parseFieldRangeReference(indices[0]);\n return {\n dataSourceName,\n fieldIndex: Number.isNaN(Number(indices[0])) || !indices[0] ? null : Number(indices[0]),\n columnIndex: Number.isNaN(Number(indices[1])) || !indices[1] ? null : Number(indices[1]),\n ...fieldRange,\n };\n};\n\n/*\n * parse fieldReferenceStr to get field name and column index for user defined encoding. e.g. 'primary.color[123]'\n * @param {String} fieldReferenceStr 'primary.color[123]'\n * @returns {Object} { fieldName: 'color', columnIndex: 123 }\n */\nexport const parseNameBasedFieldReference = fieldReferenceStr => {\n const dataSourceName = fieldReferenceStr.match(/^[A-Za-z0-9]+/)[0];\n const fieldNameStr = fieldReferenceStr.split('.')[1];\n const splitedStr = fieldNameStr.split('[');\n const fieldName = splitedStr[0];\n const columnIndex = splitedStr[1] ? Number(splitedStr[1].replace(']', '')) : null;\n\n return { dataSourceName, fieldName, columnIndex };\n};\n\nconst getDataForIndexBasedFieldReference = (data, fieldReferenceStr) => {\n const { fields, columns } = data;\n const {\n dataSourceName,\n isFieldIndexRange,\n fromFieldIndex,\n toFieldIndex,\n fieldIndex,\n columnIndex,\n } = parseIndexBasedFieldReference(fieldReferenceStr);\n\n if (isFieldIndexRange) {\n const dataForRange = [];\n if (fromFieldIndex > -1) {\n const endIndex =\n toFieldIndex > -1 ? Math.min(fields.length - 1, toFieldIndex) : fields.length + toFieldIndex;\n for (let i = fromFieldIndex; i <= endIndex; i += 1) {\n dataForRange.push(\n getDataForIndexBasedFieldReference(data, `${dataSourceName}[${i}][${columnIndex}]`)\n );\n }\n return dataForRange;\n }\n }\n\n if (isNumber(fieldIndex)) {\n const isNegative = fieldIndex < 0;\n const absoluteIndex = Math.abs(fieldIndex);\n if (\n (isNegative && absoluteIndex > fields.length) ||\n (!isNegative && fieldIndex > fields.length - 1)\n ) {\n // The field index is out of bounds\n return {};\n }\n const correctedFieldIndex = isNegative ? fields.length - absoluteIndex : fieldIndex;\n const fieldName =\n typeof fields[correctedFieldIndex] === 'object'\n ? fields[correctedFieldIndex].name\n : fields[correctedFieldIndex];\n\n let fieldData;\n if (isNumber(columnIndex)) {\n const isNegativeColumnIndex = columnIndex < 0;\n\n if (\n (isNegativeColumnIndex && columnIndex < -columns[correctedFieldIndex].length) ||\n columnIndex >= columns[correctedFieldIndex].length\n ) {\n // The column index is out of bounds\n return {};\n }\n const correctColumnIndex = isNegativeColumnIndex\n ? columns[correctedFieldIndex].length + columnIndex\n : columnIndex;\n fieldData = columns[correctedFieldIndex].map(\n () => columns[correctedFieldIndex][correctColumnIndex]\n );\n } else {\n fieldData = columns[correctedFieldIndex];\n }\n return {\n fieldName,\n data: fieldData,\n };\n }\n return {};\n};\n\nconst getDataForNameBasedFieldReference = (data, fieldReferenceStr) => {\n const { fields, columns } = data;\n const { fieldName, columnIndex } = parseNameBasedFieldReference(fieldReferenceStr); // <datasource>.<fieldname>[0]\n\n if (fieldName) {\n const fieldIndex = findIndex(fields, field =>\n typeof field === 'object' ? field.name === fieldName : field === fieldName\n );\n if (fieldIndex > -1) {\n let fieldData;\n if (isNumber(columnIndex)) {\n const isNegativeColumnIndex = columnIndex < 0;\n\n if (\n (isNegativeColumnIndex && columnIndex < -columns[fieldIndex].length) ||\n columnIndex >= columns[fieldIndex].length\n ) {\n // The column index is out of bounds\n return {};\n }\n const correctColumnIndex = isNegativeColumnIndex\n ? columns[fieldIndex].length + columnIndex\n : columnIndex;\n fieldData = columns[fieldIndex].map(() => columns[fieldIndex][correctColumnIndex]);\n } else {\n fieldData = columns[fieldIndex];\n }\n return {\n fieldName,\n data: fieldData,\n };\n }\n // eslint-disable-next-line\n console.warn(`field '${fieldName}' not available.`);\n return {};\n }\n return {};\n};\n\nconst getDataForFieldReference = (dataSources, fieldReference) => {\n let fieldReferenceStr = fieldReference;\n let formatValue;\n if (Array.isArray(fieldReference) && !fieldReference.isDefault) {\n return fieldReference.map(ref => getDataForFieldReference(dataSources, ref));\n }\n // if the reference is a default and there is multiple default fields to fall back\n if (fieldReference.isDefault && Array.isArray(fieldReference.field)) {\n // iterate through all defaults and check whether the data type matches the expected type\n for (let i = 0; i < fieldReference.field.length; i += 1) {\n fieldReferenceStr = fieldReference.field[i];\n const dataFromDefault = getDataForFieldReference(dataSources, fieldReferenceStr);\n if (Array.isArray(dataFromDefault.data)) {\n const type = inferDataTypeFromSample(drawSample(dataFromDefault.data));\n if (fieldReference.type.indexOf(type) > -1) {\n return dataFromDefault;\n }\n }\n }\n // if none of the defaults matched the data type use the last default\n }\n if (typeof fieldReference === 'object') {\n const { field } = fieldReference;\n if (field && !Array.isArray(field)) {\n fieldReferenceStr = field;\n }\n }\n\n const indexBasedRegx = /^[A-Za-z0-9_]+\\[.*\\].*$/;\n const nameBasedRegx = /^[A-Za-z0-9_]+\\..*$/;\n const isIndexBasedReference = indexBasedRegx.test(fieldReferenceStr);\n const isNameBasedReference = nameBasedRegx.test(fieldReferenceStr);\n\n if (!isIndexBasedReference && !isNameBasedReference) {\n // Unable to parse the encoding. Please verify the encoding format is correct\n return {};\n }\n\n const dataSourceType = fieldReferenceStr.match(/^(.*?)(\\.|\\[)/)[1];\n const data = getDataForDataSourceType(dataSources, dataSourceType);\n let fieldData;\n\n if (isIndexBasedReference) {\n fieldData = getDataForIndexBasedFieldReference(data, fieldReferenceStr);\n } else {\n fieldData = getDataForNameBasedFieldReference(data, fieldReferenceStr);\n }\n\n if (typeof fieldReference === 'object') {\n const { format } = fieldReference;\n if (format) {\n formatValue = getFormatter(fieldData.data, format);\n }\n }\n\n if (formatValue && !isEmpty(fieldData)) {\n return {\n fieldName: fieldData.fieldName,\n data: fieldData.data.map(formatValue),\n };\n }\n return fieldData;\n};\n\nexport const mergeEncoding = (defaultEncoding, userDefinedEncoding = {}) => {\n const mergedEncoding = { ...userDefinedEncoding };\n Object.keys(defaultEncoding).forEach(key => {\n if (\n isEmpty(userDefinedEncoding[key]) &&\n defaultEncoding[key].isRequired &&\n defaultEncoding[key].default\n ) {\n mergedEncoding[key] =\n typeof defaultEncoding[key].default === 'object' &&\n !Array.isArray(defaultEncoding[key].default)\n ? {\n ...defaultEncoding[key].default,\n isDefault: true,\n type: defaultEncoding[key].type,\n }\n : {\n field: defaultEncoding[key].default,\n isDefault: true,\n type: defaultEncoding[key].type,\n };\n }\n });\n return mergedEncoding;\n};\n\nexport const parse = (dataSources, encoding = {}) => {\n const parsedOutput = {\n _meta: {\n fieldNames: {},\n types: {},\n },\n };\n\n Object.keys(encoding).forEach(key => {\n let fieldReference = clone(encoding[key]);\n\n // handle the case for encoding field reference, for example fill: 'encoding.trend'\n if (\n typeof fieldReference === 'object' &&\n fieldReference.field &&\n fieldReference.field.indexOf('encoding') === 0\n ) {\n const replacedKey = fieldReference.field.split('.')[1];\n\n // return for the below invalid cases\n // `encoding.z` if `z` is not a valid field in encoding\n if (!encoding[replacedKey]) {\n // eslint-disable-next-line\n console.warn(`${key} field cannot refer to 'encoding.${replacedKey}'.`);\n }\n // if `z` is an object configuration in encoding simply extract the field when refering `encoding.z`\n const field =\n typeof encoding[replacedKey] === 'object'\n ? encoding[replacedKey].field\n : encoding[replacedKey];\n fieldReference = {\n ...fieldReference,\n field,\n };\n }\n\n const dataForFieldReference = getDataForFieldReference(dataSources, fieldReference);\n\n if (Array.isArray(dataForFieldReference)) {\n parsedOutput[key] = dataForFieldReference.map(entry => entry.data);\n parsedOutput._meta.fieldNames[key] = dataForFieldReference.map(entry => entry.fieldName); // eslint-disable-line no-underscore-dangle\n // eslint-disable-next-line no-underscore-dangle\n parsedOutput._meta.types[key] = dataForFieldReference.map(entry =>\n inferDataTypeFromSample(drawSample(entry.data))\n );\n } else {\n const { fieldName, data } = dataForFieldReference;\n if (fieldName) {\n parsedOutput[key] = data;\n parsedOutput._meta.fieldNames[key] = fieldName; // eslint-disable-line no-underscore-dangle\n // eslint-disable-next-line no-underscore-dangle\n parsedOutput._meta.types[key] = inferDataTypeFromSample(drawSample(data));\n }\n }\n });\n\n return parsedOutput;\n};\n"],"sourceRoot":""}
package/BubbleParser.js CHANGED
@@ -154,6 +154,7 @@ var dataContract = {
154
154
  }
155
155
  }
156
156
  };
157
+
157
158
  /**
158
159
  * Bubble parse function
159
160
  * @param {object} dataSources
@@ -161,12 +162,10 @@ var dataContract = {
161
162
  * @return {object} props that dashboard/react visualizations can be used.
162
163
  * @public
163
164
  */
164
-
165
165
  var parse = function parse(dataSources, userDefinedEncoding) {
166
166
  if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(dataSources)) {
167
167
  throw new Error(_errorMsgs__WEBPACK_IMPORTED_MODULE_2__["ErrorMsgs"].NO_DATA_SOURCES);
168
168
  }
169
-
170
169
  var encoding = Object(_splunk_visualization_encoding_parsers_Base__WEBPACK_IMPORTED_MODULE_0__["mergeEncoding"])(dataContract.encoding, userDefinedEncoding);
171
170
  var parsedProps = Object(_splunk_visualization_encoding_parsers_Base__WEBPACK_IMPORTED_MODULE_0__["parse"])(dataSources, encoding);
172
171
  return {
@@ -181,7 +180,6 @@ var parse = function parse(dataSources, userDefinedEncoding) {
181
180
  categoryFieldName: parsedProps['_meta'].fieldNames.category,
182
181
  // eslint-disable-line dot-notation
183
182
  sizeFieldName: parsedProps['_meta'].fieldNames.size // eslint-disable-line dot-notation
184
-
185
183
  };
186
184
  };
187
185
 
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualization-encoding-parsers/Base\"","webpack:///./src/BubbleParser.js","webpack:///./src/errorMsgs.js","webpack:///external \"lodash/isEmpty\""],"names":["dataContract","requiredDataSources","name","description","initialRequestParams","primary","offset","count","encoding","x","isRequired","type","default","y","size","category","parse","isEmpty","ErrorMsgs","mergeEncoding","parsedProps","baseParse","xFieldName","yFieldName","categoryFieldName","sizeFieldName","NO_DATA_SOURCES","_","NO_ENCODING","ERROR_PARSE"],"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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AACtB,UAAM,UAAUC,oDAAS,CAAzB,eAAM,CAAN;AACH;;AAED,MAAMV,QAAQ,GAAGW,iGAAa,CAACnB,YAAY,CAAb,UAA9B,mBAA8B,CAA9B;AACA,MAAMoB,WAAW,GAAGC,yFAAS,cAA7B,QAA6B,CAA7B;AAEA,SAAO;AACHZ,KAAC,EAAEW,WAAW,CADX;AAEHP,KAAC,EAAEO,WAAW,CAFX;AAGHL,YAAQ,EAAEK,WAAW,CAHlB;AAIHN,QAAI,EAAEM,WAAW,CAJd;AAKHE,cAAU,EAAEF,WAAW,CAAXA,OAAW,CAAXA,YALT;AAK4C;AAC/CG,cAAU,EAAEH,WAAW,CAAXA,OAAW,CAAXA,YANT;AAM4C;AAC/CI,qBAAiB,EAAEJ,WAAW,CAAXA,OAAW,CAAXA,YAPhB;AAO0D;AAC7DK,iBAAa,EAAEL,WAAW,CAAXA,OAAW,CAAXA,YARZ,KAQkD;;AARlD,GAAP;AARG,E;;;;;;;;AC5CP;AAAA;AAAA;AAAA;AAAA;AAEO,IAAMF,SAAS,GAAG;AACrBQ,iBAAe,EAAEC,+DAAC,CADG,uBACH,CADG;AAErBC,aAAW,EAAED,+DAAC,CAFO,oBAEP,CAFO;AAGrBE,aAAW,EAAEF,+DAAC;AAHO,CAAlB,C;;;;;;;ACFP,2C","file":"BubbleParser.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 = 18);\n","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualization-encoding-parsers/Base\");","import { parse as baseParse, mergeEncoding } from '@splunk/visualization-encoding-parsers/Base';\nimport isEmpty from 'lodash/isEmpty';\nimport { ErrorMsgs } from './errorMsgs';\n\nexport const dataContract = {\n requiredDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n initialRequestParams: {\n primary: { offset: 0, count: 10000 },\n },\n encoding: {\n x: {\n isRequired: true,\n type: ['number', 'string'],\n default: 'primary[0]',\n },\n y: {\n isRequired: true,\n type: ['number', 'string'],\n default: 'primary[1]',\n },\n size: {\n isRequired: true,\n type: ['number', 'string'],\n default: 'primary[2]',\n },\n category: {\n isRequired: false,\n type: ['number', 'string'],\n },\n },\n};\n\n/**\n * Bubble parse function\n * @param {object} dataSources\n * @param {object} userDefinedEncoding\n * @return {object} props that dashboard/react visualizations can be used.\n * @public\n */\nexport const parse = (dataSources, userDefinedEncoding) => {\n if (isEmpty(dataSources)) {\n throw new Error(ErrorMsgs.NO_DATA_SOURCES);\n }\n\n const encoding = mergeEncoding(dataContract.encoding, userDefinedEncoding);\n const parsedProps = baseParse(dataSources, encoding);\n\n return {\n x: parsedProps.x,\n y: parsedProps.y,\n category: parsedProps.category,\n size: parsedProps.size,\n xFieldName: parsedProps['_meta'].fieldNames.x, // eslint-disable-line dot-notation\n yFieldName: parsedProps['_meta'].fieldNames.y, // eslint-disable-line dot-notation\n categoryFieldName: parsedProps['_meta'].fieldNames.category, // eslint-disable-line dot-notation\n sizeFieldName: parsedProps['_meta'].fieldNames.size, // eslint-disable-line dot-notation\n };\n};\n","import { _ } from '@splunk/ui-utils/i18n';\n\nexport const ErrorMsgs = {\n NO_DATA_SOURCES: _('No valid dataSources.'),\n NO_ENCODING: _('No valid encoding.'),\n ERROR_PARSE: _('Can not parse data correctly.'),\n};\n","module.exports = require(\"lodash/isEmpty\");"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualization-encoding-parsers/Base\"","webpack:///./src/BubbleParser.js","webpack:///./src/errorMsgs.js","webpack:///external \"lodash/isEmpty\""],"names":["dataContract","requiredDataSources","name","description","initialRequestParams","primary","offset","count","encoding","x","isRequired","type","default","y","size","category","parse","dataSources","userDefinedEncoding","isEmpty","Error","ErrorMsgs","NO_DATA_SOURCES","mergeEncoding","parsedProps","baseParse","xFieldName","fieldNames","yFieldName","categoryFieldName","sizeFieldName","_","NO_ENCODING","ERROR_PARSE"],"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,kD;;;;;;;ACAA,wE;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgG;AAC3D;AACG;AAEjC,IAAMA,YAAY,GAAG;EACxBC,mBAAmB,EAAE,CACjB;IACIC,IAAI,EAAE,SAAS;IACfC,WAAW,EAAE;EACjB,CAAC,CACJ;EACDC,oBAAoB,EAAE;IAClBC,OAAO,EAAE;MAAEC,MAAM,EAAE,CAAC;MAAEC,KAAK,EAAE;IAAM;EACvC,CAAC;EACDC,QAAQ,EAAE;IACNC,CAAC,EAAE;MACCC,UAAU,EAA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De,aAAa,EAAEN,WAAW,CAAC,OAAO,CAAC,CAACG,UAAU,CAACb,IAAI,CAAE;EACzD,CAAC;AACL,CAAC,C;;;;;;;;AC9DD;AAAA;AAAA;AAAA;AAA0C;AAEnC,IAAMO,SAAS,GAAG;EACrBC,eAAe,EAAES,+DAAC,CAAC,uBAAuB,CAAC;EAC3CC,WAAW,EAAED,+DAAC,CAAC,oBAAoB,CAAC;EACpCE,WAAW,EAAEF,+DAAC,CAAC,+BAA+B;AAClD,CAAC,C;;;;;;;ACND,2C","file":"BubbleParser.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 = 18);\n","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualization-encoding-parsers/Base\");","import { parse as baseParse, mergeEncoding } from '@splunk/visualization-encoding-parsers/Base';\nimport isEmpty from 'lodash/isEmpty';\nimport { ErrorMsgs } from './errorMsgs';\n\nexport const dataContract = {\n requiredDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n initialRequestParams: {\n primary: { offset: 0, count: 10000 },\n },\n encoding: {\n x: {\n isRequired: true,\n type: ['number', 'string'],\n default: 'primary[0]',\n },\n y: {\n isRequired: true,\n type: ['number', 'string'],\n default: 'primary[1]',\n },\n size: {\n isRequired: true,\n type: ['number', 'string'],\n default: 'primary[2]',\n },\n category: {\n isRequired: false,\n type: ['number', 'string'],\n },\n },\n};\n\n/**\n * Bubble parse function\n * @param {object} dataSources\n * @param {object} userDefinedEncoding\n * @return {object} props that dashboard/react visualizations can be used.\n * @public\n */\nexport const parse = (dataSources, userDefinedEncoding) => {\n if (isEmpty(dataSources)) {\n throw new Error(ErrorMsgs.NO_DATA_SOURCES);\n }\n\n const encoding = mergeEncoding(dataContract.encoding, userDefinedEncoding);\n const parsedProps = baseParse(dataSources, encoding);\n\n return {\n x: parsedProps.x,\n y: parsedProps.y,\n category: parsedProps.category,\n size: parsedProps.size,\n xFieldName: parsedProps['_meta'].fieldNames.x, // eslint-disable-line dot-notation\n yFieldName: parsedProps['_meta'].fieldNames.y, // eslint-disable-line dot-notation\n categoryFieldName: parsedProps['_meta'].fieldNames.category, // eslint-disable-line dot-notation\n sizeFieldName: parsedProps['_meta'].fieldNames.size, // eslint-disable-line dot-notation\n };\n};\n","import { _ } from '@splunk/ui-utils/i18n';\n\nexport const ErrorMsgs = {\n NO_DATA_SOURCES: _('No valid dataSources.'),\n NO_ENCODING: _('No valid encoding.'),\n ERROR_PARSE: _('Can not parse data correctly.'),\n};\n","module.exports = require(\"lodash/isEmpty\");"],"sourceRoot":""}
@@ -145,6 +145,7 @@ var dataContract = {
145
145
  }
146
146
  }
147
147
  };
148
+
148
149
  /**
149
150
  * Choropleth parse function
150
151
  * @param {object} dataSources
@@ -152,7 +153,6 @@ var dataContract = {
152
153
  * @return {object} props that dashboard/react visualizations can be used.
153
154
  * @public
154
155
  */
155
-
156
156
  var parse = function parse(dataSources, userDefinedEncoding) {
157
157
  var encoding = Object(_splunk_visualization_encoding_parsers_Base__WEBPACK_IMPORTED_MODULE_0__["mergeEncoding"])(dataContract.encoding, userDefinedEncoding);
158
158
  var parsedProps = Object(_splunk_visualization_encoding_parsers_Base__WEBPACK_IMPORTED_MODULE_0__["parse"])(dataSources, encoding);
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/visualization-encoding-parsers/Base\"","webpack:///./src/ChoroplethParser.js"],"names":["dataContract","requiredDataSources","optionalDataSources","name","description","initialRequestParams","primary","offset","count","encoding","featureId","isRequired","type","default","value","fill","field","format","values","parse","mergeEncoding","parsedProps","baseParse"],"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,wE;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,IAAMA,YAAY,GAAG;AACxBC,qBAAmB,EADK;AAExBC,qBAAmB,EAAE,CACjB;AACIC,QAAI,EADR;AAEIC,eAAW,EAAE;AAFjB,GADiB,CAFG;AAQxBC,sBAAoB,EAAE;AAClBC,WAAO,EAAE;AAAEC,YAAM,EAAR;AAAaC,WAAK,EAAE;AAApB;AADS,GARE;AAWxBC,UAAQ,EAAE;AACNC,aAAS,EAAE;AACPC,gBAAU,EADH;AAEPC,UAAI,EAAE,CAFC,QAED,CAFC;AAGPC,aAAO,EAAE;AAHF,KADL;AAMNC,SAAK,EAAE;AACHH,gBAAU,EADP;AAEHC,UAAI,EAAE,CAFH,QAEG,CAFH;AAGHC,aAAO,EAAE;AAHN,KAND;AAWNE,QAAI,EAAE;AACFJ,gBAAU,EADR;AAEFC,UAAI,EAAE,WAFJ,QAEI,CAFJ;AAGFC,aAAO,EAAE;AACLG,aAAK,EADA;AAELC,cAAM,EAAE;AACJL,cAAI,EADA;AAEJM,gBAAM,EAAE;AAFJ;AAFH;AAHP;AAXA;AAXc,CAArB;AAoCP;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,IAAMC,KAAK,GAAG,SAARA,KAAQ,mCAAsC;AACvD,MAAMV,QAAQ,GAAGW,iGAAa,CAACpB,YAAY,CAAb,UAA9B,mBAA8B,CAA9B;AACA,MAAMqB,WAAW,GAAGC,yFAAS,cAA7B,QAA6B,CAA7B;AAEA,SAAO;AACHP,QAAI,EAAEM,WAAW,CADd;AAEHP,SAAK,EAAEO,WAAW,CAFf;AAGHX,aAAS,EAAEW,WAAW,CAACX;AAHpB,GAAP;AAJG,E","file":"ChoroplethParser.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 = 19);\n","module.exports = require(\"@splunk/visualization-encoding-parsers/Base\");","import { parse as baseParse, mergeEncoding } from '@splunk/visualization-encoding-parsers/Base';\n\nexport const dataContract = {\n requiredDataSources: [],\n optionalDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n initialRequestParams: {\n primary: { offset: 0, count: 10000 },\n },\n encoding: {\n featureId: {\n isRequired: true,\n type: ['string'],\n default: 'primary[0]',\n },\n value: {\n isRequired: true,\n type: ['number'],\n default: 'primary[1]',\n },\n fill: {\n isRequired: true,\n type: ['number', 'string'],\n default: {\n field: 'primary[1]',\n format: {\n type: 'gradient',\n values: ['#7EEFDA', '#6484F6', '#C093F9', '#293873'],\n },\n },\n },\n },\n};\n\n/**\n * Choropleth parse function\n * @param {object} dataSources\n * @param {object} encoding\n * @return {object} props that dashboard/react visualizations can be used.\n * @public\n */\nexport const parse = (dataSources, userDefinedEncoding) => {\n const encoding = mergeEncoding(dataContract.encoding, userDefinedEncoding);\n const parsedProps = baseParse(dataSources, encoding);\n\n return {\n fill: parsedProps.fill,\n value: parsedProps.value,\n featureId: parsedProps.featureId,\n };\n};\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/visualization-encoding-parsers/Base\"","webpack:///./src/ChoroplethParser.js"],"names":["dataContract","requiredDataSources","optionalDataSources","name","description","initialRequestParams","primary","offset","count","encoding","featureId","isRequired","type","default","value","fill","field","format","values","parse","dataSources","userDefinedEncoding","mergeEncoding","parsedProps","baseParse"],"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,wE;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAgG;AAEzF,IAAMA,YAAY,GAAG;EACxBC,mBAAmB,EAAE,EAAE;EACvBC,mBAAmB,EAAE,CACjB;IACIC,IAAI,EAAE,SAAS;IACfC,WAAW,EAAE;EACjB,CAAC,CACJ;EACDC,oBAAoB,EAAE;IAClBC,OAAO,EAAE;MAAEC,MAAM,EAAE,CAAC;MAAEC,KAAK,EAAE;IAAM;EACvC,CAAC;EACDC,QAAQ,EAAE;IACNC,SAAS,EAAE;MACPC,UAAU,EAAE,IAAI;MAChBC,IAAI,EAAE,CAAC,QAAQ,CAAC;MAChBC,OAAO,EAAE;IACb,CAAC;IACDC,KAAK,EAAE;MACHH,UAAU,EAAE,IAAI;MAChBC,IAAI,EAAE,CAAC,QAAQ,CAAC;MAChBC,OAAO,EAAE;IACb,CAAC;IACDE,IAAI,EAAE;MACFJ,UAAU,EAAE,IAAI;MAChBC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;MAC1BC,OAAO,EAAE;QACLG,KAAK,EAAE,YAAY;QACnBC,MAAM,EAAE;UACJL,IAAI,EAAE,UAAU;UAChBM,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;QACvD;MACJ;IACJ;EACJ;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMC,KAAK,GAAG,SAARA,KAAKA,CAAIC,WAAW,EAAEC,mBAAmB,EAAK;EACvD,IAAMZ,QAAQ,GAAGa,iGAAa,CAACtB,YAAY,CAACS,QAAQ,EAAEY,mBAAmB,CAAC;EAC1E,IAAME,WAAW,GAAGC,yFAAS,CAACJ,WAAW,EAAEX,QAAQ,CAAC;EAEpD,OAAO;IACHM,IAAI,EAAEQ,WAAW,CAACR,IAAI;IACtBD,KAAK,EAAES,WAAW,CAACT,KAAK;IACxBJ,SAAS,EAAEa,WAAW,CAACb;EAC3B,CAAC;AACL,CAAC,C","file":"ChoroplethParser.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 = 19);\n","module.exports = require(\"@splunk/visualization-encoding-parsers/Base\");","import { parse as baseParse, mergeEncoding } from '@splunk/visualization-encoding-parsers/Base';\n\nexport const dataContract = {\n requiredDataSources: [],\n optionalDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n initialRequestParams: {\n primary: { offset: 0, count: 10000 },\n },\n encoding: {\n featureId: {\n isRequired: true,\n type: ['string'],\n default: 'primary[0]',\n },\n value: {\n isRequired: true,\n type: ['number'],\n default: 'primary[1]',\n },\n fill: {\n isRequired: true,\n type: ['number', 'string'],\n default: {\n field: 'primary[1]',\n format: {\n type: 'gradient',\n values: ['#7EEFDA', '#6484F6', '#C093F9', '#293873'],\n },\n },\n },\n },\n};\n\n/**\n * Choropleth parse function\n * @param {object} dataSources\n * @param {object} encoding\n * @return {object} props that dashboard/react visualizations can be used.\n * @public\n */\nexport const parse = (dataSources, userDefinedEncoding) => {\n const encoding = mergeEncoding(dataContract.encoding, userDefinedEncoding);\n const parsedProps = baseParse(dataSources, encoding);\n\n return {\n fill: parsedProps.fill,\n value: parsedProps.value,\n featureId: parsedProps.featureId,\n };\n};\n"],"sourceRoot":""}
package/ColumnParser.js CHANGED
@@ -143,7 +143,8 @@ var dataContract = {
143
143
  name: 'primary',
144
144
  description: 'DataSource that powers the visualization'
145
145
  }],
146
- optionalDataSources: [// Note: SCP-14090 disable ui for optional datasources. We may need to add it back later
146
+ optionalDataSources: [
147
+ // Note: SCP-14090 disable ui for optional datasources. We may need to add it back later
147
148
  // {
148
149
  // name: 'annotation',
149
150
  // description: 'DataSource that populate event annotations',
@@ -188,6 +189,7 @@ var dataContract = {
188
189
  }
189
190
  }
190
191
  };
192
+
191
193
  /**
192
194
  * Column parse function
193
195
  * @param {object} dataSources
@@ -195,12 +197,10 @@ var dataContract = {
195
197
  * @return {object} props that dashboard/react visualizations can be used.
196
198
  * @public
197
199
  */
198
-
199
200
  var parse = function parse(dataSources, userDefinedEncoding) {
200
201
  if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(dataSources)) {
201
202
  throw new Error(_errorMsgs__WEBPACK_IMPORTED_MODULE_2__["ErrorMsgs"].NO_DATA_SOURCES);
202
203
  }
203
-
204
204
  var encoding = Object(_splunk_visualization_encoding_parsers_Base__WEBPACK_IMPORTED_MODULE_0__["mergeEncoding"])(dataContract.encoding, userDefinedEncoding);
205
205
  var parsedProps = Object(_splunk_visualization_encoding_parsers_Base__WEBPACK_IMPORTED_MODULE_0__["parse"])(dataSources, encoding);
206
206
  return {
@@ -215,7 +215,6 @@ var parse = function parse(dataSources, userDefinedEncoding) {
215
215
  yFieldName: parsedProps['_meta'].fieldNames.y,
216
216
  // eslint-disable-line dot-notation
217
217
  y2FieldName: parsedProps['_meta'].fieldNames.y2 // eslint-disable-line dot-notation
218
-
219
218
  };
220
219
  };
221
220
 
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualization-encoding-parsers/Base\"","webpack:///./src/errorMsgs.js","webpack:///./src/ColumnParser.js","webpack:///external \"lodash/isEmpty\""],"names":["ErrorMsgs","NO_DATA_SOURCES","_","NO_ENCODING","ERROR_PARSE","dataContract","requiredDataSources","name","description","optionalDataSources","initialRequestParams","primary","offset","count","annotation","encoding","x","isRequired","type","default","y","y2","annotationX","annotationLabel","annotationColor","parse","isEmpty","mergeEncoding","parsedProps","baseParse","xFieldName","yFieldName","y2FieldName"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA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;AAMNC,KAAC,EAAE;AACCH,gBAAU,EADX;AAECC,UAAI,EAAE,WAFP,QAEO,CAFP;AAGCC,aAAO,EAAE;AAHV,KANG;AAWNE,MAAE,EAAE;AACAJ,gBAAU,EADV;AAEAC,UAAI,EAAE;AAFN,KAXE;AAeNI,eAAW,EAAE;AACTL,gBAAU,EADD;AAETC,UAAI,EAAE;AAFG,KAfP;AAmBNK,mBAAe,EAAE;AACbN,gBAAU,EADG;AAEbC,UAAI,EAAE;AAFO,KAnBX;AAuBNM,mBAAe,EAAE;AACbP,gBAAU,EADG;AAEbC,UAAI,EAAE;AAFO;AAvBX;AAlBc,CAArB;AAgDP;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,IAAMO,KAAK,GAAG,SAARA,KAAQ,mCAAsC;AACvD,MAAIC,qDAAO,CAAX,WAAW,CAAX,EAA0B;AACtB,UAAM,UAAU1B,oDAAS,CAAzB,eAAM,CAAN;AACH;;AAED,MAAMe,QAAQ,GAAGY,iGAAa,CAACtB,YAAY,CAAb,UAA9B,mBAA8B,CAA9B;AACA,MAAMuB,WAAW,GAAGC,yFAAS,cAA7B,QAA6B,CAA7B;AAEA,SAAO;AACHb,KAAC,EAAEY,WAAW,CADX;AAEHR,KAAC,EAAEQ,WAAW,CAFX;AAGHP,MAAE,EAAEO,WAAW,CAHZ;AAIHN,eAAW,EAAEM,WAAW,CAJrB;AAKHL,mBAAe,EAAEK,WAAW,CALzB;AAMHJ,mBAAe,EAAEI,WAAW,CANzB;AAOHE,cAAU,EAAEF,WAAW,CAAXA,OAAW,CAAXA,YAPT;AAO4C;AAC/CG,cAAU,EAAEH,WAAW,CAAXA,OAAW,CAAXA,YART;AAQ4C;AAC/CI,eAAW,EAAEJ,WAAW,CAAXA,OAAW,CAAXA,YATV,GAS8C;;AAT9C,GAAP;AARG,E;;;;;;;AC3DP,2C","file":"ColumnParser.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 = 20);\n","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualization-encoding-parsers/Base\");","import { _ } from '@splunk/ui-utils/i18n';\n\nexport const ErrorMsgs = {\n NO_DATA_SOURCES: _('No valid dataSources.'),\n NO_ENCODING: _('No valid encoding.'),\n ERROR_PARSE: _('Can not parse data correctly.'),\n};\n","import { parse as baseParse, mergeEncoding } from '@splunk/visualization-encoding-parsers/Base';\nimport isEmpty from 'lodash/isEmpty';\nimport { ErrorMsgs } from './errorMsgs';\n\nexport const dataContract = {\n requiredDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n optionalDataSources: [\n // Note: SCP-14090 disable ui for optional datasources. We may need to add it back later\n // {\n // name: 'annotation',\n // description: 'DataSource that populate event annotations',\n // },\n ],\n initialRequestParams: {\n primary: { offset: 0, count: 10000 },\n annotation: { offset: 0, count: 10000 },\n },\n encoding: {\n x: {\n isRequired: true,\n type: ['time', 'number', 'string'],\n default: 'primary[0]',\n },\n y: {\n isRequired: true,\n type: ['number', 'string'],\n default: 'primary[1:]',\n },\n y2: {\n isRequired: false,\n type: ['number', 'string'],\n },\n annotationX: {\n isRequired: false,\n type: ['time', 'number', 'string'],\n },\n annotationLabel: {\n isRequired: false,\n type: ['string'],\n },\n annotationColor: {\n isRequired: false,\n type: ['string'],\n },\n },\n};\n\n/**\n * Column parse function\n * @param {object} dataSources\n * @param {object} userDefinedEncoding\n * @return {object} props that dashboard/react visualizations can be used.\n * @public\n */\nexport const parse = (dataSources, userDefinedEncoding) => {\n if (isEmpty(dataSources)) {\n throw new Error(ErrorMsgs.NO_DATA_SOURCES);\n }\n\n const encoding = mergeEncoding(dataContract.encoding, userDefinedEncoding);\n const parsedProps = baseParse(dataSources, encoding);\n\n return {\n x: parsedProps.x,\n y: parsedProps.y,\n y2: parsedProps.y2,\n annotationX: parsedProps.annotationX,\n annotationLabel: parsedProps.annotationLabel,\n annotationColor: parsedProps.annotationColor,\n xFieldName: parsedProps['_meta'].fieldNames.x, // eslint-disable-line dot-notation\n yFieldName: parsedProps['_meta'].fieldNames.y, // eslint-disable-line dot-notation\n y2FieldName: parsedProps['_meta'].fieldNames.y2, // eslint-disable-line dot-notation\n };\n};\n","module.exports = require(\"lodash/isEmpty\");"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualization-encoding-parsers/Base\"","webpack:///./src/errorMsgs.js","webpack:///./src/ColumnParser.js","webpack:///external \"lodash/isEmpty\""],"names":["ErrorMsgs","NO_DATA_SOURCES","_","NO_ENCODING","ERROR_PARSE","dataContract","requiredDataSources","name","description","optionalDataSources","initialRequestParams","primary","offset","count","annotation","encoding","x","isRequired","type","default","y","y2","annotationX","annotationLabel","annotationColor","parse","dataSources","userDefinedEncoding","isEmpty","Error","mergeEncoding","parsedProps","baseParse","xFieldName","fieldNames","yFieldName","y2FieldName"],"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,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\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 = 20);\n","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualization-encoding-parsers/Base\");","import { _ } from '@splunk/ui-utils/i18n';\n\nexport const ErrorMsgs = {\n NO_DATA_SOURCES: _('No valid dataSources.'),\n NO_ENCODING: _('No valid encoding.'),\n ERROR_PARSE: _('Can not parse data correctly.'),\n};\n","import { parse as baseParse, mergeEncoding } from '@splunk/visualization-encoding-parsers/Base';\nimport isEmpty from 'lodash/isEmpty';\nimport { ErrorMsgs } from './errorMsgs';\n\nexport const dataContract = {\n requiredDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n optionalDataSources: [\n // Note: SCP-14090 disable ui for optional datasources. We may need to add it back later\n // {\n // name: 'annotation',\n // description: 'DataSource that populate event annotations',\n // },\n ],\n initialRequestParams: {\n primary: { offset: 0, count: 10000 },\n annotation: { offset: 0, count: 10000 },\n },\n encoding: {\n x: {\n isRequired: true,\n type: ['time', 'number', 'string'],\n default: 'primary[0]',\n },\n y: {\n isRequired: true,\n type: ['number', 'string'],\n default: 'primary[1:]',\n },\n y2: {\n isRequired: false,\n type: ['number', 'string'],\n },\n annotationX: {\n isRequired: false,\n type: ['time', 'number', 'string'],\n },\n annotationLabel: {\n isRequired: false,\n type: ['string'],\n },\n annotationColor: {\n isRequired: false,\n type: ['string'],\n },\n },\n};\n\n/**\n * Column parse function\n * @param {object} dataSources\n * @param {object} userDefinedEncoding\n * @return {object} props that dashboard/react visualizations can be used.\n * @public\n */\nexport const parse = (dataSources, userDefinedEncoding) => {\n if (isEmpty(dataSources)) {\n throw new Error(ErrorMsgs.NO_DATA_SOURCES);\n }\n\n const encoding = mergeEncoding(dataContract.encoding, userDefinedEncoding);\n const parsedProps = baseParse(dataSources, encoding);\n\n return {\n x: parsedProps.x,\n y: parsedProps.y,\n y2: parsedProps.y2,\n annotationX: parsedProps.annotationX,\n annotationLabel: parsedProps.annotationLabel,\n annotationColor: parsedProps.annotationColor,\n xFieldName: parsedProps['_meta'].fieldNames.x, // eslint-disable-line dot-notation\n yFieldName: parsedProps['_meta'].fieldNames.y, // eslint-disable-line dot-notation\n y2FieldName: parsedProps['_meta'].fieldNames.y2, // eslint-disable-line dot-notation\n };\n};\n","module.exports = require(\"lodash/isEmpty\");"],"sourceRoot":""}
@@ -192,6 +192,7 @@ var dataContract = {
192
192
  }
193
193
  }
194
194
  };
195
+
195
196
  /**
196
197
  * FillerGauge parse function
197
198
  * @param {object} dataSources
@@ -199,12 +200,10 @@ var dataContract = {
199
200
  * @return {object} props that dashboard/react visualizations can be used.
200
201
  * @public
201
202
  */
202
-
203
203
  var parse = function parse(dataSources, userDefinedEncoding) {
204
204
  if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(dataSources)) {
205
205
  throw new Error(_errorMsgs__WEBPACK_IMPORTED_MODULE_3__["ErrorMsgs"].NO_DATA_SOURCES);
206
206
  }
207
-
208
207
  var encoding = Object(_splunk_visualization_encoding_parsers_Base__WEBPACK_IMPORTED_MODULE_1__["mergeEncoding"])(dataContract.encoding, userDefinedEncoding);
209
208
  var parsedProps = Object(_splunk_visualization_encoding_parsers_Base__WEBPACK_IMPORTED_MODULE_1__["parse"])(dataSources, encoding);
210
209
  Object.keys(encoding).forEach(function (encodingKey) {
@@ -231,7 +230,6 @@ var parse = function parse(dataSources, userDefinedEncoding) {
231
230
  valueType: parsedProps['_meta'].types.value,
232
231
  // eslint-disable-line dot-notation
233
232
  gaugeColorType: parsedProps['_meta'].types.gaugeColor // eslint-disable-line dot-notation
234
-
235
233
  };
236
234
  };
237
235
 
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualization-encoding-parsers/Base\"","webpack:///./src/errorMsgs.js","webpack:///./src/FillerGaugeParser.js","webpack:///external \"lodash/isEmpty\"","webpack:///external \"@babel/runtime/helpers/toConsumableArray\""],"names":["ErrorMsgs","NO_DATA_SOURCES","_","NO_ENCODING","ERROR_PARSE","dataContract","requiredDataSources","name","description","optionalDataSources","initialRequestParams","primary","offset","count","encoding","value","isRequired","type","default","gaugeColor","field","format","ranges","from","to","parse","isEmpty","mergeEncoding","parsedProps","baseParse","Object","encodingValue","valueIndex","min","Math","range","max","parseInt","valueFieldName","gaugeColorFieldName","valueType","gaugeColorType"],"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,kD;;;;;;;ACAA,wE;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAEO,IAAMA,SAAS,GAAG;AACrBC,iBAAe,EAAEC,+DAAC,CADG,uBACH,C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eParser.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 = 21);\n","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualization-encoding-parsers/Base\");","import { _ } from '@splunk/ui-utils/i18n';\n\nexport const ErrorMsgs = {\n NO_DATA_SOURCES: _('No valid dataSources.'),\n NO_ENCODING: _('No valid encoding.'),\n ERROR_PARSE: _('Can not parse data correctly.'),\n};\n","import { parse as baseParse, mergeEncoding } from '@splunk/visualization-encoding-parsers/Base';\nimport isEmpty from 'lodash/isEmpty';\nimport { ErrorMsgs } from './errorMsgs';\n\nexport const dataContract = {\n requiredDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n optionalDataSources: [],\n initialRequestParams: {\n primary: { offset: 0, count: 10000 },\n },\n encoding: {\n value: {\n isRequired: true,\n type: 'number',\n default: 'primary[0][-1]',\n },\n gaugeColor: {\n isRequired: true,\n type: 'string',\n default: {\n field: 'encoding.value',\n format: {\n type: 'rangevalue',\n ranges: [\n {\n from: 70,\n to: 100,\n value: '#ff7152',\n },\n {\n from: 50,\n to: 70,\n value: '#fc9850',\n },\n {\n from: 30,\n to: 50,\n value: '#f4df7a',\n },\n {\n from: 10,\n to: 30,\n value: '#4beba8',\n },\n {\n from: 0,\n to: 10,\n value: '#5fbcff',\n },\n ],\n },\n },\n },\n },\n};\n\n/**\n * FillerGauge parse function\n * @param {object} dataSources\n * @param {object} userDefinedEncoding\n * @return {object} props that dashboard/react visualizations can be used.\n * @public\n */\nexport const parse = (dataSources, userDefinedEncoding) => {\n if (isEmpty(dataSources)) {\n throw new Error(ErrorMsgs.NO_DATA_SOURCES);\n }\n\n const encoding = mergeEncoding(dataContract.encoding, userDefinedEncoding);\n const parsedProps = baseParse(dataSources, encoding);\n Object.keys(encoding).forEach(encodingKey => {\n const encodingValue = parsedProps[encodingKey];\n const valueIndex = encodingValue.length - 1;\n parsedProps[encodingKey] = parsedProps[encodingKey][valueIndex];\n });\n const ranges = (encoding.gaugeColor.format && encoding.gaugeColor.format.ranges) || [];\n const min = ranges.length ? Math.min(...ranges.map(range => range.from)) : undefined;\n const max = ranges.length ? Math.max(...ranges.map(range => range.to)) : undefined;\n\n return {\n value: parseInt(parsedProps.value, 10),\n gaugeColor: parsedProps.gaugeColor,\n min,\n max,\n valueFieldName: parsedProps['_meta'].fieldNames.value, // eslint-disable-line dot-notation\n gaugeColorFieldName: parsedProps['_meta'].fieldNames.gaugeColor, // eslint-disable-line dot-notation\n valueType: parsedProps['_meta'].types.value, // eslint-disable-line dot-notation\n gaugeColorType: parsedProps['_meta'].types.gaugeColor, // eslint-disable-line dot-notation\n };\n};\n","module.exports = require(\"lodash/isEmpty\");","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@splunk/visualization-encoding-parsers/Base\"","webpack:///./src/errorMsgs.js","webpack:///./src/FillerGaugeParser.js","webpack:///external \"lodash/isEmpty\"","webpack:///external \"@babel/runtime/helpers/toConsumableArray\""],"names":["ErrorMsgs","NO_DATA_SOURCES","_","NO_ENCODING","ERROR_PARSE","dataContract","requiredDataSources","name","description","optionalDataSources","initialRequestParams","primary","offset","count","encoding","value","isRequired","type","default","gaugeColor","field","format","ranges","from","to","parse","dataSources","userDefinedEncoding","isEmpty","Error","mergeEncoding","parsedProps","baseParse","Object","keys","forEach","encodingKey","encodingValue","valueIndex","length","min","Math","apply","_toConsumableArray","map","range","undefined","max","parseInt","valueFieldName","fieldNames","gaugeColorFieldName","valueType","types","gaugeColorType"],"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,kD;;;;;;;ACAA,wE;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAA0C;AAEnC,IAAMA,SAAS,GAAG;EACrBC,eAAe,EAAEC,+DAAC,CAAC,uBAAuB,CAAC;EAC3CC,WAAW,EAAED,+DAAC,CAAC,oBAAoB,CAAC;EACpCE,WAAW,EAAEF,+DAAC,CAAC,+BAA+B;AAClD,CAAC,C;;;;;;;;;;;;;;;;;;;ACN+F;AAC3D;AACG;AAEjC,IAAMG,YAAY,GAAG;EACxBC,mBAAmB,EAAE,CACjB;IACIC,IAAI,EAAE,SAAS;IACfC,WAAW,EAAE;EACjB,CAAC,CACJ;EACDC,mBAAmB,EAAE,EAAE;EACvBC,oBAAoB,EAAE;IAClBC,OAAO,EAAE;MAAEC,MAAM,EAAE,CAAC;MAAEC,KAAK,EAAE;IAAM;EACvC,CAAC;EACDC,QAAQ,EAAE;IACNC,KAAK,EAAE;MACHC,UAAU,EA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;;;;;;ACAA,qE","file":"FillerGaugeParser.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 = 21);\n","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@splunk/visualization-encoding-parsers/Base\");","import { _ } from '@splunk/ui-utils/i18n';\n\nexport const ErrorMsgs = {\n NO_DATA_SOURCES: _('No valid dataSources.'),\n NO_ENCODING: _('No valid encoding.'),\n ERROR_PARSE: _('Can not parse data correctly.'),\n};\n","import { parse as baseParse, mergeEncoding } from '@splunk/visualization-encoding-parsers/Base';\nimport isEmpty from 'lodash/isEmpty';\nimport { ErrorMsgs } from './errorMsgs';\n\nexport const dataContract = {\n requiredDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n optionalDataSources: [],\n initialRequestParams: {\n primary: { offset: 0, count: 10000 },\n },\n encoding: {\n value: {\n isRequired: true,\n type: 'number',\n default: 'primary[0][-1]',\n },\n gaugeColor: {\n isRequired: true,\n type: 'string',\n default: {\n field: 'encoding.value',\n format: {\n type: 'rangevalue',\n ranges: [\n {\n from: 70,\n to: 100,\n value: '#ff7152',\n },\n {\n from: 50,\n to: 70,\n value: '#fc9850',\n },\n {\n from: 30,\n to: 50,\n value: '#f4df7a',\n },\n {\n from: 10,\n to: 30,\n value: '#4beba8',\n },\n {\n from: 0,\n to: 10,\n value: '#5fbcff',\n },\n ],\n },\n },\n },\n },\n};\n\n/**\n * FillerGauge parse function\n * @param {object} dataSources\n * @param {object} userDefinedEncoding\n * @return {object} props that dashboard/react visualizations can be used.\n * @public\n */\nexport const parse = (dataSources, userDefinedEncoding) => {\n if (isEmpty(dataSources)) {\n throw new Error(ErrorMsgs.NO_DATA_SOURCES);\n }\n\n const encoding = mergeEncoding(dataContract.encoding, userDefinedEncoding);\n const parsedProps = baseParse(dataSources, encoding);\n Object.keys(encoding).forEach(encodingKey => {\n const encodingValue = parsedProps[encodingKey];\n const valueIndex = encodingValue.length - 1;\n parsedProps[encodingKey] = parsedProps[encodingKey][valueIndex];\n });\n const ranges = (encoding.gaugeColor.format && encoding.gaugeColor.format.ranges) || [];\n const min = ranges.length ? Math.min(...ranges.map(range => range.from)) : undefined;\n const max = ranges.length ? Math.max(...ranges.map(range => range.to)) : undefined;\n\n return {\n value: parseInt(parsedProps.value, 10),\n gaugeColor: parsedProps.gaugeColor,\n min,\n max,\n valueFieldName: parsedProps['_meta'].fieldNames.value, // eslint-disable-line dot-notation\n gaugeColorFieldName: parsedProps['_meta'].fieldNames.gaugeColor, // eslint-disable-line dot-notation\n valueType: parsedProps['_meta'].types.value, // eslint-disable-line dot-notation\n gaugeColorType: parsedProps['_meta'].types.gaugeColor, // eslint-disable-line dot-notation\n };\n};\n","module.exports = require(\"lodash/isEmpty\");","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");"],"sourceRoot":""}