@splunk/visualizations-shared 25.13.1 → 26.1.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/Downloader.js +66 -11
- package/Downloader.js.map +1 -1
- package/FileDownloader.js +105 -31
- package/FileDownloader.js.map +1 -1
- package/JSONSchemaUtils.js +13 -8
- package/JSONSchemaUtils.js.map +1 -1
- package/Message.js +23 -12
- package/Message.js.map +1 -1
- package/RemoteIcon.js +93 -41
- package/RemoteIcon.js.map +1 -1
- package/RemoteImage.js +51 -16
- package/RemoteImage.js.map +1 -1
- package/SanitizeProps.js +50 -25
- package/SanitizeProps.js.map +1 -1
- package/SizeAwareWrapper.js +47 -19
- package/SizeAwareWrapper.js.map +1 -1
- package/VisualizationDocPage.js +72 -26
- package/VisualizationDocPage.js.map +1 -1
- package/colorConstants.js +2 -2
- package/colorConstants.js.map +1 -1
- package/colorUtils.js +27 -14
- package/colorUtils.js.map +1 -1
- package/configUtils.js +4 -2
- package/configUtils.js.map +1 -1
- package/console.js +14 -2
- package/console.js.map +1 -1
- package/dataSourceUtils.js +12 -3
- package/dataSourceUtils.js.map +1 -1
- package/domUtils.js +2 -2
- package/domUtils.js.map +1 -1
- package/hocUtils.js +29 -15
- package/hocUtils.js.map +1 -1
- package/i18n.js +4 -2
- package/i18n.js.map +1 -1
- package/iconUtils.js +11 -12
- package/iconUtils.js.map +1 -1
- package/mapUtils.js +4 -0
- package/mapUtils.js.map +1 -1
- package/namedColors.js +2 -2
- package/namedColors.js.map +1 -1
- package/numberUtils.js +31 -21
- package/numberUtils.js.map +1 -1
- package/package.json +12 -14
- package/previewVizMessage.js +2 -2
- package/previewVizMessage.js.map +1 -1
- package/propUtils.js +77 -12
- package/propUtils.js.map +1 -1
- package/schemaUtils.js +10 -10
- package/schemaUtils.js.map +1 -1
- package/simpleXMLOptions.js +6 -6
- package/simpleXMLOptions.js.map +1 -1
- package/style.js +11 -6
- package/style.js.map +1 -1
- package/testHelper.js +2 -2
- package/testHelper.js.map +1 -1
- package/themeUtils.js +14 -13
- package/themeUtils.js.map +1 -1
- package/trellisUtils.js +77 -33
- package/trellisUtils.js.map +1 -1
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:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///./src/SizeAwareWrapper.jsx","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;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;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AClB,IAAI,CAACN,EAAE,CAACU,SAAS,CAACJ,gBAAgB,CAAC;MACvC;MACA,IAAIZ,MAAM,IAAI,IAAI,CAACD,gBAAgB,EAAE;QACjCC,MAAM,CAACiB,oBAAoB,CAAC,IAAI,CAAClB,gBAAgB,CAAC;MACtD;IACJ;EAAC;IAAAU,GAAA;IAAAC,KAAA,EAQD,SAAAH,kBAAA,EAAoB;MAChB,IAAI,OAAOW,cAAc,KAAK,UAAU,EAAE;QACtC,OAAO;UACHJ,OAAO,WAAAA,QAAA,EAAG,CAAC,CAAC;UACZE,SAAS,WAAAA,UAAA,EAAG,CAAC;QACjB,CAAC;MACL;MACA,OAAO,IAAIE,cAAc,CAAC,IAAI,CAACC,YAAY,CAAC;IAChD;EAAC;IAAAV,GAAA;IAAAC,KAAA,EAsBD,SAAAU,OAAA,EAAS;MAAA,IAAAC,MAAA;MACL,oBACIC,4CAAA,CAAAC,aAAA,CAACD,4CAAK,CAACE,QAAQ,qBACXF,4CAAA,CAAAC,aAAA;QACId,GAAG,EAAC,iBAAiB;QACrBgB,KAAK,EAAElD,MAAO;QACdmD,GAAG,EAAE,SAAAA,IAAAjC,EAAE,EAAI;UACP4B,MAAI,CAAC5B,EAAE,GAAGA,EAAE;QAChB;MAAE,EACJ,EACD,IAAI,CAACkC,cAAc,EAAE,CACT;IAEzB;EAAC;EAAA,OAAA9C,gBAAA;AAAA,EA7E0B+C,mDAAa;AAgF5C/C,gBAAgB,CAACgD,SAAS,GAAG;EACzBxB,QAAQ,EAAEyB,iDAAC,CAACC,GAAG,CAAE;AACrB,CAAC;;AAEDlD,gBAAgB,CAACmD,YAAY,GAAG;EAC5B3B,QAAQ,EAAE;AACd,CAAC;AAEcxB,+EAAgB,E;;;;;;;ACnG/B,+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 = 50);\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\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","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/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;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,mBA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AAV,iBAAU,EAAV;AAPe;AAQlB;;;;WAED,6BAAoB;AAChB,UAAMQ,gBAAgB,GAAG,KAAzB,UAAyB,EAAzB;;AACA,4BAAsB;AAClB;AACH;AACJ;;;WAED,gCAAuB;AACnB,UAAMA,gBAAgB,GAAG,KAAzB,UAAyB,EAAzB;;AACA,4BAAsB;AAClB;AACH;;AACD,UAAIC,MAAM,IAAI,KAAd,kBAAqC;AACjCA,cAAM,CAANA,qBAA4B,KAA5BA;AACH;AACJ;;;WAQD,6BAAoB;AAChB,UAAI,0BAAJ,YAA0C;AACtC,eAAO;AACHC,iBADG,qBACO,CADP;AAEHC,mBAFG,uBAES,CAAE;AAFX,SAAP;AAIH;;AACD,aAAO,mBAAmB,KAA1B,YAAO,CAAP;AACH;;;WAsBD,kBAAS;AAAA;;AACL,0BACI,2DAAC,4CAAD,8BACI;AACI,WAAG,EADP;AAEI,aAAK,EAFT;AAGI,WAAG,EAAE,iBAAM;AACP,gBAAI,CAAJ;AACH;AALL,QADJ,EAQK,KATT,cASS,EARL,CADJ;AAYH;;;;EA7E0BC,mD;;AAgF/BT,gBAAgB,CAAhBA,YAA6B;AACzBI,UAAQ,EAAEM,iDAAC,CADc,IACR;;AADQ,CAA7BV;AAIAA,gBAAgB,CAAhBA,eAAgC;AAC5BI,UAAQ,EAAE;AADkB,CAAhCJ;AAIA,iF;;;;;;;ACnGA,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":""}
|
package/VisualizationDocPage.js
CHANGED
|
@@ -87,7 +87,7 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 50);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -123,14 +123,14 @@ module.exports = require("@babel/runtime/helpers/assertThisInitialized");
|
|
|
123
123
|
/***/ 2:
|
|
124
124
|
/***/ (function(module, exports) {
|
|
125
125
|
|
|
126
|
-
module.exports = require("
|
|
126
|
+
module.exports = require("lodash");
|
|
127
127
|
|
|
128
128
|
/***/ }),
|
|
129
129
|
|
|
130
130
|
/***/ 3:
|
|
131
131
|
/***/ (function(module, exports) {
|
|
132
132
|
|
|
133
|
-
module.exports = require("@babel/runtime/helpers/
|
|
133
|
+
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
134
134
|
|
|
135
135
|
/***/ }),
|
|
136
136
|
|
|
@@ -158,7 +158,7 @@ module.exports = require("@splunk/visualizations-shared/previewVizMessage");
|
|
|
158
158
|
/***/ 4:
|
|
159
159
|
/***/ (function(module, exports) {
|
|
160
160
|
|
|
161
|
-
module.exports = require("
|
|
161
|
+
module.exports = require("@babel/runtime/helpers/getPrototypeOf");
|
|
162
162
|
|
|
163
163
|
/***/ }),
|
|
164
164
|
|
|
@@ -169,7 +169,7 @@ module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
|
169
169
|
|
|
170
170
|
/***/ }),
|
|
171
171
|
|
|
172
|
-
/***/
|
|
172
|
+
/***/ 50:
|
|
173
173
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
174
174
|
|
|
175
175
|
"use strict";
|
|
@@ -186,15 +186,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
186
186
|
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);
|
|
187
187
|
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9);
|
|
188
188
|
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);
|
|
189
|
-
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
189
|
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4);
|
|
190
190
|
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);
|
|
191
|
-
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
191
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3);
|
|
192
192
|
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);
|
|
193
193
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
|
|
194
194
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__);
|
|
195
195
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(0);
|
|
196
196
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_9__);
|
|
197
|
-
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
|
|
197
|
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2);
|
|
198
198
|
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__);
|
|
199
199
|
/* harmony import */ var _splunk_react_docs_DockingTabBar__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(15);
|
|
200
200
|
/* harmony import */ var _splunk_react_docs_DockingTabBar__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_docs_DockingTabBar__WEBPACK_IMPORTED_MODULE_11__);
|
|
@@ -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
|
/***/ }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///external \"@splunk/react-docs/DockingTabBar\"","webpack:///external \"@babel/runtime/helpers/assertThisInitialized\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///external \"@splunk/react-docs/API\"","webpack:///external \"@splunk/visualizations-shared/previewVizMessage\"","webpack:///external \"lodash\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///./src/VisualizationDocPage.jsx","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\""],"names":["ComponentPage","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","el","bodyEl","e","_ref","selectedTabId","currentSection","setState","activeSection","_this$bodyEl$getBound","getBoundingClientRect","top","window","scrollY","target","scroll","state","_createClass","key","value","renderBody","_this$props","props","encodingSection","optionSection","overviewSection","conceptsSection","examplesSection","eventSection","themeSection","render","_this$props2","createComponentURL","headerOffset","sourceURL","basePageProps","pick","status","description","previewVizMessage","body","React","createElement","APIPage","_extends","location","pathname","DockingTabBar","activeTabId","offset","onChange","handleSectionChange","Tab","label","tabId","style","padding","marginTop","ref","handleBodyMount","Component","T","func","dependsOnSplunk","bool","string","node","isRequired","number","title"],"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","file":"VisualizationDocPage.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 51);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"@splunk/react-docs/DockingTabBar\");","module.exports = require(\"@babel/runtime/helpers/assertThisInitialized\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@splunk/react-docs/API\");","module.exports = require(\"@splunk/visualizations-shared/previewVizMessage\");","module.exports = require(\"lodash\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","import React, { Component } from 'react';\nimport T from 'prop-types';\nimport { pick } from 'lodash';\nimport DockingTabBar, { Tab } from '@splunk/react-docs/DockingTabBar';\nimport APIPage from '@splunk/react-docs/API';\nimport previewVizMessage from '@splunk/visualizations-shared/previewVizMessage';\n\nclass ComponentPage extends Component {\n static currentSection = 'overview';\n\n static propTypes = {\n createComponentURL: T.func,\n dependsOnSplunk: T.bool,\n /**\n * If status is `preview`, a message is prepended to the description reflecting this visualization is new\n * and minor changes may be made soon.\n */\n status: T.string,\n description: T.string,\n /**\n * The \"overview\" section of the doc page.\n */\n overviewSection: T.node,\n /**\n * The \"concepts\" section of the doc page.\n */\n conceptsSection: T.node,\n /**\n * The \"examples\" section of the doc page.\n */\n examplesSection: T.node.isRequired,\n /**\n * The \"options\" section of the doc page.\n */\n optionSection: T.node.isRequired,\n /**\n * The \"encoding\" section of the doc page.\n */\n encodingSection: T.node,\n /**\n * The \"event\" section of the doc page.\n */\n eventSection: T.node,\n /**\n * The \"theme\" section of the doc page\n */\n themeSection: T.node,\n headerOffset: T.number,\n /**\n * Overrides the (otherwise automatically generated) source code url.\n */\n sourceURL: T.string,\n title: T.string.isRequired,\n };\n\n static defaultProps = {\n createComponentURL() {},\n headerOffset: 0,\n };\n\n constructor(...args) {\n super(...args);\n this.state = { activeSection: ComponentPage.currentSection };\n }\n\n handleBodyMount = el => {\n this.bodyEl = el;\n };\n\n handleSectionChange = (e, { selectedTabId }) => {\n ComponentPage.currentSection = selectedTabId;\n this.setState({ activeSection: selectedTabId }, () => {\n // After the new section loads, scroll to the top of the section.\n const { top } = this.bodyEl.getBoundingClientRect();\n if (top < window.scrollY) {\n const target = top + window.scrollY - 90;\n window.scroll(0, target);\n }\n });\n };\n\n renderBody() {\n const {\n encodingSection,\n optionSection,\n overviewSection,\n conceptsSection,\n examplesSection,\n eventSection,\n themeSection,\n } = this.props;\n const { activeSection } = this.state;\n switch (activeSection) {\n case 'concepts':\n return conceptsSection;\n case 'overview':\n return overviewSection;\n case 'examples':\n return examplesSection;\n case 'encoding':\n return encodingSection;\n case 'option':\n return optionSection;\n case 'event':\n return eventSection;\n case 'theme':\n return themeSection;\n default:\n return null;\n }\n }\n\n render() {\n const {\n createComponentURL,\n conceptsSection,\n overviewSection,\n examplesSection,\n encodingSection,\n eventSection,\n themeSection,\n headerOffset,\n sourceURL,\n } = this.props;\n const basePageProps = pick(this.props, 'dependsOnSplunk', 'description', 'title');\n\n if (this.props.status === 'preview') {\n basePageProps.description = `#### ${previewVizMessage} \\n ${basePageProps.description || ''}`;\n }\n\n let { activeSection } = this.state;\n let body = this.renderBody();\n\n if (!body) {\n body = examplesSection;\n activeSection = 'examples';\n }\n return (\n <APIPage sourceURL={sourceURL || createComponentURL(window.location.pathname)} {...basePageProps}>\n <DockingTabBar\n activeTabId={activeSection}\n offset={headerOffset}\n onChange={this.handleSectionChange}\n >\n {overviewSection && <Tab label=\"Overview\" tabId=\"overview\" />}\n <Tab label=\"Examples\" tabId=\"examples\" />\n {encodingSection && <Tab label=\"Encoding\" tabId=\"encoding\" />}\n <Tab label=\"Options\" tabId=\"option\" />\n {eventSection && <Tab label=\"Events\" tabId=\"event\" />}\n {themeSection && <Tab label=\"Themes\" tabId=\"theme\" />}\n {conceptsSection && <Tab label=\"Concepts\" tabId=\"concepts\" />}\n </DockingTabBar>\n <div\n style={{\n padding: '0 30px 30px',\n marginTop: '20px',\n }}\n ref={this.handleBodyMount}\n >\n {body}\n </div>\n </APIPage>\n );\n }\n}\n\nexport default ComponentPage;\n","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 \"@splunk/react-docs/DockingTabBar\"","webpack:///external \"@babel/runtime/helpers/assertThisInitialized\"","webpack:///external \"lodash\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///external \"@splunk/react-docs/API\"","webpack:///external \"@splunk/visualizations-shared/previewVizMessage\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///./src/VisualizationDocPage.jsx","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\""],"names":["ComponentPage","args","selectedTabId","activeSection","top","window","target","currentSection","encodingSection","optionSection","overviewSection","conceptsSection","examplesSection","eventSection","themeSection","createComponentURL","headerOffset","sourceURL","basePageProps","pick","body","handleSectionChange","padding","marginTop","handleBodyMount","Component","T","dependsOnSplunk","status","description","title","isRequired"],"mappings":";;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ES,iDAAC,CAzCG;AA0CfI,OAAK,EAAEJ,iDAAC,CAADA,OAASK;AA1CD,C;;6EAHjB/B,a,kBAgDoB;AAClBe,oBADkB,gCACG,CADH;AAElBC,cAAY,EAAE;AAFI,C;;AA+G1B,8E;;;;;;;ACtKA,+D;;;;;;;ACAA,4D;;;;;;;ACAA,6E","file":"VisualizationDocPage.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 = 50);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"@splunk/react-docs/DockingTabBar\");","module.exports = require(\"@babel/runtime/helpers/assertThisInitialized\");","module.exports = require(\"lodash\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@splunk/react-docs/API\");","module.exports = require(\"@splunk/visualizations-shared/previewVizMessage\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","import React, { Component } from 'react';\nimport T from 'prop-types';\nimport { pick } from 'lodash';\nimport DockingTabBar, { Tab } from '@splunk/react-docs/DockingTabBar';\nimport APIPage from '@splunk/react-docs/API';\nimport previewVizMessage from '@splunk/visualizations-shared/previewVizMessage';\n\nclass ComponentPage extends Component {\n static currentSection = 'overview';\n\n static propTypes = {\n createComponentURL: T.func,\n dependsOnSplunk: T.bool,\n /**\n * If status is `preview`, a message is prepended to the description reflecting this visualization is new\n * and minor changes may be made soon.\n */\n status: T.string,\n description: T.string,\n /**\n * The \"overview\" section of the doc page.\n */\n overviewSection: T.node,\n /**\n * The \"concepts\" section of the doc page.\n */\n conceptsSection: T.node,\n /**\n * The \"examples\" section of the doc page.\n */\n examplesSection: T.node.isRequired,\n /**\n * The \"options\" section of the doc page.\n */\n optionSection: T.node.isRequired,\n /**\n * The \"encoding\" section of the doc page.\n */\n encodingSection: T.node,\n /**\n * The \"event\" section of the doc page.\n */\n eventSection: T.node,\n /**\n * The \"theme\" section of the doc page\n */\n themeSection: T.node,\n headerOffset: T.number,\n /**\n * Overrides the (otherwise automatically generated) source code url.\n */\n sourceURL: T.string,\n title: T.string.isRequired,\n };\n\n static defaultProps = {\n createComponentURL() {},\n headerOffset: 0,\n };\n\n constructor(...args) {\n super(...args);\n this.state = { activeSection: ComponentPage.currentSection };\n }\n\n handleBodyMount = el => {\n this.bodyEl = el;\n };\n\n handleSectionChange = (e, { selectedTabId }) => {\n ComponentPage.currentSection = selectedTabId;\n this.setState({ activeSection: selectedTabId }, () => {\n // After the new section loads, scroll to the top of the section.\n const { top } = this.bodyEl.getBoundingClientRect();\n if (top < window.scrollY) {\n const target = top + window.scrollY - 90;\n window.scroll(0, target);\n }\n });\n };\n\n renderBody() {\n const {\n encodingSection,\n optionSection,\n overviewSection,\n conceptsSection,\n examplesSection,\n eventSection,\n themeSection,\n } = this.props;\n const { activeSection } = this.state;\n switch (activeSection) {\n case 'concepts':\n return conceptsSection;\n case 'overview':\n return overviewSection;\n case 'examples':\n return examplesSection;\n case 'encoding':\n return encodingSection;\n case 'option':\n return optionSection;\n case 'event':\n return eventSection;\n case 'theme':\n return themeSection;\n default:\n return null;\n }\n }\n\n render() {\n const {\n createComponentURL,\n conceptsSection,\n overviewSection,\n examplesSection,\n encodingSection,\n eventSection,\n themeSection,\n headerOffset,\n sourceURL,\n } = this.props;\n const basePageProps = pick(this.props, 'dependsOnSplunk', 'description', 'title');\n\n if (this.props.status === 'preview') {\n basePageProps.description = `#### ${previewVizMessage} \\n ${basePageProps.description || ''}`;\n }\n\n let { activeSection } = this.state;\n let body = this.renderBody();\n\n if (!body) {\n body = examplesSection;\n activeSection = 'examples';\n }\n return (\n <APIPage sourceURL={sourceURL || createComponentURL(window.location.pathname)} {...basePageProps}>\n <DockingTabBar\n activeTabId={activeSection}\n offset={headerOffset}\n onChange={this.handleSectionChange}\n >\n {overviewSection && <Tab label=\"Overview\" tabId=\"overview\" />}\n <Tab label=\"Examples\" tabId=\"examples\" />\n {encodingSection && <Tab label=\"Encoding\" tabId=\"encoding\" />}\n <Tab label=\"Options\" tabId=\"option\" />\n {eventSection && <Tab label=\"Events\" tabId=\"event\" />}\n {themeSection && <Tab label=\"Themes\" tabId=\"theme\" />}\n {conceptsSection && <Tab label=\"Concepts\" tabId=\"concepts\" />}\n </DockingTabBar>\n <div\n style={{\n padding: '0 30px 30px',\n marginTop: '20px',\n }}\n ref={this.handleBodyMount}\n >\n {body}\n </div>\n </APIPage>\n );\n }\n}\n\nexport default ComponentPage;\n","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");"],"sourceRoot":""}
|
package/colorConstants.js
CHANGED
|
@@ -87,7 +87,7 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 51);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -99,7 +99,7 @@ module.exports = require("@splunk/themes/getTheme");
|
|
|
99
99
|
|
|
100
100
|
/***/ }),
|
|
101
101
|
|
|
102
|
-
/***/
|
|
102
|
+
/***/ 51:
|
|
103
103
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
104
104
|
|
|
105
105
|
"use strict";
|
package/colorConstants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/themes/getTheme\"","webpack:///./src/colorConstants.js"],"names":["themeEnterprise","getTheme","family","colorScheme","density","DELTA_GREEN","
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/themes/getTheme\"","webpack:///./src/colorConstants.js"],"names":["themeEnterprise","getTheme","family","colorScheme","density","DELTA_GREEN","DELTA_RED","SEMANTIC_SUCCESS","SEMANTIC_WARNING","SEMANTIC_ERROR","SPARKLINE_FILL_COLOR","SPARKLINE_STROKE_COLOR","SPARKLINE_WHITE","RADIAL_BACKGROUND_COLOR","RADIAL_STROKE_COLOR","RADIAL_SEVERITY_COLORS","none","background","stroke","gray60","low","successColorD50","guarded","infoColorD50","elevated","warningColorD50","high","alertColorD50","severe","errorColorD50","COLOR_EDITOR_PALETTE"],"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,oD;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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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 = 51);\n","module.exports = require(\"@splunk/themes/getTheme\");","import getTheme from '@splunk/themes/getTheme';\n\nconst themeEnterprise = getTheme({ family: 'enterprise', colorScheme: 'light', density: 'comfortable' });\n\nexport const DELTA_GREEN = themeEnterprise.successColor;\nexport const DELTA_RED = themeEnterprise.errorColor;\n\nexport const SEMANTIC_SUCCESS = '#53a051';\nexport const SEMANTIC_WARNING = '#f8be34';\nexport const SEMANTIC_ERROR = '#dc4e41';\n\nexport const SPARKLINE_FILL_COLOR = themeEnterprise.gray60;\nexport const SPARKLINE_STROKE_COLOR = themeEnterprise.gray20;\nexport const SPARKLINE_WHITE = themeEnterprise.white;\n\nexport const RADIAL_BACKGROUND_COLOR = themeEnterprise.gray92;\nexport const RADIAL_STROKE_COLOR = themeEnterprise.gray60;\n\nexport const RADIAL_SEVERITY_COLORS = {\n none: {\n background: themeEnterprise.gray92,\n stroke: themeEnterprise.gray60,\n },\n low: {\n background: themeEnterprise.successColorL40,\n stroke: themeEnterprise.successColorD50,\n },\n guarded: {\n background: themeEnterprise.infoColorL40,\n stroke: themeEnterprise.infoColorD50,\n },\n elevated: {\n background: themeEnterprise.warningColorL40,\n stroke: themeEnterprise.warningColorD50,\n },\n high: {\n background: themeEnterprise.alertColorL40,\n stroke: themeEnterprise.alertColorD50,\n },\n severe: {\n background: themeEnterprise.errorColorL40,\n stroke: themeEnterprise.errorColorD50,\n },\n};\n\nexport const COLOR_EDITOR_PALETTE = [\n 'transparent',\n '#000000',\n '#ffffff',\n '#dc4e41',\n '#f1813f',\n '#f8be34',\n '#53a051',\n '#0877a6',\n '#ec9960',\n '#af575a',\n '#62b3b2',\n '#4fa484',\n '#f8be44',\n '#5a4575',\n '#708794',\n '#294e70',\n '#b6c75a',\n];\n"],"sourceRoot":""}
|
package/colorUtils.js
CHANGED
|
@@ -334,32 +334,32 @@ var createTestSchema = function createTestSchema(optionsSchema) {
|
|
|
334
334
|
type: 'object',
|
|
335
335
|
properties: optionsSchema
|
|
336
336
|
};
|
|
337
|
-
};
|
|
337
|
+
}; // Below 2 regexs are copied from dashboard-framework/packages/dashboard-utils/src/token.jsc
|
|
338
338
|
|
|
339
|
-
|
|
340
|
-
var TOKEN_NAMESPACE_PREFIX_PATTERN = /(\w+:)?/.source;
|
|
341
|
-
// ex: token.name|suh (old-style filter chain)
|
|
339
|
+
var TOKEN_NAMESPACE_PREFIX_PATTERN = /(\w+:)?/.source; // ex: token.name|suh (old-style filter chain)
|
|
342
340
|
// ex: token.name|lower|capitalize (new-style filter chain)
|
|
341
|
+
|
|
343
342
|
var TOKEN_NAME_CHARS_PATTERN = /([^$|:]+?)(\|[|\w]+)?/.source;
|
|
344
|
-
var TOKEN_PATTERN = /\$/.source + TOKEN_NAMESPACE_PREFIX_PATTERN + TOKEN_NAME_CHARS_PATTERN + /\$/.source;
|
|
345
|
-
// rgb and rgba regexes were derived from:
|
|
343
|
+
var TOKEN_PATTERN = /\$/.source + TOKEN_NAMESPACE_PREFIX_PATTERN + TOKEN_NAME_CHARS_PATTERN + /\$/.source; // rgb and rgba regexes were derived from:
|
|
346
344
|
// https://stackoverflow.com/questions/9585973/javascript-regular-expression-for-rgb-values/9586150
|
|
347
345
|
// https://github.com/regexhq/rgba-regex
|
|
348
346
|
// NOTE: this will incorrectly accept values like rgb(999,999,999), but may be overkill to specify a regex that limits values to <= 255
|
|
347
|
+
|
|
349
348
|
var rgbColorPattern = /^rgb\(\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/;
|
|
350
|
-
var rgbaColorPattern = /^rgba\(\s*(\d{1,3}%?),\s*(\d{1,3}%?),\s*(\d{1,3}%?),\s*(\d*(?:\.\d+)?)\)$/;
|
|
351
|
-
|
|
349
|
+
var rgbaColorPattern = /^rgba\(\s*(\d{1,3}%?),\s*(\d{1,3}%?),\s*(\d{1,3}%?),\s*(\d*(?:\.\d+)?)\)$/; // todo: rename this to COLOR_PATTERN and replace all occurences.
|
|
350
|
+
|
|
352
351
|
var colorPattern = '^#[0-9a-fA-F]{6}$|transparent';
|
|
353
352
|
var colorPatternWithRGBA = "".concat(colorPattern, "|").concat(rgbColorPattern.source, "|").concat(rgbaColorPattern.source);
|
|
354
353
|
var COLOR_OR_TOKEN_PATTERN = "".concat(colorPattern, "|").concat(TOKEN_PATTERN);
|
|
355
|
-
var COLOR_OR_TOKEN_PATTERN_WITH_RGBA = "".concat(colorPatternWithRGBA, "|").concat(TOKEN_PATTERN);
|
|
356
|
-
|
|
354
|
+
var COLOR_OR_TOKEN_PATTERN_WITH_RGBA = "".concat(colorPatternWithRGBA, "|").concat(TOKEN_PATTERN); // dynamic option DSL expressions always start with a >
|
|
355
|
+
|
|
357
356
|
var DYNAMIC_OPTIONS_DSL_PATTERN = /^>.*/.source;
|
|
358
357
|
/**
|
|
359
358
|
* Returns the regex string that matches each passed in value as well as tokens.
|
|
360
359
|
* @param {Array.<string>} values
|
|
361
360
|
* @returns {string}
|
|
362
361
|
*/
|
|
362
|
+
|
|
363
363
|
var getPattern = function getPattern(values) {
|
|
364
364
|
return values.reduce(function (accumulator, value) {
|
|
365
365
|
return "".concat(accumulator, "|^").concat(value, "$");
|
|
@@ -376,8 +376,8 @@ var getPattern = function getPattern(values) {
|
|
|
376
376
|
|
|
377
377
|
Object.defineProperty(exports, "__esModule", {
|
|
378
378
|
value: true
|
|
379
|
-
});
|
|
380
|
-
|
|
379
|
+
}); // Reference - https://www.w3.org/TR/css-color-4/#named-colors
|
|
380
|
+
|
|
381
381
|
exports.default = ['transparent', 'aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'gray', 'green', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'lime', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'navy', 'oldlace', 'olive', 'olivedrab', 'orange', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'purple', 'rebeccapurple', 'red', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'silver', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'teal', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen'];
|
|
382
382
|
|
|
383
383
|
/***/ }),
|
|
@@ -392,7 +392,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
392
392
|
value: true
|
|
393
393
|
});
|
|
394
394
|
exports.sanitizeArrayOfColors = exports.isArrayOfColors = exports.isColor = void 0;
|
|
395
|
+
|
|
395
396
|
var schemaUtils_1 = __webpack_require__(22);
|
|
397
|
+
|
|
396
398
|
var namedColors_1 = __webpack_require__(23);
|
|
397
399
|
/**
|
|
398
400
|
* Validates if a given string is a valid color
|
|
@@ -400,21 +402,28 @@ var namedColors_1 = __webpack_require__(23);
|
|
|
400
402
|
* @param {string} color
|
|
401
403
|
* @returns {boolean}
|
|
402
404
|
*/
|
|
405
|
+
|
|
406
|
+
|
|
403
407
|
function isColor() {
|
|
404
408
|
var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
409
|
+
|
|
405
410
|
if (typeof color !== 'string') {
|
|
406
411
|
return false;
|
|
407
412
|
}
|
|
413
|
+
|
|
408
414
|
if (color.charAt(0) === '#') {
|
|
409
415
|
color = color.substring(1); // eslint-disable-line no-param-reassign
|
|
416
|
+
|
|
410
417
|
return [3, 4, 6, 8].indexOf(color.length) > -1 && !Number.isNaN(parseInt(color, 16));
|
|
411
418
|
}
|
|
419
|
+
|
|
412
420
|
var trimmedColor = color.trim();
|
|
421
|
+
|
|
413
422
|
if (schemaUtils_1.rgbColorPattern.test(trimmedColor) || schemaUtils_1.rgbaColorPattern.test(trimmedColor)) {
|
|
414
423
|
return true;
|
|
415
424
|
}
|
|
416
|
-
|
|
417
|
-
// for future when we want to support rgb | hsl
|
|
425
|
+
|
|
426
|
+
return namedColors_1.default.includes(color.toLowerCase()); // for future when we want to support rgb | hsl
|
|
418
427
|
// return /^(rgb|hsl)a?\((\d+%?(deg|rad|grad|turn)?[,\s]+){2,3}[\s\/]*[\d\.]+%?\)$/i.test(color);
|
|
419
428
|
}
|
|
420
429
|
|
|
@@ -424,9 +433,11 @@ exports.isColor = isColor;
|
|
|
424
433
|
* @param colors
|
|
425
434
|
* @returns
|
|
426
435
|
*/
|
|
436
|
+
|
|
427
437
|
var isArrayOfColors = function isArrayOfColors(colors) {
|
|
428
438
|
return Array.isArray(colors) && colors.every(isColor);
|
|
429
439
|
};
|
|
440
|
+
|
|
430
441
|
exports.isArrayOfColors = isArrayOfColors;
|
|
431
442
|
/**
|
|
432
443
|
* Sanitizes an array of colors `arr` to replace any non-color values with undefined,
|
|
@@ -436,11 +447,13 @@ exports.isArrayOfColors = isArrayOfColors;
|
|
|
436
447
|
* @param {string} fallback
|
|
437
448
|
* @returns {string[]} sanitized array any non-color values replaced with `fallback`
|
|
438
449
|
*/
|
|
450
|
+
|
|
439
451
|
var sanitizeArrayOfColors = function sanitizeArrayOfColors(arr, fallback) {
|
|
440
452
|
return arr.map(function (entry) {
|
|
441
453
|
return isColor(entry) ? entry : fallback;
|
|
442
454
|
});
|
|
443
455
|
};
|
|
456
|
+
|
|
444
457
|
exports.sanitizeArrayOfColors = sanitizeArrayOfColors;
|
|
445
458
|
|
|
446
459
|
/***/ })
|