evui 3.3.49 → 3.3.50
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.
- package/dist/evui.common.js +70 -10
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +70 -10
- package/dist/evui.umd.js.map +1 -1
- package/dist/evui.umd.min.js +1 -1
- package/dist/evui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chart/element/element.line.js +63 -7
- package/src/components/chart/model/model.store.js +18 -2
- package/src/components/grid/uses.js +2 -0
- package/src/components/treeGrid/uses.js +2 -0
package/dist/evui.common.js
CHANGED
|
@@ -7988,7 +7988,7 @@ $({ target: 'Number', stat: true }, {
|
|
|
7988
7988
|
/***/ "9224":
|
|
7989
7989
|
/***/ (function(module) {
|
|
7990
7990
|
|
|
7991
|
-
module.exports = JSON.parse("{\"a\":\"3.3.
|
|
7991
|
+
module.exports = JSON.parse("{\"a\":\"3.3.50\"}");
|
|
7992
7992
|
|
|
7993
7993
|
/***/ }),
|
|
7994
7994
|
|
|
@@ -30027,6 +30027,7 @@ var uses_contextMenuEvent = function contextMenuEvent(params) {
|
|
|
30027
30027
|
menuItem.disabled = !menuItem.validate(menuItem.itemId, row);
|
|
30028
30028
|
}
|
|
30029
30029
|
|
|
30030
|
+
menuItem.selectedRow = row !== null && row !== void 0 ? row : [];
|
|
30030
30031
|
return menuItem;
|
|
30031
30032
|
});
|
|
30032
30033
|
menuItems.push.apply(menuItems, _toConsumableArray(customItems));
|
|
@@ -33291,7 +33292,7 @@ var modules = {
|
|
|
33291
33292
|
return null;
|
|
33292
33293
|
}
|
|
33293
33294
|
|
|
33294
|
-
itemPosition = [this.getItemByPosition([dataInfo.xp, dataInfo.yp], useApproximate, dataIndex)];
|
|
33295
|
+
itemPosition = [this.getItemByPosition([dataInfo.xp, dataInfo.yp], useApproximate, dataIndex, true)];
|
|
33295
33296
|
} else {
|
|
33296
33297
|
var seriesList = Object.entries(this.seriesList);
|
|
33297
33298
|
var firShowSeriesID;
|
|
@@ -33316,7 +33317,7 @@ var modules = {
|
|
|
33316
33317
|
return null;
|
|
33317
33318
|
}
|
|
33318
33319
|
|
|
33319
|
-
return _this6.getItemByPosition([(_dataInfo$xp = dataInfo === null || dataInfo === void 0 ? void 0 : dataInfo.xp) !== null && _dataInfo$xp !== void 0 ? _dataInfo$xp : 0, (_dataInfo$yp = dataInfo === null || dataInfo === void 0 ? void 0 : dataInfo.yp) !== null && _dataInfo$yp !== void 0 ? _dataInfo$yp : 0], useApproximate, idx);
|
|
33320
|
+
return _this6.getItemByPosition([(_dataInfo$xp = dataInfo === null || dataInfo === void 0 ? void 0 : dataInfo.xp) !== null && _dataInfo$xp !== void 0 ? _dataInfo$xp : 0, (_dataInfo$yp = dataInfo === null || dataInfo === void 0 ? void 0 : dataInfo.yp) !== null && _dataInfo$yp !== void 0 ? _dataInfo$yp : 0], useApproximate, idx, true);
|
|
33320
33321
|
});
|
|
33321
33322
|
}
|
|
33322
33323
|
|
|
@@ -33344,6 +33345,8 @@ var modules = {
|
|
|
33344
33345
|
* @param {array} offset position x and y
|
|
33345
33346
|
* @param {boolean} useApproximate if it's true. it'll look for closed item on mouse position
|
|
33346
33347
|
* @param {number} dataIndex selected data index
|
|
33348
|
+
* @param {boolean} useSelectLabelOrItem used to display select label/item at tooltip location
|
|
33349
|
+
*
|
|
33347
33350
|
* @returns {object} clicked item information
|
|
33348
33351
|
*/
|
|
33349
33352
|
getItemByPosition: function getItemByPosition(offset) {
|
|
@@ -33351,6 +33354,7 @@ var modules = {
|
|
|
33351
33354
|
|
|
33352
33355
|
var useApproximate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
33353
33356
|
var dataIndex = arguments.length > 2 ? arguments[2] : undefined;
|
|
33357
|
+
var useSelectLabelOrItem = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
33354
33358
|
var seriesIDs = Object.keys(this.seriesList);
|
|
33355
33359
|
var isHorizontal = !!this.options.horizontal;
|
|
33356
33360
|
var maxType = null;
|
|
@@ -33368,7 +33372,7 @@ var modules = {
|
|
|
33368
33372
|
var findFn = useApproximate ? series.findApproximateData : series.findGraphData;
|
|
33369
33373
|
|
|
33370
33374
|
if (findFn) {
|
|
33371
|
-
var item = findFn.call(series, offset, isHorizontal, dataIndex);
|
|
33375
|
+
var item = findFn.call(series, offset, isHorizontal, dataIndex, useSelectLabelOrItem);
|
|
33372
33376
|
var data = item.data;
|
|
33373
33377
|
var index = item.index;
|
|
33374
33378
|
|
|
@@ -33659,7 +33663,7 @@ var modules = {
|
|
|
33659
33663
|
offsetX = x;
|
|
33660
33664
|
}
|
|
33661
33665
|
|
|
33662
|
-
hitInfo = this.getItemByPosition([offsetX, y], selectLabel === null || selectLabel === void 0 ? void 0 : selectLabel.useApproximateValue, dataIndex);
|
|
33666
|
+
hitInfo = this.getItemByPosition([offsetX, y], selectLabel === null || selectLabel === void 0 ? void 0 : selectLabel.useApproximateValue, dataIndex, true);
|
|
33663
33667
|
labelIndex = (_hitInfo$maxIndex = hitInfo.maxIndex) !== null && _hitInfo$maxIndex !== void 0 ? _hitInfo$maxIndex : -1;
|
|
33664
33668
|
}
|
|
33665
33669
|
|
|
@@ -35153,6 +35157,9 @@ var element_line_Line = /*#__PURE__*/function () {
|
|
|
35153
35157
|
}
|
|
35154
35158
|
};
|
|
35155
35159
|
this.data = [];
|
|
35160
|
+
this.beforeMouseXp = 0;
|
|
35161
|
+
this.beforeMouseYp = 0;
|
|
35162
|
+
this.beforeFindItemIndex = -1;
|
|
35156
35163
|
this.size = {
|
|
35157
35164
|
comboOffset: 0
|
|
35158
35165
|
};
|
|
@@ -35374,14 +35381,17 @@ var element_line_Line = /*#__PURE__*/function () {
|
|
|
35374
35381
|
}
|
|
35375
35382
|
/**
|
|
35376
35383
|
* Find graph item
|
|
35377
|
-
* @param {array}
|
|
35384
|
+
* @param {array} offset mouse position
|
|
35385
|
+
* @param {boolean} isHorizontal
|
|
35386
|
+
* @param {number} dataIndex selected label data index
|
|
35387
|
+
* @param {boolean} useSelectLabelOrItem used to display select label/item at tooltip location
|
|
35378
35388
|
*
|
|
35379
35389
|
* @returns {object} graph item
|
|
35380
35390
|
*/
|
|
35381
35391
|
|
|
35382
35392
|
}, {
|
|
35383
35393
|
key: "findGraphData",
|
|
35384
|
-
value: function findGraphData(offset, isHorizontal, dataIndex) {
|
|
35394
|
+
value: function findGraphData(offset, isHorizontal, dataIndex, useSelectLabelOrItem) {
|
|
35385
35395
|
var xp = offset[0];
|
|
35386
35396
|
var yp = offset[1];
|
|
35387
35397
|
var item = {
|
|
@@ -35390,11 +35400,15 @@ var element_line_Line = /*#__PURE__*/function () {
|
|
|
35390
35400
|
color: this.color
|
|
35391
35401
|
};
|
|
35392
35402
|
var gdata = this.data;
|
|
35403
|
+
var SPARE_XP = 0.5;
|
|
35393
35404
|
|
|
35394
35405
|
if (gdata !== null && gdata !== void 0 && gdata.length) {
|
|
35395
35406
|
if (typeof dataIndex === 'number' && this.show) {
|
|
35396
35407
|
item.data = gdata[dataIndex];
|
|
35397
35408
|
item.index = dataIndex;
|
|
35409
|
+
} else if (typeof this.beforeFindItemIndex === 'number' && this.show && useSelectLabelOrItem) {
|
|
35410
|
+
item.data = gdata[this.beforeFindItemIndex];
|
|
35411
|
+
item.index = this.beforeFindItemIndex;
|
|
35398
35412
|
} else {
|
|
35399
35413
|
var _gdata$;
|
|
35400
35414
|
|
|
@@ -35408,14 +35422,50 @@ var element_line_Line = /*#__PURE__*/function () {
|
|
|
35408
35422
|
var y = gdata[m].yp;
|
|
35409
35423
|
|
|
35410
35424
|
if (x - xpInterval < xp && xp < x + xpInterval) {
|
|
35411
|
-
|
|
35412
|
-
|
|
35425
|
+
var _gdata$m, _gdata$xp, _gdata, _gdata2, _gdata3;
|
|
35426
|
+
|
|
35427
|
+
var curXpInterval = ((_gdata$m = gdata[m]) === null || _gdata$m === void 0 ? void 0 : _gdata$m.xp) - ((_gdata$xp = (_gdata = gdata[m - 1]) === null || _gdata === void 0 ? void 0 : _gdata.xp) !== null && _gdata$xp !== void 0 ? _gdata$xp : 0);
|
|
35428
|
+
|
|
35429
|
+
if ((_gdata2 = gdata[m - 1]) !== null && _gdata2 !== void 0 && _gdata2.xp && (_gdata3 = gdata[m + 1]) !== null && _gdata3 !== void 0 && _gdata3.xp && curXpInterval > 0) {
|
|
35430
|
+
var leftXp = xp - gdata[m - 1].xp;
|
|
35431
|
+
var midXp = Math.abs(xp - gdata[m].xp);
|
|
35432
|
+
var rightXp = gdata[m + 1].xp - xp;
|
|
35433
|
+
|
|
35434
|
+
if (Math.abs(this.beforeMouseXp - xp) >= curXpInterval - SPARE_XP && (this.beforeFindItemIndex === m || midXp === rightXp || midXp === leftXp)) {
|
|
35435
|
+
if (this.beforeMouseXp - xp > 0) {
|
|
35436
|
+
item.data = gdata[this.beforeFindItemIndex - 1];
|
|
35437
|
+
item.index = this.beforeFindItemIndex - 1;
|
|
35438
|
+
} else if (this.beforeMouseXp - xp < 0) {
|
|
35439
|
+
item.data = gdata[this.beforeFindItemIndex + 1];
|
|
35440
|
+
item.index = this.beforeFindItemIndex + 1;
|
|
35441
|
+
} else if (this.beforeMouseYp !== yp) {
|
|
35442
|
+
item.data = gdata[this.beforeFindItemIndex];
|
|
35443
|
+
item.index = this.beforeFindItemIndex;
|
|
35444
|
+
}
|
|
35445
|
+
} else {
|
|
35446
|
+
var closeXp = Math.min(leftXp, midXp, rightXp);
|
|
35447
|
+
|
|
35448
|
+
if (closeXp === leftXp) {
|
|
35449
|
+
item.data = gdata[m - 1];
|
|
35450
|
+
item.index = m - 1;
|
|
35451
|
+
} else if (closeXp === rightXp) {
|
|
35452
|
+
item.data = gdata[m + 1];
|
|
35453
|
+
item.index = m + 1;
|
|
35454
|
+
} else {
|
|
35455
|
+
item.data = gdata[m];
|
|
35456
|
+
item.index = m;
|
|
35457
|
+
}
|
|
35458
|
+
}
|
|
35459
|
+
} else {
|
|
35460
|
+
item.data = gdata[m];
|
|
35461
|
+
item.index = m;
|
|
35462
|
+
}
|
|
35413
35463
|
|
|
35414
35464
|
if (y - 6 <= yp && yp <= y + 6) {
|
|
35415
35465
|
item.hit = true;
|
|
35416
35466
|
}
|
|
35417
35467
|
|
|
35418
|
-
|
|
35468
|
+
break;
|
|
35419
35469
|
} else if (x + xpInterval > xp) {
|
|
35420
35470
|
e = m - 1;
|
|
35421
35471
|
} else {
|
|
@@ -35425,6 +35475,15 @@ var element_line_Line = /*#__PURE__*/function () {
|
|
|
35425
35475
|
}
|
|
35426
35476
|
}
|
|
35427
35477
|
|
|
35478
|
+
if (!useSelectLabelOrItem) {
|
|
35479
|
+
this.beforeMouseXp = xp;
|
|
35480
|
+
this.beforeMouseYp = yp;
|
|
35481
|
+
|
|
35482
|
+
if (typeof item.index === 'number') {
|
|
35483
|
+
this.beforeFindItemIndex = item.index;
|
|
35484
|
+
}
|
|
35485
|
+
}
|
|
35486
|
+
|
|
35428
35487
|
return item;
|
|
35429
35488
|
}
|
|
35430
35489
|
/**
|
|
@@ -49394,6 +49453,7 @@ var treeGrid_uses_contextMenuEvent = function contextMenuEvent(params) {
|
|
|
49394
49453
|
menuItem.disabled = !menuItem.validate(menuItem.itemId, row);
|
|
49395
49454
|
}
|
|
49396
49455
|
|
|
49456
|
+
menuItem.selectedRow = row !== null && row !== void 0 ? row : [];
|
|
49397
49457
|
return menuItem;
|
|
49398
49458
|
});
|
|
49399
49459
|
menuItems.push.apply(menuItems, _toConsumableArray(customItems));
|