@splunk/visualizations-shared 26.4.0 → 27.0.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 (63) hide show
  1. package/.loki/reference/chrome_docker_SizeAwareWrapper_50_parent.png +0 -0
  2. package/.loki/reference/chrome_docker_SizeAwareWrapper_Fix_size_container.png +0 -0
  3. package/.loki/reference/chrome_docker_SizeAwareWrapper_Flex_layout_container.png +0 -0
  4. package/.loki/reference/chrome_docker_SizeAwareWrapper_Flex_layout_container_with_extra_wrapper.png +0 -0
  5. package/Downloader.js +164 -403
  6. package/Downloader.js.map +7 -1
  7. package/FileDownloader.js +121 -557
  8. package/FileDownloader.js.map +7 -1
  9. package/JSONSchemaUtils.js +58 -134
  10. package/JSONSchemaUtils.js.map +7 -1
  11. package/Message.js +105 -270
  12. package/Message.js.map +7 -1
  13. package/RemoteIcon.js +272 -736
  14. package/RemoteIcon.js.map +7 -1
  15. package/RemoteImage.js +190 -458
  16. package/RemoteImage.js.map +7 -1
  17. package/SanitizeProps.js +117 -238
  18. package/SanitizeProps.js.map +7 -1
  19. package/SizeAwareWrapper.js +108 -306
  20. package/SizeAwareWrapper.js.map +7 -1
  21. package/SizeAwareWrapperDeprecated.js +117 -326
  22. package/SizeAwareWrapperDeprecated.js.map +7 -1
  23. package/VisualizationDocPage.js +212 -461
  24. package/VisualizationDocPage.js.map +7 -1
  25. package/colorConstants.js +81 -132
  26. package/colorConstants.js.map +7 -1
  27. package/colorUtils.js +47 -134
  28. package/colorUtils.js.map +7 -1
  29. package/configUtils.js +28 -112
  30. package/configUtils.js.map +7 -1
  31. package/console.js +45 -183
  32. package/console.js.map +7 -1
  33. package/dataSourceUtils.js +45 -140
  34. package/dataSourceUtils.js.map +7 -1
  35. package/domUtils.js +58 -122
  36. package/domUtils.js.map +7 -1
  37. package/hocUtils.js +45 -122
  38. package/hocUtils.js.map +7 -1
  39. package/i18n.js +168 -323
  40. package/i18n.js.map +7 -1
  41. package/iconUtils.js +47 -178
  42. package/iconUtils.js.map +7 -1
  43. package/mapUtils.js +45 -122
  44. package/mapUtils.js.map +7 -1
  45. package/numberUtils.js +101 -275
  46. package/numberUtils.js.map +7 -1
  47. package/package.json +18 -22
  48. package/previewVizMessage.js +28 -108
  49. package/previewVizMessage.js.map +7 -1
  50. package/propUtils.js +88 -212
  51. package/propUtils.js.map +7 -1
  52. package/schemaUtils.js +58 -185
  53. package/schemaUtils.js.map +7 -1
  54. package/simpleXMLOptions.js +142 -225
  55. package/simpleXMLOptions.js.map +7 -1
  56. package/style.js +65 -168
  57. package/style.js.map +7 -1
  58. package/testHelper.js +247 -303
  59. package/testHelper.js.map +7 -1
  60. package/themeUtils.js +63 -142
  61. package/themeUtils.js.map +7 -1
  62. package/trellisUtils.js +108 -276
  63. package/trellisUtils.js.map +7 -1
