@splunk/visualizations 25.8.1 → 25.9.1

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 (85) hide show
  1. package/Area.config.js +2 -2
  2. package/Area.config.js.map +1 -1
  3. package/Area.js +25 -9
  4. package/Area.js.map +1 -1
  5. package/Bar.config.js +3 -3
  6. package/Bar.config.js.map +1 -1
  7. package/Bar.js +26 -10
  8. package/Bar.js.map +1 -1
  9. package/Bubble.js +23 -7
  10. package/Bubble.js.map +1 -1
  11. package/ChoroplethSvg.js +20 -6
  12. package/ChoroplethSvg.js.map +1 -1
  13. package/Column.config.js +4 -4
  14. package/Column.config.js.map +1 -1
  15. package/Column.js +27 -11
  16. package/Column.js.map +1 -1
  17. package/Ellipse.js +20 -6
  18. package/Ellipse.js.map +1 -1
  19. package/Events.js +20 -6
  20. package/Events.js.map +1 -1
  21. package/FillerGauge.config.js +1 -1
  22. package/FillerGauge.config.js.map +1 -1
  23. package/FillerGauge.js +21 -7
  24. package/FillerGauge.js.map +1 -1
  25. package/Image.js +20 -6
  26. package/Image.js.map +1 -1
  27. package/Line.config.js +13 -4
  28. package/Line.config.js.map +1 -1
  29. package/Line.js +38 -12
  30. package/Line.js.map +1 -1
  31. package/LinkGraph.js +2117 -2472
  32. package/LinkGraph.js.map +1 -1
  33. package/Map.js +114 -93
  34. package/Map.js.map +1 -1
  35. package/Markdown.config.js +1 -0
  36. package/Markdown.config.js.map +1 -1
  37. package/Markdown.js +40 -25
  38. package/Markdown.js.map +1 -1
  39. package/MarkerGauge.config.js +1 -1
  40. package/MarkerGauge.config.js.map +1 -1
  41. package/MarkerGauge.js +29 -15
  42. package/MarkerGauge.js.map +1 -1
  43. package/ParallelCoordinates.js +49 -35
  44. package/ParallelCoordinates.js.map +1 -1
  45. package/Pie.config.js +1 -1
  46. package/Pie.config.js.map +1 -1
  47. package/Pie.js +32 -16
  48. package/Pie.js.map +1 -1
  49. package/Punchcard.js +143 -129
  50. package/Punchcard.js.map +1 -1
  51. package/README.internal.md +15 -5
  52. package/README.md +3 -1
  53. package/Rectangle.js +61 -47
  54. package/Rectangle.js.map +1 -1
  55. package/Sankey.js +34 -20
  56. package/Sankey.js.map +1 -1
  57. package/Scatter.js +74 -58
  58. package/Scatter.js.map +1 -1
  59. package/SingleValue.config.js +6 -6
  60. package/SingleValue.config.js.map +1 -1
  61. package/SingleValue.js +41 -25
  62. package/SingleValue.js.map +1 -1
  63. package/SingleValueBasic.js +4 -4
  64. package/SingleValueBasic.js.map +1 -1
  65. package/SingleValueIcon.config.js +10 -8
  66. package/SingleValueIcon.config.js.map +1 -1
  67. package/SingleValueIcon.js +86 -70
  68. package/SingleValueIcon.js.map +1 -1
  69. package/SingleValueRadial.config.js +10 -8
  70. package/SingleValueRadial.config.js.map +1 -1
  71. package/SingleValueRadial.js +85 -69
  72. package/SingleValueRadial.js.map +1 -1
  73. package/Table.config.js +1 -1
  74. package/Table.config.js.map +1 -1
  75. package/Table.js +54 -36
  76. package/Table.js.map +1 -1
  77. package/common/Charting.js +3 -1
  78. package/common/Charting.js.map +1 -1
  79. package/common/OptionsDoc.js +9 -6
  80. package/common/OptionsDoc.js.map +1 -1
  81. package/common/OverviewDoc.js +5 -5
  82. package/common/OverviewDoc.js.map +1 -1
  83. package/common/withDashboardViz.js +20 -6
  84. package/common/withDashboardViz.js.map +1 -1
  85. package/package.json +23 -23
package/Table.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 = 474);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 472);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
@@ -214,7 +214,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
214
214
  }
