@splunk/visualizations-shared 26.0.0 → 26.1.1
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/Downloader.js +63 -8
- package/Downloader.js.map +1 -1
- package/FileDownloader.js +98 -24
- package/FileDownloader.js.map +1 -1
- package/JSONSchemaUtils.js +6 -1
- package/JSONSchemaUtils.js.map +1 -1
- package/Message.js +22 -11
- package/Message.js.map +1 -1
- package/RemoteIcon.js +87 -34
- package/RemoteIcon.js.map +1 -1
- package/RemoteImage.js +45 -9
- package/RemoteImage.js.map +1 -1
- package/SanitizeProps.js +40 -15
- package/SanitizeProps.js.map +1 -1
- package/SizeAwareWrapper.js +35 -7
- package/SizeAwareWrapper.js.map +1 -1
- package/VisualizationDocPage.js +65 -19
- package/VisualizationDocPage.js.map +1 -1
- package/colorConstants.js +1 -1
- package/colorConstants.js.map +1 -1
- package/colorUtils.js +28 -15
- package/colorUtils.js.map +1 -1
- package/configUtils.js +3 -1
- package/configUtils.js.map +1 -1
- package/console.js +13 -1
- package/console.js.map +1 -1
- package/dataSourceUtils.js +11 -2
- package/dataSourceUtils.js.map +1 -1
- package/domUtils.js +1 -1
- package/domUtils.js.map +1 -1
- package/hocUtils.js +15 -1
- package/hocUtils.js.map +1 -1
- package/i18n.js +3 -1
- package/i18n.js.map +1 -1
- package/iconUtils.js +12 -13
- package/iconUtils.js.map +1 -1
- package/mapUtils.js +5 -1
- package/mapUtils.js.map +1 -1
- package/namedColors.js +3 -3
- package/namedColors.js.map +1 -1
- package/numberUtils.js +28 -18
- package/numberUtils.js.map +1 -1
- package/package.json +8 -16
- package/previewVizMessage.js +1 -1
- package/previewVizMessage.js.map +1 -1
- package/propUtils.js +37 -16
- package/propUtils.js.map +1 -1
- package/schemaUtils.js +11 -11
- package/schemaUtils.js.map +1 -1
- package/simpleXMLOptions.js +3 -3
- package/simpleXMLOptions.js.map +1 -1
- package/style.js +12 -7
- package/style.js.map +1 -1
- package/testHelper.js +1 -1
- package/testHelper.js.map +1 -1
- package/themeUtils.js +9 -8
- package/themeUtils.js.map +1 -1
- package/trellisUtils.js +63 -19
- package/trellisUtils.js.map +1 -1
package/SanitizeProps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"lodash\"","webpack:///./src/schemaUtils.js","webpack:///./src/namedColors.ts","webpack:///./src/colorUtils.ts","webpack:///./src/SanitizeProps.tsx"],"names":["$schema","$id","title","definitions","schemaArray","type","minItems","items","$ref","nonNegativeInteger","minimum","nonNegativeIntegerDefault0","allOf","default","simpleTypes","enum","stringArray","uniqueItems","properties","format","$comment","description","readOnly","examples","multipleOf","exclusiveMinimum","maximum","exclusiveMaximum","maxLength","minLength","pattern","additionalItems","anyOf","maxItems","contains","maxProperties","minProperties","required","additionalProperties","patternProperties","propertyNames","dependencies","const","contentMediaType","contentEncoding","if","then","else","oneOf","not","createTestSchema","optionsSchema","TOKEN_NAMESPACE_PREFIX_PATTERN","source","TOKEN_NAME_CHARS_PATTERN","TOKEN_PATTERN","rgbColorPattern","rgbaColorPattern","colorPattern","colorPatternWithRGBA","concat","COLOR_OR_TOKEN_PATTERN","COLOR_OR_TOKEN_PATTERN_WITH_RGBA","DYNAMIC_OPTIONS_DSL_PATTERN","getPattern","values","reduce","accumulator","value","exports","schemaUtils_1","require","namedColors_1","isColor","color","arguments","length","undefined","charAt","substring","indexOf","Number","isNaN","parseInt","trimmedColor","trim","test","includes","toLowerCase","isArrayOfColors","colors","Array","isArray","every","sanitizeArrayOfColors","arr","fallback","map","entry","React","lodash_1","colorUtils_1","propsKeyValidators","backgroundColor","deltaColor","trendColor","fontColor","fillColor","gaugeColor","majorColor","radialBackgroundColor","radialStrokeColor","sparklineFillColor","sparklineStrokeColor","strokeColor","strokeHighlightColor","headerBackgroundColor","rowBackgroundColorOdd","rowBackgroundColorEven","headerTextColor","rowTextColorOdd","rowTextColorEven","textColor","defaultFontColor","defaultBlockFontColor","sparklineAreaColor","iconColor","areaColor","nodeColor","nodeHighlightColor","linkColor","nodeTextColor","nodeTextHighlightColor","trellisBackgroundColor","isValidProperty","key","hasOwnProperty","Object","prototype","call","sanitize","props","keys","accum","isPlainObject","options","withSanitizedProps","WrappedComponent","Wrapper","sanitizedProps","createElement","assign"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFA,kC;;;;;;;ACAA,mC;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAe;EACXA,OAAO,EAAE,yCAAyC;EAClDC,GAAG,EAAE,yCAAyC;EAC9CC,KAAK,EAAE,yBAAyB;EAChCC,WAAW,EAAE;IACTC,WAAW,EAAE;MACTC,IAAI,EAAE,OAAO;MACbC,QAAQ,EAAE,CAAC;MACXC,KAAK,EAAE;QAAEC,IAAI,EAAE;MAAI;IACvB,CAAC;IACDC,kBAAkB,EAAE;MAChBJ,IAAI,EAAE,SAAS;MACfK,OAAO,EAAE;IACb,CAAC;IACDC,0BAA0B,EAAE;MACxBC,KAAK,EAAE,CAAC;QAAEJ,IAAI,EAAE;MAAm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AOA,cAAc,CAACG,IAAI,CAACrC,kBAAkB,EAAEiC,GAAG,CAAC,GAAGjC,kBAAkB,CAACiC,GAAG,CAAC,CAACnE,KAAK,CAAC,GAAG,IAAI;AAC/F;AAEA;;;;;;;;;AASA,SAAgBwE,QAAQA,CAAgCC,KAAQ;EAC5D,OAAOJ,MAAM,CAACK,IAAI,CAACD,KAAK,CAAC,CAAC3E,MAAM,CAAC,UAAC6E,KAAK,EAAER,GAAG,EAAI;IAC5C,IAAIA,GAAG,KAAK,SAAS,IAAI,IAAAnC,QAAA,CAAA4C,aAAa,EAACH,KAAK,CAACI,OAAO,CAAC,EAAE;MACnDF,KAAK,CAACR,GAAG,CAAC,GAAGK,QAAQ,CAACC,KAAK,CAACI,OAAO,CAAC;KACvC,MAAM,IAAIX,eAAe,CAACC,GAAG,EAAEM,KAAK,CAACN,GAAG,CAAC,CAAC,EAAE;MACzCQ,KAAK,CAACR,GAAG,CAAC,GAAGM,KAAK,CAACN,GAAG,CAAC;;IAE3B,OAAOQ,KAAK;EAChB,CAAC,EAAE,EAAE,CAAC;AACV;AATA1E,OAAA,CAAAuE,QAAA,GAAAA,QAAA;AAWA;;;;;;;AAOA,SAAgBM,kBAAkBA,CAC9BC,gBAAwC;EAExC,IAAMC,OAAO,GAAG,SAAVA,OAAOA,CAAIP,KAAQ,EAAI;IACzB,IAAMQ,cAAc,GAAGT,QAAQ,CAACC,KAAK,CAAC;IACtC,OAAO1C,KAAA,CAAAmD,aAAA,CAACH,gBAAgB,EAAAV,MAAA,CAAAc,MAAA,KAAMF,cAAoB,EAAI;EAC1D,CAAC;EACD,OAAOD,OAAO;AAClB;AARA/E,OAAA,CAAA6E,kBAAA,GAAAA,kBAAA,C","file":"SanitizeProps.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 = 48);\n","module.exports = require(\"react\");","module.exports = require(\"lodash\");","export default {\n $schema: 'http://json-schema.org/draft-07/schema#',\n $id: 'http://json-schema.org/draft-07/schema#',\n title: 'Core schema meta-schema',\n definitions: {\n schemaArray: {\n type: 'array',\n minItems: 1,\n items: { $ref: '#' },\n },\n nonNegativeInteger: {\n type: 'integer',\n minimum: 0,\n },\n nonNegativeIntegerDefault0: {\n allOf: [{ $ref: '#/definitions/nonNegativeInteger' }, { default: 0 }],\n },\n simpleTypes: {\n enum: ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'],\n },\n stringArray: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n default: [],\n },\n },\n type: ['object', 'boolean'],\n properties: {\n $id: {\n type: 'string',\n format: 'uri-reference',\n },\n $schema: {\n type: 'string',\n format: 'uri',\n },\n $ref: {\n type: 'string',\n format: 'uri-reference',\n },\n $comment: {\n type: 'string',\n },\n title: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n default: true,\n readOnly: {\n type: 'boolean',\n default: false,\n },\n examples: {\n type: 'array',\n items: true,\n },\n multipleOf: {\n type: 'number',\n exclusiveMinimum: 0,\n },\n maximum: {\n type: 'number',\n },\n exclusiveMaximum: {\n type: 'number',\n },\n minimum: {\n type: 'number',\n },\n exclusiveMinimum: {\n type: 'number',\n },\n maxLength: { $ref: '#/definitions/nonNegativeInteger' },\n minLength: { $ref: '#/definitions/nonNegativeIntegerDefault0' },\n pattern: {\n type: 'string',\n format: 'regex',\n },\n additionalItems: { $ref: '#' },\n items: {\n anyOf: [{ $ref: '#' }, { $ref: '#/definitions/schemaArray' }],\n default: true,\n },\n maxItems: { $ref: '#/definitions/nonNegativeInteger' },\n minItems: { $ref: '#/definitions/nonNegativeIntegerDefault0' },\n uniqueItems: {\n type: 'boolean',\n default: false,\n },\n contains: { $ref: '#' },\n maxProperties: { $ref: '#/definitions/nonNegativeInteger' },\n minProperties: { $ref: '#/definitions/nonNegativeIntegerDefault0' },\n required: { $ref: '#/definitions/stringArray' },\n additionalProperties: { $ref: '#' },\n definitions: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n default: {},\n },\n properties: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n default: {},\n },\n patternProperties: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n propertyNames: { format: 'regex' },\n default: {},\n },\n dependencies: {\n type: 'object',\n additionalProperties: {\n anyOf: [{ $ref: '#' }, { $ref: '#/definitions/stringArray' }],\n },\n },\n propertyNames: { $ref: '#' },\n const: true,\n enum: {\n type: 'array',\n items: true,\n minItems: 1,\n uniqueItems: true,\n },\n type: {\n anyOf: [\n { $ref: '#/definitions/simpleTypes' },\n {\n type: 'array',\n items: { $ref: '#/definitions/simpleTypes' },\n minItems: 1,\n uniqueItems: true,\n },\n ],\n },\n format: { type: 'string' },\n contentMediaType: { type: 'string' },\n contentEncoding: { type: 'string' },\n if: { $ref: '#' },\n then: { $ref: '#' },\n else: { $ref: '#' },\n allOf: { $ref: '#/definitions/schemaArray' },\n anyOf: { $ref: '#/definitions/schemaArray' },\n oneOf: { $ref: '#/definitions/schemaArray' },\n not: { $ref: '#' },\n },\n default: true,\n};\n\nexport const createTestSchema = optionsSchema => ({\n $schema: 'http://json-schema.org/draft-07/schema#',\n $id: 'http://www.splunk.com/dashboard.schema.json',\n title: 'Dashboard Definition',\n description: 'Dashboard Definition',\n type: 'object',\n properties: optionsSchema,\n});\n\n// Below 2 regexs are copied from dashboard-framework/packages/dashboard-utils/src/token.jsc\nconst TOKEN_NAMESPACE_PREFIX_PATTERN = /(\\w+:)?/.source;\n// ex: token.name|suh (old-style filter chain)\n// ex: token.name|lower|capitalize (new-style filter chain)\nconst TOKEN_NAME_CHARS_PATTERN = /([^$|:]+?)(\\|[|\\w]+)?/.source;\n\nexport const TOKEN_PATTERN =\n /\\$/.source + TOKEN_NAMESPACE_PREFIX_PATTERN + TOKEN_NAME_CHARS_PATTERN + /\\$/.source;\n// rgb and rgba regexes were derived from:\n// https://stackoverflow.com/questions/9585973/javascript-regular-expression-for-rgb-values/9586150\n// https://github.com/regexhq/rgba-regex\n// NOTE: this will incorrectly accept values like rgb(999,999,999), but may be overkill to specify a regex that limits values to <= 255\nexport const rgbColorPattern = /^rgb\\(\\s*(\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/;\nexport const rgbaColorPattern = /^rgba\\(\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d*(?:\\.\\d+)?)\\)$/;\n// todo: rename this to COLOR_PATTERN and replace all occurences.\nexport const colorPattern = '^#[0-9a-fA-F]{6}$|transparent';\nexport const colorPatternWithRGBA = `${colorPattern}|${rgbColorPattern.source}|${rgbaColorPattern.source}`;\nexport const COLOR_OR_TOKEN_PATTERN = `${colorPattern}|${TOKEN_PATTERN}`;\nexport const COLOR_OR_TOKEN_PATTERN_WITH_RGBA = `${colorPatternWithRGBA}|${TOKEN_PATTERN}`;\n// dynamic option DSL expressions always start with a >\nexport const DYNAMIC_OPTIONS_DSL_PATTERN = /^>.*/.source;\n/**\n * Returns the regex string that matches each passed in value as well as tokens.\n * @param {Array.<string>} values\n * @returns {string}\n */\nexport const getPattern = values =>\n values.reduce((accumulator, value) => `${accumulator}|^${value}$`, TOKEN_PATTERN);\n","// Reference - https://www.w3.org/TR/css-color-4/#named-colors\nexport default [\n 'transparent',\n 'aliceblue',\n 'antiquewhite',\n 'aqua',\n 'aquamarine',\n 'azure',\n 'beige',\n 'bisque',\n 'black',\n 'blanchedalmond',\n 'blue',\n 'blueviolet',\n 'brown',\n 'burlywood',\n 'cadetblue',\n 'chartreuse',\n 'chocolate',\n 'coral',\n 'cornflowerblue',\n 'cornsilk',\n 'crimson',\n 'cyan',\n 'darkblue',\n 'darkcyan',\n 'darkgoldenrod',\n 'darkgray',\n 'darkgreen',\n 'darkgrey',\n 'darkkhaki',\n 'darkmagenta',\n 'darkolivegreen',\n 'darkorange',\n 'darkorchid',\n 'darkred',\n 'darksalmon',\n 'darkseagreen',\n 'darkslateblue',\n 'darkslategray',\n 'darkslategrey',\n 'darkturquoise',\n 'darkviolet',\n 'deeppink',\n 'deepskyblue',\n 'dimgray',\n 'dimgrey',\n 'dodgerblue',\n 'firebrick',\n 'floralwhite',\n 'forestgreen',\n 'fuchsia',\n 'gainsboro',\n 'ghostwhite',\n 'gold',\n 'goldenrod',\n 'gray',\n 'green',\n 'greenyellow',\n 'grey',\n 'honeydew',\n 'hotpink',\n 'indianred',\n 'indigo',\n 'ivory',\n 'khaki',\n 'lavender',\n 'lavenderblush',\n 'lawngreen',\n 'lemonchiffon',\n 'lightblue',\n 'lightcoral',\n 'lightcyan',\n 'lightgoldenrodyellow',\n 'lightgray',\n 'lightgreen',\n 'lightgrey',\n 'lightpink',\n 'lightsalmon',\n 'lightseagreen',\n 'lightskyblue',\n 'lightslategray',\n 'lightslategrey',\n 'lightsteelblue',\n 'lightyellow',\n 'lime',\n 'limegreen',\n 'linen',\n 'magenta',\n 'maroon',\n 'mediumaquamarine',\n 'mediumblue',\n 'mediumorchid',\n 'mediumpurple',\n 'mediumseagreen',\n 'mediumslateblue',\n 'mediumspringgreen',\n 'mediumturquoise',\n 'mediumvioletred',\n 'midnightblue',\n 'mintcream',\n 'mistyrose',\n 'moccasin',\n 'navajowhite',\n 'navy',\n 'oldlace',\n 'olive',\n 'olivedrab',\n 'orange',\n 'orangered',\n 'orchid',\n 'palegoldenrod',\n 'palegreen',\n 'paleturquoise',\n 'palevioletred',\n 'papayawhip',\n 'peachpuff',\n 'peru',\n 'pink',\n 'plum',\n 'powderblue',\n 'purple',\n 'rebeccapurple',\n 'red',\n 'rosybrown',\n 'royalblue',\n 'saddlebrown',\n 'salmon',\n 'sandybrown',\n 'seagreen',\n 'seashell',\n 'sienna',\n 'silver',\n 'skyblue',\n 'slateblue',\n 'slategray',\n 'slategrey',\n 'snow',\n 'springgreen',\n 'steelblue',\n 'tan',\n 'teal',\n 'thistle',\n 'tomato',\n 'turquoise',\n 'violet',\n 'wheat',\n 'white',\n 'whitesmoke',\n 'yellow',\n 'yellowgreen',\n];\n","import { rgbColorPattern, rgbaColorPattern } from './schemaUtils';\nimport namedColors from './namedColors';\n\n/**\n * Validates if a given string is a valid color\n *\n * @param {string} color\n * @returns {boolean}\n */\nexport function isColor(color = ''): boolean {\n if (typeof color !== 'string') {\n return false;\n }\n if (color.charAt(0) === '#') {\n color = color.substring(1); // eslint-disable-line no-param-reassign\n return [3, 4, 6, 8].indexOf(color.length) > -1 && !Number.isNaN(parseInt(color, 16));\n }\n const trimmedColor = color.trim();\n if (rgbColorPattern.test(trimmedColor) || rgbaColorPattern.test(trimmedColor)) {\n return true;\n }\n return namedColors.includes(color.toLowerCase());\n // for future when we want to support rgb | hsl\n // return /^(rgb|hsl)a?\\((\\d+%?(deg|rad|grad|turn)?[,\\s]+){2,3}[\\s\\/]*[\\d\\.]+%?\\)$/i.test(color);\n}\n\n/**\n * Validates if a given array of strings is a valid array of colors\n * @param colors\n * @returns\n */\nexport const isArrayOfColors = (colors: string[]) => Array.isArray(colors) && colors.every(isColor);\n\n/**\n * Sanitizes an array of colors `arr` to replace any non-color values with undefined,\n * or the value of `fallback` if provided.\n *\n * @param arr\n * @param {string} fallback\n * @returns {string[]} sanitized array any non-color values replaced with `fallback`\n */\nexport const sanitizeArrayOfColors = (arr: any[], fallback?: string): string[] => {\n return arr.map(entry => (isColor(entry) ? entry : fallback));\n};\n","/* eslint-disable no-param-reassign */\nimport * as React from 'react';\nimport { isPlainObject } from 'lodash';\nimport { isColor } from './colorUtils';\n\nconst propsKeyValidators = {\n backgroundColor: isColor,\n deltaColor: isColor, // SV react-visualizations & dashboard-visualizations\n trendColor: isColor, // SV visualizations\n fontColor: isColor,\n fillColor: isColor,\n gaugeColor: isColor,\n majorColor: isColor,\n radialBackgroundColor: isColor,\n radialStrokeColor: isColor,\n sparklineFillColor: isColor,\n sparklineStrokeColor: isColor,\n strokeColor: isColor,\n strokeHighlightColor: isColor,\n headerBackgroundColor: isColor,\n rowBackgroundColorOdd: isColor,\n rowBackgroundColorEven: isColor,\n headerTextColor: isColor,\n rowTextColorOdd: isColor,\n rowTextColorEven: isColor,\n color: isColor,\n textColor: isColor,\n defaultFontColor: isColor,\n defaultBlockFontColor: isColor,\n sparklineAreaColor: isColor,\n iconColor: isColor,\n areaColor: isColor,\n nodeColor: isColor,\n nodeHighlightColor: isColor,\n linkColor: isColor,\n nodeTextColor: isColor,\n nodeTextHighlightColor: isColor,\n trellisBackgroundColor: isColor,\n};\n\n/**\n * Validates if a given key value pair are valid\n * based on a set of predefined rules.\n *\n * @param {string} key\n * @param {string} value\n * @returns {boolean}\n */\nfunction isValidProperty(key: string, value: string): boolean {\n const { hasOwnProperty } = Object.prototype;\n return hasOwnProperty.call(propsKeyValidators, key) ? propsKeyValidators[key](value) : true;\n}\n\n/**\n * Validates every property in the key and return\n * only valid keys\n *\n * @export\n * @template T\n * @param {T} props\n * @returns {Partial<T>}\n */\nexport function sanitize<T extends Record<string, any>>(props: T): Partial<T> {\n return Object.keys(props).reduce((accum, key) => {\n if (key === 'options' && isPlainObject(props.options)) {\n accum[key] = sanitize(props.options);\n } else if (isValidProperty(key, props[key])) {\n accum[key] = props[key];\n }\n return accum;\n }, {});\n}\n\n/**\n * Helper HOC which will sanitize invalid props\n *\n * @export\n * @param {React.ComponentType} WrappedComponent\n * @returns {React.ComponentType}\n */\nexport function withSanitizedProps<T>(\n WrappedComponent: React.ComponentType<T>\n): React.ComponentType<Partial<T>> {\n const Wrapper = (props: T) => {\n const sanitizedProps = sanitize(props);\n return <WrappedComponent {...(sanitizedProps as T)} />;\n };\n return Wrapper;\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"lodash\"","webpack:///./src/schemaUtils.js","webpack:///./src/namedColors.ts","webpack:///./src/colorUtils.ts","webpack:///./src/SanitizeProps.tsx"],"names":["$schema","$id","title","definitions","schemaArray","type","minItems","items","$ref","nonNegativeInteger","minimum","nonNegativeIntegerDefault0","allOf","default","simpleTypes","enum","stringArray","uniqueItems","properties","format","$comment","description","readOnly","examples","multipleOf","exclusiveMinimum","maximum","exclusiveMaximum","maxLength","minLength","pattern","additionalItems","anyOf","maxItems","contains","maxProperties","minProperties","required","additionalProperties","patternProperties","propertyNames","dependencies","const","contentMediaType","contentEncoding","if","then","else","oneOf","not","createTestSchema","optionsSchema","TOKEN_NAMESPACE_PREFIX_PATTERN","TOKEN_NAME_CHARS_PATTERN","TOKEN_PATTERN","rgbColorPattern","rgbaColorPattern","colorPattern","colorPatternWithRGBA","COLOR_OR_TOKEN_PATTERN","COLOR_OR_TOKEN_PATTERN_WITH_RGBA","DYNAMIC_OPTIONS_DSL_PATTERN","getPattern"],"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,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C,GAAD,CAAL,GAAa,KAAK,CAAC,GAAD,CAAlB;AACH;;AACD,WAAO,KAAP;AACH,GAPM,EAOJ,EAPI,CAAP;AAQH;;AATD;AAWA;;;;;;AAMG;;AACH,SAAgB,kBAAhB,CACI,gBADJ,EAC4C;AAExC,MAAM,OAAO,GAAG,SAAV,OAAU,CAAC,KAAD,EAAa;AACzB,QAAM,cAAc,GAAG,QAAQ,CAAC,KAAD,CAA/B;AACA,WAAO,oBAAC,gBAAD,EAAiB,kBAAM,cAAN,CAAjB,CAAP;AACH,GAHD;;AAIA,SAAO,OAAP;AACH;;AARD,gD","file":"SanitizeProps.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 = 48);\n","module.exports = require(\"react\");","module.exports = require(\"lodash\");","export default {\n $schema: 'http://json-schema.org/draft-07/schema#',\n $id: 'http://json-schema.org/draft-07/schema#',\n title: 'Core schema meta-schema',\n definitions: {\n schemaArray: {\n type: 'array',\n minItems: 1,\n items: { $ref: '#' },\n },\n nonNegativeInteger: {\n type: 'integer',\n minimum: 0,\n },\n nonNegativeIntegerDefault0: {\n allOf: [{ $ref: '#/definitions/nonNegativeInteger' }, { default: 0 }],\n },\n simpleTypes: {\n enum: ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'],\n },\n stringArray: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n default: [],\n },\n },\n type: ['object', 'boolean'],\n properties: {\n $id: {\n type: 'string',\n format: 'uri-reference',\n },\n $schema: {\n type: 'string',\n format: 'uri',\n },\n $ref: {\n type: 'string',\n format: 'uri-reference',\n },\n $comment: {\n type: 'string',\n },\n title: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n default: true,\n readOnly: {\n type: 'boolean',\n default: false,\n },\n examples: {\n type: 'array',\n items: true,\n },\n multipleOf: {\n type: 'number',\n exclusiveMinimum: 0,\n },\n maximum: {\n type: 'number',\n },\n exclusiveMaximum: {\n type: 'number',\n },\n minimum: {\n type: 'number',\n },\n exclusiveMinimum: {\n type: 'number',\n },\n maxLength: { $ref: '#/definitions/nonNegativeInteger' },\n minLength: { $ref: '#/definitions/nonNegativeIntegerDefault0' },\n pattern: {\n type: 'string',\n format: 'regex',\n },\n additionalItems: { $ref: '#' },\n items: {\n anyOf: [{ $ref: '#' }, { $ref: '#/definitions/schemaArray' }],\n default: true,\n },\n maxItems: { $ref: '#/definitions/nonNegativeInteger' },\n minItems: { $ref: '#/definitions/nonNegativeIntegerDefault0' },\n uniqueItems: {\n type: 'boolean',\n default: false,\n },\n contains: { $ref: '#' },\n maxProperties: { $ref: '#/definitions/nonNegativeInteger' },\n minProperties: { $ref: '#/definitions/nonNegativeIntegerDefault0' },\n required: { $ref: '#/definitions/stringArray' },\n additionalProperties: { $ref: '#' },\n definitions: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n default: {},\n },\n properties: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n default: {},\n },\n patternProperties: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n propertyNames: { format: 'regex' },\n default: {},\n },\n dependencies: {\n type: 'object',\n additionalProperties: {\n anyOf: [{ $ref: '#' }, { $ref: '#/definitions/stringArray' }],\n },\n },\n propertyNames: { $ref: '#' },\n const: true,\n enum: {\n type: 'array',\n items: true,\n minItems: 1,\n uniqueItems: true,\n },\n type: {\n anyOf: [\n { $ref: '#/definitions/simpleTypes' },\n {\n type: 'array',\n items: { $ref: '#/definitions/simpleTypes' },\n minItems: 1,\n uniqueItems: true,\n },\n ],\n },\n format: { type: 'string' },\n contentMediaType: { type: 'string' },\n contentEncoding: { type: 'string' },\n if: { $ref: '#' },\n then: { $ref: '#' },\n else: { $ref: '#' },\n allOf: { $ref: '#/definitions/schemaArray' },\n anyOf: { $ref: '#/definitions/schemaArray' },\n oneOf: { $ref: '#/definitions/schemaArray' },\n not: { $ref: '#' },\n },\n default: true,\n};\n\nexport const createTestSchema = optionsSchema => ({\n $schema: 'http://json-schema.org/draft-07/schema#',\n $id: 'http://www.splunk.com/dashboard.schema.json',\n title: 'Dashboard Definition',\n description: 'Dashboard Definition',\n type: 'object',\n properties: optionsSchema,\n});\n\n// Below 2 regexs are copied from dashboard-framework/packages/dashboard-utils/src/token.jsc\nconst TOKEN_NAMESPACE_PREFIX_PATTERN = /(\\w+:)?/.source;\n// ex: token.name|suh (old-style filter chain)\n// ex: token.name|lower|capitalize (new-style filter chain)\nconst TOKEN_NAME_CHARS_PATTERN = /([^$|:]+?)(\\|[|\\w]+)?/.source;\n\nexport const TOKEN_PATTERN =\n /\\$/.source + TOKEN_NAMESPACE_PREFIX_PATTERN + TOKEN_NAME_CHARS_PATTERN + /\\$/.source;\n// rgb and rgba regexes were derived from:\n// https://stackoverflow.com/questions/9585973/javascript-regular-expression-for-rgb-values/9586150\n// https://github.com/regexhq/rgba-regex\n// NOTE: this will incorrectly accept values like rgb(999,999,999), but may be overkill to specify a regex that limits values to <= 255\nexport const rgbColorPattern = /^rgb\\(\\s*(\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/;\nexport const rgbaColorPattern = /^rgba\\(\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d*(?:\\.\\d+)?)\\)$/;\n// todo: rename this to COLOR_PATTERN and replace all occurences.\nexport const colorPattern = '^#[0-9a-fA-F]{6}$|transparent';\nexport const colorPatternWithRGBA = `${colorPattern}|${rgbColorPattern.source}|${rgbaColorPattern.source}`;\nexport const COLOR_OR_TOKEN_PATTERN = `${colorPattern}|${TOKEN_PATTERN}`;\nexport const COLOR_OR_TOKEN_PATTERN_WITH_RGBA = `${colorPatternWithRGBA}|${TOKEN_PATTERN}`;\n// dynamic option DSL expressions always start with a >\nexport const DYNAMIC_OPTIONS_DSL_PATTERN = /^>.*/.source;\n/**\n * Returns the regex string that matches each passed in value as well as tokens.\n * @param {Array.<string>} values\n * @returns {string}\n */\nexport const getPattern = values =>\n values.reduce((accumulator, value) => `${accumulator}|^${value}$`, TOKEN_PATTERN);\n","// Reference - https://www.w3.org/TR/css-color-4/#named-colors\nexport default [\n 'transparent',\n 'aliceblue',\n 'antiquewhite',\n 'aqua',\n 'aquamarine',\n 'azure',\n 'beige',\n 'bisque',\n 'black',\n 'blanchedalmond',\n 'blue',\n 'blueviolet',\n 'brown',\n 'burlywood',\n 'cadetblue',\n 'chartreuse',\n 'chocolate',\n 'coral',\n 'cornflowerblue',\n 'cornsilk',\n 'crimson',\n 'cyan',\n 'darkblue',\n 'darkcyan',\n 'darkgoldenrod',\n 'darkgray',\n 'darkgreen',\n 'darkgrey',\n 'darkkhaki',\n 'darkmagenta',\n 'darkolivegreen',\n 'darkorange',\n 'darkorchid',\n 'darkred',\n 'darksalmon',\n 'darkseagreen',\n 'darkslateblue',\n 'darkslategray',\n 'darkslategrey',\n 'darkturquoise',\n 'darkviolet',\n 'deeppink',\n 'deepskyblue',\n 'dimgray',\n 'dimgrey',\n 'dodgerblue',\n 'firebrick',\n 'floralwhite',\n 'forestgreen',\n 'fuchsia',\n 'gainsboro',\n 'ghostwhite',\n 'gold',\n 'goldenrod',\n 'gray',\n 'green',\n 'greenyellow',\n 'grey',\n 'honeydew',\n 'hotpink',\n 'indianred',\n 'indigo',\n 'ivory',\n 'khaki',\n 'lavender',\n 'lavenderblush',\n 'lawngreen',\n 'lemonchiffon',\n 'lightblue',\n 'lightcoral',\n 'lightcyan',\n 'lightgoldenrodyellow',\n 'lightgray',\n 'lightgreen',\n 'lightgrey',\n 'lightpink',\n 'lightsalmon',\n 'lightseagreen',\n 'lightskyblue',\n 'lightslategray',\n 'lightslategrey',\n 'lightsteelblue',\n 'lightyellow',\n 'lime',\n 'limegreen',\n 'linen',\n 'magenta',\n 'maroon',\n 'mediumaquamarine',\n 'mediumblue',\n 'mediumorchid',\n 'mediumpurple',\n 'mediumseagreen',\n 'mediumslateblue',\n 'mediumspringgreen',\n 'mediumturquoise',\n 'mediumvioletred',\n 'midnightblue',\n 'mintcream',\n 'mistyrose',\n 'moccasin',\n 'navajowhite',\n 'navy',\n 'oldlace',\n 'olive',\n 'olivedrab',\n 'orange',\n 'orangered',\n 'orchid',\n 'palegoldenrod',\n 'palegreen',\n 'paleturquoise',\n 'palevioletred',\n 'papayawhip',\n 'peachpuff',\n 'peru',\n 'pink',\n 'plum',\n 'powderblue',\n 'purple',\n 'rebeccapurple',\n 'red',\n 'rosybrown',\n 'royalblue',\n 'saddlebrown',\n 'salmon',\n 'sandybrown',\n 'seagreen',\n 'seashell',\n 'sienna',\n 'silver',\n 'skyblue',\n 'slateblue',\n 'slategray',\n 'slategrey',\n 'snow',\n 'springgreen',\n 'steelblue',\n 'tan',\n 'teal',\n 'thistle',\n 'tomato',\n 'turquoise',\n 'violet',\n 'wheat',\n 'white',\n 'whitesmoke',\n 'yellow',\n 'yellowgreen',\n];\n","import { rgbColorPattern, rgbaColorPattern } from './schemaUtils';\nimport namedColors from './namedColors';\n\n/**\n * Validates if a given string is a valid color\n *\n * @param {string} color\n * @returns {boolean}\n */\nexport function isColor(color = ''): boolean {\n if (typeof color !== 'string') {\n return false;\n }\n if (color.charAt(0) === '#') {\n color = color.substring(1); // eslint-disable-line no-param-reassign\n return [3, 4, 6, 8].indexOf(color.length) > -1 && !Number.isNaN(parseInt(color, 16));\n }\n const trimmedColor = color.trim();\n if (rgbColorPattern.test(trimmedColor) || rgbaColorPattern.test(trimmedColor)) {\n return true;\n }\n return namedColors.includes(color.toLowerCase());\n // for future when we want to support rgb | hsl\n // return /^(rgb|hsl)a?\\((\\d+%?(deg|rad|grad|turn)?[,\\s]+){2,3}[\\s\\/]*[\\d\\.]+%?\\)$/i.test(color);\n}\n\n/**\n * Validates if a given array of strings is a valid array of colors\n * @param colors\n * @returns\n */\nexport const isArrayOfColors = (colors: string[]) => Array.isArray(colors) && colors.every(isColor);\n\n/**\n * Sanitizes an array of colors `arr` to replace any non-color values with undefined,\n * or the value of `fallback` if provided.\n *\n * @param arr\n * @param {string} fallback\n * @returns {string[]} sanitized array any non-color values replaced with `fallback`\n */\nexport const sanitizeArrayOfColors = (arr: any[], fallback?: string): string[] => {\n return arr.map(entry => (isColor(entry) ? entry : fallback));\n};\n","/* eslint-disable no-param-reassign */\nimport * as React from 'react';\nimport { isPlainObject } from 'lodash';\nimport { isColor } from './colorUtils';\n\nconst propsKeyValidators = {\n backgroundColor: isColor,\n deltaColor: isColor, // SV react-visualizations & dashboard-visualizations\n trendColor: isColor, // SV visualizations\n fontColor: isColor,\n fillColor: isColor,\n gaugeColor: isColor,\n majorColor: isColor,\n radialBackgroundColor: isColor,\n radialStrokeColor: isColor,\n sparklineFillColor: isColor,\n sparklineStrokeColor: isColor,\n strokeColor: isColor,\n strokeHighlightColor: isColor,\n headerBackgroundColor: isColor,\n rowBackgroundColorOdd: isColor,\n rowBackgroundColorEven: isColor,\n headerTextColor: isColor,\n rowTextColorOdd: isColor,\n rowTextColorEven: isColor,\n color: isColor,\n textColor: isColor,\n defaultFontColor: isColor,\n defaultBlockFontColor: isColor,\n sparklineAreaColor: isColor,\n iconColor: isColor,\n areaColor: isColor,\n nodeColor: isColor,\n nodeHighlightColor: isColor,\n linkColor: isColor,\n nodeTextColor: isColor,\n nodeTextHighlightColor: isColor,\n trellisBackgroundColor: isColor,\n};\n\n/**\n * Validates if a given key value pair are valid\n * based on a set of predefined rules.\n *\n * @param {string} key\n * @param {string} value\n * @returns {boolean}\n */\nfunction isValidProperty(key: string, value: string): boolean {\n const { hasOwnProperty } = Object.prototype;\n return hasOwnProperty.call(propsKeyValidators, key) ? propsKeyValidators[key](value) : true;\n}\n\n/**\n * Validates every property in the key and return\n * only valid keys\n *\n * @export\n * @template T\n * @param {T} props\n * @returns {Partial<T>}\n */\nexport function sanitize<T extends Record<string, any>>(props: T): Partial<T> {\n return Object.keys(props).reduce((accum, key) => {\n if (key === 'options' && isPlainObject(props.options)) {\n accum[key] = sanitize(props.options);\n } else if (isValidProperty(key, props[key])) {\n accum[key] = props[key];\n }\n return accum;\n }, {});\n}\n\n/**\n * Helper HOC which will sanitize invalid props\n *\n * @export\n * @param {React.ComponentType} WrappedComponent\n * @returns {React.ComponentType}\n */\nexport function withSanitizedProps<T>(\n WrappedComponent: React.ComponentType<T>\n): React.ComponentType<Partial<T>> {\n const Wrapper = (props: T) => {\n const sanitizedProps = sanitize(props);\n return <WrappedComponent {...(sanitizedProps as T)} />;\n };\n return Wrapper;\n}\n"],"sourceRoot":""}
|
package/SizeAwareWrapper.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Splunk Inc.
|
|
3
3
|
* SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
|
|
4
4
|
* in part without a valid written license from Splunk Inc. is PROHIBITED.
|
|
5
5
|
*/
|
|
@@ -157,24 +157,31 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
157
157
|
|
|
158
158
|
|
|
159
159
|
|
|
160
|
+
|
|
160
161
|
function _createSuper(Derived) {
|
|
161
162
|
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
163
|
+
|
|
162
164
|
return function _createSuperInternal() {
|
|
163
165
|
var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived),
|
|
164
|
-
|
|
166
|
+
result;
|
|
167
|
+
|
|
165
168
|
if (hasNativeReflectConstruct) {
|
|
166
169
|
var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor;
|
|
170
|
+
|
|
167
171
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
168
172
|
} else {
|
|
169
173
|
result = Super.apply(this, arguments);
|
|
170
174
|
}
|
|
175
|
+
|
|
171
176
|
return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result);
|
|
172
177
|
};
|
|
173
178
|
}
|
|
179
|
+
|
|
174
180
|
function _isNativeReflectConstruct() {
|
|
175
181
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
176
182
|
if (Reflect.construct.sham) return false;
|
|
177
183
|
if (typeof Proxy === "function") return true;
|
|
184
|
+
|
|
178
185
|
try {
|
|
179
186
|
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
180
187
|
return true;
|
|
@@ -184,6 +191,7 @@ function _isNativeReflectConstruct() {
|
|
|
184
191
|
}
|
|
185
192
|
|
|
186
193
|
|
|
194
|
+
|
|
187
195
|
var styles = {
|
|
188
196
|
position: 'absolute',
|
|
189
197
|
width: 0,
|
|
@@ -191,23 +199,31 @@ var styles = {
|
|
|
191
199
|
visibility: 'hidden',
|
|
192
200
|
display: 'none'
|
|
193
201
|
};
|
|
202
|
+
|
|
194
203
|
var SizeAwareWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
195
204
|
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(SizeAwareWrapper, _PureComponent);
|
|
205
|
+
|
|
196
206
|
var _super = _createSuper(SizeAwareWrapper);
|
|
207
|
+
|
|
197
208
|
function SizeAwareWrapper(props) {
|
|
198
209
|
var _this;
|
|
210
|
+
|
|
199
211
|
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, SizeAwareWrapper);
|
|
212
|
+
|
|
200
213
|
_this = _super.call(this, props);
|
|
214
|
+
|
|
201
215
|
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "getElement", function () {
|
|
202
216
|
// it listens on the size of its parent elemnt
|
|
203
217
|
var parentElement = _this.el && _this.el.parentElement;
|
|
204
218
|
return parentElement;
|
|
205
219
|
});
|
|
220
|
+
|
|
206
221
|
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "handleResize", function (entries) {
|
|
207
222
|
entries.forEach(function (entry) {
|
|
208
223
|
var _entry$contentRect = entry.contentRect,
|
|
209
|
-
|
|
210
|
-
|
|
224
|
+
width = _entry$contentRect.width,
|
|
225
|
+
height = _entry$contentRect.height; // use requestAnimationFrame to make sure width/height is updated in time
|
|
226
|
+
|
|
211
227
|
_this.animationFrameID = window.requestAnimationFrame(function () {
|
|
212
228
|
_this.setState({
|
|
213
229
|
width: width,
|
|
@@ -216,20 +232,24 @@ var SizeAwareWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
216
232
|
});
|
|
217
233
|
});
|
|
218
234
|
});
|
|
235
|
+
|
|
219
236
|
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "renderChildren", function () {
|
|
220
237
|
// expect children to be a function
|
|
221
238
|
var _this$state = _this.state,
|
|
222
|
-
|
|
223
|
-
|
|
239
|
+
width = _this$state.width,
|
|
240
|
+
height = _this$state.height;
|
|
224
241
|
var children = _this.props.children;
|
|
242
|
+
|
|
225
243
|
if (width != null && height != null && typeof children === 'function') {
|
|
226
244
|
return children({
|
|
227
245
|
width: width,
|
|
228
246
|
height: height
|
|
229
247
|
});
|
|
230
248
|
}
|
|
249
|
+
|
|
231
250
|
return null;
|
|
232
251
|
});
|
|
252
|
+
|
|
233
253
|
_this.state = {
|
|
234
254
|
width: null,
|
|
235
255
|
height: null
|
|
@@ -238,10 +258,12 @@ var SizeAwareWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
238
258
|
_this.ro = _this.getResizeObserver();
|
|
239
259
|
return _this;
|
|
240
260
|
}
|
|
261
|
+
|
|
241
262
|
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(SizeAwareWrapper, [{
|
|
242
263
|
key: "componentDidMount",
|
|
243
264
|
value: function componentDidMount() {
|
|
244
265
|
var resizableElement = this.getElement();
|
|
266
|
+
|
|
245
267
|
if (resizableElement) {
|
|
246
268
|
this.ro.observe(resizableElement);
|
|
247
269
|
}
|
|
@@ -250,9 +272,11 @@ var SizeAwareWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
250
272
|
key: "componentWillUnmount",
|
|
251
273
|
value: function componentWillUnmount() {
|
|
252
274
|
var resizableElement = this.getElement();
|
|
275
|
+
|
|
253
276
|
if (resizableElement) {
|
|
254
277
|
this.ro.unobserve(resizableElement);
|
|
255
278
|
}
|
|
279
|
+
|
|
256
280
|
if (window && this.animationFrameID) {
|
|
257
281
|
window.cancelAnimationFrame(this.animationFrameID);
|
|
258
282
|
}
|
|
@@ -266,12 +290,14 @@ var SizeAwareWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
266
290
|
unobserve: function unobserve() {}
|
|
267
291
|
};
|
|
268
292
|
}
|
|
293
|
+
|
|
269
294
|
return new ResizeObserver(this.handleResize);
|
|
270
295
|
}
|
|
271
296
|
}, {
|
|
272
297
|
key: "render",
|
|
273
298
|
value: function render() {
|
|
274
299
|
var _this2 = this;
|
|
300
|
+
|
|
275
301
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_7___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", {
|
|
276
302
|
key: "resize-detector",
|
|
277
303
|
style: styles,
|
|
@@ -281,12 +307,14 @@ var SizeAwareWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
281
307
|
}), this.renderChildren());
|
|
282
308
|
}
|
|
283
309
|
}]);
|
|
310
|
+
|
|
284
311
|
return SizeAwareWrapper;
|
|
285
312
|
}(react__WEBPACK_IMPORTED_MODULE_7__["PureComponent"]);
|
|
313
|
+
|
|
286
314
|
SizeAwareWrapper.propTypes = {
|
|
287
315
|
children: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.any // eslint-disable-line react/forbid-prop-types
|
|
288
|
-
};
|
|
289
316
|
|
|
317
|
+
};
|
|
290
318
|
SizeAwareWrapper.defaultProps = {
|
|
291
319
|
children: null
|
|
292
320
|
};
|
package/SizeAwareWrapper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///external \"@babel/runtime/helpers/assertThisInitialized\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///./src/SizeAwareWrapper.jsx","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\""],"names":["styles","position","width","height","visibility","display","SizeAwareWrapper","_PureComponent","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","_defineProperty","_assertThisInitialized","parentElement","el","entries","forEach","entry","_entry$contentRect","contentRect","animationFrameID","window","requestAnimationFrame","setState","_this$state","state","children","ro","getResizeObserver","_createClass","key","value","componentDidMount","resizableElement","getElement","observe","componentWillUnmount","unobserve","cancelAnimationFrame","ResizeObserver","handleResize","render","_this2","React","createElement","Fragment","style","ref","renderChildren","PureComponent","propTypes","T","any","defaultProps"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;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,CAAC;;AAEDlD,gBAAgB,CAACmD,YAAY,GAAG;EAC5B3B,QAAQ,EAAE;AACd,CAAC;AAEcxB,+EAAgB,E;;;;;;;ACnG/B,kE;;;;;;;ACAA,+D;;;;;;;ACAA,4D;;;;;;;ACAA,6E","file":"SizeAwareWrapper.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 = 49);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"@babel/runtime/helpers/assertThisInitialized\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","import React, { PureComponent } from 'react';\nimport T from 'prop-types';\n\nconst styles = {\n position: 'absolute',\n width: 0,\n height: 0,\n visibility: 'hidden',\n display: 'none',\n};\n\nclass SizeAwareWrapper extends PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n width: null,\n height: null,\n };\n this.animationFrameID = null;\n this.ro = this.getResizeObserver();\n }\n\n componentDidMount() {\n const resizableElement = this.getElement();\n if (resizableElement) {\n this.ro.observe(resizableElement);\n }\n }\n\n componentWillUnmount() {\n const resizableElement = this.getElement();\n if (resizableElement) {\n this.ro.unobserve(resizableElement);\n }\n if (window && this.animationFrameID) {\n window.cancelAnimationFrame(this.animationFrameID);\n }\n }\n\n getElement = () => {\n // it listens on the size of its parent elemnt\n const parentElement = this.el && this.el.parentElement;\n return parentElement;\n };\n\n getResizeObserver() {\n if (typeof ResizeObserver !== 'function') {\n return {\n observe() {},\n unobserve() {},\n };\n }\n return new ResizeObserver(this.handleResize);\n }\n\n handleResize = entries => {\n entries.forEach(entry => {\n const { width, height } = entry.contentRect;\n // use requestAnimationFrame to make sure width/height is updated in time\n this.animationFrameID = window.requestAnimationFrame(() => {\n this.setState({ width, height });\n });\n });\n };\n\n renderChildren = () => {\n // expect children to be a function\n const { width, height } = this.state;\n const { children } = this.props;\n if (width != null && height != null && typeof children === 'function') {\n return children({ width, height });\n }\n return null;\n };\n\n render() {\n return (\n <React.Fragment>\n <div\n key=\"resize-detector\"\n style={styles}\n ref={el => {\n this.el = el;\n }}\n />\n {this.renderChildren()}\n </React.Fragment>\n );\n }\n}\n\nSizeAwareWrapper.propTypes = {\n children: T.any, // eslint-disable-line react/forbid-prop-types\n};\n\nSizeAwareWrapper.defaultProps = {\n children: null,\n};\n\nexport default SizeAwareWrapper;\n","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///external \"@babel/runtime/helpers/assertThisInitialized\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///./src/SizeAwareWrapper.jsx","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\""],"names":["styles","position","width","height","visibility","display","SizeAwareWrapper","parentElement","entries","entry","children","resizableElement","window","observe","unobserve","PureComponent","T"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QAC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edModules = {};\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 = 49);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"@babel/runtime/helpers/assertThisInitialized\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","import React, { PureComponent } from 'react';\nimport T from 'prop-types';\n\nconst styles = {\n position: 'absolute',\n width: 0,\n height: 0,\n visibility: 'hidden',\n display: 'none',\n};\n\nclass SizeAwareWrapper extends PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n width: null,\n height: null,\n };\n this.animationFrameID = null;\n this.ro = this.getResizeObserver();\n }\n\n componentDidMount() {\n const resizableElement = this.getElement();\n if (resizableElement) {\n this.ro.observe(resizableElement);\n }\n }\n\n componentWillUnmount() {\n const resizableElement = this.getElement();\n if (resizableElement) {\n this.ro.unobserve(resizableElement);\n }\n if (window && this.animationFrameID) {\n window.cancelAnimationFrame(this.animationFrameID);\n }\n }\n\n getElement = () => {\n // it listens on the size of its parent elemnt\n const parentElement = this.el && this.el.parentElement;\n return parentElement;\n };\n\n getResizeObserver() {\n if (typeof ResizeObserver !== 'function') {\n return {\n observe() {},\n unobserve() {},\n };\n }\n return new ResizeObserver(this.handleResize);\n }\n\n handleResize = entries => {\n entries.forEach(entry => {\n const { width, height } = entry.contentRect;\n // use requestAnimationFrame to make sure width/height is updated in time\n this.animationFrameID = window.requestAnimationFrame(() => {\n this.setState({ width, height });\n });\n });\n };\n\n renderChildren = () => {\n // expect children to be a function\n const { width, height } = this.state;\n const { children } = this.props;\n if (width != null && height != null && typeof children === 'function') {\n return children({ width, height });\n }\n return null;\n };\n\n render() {\n return (\n <React.Fragment>\n <div\n key=\"resize-detector\"\n style={styles}\n ref={el => {\n this.el = el;\n }}\n />\n {this.renderChildren()}\n </React.Fragment>\n );\n }\n}\n\nSizeAwareWrapper.propTypes = {\n children: T.any, // eslint-disable-line react/forbid-prop-types\n};\n\nSizeAwareWrapper.defaultProps = {\n children: null,\n};\n\nexport default SizeAwareWrapper;\n","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");"],"sourceRoot":""}
|
package/VisualizationDocPage.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Splunk Inc.
|
|
3
3
|
* SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
|
|
4
4
|
* in part without a valid written license from Splunk Inc. is PROHIBITED.
|
|
5
5
|
*/
|
|
@@ -210,24 +210,31 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
210
210
|
|
|
211
211
|
|
|
212
212
|
|
|
213
|
+
|
|
213
214
|
function _createSuper(Derived) {
|
|
214
215
|
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
216
|
+
|
|
215
217
|
return function _createSuperInternal() {
|
|
216
218
|
var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(Derived),
|
|
217
|
-
|
|
219
|
+
result;
|
|
220
|
+
|
|
218
221
|
if (hasNativeReflectConstruct) {
|
|
219
222
|
var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(this).constructor;
|
|
223
|
+
|
|
220
224
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
221
225
|
} else {
|
|
222
226
|
result = Super.apply(this, arguments);
|
|
223
227
|
}
|
|
228
|
+
|
|
224
229
|
return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, result);
|
|
225
230
|
};
|
|
226
231
|
}
|
|
232
|
+
|
|
227
233
|
function _isNativeReflectConstruct() {
|
|
228
234
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
229
235
|
if (Reflect.construct.sham) return false;
|
|
230
236
|
if (typeof Proxy === "function") return true;
|
|
237
|
+
|
|
231
238
|
try {
|
|
232
239
|
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
233
240
|
return true;
|
|
@@ -241,66 +248,87 @@ function _isNativeReflectConstruct() {
|
|
|
241
248
|
|
|
242
249
|
|
|
243
250
|
|
|
251
|
+
|
|
252
|
+
|
|
244
253
|
var ComponentPage = /*#__PURE__*/function (_Component) {
|
|
245
254
|
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(ComponentPage, _Component);
|
|
255
|
+
|
|
246
256
|
var _super = _createSuper(ComponentPage);
|
|
257
|
+
|
|
247
258
|
function ComponentPage() {
|
|
248
259
|
var _this;
|
|
260
|
+
|
|
249
261
|
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComponentPage);
|
|
262
|
+
|
|
250
263
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
251
264
|
args[_key] = arguments[_key];
|
|
252
265
|
}
|
|
266
|
+
|
|
253
267
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
268
|
+
|
|
254
269
|
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), "handleBodyMount", function (el) {
|
|
255
270
|
_this.bodyEl = el;
|
|
256
271
|
});
|
|
272
|
+
|
|
257
273
|
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), "handleSectionChange", function (e, _ref) {
|
|
258
274
|
var selectedTabId = _ref.selectedTabId;
|
|
259
275
|
ComponentPage.currentSection = selectedTabId;
|
|
276
|
+
|
|
260
277
|
_this.setState({
|
|
261
278
|
activeSection: selectedTabId
|
|
262
279
|
}, function () {
|
|
263
280
|
// After the new section loads, scroll to the top of the section.
|
|
264
281
|
var _this$bodyEl$getBound = _this.bodyEl.getBoundingClientRect(),
|
|
265
|
-
|
|
282
|
+
top = _this$bodyEl$getBound.top;
|
|
283
|
+
|
|
266
284
|
if (top < window.scrollY) {
|
|
267
285
|
var target = top + window.scrollY - 90;
|
|
268
286
|
window.scroll(0, target);
|
|
269
287
|
}
|
|
270
288
|
});
|
|
271
289
|
});
|
|
290
|
+
|
|
272
291
|
_this.state = {
|
|
273
292
|
activeSection: ComponentPage.currentSection
|
|
274
293
|
};
|
|
275
294
|
return _this;
|
|
276
295
|
}
|
|
296
|
+
|
|
277
297
|
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComponentPage, [{
|
|
278
298
|
key: "renderBody",
|
|
279
299
|
value: function renderBody() {
|
|
280
300
|
var _this$props = this.props,
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
301
|
+
encodingSection = _this$props.encodingSection,
|
|
302
|
+
optionSection = _this$props.optionSection,
|
|
303
|
+
overviewSection = _this$props.overviewSection,
|
|
304
|
+
conceptsSection = _this$props.conceptsSection,
|
|
305
|
+
examplesSection = _this$props.examplesSection,
|
|
306
|
+
eventSection = _this$props.eventSection,
|
|
307
|
+
themeSection = _this$props.themeSection;
|
|
288
308
|
var activeSection = this.state.activeSection;
|
|
309
|
+
|
|
289
310
|
switch (activeSection) {
|
|
290
311
|
case 'concepts':
|
|
291
312
|
return conceptsSection;
|
|
313
|
+
|
|
292
314
|
case 'overview':
|
|
293
315
|
return overviewSection;
|
|
316
|
+
|
|
294
317
|
case 'examples':
|
|
295
318
|
return examplesSection;
|
|
319
|
+
|
|
296
320
|
case 'encoding':
|
|
297
321
|
return encodingSection;
|
|
322
|
+
|
|
298
323
|
case 'option':
|
|
299
324
|
return optionSection;
|
|
325
|
+
|
|
300
326
|
case 'event':
|
|
301
327
|
return eventSection;
|
|
328
|
+
|
|
302
329
|
case 'theme':
|
|
303
330
|
return themeSection;
|
|
331
|
+
|
|
304
332
|
default:
|
|
305
333
|
return null;
|
|
306
334
|
}
|
|
@@ -309,25 +337,29 @@ var ComponentPage = /*#__PURE__*/function (_Component) {
|
|
|
309
337
|
key: "render",
|
|
310
338
|
value: function render() {
|
|
311
339
|
var _this$props2 = this.props,
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
340
|
+
createComponentURL = _this$props2.createComponentURL,
|
|
341
|
+
conceptsSection = _this$props2.conceptsSection,
|
|
342
|
+
overviewSection = _this$props2.overviewSection,
|
|
343
|
+
examplesSection = _this$props2.examplesSection,
|
|
344
|
+
encodingSection = _this$props2.encodingSection,
|
|
345
|
+
eventSection = _this$props2.eventSection,
|
|
346
|
+
themeSection = _this$props2.themeSection,
|
|
347
|
+
headerOffset = _this$props2.headerOffset,
|
|
348
|
+
sourceURL = _this$props2.sourceURL;
|
|
321
349
|
var basePageProps = Object(lodash__WEBPACK_IMPORTED_MODULE_10__["pick"])(this.props, 'dependsOnSplunk', 'description', 'title');
|
|
350
|
+
|
|
322
351
|
if (this.props.status === 'preview') {
|
|
323
352
|
basePageProps.description = "#### ".concat(_splunk_visualizations_shared_previewVizMessage__WEBPACK_IMPORTED_MODULE_13___default.a, " \n ").concat(basePageProps.description || '');
|
|
324
353
|
}
|
|
354
|
+
|
|
325
355
|
var activeSection = this.state.activeSection;
|
|
326
356
|
var body = this.renderBody();
|
|
357
|
+
|
|
327
358
|
if (!body) {
|
|
328
359
|
body = examplesSection;
|
|
329
360
|
activeSection = 'examples';
|
|
330
361
|
}
|
|
362
|
+
|
|
331
363
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_docs_API__WEBPACK_IMPORTED_MODULE_12___default.a, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
|
|
332
364
|
sourceURL: sourceURL || createComponentURL(window.location.pathname)
|
|
333
365
|
}, basePageProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_docs_DockingTabBar__WEBPACK_IMPORTED_MODULE_11___default.a, {
|
|
@@ -364,57 +396,71 @@ var ComponentPage = /*#__PURE__*/function (_Component) {
|
|
|
364
396
|
}, body));
|
|
365
397
|
}
|
|
366
398
|
}]);
|
|
399
|
+
|
|
367
400
|
return ComponentPage;
|
|
368
401
|
}(react__WEBPACK_IMPORTED_MODULE_8__["Component"]);
|
|
402
|
+
|
|
369
403
|
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(ComponentPage, "currentSection", 'overview');
|
|
404
|
+
|
|
370
405
|
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(ComponentPage, "propTypes", {
|
|
371
406
|
createComponentURL: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func,
|
|
372
407
|
dependsOnSplunk: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.bool,
|
|
408
|
+
|
|
373
409
|
/**
|
|
374
410
|
* If status is `preview`, a message is prepended to the description reflecting this visualization is new
|
|
375
411
|
* and minor changes may be made soon.
|
|
376
412
|
*/
|
|
377
413
|
status: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string,
|
|
378
414
|
description: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string,
|
|
415
|
+
|
|
379
416
|
/**
|
|
380
417
|
* The "overview" section of the doc page.
|
|
381
418
|
*/
|
|
382
419
|
overviewSection: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.node,
|
|
420
|
+
|
|
383
421
|
/**
|
|
384
422
|
* The "concepts" section of the doc page.
|
|
385
423
|
*/
|
|
386
424
|
conceptsSection: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.node,
|
|
425
|
+
|
|
387
426
|
/**
|
|
388
427
|
* The "examples" section of the doc page.
|
|
389
428
|
*/
|
|
390
429
|
examplesSection: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.node.isRequired,
|
|
430
|
+
|
|
391
431
|
/**
|
|
392
432
|
* The "options" section of the doc page.
|
|
393
433
|
*/
|
|
394
434
|
optionSection: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.node.isRequired,
|
|
435
|
+
|
|
395
436
|
/**
|
|
396
437
|
* The "encoding" section of the doc page.
|
|
397
438
|
*/
|
|
398
439
|
encodingSection: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.node,
|
|
440
|
+
|
|
399
441
|
/**
|
|
400
442
|
* The "event" section of the doc page.
|
|
401
443
|
*/
|
|
402
444
|
eventSection: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.node,
|
|
445
|
+
|
|
403
446
|
/**
|
|
404
447
|
* The "theme" section of the doc page
|
|
405
448
|
*/
|
|
406
449
|
themeSection: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.node,
|
|
407
450
|
headerOffset: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.number,
|
|
451
|
+
|
|
408
452
|
/**
|
|
409
453
|
* Overrides the (otherwise automatically generated) source code url.
|
|
410
454
|
*/
|
|
411
455
|
sourceURL: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string,
|
|
412
456
|
title: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string.isRequired
|
|
413
457
|
});
|
|
458
|
+
|
|
414
459
|
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(ComponentPage, "defaultProps", {
|
|
415
460
|
createComponentURL: function createComponentURL() {},
|
|
416
461
|
headerOffset: 0
|
|
417
462
|
});
|
|
463
|
+
|
|
418
464
|
/* harmony default export */ __webpack_exports__["default"] = (ComponentPage);
|
|
419
465
|
|
|
420
466
|
/***/ }),
|