@splunk/visualizations 26.2.1 → 26.4.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 (150) hide show
  1. package/Area.config.js +92 -595
  2. package/Area.config.js.map +1 -1
  3. package/Area.js +296 -801
  4. package/Area.js.map +1 -1
  5. package/Bar.config.js +93 -562
  6. package/Bar.config.js.map +1 -1
  7. package/Bar.js +299 -770
  8. package/Bar.js.map +1 -1
  9. package/Bubble.config.js +84 -483
  10. package/Bubble.config.js.map +1 -1
  11. package/Bubble.js +286 -687
  12. package/Bubble.js.map +1 -1
  13. package/ChoroplethSvg.config.js +77 -202
  14. package/ChoroplethSvg.config.js.map +1 -1
  15. package/ChoroplethSvg.js +272 -400
  16. package/ChoroplethSvg.js.map +1 -1
  17. package/Column.config.js +93 -600
  18. package/Column.config.js.map +1 -1
  19. package/Column.js +299 -808
  20. package/Column.js.map +1 -1
  21. package/Ellipse.config.js +82 -200
  22. package/Ellipse.config.js.map +1 -1
  23. package/Ellipse.js +233 -356
  24. package/Ellipse.js.map +1 -1
  25. package/Events.config.js +62 -283
  26. package/Events.config.js.map +1 -1
  27. package/Events.js +326 -530
  28. package/Events.js.map +1 -1
  29. package/FillerGauge.config.js +91 -220
  30. package/FillerGauge.config.js.map +1 -1
  31. package/FillerGauge.js +267 -401
  32. package/FillerGauge.js.map +1 -1
  33. package/Image.config.js +61 -157
  34. package/Image.config.js.map +1 -1
  35. package/Image.js +217 -327
  36. package/Image.js.map +1 -1
  37. package/Line.config.js +92 -607
  38. package/Line.config.js.map +1 -1
  39. package/Line.js +297 -814
  40. package/Line.js.map +1 -1
  41. package/LinkGraph.config.js +75 -257
  42. package/LinkGraph.config.js.map +1 -1
  43. package/LinkGraph.js +1755 -17415
  44. package/LinkGraph.js.map +1 -1
  45. package/MIGRATION.md +6 -0
  46. package/Map.config.js +128 -1123
  47. package/Map.config.js.map +1 -1
  48. package/Map.js +470 -782
  49. package/Map.js.map +1 -1
  50. package/Markdown.config.js +62 -189
  51. package/Markdown.config.js.map +1 -1
  52. package/Markdown.js +272 -401
  53. package/Markdown.js.map +1 -1
  54. package/MarkerGauge.config.js +138 -298
  55. package/MarkerGauge.config.js.map +1 -1
  56. package/MarkerGauge.js +309 -470
  57. package/MarkerGauge.js.map +1 -1
  58. package/ParallelCoordinates.config.js +72 -192
  59. package/ParallelCoordinates.config.js.map +1 -1
  60. package/ParallelCoordinates.js +333 -442
  61. package/ParallelCoordinates.js.map +1 -1
  62. package/Pie.config.js +77 -241
  63. package/Pie.config.js.map +1 -1
  64. package/Pie.js +336 -471
  65. package/Pie.js.map +1 -1
  66. package/Punchcard.config.js +72 -306
  67. package/Punchcard.config.js.map +1 -1
  68. package/Punchcard.js +356 -583
  69. package/Punchcard.js.map +1 -1
  70. package/Rectangle.config.js +211 -347
  71. package/Rectangle.config.js.map +1 -1
  72. package/Rectangle.js +371 -509
  73. package/Rectangle.js.map +1 -1
  74. package/Sankey.config.js +72 -214
  75. package/Sankey.config.js.map +1 -1
  76. package/Sankey.js +343 -475
  77. package/Sankey.js.map +1 -1
  78. package/Scatter.config.js +86 -464
  79. package/Scatter.config.js.map +1 -1
  80. package/Scatter.js +1118 -1493
  81. package/Scatter.js.map +1 -1
  82. package/SingleValue.config.js +124 -411
  83. package/SingleValue.config.js.map +1 -1
  84. package/SingleValue.js +522 -789
  85. package/SingleValue.js.map +1 -1
  86. package/SingleValueBasic.js +73 -61
  87. package/SingleValueBasic.js.map +1 -1
  88. package/SingleValueIcon.config.js +123 -380
  89. package/SingleValueIcon.config.js.map +1 -1
  90. package/SingleValueIcon.js +508 -745
  91. package/SingleValueIcon.js.map +1 -1
  92. package/SingleValueRadial.config.js +121 -385
  93. package/SingleValueRadial.config.js.map +1 -1
  94. package/SingleValueRadial.js +1642 -1885
  95. package/SingleValueRadial.js.map +1 -1
  96. package/SparkLine.js +39 -39
  97. package/SparkLine.js.map +1 -1
  98. package/Table.config.js +82 -496
  99. package/Table.config.js.map +1 -1
  100. package/Table.js +416 -825
  101. package/Table.js.map +1 -1
  102. package/common/Charting.js +37 -57
  103. package/common/Charting.js.map +1 -1
  104. package/common/DocExampleWithVizSandbox.js +21 -21
  105. package/common/DocExampleWithVizSandbox.js.map +1 -1
  106. package/common/EventsDoc.js +18 -18
  107. package/common/EventsDoc.js.map +1 -1
  108. package/common/GaugeMajorTicks.js +4 -4
  109. package/common/GaugeMajorTicks.js.map +1 -1
  110. package/common/GaugeValueMarker.js +2 -2
  111. package/common/GaugeValueMarker.js.map +1 -1
  112. package/common/OptionsDoc.js +4 -4
  113. package/common/OptionsDoc.js.map +1 -1
  114. package/common/OverviewDoc.js +39 -40
  115. package/common/OverviewDoc.js.map +1 -1
  116. package/common/SplunkVisualization.js +2 -2
  117. package/common/SplunkVisualization.js.map +1 -1
  118. package/common/SplunkVisualizationApi.js +2 -2
  119. package/common/SplunkVisualizationApi.js.map +1 -1
  120. package/common/ThemesDoc.js +19 -19
  121. package/common/ThemesDoc.js.map +1 -1
  122. package/common/chartingUtils.js +2 -2
  123. package/common/chartingUtils.js.map +1 -1
  124. package/common/gaugeUtils.js +10 -10
  125. package/common/gaugeUtils.js.map +1 -1
  126. package/common/shapeUtils.js +10 -10
  127. package/common/shapeUtils.js.map +1 -1
  128. package/common/utils/configUtils.js +25 -155
  129. package/common/utils/configUtils.js.map +1 -1
  130. package/common/utils/dataUtils.js +87 -105
  131. package/common/utils/dataUtils.js.map +1 -1
  132. package/common/utils/featureFlagUtils.js +4 -4
  133. package/common/utils/featureFlagUtils.js.map +1 -1
  134. package/common/utils/hocUtils.js +2 -2
  135. package/common/utils/hocUtils.js.map +1 -1
  136. package/common/utils/mapUtils.js +51 -54
  137. package/common/utils/mapUtils.js.map +1 -1
  138. package/common/utils/singleValueUtils.js +30 -18
  139. package/common/utils/singleValueUtils.js.map +1 -1
  140. package/common/utils/testHelper.js +7 -36
  141. package/common/utils/testHelper.js.map +1 -1
  142. package/common/utils/trellisUtils.js +7 -6
  143. package/common/utils/trellisUtils.js.map +1 -1
  144. package/common/utils/urlUtils.js +2 -2
  145. package/common/utils/urlUtils.js.map +1 -1
  146. package/common/withDashboardViz.js +93 -101
  147. package/common/withDashboardViz.js.map +1 -1
  148. package/package.json +48 -50
  149. package/common/utils/layoutUtils.js +0 -115
  150. package/common/utils/layoutUtils.js.map +0 -1
