e-virt-table 1.2.7 → 1.2.8
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/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +48 -42
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/Cell.js +7 -2
- package/dist/lib/Cell.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -131,7 +131,7 @@ function Se(a, t, e) {
|
|
|
131
131
|
t(n, o);
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function Xt(a, t, e) {
|
|
135
135
|
var i = 0, s = a.length;
|
|
136
136
|
function r(o) {
|
|
137
137
|
if (o && o.length) {
|
|
@@ -149,7 +149,7 @@ function Ae(a) {
|
|
|
149
149
|
t.push.apply(t, a[e] || []);
|
|
150
150
|
}), t;
|
|
151
151
|
}
|
|
152
|
-
var
|
|
152
|
+
var Ft = /* @__PURE__ */ function(a) {
|
|
153
153
|
Re(t, a);
|
|
154
154
|
function t(e, i) {
|
|
155
155
|
var s;
|
|
@@ -161,9 +161,9 @@ function Te(a, 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 Ft(m, bt(m))) : x(s);
|
|
165
165
|
}, u = Ae(a);
|
|
166
|
-
|
|
166
|
+
Xt(u, e, p);
|
|
167
167
|
});
|
|
168
168
|
return r.catch(function(x) {
|
|
169
169
|
return x;
|
|
@@ -172,11 +172,11 @@ function Te(a, t, e, i, s) {
|
|
|
172
172
|
var o = t.firstFields === !0 ? Object.keys(a) : t.firstFields || [], n = Object.keys(a), 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 Ft(d, bt(d))) : x(s);
|
|
176
176
|
};
|
|
177
177
|
n.length || (i(d), x(s)), n.forEach(function(u) {
|
|
178
178
|
var w = a[u];
|
|
179
|
-
o.indexOf(u) !== -1 ?
|
|
179
|
+
o.indexOf(u) !== -1 ? Xt(w, e, p) : Se(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
|
+
}, Xe = 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
|
+
}, Fe = 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
|
}, O = {
|
|
319
319
|
required: Zt,
|
|
320
320
|
whitespace: De,
|
|
321
|
-
type:
|
|
322
|
-
range:
|
|
321
|
+
type: Xe,
|
|
322
|
+
range: Fe,
|
|
323
323
|
enum: Be,
|
|
324
324
|
pattern: ke
|
|
325
325
|
}, Ke = function(t, e, i, s, r) {
|
|
@@ -1243,16 +1243,22 @@ class Tt extends re {
|
|
|
1243
1243
|
return s;
|
|
1244
1244
|
}
|
|
1245
1245
|
drawText() {
|
|
1246
|
-
const { CELL_PADDING: e, BODY_FONT: i, PLACEHOLDER_COLOR: s } = this.ctx.config
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1246
|
+
const { CELL_PADDING: e, BODY_FONT: i, PLACEHOLDER_COLOR: s } = this.ctx.config;
|
|
1247
|
+
let r = this.visibleWidth;
|
|
1248
|
+
if (this.type === "tree") {
|
|
1249
|
+
const f = this.drawTextX - this.drawX;
|
|
1250
|
+
r = this.visibleWidth - f;
|
|
1251
|
+
}
|
|
1252
|
+
const { ellipsis: o } = this.ctx.paint.handleEllipsis(this.displayText, r, e, i);
|
|
1253
|
+
this.ellipsis = o;
|
|
1254
|
+
const { placeholder: n } = this.column;
|
|
1255
|
+
let h = this.displayText, c = this.drawTextColor;
|
|
1256
|
+
return !this.ctx.database.getReadonly(this.rowKey, this.key) && n && ["", null, void 0].includes(this.text) && this.cellType === "body" && !(this.rowspan === 0 || this.colspan === 0) && (h = n, c = s), this.ctx.paint.drawText(h, this.drawTextX, this.drawTextY, r, this.visibleHeight, {
|
|
1251
1257
|
font: i,
|
|
1252
1258
|
padding: e,
|
|
1253
1259
|
align: this.align,
|
|
1254
1260
|
verticalAlign: this.verticalAlign,
|
|
1255
|
-
color:
|
|
1261
|
+
color: c
|
|
1256
1262
|
});
|
|
1257
1263
|
}
|
|
1258
1264
|
drawImage() {
|
|
@@ -5380,7 +5386,7 @@ function V(a) {
|
|
|
5380
5386
|
function ce(a) {
|
|
5381
5387
|
return gt() ? a instanceof Node || a instanceof N(a).Node : !1;
|
|
5382
5388
|
}
|
|
5383
|
-
function
|
|
5389
|
+
function X(a) {
|
|
5384
5390
|
return gt() ? a instanceof Element || a instanceof N(a).Element : !1;
|
|
5385
5391
|
}
|
|
5386
5392
|
function K(a) {
|
|
@@ -5395,7 +5401,7 @@ function ht(a) {
|
|
|
5395
5401
|
overflowX: e,
|
|
5396
5402
|
overflowY: i,
|
|
5397
5403
|
display: s
|
|
5398
|
-
} =
|
|
5404
|
+
} = F(a);
|
|
5399
5405
|
return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
|
|
5400
5406
|
}
|
|
5401
5407
|
function Ni(a) {
|
|
@@ -5411,10 +5417,10 @@ function wt(a) {
|
|
|
5411
5417
|
});
|
|
5412
5418
|
}
|
|
5413
5419
|
function Dt(a) {
|
|
5414
|
-
const t = Nt(), e =
|
|
5420
|
+
const t = Nt(), e = X(a) ? F(a) : a;
|
|
5415
5421
|
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));
|
|
5416
5422
|
}
|
|
5417
|
-
function
|
|
5423
|
+
function Xi(a) {
|
|
5418
5424
|
let t = $(a);
|
|
5419
5425
|
for (; K(t) && !Q(t); ) {
|
|
5420
5426
|
if (Dt(t))
|
|
@@ -5431,11 +5437,11 @@ function Nt() {
|
|
|
5431
5437
|
function Q(a) {
|
|
5432
5438
|
return ["html", "body", "#document"].includes(tt(a));
|
|
5433
5439
|
}
|
|
5434
|
-
function
|
|
5440
|
+
function F(a) {
|
|
5435
5441
|
return N(a).getComputedStyle(a);
|
|
5436
5442
|
}
|
|
5437
5443
|
function pt(a) {
|
|
5438
|
-
return
|
|
5444
|
+
return X(a) ? {
|
|
5439
5445
|
scrollLeft: a.scrollLeft,
|
|
5440
5446
|
scrollTop: a.scrollTop
|
|
5441
5447
|
} : {
|
|
@@ -5473,7 +5479,7 @@ function St(a) {
|
|
|
5473
5479
|
return a.parent && Object.getPrototypeOf(a.parent) ? a.frameElement : null;
|
|
5474
5480
|
}
|
|
5475
5481
|
function fe(a) {
|
|
5476
|
-
const t =
|
|
5482
|
+
const t = F(a);
|
|
5477
5483
|
let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
|
|
5478
5484
|
const s = K(a), r = s ? a.offsetWidth : e, o = s ? a.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
|
|
5479
5485
|
return n && (e = r, i = o), {
|
|
@@ -5483,7 +5489,7 @@ function fe(a) {
|
|
|
5483
5489
|
};
|
|
5484
5490
|
}
|
|
5485
5491
|
function xe(a) {
|
|
5486
|
-
return
|
|
5492
|
+
return X(a) ? a : a.contextElement;
|
|
5487
5493
|
}
|
|
5488
5494
|
function Z(a) {
|
|
5489
5495
|
const t = xe(a);
|
|
@@ -5500,10 +5506,10 @@ function Z(a) {
|
|
|
5500
5506
|
y: n
|
|
5501
5507
|
};
|
|
5502
5508
|
}
|
|
5503
|
-
const
|
|
5509
|
+
const Fi = /* @__PURE__ */ z(0);
|
|
5504
5510
|
function ue(a) {
|
|
5505
5511
|
const t = N(a);
|
|
5506
|
-
return !Nt() || !t.visualViewport ?
|
|
5512
|
+
return !Nt() || !t.visualViewport ? Fi : {
|
|
5507
5513
|
x: t.visualViewport.offsetLeft,
|
|
5508
5514
|
y: t.visualViewport.offsetTop
|
|
5509
5515
|
};
|
|
@@ -5515,14 +5521,14 @@ function ot(a, t, e, i) {
|
|
|
5515
5521
|
t === void 0 && (t = !1), e === void 0 && (e = !1);
|
|
5516
5522
|
const s = a.getBoundingClientRect(), r = xe(a);
|
|
5517
5523
|
let o = z(1);
|
|
5518
|
-
t && (i ?
|
|
5524
|
+
t && (i ? X(i) && (o = Z(i)) : o = Z(a));
|
|
5519
5525
|
const n = Bi(r, e, i) ? ue(r) : z(0);
|
|
5520
5526
|
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;
|
|
5521
5527
|
if (r) {
|
|
5522
|
-
const x = N(r), g = i &&
|
|
5528
|
+
const x = N(r), g = i && X(i) ? N(i) : i;
|
|
5523
5529
|
let p = x, u = St(p);
|
|
5524
5530
|
for (; u && i && g !== p; ) {
|
|
5525
|
-
const w = Z(u), m = u.getBoundingClientRect(), C =
|
|
5531
|
+
const w = Z(u), m = u.getBoundingClientRect(), C = F(u), y = m.left + (u.clientLeft + parseFloat(C.paddingLeft)) * w.x, b = m.top + (u.clientTop + parseFloat(C.paddingTop)) * w.y;
|
|
5526
5532
|
h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += y, c += b, p = N(u), u = St(p);
|
|
5527
5533
|
}
|
|
5528
5534
|
}
|
|
@@ -5570,7 +5576,7 @@ function Yi(a) {
|
|
|
5570
5576
|
const t = V(a), e = pt(a), i = a.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
|
|
5571
5577
|
let o = -e.scrollLeft + At(a);
|
|
5572
5578
|
const n = -e.scrollTop;
|
|
5573
|
-
return
|
|
5579
|
+
return F(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
|
|
5574
5580
|
width: s,
|
|
5575
5581
|
height: r,
|
|
5576
5582
|
x: o,
|
|
@@ -5607,7 +5613,7 @@ function Gt(a, t, e) {
|
|
|
5607
5613
|
i = Vi(a, e);
|
|
5608
5614
|
else if (t === "document")
|
|
5609
5615
|
i = Yi(V(a));
|
|
5610
|
-
else if (
|
|
5616
|
+
else if (X(t))
|
|
5611
5617
|
i = Wi(t, e);
|
|
5612
5618
|
else {
|
|
5613
5619
|
const s = ue(a);
|
|
@@ -5621,17 +5627,17 @@ function Gt(a, t, e) {
|
|
|
5621
5627
|
}
|
|
5622
5628
|
function ge(a, t) {
|
|
5623
5629
|
const e = $(a);
|
|
5624
|
-
return e === t || !
|
|
5630
|
+
return e === t || !X(e) || Q(e) ? !1 : F(e).position === "fixed" || ge(e, t);
|
|
5625
5631
|
}
|
|
5626
5632
|
function Pi(a, t) {
|
|
5627
5633
|
const e = t.get(a);
|
|
5628
5634
|
if (e)
|
|
5629
5635
|
return e;
|
|
5630
|
-
let i = Lt(a, [], !1).filter((n) =>
|
|
5631
|
-
const r =
|
|
5636
|
+
let i = Lt(a, [], !1).filter((n) => X(n) && tt(n) !== "body"), s = null;
|
|
5637
|
+
const r = F(a).position === "fixed";
|
|
5632
5638
|
let o = r ? $(a) : a;
|
|
5633
|
-
for (;
|
|
5634
|
-
const n =
|
|
5639
|
+
for (; X(o) && !Q(o); ) {
|
|
5640
|
+
const n = F(o), h = Dt(o);
|
|
5635
5641
|
!h && n.position === "fixed" && (s = null), (r ? !h && !s : !h && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ht(o) && !h && ge(a, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
|
|
5636
5642
|
}
|
|
5637
5643
|
return t.set(a, i), i;
|
|
@@ -5691,10 +5697,10 @@ function qi(a, t, e) {
|
|
|
5691
5697
|
};
|
|
5692
5698
|
}
|
|
5693
5699
|
function yt(a) {
|
|
5694
|
-
return
|
|
5700
|
+
return F(a).position === "static";
|
|
5695
5701
|
}
|
|
5696
5702
|
function jt(a, t) {
|
|
5697
|
-
if (!K(a) ||
|
|
5703
|
+
if (!K(a) || F(a).position === "fixed")
|
|
5698
5704
|
return null;
|
|
5699
5705
|
if (t)
|
|
5700
5706
|
return t(a);
|
|
@@ -5708,7 +5714,7 @@ function we(a, t) {
|
|
|
5708
5714
|
if (!K(a)) {
|
|
5709
5715
|
let s = $(a);
|
|
5710
5716
|
for (; s && !Q(s); ) {
|
|
5711
|
-
if (
|
|
5717
|
+
if (X(s) && !yt(s))
|
|
5712
5718
|
return s;
|
|
5713
5719
|
s = $(s);
|
|
5714
5720
|
}
|
|
@@ -5717,7 +5723,7 @@ function we(a, t) {
|
|
|
5717
5723
|
let i = jt(a, t);
|
|
5718
5724
|
for (; i && Ni(i) && yt(i); )
|
|
5719
5725
|
i = jt(i, t);
|
|
5720
|
-
return i && Q(i) && yt(i) && !Dt(i) ? e : i ||
|
|
5726
|
+
return i && Q(i) && yt(i) && !Dt(i) ? e : i || Xi(a) || e;
|
|
5721
5727
|
}
|
|
5722
5728
|
const Gi = async function(a) {
|
|
5723
5729
|
const t = this.getOffsetParent || we, e = this.getDimensions, i = await e(a.floating);
|
|
@@ -5732,7 +5738,7 @@ const Gi = async function(a) {
|
|
|
5732
5738
|
};
|
|
5733
5739
|
};
|
|
5734
5740
|
function ji(a) {
|
|
5735
|
-
return
|
|
5741
|
+
return F(a).direction === "rtl";
|
|
5736
5742
|
}
|
|
5737
5743
|
const Ui = {
|
|
5738
5744
|
convertOffsetParentRelativeRectToViewportRelativeRect: ki,
|
|
@@ -5743,7 +5749,7 @@ const Ui = {
|
|
|
5743
5749
|
getClientRects: Ki,
|
|
5744
5750
|
getDimensions: $i,
|
|
5745
5751
|
getScale: Z,
|
|
5746
|
-
isElement:
|
|
5752
|
+
isElement: X,
|
|
5747
5753
|
isRTL: ji
|
|
5748
5754
|
}, pe = Hi, me = Di, ye = Ti, Zi = Ai, Ee = (a, t, e) => {
|
|
5749
5755
|
const i = /* @__PURE__ */ new Map(), s = {
|