evui 3.4.100 → 3.4.102

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.
@@ -11149,7 +11149,7 @@ module.exports = exports;
11149
11149
  /***/ "9224":
11150
11150
  /***/ (function(module) {
11151
11151
 
11152
- module.exports = JSON.parse("{\"a\":\"3.4.100\"}");
11152
+ module.exports = JSON.parse("{\"a\":\"3.4.102\"}");
11153
11153
 
11154
11154
  /***/ }),
11155
11155
 
@@ -35039,6 +35039,7 @@ function uniqBy(array, iteratee) {
35039
35039
 
35040
35040
 
35041
35041
 
35042
+
35042
35043
 
35043
35044
 
35044
35045
  var uses_this = undefined;
@@ -36045,11 +36046,19 @@ var uses_sortEvent = function sortEvent(params) {
36045
36046
  bCol = _getColumnValue.bCol;
36046
36047
 
36047
36048
  if ((!aCol || typeof aCol === 'string') && (!bCol || typeof bCol === 'string')) {
36048
- var _aCol, _bCol;
36049
-
36050
36049
  aCol = aCol || '';
36051
36050
  bCol = bCol || '';
36052
- return sortFn((_aCol = aCol) === null || _aCol === void 0 ? void 0 : _aCol.toLowerCase(), (_bCol = bCol) === null || _bCol === void 0 ? void 0 : _bCol.toLowerCase());
36051
+ var lowerA = aCol.toLowerCase();
36052
+ var lowerB = bCol.toLowerCase();
36053
+
36054
+ if (aCol !== bCol && lowerA === lowerB) {
36055
+ var diffIndex = Array.from(aCol).findIndex(function (char, idx) {
36056
+ return char !== bCol[idx];
36057
+ });
36058
+ return sortFn(aCol[diffIndex], bCol[diffIndex]);
36059
+ }
36060
+
36061
+ return sortFn(lowerA, lowerB);
36053
36062
  }
36054
36063
 
36055
36064
  return 0;
@@ -36063,11 +36072,11 @@ var uses_sortEvent = function sortEvent(params) {
36063
36072
  bCol = _getColumnValue2.bCol;
36064
36073
 
36065
36074
  if (!aCol || typeof aCol === 'string' || typeof aCol === 'number') {
36066
- var _aCol2, _bCol2;
36075
+ var _aCol, _bCol;
36067
36076
 
36068
36077
  aCol = aCol === '' ? null : aCol;
36069
36078
  bCol = bCol === '' ? null : bCol;
36070
- return numberSortFn((_aCol2 = aCol) !== null && _aCol2 !== void 0 ? _aCol2 : null, (_bCol2 = bCol) !== null && _bCol2 !== void 0 ? _bCol2 : null);
36079
+ return numberSortFn((_aCol = aCol) !== null && _aCol !== void 0 ? _aCol : null, (_bCol = bCol) !== null && _bCol !== void 0 ? _bCol : null);
36071
36080
  }
36072
36081
 
36073
36082
  return 0;
@@ -43716,6 +43725,18 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
43716
43725
  h: 0
43717
43726
  };
43718
43727
  this.type = 'heatMap';
43728
+ this.currentLabelInfo = {
43729
+ x: {
43730
+ steps: 0,
43731
+ min: 0,
43732
+ max: 0
43733
+ },
43734
+ y: {
43735
+ steps: 0,
43736
+ min: 0,
43737
+ max: 0
43738
+ }
43739
+ };
43719
43740
  }
43720
43741
  /**
43721
43742
  * create series color axis
@@ -43991,9 +44012,17 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
43991
44012
  var minmaxY = axesSteps.y[this.yAxisIndex];
43992
44013
  this.size.w = xArea / minmaxX.oriSteps;
43993
44014
  this.size.h = yArea / minmaxY.oriSteps;
43994
- this.filterdCount = {
43995
- x: minmaxX.oriSteps,
43996
- y: minmaxY.oriSteps
44015
+ this.currentLabelInfo = {
44016
+ x: {
44017
+ steps: minmaxX.oriSteps,
44018
+ min: minmaxX.graphMin,
44019
+ max: minmaxX.graphMax
44020
+ },
44021
+ y: {
44022
+ steps: minmaxY.oriSteps,
44023
+ min: minmaxY.graphMin,
44024
+ max: minmaxY.graphMax
44025
+ }
43997
44026
  };
43998
44027
 
43999
44028
  var getOpacity = function getOpacity(item, opacity, index) {
@@ -44381,10 +44410,8 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
44381
44410
  };
44382
44411
 
44383
44412
  if (labels.x.length && labels.y.length) {
44384
- var _this$filterdCount$x, _this$filterdCount, _this$filterdCount$y, _this$filterdCount2;
44385
-
44386
- var labelXCount = (_this$filterdCount$x = (_this$filterdCount = this.filterdCount) === null || _this$filterdCount === void 0 ? void 0 : _this$filterdCount.x) !== null && _this$filterdCount$x !== void 0 ? _this$filterdCount$x : labels.x.length;
44387
- var labelYCount = (_this$filterdCount$y = (_this$filterdCount2 = this.filterdCount) === null || _this$filterdCount2 === void 0 ? void 0 : _this$filterdCount2.y) !== null && _this$filterdCount$y !== void 0 ? _this$filterdCount$y : labels.y.length;
44413
+ var labelXCount = this.currentLabelInfo.x.steps || labels.x.length;
44414
+ var labelYCount = this.currentLabelInfo.y.steps || labels.y.length;
44388
44415
  var x1 = range.x1,
44389
44416
  x2 = range.x2,
44390
44417
  y1 = range.y1,
@@ -44433,10 +44460,17 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
44433
44460
 
44434
44461
  return blockRange;
44435
44462
  }
44463
+ }, {
44464
+ key: "getFilteredLabel",
44465
+ value: function getFilteredLabel(labels, count, min, max) {
44466
+ return labels.length !== count ? labels.filter(function (label) {
44467
+ return min <= label && label <= max;
44468
+ }) : labels;
44469
+ }
44436
44470
  }, {
44437
44471
  key: "findSelectionRange",
44438
44472
  value: function findSelectionRange(rangeInfo) {
44439
- var xcp = rangeInfo.xcp,
44473
+ var xsp = rangeInfo.xsp,
44440
44474
  ycp = rangeInfo.ycp,
44441
44475
  width = rangeInfo.width,
44442
44476
  height = rangeInfo.height,
@@ -44451,26 +44485,38 @@ var element_heatmap_HeatMap = /*#__PURE__*/function () {
44451
44485
  labelY = _this$labels.y;
44452
44486
 
44453
44487
  if (labelX.length && labelY.length) {
44454
- var gapX = (x2 - x1) / labelX.length;
44455
- var gapY = (y2 - y1) / labelY.length;
44456
- var xsp = xcp;
44457
- var xep = xcp + width;
44488
+ var _this$currentLabelInf = this.currentLabelInfo,
44489
+ _this$currentLabelInf2 = _this$currentLabelInf.x,
44490
+ xCurrentCount = _this$currentLabelInf2.steps,
44491
+ xMin = _this$currentLabelInf2.min,
44492
+ xMax = _this$currentLabelInf2.max,
44493
+ _this$currentLabelInf3 = _this$currentLabelInf.y,
44494
+ yCurrentCount = _this$currentLabelInf3.steps,
44495
+ yMin = _this$currentLabelInf3.min,
44496
+ yMax = _this$currentLabelInf3.max;
44497
+ var labelXCount = xCurrentCount || labelX.x.length;
44498
+ var labelYCount = yCurrentCount || labelY.y.length;
44499
+ var gapX = (x2 - x1) / labelXCount;
44500
+ var gapY = (y2 - y1) / labelYCount;
44501
+ var xep = xsp + width;
44458
44502
  var ysp = ycp;
44459
- var yep = ycp + height;
44503
+ var yep = ysp + height;
44460
44504
  var xIndex = {
44461
44505
  min: Math.floor((xsp - x1) / gapX),
44462
44506
  max: Math.floor((xep - x1 - gapX) / gapX)
44463
44507
  };
44464
- var lastIndexY = labelY.length - 1;
44508
+ var lastIndexY = labelYCount - 1;
44465
44509
  var yIndex = {
44466
44510
  min: lastIndexY - Math.floor((yep - y1 - gapY) / gapY),
44467
44511
  max: lastIndexY - Math.floor((ysp - y1) / gapY)
44468
44512
  };
44513
+ var filteredLabelX = this.getFilteredLabel(labelX, labelXCount, xMin, xMax);
44514
+ var filteredLabelY = this.getFilteredLabel(labelY, labelYCount, yMin, yMax);
44469
44515
  selectionRange = {
44470
- xMin: labelX[xIndex.min],
44471
- xMax: labelX[xIndex.max],
44472
- yMin: labelY[yIndex.min],
44473
- yMax: labelY[yIndex.max]
44516
+ xMin: filteredLabelX[xIndex.min],
44517
+ xMax: filteredLabelX[xIndex.max],
44518
+ yMin: filteredLabelY[yIndex.min],
44519
+ yMax: filteredLabelY[yIndex.max]
44474
44520
  };
44475
44521
  }
44476
44522
 
@@ -50453,13 +50499,21 @@ var plugins_interaction_modules = {
50453
50499
  };
50454
50500
 
50455
50501
  this.onWheel = function (e) {
50456
- var _this$tooltipDOM, _this$tooltipDOM$styl;
50502
+ var _this$tooltipDOM, _this$tooltipDOM$styl, _this$tooltipDOM2;
50457
50503
 
50458
50504
  var isTooltipVisible = ((_this$tooltipDOM = _this.tooltipDOM) === null || _this$tooltipDOM === void 0 ? void 0 : (_this$tooltipDOM$styl = _this$tooltipDOM.style) === null || _this$tooltipDOM$styl === void 0 ? void 0 : _this$tooltipDOM$styl.display) === 'block';
50505
+ var customTooltip = (_this$tooltipDOM2 = _this.tooltipDOM) === null || _this$tooltipDOM2 === void 0 ? void 0 : _this$tooltipDOM2.querySelector(_this.options.tooltip.htmlScrollTarget);
50459
50506
 
50460
- if (isTooltipVisible) {
50507
+ if (isTooltipVisible || customTooltip && customTooltip.scrollHeight > customTooltip.clientHeight) {
50461
50508
  e.preventDefault();
50462
- _this.tooltipBodyDOM.scrollTop += e.deltaY;
50509
+
50510
+ if (isTooltipVisible) {
50511
+ _this.tooltipBodyDOM.scrollTop += e.deltaY;
50512
+ }
50513
+
50514
+ if (customTooltip) {
50515
+ customTooltip.scrollTop += e.deltaY;
50516
+ }
50463
50517
  }
50464
50518
  };
50465
50519
 
@@ -52226,7 +52280,8 @@ var plugins_tooltip_modules = {
52226
52280
  sId: sId,
52227
52281
  data: hitInfoItems[sId].data,
52228
52282
  color: hitInfoItems[sId].color,
52229
- name: hitInfoItems[sId].name
52283
+ name: hitInfoItems[sId].name,
52284
+ dataId: hitInfoItems[sId].id
52230
52285
  });
52231
52286
  });
52232
52287
  var userCustomTooltipBody = helpers_util.htmlToElement(opt === null || opt === void 0 ? void 0 : (_opt$formatter3 = opt.formatter) === null || _opt$formatter3 === void 0 ? void 0 : _opt$formatter3.html(seriesList));