@@ -1,509 +1,260 @@
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 = 49);
91
- /******/ })
92
- /************************************************************************/
93
- /******/ ([
94
- /* 0 */
95
- /***/ (function(module, exports) {
96
-
97
- module.exports = require("prop-types");
98
-
99
- /***/ }),
100
- /* 1 */
101
- /***/ (function(module, exports) {
102
-
103
- module.exports = require("react");
104
-
105
- /***/ }),
106
- /* 2 */
107
- /***/ (function(module, exports) {
108
-
109
- module.exports = require("@babel/runtime/helpers/defineProperty");
110
-
111
- /***/ }),
112
- /* 3 */
113
- /***/ (function(module, exports) {
114
-
115
- module.exports = require("@babel/runtime/helpers/getPrototypeOf");
116
-
117
- /***/ }),
118
- /* 4 */
119
- /***/ (function(module, exports) {
120
-
121
- module.exports = require("lodash");
122
-
123
- /***/ }),
124
- /* 5 */
125
- /***/ (function(module, exports) {
126
-
127
- module.exports = require("@babel/runtime/helpers/classCallCheck");
128
-
129
- /***/ }),
130
- /* 6 */
131
- /***/ (function(module, exports) {
132
-
133
- module.exports = require("@babel/runtime/helpers/createClass");
134
-
135
- /***/ }),
136
- /* 7 */
137
- /***/ (function(module, exports) {
138
-
139
- module.exports = require("@babel/runtime/helpers/inherits");
140
-
141
- /***/ }),
142
- /* 8 */
143
- /***/ (function(module, exports) {
144
-
145
- module.exports = require("@babel/runtime/helpers/possibleConstructorReturn");
146
-
147
- /***/ }),
148
- /* 9 */,
149
- /* 10 */,
150
- /* 11 */
151
- /***/ (function(module, exports) {
152
-
153
- module.exports = require("@babel/runtime/helpers/assertThisInitialized");
154
-
155
- /***/ }),
156
- /* 12 */,
157
- /* 13 */,
158
- /* 14 */,
159
- /* 15 */,
160
- /* 16 */
161
- /***/ (function(module, exports) {
162
-
163
- module.exports = require("@splunk/react-docs/DockingTabBar");
164
-
165
- /***/ }),
166
- /* 17 */,
167
- /* 18 */,
168
- /* 19 */,
169
- /* 20 */,
170
- /* 21 */,
171
- /* 22 */,
172
- /* 23 */,
173
- /* 24 */,
174
- /* 25 */,
175
- /* 26 */,
176
- /* 27 */,
177
- /* 28 */,
178
- /* 29 */,
179
- /* 30 */,
180
- /* 31 */,
181
- /* 32 */,
182
- /* 33 */
183
- /***/ (function(module, exports) {
184
-
185
- module.exports = require("@babel/runtime/helpers/extends");
186
-
187
- /***/ }),
188
- /* 34 */
189
- /***/ (function(module, exports) {
190
-
191
- module.exports = require("@splunk/react-docs/API");
192
-
193
- /***/ }),
194
- /* 35 */
195
- /***/ (function(module, exports) {
196
-
197
- module.exports = require("@splunk/visualizations-shared/previewVizMessage");
198
-
199
- /***/ }),
200
- /* 36 */,
201
- /* 37 */,
202
- /* 38 */,
203
- /* 39 */,
204
- /* 40 */,
205
- /* 41 */,
206
- /* 42 */,
207
- /* 43 */,
208
- /* 44 */,
209
- /* 45 */,
210
- /* 46 */,
211
- /* 47 */,
212
- /* 48 */,
213
- /* 49 */
214
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
215
-
216
- "use strict";
217
- __webpack_require__.r(__webpack_exports__);
218
- /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33);
219
- /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
220
- /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
221
- /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);
222
- /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
223
- /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);
224
- /* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11);
225
- /* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__);
226
- /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
227
- /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);
228
- /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8);
229
- /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);
230
- /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
231
- /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);
232
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(2);
233
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);
234
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
235
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__);
236
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(0);
237
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_9__);
238
- /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(4);
239
- /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__);
240
- /* harmony import */ var _splunk_react_docs_DockingTabBar__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(16);
241
- /* harmony import */ var _splunk_react_docs_DockingTabBar__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_docs_DockingTabBar__WEBPACK_IMPORTED_MODULE_11__);
242
- /* harmony import */ var _splunk_react_docs_API__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(34);
243
- /* harmony import */ var _splunk_react_docs_API__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_docs_API__WEBPACK_IMPORTED_MODULE_12__);
244
- /* harmony import */ var _splunk_visualizations_shared_previewVizMessage__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(35);
245
- /* harmony import */ var _splunk_visualizations_shared_previewVizMessage__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_previewVizMessage__WEBPACK_IMPORTED_MODULE_13__);
246
-
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
- function _createSuper(Derived) {
256
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
257
-
258
- return function _createSuperInternal() {
259
- var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(Derived),
260
- result;
261
-
262
- if (hasNativeReflectConstruct) {
263
- var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(this).constructor;
264
-
265
- result = Reflect.construct(Super, arguments, NewTarget);
266
- } else {
267
- 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 __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
268
21
  }
269
-
270
- return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, result);
271
- };
272
- }
273
-
274
- function _isNativeReflectConstruct() {
275
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
276
- if (Reflect.construct.sham) return false;
277
- if (typeof Proxy === "function") return true;
278
-
279
- try {
280
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
281
- return true;
282
- } catch (e) {
283
- return false;
22
+ return a;
23
+ };
24
+ var __export = (target, all) => {
25
+ for (var name in all)
26
+ __defProp(target, name, { get: all[name], enumerable: true });
27
+ };
28
+ var __copyProps = (to, from, except, desc) => {
29
+ if (from && typeof from === "object" || typeof from === "function") {
30
+ for (let key of __getOwnPropNames(from))
31
+ if (!__hasOwnProp.call(to, key) && key !== except)
32
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
284
33
  }
285
- }
286
-
287
-
288
-
289
-
290
-
291
-
292
-
293
-
294
- var ComponentPage = /*#__PURE__*/function (_Component) {
295
- _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(ComponentPage, _Component);
296
-
297
- var _super = _createSuper(ComponentPage);
298
-
299
- function ComponentPage() {
300
- var _this;
301
-
302
- _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComponentPage);
303
-
304
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
305
- args[_key] = arguments[_key];
306
- }
307
-
308
- _this = _super.call.apply(_super, [this].concat(args));
34
+ return to;
35
+ };
36
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
37
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
38
+ // If the importer is in node compatibility mode or this is not an ESM
39
+ // file that has been converted to a CommonJS file using a Babel-
40
+ // compatible transform (i.e. "__esModule" has not been set), then set
41
+ // "default" to the CommonJS "module.exports" for node compatibility.
42
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
43
+ mod
44
+ ));
45
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
46
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
47
+
48
+ // src/VisualizationDocPage.jsx
49
+ var VisualizationDocPage_exports = {};
50
+ __export(VisualizationDocPage_exports, {
51
+ default: () => VisualizationDocPage_default
52
+ });
53
+ module.exports = __toCommonJS(VisualizationDocPage_exports);
309
54
 
