@splunk/visualization-context 24.1.0 → 24.2.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/BaseRegistry.js +5 -4
- package/BaseRegistry.js.map +1 -1
- package/DataSourceContext.js +22 -5
- package/DataSourceContext.js.map +1 -1
- package/FeatureFlagContext.js +23 -5
- package/FeatureFlagContext.js.map +1 -1
- package/GeoContext.js +23 -5
- package/GeoContext.js.map +1 -1
- package/GeoJsonProvider.js +10 -9
- package/GeoJsonProvider.js.map +1 -1
- package/GeoRegistry.js +9 -8
- package/GeoRegistry.js.map +1 -1
- package/IconContext.js +23 -5
- package/IconContext.js.map +1 -1
- package/IconRegistry.js +13 -12
- package/IconRegistry.js.map +1 -1
- package/ImageContext.js +23 -5
- package/ImageContext.js.map +1 -1
- package/ImageRegistry.js +13 -12
- package/ImageRegistry.js.map +1 -1
- package/LocalIconProvider.js +10 -9
- package/LocalIconProvider.js.map +1 -1
- package/LocalImageProvider.js +10 -9
- package/LocalImageProvider.js.map +1 -1
- package/MessageContext.js +123 -0
- package/MessageContext.js.map +1 -0
- package/MockedProvider.js +17 -17
- package/MockedProvider.js.map +1 -1
- package/Provider.js +9 -9
- package/Provider.js.map +1 -1
- package/TimezoneContext.js +22 -5
- package/TimezoneContext.js.map +1 -1
- package/package.json +4 -3
- package/scripts/generateVersion.js +13 -0
- package/testDataURIs.js +2 -2
- package/testDataURIs.js.map +1 -1
- package/testSVG.js +2 -2
- package/testSVG.js.map +1 -1
- package/version.js +110 -0
- package/version.js.map +1 -0
package/MockedProvider.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 = 30);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -99,6 +99,13 @@ module.exports = require("@splunk/ui-utils/i18n");
|
|
|
99
99
|
|
|
100
100
|
/***/ }),
|
|
101
101
|
|
|
102
|
+
/***/ 11:
|
|
103
|
+
/***/ (function(module, exports) {
|
|
104
|
+
|
|
105
|
+
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
106
|
+
|
|
107
|
+
/***/ }),
|
|
108
|
+
|
|
102
109
|
/***/ 2:
|
|
103
110
|
/***/ (function(module, exports) {
|
|
104
111
|
|
|
@@ -106,12 +113,19 @@ module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
|
106
113
|
|
|
107
114
|
/***/ }),
|
|
108
115
|
|
|
109
|
-
/***/
|
|
116
|
+
/***/ 3:
|
|
117
|
+
/***/ (function(module, exports) {
|
|
118
|
+
|
|
119
|
+
module.exports = require("@babel/runtime/helpers/createClass");
|
|
120
|
+
|
|
121
|
+
/***/ }),
|
|
122
|
+
|
|
123
|
+
/***/ 30:
|
|
110
124
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
111
125
|
|
|
112
126
|
"use strict";
|
|
113
127
|
__webpack_require__.r(__webpack_exports__);
|
|
114
|
-
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
128
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
|
|
115
129
|
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
|
|
116
130
|
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
|
117
131
|
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);
|
|
@@ -341,13 +355,6 @@ var MockedProvider = /*#__PURE__*/function (_Provider) {
|
|
|
341
355
|
|
|
342
356
|
/***/ }),
|
|
343
357
|
|
|
344
|
-
/***/ 3:
|
|
345
|
-
/***/ (function(module, exports) {
|
|
346
|
-
|
|
347
|
-
module.exports = require("@babel/runtime/helpers/createClass");
|
|
348
|
-
|
|
349
|
-
/***/ }),
|
|
350
|
-
|
|
351
358
|
/***/ 5:
|
|
352
359
|
/***/ (function(module, exports) {
|
|
353
360
|
|
|
@@ -374,13 +381,6 @@ module.exports = require("@babel/runtime/helpers/inherits");
|
|
|
374
381
|
|
|
375
382
|
module.exports = require("@babel/runtime/helpers/possibleConstructorReturn");
|
|
376
383
|
|
|
377
|
-
/***/ }),
|
|
378
|
-
|
|
379
|
-
/***/ 9:
|
|
380
|
-
/***/ (function(module, exports) {
|
|
381
|
-
|
|
382
|
-
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
383
|
-
|
|
384
384
|
/***/ })
|
|
385
385
|
|
|
386
386
|
/******/ });
|
package/MockedProvider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@babel/runtime/helpers/
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/ui-utils/i18n\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///./src/MockedProvider.js","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///external \"@splunk/visualization-context/Provider\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\""],"names":["MockedProvider","obj","dataURI","metaData","id","items","_","offset","count","meta","search","icons","results","Object","icon","iconMeta","isSearchedIc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;WACI,wBAAe;AACX,UAAI;AACA,YAAML,GAAG,GAAG,aAAZ,EAAY,CAAZ;AACA,eAAO,WAAP,EAAO,CAAP;AACA;AAHJ,QAIE,cAAc;AACZ,cAAM,UAAUK,+DAAC,CAAjB,4BAAiB,CAAX,CAAN;AACH;AACJ;;;WAED,iBAAQ;AACJ;AACA;AACH;;;;EA9FwBY,6E;;AAiG7B,+E;;;;;;;ACxGA,kE;;;;;;;ACAA,mE;;;;;;;ACAA,4D;;;;;;;ACAA,6E","file":"MockedProvider.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 = 30);\n","module.exports = require(\"@splunk/ui-utils/i18n\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","/* eslint-disable class-methods-use-this,no-useless-constructor */\nimport { _ } from '@splunk/ui-utils/i18n';\nimport Provider from '@splunk/visualization-context/Provider';\n\n/**\n * a local icon/image provider\n */\nclass MockedProvider extends Provider {\n constructor() {\n super();\n this.id = 0;\n this.items = {};\n }\n\n /**\n * return provider type\n */\n getType() {\n return 'mock';\n }\n\n upload(dataURI, metaData) {\n try {\n const obj = { dataURI, metaData };\n const { id, items } = this;\n\n this.items = { ...items, [id]: obj };\n this.id += 1;\n\n return id;\n } catch (error) {\n throw new Error(_('The obj cannot be uploaded.'));\n }\n }\n\n /**\n * get by id\n */\n getById(id) {\n if (this.items[id]) {\n return this.items[id];\n }\n throw new Error(_('The obj is not found.'));\n }\n\n /**\n * get all obj ids\n */\n listIds({ offset = 0, count = 100, meta = [], search = null }) {\n try {\n const icons = { ...this.items };\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 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 ids cannot be listed.'));\n }\n }\n\n /**\n * delete by id\n */\n deleteById(id) {\n try {\n const obj = this.getById(id);\n delete this.items[id];\n return obj;\n } catch (error) {\n throw new Error(_('The obj cannot be deleted.'));\n }\n }\n\n clean() {\n this.id = 0;\n this.items = {};\n }\n}\n\nexport default MockedProvider;\n","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\");"],"sourceRoot":""}
|
package/Provider.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 = 31);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -106,7 +106,14 @@ module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
|
106
106
|
|
|
107
107
|
/***/ }),
|
|
108
108
|
|
|
109
|
-
/***/
|
|
109
|
+
/***/ 3:
|
|
110
|
+
/***/ (function(module, exports) {
|
|
111
|
+
|
|
112
|
+
module.exports = require("@babel/runtime/helpers/createClass");
|
|
113
|
+
|
|
114
|
+
/***/ }),
|
|
115
|
+
|
|
116
|
+
/***/ 31:
|
|
110
117
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
111
118
|
|
|
112
119
|
"use strict";
|
|
@@ -262,13 +269,6 @@ var Provider = /*#__PURE__*/function () {
|
|
|
262
269
|
|
|
263
270
|
/***/ }),
|
|
264
271
|
|
|
265
|
-
/***/ 3:
|
|
266
|
-
/***/ (function(module, exports) {
|
|
267
|
-
|
|
268
|
-
module.exports = require("@babel/runtime/helpers/createClass");
|
|
269
|
-
|
|
270
|
-
/***/ }),
|
|
271
|
-
|
|
272
272
|
/***/ 4:
|
|
273
273
|
/***/ (function(module, exports) {
|
|
274
274
|
|
package/Provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@babel/runtime/regenerator\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@babel/runtime/regenerator\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///./src/Provider.js","webpack:///external \"@babel/runtime/helpers/asyncToGenerator\""],"names":["Provider","offset","count"],"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,uD;;;;;;;ACAA,kE;;;;;;;ACAA,+D;;;;;;;;;;;;;;;;;;;;;ACAA;;IAEMA,Q;AACF,sBAAc;AAAA;AAAE;AAEhB;AACJ;AACA;;;;;WACI,mBAAU;AACN,YAAM,UAAN,2BAAM,CAAN;AACH;AAED;AACJ;AACA;;;;;yLACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgBC,sBAAhB,cAAgBA,EAAQC,KAAxB,aAAgBD;AAAhB,sBACU,UADV,2BACU,CADV;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;AAIA;AACJ;AACA;;;;;wLACI;AAAA;AAAA;AAAA;AAAA;AAAA,sBACU,UADV,0BACU,CADV;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;AAIA;AACJ;AACA;;;;;yLACI;AAAA;AAAA;AAAA;AAAA;AAAA,sBACU,UADV,uBACU,CADV;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;AAIA;AACJ;AACA;;;;;4LACI;AAAA;AAAA;AAAA;AAAA;AAAA,sBACU,UADV,0BACU,CADV;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;AAKJ,yE;;;;;;;ACzCA,oE","file":"Provider.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 = 31);\n","module.exports = require(\"@babel/runtime/regenerator\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","/* eslint-disable */\n\nclass Provider {\n constructor() {}\n\n /**\n * return provider type\n */\n getType() {\n throw new Error('getType() not implemented');\n }\n\n /**\n * return a list of images\n */\n async listIds({ offset, count }) {\n throw new Error('listIds() not implemented');\n }\n\n /**\n * add an image to the storage\n */\n async upload(dataURI, metaData) {\n throw new Error('upload() not implemented');\n }\n\n /**\n * retrieve imageID\n */\n async getById(imageID) {\n throw new Error('get() not implemented');\n }\n\n /**\n * delete image by imageID\n */\n async deleteById(imageID) {\n throw new Error('delete() not implemented');\n }\n}\n\nexport default Provider;\n","module.exports = require(\"@babel/runtime/helpers/asyncToGenerator\");"],"sourceRoot":""}
|
package/TimezoneContext.js
CHANGED
|
@@ -87,19 +87,26 @@ 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 = 32);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
94
94
|
|
|
95
95
|
/***/ 10:
|
|
96
|
-
/***/ (function(module, exports) {
|
|
96
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
"use strict";
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
Object.defineProperty(exports, "__esModule", {
|
|
102
|
+
value: true
|
|
103
|
+
});
|
|
104
|
+
exports.version = void 0;
|
|
105
|
+
exports.version = '24.2.0';
|
|
99
106
|
|
|
100
107
|
/***/ }),
|
|
101
108
|
|
|
102
|
-
/***/
|
|
109
|
+
/***/ 32:
|
|
103
110
|
/***/ (function(module, exports, __webpack_require__) {
|
|
104
111
|
|
|
105
112
|
"use strict";
|
|
@@ -110,13 +117,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
110
117
|
});
|
|
111
118
|
exports.TimezoneContextConsumer = exports.TimezoneContextProvider = void 0;
|
|
112
119
|
|
|
113
|
-
var React = __webpack_require__(
|
|
120
|
+
var React = __webpack_require__(9);
|
|
121
|
+
|
|
122
|
+
var version_1 = __webpack_require__(10);
|
|
114
123
|
|
|
115
124
|
var TimezoneContext = React.createContext({});
|
|
125
|
+
TimezoneContext.displayName = "data-splunk-visualization-version-TimezoneContext-".concat(version_1.version);
|
|
116
126
|
exports.TimezoneContextProvider = TimezoneContext.Provider;
|
|
117
127
|
exports.TimezoneContextConsumer = TimezoneContext.Consumer;
|
|
118
128
|
exports.default = TimezoneContext;
|
|
119
129
|
|
|
130
|
+
/***/ }),
|
|
131
|
+
|
|
132
|
+
/***/ 9:
|
|
133
|
+
/***/ (function(module, exports) {
|
|
134
|
+
|
|
135
|
+
module.exports = require("react");
|
|
136
|
+
|
|
120
137
|
/***/ })
|
|
121
138
|
|
|
122
139
|
/******/ });
|
package/TimezoneContext.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/version.ts","webpack:///./src/TimezoneContext.ts","webpack:///external \"react\""],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;AClFa,kBAAU,QAAV,C;;;;;;;;;;;;;;;ACAb;;AACA;;AAiBA,IAAM,eAAe,GAAG,KAAK,CAAC,aAAN,CAA8C,EAA9C,CAAxB;AACA,eAAe,CAAC,WAAhB,+DAAmF,iBAAnF;AAEa,kCAA0B,eAAe,CAAC,QAA1C;AACA,kCAA0B,eAAe,CAAC,QAA1C;AACb,kBAAe,eAAf,C;;;;;;;ACvBA,kC","file":"TimezoneContext.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 = 32);\n","export const version = '24.2.0';\n","import * as React from 'react';\nimport { version } from './version';\n\n/**\n * ianaTimezone can be used to specify a timezone corresponding to one of the entries in the IANA time zone database (e.g. America/Los_Angeles)\n *\n * serializedTimezone is Splunk's serialized timezone format and is usually present in enterprise via window.$C.SERVER_ZONEINFO\n * serialized time format examples can be found here https://git.splunk.com/projects/UI/repos/splunk-ui/browse/packages/moment/src/test/timezones\n *\n * utcOffset can be used to specify the desired display timezone via its offset from UTC time in minutes\n * Positive values are west, negative values are east of UTC, as in the ECMAScript getTimezoneOffset method\n */\nexport interface TimezoneContextInterface {\n ianaTimezone?: string;\n serializedTimezone?: string;\n utcOffset?: number;\n}\n\nconst TimezoneContext = React.createContext<TimezoneContextInterface>({});\nTimezoneContext.displayName = `data-splunk-visualization-version-TimezoneContext-${version}`;\n\nexport const TimezoneContextProvider = TimezoneContext.Provider;\nexport const TimezoneContextConsumer = TimezoneContext.Consumer;\nexport default TimezoneContext;\n","module.exports = require(\"react\");"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@splunk/visualization-context",
|
|
3
3
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
4
4
|
"author": "Splunk",
|
|
5
|
-
"version": "24.
|
|
5
|
+
"version": "24.2.0",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "NODE_ENV=production webpack --config ./webpack.config.js --bail",
|
|
8
8
|
"build:ci": "yarn build && yarn docs",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"lint:fix": "eslint src --ext \".js,.jsx,.ts,.tsx\" --fix",
|
|
16
16
|
"test:unit": "jest src/.*",
|
|
17
17
|
"test:unit:ci": "yarn run test:unit",
|
|
18
|
-
"test:unit:watch": "jest --watch src/.*"
|
|
18
|
+
"test:unit:watch": "jest --watch src/.*",
|
|
19
|
+
"generateVersion": "node ./scripts/generateVersion"
|
|
19
20
|
},
|
|
20
21
|
"dependencies": {
|
|
21
22
|
"@babel/runtime": "^7.13.0",
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"@babel/plugin-transform-runtime": "^7.13.0",
|
|
32
33
|
"@splunk/eslint-config": "^4.0.0",
|
|
33
34
|
"@splunk/jsdoc-loader": "^3.0.0",
|
|
34
|
-
"@splunk/visualization-build-tools": "^24.
|
|
35
|
+
"@splunk/visualization-build-tools": "^24.2.0",
|
|
35
36
|
"@splunk/webpack-configs": "^4.0.0",
|
|
36
37
|
"babel-jest": "^26.0.0",
|
|
37
38
|
"babel-loader": "^8.2.1",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const { execSync } = require('child_process');
|
|
4
|
+
let SHA = '';
|
|
5
|
+
|
|
6
|
+
if (process.argv[2] === 'includeGitHash') {
|
|
7
|
+
SHA = ` - ${execSync('git rev-parse --short HEAD', { encoding: 'utf8' }).split('\n').join('')}`;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
fs.writeFileSync(
|
|
11
|
+
'./src/version.ts',
|
|
12
|
+
`export const version = '${JSON.parse(fs.readFileSync('package.json', 'utf8')).version}${SHA}';\n`
|
|
13
|
+
);
|
package/testDataURIs.js
CHANGED
|
@@ -87,12 +87,12 @@ 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 = 33);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
94
94
|
|
|
95
|
-
/***/
|
|
95
|
+
/***/ 33:
|
|
96
96
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
97
97
|
|
|
98
98
|
"use strict";
|