@splunk/visualization-context 26.4.1 → 27.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.
Files changed (44) hide show
  1. package/BaseRegistry.js +227 -495
  2. package/BaseRegistry.js.map +7 -1
  3. package/DataSourceContext.js +55 -125
  4. package/DataSourceContext.js.map +7 -1
  5. package/EventsContext.js +54 -121
  6. package/EventsContext.js.map +7 -1
  7. package/FeatureFlagContext.js +55 -120
  8. package/FeatureFlagContext.js.map +7 -1
  9. package/FeatureFlags.js +27 -107
  10. package/FeatureFlags.js.map +7 -1
  11. package/GeoContext.js +55 -120
  12. package/GeoContext.js.map +7 -1
  13. package/GeoJsonProvider.js +26712 -303
  14. package/GeoJsonProvider.js.map +7 -1
  15. package/GeoRegistry.js +280 -691
  16. package/GeoRegistry.js.map +7 -1
  17. package/IconContext.js +55 -120
  18. package/IconContext.js.map +7 -1
  19. package/IconRegistry.js +256 -654
  20. package/IconRegistry.js.map +7 -1
  21. package/ImageContext.js +55 -120
  22. package/ImageContext.js.map +7 -1
  23. package/ImageRegistry.js +265 -660
  24. package/ImageRegistry.js.map +7 -1
  25. package/LocalIconProvider.js +206 -470
  26. package/LocalIconProvider.js.map +7 -1
  27. package/LocalImageProvider.js +143 -366
  28. package/LocalImageProvider.js.map +7 -1
  29. package/MapContext.js +103 -164
  30. package/MapContext.js.map +7 -1
  31. package/MessageContext.js +54 -121
  32. package/MessageContext.js.map +7 -1
  33. package/MockedProvider.js +146 -376
  34. package/MockedProvider.js.map +7 -1
  35. package/Provider.js +87 -276
  36. package/Provider.js.map +7 -1
  37. package/TimezoneContext.js +55 -122
  38. package/TimezoneContext.js.map +7 -1
  39. package/package.json +7 -16
  40. package/testDataURIs.js +37 -106
  41. package/testDataURIs.js.map +7 -1
  42. package/testSVG.js +27 -104
  43. package/testSVG.js.map +7 -1
  44. package/babel.config.js +0 -3
