e-virt-table 1.2.14 → 1.2.16
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/README.md +5 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +80 -67
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/CellHeader.d.ts +4 -0
- package/dist/lib/CellHeader.js +28 -1
- package/dist/lib/CellHeader.js.map +1 -1
- package/dist/lib/Database.d.ts +1 -1
- package/dist/lib/Database.js +15 -14
- package/dist/lib/Database.js.map +1 -1
- package/dist/lib/EVirtTable.js +11 -3
- package/dist/lib/EVirtTable.js.map +1 -1
- package/dist/lib/EventTable.js +3 -1
- package/dist/lib/EventTable.js.map +1 -1
- package/dist/lib/Header.js +2 -1
- package/dist/lib/Header.js.map +1 -1
- package/dist/lib/Tooltip.js +25 -14
- package/dist/lib/Tooltip.js.map +1 -1
- package/dist/lib/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -131,7 +131,7 @@ function Le(l, t, e) {
|
|
|
131
131
|
t(n, o);
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function Ft(l, t, e) {
|
|
135
135
|
var i = 0, s = l.length;
|
|
136
136
|
function r(o) {
|
|
137
137
|
if (o && o.length) {
|
|
@@ -149,7 +149,7 @@ function Te(l) {
|
|
|
149
149
|
t.push.apply(t, l[e] || []);
|
|
150
150
|
}), t;
|
|
151
151
|
}
|
|
152
|
-
var
|
|
152
|
+
var Bt = /* @__PURE__ */ function(l) {
|
|
153
153
|
Re(t, l);
|
|
154
154
|
function t(e, i) {
|
|
155
155
|
var s;
|
|
@@ -161,9 +161,9 @@ function Ae(l, t, e, i, s) {
|
|
|
161
161
|
if (t.first) {
|
|
162
162
|
var r = new Promise(function(x, g) {
|
|
163
163
|
var p = function(m) {
|
|
164
|
-
return i(m), m.length ? g(new
|
|
164
|
+
return i(m), m.length ? g(new Bt(m, bt(m))) : x(s);
|
|
165
165
|
}, u = Te(l);
|
|
166
|
-
|
|
166
|
+
Ft(u, e, p);
|
|
167
167
|
});
|
|
168
168
|
return r.catch(function(x) {
|
|
169
169
|
return x;
|
|
@@ -172,11 +172,11 @@ function Ae(l, t, e, i, s) {
|
|
|
172
172
|
var o = t.firstFields === !0 ? Object.keys(l) : t.firstFields || [], n = Object.keys(l), h = n.length, c = 0, d = [], f = new Promise(function(x, g) {
|
|
173
173
|
var p = function(w) {
|
|
174
174
|
if (d.push.apply(d, w), c++, c === h)
|
|
175
|
-
return i(d), d.length ? g(new
|
|
175
|
+
return i(d), d.length ? g(new Bt(d, bt(d))) : x(s);
|
|
176
176
|
};
|
|
177
177
|
n.length || (i(d), x(s)), n.forEach(function(u) {
|
|
178
178
|
var w = l[u];
|
|
179
|
-
o.indexOf(u) !== -1 ?
|
|
179
|
+
o.indexOf(u) !== -1 ? Ft(w, e, p) : Le(w, e, p);
|
|
180
180
|
});
|
|
181
181
|
});
|
|
182
182
|
return f.catch(function(x) {
|
|
@@ -292,14 +292,14 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
292
292
|
hex: function(t) {
|
|
293
293
|
return typeof t == "string" && !!t.match(Kt.hex);
|
|
294
294
|
}
|
|
295
|
-
},
|
|
295
|
+
}, Fe = function(t, e, i, s, r) {
|
|
296
296
|
if (t.required && e === void 0) {
|
|
297
297
|
Zt(t, e, i, s, r);
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
300
|
var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], n = t.type;
|
|
301
301
|
o.indexOf(n) > -1 ? et[n](e) || s.push(D(r.messages.types[n], t.fullField, t.type)) : n && typeof e !== t.type && s.push(D(r.messages.types[n], t.fullField, t.type));
|
|
302
|
-
},
|
|
302
|
+
}, Be = function(t, e, i, s, r) {
|
|
303
303
|
var o = typeof t.len == "number", n = typeof t.min == "number", h = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = e, f = null, x = typeof e == "number", g = typeof e == "string", p = Array.isArray(e);
|
|
304
304
|
if (x ? f = "number" : g ? f = "string" : p && (f = "array"), !f)
|
|
305
305
|
return !1;
|
|
@@ -318,8 +318,8 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
318
318
|
}, S = {
|
|
319
319
|
required: Zt,
|
|
320
320
|
whitespace: De,
|
|
321
|
-
type:
|
|
322
|
-
range:
|
|
321
|
+
type: Fe,
|
|
322
|
+
range: Be,
|
|
323
323
|
enum: Ne,
|
|
324
324
|
pattern: ke
|
|
325
325
|
}, Ke = function(t, e, i, s, r) {
|
|
@@ -1429,8 +1429,9 @@ class li {
|
|
|
1429
1429
|
const { data: i = [], columns: s = [], footerData: r = [] } = e;
|
|
1430
1430
|
this.data = i, this.footerData = r, this.columns = s, this.setLoading(!0), this.init();
|
|
1431
1431
|
}
|
|
1432
|
-
|
|
1433
|
-
|
|
1432
|
+
// 初始化默认不忽略清空改变值和校验map
|
|
1433
|
+
init(t = !0) {
|
|
1434
|
+
this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear(), t && (this.originalDataMap.clear(), this.changedDataMap.clear(), this.validationErrorMap.clear()), this.itemRowKeyMap = /* @__PURE__ */ new WeakMap(), this.initData(this.data), this.getData(), this.bufferCheckState.buffer = !1;
|
|
1434
1435
|
}
|
|
1435
1436
|
/**
|
|
1436
1437
|
* 清除缓存数据
|
|
@@ -1443,17 +1444,15 @@ class li {
|
|
|
1443
1444
|
* @param dataList
|
|
1444
1445
|
* @param level
|
|
1445
1446
|
*/
|
|
1446
|
-
initData(t, e = 0) {
|
|
1447
|
-
t.forEach((
|
|
1447
|
+
initData(t, e = 0, i = []) {
|
|
1448
|
+
t.forEach((s, r) => {
|
|
1448
1449
|
var m;
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
const
|
|
1452
|
-
this.itemRowKeyMap.set(i, x);
|
|
1453
|
-
const g = i._height || h, p = i._readonly;
|
|
1450
|
+
const { ROW_KEY: o = "", DEFAULT_EXPAND_ALL: n, CELL_HEIGHT: h, SELECTABLE_METHOD: c, CHECKBOX_KEY: d } = this.ctx.config, f = s[o], x = f != null ? `${f}` : Jt();
|
|
1451
|
+
this.itemRowKeyMap.set(s, x);
|
|
1452
|
+
const g = s._height || h, p = s._readonly;
|
|
1454
1453
|
let u = !0;
|
|
1455
1454
|
if (typeof c == "function" && (u = c), d) {
|
|
1456
|
-
const C =
|
|
1455
|
+
const C = s[d];
|
|
1457
1456
|
if (this.checkboxKeyMap.has(C)) {
|
|
1458
1457
|
const y = this.checkboxKeyMap.get(C) || [];
|
|
1459
1458
|
y.push(x), this.checkboxKeyMap.set(C, y);
|
|
@@ -1461,25 +1460,26 @@ class li {
|
|
|
1461
1460
|
this.checkboxKeyMap.set(C, [x]);
|
|
1462
1461
|
}
|
|
1463
1462
|
this.selectionMap.set(x, {
|
|
1464
|
-
key: d ?
|
|
1465
|
-
row:
|
|
1463
|
+
key: d ? s[d] : x,
|
|
1464
|
+
row: s,
|
|
1466
1465
|
check: ((m = this.selectionMap.get(x)) == null ? void 0 : m.check) || !1
|
|
1467
1466
|
});
|
|
1468
|
-
const w = n || this.expandMap.get(x) ||
|
|
1467
|
+
const w = n || this.expandMap.get(x) || s._expand || !1;
|
|
1469
1468
|
this.expandMap.set(x, w), this.rowKeyMap.set(x, {
|
|
1470
1469
|
readonly: p,
|
|
1471
|
-
index:
|
|
1472
|
-
rowIndex:
|
|
1470
|
+
index: r,
|
|
1471
|
+
rowIndex: r,
|
|
1473
1472
|
level: e,
|
|
1474
1473
|
height: g,
|
|
1475
1474
|
check: !1,
|
|
1476
1475
|
selectable: u,
|
|
1477
1476
|
expand: w,
|
|
1478
1477
|
expandLazy: !1,
|
|
1479
|
-
hasChildren:
|
|
1478
|
+
hasChildren: s._hasChildren || (Array.isArray(s.children) ? s.children.length > 0 : !1),
|
|
1480
1479
|
expandLoading: !1,
|
|
1481
|
-
item:
|
|
1482
|
-
|
|
1480
|
+
item: s,
|
|
1481
|
+
parentRowKeys: i
|
|
1482
|
+
}), Array.isArray(s.children) && s.children.length && this.initData(s.children, e + 1, [...i, x]);
|
|
1483
1483
|
});
|
|
1484
1484
|
}
|
|
1485
1485
|
/**
|
|
@@ -2945,6 +2945,8 @@ class oe extends re {
|
|
|
2945
2945
|
a(this, "key");
|
|
2946
2946
|
a(this, "required", !1);
|
|
2947
2947
|
a(this, "readonly", !1);
|
|
2948
|
+
a(this, "ellipsis", !1);
|
|
2949
|
+
a(this, "overflowTooltipShow", !0);
|
|
2948
2950
|
a(this, "children", []);
|
|
2949
2951
|
a(this, "column");
|
|
2950
2952
|
a(this, "colIndex");
|
|
@@ -2955,6 +2957,8 @@ class oe extends re {
|
|
|
2955
2957
|
a(this, "style", {});
|
|
2956
2958
|
a(this, "drawX", 0);
|
|
2957
2959
|
a(this, "drawY", 0);
|
|
2960
|
+
a(this, "visibleWidth", 0);
|
|
2961
|
+
a(this, "visibleHeight", 0);
|
|
2958
2962
|
a(this, "drawCellBgColor", "");
|
|
2959
2963
|
a(this, "drawTextColor", "");
|
|
2960
2964
|
a(this, "drawImageX", 0);
|
|
@@ -2963,7 +2967,7 @@ class oe extends re {
|
|
|
2963
2967
|
a(this, "drawImageHeight", 0);
|
|
2964
2968
|
a(this, "drawImageName", "");
|
|
2965
2969
|
a(this, "drawImageSource");
|
|
2966
|
-
this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = n, this.colIndex = i, this.key = h.key, this.minWidth = h.minWidth, this.maxWidth = h.maxWidth, this.type = h.type || "", this.editorType = h.editorType || "text", this.align = h.align || "center", this.verticalAlign = h.verticalAlign || "middle", this.fixed = h.fixed, this.level = h.level || 0, this.operation = h.operation || !1, this.text = h.title, this.column = h, this.colspan = h.colspan || 1, this.widthFillDisable = h.widthFillDisable || !1, this.rowspan = h.rowspan || 1, this.rules = h.rules, this.readonly = h.readonly || !1, this.required = h.required || !1, this.rowKey = Jt(), this.hasChildren = h.children && h.children.length > 0 || !1, this.render = h.renderHeader;
|
|
2970
|
+
this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = n, this.visibleWidth = o, this.visibleHeight = n, this.colIndex = i, this.key = h.key, this.minWidth = h.minWidth, this.maxWidth = h.maxWidth, this.type = h.type || "", this.editorType = h.editorType || "text", this.align = h.align || "center", this.verticalAlign = h.verticalAlign || "middle", this.fixed = h.fixed, this.level = h.level || 0, this.operation = h.operation || !1, this.text = h.title, this.column = h, this.colspan = h.colspan || 1, this.widthFillDisable = h.widthFillDisable || !1, this.rowspan = h.rowspan || 1, this.rules = h.rules, this.readonly = h.readonly || !1, this.required = h.required || !1, this.rowKey = Jt(), this.overflowTooltipShow = h.overflowTooltipHeaderShow !== !1, this.hasChildren = h.children && h.children.length > 0 || !1, this.render = h.renderHeader;
|
|
2967
2971
|
}
|
|
2968
2972
|
/**
|
|
2969
2973
|
* 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数
|
|
@@ -3002,7 +3006,7 @@ class oe extends re {
|
|
|
3002
3006
|
e.drawRect(n, h, this.width, this.height, {
|
|
3003
3007
|
borderColor: o ? i : "transparent",
|
|
3004
3008
|
fillColor: this.drawCellBgColor
|
|
3005
|
-
}), e.drawText(c, n, h, this.width, this.height, {
|
|
3009
|
+
}), this.ellipsis = e.drawText(c, n, h, this.width, this.height, {
|
|
3006
3010
|
font: r,
|
|
3007
3011
|
padding: s,
|
|
3008
3012
|
color: this.drawTextColor,
|
|
@@ -3116,13 +3120,13 @@ class ui {
|
|
|
3116
3120
|
this.ctx.isPointer = !1, this.ctx.stageElement.style.cursor === "pointer" && (this.ctx.stageElement.style.cursor = "default");
|
|
3117
3121
|
const e = this.ctx.getOffset(t).offsetY, i = this.ctx.getOffset(t).offsetX;
|
|
3118
3122
|
this.handleHeaderEvent(i, e, this.ctx.header.renderCellHeaders, (s) => {
|
|
3119
|
-
this.ctx.emit("cellHeaderMouseenter", s, t), this.ctx.hoverCellHeader && this.ctx.hoverCellHeader !== s && this.ctx.emit("cellHeaderMouseleave", this.ctx.hoverCellHeader, t), this.imageEnterAndLeave(s, t), this.ctx.hoverCellHeader !== s && (this.ctx.hoverCellHeader = s, this.ctx.emit("cellHeaderHoverChange", s));
|
|
3123
|
+
this.ctx.emit("cellHeaderMouseenter", s, t), this.ctx.hoverCellHeader && this.ctx.hoverCellHeader !== s && this.ctx.emit("cellHeaderMouseleave", this.ctx.hoverCellHeader, t), this.imageEnterAndLeave(s, t), this.ctx.hoverCellHeader !== s && (this.ctx.hoverCellHeader = s, this.visibleHoverCell = void 0, this.ctx.emit("cellHeaderHoverChange", s, t));
|
|
3120
3124
|
}), this.handleBodyEvent(
|
|
3121
3125
|
i,
|
|
3122
3126
|
e,
|
|
3123
3127
|
this.ctx.body.renderRows,
|
|
3124
3128
|
(s) => {
|
|
3125
|
-
this.selectionEnterAndLeave(s, t), this.visibleHoverCell !== s && (this.ctx.emit("visibleCellMouseleave", s, t), this.visibleHoverCell = s, this.ctx.emit("visibleCellHoverChange", s, t));
|
|
3129
|
+
this.selectionEnterAndLeave(s, t), this.visibleHoverCell !== s && (this.ctx.emit("visibleCellMouseleave", s, t), this.visibleHoverCell = s, this.ctx.hoverCellHeader = void 0, this.ctx.emit("visibleCellHoverChange", s, t));
|
|
3126
3130
|
},
|
|
3127
3131
|
!0
|
|
3128
3132
|
), this.handleBodyEvent(i, e, this.ctx.body.renderRows, (s) => {
|
|
@@ -3716,7 +3720,7 @@ class pi {
|
|
|
3716
3720
|
this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
|
|
3717
3721
|
const s = te(i), r = _t(i);
|
|
3718
3722
|
this.height = t * s, this.width = r.reduce((f, x) => {
|
|
3719
|
-
const
|
|
3723
|
+
const g = x.width || 100, { maxWidth: p, minWidth: u } = x;
|
|
3720
3724
|
return p && g > p ? f + p : u && g < u ? f + u : f + g;
|
|
3721
3725
|
}, 0), this.visibleHeight = this.height;
|
|
3722
3726
|
const o = ei(ee(i, s));
|
|
@@ -5422,7 +5426,7 @@ function V(l) {
|
|
|
5422
5426
|
function ce(l) {
|
|
5423
5427
|
return gt() ? l instanceof Node || l instanceof X(l).Node : !1;
|
|
5424
5428
|
}
|
|
5425
|
-
function
|
|
5429
|
+
function F(l) {
|
|
5426
5430
|
return gt() ? l instanceof Element || l instanceof X(l).Element : !1;
|
|
5427
5431
|
}
|
|
5428
5432
|
function K(l) {
|
|
@@ -5437,7 +5441,7 @@ function ht(l) {
|
|
|
5437
5441
|
overflowX: e,
|
|
5438
5442
|
overflowY: i,
|
|
5439
5443
|
display: s
|
|
5440
|
-
} =
|
|
5444
|
+
} = B(l);
|
|
5441
5445
|
return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
|
|
5442
5446
|
}
|
|
5443
5447
|
function Xi(l) {
|
|
@@ -5453,10 +5457,10 @@ function wt(l) {
|
|
|
5453
5457
|
});
|
|
5454
5458
|
}
|
|
5455
5459
|
function Dt(l) {
|
|
5456
|
-
const t = Xt(), e =
|
|
5460
|
+
const t = Xt(), e = F(l) ? B(l) : l;
|
|
5457
5461
|
return e.transform !== "none" || e.perspective !== "none" || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (e.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (e.contain || "").includes(i));
|
|
5458
5462
|
}
|
|
5459
|
-
function
|
|
5463
|
+
function Fi(l) {
|
|
5460
5464
|
let t = $(l);
|
|
5461
5465
|
for (; K(t) && !Q(t); ) {
|
|
5462
5466
|
if (Dt(t))
|
|
@@ -5473,11 +5477,11 @@ function Xt() {
|
|
|
5473
5477
|
function Q(l) {
|
|
5474
5478
|
return ["html", "body", "#document"].includes(tt(l));
|
|
5475
5479
|
}
|
|
5476
|
-
function
|
|
5480
|
+
function B(l) {
|
|
5477
5481
|
return X(l).getComputedStyle(l);
|
|
5478
5482
|
}
|
|
5479
5483
|
function pt(l) {
|
|
5480
|
-
return
|
|
5484
|
+
return F(l) ? {
|
|
5481
5485
|
scrollLeft: l.scrollLeft,
|
|
5482
5486
|
scrollTop: l.scrollTop
|
|
5483
5487
|
} : {
|
|
@@ -5515,7 +5519,7 @@ function Lt(l) {
|
|
|
5515
5519
|
return l.parent && Object.getPrototypeOf(l.parent) ? l.frameElement : null;
|
|
5516
5520
|
}
|
|
5517
5521
|
function fe(l) {
|
|
5518
|
-
const t =
|
|
5522
|
+
const t = B(l);
|
|
5519
5523
|
let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
|
|
5520
5524
|
const s = K(l), r = s ? l.offsetWidth : e, o = s ? l.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
|
|
5521
5525
|
return n && (e = r, i = o), {
|
|
@@ -5525,7 +5529,7 @@ function fe(l) {
|
|
|
5525
5529
|
};
|
|
5526
5530
|
}
|
|
5527
5531
|
function xe(l) {
|
|
5528
|
-
return
|
|
5532
|
+
return F(l) ? l : l.contextElement;
|
|
5529
5533
|
}
|
|
5530
5534
|
function Z(l) {
|
|
5531
5535
|
const t = xe(l);
|
|
@@ -5542,10 +5546,10 @@ function Z(l) {
|
|
|
5542
5546
|
y: n
|
|
5543
5547
|
};
|
|
5544
5548
|
}
|
|
5545
|
-
const
|
|
5549
|
+
const Bi = /* @__PURE__ */ z(0);
|
|
5546
5550
|
function ue(l) {
|
|
5547
5551
|
const t = X(l);
|
|
5548
|
-
return !Xt() || !t.visualViewport ?
|
|
5552
|
+
return !Xt() || !t.visualViewport ? Bi : {
|
|
5549
5553
|
x: t.visualViewport.offsetLeft,
|
|
5550
5554
|
y: t.visualViewport.offsetTop
|
|
5551
5555
|
};
|
|
@@ -5557,14 +5561,14 @@ function ot(l, t, e, i) {
|
|
|
5557
5561
|
t === void 0 && (t = !1), e === void 0 && (e = !1);
|
|
5558
5562
|
const s = l.getBoundingClientRect(), r = xe(l);
|
|
5559
5563
|
let o = z(1);
|
|
5560
|
-
t && (i ?
|
|
5564
|
+
t && (i ? F(i) && (o = Z(i)) : o = Z(l));
|
|
5561
5565
|
const n = Ni(r, e, i) ? ue(r) : z(0);
|
|
5562
5566
|
let h = (s.left + n.x) / o.x, c = (s.top + n.y) / o.y, d = s.width / o.x, f = s.height / o.y;
|
|
5563
5567
|
if (r) {
|
|
5564
|
-
const x = X(r), g = i &&
|
|
5568
|
+
const x = X(r), g = i && F(i) ? X(i) : i;
|
|
5565
5569
|
let p = x, u = Lt(p);
|
|
5566
5570
|
for (; u && i && g !== p; ) {
|
|
5567
|
-
const w = Z(u), m = u.getBoundingClientRect(), C =
|
|
5571
|
+
const w = Z(u), m = u.getBoundingClientRect(), C = B(u), y = m.left + (u.clientLeft + parseFloat(C.paddingLeft)) * w.x, b = m.top + (u.clientTop + parseFloat(C.paddingTop)) * w.y;
|
|
5568
5572
|
h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += y, c += b, p = X(u), u = Lt(p);
|
|
5569
5573
|
}
|
|
5570
5574
|
}
|
|
@@ -5612,7 +5616,7 @@ function Yi(l) {
|
|
|
5612
5616
|
const t = V(l), e = pt(l), i = l.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
|
|
5613
5617
|
let o = -e.scrollLeft + Tt(l);
|
|
5614
5618
|
const n = -e.scrollTop;
|
|
5615
|
-
return
|
|
5619
|
+
return B(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
|
|
5616
5620
|
width: s,
|
|
5617
5621
|
height: r,
|
|
5618
5622
|
x: o,
|
|
@@ -5649,7 +5653,7 @@ function Gt(l, t, e) {
|
|
|
5649
5653
|
i = Vi(l, e);
|
|
5650
5654
|
else if (t === "document")
|
|
5651
5655
|
i = Yi(V(l));
|
|
5652
|
-
else if (
|
|
5656
|
+
else if (F(t))
|
|
5653
5657
|
i = Wi(t, e);
|
|
5654
5658
|
else {
|
|
5655
5659
|
const s = ue(l);
|
|
@@ -5663,17 +5667,17 @@ function Gt(l, t, e) {
|
|
|
5663
5667
|
}
|
|
5664
5668
|
function ge(l, t) {
|
|
5665
5669
|
const e = $(l);
|
|
5666
|
-
return e === t || !
|
|
5670
|
+
return e === t || !F(e) || Q(e) ? !1 : B(e).position === "fixed" || ge(e, t);
|
|
5667
5671
|
}
|
|
5668
5672
|
function Pi(l, t) {
|
|
5669
5673
|
const e = t.get(l);
|
|
5670
5674
|
if (e)
|
|
5671
5675
|
return e;
|
|
5672
|
-
let i = St(l, [], !1).filter((n) =>
|
|
5673
|
-
const r =
|
|
5676
|
+
let i = St(l, [], !1).filter((n) => F(n) && tt(n) !== "body"), s = null;
|
|
5677
|
+
const r = B(l).position === "fixed";
|
|
5674
5678
|
let o = r ? $(l) : l;
|
|
5675
|
-
for (;
|
|
5676
|
-
const n =
|
|
5679
|
+
for (; F(o) && !Q(o); ) {
|
|
5680
|
+
const n = B(o), h = Dt(o);
|
|
5677
5681
|
!h && n.position === "fixed" && (s = null), (r ? !h && !s : !h && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ht(o) && !h && ge(l, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
|
|
5678
5682
|
}
|
|
5679
5683
|
return t.set(l, i), i;
|
|
@@ -5733,10 +5737,10 @@ function qi(l, t, e) {
|
|
|
5733
5737
|
};
|
|
5734
5738
|
}
|
|
5735
5739
|
function yt(l) {
|
|
5736
|
-
return
|
|
5740
|
+
return B(l).position === "static";
|
|
5737
5741
|
}
|
|
5738
5742
|
function jt(l, t) {
|
|
5739
|
-
if (!K(l) ||
|
|
5743
|
+
if (!K(l) || B(l).position === "fixed")
|
|
5740
5744
|
return null;
|
|
5741
5745
|
if (t)
|
|
5742
5746
|
return t(l);
|
|
@@ -5750,7 +5754,7 @@ function we(l, t) {
|
|
|
5750
5754
|
if (!K(l)) {
|
|
5751
5755
|
let s = $(l);
|
|
5752
5756
|
for (; s && !Q(s); ) {
|
|
5753
|
-
if (
|
|
5757
|
+
if (F(s) && !yt(s))
|
|
5754
5758
|
return s;
|
|
5755
5759
|
s = $(s);
|
|
5756
5760
|
}
|
|
@@ -5759,7 +5763,7 @@ function we(l, t) {
|
|
|
5759
5763
|
let i = jt(l, t);
|
|
5760
5764
|
for (; i && Xi(i) && yt(i); )
|
|
5761
5765
|
i = jt(i, t);
|
|
5762
|
-
return i && Q(i) && yt(i) && !Dt(i) ? e : i ||
|
|
5766
|
+
return i && Q(i) && yt(i) && !Dt(i) ? e : i || Fi(l) || e;
|
|
5763
5767
|
}
|
|
5764
5768
|
const Gi = async function(l) {
|
|
5765
5769
|
const t = this.getOffsetParent || we, e = this.getDimensions, i = await e(l.floating);
|
|
@@ -5774,7 +5778,7 @@ const Gi = async function(l) {
|
|
|
5774
5778
|
};
|
|
5775
5779
|
};
|
|
5776
5780
|
function ji(l) {
|
|
5777
|
-
return
|
|
5781
|
+
return B(l).direction === "rtl";
|
|
5778
5782
|
}
|
|
5779
5783
|
const Ui = {
|
|
5780
5784
|
convertOffsetParentRelativeRectToViewportRelativeRect: ki,
|
|
@@ -5785,7 +5789,7 @@ const Ui = {
|
|
|
5785
5789
|
getClientRects: Ki,
|
|
5786
5790
|
getDimensions: $i,
|
|
5787
5791
|
getScale: Z,
|
|
5788
|
-
isElement:
|
|
5792
|
+
isElement: F,
|
|
5789
5793
|
isRTL: ji
|
|
5790
5794
|
}, pe = Hi, me = Di, ye = Ai, Zi = Ti, Ee = (l, t, e) => {
|
|
5791
5795
|
const i = /* @__PURE__ */ new Map(), s = {
|
|
@@ -5833,17 +5837,22 @@ let Ji = class {
|
|
|
5833
5837
|
Object.assign(this.arrowEl.style, h), Object.assign(this.floatingEl.style, n), this.floatingEl.appendChild(this.contentEl), this.floatingEl.appendChild(this.arrowEl), this.ctx.containerElement.appendChild(this.floatingEl), this.init();
|
|
5834
5838
|
}
|
|
5835
5839
|
init() {
|
|
5836
|
-
this.
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5840
|
+
this.floatingEl.addEventListener("mouseleave", () => {
|
|
5841
|
+
this.hide();
|
|
5842
|
+
}), this.ctx.on("mouseout", (t) => {
|
|
5843
|
+
this.floatingEl.contains(t.relatedTarget) || this.hide();
|
|
5844
|
+
}), this.ctx.on("onScroll", () => {
|
|
5845
|
+
this.hide();
|
|
5841
5846
|
}), this.ctx.on("startEdit", () => {
|
|
5842
5847
|
this.hide();
|
|
5843
5848
|
}), this.ctx.on("visibleCellHoverChange", (t, e) => {
|
|
5844
5849
|
this.floatingEl.contains(e.target) || (t.ellipsis || t.message) && this.show(t);
|
|
5845
5850
|
}), this.ctx.on("visibleCellMouseleave", (t, e) => {
|
|
5846
5851
|
this.floatingEl.contains(e.target) || this.hide();
|
|
5852
|
+
}), this.ctx.on("cellHeaderMouseleave", (t, e) => {
|
|
5853
|
+
this.floatingEl.contains(e.target) || this.hide();
|
|
5854
|
+
}), this.ctx.on("cellHeaderHoverChange", (t, e) => {
|
|
5855
|
+
this.floatingEl.contains(e.target) || t.ellipsis && this.show(t);
|
|
5847
5856
|
});
|
|
5848
5857
|
}
|
|
5849
5858
|
show(t) {
|
|
@@ -6470,7 +6479,7 @@ class os {
|
|
|
6470
6479
|
});
|
|
6471
6480
|
}
|
|
6472
6481
|
loadConfig(t) {
|
|
6473
|
-
this.ctx.config.init(t), this.ctx.database.init(), this.header.init(), this.contextMenu.updated(), this.ctx.emit("draw");
|
|
6482
|
+
this.ctx.config.init(t), this.ctx.database.init(!1), this.header.init(), this.contextMenu.updated(), this.ctx.emit("draw");
|
|
6474
6483
|
}
|
|
6475
6484
|
loadColumns(t) {
|
|
6476
6485
|
this.editor.doneEdit(), this.ctx.database.setColumns(t), this.header.init(), this.ctx.emit("draw");
|
|
@@ -6494,7 +6503,7 @@ class os {
|
|
|
6494
6503
|
this.ctx.off(t, e);
|
|
6495
6504
|
}
|
|
6496
6505
|
filterMethod(t) {
|
|
6497
|
-
this.
|
|
6506
|
+
this.ctx.database.setFilterMethod(t), this.ctx.database.init(!1), this.header.init(), this.ctx.emit("draw");
|
|
6498
6507
|
}
|
|
6499
6508
|
editCell(t, e) {
|
|
6500
6509
|
this.editor.editCell(t, e);
|
|
@@ -6567,7 +6576,11 @@ class os {
|
|
|
6567
6576
|
if (t && Array.isArray(s) && s.length) {
|
|
6568
6577
|
const [r] = s;
|
|
6569
6578
|
if (Array.isArray(r) && r.length) {
|
|
6570
|
-
const [o] = r, { rowKey: n, key: h } = o;
|
|
6579
|
+
const [o] = r, { rowKey: n, key: h } = o, c = this.ctx.database.getRowForRowKey(n);
|
|
6580
|
+
if (c) {
|
|
6581
|
+
const { parentRowKeys: d = [] } = c;
|
|
6582
|
+
d && d.length && this.setExpandRowKeys(d, !0);
|
|
6583
|
+
}
|
|
6571
6584
|
this.scrollToRowkey(n), this.scrollToColkey(h);
|
|
6572
6585
|
}
|
|
6573
6586
|
}
|