310
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), "handleBodyMount", function (el) {
311
- _this.bodyEl = el;
55
+ // esm-externals:react
56
+ var react_exports = {};
57
+ __export(react_exports, {
58
+ default: () => react_default
59
+ });
60
+ var defaultImport = __toESM(require("react"));
61
+ __reExport(react_exports, require("react"));
62
+ var react_default = "default" in defaultImport ? defaultImport.default : defaultImport;
63
+
64
+ // esm-externals:prop-types
65
+ var prop_types_exports = {};
66
+ __export(prop_types_exports, {
67
+ default: () => prop_types_default
68
+ });
69
+ var defaultImport2 = __toESM(require("prop-types"));
70
+ __reExport(prop_types_exports, require("prop-types"));
71
+ var prop_types_default = "default" in defaultImport2 ? defaultImport2.default : defaultImport2;
72
+
73
+ // esm-externals:lodash
74
+ var lodash_exports = {};
75
+ __export(lodash_exports, {
76
+ default: () => lodash_default
77
+ });
78
+ var defaultImport3 = __toESM(require("lodash"));
79
+ __reExport(lodash_exports, require("lodash"));
80
+ var lodash_default = "default" in defaultImport3 ? defaultImport3.default : defaultImport3;
81
+
82
+ // esm-externals:@splunk/react-docs/DockingTabBar
83
+ var DockingTabBar_exports = {};
84
+ __export(DockingTabBar_exports, {
85
+ default: () => DockingTabBar_default
86
+ });
87
+ var defaultImport4 = __toESM(require("@splunk/react-docs/DockingTabBar"));
88
+ __reExport(DockingTabBar_exports, require("@splunk/react-docs/DockingTabBar"));
89
+ var DockingTabBar_default = "default" in defaultImport4 ? defaultImport4.default : defaultImport4;
90
+
91
+ // esm-externals:@splunk/react-docs/API
92
+ var API_exports = {};
93
+ __export(API_exports, {
94
+ default: () => API_default
95
+ });
96
+ var defaultImport5 = __toESM(require("@splunk/react-docs/API"));
97
+ __reExport(API_exports, require("@splunk/react-docs/API"));
98
+ var API_default = "default" in defaultImport5 ? defaultImport5.default : defaultImport5;
99
+
100
+ // esm-externals:@splunk/visualizations-shared/previewVizMessage
101
+ var previewVizMessage_exports = {};
102
+ __export(previewVizMessage_exports, {
103
+ default: () => previewVizMessage_default
104
+ });
105
+ var defaultImport6 = __toESM(require("@splunk/visualizations-shared/previewVizMessage"));
106
+ __reExport(previewVizMessage_exports, require("@splunk/visualizations-shared/previewVizMessage"));
107
+ var previewVizMessage_default = "default" in defaultImport6 ? defaultImport6.default : defaultImport6;
108
+
109
+ // src/VisualizationDocPage.jsx
110
+ var _ComponentPage = class _ComponentPage extends react_exports.Component {
111
+ constructor(...args) {
112
+ super(...args);
113
+ __publicField(this, "handleBodyMount", (el) => {
114
+ this.bodyEl = el;
312
115
  });
313
-
314
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), "handleSectionChange", function (e, _ref) {
315
- var selectedTabId = _ref.selectedTabId;
316
- ComponentPage.currentSection = selectedTabId;
317
-
318
- _this.setState({
319
- activeSection: selectedTabId
320
- }, function () {
321
- // After the new section loads, scroll to the top of the section.
322
- var _this$bodyEl$getBound = _this.bodyEl.getBoundingClientRect(),
323
- top = _this$bodyEl$getBound.top;
324
-
116
+ __publicField(this, "handleSectionChange", (e, { selectedTabId }) => {
117
+ _ComponentPage.currentSection = selectedTabId;
118
+ this.setState({ activeSection: selectedTabId }, () => {
119
+ const { top } = this.bodyEl.getBoundingClientRect();
325
120
  if (top < window.scrollY) {
326
- var target = top + window.scrollY - 90;
121
+ const target = top + window.scrollY - 90;
327
122
  window.scroll(0, target);
328
123
  }
329
124
  });
330
125
  });
331
-
332
- _this.state = {
333
- activeSection: ComponentPage.currentSection
334
- };
335
- return _this;
126
+ this.state = { activeSection: _ComponentPage.currentSection };
336
127
  }
337
-
338
- _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComponentPage, [{
339
- key: "renderBody",
340
- value: function renderBody() {
341
- var _this$props = this.props,
342
- encodingSection = _this$props.encodingSection,
343
- optionSection = _this$props.optionSection,
344
- overviewSection = _this$props.overviewSection,
345
- conceptsSection = _this$props.conceptsSection,
346
- examplesSection = _this$props.examplesSection,
347
- eventSection = _this$props.eventSection,
348
- themeSection = _this$props.themeSection;
349
- var activeSection = this.state.activeSection;
350
-
351
- switch (activeSection) {
352
- case 'concepts':
353
- return conceptsSection;
354
-
355
- case 'overview':
356
- return overviewSection;
357
-
358
- case 'examples':
359
- return examplesSection;
360
-
361
- case 'encoding':
362
- return encodingSection;
363
-
364
- case 'option':
365
- return optionSection;
366
-
367
- case 'event':
368
- return eventSection;
369
-
370
- case 'theme':
371
- return themeSection;
372
-
373
- default:
374
- return null;
375
- }
128
+ renderBody() {
129
+ const {
130
+ encodingSection,
131
+ optionSection,
132
+ overviewSection,
133
+ conceptsSection,
134
+ examplesSection,
135
+ eventSection,
136
+ themeSection
137
+ } = this.props;
138
+ const { activeSection } = this.state;
139
+ switch (activeSection) {
140
+ case "concepts":
141
+ return conceptsSection;
142
+ case "overview":
143
+ return overviewSection;
144
+ case "examples":
145
+ return examplesSection;
146
+ case "encoding":
147
+ return encodingSection;
148
+ case "option":
149
+ return optionSection;
150
+ case "event":
151
+ return eventSection;
152
+ case "theme":
153
+ return themeSection;
154
+ default:
155
+ return null;
376
156
  }
377
- }, {
378
- key: "render",
379
- value: function render() {
380
- var _this$props2 = this.props,
381
- createComponentURL = _this$props2.createComponentURL,
382
- conceptsSection = _this$props2.conceptsSection,
383
- overviewSection = _this$props2.overviewSection,
384
- examplesSection = _this$props2.examplesSection,
385
- encodingSection = _this$props2.encodingSection,
386
- eventSection = _this$props2.eventSection,
387
- themeSection = _this$props2.themeSection,
388
- headerOffset = _this$props2.headerOffset,
389
- sourceURL = _this$props2.sourceURL;
390
- var basePageProps = Object(lodash__WEBPACK_IMPORTED_MODULE_10__["pick"])(this.props, 'dependsOnSplunk', 'description', 'title');
391
-
392
- if (this.props.status === 'preview') {
393
- basePageProps.description = "#### ".concat(_splunk_visualizations_shared_previewVizMessage__WEBPACK_IMPORTED_MODULE_13___default.a, " \n ").concat(basePageProps.description || '');
394
- }
395
-
396
- var activeSection = this.state.activeSection;
397
- var body = this.renderBody();
398
-
399
- if (!body) {
400
- body = examplesSection;
401
- activeSection = 'examples';
402
- }
403
-
404
- 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()({
405
- sourceURL: sourceURL || createComponentURL(window.location.pathname)
406
- }, basePageProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_docs_DockingTabBar__WEBPACK_IMPORTED_MODULE_11___default.a, {
157
+ }
158
+ render() {
159
+ const {
160
+ createComponentURL,
161
+ conceptsSection,
162
+ overviewSection,
163
+ examplesSection,
164
+ encodingSection,
165
+ eventSection,
166
+ themeSection,
167
+ headerOffset,
168
+ sourceURL
169
+ } = this.props;
170
+ const basePageProps = (0, lodash_exports.pick)(this.props, "dependsOnSplunk", "description", "title");
171
+ if (this.props.status === "preview") {
172
+ basePageProps.description = `#### ${previewVizMessage_default}
173
+ ${basePageProps.description || ""}`;
174
+ }
175
+ let { activeSection } = this.state;
176
+ let body = this.renderBody();
177
+ if (!body) {
178
+ body = examplesSection;
179
+ activeSection = "examples";
180
+ }
181
+ return /* @__PURE__ */ react_default.createElement(API_default, __spreadValues({ sourceURL: sourceURL || createComponentURL(window.location.pathname) }, basePageProps), /* @__PURE__ */ react_default.createElement(
182
+ DockingTabBar_default,
183
+ {
407
184
  activeTabId: activeSection,
408
185
  offset: headerOffset,
409
186
  onChange: this.handleSectionChange
410
- }, overviewSection && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_docs_DockingTabBar__WEBPACK_IMPORTED_MODULE_11__["Tab"], {
411
- label: "Overview",
412
- tabId: "overview"
413
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_docs_DockingTabBar__WEBPACK_IMPORTED_MODULE_11__["Tab"], {
414
- label: "Examples",
415
- tabId: "examples"
416
- }), encodingSection && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_docs_DockingTabBar__WEBPACK_IMPORTED_MODULE_11__["Tab"], {
417
- label: "Encoding",
418
- tabId: "encoding"
419
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_docs_DockingTabBar__WEBPACK_IMPORTED_MODULE_11__["Tab"], {
420
- label: "Options",
421
- tabId: "option"
422
- }), eventSection && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_docs_DockingTabBar__WEBPACK_IMPORTED_MODULE_11__["Tab"], {
423
- label: "Events",
424
- tabId: "event"
425
- }), themeSection && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_docs_DockingTabBar__WEBPACK_IMPORTED_MODULE_11__["Tab"], {
426
- label: "Themes",
427
- tabId: "theme"
428
- }), conceptsSection && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_docs_DockingTabBar__WEBPACK_IMPORTED_MODULE_11__["Tab"], {
429
- label: "Concepts",
430
- tabId: "concepts"
431
- })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", {
187
+ },
188
+ overviewSection && /* @__PURE__ */ react_default.createElement(DockingTabBar_exports.Tab, { label: "Overview", tabId: "overview" }),
189
+ /* @__PURE__ */ react_default.createElement(DockingTabBar_exports.Tab, { label: "Examples", tabId: "examples" }),
190
+ encodingSection && /* @__PURE__ */ react_default.createElement(DockingTabBar_exports.Tab, { label: "Encoding", tabId: "encoding" }),
191
+ /* @__PURE__ */ react_default.createElement(DockingTabBar_exports.Tab, { label: "Options", tabId: "option" }),
192
+ eventSection && /* @__PURE__ */ react_default.createElement(DockingTabBar_exports.Tab, { label: "Events", tabId: "event" }),
193
+ themeSection && /* @__PURE__ */ react_default.createElement(DockingTabBar_exports.Tab, { label: "Themes", tabId: "theme" }),
194
+ conceptsSection && /* @__PURE__ */ react_default.createElement(DockingTabBar_exports.Tab, { label: "Concepts", tabId: "concepts" })
195
+ ), /* @__PURE__ */ react_default.createElement(
196
+ "div",
197
+ {
432
198
  style: {
433
- padding: '0 30px 30px',
434
- marginTop: '20px'
199
+ padding: "0 30px 30px",
200
+ marginTop: "20px"
435
201
  },
436
202
  ref: this.handleBodyMount
437
- }, body));
438
- }
439
- }]);
440
-
441
- return ComponentPage;
442
- }(react__WEBPACK_IMPORTED_MODULE_8__["Component"]);
443
-
444
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(ComponentPage, "currentSection", 'overview');
445
-
446
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(ComponentPage, "propTypes", {
447
- createComponentURL: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func,
448
- dependsOnSplunk: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.bool,
449
-
203
+ },
204
+ body
205
+ ));
206
+ }
207
+ };
208
+ __publicField(_ComponentPage, "currentSection", "overview");
209
+ __publicField(_ComponentPage, "propTypes", {
210
+ createComponentURL: prop_types_default.func,
211
+ dependsOnSplunk: prop_types_default.bool,
450
212
  /**
451
213
  * If status is `preview`, a message is prepended to the description reflecting this visualization is new
452
214
  * and minor changes may be made soon.
453
215
  */
454
- status: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string,
455
- description: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string,
456
-
216
+ status: prop_types_default.string,
217
+ description: prop_types_default.string,
457
218
  /**
458
219
  * The "overview" section of the doc page.
459
220
  */
460
- overviewSection: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.node,
461
-
221
+ overviewSection: prop_types_default.node,
462
222
  /**
463
223
  * The "concepts" section of the doc page.
464
224
  */
465
- conceptsSection: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.node,
466
-
225
+ conceptsSection: prop_types_default.node,
467
226
  /**
468
227
  * The "examples" section of the doc page.
469
228
  */
470
- examplesSection: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.node.isRequired,
471
-
229
+ examplesSection: prop_types_default.node.isRequired,
472
230
  /**
473
231
  * The "options" section of the doc page.
474
232
  */
475
- optionSection: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.node.isRequired,
476
-
233
+ optionSection: prop_types_default.node.isRequired,
477
234
  /**
478
235
  * The "encoding" section of the doc page.
479
236
  */
480
- encodingSection: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.node,
481
-
237
+ encodingSection: prop_types_default.node,
482
238
  /**
483
239
  * The "event" section of the doc page.
484
240
  */
485
- eventSection: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.node,
486
-
241
+ eventSection: prop_types_default.node,
487
242
  /**
488
243
  * The "theme" section of the doc page
489
244
  */
490
- themeSection: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.node,
491
- headerOffset: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.number,
492
-
245
+ themeSection: prop_types_default.node,
246
+ headerOffset: prop_types_default.number,
493
247
  /**
494
248
  * Overrides the (otherwise automatically generated) source code url.
495
249
  */
496
- sourceURL: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string,
497
- title: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string.isRequired
250
+ sourceURL: prop_types_default.string,
251
+ title: prop_types_default.string.isRequired
498
252
  });
499
-
500
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(ComponentPage, "defaultProps", {
501
- createComponentURL: function createComponentURL() {},
253
+ __publicField(_ComponentPage, "defaultProps", {
254
+ createComponentURL() {
255
+ },
502
256
  headerOffset: 0
503
257
  });
504
-
505
- /* harmony default export */ __webpack_exports__["default"] = (ComponentPage);
506
-
507
- /***/ })
508
- /******/ ]);
509
- //# sourceMappingURL=VisualizationDocPage.js.map
258
+ var ComponentPage = _ComponentPage;
259
+ var VisualizationDocPage_default = ComponentPage;
260
+ //# sourceMappingURL=VisualizationDocPage.js.map