@splunk/visualizations-shared 26.4.1 → 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
package/i18n.js CHANGED
@@ -1,275 +1,156 @@
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 = 57);
91
- /******/ })
92
- /************************************************************************/
93
- /******/ ({
94
-
95
- /***/ 15:
96
- /***/ (function(module, exports) {
97
-
98
- module.exports = require("@splunk/moment");
99
-
100
- /***/ }),
101
-
102
- /***/ 23:
103
- /***/ (function(module, exports) {
104
-
105
- module.exports = require("numeral");
106
-
107
- /***/ }),
108
-
109
- /***/ 57:
110
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
111
-
112
- "use strict";
113
- __webpack_require__.r(__webpack_exports__);
114
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setI18nFunctions", function() { return setI18nFunctions; });
115
- /* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23);
116
- /* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(numeral__WEBPACK_IMPORTED_MODULE_0__);
117
- /* harmony import */ var _splunk_moment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
118
- /* harmony import */ var _splunk_moment__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_moment__WEBPACK_IMPORTED_MODULE_1__);
119
-
120
-
121
- /**
122
- * Fixme, this is a mock i18n file to workaround window dependency from @splunk/charting
123
- * We need to refactor @splunk/charting to make it independent from globals
124
- */
125
-
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 __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __export = (target, all) => {
11
+ for (var name in all)
12
+ __defProp(target, name, { get: all[name], enumerable: true });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
31
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
+
33
+ // src/i18n.js
34
+ var i18n_exports = {};
35
+ __export(i18n_exports, {
36
+ setI18nFunctions: () => setI18nFunctions
37
+ });
38
+ module.exports = __toCommonJS(i18n_exports);
39
+
40
+ // esm-externals:numeral
41
+ var numeral_exports = {};
42
+ __export(numeral_exports, {
43
+ default: () => numeral_default
44
+ });
45
+ var defaultImport = __toESM(require("numeral"));
46
+ __reExport(numeral_exports, require("numeral"));
47
+ var numeral_default = "default" in defaultImport ? defaultImport.default : defaultImport;
48
+
49
+ // esm-externals:@splunk/moment
50
+ var moment_exports = {};
51
+ __export(moment_exports, {
52
+ default: () => moment_default
53
+ });
54
+ var defaultImport2 = __toESM(require("@splunk/moment"));
55
+ __reExport(moment_exports, require("@splunk/moment"));
56
+ var moment_default = "default" in defaultImport2 ? defaultImport2.default : defaultImport2;
57
+
58
+ // src/i18n.js
126
59
  var quarters = {
127
- 1: '1st quarter',
128
- 2: '2nd quarter',
129
- 3: '3rd quarter',
130
- 4: '4th quarter'
60
+ 1: "1st quarter",
61
+ 2: "2nd quarter",
62
+ 3: "3rd quarter",
63
+ 4: "4th quarter"
131
64
  };
132
65
  var days = {
133
- 0: 'Monday',
134
- 1: 'Tuesday',
135
- 2: 'Wednesday',
136
- 3: 'Thursday',
137
- 4: 'Friday',
138
- 5: 'Saturday',
139
- 6: 'Sunday'
66
+ 0: "Monday",
67
+ 1: "Tuesday",
68
+ 2: "Wednesday",
69
+ 3: "Thursday",
70
+ 4: "Friday",
71
+ 5: "Saturday",
72
+ 6: "Sunday"
140
73
  };
141
74
  var months = {
142
- 1: 'January',
143
- 2: 'February',
144
- 3: 'March',
145
- 4: 'April',
146
- 5: 'May',
147
- 6: 'June',
148
- 7: 'July',
149
- 8: 'August',
150
- 9: 'September',
151
- 10: 'October',
152
- 11: 'November',
153
- 12: 'December'
75
+ 1: "January",
76
+ 2: "February",
77
+ 3: "March",
78
+ 4: "April",
79
+ 5: "May",
80
+ 6: "June",
81
+ 7: "July",
82
+ 8: "August",
83
+ 9: "September",
84
+ 10: "October",
85
+ 11: "November",
86
+ 12: "December"
154
87
  };
155
88
  var narrowMonths = {
156
- 1: 'J',
157
- 2: 'F',
158
- 3: 'M',
159
- 4: 'A',
160
- 5: 'M',
161
- 6: 'J',
162
- 7: 'J',
163
- 8: 'A',
164
- 9: 'S',
165
- 10: 'O',
166
- 11: 'N',
167
- 12: 'D'
89
+ 1: "J",
90
+ 2: "F",
91
+ 3: "M",
92
+ 4: "A",
93
+ 5: "M",
94
+ 6: "J",
95
+ 7: "J",
96
+ 8: "A",
97
+ 9: "S",
98
+ 10: "O",
99
+ 11: "N",
100
+ 12: "D"
168
101
  };
169
102
  var localeDefinition = {
170
103
  date_formats: {
171
- medium: {
172
- pattern: 'MMM d, yyyy',
173
- format: '%(MMM)s %(d)s, %(yyyy)s'
174
- },
175
- long: {
176
- pattern: 'MMMM d, yyyy',
177
- format: '%(MMMM)s %(d)s, %(yyyy)s'
178
- },
179
- short: {
180
- pattern: 'M/d/yy',
181
- format: '%(M)s/%(d)s/%(yy)s'
182
- },
183
- full: {
184
- pattern: 'EEEE, MMMM d, yyyy',
185
- format: '%(EEEE)s, %(MMMM)s %(d)s, %(yyyy)s'
186
- }
104
+ medium: { pattern: "MMM d, yyyy", format: "%(MMM)s %(d)s, %(yyyy)s" },
105
+ long: { pattern: "MMMM d, yyyy", format: "%(MMMM)s %(d)s, %(yyyy)s" },
106
+ short: { pattern: "M/d/yy", format: "%(M)s/%(d)s/%(yy)s" },
107
+ full: { pattern: "EEEE, MMMM d, yyyy", format: "%(EEEE)s, %(MMMM)s %(d)s, %(yyyy)s" }
187
108
  },
188
109
  quarters: {
189
- 'stand-alone': {
110
+ "stand-alone": {
190
111
  wide: quarters,
191
112
  abbreviated: quarters,
192
- narrow: {
193
- 1: '1',
194
- 2: '2',
195
- 3: '3',
196
- 4: '4'
197
- }
113
+ narrow: { 1: "1", 2: "2", 3: "3", 4: "4" }
198
114
  },
199
115
  format: {
200
116
  wide: quarters,
201
- abbreviated: {
202
- 1: 'Q1',
203
- 2: 'Q2',
204
- 3: 'Q3',
205
- 4: 'Q4'
206
- },
207
- narrow: {
208
- 1: '1',
209
- 2: '2',
210
- 3: '3',
211
- 4: '4'
212
- }
117
+ abbreviated: { 1: "Q1", 2: "Q2", 3: "Q3", 4: "Q4" },
118
+ narrow: { 1: "1", 2: "2", 3: "3", 4: "4" }
213
119
  }
214
120
  },
215
121
  min_week_days: 1,
216
122
  days: {
217
- 'stand-alone': {
123
+ "stand-alone": {
218
124
  wide: days,
219
125
  abbreviated: days,
220
- narrow: {
221
- 0: 'M',
222
- 1: 'T',
223
- 2: 'W',
224
- 3: 'T',
225
- 4: 'F',
226
- 5: 'S',
227
- 6: 'S'
228
- }
126
+ narrow: { 0: "M", 1: "T", 2: "W", 3: "T", 4: "F", 5: "S", 6: "S" }
229
127
  },
230
128
  format: {
231
129
  wide: days,
232
130
  abbreviated: {
233
- 0: 'Mon',
234
- 1: 'Tue',
235
- 2: 'Wed',
236
- 3: 'Thu',
237
- 4: 'Fri',
238
- 5: 'Sat',
239
- 6: 'Sun'
131
+ 0: "Mon",
132
+ 1: "Tue",
133
+ 2: "Wed",
134
+ 3: "Thu",
135
+ 4: "Fri",
136
+ 5: "Sat",
137
+ 6: "Sun"
240
138
  },
241
- narrow: {
242
- 0: 'M',
243
- 1: 'T',
244
- 2: 'W',
245
- 3: 'T',
246
- 4: 'F',
247
- 5: 'S',
248
- 6: 'S'
249
- }
139
+ narrow: { 0: "M", 1: "T", 2: "W", 3: "T", 4: "F", 5: "S", 6: "S" }
250
140
  }
251
141
  },
252
142
  eras: {
253
- wide: {
254
- 0: 'Before Christ',
255
- 1: 'Anno Domini'
256
- },
257
- abbreviated: {
258
- 0: 'BC',
259
- 1: 'AD'
260
- },
261
- narrow: {
262
- 0: 'B',
263
- 1: 'A'
264
- }
143
+ wide: { 0: "Before Christ", 1: "Anno Domini" },
144
+ abbreviated: { 0: "BC", 1: "AD" },
145
+ narrow: { 0: "B", 1: "A" }
265
146
  },
266
- percent_format: '#,##0%',
267
- scientific_format: '#E0',
147
+ percent_format: "#,##0%",
148
+ scientific_format: "#E0",
268
149
  first_week_day: 6,
269
- group_symbol: ',',
270
- minus_sign: '-',
150
+ group_symbol: ",",
151
+ minus_sign: "-",
271
152
  months: {
272
- 'stand-alone': {
153
+ "stand-alone": {
273
154
  wide: months,
274
155
  abbreviated: months,
275
156
  narrow: narrowMonths
@@ -277,108 +158,72 @@ var localeDefinition = {
277
158
  format: {
278
159
  wide: months,
279
160
  abbreviated: {
280
- 1: 'Jan',
281
- 2: 'Feb',
282
- 3: 'Mar',
283
- 4: 'Apr',
284
- 5: 'May',
285
- 6: 'Jun',
286
- 7: 'Jul',
287
- 8: 'Aug',
288
- 9: 'Sep',
289
- 10: 'Oct',
290
- 11: 'Nov',
291
- 12: 'Dec'
161
+ 1: "Jan",
162
+ 2: "Feb",
163
+ 3: "Mar",
164
+ 4: "Apr",
165
+ 5: "May",
166
+ 6: "Jun",
167
+ 7: "Jul",
168
+ 8: "Aug",
169
+ 9: "Sep",
170
+ 10: "Oct",
171
+ 11: "Nov",
172
+ 12: "Dec"
292
173
  },
293
174
  narrow: narrowMonths
294
175
  }
295
176
  },
296
- decimal_symbol: '.',
297
- periods: {
298
- am: 'AM',
299
- pm: 'PM'
300
- },
301
- datetime_formats: {
302
- null: '{1} {0}'
303
- },
304
- exp_symbol: 'E',
305
- locale_name: 'en_US',
306
- number_format: '#,##0.###',
307
- plus_sign: '+',
177
+ decimal_symbol: ".",
178
+ periods: { am: "AM", pm: "PM" },
179
+ datetime_formats: { null: "{1} {0}" },
180
+ exp_symbol: "E",
181
+ locale_name: "en_US",
182
+ number_format: "#,##0.###",
183
+ plus_sign: "+",
308
184
  time_formats: {
309
- medium: {
310
- pattern: 'h:mm:ss a',
311
- format: '%(h)s:%(mm)s:%(ss)s %(a)s'
312
- },
313
- long: {
314
- pattern: 'h:mm:ss a z',
315
- format: '%(h)s:%(mm)s:%(ss)s %(a)s %(z)s'
316
- },
317
- short: {
318
- pattern: 'h:mm a',
319
- format: '%(h)s:%(mm)s %(a)s'
320
- },
321
- full: {
322
- pattern: 'h:mm:ss a v',
323
- format: '%(h)s:%(mm)s:%(ss)s %(a)s %(v)s'
324
- }
185
+ medium: { pattern: "h:mm:ss a", format: "%(h)s:%(mm)s:%(ss)s %(a)s" },
186
+ long: { pattern: "h:mm:ss a z", format: "%(h)s:%(mm)s:%(ss)s %(a)s %(z)s" },
187
+ short: { pattern: "h:mm a", format: "%(h)s:%(mm)s %(a)s" },
188
+ full: { pattern: "h:mm:ss a v", format: "%(h)s:%(mm)s:%(ss)s %(a)s %(v)s" }
325
189
  }
326
190
  };
327
191
  var i18n = {
328
- format_decimal: function format_decimal(num, format) {
329
- return numeral__WEBPACK_IMPORTED_MODULE_0___default()(num).format(format);
330
- },
331
- format_number: function format_number(num, format) {
332
- return numeral__WEBPACK_IMPORTED_MODULE_0___default()(num).format(format);
333
- },
334
- format_percent: function format_percent(num) {
335
- return numeral__WEBPACK_IMPORTED_MODULE_0___default()(num).format('0%');
336
- },
337
- format_scientific: function format_scientific(num) {
338
- return numeral__WEBPACK_IMPORTED_MODULE_0___default()(num).format('0,0e+0');
339
- },
340
- format_date: function format_date(num, format) {
341
- return _splunk_moment__WEBPACK_IMPORTED_MODULE_1___default()(num).format(localeDefinition.date_formats[format] ? localeDefinition.date_formats[format].pattern : format);
192
+ format_decimal: (num, format) => numeral_default(num).format(format),
193
+ format_number: (num, format) => numeral_default(num).format(format),
194
+ format_percent: (num) => numeral_default(num).format("0%"),
195
+ format_scientific: (num) => numeral_default(num).format("0,0e+0"),
196
+ format_date: (num, format) => moment_default(num).format(
197
+ localeDefinition.date_formats[format] ? localeDefinition.date_formats[format].pattern : format
198
+ ),
199
+ format_datetime: (num, dateFormat) => {
200
+ moment_default(num).format(
201
+ localeDefinition.time_formats[dateFormat] ? localeDefinition.time_formats[dateFormat].pattern : dateFormat
202
+ );
342
203
  },
343
- format_datetime: function format_datetime(num, dateFormat) {
344
- _splunk_moment__WEBPACK_IMPORTED_MODULE_1___default()(num).format(localeDefinition.time_formats[dateFormat] ? localeDefinition.time_formats[dateFormat].pattern : dateFormat);
345
- },
346
- format_time: function format_time(num, format) {
347
- return _splunk_moment__WEBPACK_IMPORTED_MODULE_1___default()(num).format(localeDefinition.time_formats[format] ? localeDefinition.time_formats[format].pattern : format);
348
- },
349
- format_datetime_microseconds: function format_datetime_microseconds(num, format) {
350
- return _splunk_moment__WEBPACK_IMPORTED_MODULE_1___default()(num).format(localeDefinition.time_formats[format] ? localeDefinition.time_formats[format].pattern : format);
351
- },
352
- format_time_microseconds: function format_time_microseconds(num, format) {
353
- return _splunk_moment__WEBPACK_IMPORTED_MODULE_1___default()(num).format(localeDefinition.time_formats[format] ? localeDefinition.time_formats[format].pattern : format);
354
- }
204
+ format_time: (num, format) => moment_default(num).format(
205
+ localeDefinition.time_formats[format] ? localeDefinition.time_formats[format].pattern : format
206
+ ),
207
+ format_datetime_microseconds: (num, format) => moment_default(num).format(
208
+ localeDefinition.time_formats[format] ? localeDefinition.time_formats[format].pattern : format
209
+ ),
210
+ format_time_microseconds: (num, format) => moment_default(num).format(
211
+ localeDefinition.time_formats[format] ? localeDefinition.time_formats[format].pattern : format
212
+ )
355
213
  };
356
- var setI18nFunctions = function setI18nFunctions(global) {
357
- Object.keys(i18n).forEach(function (k) {
214
+ var setI18nFunctions = (global) => {
215
+ Object.keys(i18n).forEach((k) => {
358
216
  if (!global[k]) {
359
- global[k] = i18n[k]; // eslint-disable-line no-param-reassign
217
+ global[k] = i18n[k];
360
218
  }
361
219
  });
362
-
363
220
  if (!global.gettext) {
364
- global.gettext = function (v) {
365
- return v;
366
- }; // eslint-disable-line no-param-reassign
367
-
221
+ global.gettext = (v) => v;
368
222
  }
369
-
370
223
  if (!global.locale_name) {
371
- global.locale_name = function () {
372
- return 'en_US';
373
- }; // eslint-disable-line no-param-reassign
374
-
224
+ global.locale_name = () => "en_US";
375
225
  }
376
-
377
226
  return global;
378
227
  };
379
228
  setI18nFunctions(window);
380
-
381
- /***/ })
382
-
383
- /******/ });
384
- //# sourceMappingURL=i18n.js.map
229
+ //# sourceMappingURL=i18n.js.map
package/i18n.js.map CHANGED
@@ -1 +1,7 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@splunk/moment\"","webpack:///external \"numeral\"","webpack:///./src/i18n.js"],"names":["quarters","days","months","narrowMonths","localeDefinition","date_formats","medium","pattern","format","long","short","full","wide","abbreviated","narrow","min_week_days","eras","percent_format","scientific_format","first_week_day","group_symbol","minus_sign","decimal_symbol","periods","am","pm","datetime_formats","null","exp_symbol","locale_name","number_format","plus_sign","time_formats","i18n","format_decimal","numeral","format_number","format_percent","format_scientific","format_date","moment","format_datetime","format_time","format_datetime_microseconds","format_time_microseconds","setI18nFunctions","Object","global"],"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,2C;;;;;;;ACAA,oC;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAMA,QAAQ,GAAG;AACb,KADa;AAEb,KAFa;AAGb,KAHa;AAIb,KAAG;AAJU,CAAjB;AAOA,IAAMC,IAAI,GAAG;AACT,KADS;AAET,KAFS;AAGT,KAHS;AAIT,KAJS;AAKT,KALS;AAMT,KANS;AAOT,KAAG;AAPM,CAAb;AAUA,IAAMC,MAAM,GAAG;AACX,KADW;AAEX,KAFW;AAGX,KAHW;AAIX,KAJW;AAKX,KALW;AAMX,KANW;AAOX,KAPW;AAQX,KARW;AASX,KATW;AAUX,MAVW;AAWX,MAXW;AAYX,MAAI;AAZO,CAAf;AAeA,IAAMC,YAAY,GAAG;AACjB,KADiB;AAEjB,KAFiB;AAGjB,KAHiB;AAIjB,KAJiB;AAKjB,KALiB;AAMjB,KANiB;AAOjB,KAPiB;AAQjB,KARiB;AASjB,KATiB;AAUjB,MAViB;AAWjB,MAXiB;AAYjB,MAAI;AAZa,CAArB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I,CAACC,MAAM,CAAX,CAAW,CAAX,EAAgB;AACZA,YAAM,CAANA,CAAM,CAANA,GAAYd,IAAI,CADJ,CACI,CAAhBc,CADY,CACS;AACxB;AAHLD;;AAKA,MAAI,CAACC,MAAM,CAAX,SAAqB;AACjBA,UAAM,CAANA,UAAiB,aAAC;AAAA;AADD,KACjBA,CADiB,CACQ;;AAC5B;;AACD,MAAI,CAACA,MAAM,CAAX,aAAyB;AACrBA,UAAM,CAANA,cAAqB;AAAA;AADA,KACrBA,CADqB,CACe;;AACvC;;AACD;AAZG;AAcPF,gBAAgB,CAAhBA,MAAgB,CAAhBA,C","file":"i18n.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 = 57);\n","module.exports = require(\"@splunk/moment\");","module.exports = require(\"numeral\");","import numeral from 'numeral';\nimport moment from '@splunk/moment';\n/**\n * Fixme, this is a mock i18n file to workaround window dependency from @splunk/charting\n * We need to refactor @splunk/charting to make it independent from globals\n */\n\nconst quarters = {\n 1: '1st quarter',\n 2: '2nd quarter',\n 3: '3rd quarter',\n 4: '4th quarter',\n};\n\nconst days = {\n 0: 'Monday',\n 1: 'Tuesday',\n 2: 'Wednesday',\n 3: 'Thursday',\n 4: 'Friday',\n 5: 'Saturday',\n 6: 'Sunday',\n};\n\nconst months = {\n 1: 'January',\n 2: 'February',\n 3: 'March',\n 4: 'April',\n 5: 'May',\n 6: 'June',\n 7: 'July',\n 8: 'August',\n 9: 'September',\n 10: 'October',\n 11: 'November',\n 12: 'December',\n};\n\nconst narrowMonths = {\n 1: 'J',\n 2: 'F',\n 3: 'M',\n 4: 'A',\n 5: 'M',\n 6: 'J',\n 7: 'J',\n 8: 'A',\n 9: 'S',\n 10: 'O',\n 11: 'N',\n 12: 'D',\n};\n\nconst localeDefinition = {\n date_formats: {\n medium: { pattern: 'MMM d, yyyy', format: '%(MMM)s %(d)s, %(yyyy)s' },\n long: { pattern: 'MMMM d, yyyy', format: '%(MMMM)s %(d)s, %(yyyy)s' },\n short: { pattern: 'M/d/yy', format: '%(M)s/%(d)s/%(yy)s' },\n full: { pattern: 'EEEE, MMMM d, yyyy', format: '%(EEEE)s, %(MMMM)s %(d)s, %(yyyy)s' },\n },\n quarters: {\n 'stand-alone': {\n wide: quarters,\n abbreviated: quarters,\n narrow: { 1: '1', 2: '2', 3: '3', 4: '4' },\n },\n format: {\n wide: quarters,\n abbreviated: { 1: 'Q1', 2: 'Q2', 3: 'Q3', 4: 'Q4' },\n narrow: { 1: '1', 2: '2', 3: '3', 4: '4' },\n },\n },\n min_week_days: 1,\n days: {\n 'stand-alone': {\n wide: days,\n abbreviated: days,\n narrow: { 0: 'M', 1: 'T', 2: 'W', 3: 'T', 4: 'F', 5: 'S', 6: 'S' },\n },\n format: {\n wide: days,\n abbreviated: {\n 0: 'Mon',\n 1: 'Tue',\n 2: 'Wed',\n 3: 'Thu',\n 4: 'Fri',\n 5: 'Sat',\n 6: 'Sun',\n },\n narrow: { 0: 'M', 1: 'T', 2: 'W', 3: 'T', 4: 'F', 5: 'S', 6: 'S' },\n },\n },\n eras: {\n wide: { 0: 'Before Christ', 1: 'Anno Domini' },\n abbreviated: { 0: 'BC', 1: 'AD' },\n narrow: { 0: 'B', 1: 'A' },\n },\n percent_format: '#,##0%',\n scientific_format: '#E0',\n first_week_day: 6,\n group_symbol: ',',\n minus_sign: '-',\n months: {\n 'stand-alone': {\n wide: months,\n abbreviated: months,\n narrow: narrowMonths,\n },\n format: {\n wide: months,\n abbreviated: {\n 1: 'Jan',\n 2: 'Feb',\n 3: 'Mar',\n 4: 'Apr',\n 5: 'May',\n 6: 'Jun',\n 7: 'Jul',\n 8: 'Aug',\n 9: 'Sep',\n 10: 'Oct',\n 11: 'Nov',\n 12: 'Dec',\n },\n narrow: narrowMonths,\n },\n },\n decimal_symbol: '.',\n periods: { am: 'AM', pm: 'PM' },\n datetime_formats: { null: '{1} {0}' },\n exp_symbol: 'E',\n locale_name: 'en_US',\n number_format: '#,##0.###',\n plus_sign: '+',\n time_formats: {\n medium: { pattern: 'h:mm:ss a', format: '%(h)s:%(mm)s:%(ss)s %(a)s' },\n long: { pattern: 'h:mm:ss a z', format: '%(h)s:%(mm)s:%(ss)s %(a)s %(z)s' },\n short: { pattern: 'h:mm a', format: '%(h)s:%(mm)s %(a)s' },\n full: { pattern: 'h:mm:ss a v', format: '%(h)s:%(mm)s:%(ss)s %(a)s %(v)s' },\n },\n};\n\nconst i18n = {\n format_decimal: (num, format) => numeral(num).format(format),\n format_number: (num, format) => numeral(num).format(format),\n format_percent: num => numeral(num).format('0%'),\n format_scientific: num => numeral(num).format('0,0e+0'),\n format_date: (num, format) =>\n moment(num).format(\n localeDefinition.date_formats[format] ? localeDefinition.date_formats[format].pattern : format\n ),\n format_datetime: (num, dateFormat) => {\n moment(num).format(\n localeDefinition.time_formats[dateFormat]\n ? localeDefinition.time_formats[dateFormat].pattern\n : dateFormat\n );\n },\n format_time: (num, format) =>\n moment(num).format(\n localeDefinition.time_formats[format] ? localeDefinition.time_formats[format].pattern : format\n ),\n format_datetime_microseconds: (num, format) =>\n moment(num).format(\n localeDefinition.time_formats[format] ? localeDefinition.time_formats[format].pattern : format\n ),\n format_time_microseconds: (num, format) =>\n moment(num).format(\n localeDefinition.time_formats[format] ? localeDefinition.time_formats[format].pattern : format\n ),\n};\n\nexport const setI18nFunctions = global => {\n Object.keys(i18n).forEach(k => {\n if (!global[k]) {\n global[k] = i18n[k]; // eslint-disable-line no-param-reassign\n }\n });\n if (!global.gettext) {\n global.gettext = v => v; // eslint-disable-line no-param-reassign\n }\n if (!global.locale_name) {\n global.locale_name = () => 'en_US'; // eslint-disable-line no-param-reassign\n }\n return global;\n};\nsetI18nFunctions(window);\n"],"sourceRoot":""}
1
+ {
2
+ "version": 3,
3
+ "sources": ["src/i18n.js", "esm-externals:numeral", "esm-externals:@splunk/moment"],
4
+ "sourcesContent": ["import numeral from 'numeral';\nimport moment from '@splunk/moment';\n/**\n * Fixme, this is a mock i18n file to workaround window dependency from @splunk/charting\n * We need to refactor @splunk/charting to make it independent from globals\n */\n\nconst quarters = {\n 1: '1st quarter',\n 2: '2nd quarter',\n 3: '3rd quarter',\n 4: '4th quarter',\n};\n\nconst days = {\n 0: 'Monday',\n 1: 'Tuesday',\n 2: 'Wednesday',\n 3: 'Thursday',\n 4: 'Friday',\n 5: 'Saturday',\n 6: 'Sunday',\n};\n\nconst months = {\n 1: 'January',\n 2: 'February',\n 3: 'March',\n 4: 'April',\n 5: 'May',\n 6: 'June',\n 7: 'July',\n 8: 'August',\n 9: 'September',\n 10: 'October',\n 11: 'November',\n 12: 'December',\n};\n\nconst narrowMonths = {\n 1: 'J',\n 2: 'F',\n 3: 'M',\n 4: 'A',\n 5: 'M',\n 6: 'J',\n 7: 'J',\n 8: 'A',\n 9: 'S',\n 10: 'O',\n 11: 'N',\n 12: 'D',\n};\n\nconst localeDefinition = {\n date_formats: {\n medium: { pattern: 'MMM d, yyyy', format: '%(MMM)s %(d)s, %(yyyy)s' },\n long: { pattern: 'MMMM d, yyyy', format: '%(MMMM)s %(d)s, %(yyyy)s' },\n short: { pattern: 'M/d/yy', format: '%(M)s/%(d)s/%(yy)s' },\n full: { pattern: 'EEEE, MMMM d, yyyy', format: '%(EEEE)s, %(MMMM)s %(d)s, %(yyyy)s' },\n },\n quarters: {\n 'stand-alone': {\n wide: quarters,\n abbreviated: quarters,\n narrow: { 1: '1', 2: '2', 3: '3', 4: '4' },\n },\n format: {\n wide: quarters,\n abbreviated: { 1: 'Q1', 2: 'Q2', 3: 'Q3', 4: 'Q4' },\n narrow: { 1: '1', 2: '2', 3: '3', 4: '4' },\n },\n },\n min_week_days: 1,\n days: {\n 'stand-alone': {\n wide: days,\n abbreviated: days,\n narrow: { 0: 'M', 1: 'T', 2: 'W', 3: 'T', 4: 'F', 5: 'S', 6: 'S' },\n },\n format: {\n wide: days,\n abbreviated: {\n 0: 'Mon',\n 1: 'Tue',\n 2: 'Wed',\n 3: 'Thu',\n 4: 'Fri',\n 5: 'Sat',\n 6: 'Sun',\n },\n narrow: { 0: 'M', 1: 'T', 2: 'W', 3: 'T', 4: 'F', 5: 'S', 6: 'S' },\n },\n },\n eras: {\n wide: { 0: 'Before Christ', 1: 'Anno Domini' },\n abbreviated: { 0: 'BC', 1: 'AD' },\n narrow: { 0: 'B', 1: 'A' },\n },\n percent_format: '#,##0%',\n scientific_format: '#E0',\n first_week_day: 6,\n group_symbol: ',',\n minus_sign: '-',\n months: {\n 'stand-alone': {\n wide: months,\n abbreviated: months,\n narrow: narrowMonths,\n },\n format: {\n wide: months,\n abbreviated: {\n 1: 'Jan',\n 2: 'Feb',\n 3: 'Mar',\n 4: 'Apr',\n 5: 'May',\n 6: 'Jun',\n 7: 'Jul',\n 8: 'Aug',\n 9: 'Sep',\n 10: 'Oct',\n 11: 'Nov',\n 12: 'Dec',\n },\n narrow: narrowMonths,\n },\n },\n decimal_symbol: '.',\n periods: { am: 'AM', pm: 'PM' },\n datetime_formats: { null: '{1} {0}' },\n exp_symbol: 'E',\n locale_name: 'en_US',\n number_format: '#,##0.###',\n plus_sign: '+',\n time_formats: {\n medium: { pattern: 'h:mm:ss a', format: '%(h)s:%(mm)s:%(ss)s %(a)s' },\n long: { pattern: 'h:mm:ss a z', format: '%(h)s:%(mm)s:%(ss)s %(a)s %(z)s' },\n short: { pattern: 'h:mm a', format: '%(h)s:%(mm)s %(a)s' },\n full: { pattern: 'h:mm:ss a v', format: '%(h)s:%(mm)s:%(ss)s %(a)s %(v)s' },\n },\n};\n\nconst i18n = {\n format_decimal: (num, format) => numeral(num).format(format),\n format_number: (num, format) => numeral(num).format(format),\n format_percent: num => numeral(num).format('0%'),\n format_scientific: num => numeral(num).format('0,0e+0'),\n format_date: (num, format) =>\n moment(num).format(\n localeDefinition.date_formats[format] ? localeDefinition.date_formats[format].pattern : format\n ),\n format_datetime: (num, dateFormat) => {\n moment(num).format(\n localeDefinition.time_formats[dateFormat]\n ? localeDefinition.time_formats[dateFormat].pattern\n : dateFormat\n );\n },\n format_time: (num, format) =>\n moment(num).format(\n localeDefinition.time_formats[format] ? localeDefinition.time_formats[format].pattern : format\n ),\n format_datetime_microseconds: (num, format) =>\n moment(num).format(\n localeDefinition.time_formats[format] ? localeDefinition.time_formats[format].pattern : format\n ),\n format_time_microseconds: (num, format) =>\n moment(num).format(\n localeDefinition.time_formats[format] ? localeDefinition.time_formats[format].pattern : format\n ),\n};\n\nexport const setI18nFunctions = global => {\n Object.keys(i18n).forEach(k => {\n if (!global[k]) {\n global[k] = i18n[k]; // eslint-disable-line no-param-reassign\n }\n });\n if (!global.gettext) {\n global.gettext = v => v; // eslint-disable-line no-param-reassign\n }\n if (!global.locale_name) {\n global.locale_name = () => 'en_US'; // eslint-disable-line no-param-reassign\n }\n return global;\n};\nsetI18nFunctions(window);\n", "\nimport * as defaultImport from \"numeral\";\nexport * from \"numeral\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/moment\";\nexport * from \"@splunk/moment\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,2BAAc;AACd,IAAO,iBAAS,a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