@easyquery/ui 7.3.5-rc03 → 7.3.5
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/easyquery.ui.cjs.js
CHANGED
|
@@ -1378,13 +1378,14 @@ class MenuLevel {
|
|
|
1378
1378
|
});
|
|
1379
1379
|
}
|
|
1380
1380
|
const pos = ui.getElementAbsolutePos(menuItem.itemDiv);
|
|
1381
|
+
menuItem.itemDiv.getBoundingClientRect();
|
|
1381
1382
|
const scroll = ui.getScrollPos();
|
|
1382
1383
|
const winSize = ui.getWinSize();
|
|
1383
1384
|
//show menu to the side that have more space available
|
|
1384
1385
|
const leftSpace = pos.x - scroll.left;
|
|
1385
1386
|
const rightSpace = winSize.width - leftSpace - menuItem.itemDiv.offsetWidth;
|
|
1386
1387
|
pos.x += menuItem.itemDiv.offsetParent.offsetWidth;
|
|
1387
|
-
pos.y
|
|
1388
|
+
pos.y -= 5;
|
|
1388
1389
|
menuItem.subLevel.showAt(pos.x, pos.y, true, true);
|
|
1389
1390
|
menuItem.subLevel.levelDiv.style.width = '';
|
|
1390
1391
|
menuItem.subLevel.levelDiv.style.right = '';
|
|
@@ -1442,7 +1443,20 @@ class MenuLevel {
|
|
|
1442
1443
|
const anchorRect = anchor ? anchor.getBoundingClientRect() : null;
|
|
1443
1444
|
const anchorHeight = anchorRect ? anchorRect.height : 0;
|
|
1444
1445
|
const magic = 24;
|
|
1445
|
-
if (this.levelIndex > 0
|
|
1446
|
+
if (this.levelIndex > 0) {
|
|
1447
|
+
let maxHeight = viewportHeight - 30;
|
|
1448
|
+
if (this.searchDiv) {
|
|
1449
|
+
maxHeight -= this.searchDiv.scrollHeight;
|
|
1450
|
+
y -= this.searchDiv.scrollHeight;
|
|
1451
|
+
}
|
|
1452
|
+
if (this.closeDiv) {
|
|
1453
|
+
maxHeight -= this.closeDiv.offsetHeight;
|
|
1454
|
+
y -= this.closeDiv.offsetHeight;
|
|
1455
|
+
}
|
|
1456
|
+
this.scrollDiv.style.maxHeight = maxHeight + 'px';
|
|
1457
|
+
levelStyle.top = this.adjustTopPos(y) + 'px';
|
|
1458
|
+
}
|
|
1459
|
+
else if (useMaxSpace) {
|
|
1446
1460
|
let maxHeight = viewportHeight - 30;
|
|
1447
1461
|
if (this.searchDiv) {
|
|
1448
1462
|
maxHeight -= this.searchDiv.scrollHeight;
|
|
@@ -1486,11 +1500,11 @@ class MenuLevel {
|
|
|
1486
1500
|
// Падаємо вверх
|
|
1487
1501
|
this.scrollDiv.style.maxHeight = maxHeight + 'px';
|
|
1488
1502
|
levelDivRect = this.levelDiv.getBoundingClientRect();
|
|
1489
|
-
levelStyle.top = y - levelDivRect.height + 'px';
|
|
1503
|
+
levelStyle.top = y - levelDivRect.height + 'px'; // - anchorHeight
|
|
1490
1504
|
}
|
|
1491
1505
|
else {
|
|
1492
1506
|
// Падаємо вниз
|
|
1493
|
-
this.scrollDiv.style.maxHeight = maxHeight - magic + 'px';
|
|
1507
|
+
this.scrollDiv.style.maxHeight = maxHeight - magic - anchorHeight + 'px';
|
|
1494
1508
|
levelStyle.top = y + anchorHeight + 'px';
|
|
1495
1509
|
}
|
|
1496
1510
|
}
|
|
@@ -2481,7 +2495,7 @@ class ColumnRendererCP {
|
|
|
2481
2495
|
items.push(item);
|
|
2482
2496
|
}
|
|
2483
2497
|
}
|
|
2484
|
-
if (!funcAllowed) {
|
|
2498
|
+
if (!funcAllowed && items.length > 0) {
|
|
2485
2499
|
this.column.expr.func = items[0].id;
|
|
2486
2500
|
}
|
|
2487
2501
|
//Add "Custom Expression" menu
|
|
@@ -2885,7 +2899,7 @@ class AttrColumnRendererCP extends ColumnRendererCP {
|
|
|
2885
2899
|
if (!funcs[idx])
|
|
2886
2900
|
continue;
|
|
2887
2901
|
}
|
|
2888
|
-
if (!funcAllowed) {
|
|
2902
|
+
if (!funcAllowed && items.length > 0) {
|
|
2889
2903
|
this.column.expr.func = items[0].id;
|
|
2890
2904
|
}
|
|
2891
2905
|
//Add "Custom Expression" menu
|
|
@@ -4434,7 +4448,7 @@ class ColumnRendererCB {
|
|
|
4434
4448
|
items.push(item);
|
|
4435
4449
|
}
|
|
4436
4450
|
}
|
|
4437
|
-
if (!funcAllowed) {
|
|
4451
|
+
if (!funcAllowed && items.length > 0) {
|
|
4438
4452
|
this.column.expr.func = items[0].id;
|
|
4439
4453
|
}
|
|
4440
4454
|
//Add "Custom Expression" menu
|
package/dist/easyquery.ui.esm.js
CHANGED
|
@@ -1376,13 +1376,14 @@ class MenuLevel {
|
|
|
1376
1376
|
});
|
|
1377
1377
|
}
|
|
1378
1378
|
const pos = getElementAbsolutePos(menuItem.itemDiv);
|
|
1379
|
+
menuItem.itemDiv.getBoundingClientRect();
|
|
1379
1380
|
const scroll = getScrollPos();
|
|
1380
1381
|
const winSize = getWinSize();
|
|
1381
1382
|
//show menu to the side that have more space available
|
|
1382
1383
|
const leftSpace = pos.x - scroll.left;
|
|
1383
1384
|
const rightSpace = winSize.width - leftSpace - menuItem.itemDiv.offsetWidth;
|
|
1384
1385
|
pos.x += menuItem.itemDiv.offsetParent.offsetWidth;
|
|
1385
|
-
pos.y
|
|
1386
|
+
pos.y -= 5;
|
|
1386
1387
|
menuItem.subLevel.showAt(pos.x, pos.y, true, true);
|
|
1387
1388
|
menuItem.subLevel.levelDiv.style.width = '';
|
|
1388
1389
|
menuItem.subLevel.levelDiv.style.right = '';
|
|
@@ -1440,7 +1441,20 @@ class MenuLevel {
|
|
|
1440
1441
|
const anchorRect = anchor ? anchor.getBoundingClientRect() : null;
|
|
1441
1442
|
const anchorHeight = anchorRect ? anchorRect.height : 0;
|
|
1442
1443
|
const magic = 24;
|
|
1443
|
-
if (this.levelIndex > 0
|
|
1444
|
+
if (this.levelIndex > 0) {
|
|
1445
|
+
let maxHeight = viewportHeight - 30;
|
|
1446
|
+
if (this.searchDiv) {
|
|
1447
|
+
maxHeight -= this.searchDiv.scrollHeight;
|
|
1448
|
+
y -= this.searchDiv.scrollHeight;
|
|
1449
|
+
}
|
|
1450
|
+
if (this.closeDiv) {
|
|
1451
|
+
maxHeight -= this.closeDiv.offsetHeight;
|
|
1452
|
+
y -= this.closeDiv.offsetHeight;
|
|
1453
|
+
}
|
|
1454
|
+
this.scrollDiv.style.maxHeight = maxHeight + 'px';
|
|
1455
|
+
levelStyle.top = this.adjustTopPos(y) + 'px';
|
|
1456
|
+
}
|
|
1457
|
+
else if (useMaxSpace) {
|
|
1444
1458
|
let maxHeight = viewportHeight - 30;
|
|
1445
1459
|
if (this.searchDiv) {
|
|
1446
1460
|
maxHeight -= this.searchDiv.scrollHeight;
|
|
@@ -1484,11 +1498,11 @@ class MenuLevel {
|
|
|
1484
1498
|
// Падаємо вверх
|
|
1485
1499
|
this.scrollDiv.style.maxHeight = maxHeight + 'px';
|
|
1486
1500
|
levelDivRect = this.levelDiv.getBoundingClientRect();
|
|
1487
|
-
levelStyle.top = y - levelDivRect.height + 'px';
|
|
1501
|
+
levelStyle.top = y - levelDivRect.height + 'px'; // - anchorHeight
|
|
1488
1502
|
}
|
|
1489
1503
|
else {
|
|
1490
1504
|
// Падаємо вниз
|
|
1491
|
-
this.scrollDiv.style.maxHeight = maxHeight - magic + 'px';
|
|
1505
|
+
this.scrollDiv.style.maxHeight = maxHeight - magic - anchorHeight + 'px';
|
|
1492
1506
|
levelStyle.top = y + anchorHeight + 'px';
|
|
1493
1507
|
}
|
|
1494
1508
|
}
|
|
@@ -2479,7 +2493,7 @@ class ColumnRendererCP {
|
|
|
2479
2493
|
items.push(item);
|
|
2480
2494
|
}
|
|
2481
2495
|
}
|
|
2482
|
-
if (!funcAllowed) {
|
|
2496
|
+
if (!funcAllowed && items.length > 0) {
|
|
2483
2497
|
this.column.expr.func = items[0].id;
|
|
2484
2498
|
}
|
|
2485
2499
|
//Add "Custom Expression" menu
|
|
@@ -2883,7 +2897,7 @@ class AttrColumnRendererCP extends ColumnRendererCP {
|
|
|
2883
2897
|
if (!funcs[idx])
|
|
2884
2898
|
continue;
|
|
2885
2899
|
}
|
|
2886
|
-
if (!funcAllowed) {
|
|
2900
|
+
if (!funcAllowed && items.length > 0) {
|
|
2887
2901
|
this.column.expr.func = items[0].id;
|
|
2888
2902
|
}
|
|
2889
2903
|
//Add "Custom Expression" menu
|
|
@@ -4432,7 +4446,7 @@ class ColumnRendererCB {
|
|
|
4432
4446
|
items.push(item);
|
|
4433
4447
|
}
|
|
4434
4448
|
}
|
|
4435
|
-
if (!funcAllowed) {
|
|
4449
|
+
if (!funcAllowed && items.length > 0) {
|
|
4436
4450
|
this.column.expr.func = items[0].id;
|
|
4437
4451
|
}
|
|
4438
4452
|
//Add "Custom Expression" menu
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easyquery/ui",
|
|
3
|
-
"version": "7.3.5
|
|
3
|
+
"version": "7.3.5",
|
|
4
4
|
"description": "EasyQuery.JS Community UI widgets",
|
|
5
5
|
"types": "./dist/types/public_api.d.ts",
|
|
6
6
|
"main": "./dist/easyquery.ui.cjs.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"bugs": "https://korzh.com/support",
|
|
31
31
|
"license": "LGPL-3.0",
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@easyquery/core": "^7.3.5
|
|
33
|
+
"@easyquery/core": "^7.3.5"
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"dist",
|