package/Table.config.js CHANGED
@@ -87,7 +87,7 @@ module.exports =
87
87
  /******/
88
88
  /******/
89
89
  /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 82);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 73);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
@@ -109,18 +109,11 @@ module.exports = require("@babel/runtime/helpers/toConsumableArray");
109
109
  /***/ 10:
110
110
  /***/ (function(module, exports) {
111
111
 
112
- module.exports = require("@splunk/themes/variables");
113
-
114
- /***/ }),
115
-
116
- /***/ 11:
117
- /***/ (function(module, exports) {
118
-
119
112
  module.exports = require("@splunk/visualization-icons/placeholders");
120
113
 
121
114
  /***/ }),
122
115
 
123
- /***/ 12:
116
+ /***/ 11:
124
117
  /***/ (function(module, exports) {
125
118
 
126
119
  module.exports = require("@splunk/visualization-icons");
@@ -128,46 +121,13 @@ module.exports = require("@splunk/visualization-icons");
128
121
  /***/ }),
129
122
 
130
123
  /***/ 2:
131
- /***/ (function(module, exports, __webpack_require__) {
132
-
133
- "use strict";
134
-
135
-
136
- Object.defineProperty(exports, "__esModule", {
137
- value: true
138
- });
139
- exports.VizBehavior = void 0;
140
- var VizBehavior;
141
-
142
- (function (VizBehavior) {
143
- /**
144
- * Dynamic Options Behavior.
145
- * This allows visualization options to be powered by data
146
- *
147
- * **Example**
148
- *
149
- * sparklineValues: ">primary|seriesByIndex(0)"
150
- * would configure sparklineValues with an array of data points
151
- * coming from the first series in the primary datasource
152
- *
153
- */
154
- VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
155
- VizBehavior["EVENTS"] = "events";
156
- VizBehavior["DOWNSAMPLING"] = "downsampling";
157
- /**
158
- * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
159
- * missing.
160
- * @type {string}
161
- */
124
+ /***/ (function(module, exports) {
162
125
 
163
- VizBehavior["PLACEHOLDER"] = "placeholder";
164
- VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
165
- VizBehavior["TRELLIS"] = "trellis";
166
- })(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
126
+ module.exports = require("@splunk/visualization-schemas");
167
127
 
168
128
  /***/ }),
169
129
 
170
- /***/ 26:
130
+ /***/ 23:
171
131
  /***/ (function(module, exports) {
172
132
 
173
133
  module.exports = require("@splunk/visualizations-shared/colorConstants");
@@ -175,13 +135,6 @@ module.exports = require("@splunk/visualizations-shared/colorConstants");
175
135
  /***/ }),
176
136
 
177
137
  /***/ 3:
178
- /***/ (function(module, exports) {
179
-
180
- module.exports = require("@splunk/visualizations-shared/schemaUtils");
181
-
182
- /***/ }),
183
-
184
- /***/ 4:
185
138
  /***/ (function(module, exports, __webpack_require__) {
186
139
 
187
140
  "use strict";
@@ -189,97 +142,22 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
189
142
 
190
143
  var _toConsumableArray = __webpack_require__(1);
191
144
 
192
- var _defineProperty = __webpack_require__(7);
193
-
194
- var __rest = this && this.__rest || function (s, e) {
195
- var t = {};
196
-
197
- for (var p in s) {
198
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
199
- }
200
-
201
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
202
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
203
- }
204
- return t;
205
- };
206
-
207
145
  Object.defineProperty(exports, "__esModule", {
208
146
  value: true
209
147
  });
210
- exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
148
+ exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceConfig = exports.enhanceOptionsSchemaWithDynamicOptions = void 0;
211
149
 
212
- var lodash_1 = __webpack_require__(6);
150
+ var lodash_1 = __webpack_require__(5); // included for backwards compatibility
213
151
 
214
- var schemaUtils_1 = __webpack_require__(3);
215
152
 
216
- var VizBehavior_1 = __webpack_require__(2);
153
+ var visualization_schemas_1 = __webpack_require__(2);
217
154
 
218
- var dynamicOptionsDSLType = {
219
- type: 'string',
220
- pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
221
- };
222
- /**
223
- * Helper function to extend an options schema with dynamic options DSL
224
- * @param optionsSchema a visualization's options schema
225
- * @returns an updated options schema that additionally allows strings starting with > for each option
226
- */
227
-
228
- function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
229
- var enhancedOptionsSchema = {};
230
- Object.keys(optionsSchema).forEach(function (key) {
231
- var _a = optionsSchema[key],
232
- title = _a.title,
233
- description = _a.description,
234
- readOnly = _a.readOnly,
235
- writeOnly = _a.writeOnly,
236
- examples = _a.examples,
237
- defaultValue = _a.default,
238
- type = _a.type,
239
- properties = _a.properties,
240
- patternProperties = _a.patternProperties,
241
- remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
242
-
243
- var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
244
- title: title
245
- }), description !== undefined && {
246
- description: description
247
- }), readOnly !== undefined && {
248
- readOnly: readOnly
249
- }), writeOnly !== undefined && {
250
- writeOnly: writeOnly
251
- }), examples !== undefined && {
252
- examples: examples
253
- }), defaultValue !== undefined && {
254
- default: defaultValue
255
- });
256
-
257
- if (type === 'object') {
258
- enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
259
- type: type
260
- }), properties && {
261
- properties: enhanceOptionsSchemaWithDynamicOptions(properties)
262
- });
263
-
264
- if (patternProperties) {
265
- var enhancedPatternProperties = {};
266
- Object.keys(patternProperties).forEach(function (opt) {
267
- enhancedPatternProperties = Object.assign(Object.assign({}, enhancedPatternProperties), enhanceOptionsSchemaWithDynamicOptions(_defineProperty({}, opt, patternProperties[opt])));
268
- });
269
- enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;
270
- }
271
- } else {
272
- enhancedOptionsSchema[key] = Object.assign(Object.assign({}, annotations), {
273
- anyOf: [Object.assign(Object.assign({}, type !== undefined && {
274
- type: type
275
- }), remainingSchemaEntry), dynamicOptionsDSLType]
276
- });
277
- }
278
- });
279
- return enhancedOptionsSchema;
280
- }
281
-
282
- exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
155
+ Object.defineProperty(exports, "enhanceOptionsSchemaWithDynamicOptions", {
156
+ enumerable: true,
157
+ get: function get() {
158
+ return visualization_schemas_1.enhanceOptionsSchemaWithDynamicOptions;
159
+ }
160
+ });
283
161
  /**
284
162
  * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
285
163
  * this function also collapse all editor panels
@@ -290,11 +168,6 @@ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamic
290
168
 
291
169
  function enhanceConfig(vizConfig) {
292
170
  var enhancedConfig = Object.assign({}, vizConfig);
293
-
294
- if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
295
- enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
296
- }
297
-
298
171
  enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
299
172
  return Object.assign(Object.assign({}, config), {
300
173
  open: config.open || false
@@ -418,21 +291,54 @@ exports.insertLayout = insertLayout;
418
291
 
419
292
  /***/ }),