215
215
  return React.createElement(FixSizeItem, {
216
216
  "data-test": "fix-size-item",
217
- "data-splunk-visualization-version": "25.8.1 - 742d5fb96",
217
+ "data-splunk-visualization-version": "25.9.1 - 5ba41e723",
218
218
  width: width,
219
219
  height: height,
220
220
  backgroundColor: backgroundColor
@@ -321,10 +321,10 @@ Object.defineProperty(exports, "__esModule", {
321
321
  exports.config = exports.PureTable = exports.themes = exports.computeVizProps = void 0;
322
322
  var lodash_1 = __webpack_require__(3);
323
323
  var colorUtils_1 = __webpack_require__(12);
324
- var config_1 = __webpack_require__(475);
324
+ var config_1 = __webpack_require__(473);
325
325
  exports.config = config_1.default;
326
326
  var withDashboardViz_1 = __webpack_require__(36);
327
- var PureTable_1 = __webpack_require__(476);
327
+ var PureTable_1 = __webpack_require__(474);
328
328
  exports.PureTable = PureTable_1.default;
329
329
  var computeVizProps = function computeVizProps(_a) {
330
330
  var props = __rest(_a, []);
@@ -1002,10 +1002,18 @@ var withDashboardViz = function withDashboardViz(opts) {
1002
1002
  var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat(id_1.createGUID())),
1003
1003
  _React$useState4 = _slicedToArray(_React$useState3, 1),
1004
1004
  visualizationID = _React$useState4[0];
1005
- var _React$useState5 = React.useState(Boolean(featureFlagContext && featureFlagContext.visualizations_useWebWorkersForDSL && typeof Worker !== 'undefined')),
1005
+ var _React$useState5 = React.useState({}),
1006
1006
  _React$useState6 = _slicedToArray(_React$useState5, 2),
1007
- useAsyncEvaluatedOptions = _React$useState6[0],
1008
- setUseAsyncEvaluatedOptions = _React$useState6[1];
1007
+ dataSourcesInState = _React$useState6[0],
1008
+ setDataSourcesInState = _React$useState6[1];
1009
+ var _React$useState7 = React.useState(),
1010
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
1011
+ dataFramesInState = _React$useState8[0],
1012
+ setDataFramesInState = _React$useState8[1];
1013
+ var _React$useState9 = React.useState(Boolean(featureFlagContext && featureFlagContext.visualizations_useWebWorkersForDSL && typeof Worker !== 'undefined')),
1014
+ _React$useState10 = _slicedToArray(_React$useState9, 2),
1015
+ useAsyncEvaluatedOptions = _React$useState10[0],
1016
+ setUseAsyncEvaluatedOptions = _React$useState10[1];
1009
1017
  evaluatedOptions = useDeepMemo_1.useDeepMemo(function () {
1010
1018
  try {
1011
1019
  if (useAsyncEvaluatedOptions) {
@@ -1028,10 +1036,16 @@ var withDashboardViz = function withDashboardViz(opts) {
1028
1036
  setUseAsyncEvaluatedOptions(false);
1029
1037
  });
1030
1038
  } else {
1039
+ var dataFrames = dataFramesInState;
1040
+ if (dataSources !== dataSourcesInState) {
1041
+ setDataSourcesInState(dataSources);
1042
+ dataFrames = Options_1.Options.dataFrameFromDataSource(dataSources);
1043
+ setDataFramesInState(dataFrames);
1044
+ }
1031
1045
  return Options_1.Options.evaluate({
1032
1046
  context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
1033
1047
  options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
1034
- }, dataSources, themeFunc);
1048
+ }, dataSources, themeFunc, dataFrames);
1035
1049
  }
1036
1050
  } catch (e) {
1037
1051
  // eslint-disable-next-line no-console
@@ -1510,7 +1524,7 @@ var Cover = styled_components_1.default.div.withConfig({
1510
1524
  componentId: "sc-1gsbnxb-0"
1511
1525
  })(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
1512
1526
  var Blocker = styled_components_1.default.div.attrs({
1513
- 'data-splunk-visualization-version': "25.8.1 - 742d5fb96"
1527
+ 'data-splunk-visualization-version': "25.9.1 - 5ba41e723"
1514
1528
  }).withConfig({
1515
1529
  displayName: "withEditModeCover__Blocker",
1516
1530
  componentId: "sc-1gsbnxb-1"
@@ -1591,7 +1605,7 @@ exports.default = withPlaceholder;
1591
1605
 
1592
1606
  /***/ }),
1593
1607
 
1594
- /***/ 474:
1608
+ /***/ 472:
1595
1609
  /***/ (function(module, exports, __webpack_require__) {
1596
1610
 
1597
1611
  "use strict";
@@ -1632,7 +1646,7 @@ Object.defineProperty(exports, "default", {
1632
1646
 
1633
1647
  /***/ }),
1634
1648
 
1635
- /***/ 475:
1649
+ /***/ 473:
1636
1650
  /***/ (function(module, exports, __webpack_require__) {
1637
1651
 
1638
1652
  "use strict";
@@ -1890,7 +1904,7 @@ var optionsSchema = {
1890
1904
  enum: consts_1.validTextOverflows.concat()
1891
1905
  },
1892
1906
  width: {
1893
- description: 'Controls how wide the column should be displayed.',
1907
+ 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.',
1894
1908
  type: 'number',
1895
1909
  minimum: 30
1896
1910
  }
@@ -2344,7 +2358,7 @@ exports.default = configUtils_1.enhanceConfig(config);
2344
2358
 
2345
2359
  /***/ }),
2346
2360
 
2347
- /***/ 476:
2361
+ /***/ 474:
2348
2362
  /***/ (function(module, exports, __webpack_require__) {
2349
2363
 
2350
2364
  "use strict";
@@ -2379,15 +2393,15 @@ var colorUtils_1 = __webpack_require__(12);
2379
2393
  var style_1 = __webpack_require__(14);
2380
2394
  var pick_1 = __webpack_require__(23);
2381
2395
  var variables_1 = __webpack_require__(10);
2382
- var hooks_1 = __webpack_require__(477);
2396
+ var hooks_1 = __webpack_require__(475);
2383
2397
  var consts_1 = __webpack_require__(134);
2384
- var cells_1 = __webpack_require__(478);
2398
+ var cells_1 = __webpack_require__(476);
2385
2399
  var getPagination_1 = __webpack_require__(34);
2386
2400
  var getSorting_1 = __webpack_require__(33);
2387
2401
  var FixedSizeContainer_1 = __webpack_require__(13);
2388
2402
  // debounce was imported this way due to typing
2389
2403
  // eslint-disable-next-line import/order
2390
- var debounce = __webpack_require__(483);
2404
+ var debounce = __webpack_require__(481);
2391
2405
  exports.MINIMUM_COLUMN_SIZE = 30;
2392
2406
  exports.INITIAL_UNSET_COLUMN_WIDTH = 90;
2393
2407
  var NonVisibleTableHead = styled_components_1.default(Table_1.default.Head).withConfig({
@@ -2476,7 +2490,8 @@ var withEmptyTableMessage = function withEmptyTableMessage(Viz) {
2476
2490
  showInternalFields = props.showInternalFields,
2477
2491
  tableFormat = props.tableFormat,
2478
2492
  columnFormat = props.columnFormat,
2479
- paginatorParams = props.paginatorParams;
2493
+ paginatorParams = props.paginatorParams,
2494
+ count = props.count;
2480
2495
  var _hooks_1$useTable = hooks_1.useTable({
2481
2496
  headers: headers,
2482
2497
  table: table,
@@ -2491,7 +2506,8 @@ var withEmptyTableMessage = function withEmptyTableMessage(Viz) {
2491
2506
  data: lodash_1.cloneDeep(tableFormat.data)
2492
2507
  }),
2493
2508
  columnFormat: columnFormat,
2494
- paginationOffset: paginatorParams === null || paginatorParams === void 0 ? void 0 : paginatorParams.current
2509
+ paginationOffset: paginatorParams === null || paginatorParams === void 0 ? void 0 : paginatorParams.current,
2510
+ count: count
2495
2511
  }),
2496
2512
  tableHeader = _hooks_1$useTable.tableHeader,
2497
2513
  tableBody = _hooks_1$useTable.tableBody;
@@ -2840,7 +2856,7 @@ exports.default = withEmptyTableMessage(FixedSizeContainer_1.default(PureTable))
2840
2856
 
2841
2857
  /***/ }),
2842
2858
 
2843
- /***/ 477:
2859
+ /***/ 475:
2844
2860
  /***/ (function(module, exports, __webpack_require__) {
2845
2861
 
2846
2862
  "use strict";
@@ -3063,12 +3079,14 @@ var useTable = function useTable() {
3063
3079
  _tableArgs$columnForm = tableArgs.columnFormat,
3064
3080
  columnFormat = _tableArgs$columnForm === void 0 ? {} : _tableArgs$columnForm,
3065
3081
  _tableArgs$pagination = tableArgs.paginationOffset,
3066
- paginationOffset = _tableArgs$pagination === void 0 ? 0 : _tableArgs$pagination;
3082
+ paginationOffset = _tableArgs$pagination === void 0 ? 0 : _tableArgs$pagination,
3083
+ _tableArgs$count = tableArgs.count,
3084
+ count = _tableArgs$count === void 0 ? 0 : _tableArgs$count;
3067
3085
  var longestColumnLength = Math.max.apply(Math, _toConsumableArray(table.map(function (column) {
3068
3086
  return column.length;
3069
3087
  })));
3070
3088
  if (showRowNumbers) {
3071
- var correctedPaginationOffset = Math.max(0, (paginationOffset - 1) * longestColumnLength);
3089
+ var correctedPaginationOffset = Math.max(0, (paginationOffset - 1) * count);
3072
3090
  headers = ['#'].concat(_toConsumableArray(headers));
3073
3091
  table = [Array.from({
3074
3092
  length: longestColumnLength
@@ -3185,7 +3203,7 @@ exports.useTable = useTable;
3185
3203
 
3186
3204
  /***/ }),
3187
3205
 
3188
- /***/ 478:
3206
+ /***/ 476:
3189
3207
  /***/ (function(module, exports, __webpack_require__) {
3190
3208
 
3191
3209
  "use strict";
@@ -3211,14 +3229,14 @@ var __exportStar = this && this.__exportStar || function (m, exports) {
3211
3229
  Object.defineProperty(exports, "__esModule", {
3212
3230
  value: true
3213
3231
  });
3232
+ __exportStar(__webpack_require__(477), exports);
3233
+ __exportStar(__webpack_require__(478), exports);
3214
3234
  __exportStar(__webpack_require__(479), exports);
3215
3235
  __exportStar(__webpack_require__(480), exports);
3216
- __exportStar(__webpack_require__(481), exports);
3217
- __exportStar(__webpack_require__(482), exports);
3218
3236
 
3219
3237
  /***/ }),
3220
3238
 
3221
- /***/ 479:
3239
+ /***/ 477:
3222
3240
  /***/ (function(module, exports, __webpack_require__) {
3223
3241
 
3224
3242
  "use strict";
@@ -3239,14 +3257,7 @@ exports.SwitchTableCell = SwitchTableCell;
3239
3257
 
3240
3258
  /***/ }),
3241
3259
 
3242
- /***/ 48:
3243
- /***/ (function(module, exports) {
3244
-
3245
- module.exports = require("@splunk/visualization-icons/placeholders");
3246
-
3247
- /***/ }),
3248
-
3249
- /***/ 480:
3260
+ /***/ 478:
3250
3261
  /***/ (function(module, exports, __webpack_require__) {
3251
3262
 
3252
3263
  "use strict";
@@ -3281,7 +3292,7 @@ exports.TextCell.displayName = 'TextCell';
3281
3292
 
3282
3293
  /***/ }),
3283
3294
 
3284
- /***/ 481:
3295
+ /***/ 479:
3285
3296
  /***/ (function(module, exports, __webpack_require__) {
3286
3297
 
3287
3298
  "use strict";
@@ -3324,7 +3335,14 @@ exports.ArrayCell.displayName = 'ArrayCell';
3324
3335
 
3325
3336
  /***/ }),
3326
3337
 
3327
- /***/ 482:
3338
+ /***/ 48:
3339
+ /***/ (function(module, exports) {
3340
+
3341
+ module.exports = require("@splunk/visualization-icons/placeholders");
3342
+
3343
+ /***/ }),
3344
+
3345
+ /***/ 480:
3328
3346
  /***/ (function(module, exports, __webpack_require__) {
3329
3347
 
3330
3348
  "use strict";
@@ -3415,7 +3433,7 @@ exports.SparklineCell.displayName = 'SparklineCell';
3415
3433
 
3416
3434
  /***/ }),
3417
3435
 
3418
- /***/ 483:
3436
+ /***/ 481:
3419
3437
  /***/ (function(module, exports) {
3420
3438
 
3421
3439
  module.exports = require("lodash/debounce");