@splunk/visualizations 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 (152) hide show
  1. package/Area.config.js +1262 -1600
  2. package/Area.config.js.map +7 -1
  3. package/Area.js +3002 -4930
  4. package/Area.js.map +7 -1
  5. package/Bar.config.js +1247 -1574
  6. package/Bar.config.js.map +7 -1
  7. package/Bar.js +2921 -4843
  8. package/Bar.js.map +7 -1
  9. package/Bubble.config.js +896 -1213
  10. package/Bubble.config.js.map +7 -1
  11. package/Bubble.js +2517 -4483
  12. package/Bubble.js.map +7 -1
  13. package/ChoroplethSvg.config.js +282 -582
  14. package/ChoroplethSvg.config.js.map +7 -1
  15. package/ChoroplethSvg.js +2004 -3810
  16. package/ChoroplethSvg.js.map +7 -1
  17. package/Column.config.js +1208 -1541
  18. package/Column.config.js.map +7 -1
  19. package/Column.js +2930 -4886
  20. package/Column.js.map +7 -1
  21. package/Ellipse.config.js +443 -774
  22. package/Ellipse.config.js.map +7 -1
  23. package/Ellipse.js +1651 -3341
  24. package/Ellipse.js.map +7 -1
  25. package/Events.config.js +207 -492
  26. package/Events.config.js.map +7 -1
  27. package/Events.js +2615 -4649
  28. package/Events.js.map +7 -1
  29. package/FillerGauge.config.js +420 -775
  30. package/FillerGauge.config.js.map +7 -1
  31. package/FillerGauge.js +2137 -4578
  32. package/FillerGauge.js.map +7 -1
  33. package/Image.config.js +144 -411
  34. package/Image.config.js.map +7 -1
  35. package/Image.js +1395 -3048
  36. package/Image.js.map +7 -1
  37. package/Line.config.js +1278 -1625
  38. package/Line.config.js.map +7 -1
  39. package/Line.js +2954 -4926
  40. package/Line.js.map +7 -1
  41. package/LinkGraph.config.js +390 -632
  42. package/LinkGraph.config.js.map +7 -1
  43. package/LinkGraph.js +5243 -6190
  44. package/LinkGraph.js.map +7 -1
  45. package/MIGRATION.md +6 -0
  46. package/Map.config.js +501 -801
  47. package/Map.config.js.map +7 -1
  48. package/Map.js +3369 -5676
  49. package/Map.js.map +7 -1
  50. package/Markdown.config.js +232 -528
  51. package/Markdown.config.js.map +7 -1
  52. package/Markdown.js +1645 -3216
  53. package/Markdown.js.map +7 -1
  54. package/MarkerGauge.config.js +308 -613
  55. package/MarkerGauge.config.js.map +7 -1
  56. package/MarkerGauge.js +2189 -4535
  57. package/MarkerGauge.js.map +7 -1
  58. package/ParallelCoordinates.config.js +282 -581
  59. package/ParallelCoordinates.config.js.map +7 -1
  60. package/ParallelCoordinates.js +2023 -4720
  61. package/ParallelCoordinates.js.map +7 -1
  62. package/Pie.config.js +278 -547
  63. package/Pie.config.js.map +7 -1
  64. package/Pie.js +1996 -3990
  65. package/Pie.js.map +7 -1
  66. package/Punchcard.config.js +291 -578
  67. package/Punchcard.config.js.map +7 -1
  68. package/Punchcard.js +2709 -5042
  69. package/Punchcard.js.map +7 -1
  70. package/Rectangle.config.js +455 -770
  71. package/Rectangle.config.js.map +7 -1
  72. package/Rectangle.js +1638 -3262
  73. package/Rectangle.js.map +7 -1
  74. package/Sankey.config.js +291 -626
  75. package/Sankey.config.js.map +7 -1
  76. package/Sankey.js +2737 -4909
  77. package/Sankey.js.map +7 -1
  78. package/Scatter.config.js +876 -1194
  79. package/Scatter.config.js.map +7 -1
  80. package/Scatter.js +2529 -4477
  81. package/Scatter.js.map +7 -1
  82. package/SingleValue.config.js +819 -1251
  83. package/SingleValue.config.js.map +7 -1
  84. package/SingleValue.js +4203 -7413
  85. package/SingleValue.js.map +7 -1
  86. package/SingleValueBasic.js +382 -1527
  87. package/SingleValueBasic.js.map +7 -1
  88. package/SingleValueIcon.config.js +781 -1207
  89. package/SingleValueIcon.config.js.map +7 -1
  90. package/SingleValueIcon.js +3350 -6285
  91. package/SingleValueIcon.js.map +7 -1
  92. package/SingleValueRadial.config.js +708 -1119
  93. package/SingleValueRadial.config.js.map +7 -1
  94. package/SingleValueRadial.js +3808 -6965
  95. package/SingleValueRadial.js.map +7 -1
  96. package/SparkLine.js +439 -746
  97. package/SparkLine.js.map +7 -1
  98. package/Table.config.js +565 -879
  99. package/Table.config.js.map +7 -1
  100. package/Table.js +3277 -5381
  101. package/Table.js.map +7 -1
  102. package/common/Charting.js +481 -1468
  103. package/common/Charting.js.map +7 -1
  104. package/common/ChartingApi.js +46 -170
  105. package/common/ChartingApi.js.map +7 -1
  106. package/common/DocExampleWithVizSandbox.js +270 -473
  107. package/common/DocExampleWithVizSandbox.js.map +7 -1
  108. package/common/EventsDoc.js +172 -464
  109. package/common/EventsDoc.js.map +7 -1
  110. package/common/GaugeMajorTicks.js +249 -347
  111. package/common/GaugeMajorTicks.js.map +7 -1
  112. package/common/GaugeValueMarker.js +201 -311
  113. package/common/GaugeValueMarker.js.map +7 -1
  114. package/common/OptionsDoc.js +347 -912
  115. package/common/OptionsDoc.js.map +7 -1
  116. package/common/OverviewDoc.js +435 -769
  117. package/common/OverviewDoc.js.map +7 -1
  118. package/common/SplunkVisualization.js +116 -259
  119. package/common/SplunkVisualization.js.map +7 -1
  120. package/common/SplunkVisualizationApi.js +40 -156
  121. package/common/SplunkVisualizationApi.js.map +7 -1
  122. package/common/ThemesDoc.js +271 -420
  123. package/common/ThemesDoc.js.map +7 -1
  124. package/common/chartingUtils.js +140 -312
  125. package/common/chartingUtils.js.map +7 -1
  126. package/common/docUtils.js +148 -266
  127. package/common/docUtils.js.map +7 -1
  128. package/common/gaugeUtils.js +280 -808
  129. package/common/gaugeUtils.js.map +7 -1
  130. package/common/shapeUtils.js +106 -211
  131. package/common/shapeUtils.js.map +7 -1
  132. package/common/utils/configUtils.js +126 -252
  133. package/common/utils/configUtils.js.map +7 -1
  134. package/common/utils/dataUtils.js +217 -812
  135. package/common/utils/dataUtils.js.map +7 -1
  136. package/common/utils/featureFlagUtils.js +53 -133
  137. package/common/utils/featureFlagUtils.js.map +7 -1
  138. package/common/utils/hocUtils.js +32 -122
  139. package/common/utils/hocUtils.js.map +7 -1
  140. package/common/utils/mapUtils.js +502 -1337
  141. package/common/utils/mapUtils.js.map +7 -1
  142. package/common/utils/singleValueUtils.js +462 -1010
  143. package/common/utils/singleValueUtils.js.map +7 -1
  144. package/common/utils/testHelper.js +92 -146
  145. package/common/utils/testHelper.js.map +7 -1
  146. package/common/utils/trellisUtils.js +237 -489
  147. package/common/utils/trellisUtils.js.map +7 -1
  148. package/common/utils/urlUtils.js +28 -112
  149. package/common/utils/urlUtils.js.map +7 -1
  150. package/common/withDashboardViz.js +1168 -2438
  151. package/common/withDashboardViz.js.map +7 -1
  152. package/package.json +52 -43