420
293
 
421
- /***/ 6:
294
+ /***/ 5:
422
295
  /***/ (function(module, exports) {
423
296
 
424
297
  module.exports = require("lodash");
425
298
 
426
299
  /***/ }),
427
300
 
428
- /***/ 7:
429
- /***/ (function(module, exports) {
301
+ /***/ 6:
302
+ /***/ (function(module, exports, __webpack_require__) {
303
+
304
+ "use strict";
305
+
306
+
307
+ Object.defineProperty(exports, "__esModule", {
308
+ value: true
309
+ });
310
+ exports.VizBehavior = void 0;
311
+ var VizBehavior;
312
+
313
+ (function (VizBehavior) {
314
+ /**
315
+ * Dynamic Options Behavior.
316
+ * This allows visualization options to be powered by data
317
+ *
318
+ * **Example**
319
+ *
320
+ * sparklineValues: ">primary|seriesByIndex(0)"
321
+ * would configure sparklineValues with an array of data points
322
+ * coming from the first series in the primary datasource
323
+ *
324
+ */
325
+ VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
326
+ VizBehavior["EVENTS"] = "events";
327
+ VizBehavior["DOWNSAMPLING"] = "downsampling";
328
+ /**
329
+ * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
330
+ * missing.
331
+ * @type {string}
332
+ */
430
333
 
431
- module.exports = require("@babel/runtime/helpers/defineProperty");
334
+ VizBehavior["PLACEHOLDER"] = "placeholder";
335
+ VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
336
+ VizBehavior["TRELLIS"] = "trellis";
337
+ })(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
432
338
 
433
339
  /***/ }),
434
340
 
435
- /***/ 8:
341
+ /***/ 7:
436
342
  /***/ (function(module, exports, __webpack_require__) {
437
343
 
438
344
  "use strict";
@@ -461,7 +367,7 @@ var VizCategory;
461
367
 
462
368
  /***/ }),
463
369
 
464
- /***/ 82:
370
+ /***/ 73:
465
371
  /***/ (function(module, exports, __webpack_require__) {
466
372
 
467
373
  "use strict";
@@ -475,33 +381,31 @@ Object.defineProperty(exports, "__esModule", {
475
381
 
476
382
  var i18n_1 = __webpack_require__(0);
477
383
 
478
- var lodash_1 = __webpack_require__(6);
479
-
480
- var schemaUtils_1 = __webpack_require__(3);
384
+ var lodash_1 = __webpack_require__(5);
481
385
 
482
- var colorConstants_1 = __webpack_require__(26);
386
+ var visualization_schemas_1 = __webpack_require__(2);
483
387
 
484
- var visualization_icons_1 = __webpack_require__(12);
388
+ var colorConstants_1 = __webpack_require__(23);
485
389
 
486
- var placeholders_1 = __webpack_require__(11);
390
+ var visualization_icons_1 = __webpack_require__(11);
487
391
 
488
- var variables_1 = __webpack_require__(10);
392
+ var placeholders_1 = __webpack_require__(10);
489
393
 
490
- var pick_1 = __webpack_require__(9);
394
+ var variables_1 = __webpack_require__(9);
491
395
 
492
- var TextAlignCenter_1 = __webpack_require__(83);
396
+ var pick_1 = __webpack_require__(8);
493
397
 
494
- var TextAlignLeft_1 = __webpack_require__(84);
398
+ var TextAlignCenter_1 = __webpack_require__(74);
495
399
 
496
- var TextAlignRight_1 = __webpack_require__(85);
400
+ var TextAlignLeft_1 = __webpack_require__(75);
497
401
 
498
- var configUtils_1 = __webpack_require__(4);
402
+ var TextAlignRight_1 = __webpack_require__(76);
499
403
 
500
- var VizBehavior_1 = __webpack_require__(2);
404
+ var configUtils_1 = __webpack_require__(3);
501
405
 
502
- var consts_1 = __webpack_require__(86);
406
+ var VizBehavior_1 = __webpack_require__(6);
503
407
 
504
- var VizCategory_1 = __webpack_require__(8);
408
+ var VizCategory_1 = __webpack_require__(7);
505
409
 
506
410
  var dataContract = {
507
411
  requiredDataSources: [{
@@ -575,6 +479,11 @@ var defaultContext = {
575
479
  match: 'null',
576
480
  value: 'TextCell'
577
481
  }],
482
+ tableDataFormatByType: {
483
+ time: {
484
+ format: 'YYYY-MM-DD HH:mm:ss'
485
+ }
486
+ },
578
487
  // NOTE: These contexts are used by the table background color editor.
579
488
  // Please be careful removing/renaming/altering them.
580
489
  // There are unit tests and visual test that will capture breakages.
@@ -747,320 +656,6 @@ var matchColorConfig = [{
747
656
  match: '',
748
657
  value: '#5C33FF'
749
658
  }];
750
- var optionsSchema = {
751
- backgroundColor: {
752
- default: '> themes.defaultBackgroundColor',
753
- description: 'Specify the color for the background. You might use a data source to apply the color. The default for enterprise light is "#FFFFFF". The default for enterprise dark is "#000000". The default for prisma dark is "#0B0C0E".',
754
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
755
- type: 'string'
756
- },
757
- columnFormat: {
758
- description: 'Lets you format an individual column in a table. Specify a column in a table as a field, followed by a property. For more information, see the Column Format Align - Left example on the Examples page.',
759
- type: 'object',
760
- patternProperties: {
761
- '.*': {
762
- description: 'Customization for column property',
763
- type: 'object',
764
- properties: {
765
- align: {
766
- description: 'Specify the alignment for the whole column. Valid alignments include "left", "center", and "right". You can also pass an array to specify the alignment of each cell. When set to "auto", the column will use the same configuration as tableFormat.align.',
767
- type: ['string', 'array'],
768
- items: {
769
- type: 'string',
770
- enum: consts_1.validAlignments.concat()
771
- },
772
- default: 'auto'
773
- },
774
- cellTypes: {
775
- description: 'Specify how to render data in cells. Valid cell renders include "TextCell", "ArrayCell", "SparklineCell".',
776
- type: 'array',
777
- items: {
778
- type: 'string',
779
- enum: consts_1.validCellRenderers.concat()
780
- }
781
- },
782
- data: {
783
- description: 'Specify data points to be displayed in the cells of a column.',
784
- type: 'array',
785
- items: {
786
- oneOf: [{
787
- type: 'string'
788
- }, {
789
- type: 'number'
790
- }, {
791
- type: 'array',
792
- items: {
793
- type: ['string', 'number']
794
- }
795
- }]
796
- }
797
- },
798
- headerAlign: {
799
- description: 'Specify the heaader alignment for the whole column. Valid alignments include "left", "center", and "right". When set to "auto", the column will use the same configuration as tableFormat.headerAlign',
800
- type: 'string',
801
- items: {
802
- type: 'string',
803
- enum: consts_1.validAlignments.concat()
804
- },
805
- default: 'auto'
806
- },
807
- rowBackgroundColors: {
808
- description: 'Specify a list of colors, in hexadecimal code, for the background color of each column of the table. For example, ["#2C333B", "32373D"].',
809
- type: 'array',
810
- items: {
811
- type: 'string',
812
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
813
- }
814
- },
815
- rowColors: {
816
- description: 'Specify a list of colors, in hexadecimal code, for the text color of the cells of a column. For example, ["#2C333B", "32373D"].',
817
- type: 'array',
818
- items: {
819
- type: 'string',
820
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
821
- }
822
- },
823
- sparklineAreaColors: {
824
- description: 'Specify a list of colors, in hexadecimal code, for the sparkline area of each column. For example, ["#2C333B", "32373D"].',
825
- type: 'array',
826
- items: {
827
- type: 'string',
828
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
829
- }
830
- },
831
- sparklineColors: {
832
- description: 'Specify a list of colors, in hexadecimal code, for the sparkline stroke of each column. For example, ["#2C333B", "32373D"].',
833
- type: 'array',
834
- items: {
835
- type: 'string',
836
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
837
- }
838
- },
839
- sparklineTypes: {
840
- description: 'Choose either area or line formatting for the Sparkline. Valid sparkline types include "line" and "area".',
841
- type: 'array',
842
- items: {
843
- type: 'string',
844
- enum: consts_1.validSparklineTypes.concat()
845
- }
846
- },
847
- textOverflow: {
848
- description: 'Controls how the text should be truncated within a particular column. Valid types include "anywhere", "break-word", "ellipsis". Columns are "break-word" styled by default when "textOverflow" is not configured.',
849
- type: 'string',
850
- pattern: (0, schemaUtils_1.getPattern)(consts_1.validTextOverflows),
851
- enum: consts_1.validTextOverflows.concat()
852
- },
853
- width: {
854
- description: 'Specify, in pixels, the width of the column. The default displays a minimum width of at least 90, unless the table needs to filled further. The minimum width is 30px.',
855
- type: 'number',
856
- minimum: 30
857
- }
858
- }
859
- }
860
- }
861
- },
862
- count: {
863
- description: 'Specify the maximum number of rows to display.',
864
- type: 'number',
865
- default: 10
866
- },
867
- font: {
868
- default: 'proportional',
869
- description: 'Specify the font style to use for table content.',
870
- type: 'string',
871
- pattern: (0, schemaUtils_1.getPattern)(['proportional', 'monospace'])
872
- },
873
- fontSize: {
874
- default: 'default',
875
- description: 'Specify the font size to use for table content. Font sizes range from extra small (10px) to large (16px) with the default being 14px.',
876
- type: 'string',
877
- pattern: (0, schemaUtils_1.getPattern)(consts_1.validFontSizes)
878
- },
879
- headers: {
880
- default: '> table | getField()',
881
- description: "Specify an array of headers to display on the table. Though these can be statically listed, it's best to use the dynamic default, as it will return the fields of your search.",
882
- type: 'array',
883
- items: {
884
- type: 'string'
885
- }
886
- },
887
- headerVisibility: {
888
- default: 'inline',
889
- description: 'Specify how to display the table header row.',
890
- pattern: (0, schemaUtils_1.getPattern)(consts_1.validHeaderVisibilities),
891
- enum: consts_1.validHeaderVisibilities.concat(),
892
- type: 'string'
893
- },
894
- paginateDataSourceKey: {
895
- default: 'primary',
896
- description: 'Specify the data source key for pagination and sorting.',
897
- type: 'string'
898
- },
899
- showInternalFields: {
900
- default: true,
901
- description: 'Specify whether to show internal fields that start with an underscore. The _time field will still be shown if false.',
902
- type: 'boolean'
903
- },
904
- showRowNumbers: {
905
- default: false,
906
- description: 'Show row numbers in the first column.',
907
- type: 'boolean'
908
- },
909
- table: {
910
- default: '> primary',
911
- description: 'Two dimensional array of data to be displayed in the table.',
912
- type: 'array',
913
- items: {
914
- type: 'array',
915
- items: {
916
- oneOf: [{
917
- type: 'string'
918
- }, {
919
- type: 'number'
920
- }, {
921
- type: 'array',
922
- items: {
923
- type: ['string', 'number']
924
- }
925
- }]
926
- }
927
- }
928
- },
929
- tableFormat: {
930
- description: 'Lets you set global options for a table.',
931
- type: 'object',
932
- properties: {
933
- align: {
934
- default: '> table | type() | matchValue(tableAlignByType)',
935
- description: 'Specify alignment for the whole table. Valid alignments include "left", "center", and "right". You can also pass a 2 dimensional array to specify the alignment of each cell. By default, the table will be aligned by type.',
936
- type: ['string', 'array'],
937
- items: {
938
- type: 'array',
939
- items: {
940
- type: 'string',
941
- enum: consts_1.validAlignments.concat()
942
- }
943
- }
944
- },
945
- cellTypes: {
946
- default: '> table | type() | matchValue(tableCellTypeByType)',
947
- description: 'Specify how to render data in cells. Valid cell renders include "TextCell", "ArrayCell", "SparklineCell".',
948
- type: 'array',
949
- items: {
950
- type: 'array',
951
- items: {
952
- type: 'string',
953
- enum: consts_1.validCellRenderers.concat()
954
- }
955
- }
956
- },
957
- data: {
958
- description: 'Two dimensional data to be displayed in the table. This is usually formatted data instead of raw data from search.',
959
- type: 'array',
960
- items: {
961
- type: 'array',
962
- items: {
963
- oneOf: [{
964
- type: 'string'
965
- }, {
966
- type: 'number'
967
- }, {
968
- type: 'array',
969
- items: {
970
- type: ['string', 'number']
971
- }
972
- }]
973
- }
974
- }
975
- },
976
- headerAlign: {
977
- description: 'Specify the header alignment for the whole table. Valid alignments include "left", "center", and "right".',
978
- type: 'string',
979
- items: {
980
- type: 'string',
981
- enum: consts_1.validAlignments.concat()
982
- },
983
- default: 'left'
984
- },
985
- headerBackgroundColor: {
986
- default: '> themes.defaultHeaderBackgroundColor',
987
- description: 'Specify the table header background color using a hexadecimal code. For example, "#FFFFFF".',
988
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
989
- type: 'string'
990
- },
991
- headerColor: {
992
- description: 'Specify the table header text color using a hexadecimal code. For example, "#FFFFFF".',
993
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
994
- type: 'string'
995
- },
996
- rowBackgroundColors: {
997
- default: '> table | seriesByIndex(0) | pick(tableAltRowBackgroundColorsByTheme)',
998
- description: 'Specify a list of colors, in hexadecimal code, for the background color of each row of the table. For example, ["#2C333B", "32373D"].',
999
- type: 'array',
1000
- items: {
1001
- type: 'array',
1002
- items: {
1003
- type: 'string',
1004
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
1005
- }
1006
- }
1007
- },
1008
- rowColors: {
1009
- description: 'Specify a list of colors, in hexadecimal code, for the text color of each row of the table. For example, ["#2C333B", "32373D"].',
1010
- type: 'array',
1011
- items: {
1012
- type: 'array',
1013
- items: {
1014
- type: 'string',
1015
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
1016
- }
1017
- }
1018
- },
1019
- sparklineAreaColors: {
1020
- description: 'Specify a list of colors, in hexadecimal code, for the sparkline area of each row of the table. For example, ["#2C333B", "32373D"].',
1021
- type: 'array',
1022
- items: {
1023
- type: 'array',
1024
- items: {
1025
- type: 'string',
1026
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
1027
- }
1028
- }
1029
- },
1030
- sparklineColors: {
1031
- description: 'Specify a list of colors, in hexadecimal code, for the sparkline stroke of each row of the table. For example, ["#2C333B", "32373D"].',
1032
- type: 'array',
1033
- items: {
1034
- type: 'array',
1035
- items: {
1036
- type: 'string',
1037
- pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
1038
- }
1039
- }
1040
- },
1041
- sparklineTypes: {
1042
- description: 'Choose either area or line formatting for the Sparkline.',
1043
- type: 'array',
1044
- items: {
1045
- type: 'array',
1046
- items: {
1047
- type: 'string',
1048
- enum: consts_1.validSparklineTypes.concat()
1049
- }
1050
- }
1051
- },
1052
- textOverflow: {
1053
- description: 'Specify the text overflow for the whole column. Valid overflows include "break-word", "anywhere", and "ellipsis".',
1054
- type: 'string',
1055
- items: {
1056
- type: 'string',
1057
- enum: consts_1.validTextOverflows.concat()
1058
- },
1059
- default: 'break-word'
1060
- }
1061
- }
1062
- }
1063
- };
1064
659
  var themes = {
1065
660
  defaultBackgroundColor: function defaultBackgroundColor(props) {
1066
661
  return (0, pick_1.default)({
@@ -1252,6 +847,9 @@ var editorConfig = [{
1252
847
  align: 'auto',
1253
848
  headerAlign: 'auto',
1254
849
  textOverflow: 'break-word'
850
+ },
851
+ time: {
852
+ format: 'YYYY-MM-DD HH:mm:ss'
1255
853
  }
1256
854
  },
1257
855
  textFormatConfig: [[Object.assign({}, headerAlignConfigColumn)], [Object.assign({}, textAlignConfigColumn)], [Object.assign({}, textOverflowConfigColumn)]],
@@ -1319,7 +917,7 @@ var config = {
1319
917
  dataContract: dataContract,
1320
918
  size: size,
1321
919
  defaultContext: defaultContext,
1322
- optionsSchema: optionsSchema,
920
+ optionsSchema: visualization_schemas_1.tableOptionsSchema,
1323
921
  editorConfig: editorConfig,
1324
922
  events: {
1325
923
  'cell.click': {
@@ -1333,50 +931,38 @@ exports.default = (0, configUtils_1.enhanceConfig)(config);
1333
931
 
1334
932
  /***/ }),
1335
933
 
1336
- /***/ 83:
934
+ /***/ 74:
1337
935
  /***/ (function(module, exports) {
1338
936
 
1339
937
  module.exports = require("@splunk/react-icons/TextAlignCenter");
1340
938
 
1341
939
  /***/ }),
1342
940
 
1343
- /***/ 84:
941
+ /***/ 75:
1344
942
  /***/ (function(module, exports) {
1345
943
 
1346
944
  module.exports = require("@splunk/react-icons/TextAlignLeft");
1347
945
 
1348
946
  /***/ }),
1349
947
 
1350
- /***/ 85:
948
+ /***/ 76:
1351
949
  /***/ (function(module, exports) {
1352
950
 
1353
951
  module.exports = require("@splunk/react-icons/TextAlignRight");
1354
952
 
1355
953
  /***/ }),
1356
954
 
1357
- /***/ 86:
1358
- /***/ (function(module, exports, __webpack_require__) {
1359
-
1360
- "use strict";
1361
-
955
+ /***/ 8:
956
+ /***/ (function(module, exports) {
1362
957
 
1363
- Object.defineProperty(exports, "__esModule", {
1364
- value: true
1365
- });
1366
- exports.validFontSizes = exports.validTextOverflows = exports.validAlignments = exports.validHeaderVisibilities = exports.validSparklineTypes = exports.validCellRenderers = void 0;
1367
- exports.validCellRenderers = ['TextCell', 'ArrayCell', 'SparklineCell'];
1368
- exports.validSparklineTypes = ['line', 'area'];
1369
- exports.validHeaderVisibilities = ['none', 'fixed', 'inline'];
1370
- exports.validAlignments = ['left', 'center', 'right'];
1371
- exports.validTextOverflows = ['anywhere', 'break-word', 'ellipsis'];
1372
- exports.validFontSizes = ['extraSmall', 'small', 'default', 'large'];
958
+ module.exports = require("@splunk/themes/pick");
1373
959
 
1374
960
  /***/ }),
1375
961
 
1376
962
  /***/ 9:
1377
963
  /***/ (function(module, exports) {
1378
964
 
1379
- module.exports = require("@splunk/themes/pick");
965
+ module.exports = require("@splunk/themes/variables");
1380
966
 
1381
967
  /***/ })
1382
968