@@ -1 +1,7 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@babel/runtime/regenerator\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/asyncToGenerator\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///external \"@splunk/visualization-context/Provider\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"uuid-v4\"","webpack:///./src/LocalIconProvider.js"],"names":["b64EncodeUnicode","btoa","String","parseInt","KEY","LocalIconProvider","fetch","response","text","parser","xmlDoc","svg","_","serializer","svgStr","iconDataURI","icon","dataURI","metaData","id","uuid","icons","JSON","localStorage","offset","count","meta","search","results","Object","iconMeta","isSearchedIcon","iconMetaValue","Provider"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;AClFA,kD;;;;;;ACAA,uD;;;;;;ACAA,kE;;;;;;ACAA,+D;;;;;;ACAA,oE;;;;;;ACAA,kE;;;;;;ACAA,mE;;;;;;;ACAA,4D;;;;;;ACAA,6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AF,WAAb;AACA,cAAMW,QAAQ,GAAGT,KAAK,CAALA,EAAK,CAALA,aAFN,EAEX,CAFW,CAGX;;AACA,cAAMU,cAAc,GAChBJ,MAAM,IAANA,QACA,MAAM,CAAN,oBAA2B,gBAAQ;AAC/B,gBAAMK,aAAa,GAAGF,QAAQ,CAARA,IAAQ,CAARA,CAAtB,WAAsBA,EAAtB;AACA,mBAAOE,aAAa,CAAbA,QAAsBL,MAAM,CAA5BK,WAAsBL,EAAtBK,IAA8C,CAArD;AAJR,WAEI,CAFJ;;AAOA,cAAIL,MAAM,IAANA,QAAJ,gBAAsC;AAClC,gBAAID,IAAI,IAAIA,IAAI,CAAhB,QAAyB;AACrBV,kBAAI,CAAJA;AACAU,kBAAI,CAAJA,QAAa,gBAAQ;AACjB,oBAAII,QAAQ,CAARA,IAAQ,CAARA,IAAJ,MAA4B;AACxBd,sBAAI,CAAJA,iBAAsBc,QAAQ,CAA9Bd,IAA8B,CAA9BA;AACH;AAHLU;AAKH;;AAEDE,mBAAO,CAAPA;AACH;AAxBTC;AA2BA;AA/BJ,QAgCE,cAAc;AACZ,cAAM,UAAUjB,+DAAC,CAAjB,gCAAiB,CAAX,CAAN;AACH;AACJ;AAED;AACJ;AACA;;;;WACI,wBAAe;AACX,UAAI;AACA,YAAMI,IAAI,GAAG,aAAb,EAAa,CAAb;AACA,YAAMK,KAAK,GAAGC,IAAI,CAAJA,MAAWC,YAAY,CAAZA,QAAzB,GAAyBA,CAAXD,CAAd;AACA,eAAOD,KAAK,CAAZ,EAAY,CAAZ;AACAE,oBAAY,CAAZA,aAA0BD,IAAI,CAAJA,UAA1BC,KAA0BD,CAA1BC;AACA;AALJ,QAME,cAAc;AACZ,cAAM,UAAUX,+DAAC,CAAjB,6BAAiB,CAAX,CAAN;AACH;AACJ;;;;EAtH2BqB,8E;;AAyHhC,kF","file":"LocalIconProvider.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 = 28);\n","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@babel/runtime/regenerator\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@babel/runtime/helpers/asyncToGenerator\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","module.exports = require(\"@splunk/visualization-context/Provider\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"uuid-v4\");","/* eslint-disable class-methods-use-this,no-useless-constructor */\nimport uuid from 'uuid-v4';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport Provider from '@splunk/visualization-context/Provider';\n\nexport const b64EncodeUnicode = str =>\n // first we use encodeURIComponent to get percent-encoded UTF-8,\n // then we convert the percent encodings into raw bytes which\n // can be fed into btoa.\n btoa(\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) =>\n String.fromCharCode(parseInt(`0x${p1}`, 16))\n )\n );\n\nexport const KEY = '__icons__';\n\n/**\n * a local icon provider\n */\nclass LocalIconProvider extends Provider {\n constructor() {\n super();\n }\n\n /**\n * return provider type\n * @return {String} 'local'\n */\n getType() {\n return 'local';\n }\n\n /**\n * upload one new icon\n */\n async upload(dataURI, metaData) {\n // get svg from dataURI\n const response = await fetch(dataURI);\n const text = await response.text();\n const parser = new DOMParser();\n const xmlDoc = parser.parseFromString(text, 'text/xml');\n const svg = xmlDoc.getElementsByTagName('svg')[0];\n\n if (!svg.getAttribute('viewBox')) {\n throw new Error(_('Please upload a valid svg with viewBox attribute.'));\n }\n\n // reset svg attributes\n svg.setAttribute('preserveAspectRatio', 'none');\n // convert back to dataURI\n const serializer = new XMLSerializer();\n const svgStr = b64EncodeUnicode(serializer.serializeToString(svg));\n const iconDataURI = `data:image/svg+xml;base64,${svgStr}`;\n\n // save to localStorage\n try {\n const icon = { dataURI: iconDataURI, metaData };\n const id = uuid();\n let icons = JSON.parse(localStorage.getItem(KEY) || '{}');\n icons = { ...icons, [id]: icon };\n localStorage.setItem(KEY, JSON.stringify(icons));\n return id;\n } catch (error) {\n throw new Error(\n _('The icon cannot be uploaded. Please check whether your localStorage is full.')\n );\n }\n }\n\n /**\n * get one icon by icon id\n */\n getById(id) {\n const icons = JSON.parse(localStorage.getItem(KEY) || '{}');\n if (icons[id]) {\n return icons[id];\n }\n throw new Error(_('The icon is not found.'));\n }\n\n /**\n * get all icon ids\n * @params options\n * @params options.meta a list of meta data attribute that would be returned with each id\n * @params options.search a search string to filter the returned icons\n */\n listIds({ offset = 0, count = 100, meta = [], search = null }) {\n try {\n const icons = JSON.parse(localStorage.getItem(KEY) || '{}');\n const results = [];\n\n Object.keys(icons)\n .slice(offset, count)\n .forEach(id => {\n const icon = { id };\n const iconMeta = icons[id].metaData || {};\n // If search is a valid string, return the icon with matched meta data\n const isSearchedIcon =\n search != null &&\n Object.keys(iconMeta).some(attr => {\n const iconMetaValue = iconMeta[attr].toLowerCase();\n return iconMetaValue.indexOf(search.toLowerCase()) > -1;\n });\n\n if (search == null || isSearchedIcon) {\n if (meta && meta.length) {\n icon.metaData = {};\n meta.forEach(attr => {\n if (iconMeta[attr] != null) {\n icon.metaData[attr] = iconMeta[attr];\n }\n });\n }\n\n results.push(icon);\n }\n });\n\n return results;\n } catch (error) {\n throw new Error(_('The icon ids cannot be listed.'));\n }\n }\n\n /**\n * delete an icon by icon id\n */\n deleteById(id) {\n try {\n const icon = this.getById(id);\n const icons = JSON.parse(localStorage.getItem(KEY));\n delete icons[id];\n localStorage.setItem(KEY, JSON.stringify(icons));\n return icon;\n } catch (error) {\n throw new Error(_('The icon cannot be deleted.'));\n }\n }\n}\n\nexport default LocalIconProvider;\n"],"sourceRoot":""}
1
+ {
2
+ "version": 3,
3
+ "sources": ["src/LocalIconProvider.js", "esm-externals:uuid-v4", "esm-externals:@splunk/ui-utils/i18n", "esm-externals:@splunk/visualization-context/Provider"],
4
+ "sourcesContent": ["/* eslint-disable class-methods-use-this,no-useless-constructor */\nimport uuid from 'uuid-v4';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport Provider from '@splunk/visualization-context/Provider';\n\nexport const b64EncodeUnicode = str =>\n // first we use encodeURIComponent to get percent-encoded UTF-8,\n // then we convert the percent encodings into raw bytes which\n // can be fed into btoa.\n btoa(\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) =>\n String.fromCharCode(parseInt(`0x${p1}`, 16))\n )\n );\n\nexport const KEY = '__icons__';\n\n/**\n * a local icon provider\n */\nclass LocalIconProvider extends Provider {\n constructor() {\n super();\n }\n\n /**\n * return provider type\n * @return {String} 'local'\n */\n getType() {\n return 'local';\n }\n\n /**\n * upload one new icon\n */\n async upload(dataURI, metaData) {\n // get svg from dataURI\n const response = await fetch(dataURI);\n const text = await response.text();\n const parser = new DOMParser();\n const xmlDoc = parser.parseFromString(text, 'text/xml');\n const svg = xmlDoc.getElementsByTagName('svg')[0];\n\n if (!svg.getAttribute('viewBox')) {\n throw new Error(_('Please upload a valid svg with viewBox attribute.'));\n }\n\n // reset svg attributes\n svg.setAttribute('preserveAspectRatio', 'none');\n // convert back to dataURI\n const serializer = new XMLSerializer();\n const svgStr = b64EncodeUnicode(serializer.serializeToString(svg));\n const iconDataURI = `data:image/svg+xml;base64,${svgStr}`;\n\n // save to localStorage\n try {\n const icon = { dataURI: iconDataURI, metaData };\n const id = uuid();\n let icons = JSON.parse(localStorage.getItem(KEY) || '{}');\n icons = { ...icons, [id]: icon };\n localStorage.setItem(KEY, JSON.stringify(icons));\n return id;\n } catch (error) {\n throw new Error(\n _('The icon cannot be uploaded. Please check whether your localStorage is full.')\n );\n }\n }\n\n /**\n * get one icon by icon id\n */\n getById(id) {\n const icons = JSON.parse(localStorage.getItem(KEY) || '{}');\n if (icons[id]) {\n return icons[id];\n }\n throw new Error(_('The icon is not found.'));\n }\n\n /**\n * get all icon ids\n * @params options\n * @params options.meta a list of meta data attribute that would be returned with each id\n * @params options.search a search string to filter the returned icons\n */\n listIds({ offset = 0, count = 100, meta = [], search = null }) {\n try {\n const icons = JSON.parse(localStorage.getItem(KEY) || '{}');\n const results = [];\n\n Object.keys(icons)\n .slice(offset, count)\n .forEach(id => {\n const icon = { id };\n const iconMeta = icons[id].metaData || {};\n // If search is a valid string, return the icon with matched meta data\n const isSearchedIcon =\n search != null &&\n Object.keys(iconMeta).some(attr => {\n const iconMetaValue = iconMeta[attr].toLowerCase();\n return iconMetaValue.indexOf(search.toLowerCase()) > -1;\n });\n\n if (search == null || isSearchedIcon) {\n if (meta && meta.length) {\n icon.metaData = {};\n meta.forEach(attr => {\n if (iconMeta[attr] != null) {\n icon.metaData[attr] = iconMeta[attr];\n }\n });\n }\n\n results.push(icon);\n }\n });\n\n return results;\n } catch (error) {\n throw new Error(_('The icon ids cannot be listed.'));\n }\n }\n\n /**\n * delete an icon by icon id\n */\n deleteById(id) {\n try {\n const icon = this.getById(id);\n const icons = JSON.parse(localStorage.getItem(KEY));\n delete icons[id];\n localStorage.setItem(KEY, JSON.stringify(icons));\n return icon;\n } catch (error) {\n throw new Error(_('The icon cannot be deleted.'));\n }\n }\n}\n\nexport default LocalIconProvider;\n", "\nimport * as defaultImport from \"uuid-v4\";\nexport * from \"uuid-v4\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/ui-utils/i18n\";\nexport * from \"@splunk/ui-utils/i18n\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualization-context/Provider\";\nexport * from \"@splunk/visualization-context/Provider\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AACA,oBAA+B;AAC/B,4BAAc;AACd,IAAO,kBAAS,aAAa,gBAA8B,wBAAU;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAA,iBAA+B;AAC/B,yBAAc;AACd,IAAO,eAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,6BAAc;AACd,IAAO,mBAAS,aAAaA,iBAA8B,yBAAUA;;;AHE9D,IAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA,EAI5B;AAAA,IACI,mBAAmB,GAAG,EAAE;AAAA,MAAQ;AAAA,MAAmB,CAAC,OAAO,OACvD,OAAO,aAAa,SAAS,KAAK,EAAE,IAAI,EAAE,CAAC;AAAA,IAC/C;AAAA,EACJ;AAAA;AAEG,IAAM,MAAM;AAKnB,IAAM,oBAAN,cAAgC,iBAAS;AAAA,EACrC,cAAc;AACV,UAAM;AAAA,EACV;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,UAAU;AACN,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA,EAKM,OAAO,SAAS,UAAU;AAAA;AAE5B,YAAM,WAAW,MAAM,MAAM,OAAO;AACpC,YAAM,OAAO,MAAM,SAAS,KAAK;AACjC,YAAM,SAAS,IAAI,UAAU;AAC7B,YAAM,SAAS,OAAO,gBAAgB,MAAM,UAAU;AACtD,YAAM,MAAM,OAAO,qBAAqB,KAAK,EAAE,CAAC;AAEhD,UAAI,CAAC,IAAI,aAAa,SAA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QAAQ,EAAE,KAAK,UAAQ;AAC/B,gBAAM,gBAAgB,SAAS,IAAI,EAAE,YAAY;AACjD,iBAAO,cAAc,QAAQ,OAAO,YAAY,CAAC,IAAI;AAAA,QACzD,CAAC;AAEL,YAAI,UAAU,QAAQ,gBAAgB;AAClC,cAAI,QAAQ,KAAK,QAAQ;AACrB,iBAAK,WAAW,CAAC;AACjB,iBAAK,QAAQ,UAAQ;AACjB,kBAAI,SAAS,IAAI,KAAK,MAAM;AACxB,qBAAK,SAAS,IAAI,IAAI,SAAS,IAAI;AAAA,cACvC;AAAA,YACJ,CAAC;AAAA,UACL;AAEA,kBAAQ,KAAK,IAAI;AAAA,QACrB;AAAA,MACJ,CAAC;AAEL,aAAO;AAAA,IACX,SAAS,OAAO;AACZ,YAAM,IAAI,UAAM,gBAAE,gCAAgC,CAAC;AAAA,IACvD;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA,EAKA,WAAW,IAAI;AACX,QAAI;AACA,YAAM,OAAO,KAAK,QAAQ,EAAE;AAC5B,YAAM,QAAQ,KAAK,MAAM,aAAa,QAAQ,GAAG,CAAC;AAClD,aAAO,MAAM,EAAE;AACf,mBAAa,QAAQ,KAAK,KAAK,UAAU,KAAK,CAAC;AAC/C,aAAO;AAAA,IACX,SAAS,OAAO;AACZ,YAAM,IAAI,UAAM,gBAAE,6BAA6B,CAAC;AAAA,IACpD;AAAA,EACJ;AACJ;AAEA,IAAO,4BAAQ;",
6
+ "names": ["defaultImport", "defaultImport"]
7
+ }
@@ -1,376 +1,153 @@
1
- /*!
2
- * Copyright © 2024 Splunk Inc.
3
- * SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
4
- * in part without a valid written license from Splunk Inc. is PROHIBITED.
5
- */
6
- module.exports =
7
- /******/ (function(modules) { // webpackBootstrap
8
- /******/ // The module cache
9
- /******/ var installedModules = {};
10
- /******/
11
- /******/ // The require function
12
- /******/ function __webpack_require__(moduleId) {
13
- /******/
14
- /******/ // Check if module is in cache
15
- /******/ if(installedModules[moduleId]) {
16
- /******/ return installedModules[moduleId].exports;
17
- /******/ }
18
- /******/ // Create a new module (and put it into the cache)
19
- /******/ var module = installedModules[moduleId] = {
20
- /******/ i: moduleId,
21
- /******/ l: false,
22
- /******/ exports: {}
23
- /******/ };
24
- /******/
25
- /******/ // Execute the module function
26
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
27
- /******/
28
- /******/ // Flag the module as loaded
29
- /******/ module.l = true;
30
- /******/
31
- /******/ // Return the exports of the module
32
- /******/ return module.exports;
33
- /******/ }
34
- /******/
35
- /******/
36
- /******/ // expose the modules object (__webpack_modules__)
37
- /******/ __webpack_require__.m = modules;
38
- /******/
39
- /******/ // expose the module cache
40
- /******/ __webpack_require__.c = installedModules;
41
- /******/
42
- /******/ // define getter function for harmony exports
43
- /******/ __webpack_require__.d = function(exports, name, getter) {
44
- /******/ if(!__webpack_require__.o(exports, name)) {
45
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
46
- /******/ }
47
- /******/ };
48
- /******/
49
- /******/ // define __esModule on exports
50
- /******/ __webpack_require__.r = function(exports) {
51
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
52
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
53
- /******/ }
54
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
55
- /******/ };
56
- /******/
57
- /******/ // create a fake namespace object
58
- /******/ // mode & 1: value is a module id, require it
59
- /******/ // mode & 2: merge all properties of value into the ns
60
- /******/ // mode & 4: return value when already ns object
61
- /******/ // mode & 8|1: behave like require
62
- /******/ __webpack_require__.t = function(value, mode) {
63
- /******/ if(mode & 1) value = __webpack_require__(value);
64
- /******/ if(mode & 8) return value;
65
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
66
- /******/ var ns = Object.create(null);
67
- /******/ __webpack_require__.r(ns);
68
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
69
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
70
- /******/ return ns;
71
- /******/ };
72
- /******/
73
- /******/ // getDefaultExport function for compatibility with non-harmony modules
74
- /******/ __webpack_require__.n = function(module) {
75
- /******/ var getter = module && module.__esModule ?
76
- /******/ function getDefault() { return module['default']; } :
77
- /******/ function getModuleExports() { return module; };
78
- /******/ __webpack_require__.d(getter, 'a', getter);
79
- /******/ return getter;
80
- /******/ };
81
- /******/
82
- /******/ // Object.prototype.hasOwnProperty.call
83
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
84
- /******/
85
- /******/ // __webpack_public_path__
86
- /******/ __webpack_require__.p = "";
87
- /******/
88
- /******/
89
- /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 29);
91
- /******/ })
92
- /************************************************************************/
93
- /******/ ([
94
- /* 0 */
95
- /***/ (function(module, exports) {
96
-
97
- module.exports = require("@splunk/ui-utils/i18n");
98
-
99
- /***/ }),
100
- /* 1 */,
101
- /* 2 */
102
- /***/ (function(module, exports) {
103
-
104
- module.exports = require("@babel/runtime/helpers/classCallCheck");
105
-
106
- /***/ }),
107
- /* 3 */
108
- /***/ (function(module, exports) {
109
-
110
- module.exports = require("@babel/runtime/helpers/createClass");
111
-
112
- /***/ }),
113
- /* 4 */,
114
- /* 5 */
115
- /***/ (function(module, exports) {
116
-
117
- module.exports = require("@babel/runtime/helpers/getPrototypeOf");
118
-
119
- /***/ }),
120
- /* 6 */
121
- /***/ (function(module, exports) {
122
-
123
- module.exports = require("@splunk/visualization-context/Provider");
124
-
125
- /***/ }),
126
- /* 7 */,
127
- /* 8 */
128
- /***/ (function(module, exports) {
129
-
130
- module.exports = require("@babel/runtime/helpers/inherits");
131
-
132
- /***/ }),
133
- /* 9 */
134
- /***/ (function(module, exports) {
135
-
136
- module.exports = require("@babel/runtime/helpers/possibleConstructorReturn");
137
-
138
- /***/ }),
139
- /* 10 */
140
- /***/ (function(module, exports) {
141
-
142
- module.exports = require("@babel/runtime/helpers/defineProperty");
143
-
144
- /***/ }),
145
- /* 11 */,
146
- /* 12 */,
147
- /* 13 */,
148
- /* 14 */
149
- /***/ (function(module, exports) {
150
-
151
- module.exports = require("uuid-v4");
152
-
153
- /***/ }),
154
- /* 15 */,
155
- /* 16 */,
156
- /* 17 */,
157
- /* 18 */,
158
- /* 19 */,
159
- /* 20 */,
160
- /* 21 */,
161
- /* 22 */,
162
- /* 23 */,
163
- /* 24 */,
164
- /* 25 */,
165
- /* 26 */,
166
- /* 27 */,
167
- /* 28 */,
168
- /* 29 */
169
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
170
-
171
- "use strict";
172
- __webpack_require__.r(__webpack_exports__);
173
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KEY", function() { return KEY; });
174
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
175
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
176
- /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
177
- /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);
178
- /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
179
- /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);
180
- /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8);
181
- /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__);
182
- /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9);
183
- /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);
184
- /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
185
- /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);
186
- /* harmony import */ var uuid_v4__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14);
187
- /* harmony import */ var uuid_v4__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(uuid_v4__WEBPACK_IMPORTED_MODULE_6__);
188
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(0);
189
- /* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_7__);
190
- /* harmony import */ var _splunk_visualization_context_Provider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(6);
191
- /* harmony import */ var _splunk_visualization_context_Provider__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualization_context_Provider__WEBPACK_IMPORTED_MODULE_8__);
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
- function ownKeys(object, enumerableOnly) {
200
- var keys = Object.keys(object);
201
-
202
- if (Object.getOwnPropertySymbols) {
203
- var symbols = Object.getOwnPropertySymbols(object);
204
- if (enumerableOnly) symbols = symbols.filter(function (sym) {
205
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
206
- });
207
- keys.push.apply(keys, symbols);
208
- }
209
-
210
- return keys;
211
- }
212
-
213
- function _objectSpread(target) {
214
- for (var i = 1; i < arguments.length; i++) {
215
- var source = arguments[i] != null ? arguments[i] : {};
216
-
217
- if (i % 2) {
218
- ownKeys(Object(source), true).forEach(function (key) {
219
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]);
220
- });
221
- } else if (Object.getOwnPropertyDescriptors) {
222
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
223
- } else {
224
- ownKeys(Object(source)).forEach(function (key) {
225
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
226
- });
227
- }
228
- }
229
-
230
- return target;
231
- }
232
-
233
- function _createSuper(Derived) {
234
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
235
-
236
- return function _createSuperInternal() {
237
- var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived),
238
- result;
239
-
240
- if (hasNativeReflectConstruct) {
241
- var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor;
242
-
243
- result = Reflect.construct(Super, arguments, NewTarget);
244
- } else {
245
- result = Super.apply(this, arguments);
1
+ /* Copyright © 2020 Splunk Inc.
2
+ SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
3
+ in part without a valid written license from Splunk Inc. is PROHIBITED. */
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __defProps = Object.defineProperties;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
9
+ var __getOwnPropNames = Object.getOwnPropertyNames;
10
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
11
+ var __getProtoOf = Object.getPrototypeOf;
12
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
13
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
14
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15
+ var __spreadValues = (a, b) => {
16
+ for (var prop in b || (b = {}))
17
+ if (__hasOwnProp.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ if (__getOwnPropSymbols)
20
+ for (var prop of __getOwnPropSymbols(b)) {
21
+ if (__propIsEnum.call(b, prop))
22
+ __defNormalProp(a, prop, b[prop]);
246
23
  }
247
-
248
- return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result);
249
- };
250
- }
251
-
252
- function _isNativeReflectConstruct() {
253
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
254
- if (Reflect.construct.sham) return false;
255
- if (typeof Proxy === "function") return true;
256
-
257
- try {
258
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
259
- return true;
260
- } catch (e) {
261
- return false;
24
+ return a;
25
+ };
26
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27
+ var __export = (target, all) => {
28
+ for (var name in all)
29
+ __defProp(target, name, { get: all[name], enumerable: true });
30
+ };
31
+ var __copyProps = (to, from, except, desc) => {
32
+ if (from && typeof from === "object" || typeof from === "function") {
33
+ for (let key of __getOwnPropNames(from))
34
+ if (!__hasOwnProp.call(to, key) && key !== except)
35
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
262
36
  }
263
- }
264
- /* eslint-disable class-methods-use-this,no-useless-constructor */
265
-
266
-
267
-
268
-
269
-
270
- var KEY = '__images__';
271
- /**
272
- * a pure frontend local image provider
273
- */
274
-
275
- var LocalImageProvider = /*#__PURE__*/function (_Provider) {
276
- _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(LocalImageProvider, _Provider);
277
-
278
- var _super = _createSuper(LocalImageProvider);
279
-
280
- function LocalImageProvider() {
281
- _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, LocalImageProvider);
282
-
283
- return _super.call(this);
37
+ return to;
38
+ };
39
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
40
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
41
+ // If the importer is in node compatibility mode or this is not an ESM
42
+ // file that has been converted to a CommonJS file using a Babel-
43
+ // compatible transform (i.e. "__esModule" has not been set), then set
44
+ // "default" to the CommonJS "module.exports" for node compatibility.
45
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
46
+ mod
47
+ ));
48
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
49
+
50
+ // src/LocalImageProvider.js
51
+ var LocalImageProvider_exports = {};
52
+ __export(LocalImageProvider_exports, {
53
+ KEY: () => KEY,
54
+ default: () => LocalImageProvider_default
55
+ });
56
+ module.exports = __toCommonJS(LocalImageProvider_exports);
57
+
58
+ // esm-externals:uuid-v4
59
+ var uuid_v4_exports = {};
60
+ __export(uuid_v4_exports, {
61
+ default: () => uuid_v4_default
62
+ });
63
+ var defaultImport = __toESM(require("uuid-v4"));
64
+ __reExport(uuid_v4_exports, require("uuid-v4"));
65
+ var uuid_v4_default = "default" in defaultImport ? defaultImport.default : defaultImport;
66
+
67
+ // esm-externals:@splunk/ui-utils/i18n
68
+ var i18n_exports = {};
69
+ __export(i18n_exports, {
70
+ default: () => i18n_default
71
+ });
72
+ var defaultImport2 = __toESM(require("@splunk/ui-utils/i18n"));
73
+ __reExport(i18n_exports, require("@splunk/ui-utils/i18n"));
74
+ var i18n_default = "default" in defaultImport2 ? defaultImport2.default : defaultImport2;
75
+
76
+ // esm-externals:@splunk/visualization-context/Provider
77
+ var Provider_exports = {};
78
+ __export(Provider_exports, {
79
+ default: () => Provider_default
80
+ });
81
+ var defaultImport3 = __toESM(require("@splunk/visualization-context/Provider"));
82
+ __reExport(Provider_exports, require("@splunk/visualization-context/Provider"));
83
+ var Provider_default = "default" in defaultImport3 ? defaultImport3.default : defaultImport3;
84
+
85
+ // src/LocalImageProvider.js
86
+ var KEY = "__images__";
87
+ var LocalImageProvider = class extends Provider_default {
88
+ constructor() {
89
+ super();
284
90
  }
285
91
  /**
286
92
  * return provider type
287
93
  */
288
-
289
-
290
- _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(LocalImageProvider, [{
291
- key: "getType",
292
- value: function getType() {
293
- return 'local';
294
- }
295
- /**
296
- * add a new image
297
- */
298
-
299
- }, {
300
- key: "upload",
301
- value: function upload(dataURI, metaData) {
302
- try {
303
- var id = uuid_v4__WEBPACK_IMPORTED_MODULE_6___default()();
304
- var imageObject = {
305
- dataURI: dataURI,
306
- metaData: metaData
307
- };
308
- var images = JSON.parse(localStorage.getItem(KEY) || '{}');
309
- images = _objectSpread(_objectSpread({}, images), {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, id, imageObject));
310
- localStorage.setItem(KEY, JSON.stringify(images));
311
- return id;
312
- } catch (error) {
313
- throw new Error(Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_7__["_"])('The image cannot be uploaded. Please check whether your localStorage is full.'));
314
- }
94
+ getType() {
95
+ return "local";
96
+ }
97
+ /**
98
+ * add a new image
99
+ */
100
+ upload(dataURI, metaData) {
101
+ try {
102
+ const id = uuid_v4_default();
103
+ const imageObject = { dataURI, metaData };
104
+ let images = JSON.parse(localStorage.getItem(KEY) || "{}");
105
+ images = __spreadProps(__spreadValues({}, images), { [id]: imageObject });
106
+ localStorage.setItem(KEY, JSON.stringify(images));
107
+ return id;
108
+ } catch (error) {
109
+ throw new Error(
110
+ (0, i18n_exports._)("The image cannot be uploaded. Please check whether your localStorage is full.")
111
+ );
315
112
  }
316
- /**
317
- * get image by imageID
318
- */
319
-
320
- }, {
321
- key: "getById",
322
- value: function getById(imageID) {
323
- var images = JSON.parse(localStorage.getItem(KEY) || '{}');
324
- var imageObject = images[imageID];
325
-
326
- if (imageObject) {
327
- return imageObject;
328
- }
329
-
330
- throw new Error(Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_7__["_"])('The image is not found.'));
113
+ }
114
+ /**
115
+ * get image by imageID
116
+ */
117
+ getById(imageID) {
118
+ const images = JSON.parse(localStorage.getItem(KEY) || "{}");
119
+ const imageObject = images[imageID];
120
+ if (imageObject) {
121
+ return imageObject;
331
122
  }
332
- /**
333
- * get all imageIDs
334
- */
335
-
336
- }, {
337
- key: "listIds",
338
- value: function listIds(_ref) {
339
- var offset = _ref.offset,
340
- count = _ref.count;
341
-
342
- try {
343
- var images = JSON.parse(localStorage.getItem(KEY) || '{}');
344
- var imageIDS = Object.keys(images);
345
- return imageIDS.slice(offset, count);
346
- } catch (error) {
347
- throw new Error(Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_7__["_"])('The image ids cannot be listed.'));
348
- }
123
+ throw new Error((0, i18n_exports._)("The image is not found."));
124
+ }
125
+ /**
126
+ * get all imageIDs
127
+ */
128
+ listIds({ offset, count }) {
129
+ try {
130
+ const images = JSON.parse(localStorage.getItem(KEY) || "{}");
131
+ const imageIDS = Object.keys(images);
132
+ return imageIDS.slice(offset, count);
133
+ } catch (error) {
134
+ throw new Error((0, i18n_exports._)("The image ids cannot be listed."));
349
135
  }
350
- /**
351
- * delete an image by dataID
352
- */
353
-
354
- }, {
355
- key: "deleteById",
356
- value: function deleteById(imageID) {
357
- try {
358
- var imageObject = this.getById(imageID);
359
- var images = JSON.parse(localStorage.getItem(KEY));
360
- delete images[imageID];
361
- localStorage.setItem(KEY, JSON.stringify(images));
362
- return imageObject;
363
- } catch (error) {
364
- throw new Error(Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_7__["_"])('The image cannot be deleted.'));
365
- }
136
+ }
137
+ /**
138
+ * delete an image by dataID
139
+ */
140
+ deleteById(imageID) {
141
+ try {
142
+ const imageObject = this.getById(imageID);
143
+ const images = JSON.parse(localStorage.getItem(KEY));
144
+ delete images[imageID];
145
+ localStorage.setItem(KEY, JSON.stringify(images));
146
+ return imageObject;
147
+ } catch (error) {
148
+ throw new Error((0, i18n_exports._)("The image cannot be deleted."));
366
149
  }
367
- }]);
368
-
369
- return LocalImageProvider;
370
- }(_splunk_visualization_context_Provider__WEBPACK_IMPORTED_MODULE_8___default.a);
371
-
372
- /* harmony default export */ __webpack_exports__["default"] = (LocalImageProvider);
373
-
374
- /***/ })
375
- /******/ ]);
376
- //# sourceMappingURL=LocalImageProvider.js.map
150
+ }
151
+ };
152
+ var LocalImageProvider_default = LocalImageProvider;
153
+ //# sourceMappingURL=LocalImageProvider.js.map
@@ -1 +1,7 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///external \"@splunk/visualization-context/Provider\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"uuid-v4\"","webpack:///./src/LocalImageProvider.js"],"names":["KEY","LocalImageProvider","id","uuid","imageObject","dataURI","metaData","images","JSON","localStorage","_","offset","count","imageIDS","Object","Provider"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAE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CADL,+EACK,CADC,CAAN;AAGH;AACJ;AAED;AACJ;AACA;;;;WACI,0BAAiB;AACb,UAAMH,MAAM,GAAGC,IAAI,CAAJA,MAAWC,YAAY,CAAZA,gBAA1B,IAAeD,CAAf;AACA,UAAMJ,WAAW,GAAGG,MAAM,CAA1B,OAA0B,CAA1B;;AACA,uBAAiB;AACb;AACH;;AACD,YAAM,UAAUG,+DAAC,CAAjB,yBAAiB,CAAX,CAAN;AACH;AAED;AACJ;AACA;;;;WACI,uBAA2B;AAAA,UAAjBC,MAAiB,QAAjBA,MAAiB;AAAA,UAATC,KAAS,QAATA,KAAS;;AACvB,UAAI;AACA,YAAML,MAAM,GAAGC,IAAI,CAAJA,MAAWC,YAAY,CAAZA,gBAA1B,IAAeD,CAAf;AACA,YAAMK,QAAQ,GAAGC,MAAM,CAANA,KAAjB,MAAiBA,CAAjB;AACA,eAAOD,QAAQ,CAARA,cAAP,KAAOA,CAAP;AAHJ,QAIE,cAAc;AACZ,cAAM,UAAUH,+DAAC,CAAjB,iCAAiB,CAAX,CAAN;AACH;AACJ;AAED;AACJ;AACA;;;;WACI,6BAAoB;AAChB,UAAI;AACA,YAAMN,WAAW,GAAG,aAApB,OAAoB,CAApB;AACA,YAAMG,MAAM,GAAGC,IAAI,CAAJA,MAAWC,YAAY,CAAZA,QAA1B,GAA0BA,CAAXD,CAAf;AACA,eAAOD,MAAM,CAAb,OAAa,CAAb;AACAE,oBAAY,CAAZA,aAA0BD,IAAI,CAAJA,UAA1BC,MAA0BD,CAA1BC;AACA;AALJ,QAME,cAAc;AACZ,cAAM,UAAUC,+DAAC,CAAjB,8BAAiB,CAAX,CAAN;AACH;AACJ;;;;EApE4BK,6E;;AAuEjC,mF","file":"LocalImageProvider.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 = 29);\n","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","module.exports = require(\"@splunk/visualization-context/Provider\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"uuid-v4\");","/* eslint-disable class-methods-use-this,no-useless-constructor */\nimport uuid from 'uuid-v4';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport Provider from '@splunk/visualization-context/Provider';\n\nexport const KEY = '__images__';\n\n/**\n * a pure frontend local image provider\n */\nclass LocalImageProvider extends Provider {\n constructor() {\n super();\n }\n\n /**\n * return provider type\n */\n getType() {\n return 'local';\n }\n\n /**\n * add a new image\n */\n upload(dataURI, metaData) {\n try {\n const id = uuid();\n const imageObject = { dataURI, metaData };\n let images = JSON.parse(localStorage.getItem(KEY) || '{}');\n images = { ...images, [id]: imageObject };\n localStorage.setItem(KEY, JSON.stringify(images));\n return id;\n } catch (error) {\n throw new Error(\n _('The image cannot be uploaded. Please check whether your localStorage is full.')\n );\n }\n }\n\n /**\n * get image by imageID\n */\n getById(imageID) {\n const images = JSON.parse(localStorage.getItem(KEY) || '{}');\n const imageObject = images[imageID];\n if (imageObject) {\n return imageObject;\n }\n throw new Error(_('The image is not found.'));\n }\n\n /**\n * get all imageIDs\n */\n listIds({ offset, count }) {\n try {\n const images = JSON.parse(localStorage.getItem(KEY) || '{}');\n const imageIDS = Object.keys(images);\n return imageIDS.slice(offset, count);\n } catch (error) {\n throw new Error(_('The image ids cannot be listed.'));\n }\n }\n\n /**\n * delete an image by dataID\n */\n deleteById(imageID) {\n try {\n const imageObject = this.getById(imageID);\n const images = JSON.parse(localStorage.getItem(KEY));\n delete images[imageID];\n localStorage.setItem(KEY, JSON.stringify(images));\n return imageObject;\n } catch (error) {\n throw new Error(_('The image cannot be deleted.'));\n }\n }\n}\n\nexport default LocalImageProvider;\n"],"sourceRoot":""}
1
+ {
2
+ "version": 3,
3
+ "sources": ["src/LocalImageProvider.js", "esm-externals:uuid-v4", "esm-externals:@splunk/ui-utils/i18n", "esm-externals:@splunk/visualization-context/Provider"],
4
+ "sourcesContent": ["/* eslint-disable class-methods-use-this,no-useless-constructor */\nimport uuid from 'uuid-v4';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport Provider from '@splunk/visualization-context/Provider';\n\nexport const KEY = '__images__';\n\n/**\n * a pure frontend local image provider\n */\nclass LocalImageProvider extends Provider {\n constructor() {\n super();\n }\n\n /**\n * return provider type\n */\n getType() {\n return 'local';\n }\n\n /**\n * add a new image\n */\n upload(dataURI, metaData) {\n try {\n const id = uuid();\n const imageObject = { dataURI, metaData };\n let images = JSON.parse(localStorage.getItem(KEY) || '{}');\n images = { ...images, [id]: imageObject };\n localStorage.setItem(KEY, JSON.stringify(images));\n return id;\n } catch (error) {\n throw new Error(\n _('The image cannot be uploaded. Please check whether your localStorage is full.')\n );\n }\n }\n\n /**\n * get image by imageID\n */\n getById(imageID) {\n const images = JSON.parse(localStorage.getItem(KEY) || '{}');\n const imageObject = images[imageID];\n if (imageObject) {\n return imageObject;\n }\n throw new Error(_('The image is not found.'));\n }\n\n /**\n * get all imageIDs\n */\n listIds({ offset, count }) {\n try {\n const images = JSON.parse(localStorage.getItem(KEY) || '{}');\n const imageIDS = Object.keys(images);\n return imageIDS.slice(offset, count);\n } catch (error) {\n throw new Error(_('The image ids cannot be listed.'));\n }\n }\n\n /**\n * delete an image by dataID\n */\n deleteById(imageID) {\n try {\n const imageObject = this.getById(imageID);\n const images = JSON.parse(localStorage.getItem(KEY));\n delete images[imageID];\n localStorage.setItem(KEY, JSON.stringify(images));\n return imageObject;\n } catch (error) {\n throw new Error(_('The image cannot be deleted.'));\n }\n }\n}\n\nexport default LocalImageProvider;\n", "\nimport * as defaultImport from \"uuid-v4\";\nexport * from \"uuid-v4\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/ui-utils/i18n\";\nexport * from \"@splunk/ui-utils/i18n\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualization-context/Provider\";\nexport * from \"@splunk/visualization-context/Provider\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AACA,oBAA+B;AAC/B,4BAAc;AACd,IAAO,kBAAS,aAAa,gBAA8B,wBAAU;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAA,iBAA+B;AAC/B,yBAAc;AACd,IAAO,eAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,6BAAc;AACd,IAAO,mBAAS,aAAaA,iBAA8B,yBAAUA;;;AHE9D,IAAM,MAAM;AAKnB,IAAM,qBAAN,cAAiC,iBAAS;AAAA,EACtC,cAAc;AACV,UAAM;AAAA,EACV;AAAA;AAAA;AAAA;AAAA,EAKA,UAAU;AACN,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,SAAS,UAAU;AACtB,QAAI;AACA,YAAM,KAAK,gBAAK;AAChB,YAAM,cAAc,EAAE,SAAS,SAAS;AACxC,UAAI,SAAS,KAAK,MAAM,aAAa,QAAQ,GAAG,KAAK,IAAI;A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