@@ -1,944 +1,349 @@
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 = 15);
91
- /******/ })
92
- /************************************************************************/
93
- /******/ ([
94
- /* 0 */,
95
- /* 1 */
96
- /***/ (function(module, exports) {
97
-
98
- module.exports = require("@splunk/visualizations-shared/numberUtils");
99
-
100
- /***/ }),
101
- /* 2 */,
102
- /* 3 */,
103
- /* 4 */,
104
- /* 5 */,
105
- /* 6 */,
106
- /* 7 */,
107
- /* 8 */,
108
- /* 9 */,
109
- /* 10 */,
110
- /* 11 */,
111
- /* 12 */,
112
- /* 13 */,
113
- /* 14 */,
114
- /* 15 */
115
- /***/ (function(module, exports, __webpack_require__) {
116
-
117
- "use strict";
118
-
119
-
120
- Object.defineProperty(exports, "__esModule", {
121
- value: true
1
+ /* Copyright © 2020 Splunk Inc.
2
+ SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
3
+ in part without a valid written license from Splunk Inc. is PROHIBITED. */
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __defProps = Object.defineProperties;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
9
+ var __getOwnPropNames = Object.getOwnPropertyNames;
10
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
11
+ var __getProtoOf = Object.getPrototypeOf;
12
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
13
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
14
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15
+ var __spreadValues = (a, b) => {
16
+ for (var prop in b || (b = {}))
17
+ if (__hasOwnProp.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ if (__getOwnPropSymbols)
20
+ for (var prop of __getOwnPropSymbols(b)) {
21
+ if (__propIsEnum.call(b, prop))
22
+ __defNormalProp(a, prop, b[prop]);
23
+ }
24
+ return a;
25
+ };
26
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27
+ var __export = (target, all) => {
28
+ for (var name in all)
29
+ __defProp(target, name, { get: all[name], enumerable: true });
30
+ };
31
+ var __copyProps = (to, from, except, desc) => {
32
+ if (from && typeof from === "object" || typeof from === "function") {
33
+ for (let key of __getOwnPropNames(from))
34
+ if (!__hasOwnProp.call(to, key) && key !== except)
35
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
36
+ }
37
+ return to;
38
+ };
39
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
40
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
41
+ // If the importer is in node compatibility mode or this is not an ESM
42
+ // file that has been converted to a CommonJS file using a Babel-
43
+ // compatible transform (i.e. "__esModule" has not been set), then set
44
+ // "default" to the CommonJS "module.exports" for node compatibility.
45
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
46
+ mod
47
+ ));
48
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
49
+
50
+ // src/common/utils/dataUtils.ts
51
+ var dataUtils_exports = {};
52
+ __export(dataUtils_exports, {
53
+ calculateDownsamplingThreshold: () => calculateDownsamplingThreshold,
54
+ calculateThresholdOnRangeSelect: () => calculateThresholdOnRangeSelect,
55
+ convertToArrOfObjects: () => convertToArrOfObjects,
56
+ downsampleDataSources: () => downsampleDataSources,
57
+ isDownsamplingEnabledForViz: () => isDownsamplingEnabledForViz
122
58
  });
123
- exports.downsampleDataSources = exports.calculateDownsamplingThreshold = exports.calculateThresholdOnRangeSelect = exports.isDownsamplingEnabledForViz = exports.convertToArrOfObjects = void 0;
124
-
125
- var numberUtils_1 = __webpack_require__(1);
126
-
127
- var interfaces_1 = __webpack_require__(16); // TODO: utilize this fn in ParallelCoordinates
59
+ module.exports = __toCommonJS(dataUtils_exports);
128
60
 
61
+ // esm-externals:@splunk/visualizations-shared/numberUtils
62
+ var numberUtils_exports = {};
63
+ __export(numberUtils_exports, {
64
+ default: () => numberUtils_default
65
+ });
66
+ var defaultImport = __toESM(require("@splunk/visualizations-shared/numberUtils"));
67
+ __reExport(numberUtils_exports, require("@splunk/visualizations-shared/numberUtils"));
68
+ var numberUtils_default = "default" in defaultImport ? defaultImport.default : defaultImport;
129
69
 
130
- var convertToArrOfObjects = function convertToArrOfObjects(columns, fields) {
70
+ // src/common/utils/dataUtils.ts
71
+ var convertToArrOfObjects = (columns, fields) => {
131
72
  if (!columns || !columns[0] || !columns[0].length) return [];
132
- var data = [];
133
-
134
- var _loop = function _loop(i) {
135
- var newObj = {};
136
- fields.forEach(function (field, index) {
137
- var fieldName = typeof field === 'string' ? field : field.name;
138
-
139
- if (columns[index][i] === '') {
73
+ const data = [];
74
+ for (let i = 0; i < columns[0].length; i += 1) {
75
+ const newObj = {};
76
+ fields.forEach((field, index) => {
77
+ const fieldName = typeof field === "string" ? field : field.name;
78
+ if (columns[index][i] === "") {
140
79
  newObj[fieldName] = null;
141
80
  } else {
142
81
  newObj[fieldName] = columns[index][i];
143
82
  }
144
83
  });
145
84
  data.push(newObj);
146
- };
147
-
148
- for (var i = 0; i < columns[0].length; i += 1) {
149
- _loop(i);
150
85
  }
151
-
152
86
  return data;
153
87
  };
154
-
155
- exports.convertToArrOfObjects = convertToArrOfObjects; // LTTB algorithm which can be used to downsample time series data while striving to maintain
156
- // the spikes and overall shape of the chart
157
- // Copied from https://github.com/sveinn-steinarsson/flot-downsample/blob/0815010016fc94b1bbc6a010afb8aad13ada6d0d/jquery.flot.downsample.js
158
- // Modifications include:
159
- // 1) Convert to modern JavaScript(use const, let, and use array.push to push to last element of array)
160
- // 2) Convert to camel case
161
- // 3) Convert to TS and also return the indices of the points that are in the downsampled result.
162
- // 4) Add a new parameter preferredDownsampleIndices that correspond to the indices of points
163
- // that should be used in case of a tie of the max area in a bucket
164
-
165
- var largestTriangleThreeBuckets = function largestTriangleThreeBuckets(data, threshold, preferredDownsampleIndices) {
166
- var dataLength = data.length;
167
- var downsampledIndices = [];
168
-
88
+ var largestTriangleThreeBuckets = (data, threshold, preferredDownsampleIndices) => {
89
+ const dataLength = data.length;
90
+ const downsampledIndices = [];
169
91
  if (threshold >= dataLength || threshold === 0) {
170
- var allIndices = data.map(function (values, index) {
171
- return index;
172
- });
173
- return {
174
- downsampledData: data,
175
- downsampledIndices: allIndices
176
- }; // Nothing to do
92
+ const allIndices = data.map((values, index) => index);
93
+ return { downsampledData: data, downsampledIndices: allIndices };
177
94
  }
178
-
179
- var sampled = [];
180
- var sampledIndex = 0; // Bucket size. Leave room for start and end data points
181
-
182
- var every = (dataLength - 2) / (threshold - 2);
183
- var a = 0; // Initially a is the first point in the triangle
184
-
185
- var maxAreaPoint;
186
- var maxArea;
187
- var area;
188
- var nextA;
189
- sampled.push(data[a]); // Always add the first point
190
-
191
- downsampledIndices.push(0); // eslint-disable-next-line no-plusplus
192
-
193
- for (var i = 0; i < threshold - 2; i++) {
194
- // Calculate point average for next bucket (containing c)
195
- var avgX = 0;
196
- var avgY = 0;
197
- var avgRangeStart = Math.floor((i + 1) * every) + 1;
198
- var avgRangeEnd = Math.floor((i + 2) * every) + 1;
95
+ const sampled = [];
96
+ let sampledIndex = 0;
97
+ const every = (dataLength - 2) / (threshold - 2);
98
+ let a = 0;
99
+ let maxAreaPoint;
100
+ let maxArea;
101
+ let area;
102
+ let nextA;
103
+ sampled.push(data[a]);
104
+ downsampledIndices.push(0);
105
+ for (let i = 0; i < threshold - 2; i++) {
106
+ let avgX = 0;
107
+ let avgY = 0;
108
+ let avgRangeStart = Math.floor((i + 1) * every) + 1;
109
+ let avgRangeEnd = Math.floor((i + 2) * every) + 1;
199
110
  avgRangeEnd = avgRangeEnd < dataLength ? avgRangeEnd : dataLength;
200
- var avgRangeLength = avgRangeEnd - avgRangeStart; // eslint-disable-next-line no-plusplus
201
-
111
+ const avgRangeLength = avgRangeEnd - avgRangeStart;
202
112
  for (; avgRangeStart < avgRangeEnd; avgRangeStart++) {
203
- avgX += Number(data[avgRangeStart][0]); // * 1 enforces Number (value may be Date)
204
-
113
+ avgX += Number(data[avgRangeStart][0]);
205
114
  avgY += data[avgRangeStart][1] * 1;
206
115
  }
207
-
208
116
  avgX /= avgRangeLength;
209
- avgY /= avgRangeLength; // Get the range for this bucket
210
-
211
- var rangeOffs = Math.floor((i + 0) * every) + 1;
212
- var rangeTo = Math.floor((i + 1) * every) + 1; // Point a
213
-
214
- var pointAX = Number(data[a][0]); // Enforce Number (value may be Date)
215
-
216
- var pointAY = data[a][1] * 1; // eslint-disable-next-line no-multi-assign
217
-
117
+ avgY /= avgRangeLength;
118
+ let rangeOffs = Math.floor((i + 0) * every) + 1;
119
+ const rangeTo = Math.floor((i + 1) * every) + 1;
120
+ const pointAX = Number(data[a][0]);
121
+ const pointAY = data[a][1] * 1;
218
122
  maxArea = area = -1;
219
- var maxAreaIndex = rangeOffs; // eslint-disable-next-line no-plusplus
220
-
123
+ let maxAreaIndex = rangeOffs;
221
124
  for (; rangeOffs < rangeTo; rangeOffs++) {
222
- // Calculate triangle area over three buckets
223
- area = Math.abs((pointAX - avgX) * (data[rangeOffs][1] - pointAY) - (pointAX - Number(data[rangeOffs][0])) * (avgY - pointAY)) * 0.5; // Modification: try to downsample the least amount of points possible when there are multiple series
224
- // If all points in a bucket have the same area, prioritize the one with an x index
225
- // that also existed from another series so we don't add another point unnecessarily.
226
- // By default LTTB picks the leftmost point in the bucket
227
-
125
+ area = Math.abs(
126
+ (pointAX - avgX) * (data[rangeOffs][1] - pointAY) - (pointAX - Number(data[rangeOffs][0])) * (avgY - pointAY)
127
+ ) * 0.5;
228
128
  if (area > maxArea || area === maxArea && preferredDownsampleIndices.has(rangeOffs)) {
229
129
  maxArea = area;
230
130
  maxAreaPoint = data[rangeOffs];
231
- nextA = rangeOffs; // Next a is this b
232
- // Modification: save the index of the point with the most area
233
-
131
+ nextA = rangeOffs;
234
132
  maxAreaIndex = rangeOffs;
235
133
  }
236
- } // eslint-disable-next-line no-plusplus
237
-
238
-
239
- sampled[sampledIndex++] = maxAreaPoint; // Pick this point from the bucket
240
-
134
+ }
135
+ sampled[sampledIndex++] = maxAreaPoint;
241
136
  downsampledIndices.push(maxAreaIndex);
242
- a = nextA; // This a is the next a (chosen b)
243
- } // eslint-disable-next-line no-plusplus
244
-
245
-
246
- sampled[sampledIndex++] = data[dataLength - 1]; // Always add last
247
-
137
+ a = nextA;
138
+ }
139
+ sampled[sampledIndex++] = data[dataLength - 1];
248
140
  downsampledIndices.push(dataLength - 1);
249
- return {
250
- downsampledData: sampled,
251
- downsampledIndices: downsampledIndices
252
- };
141
+ return { downsampledData: sampled, downsampledIndices };
253
142
  };
254
- /**
255
- * Strictly coerces the entire column to numbers if it only consists of numeric strings or numbers. Also determines
256
- * if at least one of the values in the column can be loosely coerced to a number.
257
- * If the column cannot be strictly downsampled (if it contains nulls or non-numeric strings), returns an empty array and
258
- * returns that it cannot downsample the column.
259
- */
260
-
261
-
262
- var strictlyCoerceYColumn = function strictlyCoerceYColumn(column, options) {
263
- var isNullCoercionEnabled = options.nullValueDisplay === 'zero'; // Splunk charting allows for numbers in formats such as negative hex that
264
- // Number() does not support and also allows loose coercion of hex numbers (but not other formats)
265
- // We want to identify columns which contain at least one value that can be loosely coerced
266
-
267
- var canLooselyCoerceSomeValues = column.findIndex(function (value) {
268
- return (0, numberUtils_1.startsWithNumber)("".concat(value)) || isNullCoercionEnabled && value === null;
269
- }) >= 0; // If not all values in column can be strictly coerced to a number, we do not downsample
270
-
271
- var coercedColumn = [];
272
- var canDownsampleColumn = !column.some(function (value) {
273
- var coercedValue = Number(value);
274
- var coerceValueToZero = isNullCoercionEnabled && value === null; // if it can't be parsed or isn't safe, fail
275
-
276
- if (Number.isNaN(coercedValue) || coercedValue <= Number.MIN_SAFE_INTEGER || coercedValue >= Number.MAX_SAFE_INTEGER || typeof value !== 'string' && typeof value !== 'number' && !coerceValueToZero) {
143
+ var strictlyCoerceYColumn = (column, options) => {
144
+ const isNullCoercionEnabled = options.nullValueDisplay === "zero";
145
+ const canLooselyCoerceSomeValues = column.findIndex(
146
+ (value) => (0, numberUtils_exports.startsWithNumber)(`${value}`) || isNullCoercionEnabled && value === null
147
+ ) >= 0;
148
+ const coercedColumn = [];
149
+ const canDownsampleColumn = !column.some((value) => {
150
+ const coercedValue = Number(value);
151
+ const coerceValueToZero = isNullCoercionEnabled && value === null;
152
+ if (Number.isNaN(coercedValue) || coercedValue <= Number.MIN_SAFE_INTEGER || coercedValue >= Number.MAX_SAFE_INTEGER || typeof value !== "string" && typeof value !== "number" && !coerceValueToZero) {
277
153
  return true;
278
- } // save value and continue to next
279
-
280
-
154
+ }
281
155
  coercedColumn.push(coercedValue);
282
156
  return false;
283
157
  });
284
158
  return {
285
- canDownsampleColumn: canDownsampleColumn,
286
- canLooselyCoerceSomeValues: canLooselyCoerceSomeValues,
159
+ canDownsampleColumn,
160
+ canLooselyCoerceSomeValues,
287
161
  coercedColumn: canDownsampleColumn ? coercedColumn : []
288
162
  };
289
163
  };
290
- /**
291
- * Tries to coerce the x-column to numbers or dates, if it is eligible for downsampling.
292
- * Only strictly increasing x-columns are eligible for downsampling.
293
- * If the column is not eligible for downsampling, returns an empty array.
294
- */
295
-
296
-
297
- var strictlyCoerceXColumn = function strictlyCoerceXColumn(column, fieldType) {
298
- if (fieldType === 'number') {
299
- var coercedXColumn = column.map(function (xValue) {
300
- return Number(xValue);
301
- });
302
-
164
+ var strictlyCoerceXColumn = (column, fieldType) => {
165
+ if (fieldType === "number") {
166
+ const coercedXColumn = column.map((xValue) => Number(xValue));
303
167
  if (isColumnStrictlyIncreasing(coercedXColumn, fieldType)) {
304
168
  return coercedXColumn;
305
169
  }
306
- } else if (fieldType === 'time') {
307
- var _coercedXColumn = column.map(function (xValue) {
308
- return new Date(xValue);
309
- });
310
-
311
- if (isColumnStrictlyIncreasing(_coercedXColumn, fieldType)) {
312
- return _coercedXColumn;
170
+ } else if (fieldType === "time") {
171
+ const coercedXColumn = column.map((xValue) => new Date(xValue));
172
+ if (isColumnStrictlyIncreasing(coercedXColumn, fieldType)) {
173
+ return coercedXColumn;
313
174
  }
314
175
  }
315
-
316
176
  return [];
317
177
  };
318
-
319
- var isDownsamplingEnabledForViz = function isDownsamplingEnabledForViz(_ref) {
320
- var vizConfig = _ref.vizConfig;
321
-
178
+ var isDownsamplingEnabledForViz = ({ vizConfig }) => {
322
179
  var _a;
323
-
324
- return (_a = vizConfig.supports) === null || _a === void 0 ? void 0 : _a.includes(interfaces_1.VizBehavior.DOWNSAMPLING);
180
+ return (_a = vizConfig.supports) == null ? void 0 : _a.includes("downsampling" /* DOWNSAMPLING */);
325
181
  };
326
-
327
- exports.isDownsamplingEnabledForViz = isDownsamplingEnabledForViz;
328
-
329
- var calculateThresholdOnRangeSelect = function calculateThresholdOnRangeSelect(_ref2) {
330
- var firstIndex = _ref2.firstIndex,
331
- lastIndex = _ref2.lastIndex,
332
- dataSources = _ref2.dataSources,
333
- width = _ref2.width;
334
-
182
+ var calculateThresholdOnRangeSelect = ({
183
+ firstIndex,
184
+ lastIndex,
185
+ dataSources,
186
+ width
187
+ }) => {
335
188
  var _a, _b, _c;
336
-
337
- var window = lastIndex - firstIndex + 1;
338
- var ratio = Math.round(Number(((_c = (_b = (_a = dataSources === null || dataSources === void 0 ? void 0 : dataSources.primary) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.columns[0]) === null || _c === void 0 ? void 0 : _c.length) / window) * 10) / 10;
189
+ const window = lastIndex - firstIndex + 1;
190
+ const ratio = Math.round(Number(((_c = (_b = (_a = dataSources == null ? void 0 : dataSources.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.columns[0]) == null ? void 0 : _c.length) / window) * 10) / 10;
339
191
  return Math.round(ratio * Number(width));
340
192
  };
341
-
342
- exports.calculateThresholdOnRangeSelect = calculateThresholdOnRangeSelect;
343
- /**
344
- * Calculates the downsampling threshold based on the range selection. If search zoom is enabled or there is no selection,
345
- * then returns the width of the visualization.
346
- *
347
- * Otherwise calculates the threshold based on the ratio of the window selected compared to the size of the non-downsampled
348
- * data sources. Returns null if the chart event's dataset does not match the passed in primary data source or if the chart is zoomed
349
- * in for a categorical chart.
350
- */
351
-
352
- var calculateDownsamplingThreshold = function calculateDownsamplingThreshold(_ref3) {
353
- var enableSearchZoom = _ref3.enableSearchZoom,
354
- dataSources = _ref3.dataSources,
355
- selectChartEvent = _ref3.selectChartEvent,
356
- width = _ref3.width,
357
- xField = _ref3.xField;
358
-
193
+ var calculateDownsamplingThreshold = ({
194
+ enableSearchZoom,
195
+ dataSources,
196
+ selectChartEvent,
197
+ width,
198
+ xField
199
+ }) => {
359
200
  var _a, _b, _c;
360
-
361
201
  if (enableSearchZoom || !selectChartEvent) {
362
202
  return Number(width);
363
203
  }
364
-
365
- var primaryDataSource = dataSources === null || dataSources === void 0 ? void 0 : dataSources.primary;
366
-
204
+ const primaryDataSource = dataSources == null ? void 0 : dataSources.primary;
367
205
  if (!primaryDataSource) {
368
206
  return null;
369
207
  }
370
-
371
- var startXIndex = selectChartEvent.startXIndex,
372
- endXIndex = selectChartEvent.endXIndex,
373
- currentTarget = selectChartEvent.currentTarget;
374
-
208
+ const { startXIndex, endXIndex, currentTarget } = selectChartEvent;
375
209
  try {
376
- var xFieldIndex = (_a = primaryDataSource === null || primaryDataSource === void 0 ? void 0 : primaryDataSource.data) === null || _a === void 0 ? void 0 : _a.fields.findIndex(function (field) {
210
+ const xFieldIndex = (_a = primaryDataSource == null ? void 0 : primaryDataSource.data) == null ? void 0 : _a.fields.findIndex((field) => {
377
211
  return field.name === xField;
378
212
  });
379
- var downsampledXFieldIndex = (_b = currentTarget.dataSet) === null || _b === void 0 ? void 0 : _b.fields.findIndex(function (field) {
380
- return field === xField;
381
- });
382
-
213
+ const downsampledXFieldIndex = (_b = currentTarget.dataSet) == null ? void 0 : _b.fields.findIndex((field) => field === xField);
383
214
  if (xFieldIndex === -1 || downsampledXFieldIndex === -1) {
384
215
  return null;
385
216
  }
386
-
387
- var fullSeries = (_c = primaryDataSource === null || primaryDataSource === void 0 ? void 0 : primaryDataSource.data) === null || _c === void 0 ? void 0 : _c.columns[xFieldIndex];
388
- var downsampledSeries = currentTarget.dataSet.seriesList[downsampledXFieldIndex];
389
- var firstIndex = fullSeries.findIndex(function (x) {
217
+ const fullSeries = (_c = primaryDataSource == null ? void 0 : primaryDataSource.data) == null ? void 0 : _c.columns[xFieldIndex];
218
+ const downsampledSeries = currentTarget.dataSet.seriesList[downsampledXFieldIndex];
219
+ const firstIndex = fullSeries.findIndex((x) => {
390
220
  return downsampledSeries[startXIndex] === x;
391
221
  });
392
- var lastIndex = fullSeries.findIndex(function (x) {
222
+ const lastIndex = fullSeries.findIndex((x) => {
393
223
  return downsampledSeries[endXIndex] === x;
394
224
  });
395
-
396
225
  if (firstIndex >= 0 && lastIndex >= 0 && firstIndex <= lastIndex) {
397
- return (0, exports.calculateThresholdOnRangeSelect)({
398
- firstIndex: firstIndex,
399
- lastIndex: lastIndex,
400
- dataSources: dataSources,
401
- width: width
226
+ return calculateThresholdOnRangeSelect({
227
+ firstIndex,
228
+ lastIndex,
229
+ dataSources,
230
+ width
402
231
  });
403
232
  }
404
233
  } catch (e) {
405
- // eslint-disable-next-line no-console
406
- console.error('Error occurred while setting downsample threshold on range select event', e);
234
+ console.error("Error occurred while setting downsample threshold on range select event", e);
407
235
  }
408
-
409
236
  return null;
410
237
  };
411
-
412
- exports.calculateDownsamplingThreshold = calculateDownsamplingThreshold;
413
-
414
- var isColumnStrictlyIncreasing = function isColumnStrictlyIncreasing(column, fieldType) {
415
- return column.every(function (value, index) {
416
- if (fieldType === 'number') {
238
+ var isColumnStrictlyIncreasing = (column, fieldType) => {
239
+ return column.every((value, index) => {
240
+ if (fieldType === "number") {
417
241
  if (Number.isNaN(value)) {
418
242
  return false;
419
243
  }
420
244
  }
421
-
422
- if (fieldType === 'time') {
245
+ if (fieldType === "time") {
423
246
  if (Number.isNaN(value.getTime())) {
424
247
  return false;
425
248
  }
426
249
  }
427
-
428
250
  if (index === 0) {
429
251
  return true;
430
252
  }
431
-
432
253
  return value > column[index - 1];
433
254
  });
434
255
  };
435
- /**
436
- * Verifies that all of the columns that are displayed in a chart can be downsampled. Valid columns that can be
437
- * displayed are those that contain at least one number. We can only downsample columns that only consist of numbers.
438
- *
439
- * If all columns can be downsampled, returns the x column coerced to time/number and y columns coerced to numbers.
440
- * If not all columns can be downsampled, then returns empty arrays for both x and y
441
- */
442
-
443
-
444
- var tryToCoerceAllDisplayedFields = function tryToCoerceAllDisplayedFields(ds, xField, yFields, fieldTypes, options) {
445
- var xColumn = [];
446
- var yColumns = [];
447
- var canDownsample = !ds.data.fields.some(function (field, index) {
256
+ var tryToCoerceAllDisplayedFields = (ds, xField, yFields, fieldTypes, options) => {
257
+ let xColumn = [];
258
+ const yColumns = [];
259
+ const canDownsample = !ds.data.fields.some((field, index) => {
448
260
  var _a, _b;
449
-
450
- var fieldName = (_a = field.name) !== null && _a !== void 0 ? _a : field;
451
- var fieldType = (_b = fieldTypes[index]) !== null && _b !== void 0 ? _b : 'unknown';
452
- var column = ds.data.columns[index];
453
- var hasDisplayedColumnThatCantBeDownsampled = false;
454
-
261
+ const fieldName = (_a = field.name) != null ? _a : field;
262
+ const fieldType = (_b = fieldTypes[index]) != null ? _b : "unknown";
263
+ const column = ds.data.columns[index];
264
+ let hasDisplayedColumnThatCantBeDownsampled = false;
455
265
  if (fieldName === xField) {
456
266
  xColumn = strictlyCoerceXColumn(column, fieldType);
457
267
  } else if (yFields.has(fieldName)) {
458
- var _strictlyCoerceYColum = strictlyCoerceYColumn(ds.data.columns[index], options),
459
- coercedColumn = _strictlyCoerceYColum.coercedColumn,
460
- canLooselyCoerceSomeValues = _strictlyCoerceYColum.canLooselyCoerceSomeValues,
461
- canDownsampleColumn = _strictlyCoerceYColum.canDownsampleColumn; // do not perform downsampling if a column can possibly be displayed but cannot
462
- // be downsampled using LTTB
463
-
464
-
268
+ const { coercedColumn, canLooselyCoerceSomeValues, canDownsampleColumn } = strictlyCoerceYColumn(
269
+ ds.data.columns[index],
270
+ options
271
+ );
465
272
  hasDisplayedColumnThatCantBeDownsampled = canLooselyCoerceSomeValues && !canDownsampleColumn;
466
-
467
273
  if (hasDisplayedColumnThatCantBeDownsampled) {
468
274
  return true;
469
275
  }
470
-
471
276
  if (canDownsampleColumn) {
472
277
  yColumns.push(coercedColumn);
473
278
  }
474
279
  }
475
-
476
280
  return false;
477
281
  });
478
-
479
282
  if (canDownsample) {
480
- return {
481
- xColumn: xColumn,
482
- yColumns: yColumns
483
- };
283
+ return { xColumn, yColumns };
484
284
  }
485
-
486
- return {
487
- xColumn: [],
488
- yColumns: []
489
- };
285
+ return { xColumn: [], yColumns: [] };
490
286
  };
491
-
492
- var pickIndicesFromDataSource = function pickIndicesFromDataSource(ds, indices) {
493
- var sortedIndices = Array.from(indices).sort(function (a, b) {
494
- return a - b;
495
- });
496
- var slicedColumns = [];
497
- ds.data.columns.forEach(function (column) {
498
- var slicedColumn = [];
499
- sortedIndices.forEach(function (index) {
287
+ var pickIndicesFromDataSource = (ds, indices) => {
288
+ const sortedIndices = Array.from(indices).sort((a, b) => a - b);
289
+ const slicedColumns = [];
290
+ ds.data.columns.forEach((column) => {
291
+ const slicedColumn = [];
292
+ sortedIndices.forEach((index) => {
500
293
  slicedColumn.push(column[index]);
501
294
  });
502
295
  slicedColumns.push(slicedColumn);
503
- }); // update data columns with downsampled columns
504
-
505
- return Object.assign(Object.assign({}, ds), {
506
- data: Object.assign(Object.assign({}, ds.data), {
296
+ });
297
+ return __spreadProps(__spreadValues({}, ds), {
298
+ data: __spreadProps(__spreadValues({}, ds.data), {
507
299
  columns: slicedColumns
508
300
  })
509
301
  });
510
302
  };
511
-
512
- var downsampleDataSources = function downsampleDataSources(_ref4) {
513
- var dataSources = _ref4.dataSources,
514
- threshold = _ref4.threshold,
515
- options = _ref4.options;
516
-
303
+ var downsampleDataSources = ({ dataSources, threshold, options }) => {
517
304
  var _a, _b, _c;
518
-
519
- var primaryDS = dataSources === null || dataSources === void 0 ? void 0 : dataSources.primary; // only downsample time series when number of data points are over threshold
520
-
521
- var numPoints = (_c = (_b = (_a = primaryDS === null || primaryDS === void 0 ? void 0 : primaryDS.data) === null || _a === void 0 ? void 0 : _a.columns[0]) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0;
522
-
305
+ const primaryDS = dataSources == null ? void 0 : dataSources.primary;
306
+ const numPoints = (_c = (_b = (_a = primaryDS == null ? void 0 : primaryDS.data) == null ? void 0 : _a.columns[0]) == null ? void 0 : _b.length) != null ? _c : 0;
523
307
  if (Number.isNaN(threshold) || numPoints <= threshold || threshold < 2) {
524
308
  return dataSources;
525
309
  }
526
-
527
- var xField = options.xField,
528
- yFields = options.yFields,
529
- fieldTypes = options.fieldTypes;
530
-
531
- if (!xField || !(yFields === null || yFields === void 0 ? void 0 : yFields.length) || !(fieldTypes === null || fieldTypes === void 0 ? void 0 : fieldTypes.length)) {
310
+ const { xField, yFields, fieldTypes } = options;
311
+ if (!xField || !(yFields == null ? void 0 : yFields.length) || !(fieldTypes == null ? void 0 : fieldTypes.length)) {
532
312
  return dataSources;
533
313
  }
534
-
535
- var nonInternalYFields = new Set(yFields.filter(function (yField) {
536
- return !yField.startsWith('_');
537
- }));
538
- var maxPointsInDownsample = Math.min(nonInternalYFields.size * threshold, numPoints); // Do not try to downsample if there are too many downsampled pts
539
- // At the worst case, each series has non-overlapping downsampled pts
540
- // which will mean that all points will be included in the downsampled result
541
- // This will just lead to additional overhead due to coercing each
542
- // x and y field to number
543
-
314
+ const nonInternalYFields = new Set(yFields.filter((yField) => !yField.startsWith("_")));
315
+ const maxPointsInDownsample = Math.min(nonInternalYFields.size * threshold, numPoints);
544
316
  if (maxPointsInDownsample >= numPoints) {
545
317
  return dataSources;
546
318
  }
547
-
548
- var _tryToCoerceAllDispla = tryToCoerceAllDisplayedFields(primaryDS, xField, nonInternalYFields, fieldTypes, options),
549
- xColumn = _tryToCoerceAllDispla.xColumn,
550
- yColumns = _tryToCoerceAllDispla.yColumns;
551
-
319
+ const { xColumn, yColumns } = tryToCoerceAllDisplayedFields(
320
+ primaryDS,
321
+ xField,
322
+ nonInternalYFields,
323
+ fieldTypes,
324
+ options
325
+ );
552
326
  if (!yColumns.length || !xColumn.length) {
553
327
  return dataSources;
554
328
  }
555
-
556
- var downsampledDataSources = Object.assign({}, dataSources);
557
- var downsampledIndices = new Set();
558
- yColumns.forEach(function (yColumn, columnIndex) {
559
- // perform LTTB downsampling for current series, LTTB takes an [x, y] pair
560
- var xyPair = yColumn.map(function (yValue, index) {
329
+ const downsampledDataSources = __spreadValues({}, dataSources);
330
+ const downsampledIndices = /* @__PURE__ */ new Set();
331
+ yColumns.forEach((yColumn, columnIndex) => {
332
+ const xyPair = yColumn.map((yValue, index) => {
561
333
  return [xColumn[index], yValue];
562
334
  });
563
-
564
335
  try {
565
- var _largestTriangleThree = largestTriangleThreeBuckets(xyPair, threshold, downsampledIndices),
566
- downsampledIndicesForSeries = _largestTriangleThree.downsampledIndices;
567
-
568
- downsampledIndicesForSeries.forEach(function (downsampleIndex) {
569
- return downsampledIndices.add(downsampleIndex);
570
- });
336
+ const { downsampledIndices: downsampledIndicesForSeries } = largestTriangleThreeBuckets(
337
+ xyPair,
338
+ threshold,
339
+ downsampledIndices
340
+ );
341
+ downsampledIndicesForSeries.forEach((downsampleIndex) => downsampledIndices.add(downsampleIndex));
571
342
  } catch (e) {
572
- // eslint-disable-next-line no-console
573
- console.error("Error occurred while downsampling column ".concat(columnIndex), e);
343
+ console.error(`Error occurred while downsampling column ${columnIndex}`, e);
574
344
  }
575
- }); // update data columns with downsampled columns
576
-
345
+ });
577
346
  downsampledDataSources.primary = pickIndicesFromDataSource(primaryDS, downsampledIndices);
578
347
  return downsampledDataSources;
579
348
  };
580
-
581
- exports.downsampleDataSources = downsampleDataSources;
582
-
583
- /***/ }),
584
- /* 16 */
585
- /***/ (function(module, exports, __webpack_require__) {
586
-
587
- "use strict";
588
-
589
-
590
- var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
591
- if (k2 === undefined) k2 = k;
592
- var desc = Object.getOwnPropertyDescriptor(m, k);
593
-
594
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
595
- desc = {
596
- enumerable: true,
597
- get: function get() {
598
- return m[k];
599
- }
600
- };
601
- }
602
-
603
- Object.defineProperty(o, k2, desc);
604
- } : function (o, m, k, k2) {
605
- if (k2 === undefined) k2 = k;
606
- o[k2] = m[k];
607
- });
608
-
609
- var __exportStar = this && this.__exportStar || function (m, exports) {
610
- for (var p in m) {
611
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
612
- }
613
- };
614
-
615
- Object.defineProperty(exports, "__esModule", {
616
- value: true
617
- });
618
-
619
- __exportStar(__webpack_require__(17), exports);
620
-
621
- __exportStar(__webpack_require__(18), exports);
622
-
623
- __exportStar(__webpack_require__(19), exports);
624
-
625
- __exportStar(__webpack_require__(20), exports);
626
-
627
- __exportStar(__webpack_require__(21), exports);
628
-
629
- __exportStar(__webpack_require__(22), exports);
630
-
631
- __exportStar(__webpack_require__(23), exports);
632
-
633
- __exportStar(__webpack_require__(24), exports);
634
-
635
- __exportStar(__webpack_require__(25), exports);
636
-
637
- __exportStar(__webpack_require__(26), exports);
638
-
639
- __exportStar(__webpack_require__(29), exports);
640
-
641
- __exportStar(__webpack_require__(30), exports);
642
-
643
- __exportStar(__webpack_require__(31), exports);
644
-
645
- __exportStar(__webpack_require__(32), exports);
646
-
647
- __exportStar(__webpack_require__(33), exports);
648
-
649
- __exportStar(__webpack_require__(34), exports);
650
-
651
- __exportStar(__webpack_require__(35), exports);
652
-
653
- __exportStar(__webpack_require__(36), exports);
654
-
655
- /***/ }),
656
- /* 17 */
657
- /***/ (function(module, exports, __webpack_require__) {
658
-
659
- "use strict";
660
-
661
-
662
- Object.defineProperty(exports, "__esModule", {
663
- value: true
664
- });
665
-
666
- /***/ }),
667
- /* 18 */
668
- /***/ (function(module, exports, __webpack_require__) {
669
-
670
- "use strict";
671
-
672
- /**
673
- * A data structure used at runtime to wire up a visualization.
674
- */
675
-
676
- Object.defineProperty(exports, "__esModule", {
677
- value: true
678
- });
679
-
680
- /***/ }),
681
- /* 19 */
682
- /***/ (function(module, exports, __webpack_require__) {
683
-
684
- "use strict";
685
-
686
-
687
- Object.defineProperty(exports, "__esModule", {
688
- value: true
689
- });
690
- exports.validOutputModes = exports.validSortDirs = void 0;
691
- exports.validSortDirs = ['asc', 'desc', 'none'];
692
- exports.validOutputModes = ['json_cols', 'json'];
693
-
694
- /***/ }),
695
- /* 20 */
696
- /***/ (function(module, exports, __webpack_require__) {
697
-
698
- "use strict";
699
-
700
-
701
- Object.defineProperty(exports, "__esModule", {
702
- value: true
703
- });
704
-
705
- /***/ }),
706
- /* 21 */
707
- /***/ (function(module, exports, __webpack_require__) {
708
-
709
- "use strict";
710
-
711
-
712
- Object.defineProperty(exports, "__esModule", {
713
- value: true
714
- });
715
-
716
- /***/ }),
717
- /* 22 */
718
- /***/ (function(module, exports, __webpack_require__) {
719
-
720
- "use strict";
721
-
722
-
723
- Object.defineProperty(exports, "__esModule", {
724
- value: true
725
- });
726
-
727
- /***/ }),
728
- /* 23 */
729
- /***/ (function(module, exports, __webpack_require__) {
730
-
731
- "use strict";
732
-
733
-
734
- Object.defineProperty(exports, "__esModule", {
735
- value: true
736
- });
737
-
738
- /***/ }),
739
- /* 24 */
740
- /***/ (function(module, exports, __webpack_require__) {
741
-
742
- "use strict";
743
-
744
-
745
- Object.defineProperty(exports, "__esModule", {
746
- value: true
747
- });
748
-
749
- /***/ }),
750
- /* 25 */
751
- /***/ (function(module, exports, __webpack_require__) {
752
-
753
- "use strict";
754
-
755
-
756
- Object.defineProperty(exports, "__esModule", {
757
- value: true
758
- });
759
-
760
- /***/ }),
761
- /* 26 */
762
- /***/ (function(module, exports, __webpack_require__) {
763
-
764
- "use strict";
765
-
766
-
767
- var _classCallCheck = __webpack_require__(27);
768
-
769
- var _createClass = __webpack_require__(28);
770
-
771
- Object.defineProperty(exports, "__esModule", {
772
- value: true
773
- });
774
- exports.DefaultVizActionHandler = void 0;
775
-
776
- var DefaultVizActionHandler = /*#__PURE__*/function () {
777
- function DefaultVizActionHandler() {
778
- _classCallCheck(this, DefaultVizActionHandler);
779
- }
780
-
781
- _createClass(DefaultVizActionHandler, [{
782
- key: "focus",
783
- value: function focus() {// noop
784
- }
785
- }, {
786
- key: "snapshot",
787
- value: function snapshot() {
788
- return null; // noop
789
- }
790
- }]);
791
-
792
- return DefaultVizActionHandler;
793
- }();
794
-
795
- exports.DefaultVizActionHandler = DefaultVizActionHandler;
796
-
797
- /***/ }),
798
- /* 27 */
799
- /***/ (function(module, exports) {
800
-
801
- module.exports = require("@babel/runtime/helpers/classCallCheck");
802
-
803
- /***/ }),
804
- /* 28 */
805
- /***/ (function(module, exports) {
806
-
807
- module.exports = require("@babel/runtime/helpers/createClass");
808
-
809
- /***/ }),
810
- /* 29 */
811
- /***/ (function(module, exports, __webpack_require__) {
812
-
813
- "use strict";
814
-
815
-
816
- Object.defineProperty(exports, "__esModule", {
817
- value: true
818
- });
819
- exports.VizBehavior = void 0;
820
- var VizBehavior;
821
-
822
- (function (VizBehavior) {
823
- /**
824
- * Dynamic Options Behavior.
825
- * This allows visualization options to be powered by data
826
- *
827
- * **Example**
828
- *
829
- * sparklineValues: ">primary|seriesByIndex(0)"
830
- * would configure sparklineValues with an array of data points
831
- * coming from the first series in the primary datasource
832
- *
833
- */
834
- VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
835
- VizBehavior["EVENTS"] = "events";
836
- VizBehavior["DOWNSAMPLING"] = "downsampling";
837
- /**
838
- * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
839
- * missing.
840
- * @type {string}
841
- */
842
-
843
- VizBehavior["PLACEHOLDER"] = "placeholder";
844
- VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
845
- VizBehavior["TRELLIS"] = "trellis";
846
- })(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
847
-
848
- /***/ }),
849
- /* 30 */
850
- /***/ (function(module, exports, __webpack_require__) {
851
-
852
- "use strict";
853
-
854
-
855
- Object.defineProperty(exports, "__esModule", {
856
- value: true
857
- });
858
- exports.VizCategory = void 0;
859
- var VizCategory;
860
-
861
- (function (VizCategory) {
862
- VizCategory["SINGLE_VALUE"] = "Single Value";
863
- VizCategory["TRENDS"] = "Trends";
864
- VizCategory["COMPARISONS"] = "Comparisons";
865
- VizCategory["TABLE"] = "Table";
866
- VizCategory["GAUGE"] = "Gauge";
867
- VizCategory["DISTRIBUTIONS"] = "Distributions";
868
- VizCategory["CHOROPLETH"] = "Choropleth Maps";
869
- VizCategory["SHAPES"] = "Shapes";
870
- VizCategory["MISC"] = "misc";
871
- VizCategory["FLOW"] = "Flow";
872
- VizCategory["CORRELATION"] = "Correlation";
873
- VizCategory["SPATIAL"] = "Spatial";
874
- })(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
875
-
876
- /***/ }),
877
- /* 31 */
878
- /***/ (function(module, exports, __webpack_require__) {
879
-
880
- "use strict";
881
-
882
-
883
- Object.defineProperty(exports, "__esModule", {
884
- value: true
885
- });
886
-
887
- /***/ }),
888
- /* 32 */
889
- /***/ (function(module, exports, __webpack_require__) {
890
-
891
- "use strict";
892
-
893
-
894
- Object.defineProperty(exports, "__esModule", {
895
- value: true
896
- });
897
-
898
- /***/ }),
899
- /* 33 */
900
- /***/ (function(module, exports, __webpack_require__) {
901
-
902
- "use strict";
903
-
904
-
905
- Object.defineProperty(exports, "__esModule", {
906
- value: true
907
- });
908
-
909
- /***/ }),
910
- /* 34 */
911
- /***/ (function(module, exports, __webpack_require__) {
912
-
913
- "use strict";
914
-
915
-
916
- Object.defineProperty(exports, "__esModule", {
917
- value: true
918
- });
919
-
920
- /***/ }),
921
- /* 35 */
922
- /***/ (function(module, exports, __webpack_require__) {
923
-
924
- "use strict";
925
-
926
-
927
- Object.defineProperty(exports, "__esModule", {
928
- value: true
929
- });
930
-
931
- /***/ }),
932
- /* 36 */
933
- /***/ (function(module, exports, __webpack_require__) {
934
-
935
- "use strict";
936
-
937
-
938
- Object.defineProperty(exports, "__esModule", {
939
- value: true
940
- });
941
-
942
- /***/ })
943
- /******/ ]);
944
- //# sourceMappingURL=dataUtils.js.map
349
+ //# sourceMappingURL=dataUtils.js.map