@keenmate/web-grid 1.0.3 → 1.0.4
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 +6 -3
- package/ai/basic-setup.txt +1 -0
- package/ai/editing.txt +21 -0
- package/ai/public-methods.txt +6 -0
- package/ai/styling-theming.txt +3 -0
- package/dist/grid.d.ts +11 -0
- package/dist/types.d.ts +1 -0
- package/dist/web-component.d.ts +4 -0
- package/dist/web-grid.js +411 -375
- package/dist/web-grid.umd.js +35 -35
- package/package.json +1 -1
- package/src/css/_dark-mode.css +5 -0
- package/src/css/_dirty-indicator.css +37 -0
- package/src/css/_variables.css +8 -0
- package/src/css/main.css +9 -8
package/dist/web-grid.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var rr = Object.defineProperty;
|
|
2
2
|
var nr = (e, t, o) => t in e ? rr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
3
|
var b = (e, t, o) => nr(e, typeof t != "symbol" ? t + "" : t, o);
|
|
4
|
-
const
|
|
4
|
+
const ze = Math.min, ie = Math.max, Ct = Math.round, mt = Math.floor, _e = (e) => ({
|
|
5
5
|
x: e,
|
|
6
6
|
y: e
|
|
7
7
|
}), sr = {
|
|
@@ -14,12 +14,12 @@ const Le = Math.min, ie = Math.max, Ct = Math.round, mt = Math.floor, _e = (e) =
|
|
|
14
14
|
end: "start"
|
|
15
15
|
};
|
|
16
16
|
function Jt(e, t, o) {
|
|
17
|
-
return ie(e,
|
|
17
|
+
return ie(e, ze(t, o));
|
|
18
18
|
}
|
|
19
19
|
function Ge(e, t) {
|
|
20
20
|
return typeof e == "function" ? e(t) : e;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Le(e) {
|
|
23
23
|
return e.split("-")[0];
|
|
24
24
|
}
|
|
25
25
|
function Qe(e) {
|
|
@@ -33,7 +33,7 @@ function go(e) {
|
|
|
33
33
|
}
|
|
34
34
|
const ar = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
35
35
|
function Ee(e) {
|
|
36
|
-
return ar.has(
|
|
36
|
+
return ar.has(Le(e)) ? "y" : "x";
|
|
37
37
|
}
|
|
38
38
|
function uo(e) {
|
|
39
39
|
return ri(Ee(e));
|
|
@@ -66,7 +66,7 @@ function hr(e, t, o) {
|
|
|
66
66
|
}
|
|
67
67
|
function fr(e, t, o, i) {
|
|
68
68
|
const r = Qe(e);
|
|
69
|
-
let s = hr(
|
|
69
|
+
let s = hr(Le(e), o === "start", i);
|
|
70
70
|
return r && (s = s.map((n) => n + "-" + r), t && (s = s.concat(s.map(Zt)))), s;
|
|
71
71
|
}
|
|
72
72
|
function St(e) {
|
|
@@ -112,7 +112,7 @@ function To(e, t, o) {
|
|
|
112
112
|
reference: i,
|
|
113
113
|
floating: r
|
|
114
114
|
} = e;
|
|
115
|
-
const s = Ee(t), n = uo(t), l = go(n), a =
|
|
115
|
+
const s = Ee(t), n = uo(t), l = go(n), a = Le(t), d = s === "y", c = i.x + i.width / 2 - r.width / 2, u = i.y + i.height / 2 - r.height / 2, g = i[l] / 2 - r[l] / 2;
|
|
116
116
|
let h;
|
|
117
117
|
switch (a) {
|
|
118
118
|
case "top":
|
|
@@ -285,7 +285,7 @@ const mr = (e) => ({
|
|
|
285
285
|
}, h = uo(r), f = go(h), w = await n.getDimensions(d), p = h === "y", m = p ? "top" : "left", y = p ? "bottom" : "right", v = p ? "clientHeight" : "clientWidth", x = s.reference[f] + s.reference[h] - g[h] - s.floating[f], C = g[h] - s.reference[h], _ = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(d));
|
|
286
286
|
let S = _ ? _[v] : 0;
|
|
287
287
|
(!S || !await (n.isElement == null ? void 0 : n.isElement(_))) && (S = l.floating[v] || s.floating[f]);
|
|
288
|
-
const
|
|
288
|
+
const k = x / 2 - C / 2, I = S / 2 - w[f] / 2 - 1, R = ze(u[m], I), E = ze(u[y], I), M = R, L = S - w[f] - E, D = S / 2 - w[f] / 2 + k, P = Jt(M, D, L), U = !a.arrow && Qe(r) != null && D !== P && s.reference[f] / 2 - (D < M ? R : E) - w[f] / 2 < 0, T = U ? D < M ? D - M : D - L : 0;
|
|
289
289
|
return {
|
|
290
290
|
[h]: g[h] + T,
|
|
291
291
|
data: {
|
|
@@ -322,15 +322,15 @@ const mr = (e) => ({
|
|
|
322
322
|
} = Ge(e, t);
|
|
323
323
|
if ((o = s.arrow) != null && o.alignmentOffset)
|
|
324
324
|
return {};
|
|
325
|
-
const m =
|
|
325
|
+
const m = Le(r), y = Ee(l), v = Le(l) === l, x = await (a.isRTL == null ? void 0 : a.isRTL(d.floating)), C = g || (v || !w ? [St(l)] : cr(l)), _ = f !== "none";
|
|
326
326
|
!g && _ && C.push(...fr(l, w, f, x));
|
|
327
|
-
const S = [l, ...C],
|
|
328
|
-
let
|
|
329
|
-
if (c && I.push(
|
|
327
|
+
const S = [l, ...C], k = await ho(t, p), I = [];
|
|
328
|
+
let R = ((i = s.flip) == null ? void 0 : i.overflows) || [];
|
|
329
|
+
if (c && I.push(k[m]), u) {
|
|
330
330
|
const D = dr(r, n, x);
|
|
331
|
-
I.push(
|
|
331
|
+
I.push(k[D[0]], k[D[1]]);
|
|
332
332
|
}
|
|
333
|
-
if (
|
|
333
|
+
if (R = [...R, {
|
|
334
334
|
placement: r,
|
|
335
335
|
overflows: I
|
|
336
336
|
}], !I.every((D) => D <= 0)) {
|
|
@@ -338,30 +338,30 @@ const mr = (e) => ({
|
|
|
338
338
|
const D = (((E = s.flip) == null ? void 0 : E.index) || 0) + 1, P = S[D];
|
|
339
339
|
if (P && (!(u === "alignment" ? y !== Ee(P) : !1) || // We leave the current main axis only if every placement on that axis
|
|
340
340
|
// overflows the main axis.
|
|
341
|
-
|
|
341
|
+
R.every(($) => Ee($.placement) === y ? $.overflows[0] > 0 : !0)))
|
|
342
342
|
return {
|
|
343
343
|
data: {
|
|
344
344
|
index: D,
|
|
345
|
-
overflows:
|
|
345
|
+
overflows: R
|
|
346
346
|
},
|
|
347
347
|
reset: {
|
|
348
348
|
placement: P
|
|
349
349
|
}
|
|
350
350
|
};
|
|
351
|
-
let U = (M =
|
|
351
|
+
let U = (M = R.filter((T) => T.overflows[0] <= 0).sort((T, $) => T.overflows[1] - $.overflows[1])[0]) == null ? void 0 : M.placement;
|
|
352
352
|
if (!U)
|
|
353
353
|
switch (h) {
|
|
354
354
|
case "bestFit": {
|
|
355
|
-
var
|
|
356
|
-
const T = (
|
|
355
|
+
var L;
|
|
356
|
+
const T = (L = R.filter(($) => {
|
|
357
357
|
if (_) {
|
|
358
|
-
const W = Ee(
|
|
358
|
+
const W = Ee($.placement);
|
|
359
359
|
return W === y || // Create a bias to the `y` side axis due to horizontal
|
|
360
360
|
// reading directions favoring greater width.
|
|
361
361
|
W === "y";
|
|
362
362
|
}
|
|
363
363
|
return !0;
|
|
364
|
-
}).map((
|
|
364
|
+
}).map(($) => [$.placement, $.overflows.filter((W) => W > 0).reduce((W, B) => W + B, 0)]).sort(($, W) => $[1] - W[1])[0]) == null ? void 0 : L[0];
|
|
365
365
|
T && (U = T);
|
|
366
366
|
break;
|
|
367
367
|
}
|
|
@@ -385,7 +385,7 @@ async function vr(e, t) {
|
|
|
385
385
|
placement: o,
|
|
386
386
|
platform: i,
|
|
387
387
|
elements: r
|
|
388
|
-
} = e, s = await (i.isRTL == null ? void 0 : i.isRTL(r.floating)), n =
|
|
388
|
+
} = e, s = await (i.isRTL == null ? void 0 : i.isRTL(r.floating)), n = Le(o), l = Qe(o), a = Ee(o) === "y", d = _r.has(n) ? -1 : 1, c = s && a ? -1 : 1, u = Ge(t, e);
|
|
389
389
|
let {
|
|
390
390
|
mainAxis: g,
|
|
391
391
|
crossAxis: h,
|
|
@@ -457,7 +457,7 @@ const yr = function(e) {
|
|
|
457
457
|
} = Ge(e, t), d = {
|
|
458
458
|
x: o,
|
|
459
459
|
y: i
|
|
460
|
-
}, c = await ho(t, a), u = Ee(
|
|
460
|
+
}, c = await ho(t, a), u = Ee(Le(r)), g = ri(u);
|
|
461
461
|
let h = d[g], f = d[u];
|
|
462
462
|
if (s) {
|
|
463
463
|
const p = g === "y" ? "top" : "left", m = g === "y" ? "bottom" : "right", y = h + c[p], v = h - c[m];
|
|
@@ -500,21 +500,21 @@ const yr = function(e) {
|
|
|
500
500
|
apply: a = () => {
|
|
501
501
|
},
|
|
502
502
|
...d
|
|
503
|
-
} = Ge(e, t), c = await ho(t, d), u =
|
|
503
|
+
} = Ge(e, t), c = await ho(t, d), u = Le(r), g = Qe(r), h = Ee(r) === "y", {
|
|
504
504
|
width: f,
|
|
505
505
|
height: w
|
|
506
506
|
} = s.floating;
|
|
507
507
|
let p, m;
|
|
508
508
|
u === "top" || u === "bottom" ? (p = u, m = g === (await (n.isRTL == null ? void 0 : n.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (m = u, p = g === "end" ? "top" : "bottom");
|
|
509
|
-
const y = w - c.top - c.bottom, v = f - c.left - c.right, x =
|
|
510
|
-
let S = x,
|
|
511
|
-
if ((o = t.middlewareData.shift) != null && o.enabled.x && (
|
|
512
|
-
const
|
|
513
|
-
h ?
|
|
509
|
+
const y = w - c.top - c.bottom, v = f - c.left - c.right, x = ze(w - c[p], y), C = ze(f - c[m], v), _ = !t.middlewareData.shift;
|
|
510
|
+
let S = x, k = C;
|
|
511
|
+
if ((o = t.middlewareData.shift) != null && o.enabled.x && (k = v), (i = t.middlewareData.shift) != null && i.enabled.y && (S = y), _ && !g) {
|
|
512
|
+
const R = ie(c.left, 0), E = ie(c.right, 0), M = ie(c.top, 0), L = ie(c.bottom, 0);
|
|
513
|
+
h ? k = f - 2 * (R !== 0 || E !== 0 ? R + E : ie(c.left, c.right)) : S = w - 2 * (M !== 0 || L !== 0 ? M + L : ie(c.top, c.bottom));
|
|
514
514
|
}
|
|
515
515
|
await a({
|
|
516
516
|
...t,
|
|
517
|
-
availableWidth:
|
|
517
|
+
availableWidth: k,
|
|
518
518
|
availableHeight: S
|
|
519
519
|
});
|
|
520
520
|
const I = await n.getDimensions(l.floating);
|
|
@@ -602,7 +602,7 @@ function Xe(e) {
|
|
|
602
602
|
function pe(e) {
|
|
603
603
|
return ne(e).getComputedStyle(e);
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function zt(e) {
|
|
606
606
|
return we(e) ? {
|
|
607
607
|
scrollLeft: e.scrollLeft,
|
|
608
608
|
scrollTop: e.scrollTop
|
|
@@ -676,15 +676,15 @@ function di(e) {
|
|
|
676
676
|
y: t.visualViewport.offsetTop
|
|
677
677
|
};
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function zr(e, t, o) {
|
|
680
680
|
return t === void 0 && (t = !1), !o || t && o !== ne(e) ? !1 : t;
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function qe(e, t, o, i) {
|
|
683
683
|
t === void 0 && (t = !1), o === void 0 && (o = !1);
|
|
684
684
|
const r = e.getBoundingClientRect(), s = po(e);
|
|
685
685
|
let n = _e(1);
|
|
686
686
|
t && (i ? we(i) && (n = Ye(i)) : n = Ye(e));
|
|
687
|
-
const l =
|
|
687
|
+
const l = zr(s, o, i) ? di(s) : _e(0);
|
|
688
688
|
let a = (r.left + l.x) / n.x, d = (r.top + l.y) / n.y, c = r.width / n.x, u = r.height / n.y;
|
|
689
689
|
if (s) {
|
|
690
690
|
const g = ne(s), h = i && we(i) ? ne(i) : i;
|
|
@@ -701,18 +701,18 @@ function Ve(e, t, o, i) {
|
|
|
701
701
|
y: d
|
|
702
702
|
});
|
|
703
703
|
}
|
|
704
|
-
function
|
|
705
|
-
const o =
|
|
706
|
-
return t ? t.left + o :
|
|
704
|
+
function Lt(e, t) {
|
|
705
|
+
const o = zt(e).scrollLeft;
|
|
706
|
+
return t ? t.left + o : qe(ye(e)).left + o;
|
|
707
707
|
}
|
|
708
708
|
function ci(e, t) {
|
|
709
|
-
const o = e.getBoundingClientRect(), i = o.left + t.scrollLeft -
|
|
709
|
+
const o = e.getBoundingClientRect(), i = o.left + t.scrollLeft - Lt(e, o), r = o.top + t.scrollTop;
|
|
710
710
|
return {
|
|
711
711
|
x: i,
|
|
712
712
|
y: r
|
|
713
713
|
};
|
|
714
714
|
}
|
|
715
|
-
function
|
|
715
|
+
function Lr(e) {
|
|
716
716
|
let {
|
|
717
717
|
elements: t,
|
|
718
718
|
rect: o,
|
|
@@ -727,8 +727,8 @@ function zr(e) {
|
|
|
727
727
|
scrollTop: 0
|
|
728
728
|
}, d = _e(1);
|
|
729
729
|
const c = _e(0), u = ve(i);
|
|
730
|
-
if ((u || !u && !s) && ((Je(i) !== "body" || ft(n)) && (a =
|
|
731
|
-
const h =
|
|
730
|
+
if ((u || !u && !s) && ((Je(i) !== "body" || ft(n)) && (a = zt(i)), ve(i))) {
|
|
731
|
+
const h = qe(i);
|
|
732
732
|
d = Ye(i), c.x = h.x + i.clientLeft, c.y = h.y + i.clientTop;
|
|
733
733
|
}
|
|
734
734
|
const g = n && !u && !s ? ci(n, a) : _e(0);
|
|
@@ -743,8 +743,8 @@ function Pr(e) {
|
|
|
743
743
|
return Array.from(e.getClientRects());
|
|
744
744
|
}
|
|
745
745
|
function Or(e) {
|
|
746
|
-
const t = ye(e), o =
|
|
747
|
-
let n = -o.scrollLeft +
|
|
746
|
+
const t = ye(e), o = zt(e), i = e.ownerDocument.body, r = ie(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), s = ie(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
|
|
747
|
+
let n = -o.scrollLeft + Lt(e);
|
|
748
748
|
const l = -o.scrollTop;
|
|
749
749
|
return pe(i).direction === "rtl" && (n += ie(t.clientWidth, i.clientWidth) - r), {
|
|
750
750
|
width: r,
|
|
@@ -762,7 +762,7 @@ function Hr(e, t) {
|
|
|
762
762
|
const c = wo();
|
|
763
763
|
(!c || c && t === "fixed") && (l = r.offsetLeft, a = r.offsetTop);
|
|
764
764
|
}
|
|
765
|
-
const d =
|
|
765
|
+
const d = Lt(i);
|
|
766
766
|
if (d <= 0) {
|
|
767
767
|
const c = i.ownerDocument, u = c.body, g = getComputedStyle(u), h = c.compatMode === "CSS1Compat" && parseFloat(g.marginLeft) + parseFloat(g.marginRight) || 0, f = Math.abs(i.clientWidth - u.clientWidth - h);
|
|
768
768
|
f <= $o && (s -= f);
|
|
@@ -775,8 +775,8 @@ function Hr(e, t) {
|
|
|
775
775
|
};
|
|
776
776
|
}
|
|
777
777
|
const Fr = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
778
|
-
function
|
|
779
|
-
const o =
|
|
778
|
+
function Vr(e, t) {
|
|
779
|
+
const o = qe(e, !0, t === "fixed"), i = o.top + e.clientTop, r = o.left + e.clientLeft, s = ve(e) ? Ye(e) : _e(1), n = e.clientWidth * s.x, l = e.clientHeight * s.y, a = r * s.x, d = i * s.y;
|
|
780
780
|
return {
|
|
781
781
|
width: n,
|
|
782
782
|
height: l,
|
|
@@ -791,7 +791,7 @@ function Ao(e, t, o) {
|
|
|
791
791
|
else if (t === "document")
|
|
792
792
|
i = Or(ye(e));
|
|
793
793
|
else if (we(t))
|
|
794
|
-
i =
|
|
794
|
+
i = Vr(t, o);
|
|
795
795
|
else {
|
|
796
796
|
const r = di(e);
|
|
797
797
|
i = {
|
|
@@ -807,7 +807,7 @@ function gi(e, t) {
|
|
|
807
807
|
const o = Pe(e);
|
|
808
808
|
return o === t || !we(o) || Xe(o) ? !1 : pe(o).position === "fixed" || gi(o, t);
|
|
809
809
|
}
|
|
810
|
-
function
|
|
810
|
+
function qr(e, t) {
|
|
811
811
|
const o = t.get(e);
|
|
812
812
|
if (o)
|
|
813
813
|
return o;
|
|
@@ -827,9 +827,9 @@ function Nr(e) {
|
|
|
827
827
|
rootBoundary: i,
|
|
828
828
|
strategy: r
|
|
829
829
|
} = e;
|
|
830
|
-
const n = [...o === "clippingAncestors" ? At(t) ? [] :
|
|
830
|
+
const n = [...o === "clippingAncestors" ? At(t) ? [] : qr(t, this._c) : [].concat(o), i], l = n[0], a = n.reduce((d, c) => {
|
|
831
831
|
const u = Ao(t, c, r);
|
|
832
|
-
return d.top = ie(u.top, d.top), d.right =
|
|
832
|
+
return d.top = ie(u.top, d.top), d.right = ze(u.right, d.right), d.bottom = ze(u.bottom, d.bottom), d.left = ie(u.left, d.left), d;
|
|
833
833
|
}, Ao(t, l, r));
|
|
834
834
|
return {
|
|
835
835
|
width: a.right - a.left,
|
|
@@ -849,18 +849,18 @@ function Br(e) {
|
|
|
849
849
|
};
|
|
850
850
|
}
|
|
851
851
|
function Wr(e, t, o) {
|
|
852
|
-
const i = ve(t), r = ye(t), s = o === "fixed", n =
|
|
852
|
+
const i = ve(t), r = ye(t), s = o === "fixed", n = qe(e, !0, s, t);
|
|
853
853
|
let l = {
|
|
854
854
|
scrollLeft: 0,
|
|
855
855
|
scrollTop: 0
|
|
856
856
|
};
|
|
857
857
|
const a = _e(0);
|
|
858
858
|
function d() {
|
|
859
|
-
a.x =
|
|
859
|
+
a.x = Lt(r);
|
|
860
860
|
}
|
|
861
861
|
if (i || !i && !s)
|
|
862
|
-
if ((Je(t) !== "body" || ft(r)) && (l =
|
|
863
|
-
const h =
|
|
862
|
+
if ((Je(t) !== "body" || ft(r)) && (l = zt(t)), i) {
|
|
863
|
+
const h = qe(t, !0, s, t);
|
|
864
864
|
a.x = h.x + t.clientLeft, a.y = h.y + t.clientTop;
|
|
865
865
|
} else r && d();
|
|
866
866
|
s && !i && r && d();
|
|
@@ -872,10 +872,10 @@ function Wr(e, t, o) {
|
|
|
872
872
|
height: n.height
|
|
873
873
|
};
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function qt(e) {
|
|
876
876
|
return pe(e).position === "static";
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function zo(e, t) {
|
|
879
879
|
if (!ve(e) || pe(e).position === "fixed")
|
|
880
880
|
return null;
|
|
881
881
|
if (t)
|
|
@@ -890,16 +890,16 @@ function ui(e, t) {
|
|
|
890
890
|
if (!ve(e)) {
|
|
891
891
|
let r = Pe(e);
|
|
892
892
|
for (; r && !Xe(r); ) {
|
|
893
|
-
if (we(r) && !
|
|
893
|
+
if (we(r) && !qt(r))
|
|
894
894
|
return r;
|
|
895
895
|
r = Pe(r);
|
|
896
896
|
}
|
|
897
897
|
return o;
|
|
898
898
|
}
|
|
899
|
-
let i =
|
|
900
|
-
for (; i && Rr(i) &&
|
|
901
|
-
i =
|
|
902
|
-
return i && Xe(i) &&
|
|
899
|
+
let i = zo(e, t);
|
|
900
|
+
for (; i && Rr(i) && qt(i); )
|
|
901
|
+
i = zo(i, t);
|
|
902
|
+
return i && Xe(i) && qt(i) && !fo(i) ? o : i || Mr(e) || o;
|
|
903
903
|
}
|
|
904
904
|
const Yr = async function(e) {
|
|
905
905
|
const t = this.getOffsetParent || ui, o = this.getDimensions, i = await o(e.floating);
|
|
@@ -917,7 +917,7 @@ function Ur(e) {
|
|
|
917
917
|
return pe(e).direction === "rtl";
|
|
918
918
|
}
|
|
919
919
|
const Kr = {
|
|
920
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
920
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Lr,
|
|
921
921
|
getDocumentElement: ye,
|
|
922
922
|
getClippingRect: Nr,
|
|
923
923
|
getOffsetParent: ui,
|
|
@@ -950,7 +950,7 @@ function jr(e, t) {
|
|
|
950
950
|
return;
|
|
951
951
|
const f = mt(u), w = mt(r.clientWidth - (c + g)), p = mt(r.clientHeight - (u + h)), m = mt(c), v = {
|
|
952
952
|
rootMargin: -f + "px " + -w + "px " + -p + "px " + -m + "px",
|
|
953
|
-
threshold: ie(0,
|
|
953
|
+
threshold: ie(0, ze(1, a)) || 1
|
|
954
954
|
};
|
|
955
955
|
let x = !0;
|
|
956
956
|
function C(_) {
|
|
@@ -1000,10 +1000,10 @@ function Xr(e, t, o, i) {
|
|
|
1000
1000
|
(v = h) == null || v.observe(t);
|
|
1001
1001
|
})), o();
|
|
1002
1002
|
}), d && !a && h.observe(d), h.observe(t));
|
|
1003
|
-
let f, w = a ?
|
|
1003
|
+
let f, w = a ? qe(e) : null;
|
|
1004
1004
|
a && p();
|
|
1005
1005
|
function p() {
|
|
1006
|
-
const m =
|
|
1006
|
+
const m = qe(e);
|
|
1007
1007
|
w && !hi(w, m) && o(), w = m, f = requestAnimationFrame(p);
|
|
1008
1008
|
}
|
|
1009
1009
|
return o(), () => {
|
|
@@ -1238,8 +1238,8 @@ function wi(e, t) {
|
|
|
1238
1238
|
for (const C of m) {
|
|
1239
1239
|
const _ = ["wg-datepicker__day"];
|
|
1240
1240
|
C.isOtherMonth && _.push("wg-datepicker__day--other-month"), an(C.date, n, l) && _.push("wg-datepicker__day--disabled"), Zr(C.date) && _.push("wg-datepicker__day--today"), gt(C.date, r) && _.push("wg-datepicker__day--selected"), gt(C.date, s) && _.push("wg-datepicker__day--focused");
|
|
1241
|
-
const
|
|
1242
|
-
x += `<div class="${_.join(" ")}" data-date="${
|
|
1241
|
+
const k = Rt(C.date);
|
|
1242
|
+
x += `<div class="${_.join(" ")}" data-date="${k}">${C.day}</div>`;
|
|
1243
1243
|
}
|
|
1244
1244
|
return x;
|
|
1245
1245
|
}
|
|
@@ -1279,7 +1279,7 @@ function hn(e, t) {
|
|
|
1279
1279
|
r.classList.toggle("wg-datepicker__rolling-item--selected", s === t.viewMonth);
|
|
1280
1280
|
});
|
|
1281
1281
|
}
|
|
1282
|
-
function
|
|
1282
|
+
function Lo(e) {
|
|
1283
1283
|
const t = e.querySelector("[data-year].wg-datepicker__rolling-item--selected"), o = e.querySelector("[data-month].wg-datepicker__rolling-item--selected");
|
|
1284
1284
|
if (t) {
|
|
1285
1285
|
const i = t.parentElement;
|
|
@@ -1846,7 +1846,7 @@ class Ot {
|
|
|
1846
1846
|
const r = /* @__PURE__ */ new Date();
|
|
1847
1847
|
this.state.viewYear = r.getFullYear(), this.state.viewMonth = r.getMonth();
|
|
1848
1848
|
}
|
|
1849
|
-
mn(this.state), this.element = document.createElement("div"), this.element.className = "wg-datepicker-container", this.element.innerHTML = on(this.state, this.options, this.localeStrings), document.body.appendChild(this.element), this.position(), this.attachListeners(), this.state.isOpen = !0, this.state.rollingSelectorOpen &&
|
|
1849
|
+
mn(this.state), this.element = document.createElement("div"), this.element.className = "wg-datepicker-container", this.element.innerHTML = on(this.state, this.options, this.localeStrings), document.body.appendChild(this.element), this.position(), this.attachListeners(), this.state.isOpen = !0, this.state.rollingSelectorOpen && Lo(this.element);
|
|
1850
1850
|
}
|
|
1851
1851
|
/**
|
|
1852
1852
|
* Close the date picker
|
|
@@ -1923,7 +1923,7 @@ class Ot {
|
|
|
1923
1923
|
return;
|
|
1924
1924
|
}
|
|
1925
1925
|
if (i === "toggle-rolling") {
|
|
1926
|
-
t.preventDefault(), this.state.rollingSelectorOpen = !this.state.rollingSelectorOpen, this.render(), this.state.rollingSelectorOpen && this.element &&
|
|
1926
|
+
t.preventDefault(), this.state.rollingSelectorOpen = !this.state.rollingSelectorOpen, this.render(), this.state.rollingSelectorOpen && this.element && Lo(this.element);
|
|
1927
1927
|
return;
|
|
1928
1928
|
}
|
|
1929
1929
|
if (i === "today") {
|
|
@@ -2144,7 +2144,7 @@ var An = function(e) {
|
|
|
2144
2144
|
for (i in arguments[t])
|
|
2145
2145
|
Object.prototype.hasOwnProperty.call(arguments[t], i) && (e[i] = arguments[t][i]);
|
|
2146
2146
|
return e;
|
|
2147
|
-
},
|
|
2147
|
+
}, zn = {
|
|
2148
2148
|
template: "[%t] %l:",
|
|
2149
2149
|
levelFormatter: function(e) {
|
|
2150
2150
|
return e.toUpperCase();
|
|
@@ -2156,14 +2156,14 @@ var An = function(e) {
|
|
|
2156
2156
|
return e.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1");
|
|
2157
2157
|
},
|
|
2158
2158
|
format: void 0
|
|
2159
|
-
}, bi, Fe = {},
|
|
2159
|
+
}, bi, Fe = {}, Ln = function(e) {
|
|
2160
2160
|
if (!e || !e.getLogger)
|
|
2161
2161
|
throw new TypeError("Argument is not a root logger");
|
|
2162
2162
|
bi = e;
|
|
2163
2163
|
}, Pn = function(e, t) {
|
|
2164
2164
|
if (!e || !e.setLevel)
|
|
2165
2165
|
throw new TypeError("Argument is not a logger");
|
|
2166
|
-
var o = e.methodFactory, i = e.name || "", r = Fe[i] || Fe[""] ||
|
|
2166
|
+
var o = e.methodFactory, i = e.name || "", r = Fe[i] || Fe[""] || zn;
|
|
2167
2167
|
function s(n, l, a) {
|
|
2168
2168
|
var d = o(n, l, a), c = Fe[a] || Fe[""], u = c.template.indexOf("%t") !== -1, g = c.template.indexOf("%l") !== -1, h = c.template.indexOf("%n") !== -1;
|
|
2169
2169
|
return function() {
|
|
@@ -2180,7 +2180,7 @@ var An = function(e) {
|
|
|
2180
2180
|
"It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md"
|
|
2181
2181
|
), e;
|
|
2182
2182
|
}, _i = {
|
|
2183
|
-
reg:
|
|
2183
|
+
reg: Ln,
|
|
2184
2184
|
apply: Pn
|
|
2185
2185
|
};
|
|
2186
2186
|
const vi = {
|
|
@@ -2240,10 +2240,10 @@ const no = N.getLogger("GRID:INIT"), tt = N.getLogger("GRID:DATA"), Ho = N.getLo
|
|
|
2240
2240
|
function Fn() {
|
|
2241
2241
|
N.setLevel("debug");
|
|
2242
2242
|
}
|
|
2243
|
-
function
|
|
2243
|
+
function Vn() {
|
|
2244
2244
|
N.setLevel("silent");
|
|
2245
2245
|
}
|
|
2246
|
-
function
|
|
2246
|
+
function qn(e) {
|
|
2247
2247
|
N.setLevel(e);
|
|
2248
2248
|
}
|
|
2249
2249
|
function Nn(e, t) {
|
|
@@ -2305,6 +2305,7 @@ class Bn {
|
|
|
2305
2305
|
b(this, "_isStickyRowNumbers", !1);
|
|
2306
2306
|
b(this, "_freezeColumns", 0);
|
|
2307
2307
|
b(this, "_invalidCells", []);
|
|
2308
|
+
b(this, "_isDirtyIndicatorVisible", !0);
|
|
2308
2309
|
b(this, "_isRowToolbarVisible", !1);
|
|
2309
2310
|
b(this, "_rowToolbar", ["add", "delete", "duplicate"]);
|
|
2310
2311
|
b(this, "_toolbarVerticalAlign", "bottom");
|
|
@@ -2572,6 +2573,12 @@ class Bn {
|
|
|
2572
2573
|
set isRowNumbersVisible(t) {
|
|
2573
2574
|
this._isRowNumbersVisible = t, this.requestUpdate();
|
|
2574
2575
|
}
|
|
2576
|
+
get isDirtyIndicatorVisible() {
|
|
2577
|
+
return this._isDirtyIndicatorVisible;
|
|
2578
|
+
}
|
|
2579
|
+
set isDirtyIndicatorVisible(t) {
|
|
2580
|
+
this._isDirtyIndicatorVisible = t, this.requestUpdate();
|
|
2581
|
+
}
|
|
2575
2582
|
get isStickyRowNumbers() {
|
|
2576
2583
|
return this._isStickyRowNumbers;
|
|
2577
2584
|
}
|
|
@@ -3614,6 +3621,23 @@ toolbarColumn takes priority — cursor following is disabled.`,
|
|
|
3614
3621
|
hasRowDraft(t) {
|
|
3615
3622
|
return this._draftRows.has(t);
|
|
3616
3623
|
}
|
|
3624
|
+
/**
|
|
3625
|
+
* Check if a specific cell has been modified (draft value differs from original)
|
|
3626
|
+
*/
|
|
3627
|
+
isCellDirty(t, o) {
|
|
3628
|
+
const i = this._draftRows.get(t);
|
|
3629
|
+
if (!i) return !1;
|
|
3630
|
+
const r = this.displayItems[t];
|
|
3631
|
+
if (!r) return !1;
|
|
3632
|
+
const s = i[o], n = r[o];
|
|
3633
|
+
return s !== n;
|
|
3634
|
+
}
|
|
3635
|
+
/**
|
|
3636
|
+
* Check if any cell in a row has been modified
|
|
3637
|
+
*/
|
|
3638
|
+
isRowDirty(t) {
|
|
3639
|
+
return this._draftRows.has(t);
|
|
3640
|
+
}
|
|
3617
3641
|
discardRowDraft(t) {
|
|
3618
3642
|
this._draftRows.delete(t), this._invalidCells = this._invalidCells.filter((o) => o.rowIndex !== t), this.requestUpdate();
|
|
3619
3643
|
}
|
|
@@ -3802,21 +3826,21 @@ toolbarColumn takes priority — cursor following is disabled.`,
|
|
|
3802
3826
|
field: o,
|
|
3803
3827
|
error: c || "Invalid value"
|
|
3804
3828
|
})), r && this.emptyRowHasData(this._emptyRowDraft)) {
|
|
3805
|
-
const S = { ...this._emptyRowDraft },
|
|
3806
|
-
this._invalidCells = this._invalidCells.map((E) => E.rowIndex === t ? { ...E, rowIndex:
|
|
3807
|
-
const I = this._invalidCells.some((E) => E.rowIndex ===
|
|
3829
|
+
const S = { ...this._emptyRowDraft }, k = this._newRowPosition === "top" ? 0 : this._items.length;
|
|
3830
|
+
this._invalidCells = this._invalidCells.map((E) => E.rowIndex === t ? { ...E, rowIndex: k } : this._newRowPosition === "top" ? { ...E, rowIndex: E.rowIndex + 1 } : E), this._newRowPosition === "top" ? this._items = [S, ...this._items] : this._items = [...this._items, S];
|
|
3831
|
+
const I = this._invalidCells.some((E) => E.rowIndex === k);
|
|
3808
3832
|
(w = this._onrowchange) == null || w.call(this, {
|
|
3809
3833
|
row: S,
|
|
3810
3834
|
draftRow: S,
|
|
3811
|
-
rowIndex:
|
|
3835
|
+
rowIndex: k,
|
|
3812
3836
|
field: o,
|
|
3813
3837
|
oldValue: null,
|
|
3814
3838
|
newValue: d,
|
|
3815
3839
|
isValid: !I,
|
|
3816
3840
|
validationError: I ? "Row has invalid cells" : null
|
|
3817
3841
|
}), this._emptyRowDraft = null;
|
|
3818
|
-
const
|
|
3819
|
-
this._editingCell = null, (p = this._onInteractionChange) == null || p.call(this, "editingCell", { prev:
|
|
3842
|
+
const R = this._editingCell;
|
|
3843
|
+
this._editingCell = null, (p = this._onInteractionChange) == null || p.call(this, "editingCell", { prev: R, current: null }), this.requestUpdate();
|
|
3820
3844
|
return;
|
|
3821
3845
|
}
|
|
3822
3846
|
const C = this._editingCell;
|
|
@@ -4270,7 +4294,7 @@ toolbarColumn takes priority — cursor following is disabled.`,
|
|
|
4270
4294
|
}), this.requestUpdate();
|
|
4271
4295
|
}
|
|
4272
4296
|
}
|
|
4273
|
-
const Wn = ':host{--wg-rem: 10px;font-family:var(--wg-font-family);display:block;position:relative;--wg-accent-color: var(--base-accent-color, #0078d4);--wg-accent-color-hover: var(--base-accent-color-hover, #106ebe);--wg-accent-color-active: var(--base-accent-color-active, #005a9e);--wg-accent-color-light: var(--base-accent-color-light, #e6f2ff);--wg-text-color-1: var(--base-text-color-1, #242424);--wg-text-color-2: var(--base-text-color-2, #424242);--wg-text-color-3: var(--base-text-color-3, #707070);--wg-text-on-accent: var(--base-text-color-on-accent, #ffffff);--wg-surface-1: var(--base-main-bg, #ffffff);--wg-surface-2: var(--base-elevated-bg, #f5f5f5);--wg-surface-3: var(--base-hover-bg, #ebebeb);--wg-surface-floating: var(--base-dropdown-bg, var(--base-main-bg, #ffffff));--wg-border-color: var(--base-border-color, #e0e0e0);--wg-border-color-hover: var(--base-border-color, #d1d1d1);--wg-input-bg: var(--base-input-bg, #ffffff);--wg-input-color: var(--base-input-color, var(--wg-text-color-1));--wg-input-border: var(--base-input-border, 1px solid #d1d1d1);--wg-input-border-hover: var(--base-input-border-hover, 1px solid #0078d4);--wg-input-border-focus: var(--base-input-border-focus, 1px solid #0078d4);--wg-input-placeholder-color: var(--base-input-placeholder-color, #707070);--wg-danger-color: var(--base-danger-color, #d13438);--wg-danger-bg-light: var(--base-danger-bg-light, #fde7e9);--wg-hover-bg: var(--base-hover-bg, #f0f0f0);--wg-active-bg: var(--base-hover-bg, #e0e0e0);--wg-font-size-base: calc(var(--base-font-size-sm, 1.4) * var(--wg-rem));--wg-font-size-sm: calc(var(--base-font-size-xs, 1.2) * var(--wg-rem));--wg-font-size-xs: calc(var(--base-font-size-2xs, 1.1) * var(--wg-rem));--wg-font-size-lg: calc(var(--base-font-size-base, 1.6) * var(--wg-rem));--wg-font-family: var(--base-font-family, inherit);--wg-line-height-base: var(--base-line-height-normal, 1.5);--wg-font-weight-normal: var(--base-font-weight-normal, 400);--wg-font-weight-semibold: var(--base-font-weight-semibold, 600);--wg-font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;--wg-border-radius-sm: calc(var(--base-border-radius-sm, .4) * var(--wg-rem));--wg-border-radius-md: calc(var(--base-border-radius-md, .6) * var(--wg-rem));--wg-border-radius-lg: calc(var(--base-border-radius-lg, .8) * var(--wg-rem));--wg-spacing-xs: calc(.4 * var(--wg-rem));--wg-spacing-sm: calc(.8 * var(--wg-rem));--wg-spacing-md: calc(1.2 * var(--wg-rem));--wg-spacing-lg: calc(1.6 * var(--wg-rem));--wg-spacing-xl: calc(2.4 * var(--wg-rem));--wg-table-bg: var(--wg-surface-1);--wg-table-border: 1px solid var(--wg-border-color);--wg-row-number-width: calc(4 * var(--wg-rem));--wg-actions-column-width: calc(3.2 * var(--wg-rem));--wg-header-bg: var(--wg-surface-2);--wg-header-bg-hover: var(--wg-surface-3);--wg-header-bg-sorted: var(--wg-surface-3);--wg-header-color: var(--wg-text-color-1);--wg-header-border: 2px solid var(--wg-border-color);--wg-header-separator: 1px solid var(--wg-border-color);--wg-header-padding: var(--wg-spacing-sm);--wg-header-font-weight: var(--wg-font-weight-semibold);--wg-header-min-height: auto;--wg-cell-padding: var(--wg-spacing-sm);--wg-cell-padding-block: var(--wg-spacing-sm);--wg-cell-padding-inline: var(--wg-spacing-sm);--wg-row-min-height: auto;--wg-cell-color: var(--wg-text-color-1);--wg-cell-border: 1px solid var(--wg-border-color);--wg-cell-splitter-color: var(--wg-border-color);--wg-cell-splitter-width: 1px;--wg-cell-bg-hover: var(--wg-hover-bg);--wg-cell-bg-editing: var(--wg-surface-1);--wg-cell-readonly-bg: var(--base-disabled-bg, var(--wg-surface-2));--wg-row-border: 1px solid var(--wg-border-color);--wg-row-bg-even: var(--wg-surface-2);--wg-row-bg-hover: var(--wg-surface-3);--wg-filter-bg: var(--wg-surface-1);--wg-filter-border: 1px solid var(--wg-border-color);--wg-filter-padding: var(--wg-spacing-xs) var(--wg-spacing-sm);--wg-filter-input-padding: calc(.4 * var(--wg-rem)) calc(.8 * var(--wg-rem));--wg-filter-input-bg: var(--wg-input-bg);--wg-filter-input-border: var(--wg-input-border);--wg-filter-input-border-focus: var(--wg-input-border-focus);--wg-filter-input-border-radius: var(--wg-border-radius-sm);--wg-filter-input-font-size: var(--wg-font-size-sm);--wg-sort-indicator-size: calc(1.4 * var(--wg-rem));--wg-sort-indicator-opacity: .9;--wg-sort-placeholder-opacity: .3;--wg-sort-priority-size: calc(1.1 * var(--wg-rem));--wg-pagination-padding: var(--wg-spacing-md);--wg-pagination-gap: calc(1.6 * var(--wg-rem));--wg-pagination-bg: var(--wg-surface-1);--wg-pagination-border: 1px solid var(--wg-border-color);--wg-pagination-btn-padding: calc(.6 * var(--wg-rem)) calc(1.6 * var(--wg-rem));--wg-pagination-btn-bg: var(--wg-surface-1);--wg-pagination-btn-bg-hover: var(--wg-surface-2);--wg-pagination-btn-bg-active: var(--wg-surface-3);--wg-pagination-btn-border: 1px solid var(--wg-border-color);--wg-pagination-btn-border-hover: 1px solid var(--wg-border-color-hover);--wg-pagination-btn-border-radius: var(--wg-border-radius-sm);--wg-pagination-btn-disabled-opacity: .4;--wg-empty-padding: var(--wg-spacing-xl);--wg-empty-color: var(--wg-text-color-3);--wg-error-cell-bg: var(--wg-danger-bg-light);--wg-error-cell-border: 1px solid var(--wg-danger-color);--wg-error-message-color: var(--wg-danger-color);--wg-error-message-font-size: var(--wg-font-size-xs);--wg-error-indicator-color: var(--wg-danger-color);--wg-editor-bg: var(--wg-surface-1);--wg-editor-outline: 2px solid var(--wg-accent-color);--wg-editor-outline-offset: -2px;--wg-editor-validating-opacity: .7;--wg-dropdown-toggle-right: var(--wg-spacing-sm);--wg-dropdown-toggle-size: calc(1.2 * var(--wg-rem));--wg-dropdown-toggle-hitbox: calc(2.4 * var(--wg-rem));--wg-date-trigger-size: calc(2.8 * var(--wg-rem));--wg-editor-hitbox-height: calc(4.8 * var(--wg-rem));--wg-checkbox-scale: 1.2;--wg-toolbar-bg: var(--wg-surface-floating);--wg-toolbar-border: 1px solid var(--wg-border-color);--wg-toolbar-border-radius: var(--wg-border-radius-sm);--wg-toolbar-shadow: var(--base-dropdown-box-shadow, 0 2px 8px rgba(0, 0, 0, .15));--wg-toolbar-divider-color: var(--wg-border-color);--wg-toolbar-divider-height: calc(1.6 * var(--wg-rem));--wg-toolbar-row-height: calc(3.7 * var(--wg-rem));--wg-toolbar-icon-size: calc(1.6 * var(--wg-rem));--wg-toolbar-btn-min-width: calc(2.4 * var(--wg-rem));--wg-toolbar-btn-padding: 0 calc(.4 * var(--wg-rem));--wg-toolbar-btn-border-radius: var(--wg-border-radius-sm);--wg-toolbar-btn-bg-hover: var(--wg-hover-bg);--wg-toolbar-btn-bg-active: var(--wg-active-bg);--wg-toolbar-btn-color: var(--wg-text-color-1);--wg-toolbar-trigger-color: var(--wg-text-color-3);--wg-toolbar-trigger-color-hover: var(--wg-text-color-1);--wg-toolbar-trigger-bg-hover: var(--wg-hover-bg);--wg-overlay-bg: rgba(0, 0, 0, .4);--wg-dialog-shadow: 0 4px 20px rgba(0, 0, 0, .15);--wg-tooltip-bg: var(--base-tooltip-bg, #333);--wg-tooltip-color: var(--base-tooltip-color, #fff);--wg-tooltip-max-width: 300px;--wg-tooltip-arrow-size: 8px;--wg-context-menu-z-index: var(--wg-z-context-menu);--wg-context-menu-min-width: calc(16 * var(--wg-rem));--wg-focus-outline: 2px solid var(--wg-accent-color);--wg-focus-outline-offset: -2px;--wg-focus-border-width: 2px;--wg-focus-border-color: var(--wg-accent-color);--wg-focus-bg: var(--wg-hover-bg);--wg-transition-fast: .1s ease;--wg-transition-normal: .15s ease;--wg-z-cell-highlight: 1;--wg-z-selection-border: 1;--wg-z-frozen: 2;--wg-z-header: 3;--wg-z-frozen-header: 4;--wg-z-fill-handle: 5;--wg-z-fill-handle-area: 4;--wg-z-resize-handle: 6;--wg-z-shortcuts-help: 10;--wg-z-reorder-indicator: 100;--wg-z-toolbar: 1000;--wg-z-context-menu: 1001;--wg-z-dropdown: 9999;--wg-z-reorder-ghost: 10000;--wg-z-tooltip: 10000;--wg-row-locked-bg: var(--base-disabled-bg, var(--wg-surface-2));--wg-row-locked-opacity: .7;--wg-frozen-column-bg: var(--wg-surface-1);--wg-frozen-header-bg: color-mix(in srgb, var(--wg-accent-color) 8%, var(--wg-header-bg));--wg-frozen-column-shadow: 2px 0 4px rgba(0, 0, 0, .1);--wg-frozen-column-shadow-active: 6px 0 12px rgba(0, 0, 0, .25);--wg-frozen-column-border: 2px solid var(--wg-border-color);--wg-frozen-column-shadow-gradient: linear-gradient(to right, rgba(0, 0, 0, .15), transparent);--wg-frozen-column-shadow-width: 8px;--wg-resize-handle-width: 12px;--wg-resize-handle-offset: -6px;--wg-resize-handle-line-width: 2px;--wg-resize-handle-color: var(--wg-border-color);--wg-resize-handle-active-color: var(--wg-accent-color);--wg-fill-handle-size: 8px;--wg-fill-handle-bg: var(--wg-surface-1);--wg-fill-handle-border-color: var(--wg-accent-color);--wg-fill-handle-border-width: 2px;--wg-fill-range-bg: color-mix(in srgb, var(--wg-accent-color) 15%, transparent);--wg-fill-range-border-color: var(--wg-accent-color);--wg-selection-bg: color-mix(in srgb, var(--wg-accent-color) 15%, transparent);--wg-selection-row-number-bg: var(--wg-accent-color);--wg-selection-row-number-color: var(--base-text-inverted, #fff);--wg-selection-border-width: 2px;--wg-selection-border-color: var(--wg-accent-color);--wg-row-focus-bg: color-mix(in srgb, var(--wg-accent-color) 10%, transparent);--wg-row-focus-row-number-bg: color-mix(in srgb, var(--wg-accent-color) 30%, transparent);--wg-cell-selection-bg: color-mix(in srgb, var(--wg-accent-color) 10%, transparent);--wg-cell-selection-border: var(--wg-accent-color);--wg-cell-selection-border-width: 2px;--wg-dropdown-max-height: 200px;--wg-dropdown-option-gap: var(--wg-spacing-sm);--wg-dropdown-option-padding: calc(.6 * var(--wg-rem)) var(--wg-spacing-sm) calc(.6 * var(--wg-rem)) calc(var(--wg-spacing-sm) - 1px);--wg-dropdown-empty-padding: calc(.8 * var(--wg-rem)) var(--wg-spacing-sm) calc(.8 * var(--wg-rem)) calc(var(--wg-spacing-sm) - 1px);--wg-inline-actions-padding: var(--wg-spacing-xs) var(--wg-spacing-sm);--wg-inline-actions-gap: calc(.2 * var(--wg-rem));--wg-toolbar-row-gap: calc(.2 * var(--wg-rem));--wg-toolbar-row-padding: 0 calc(.4 * var(--wg-rem));--wg-toolbar-label-font-size: var(--wg-font-size-sm);--wg-toolbar-btn-gap: calc(.4 * var(--wg-rem));--wg-tooltip-padding: calc(.6 * var(--wg-rem)) calc(1 * var(--wg-rem));--wg-tooltip-shadow: 0 2px 8px rgba(0, 0, 0, .2)}web-grid:not(:defined){display:block;min-height:calc(10 * var(--wg-rem));color:transparent!important;background:transparent}.wg{position:relative;width:100%;max-height:inherit;overflow:auto;overscroll-behavior:contain;border:var(--wg-table-border)}.wg--scrollable{max-height:var(--wg-scroll-max-height, 100vh)}.wg--table-border-only{border:none;overflow:visible;display:flex;flex-direction:column}.wg--table-border-only .wg__table-container{border:var(--wg-table-border);overflow:auto;max-height:inherit;flex:1;min-height:0}.wg--table-border-only .wg__table-container .wg__header{position:sticky;top:0;z-index:var(--wg-z-header)}.wg__table{width:100%;min-width:max-content;border-collapse:collapse;table-layout:fixed;background:var(--wg-table-bg);font-size:var(--wg-font-size-base);line-height:var(--wg-line-height-base)}.wg__filler{width:auto;min-width:0;padding:0!important;border:none!important;box-shadow:none!important}th.wg__filler{position:sticky;top:0;z-index:var(--wg-z-header);background:var(--wg-header-bg);box-shadow:inset 0 -2px 0 var(--wg-border-color)!important}td.wg__filler{background:transparent}.wg__table tbody tr{border-bottom:var(--wg-row-border)}.wg__row-number-header,.wg__row-number{width:var(--wg-row-number-width);min-width:var(--wg-row-number-width);max-width:var(--wg-row-number-width);box-sizing:border-box;text-align:center;color:var(--wg-text-color-2);background:var(--wg-header-bg);-webkit-user-select:none;user-select:none;font-size:var(--wg-font-size-sm)}.wg__row-number-header{cursor:pointer}.wg__row-number-header:hover{background:var(--wg-hover-bg)}.wg__row-number{box-shadow:inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color)}.wg__actions-column{width:var(--wg-actions-column-width);min-width:var(--wg-actions-column-width);max-width:var(--wg-actions-column-width);padding:0!important;text-align:center}thead .wg__actions-column{background:var(--wg-header-bg);box-shadow:inset 0 -2px 0 var(--wg-border-color)}.wg__filter-row .wg__actions-column{background:var(--wg-filter-bg);border-bottom:var(--wg-filter-border)}.wg__header{position:sticky;top:0;z-index:var(--wg-z-header);background:var(--wg-header-bg);color:var(--wg-header-color);font-weight:var(--wg-header-font-weight);padding:var(--wg-header-padding);height:var(--wg-header-min-height);box-shadow:inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color),inset 0 -2px 0 var(--wg-border-color);box-sizing:border-box;-webkit-user-select:none;user-select:none;overflow:hidden}.wg__header:last-child{box-shadow:inset 0 -2px 0 var(--wg-border-color)}.wg__header--sortable{cursor:pointer}.wg__header--sortable:hover{background:var(--wg-header-bg-hover)}.wg__header--sorted{background:var(--wg-header-bg-sorted)}.wg__header--selected,.wg__header--selected:hover{background:var(--wg-selection-row-number-bg);color:var(--wg-selection-row-number-color)}.wg__header-container{display:flex;align-items:stretch;gap:var(--wg-spacing-xs);height:100%}.wg__header-content{flex:1;min-width:0;display:flex;align-items:center;justify-content:flex-start}.wg__header-content--align-left{justify-content:flex-start}.wg__header-content--align-center{justify-content:center}.wg__header-content--align-right{justify-content:flex-end}.wg__header-content--align-justify{justify-content:flex-start}.wg__header-content--valign-top{align-items:flex-start}.wg__header-content--valign-middle{align-items:center}.wg__header-content--valign-bottom{align-items:flex-end}.wg__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wg__header-controls{flex-shrink:0;display:flex;align-items:center}.wg__sort-indicator{font-size:var(--wg-sort-indicator-size);opacity:var(--wg-sort-indicator-opacity);min-width:16px;text-align:center}.wg__sort-placeholder{opacity:var(--wg-sort-placeholder-opacity)}.wg__sort-priority{font-size:var(--wg-sort-priority-size);font-weight:var(--wg-font-weight-semibold);margin-left:2px;vertical-align:super;line-height:1}.wg__header-info{display:inline-flex;align-items:center;color:var(--wg-accent-color);cursor:help;opacity:.7;margin-left:var(--wg-spacing-xs);vertical-align:middle}.wg__header-info:hover{opacity:1}.wg__filter-row th{padding:var(--wg-filter-padding);background:var(--wg-filter-bg);border-bottom:var(--wg-filter-border)}.wg__filter-input{width:100%;padding:var(--wg-filter-input-padding);border:var(--wg-filter-input-border);border-radius:var(--wg-filter-input-border-radius);background:var(--wg-surface-1);color:var(--wg-text-color-1);font-family:inherit;font-size:var(--wg-filter-input-font-size);box-sizing:border-box}.wg__filter-input:focus{outline:none;border:var(--wg-filter-input-border-focus);box-shadow:0 0 0 1px var(--wg-accent-color)}.wg__resize-handle{position:absolute;top:0;right:var(--wg-resize-handle-offset);bottom:0;width:var(--wg-resize-handle-width);cursor:col-resize;z-index:var(--wg-z-resize-handle);opacity:0;transition:opacity .1s ease}.wg__header:hover .wg__resize-handle{opacity:1}.wg__resize-handle:after{content:"";position:absolute;top:25%;bottom:25%;left:50%;width:var(--wg-resize-handle-line-width);background:var(--wg-resize-handle-color);transform:translate(-50%);border-radius:1px}.wg__resize-handle:hover:after{background:var(--wg-resize-handle-active-color);top:15%;bottom:15%}.wg__resize-handle--active:after{background:var(--wg-resize-handle-active-color);top:0;bottom:0}.wg__resize-handle--disabled{cursor:not-allowed}.wg__resize-handle--disabled:after{display:none}.wg--resizing .wg__resize-handle{opacity:1}.wg--resizing{-webkit-user-select:none;user-select:none;cursor:col-resize}.wg--resizing .wg__cell,.wg--resizing .wg__header{cursor:col-resize}.wg--resizing .wg__table{min-width:0!important}.wg__header--dragging{opacity:1;background:var(--wg-header-bg)!important;outline:2px dashed var(--wg-accent-color);outline-offset:-2px}.wg__reorder-ghost{position:fixed;z-index:var(--wg-z-reorder-ghost);background:var(--wg-header-bg);border:2px solid var(--wg-accent-color);border-radius:var(--wg-border-radius-sm);padding:.4em .8em;font-size:var(--wg-font-size-sm);font-weight:var(--wg-header-font-weight);color:var(--wg-header-color);box-shadow:var(--wg-dialog-shadow);opacity:.95;pointer-events:none;white-space:nowrap}.wg__drop-indicator{position:absolute;width:3px;background:var(--wg-accent-color);z-index:var(--wg-z-reorder-indicator);pointer-events:none;display:none}.wg__drop-indicator:before{content:"";position:absolute;top:0;left:50%;transform:translate(-50%);border-left:6px solid transparent;border-right:6px solid transparent;border-top:8px solid var(--wg-accent-color)}.wg--reordering{cursor:grabbing;-webkit-user-select:none;user-select:none}.wg--reordering .wg__cell,.wg--reordering .wg__header{cursor:grabbing}.wg--reorderable .wg__header:not(.wg__header--frozen):hover{cursor:grab}.wg__header--frozen{cursor:default}.wg__fill-handle{position:absolute;width:var(--wg-fill-handle-size);height:var(--wg-fill-handle-size);background:var(--wg-fill-handle-bg);border:var(--wg-fill-handle-border-width) solid var(--wg-fill-handle-border-color);cursor:crosshair;z-index:var(--wg-z-fill-handle);pointer-events:auto;box-sizing:border-box}.wg__fill-handle:hover{transform:scale(1.2)}.wg__fill-range{position:absolute;background:var(--wg-fill-range-bg);border:1px dashed var(--wg-fill-range-border-color);pointer-events:none;z-index:var(--wg-z-fill-handle-area);box-sizing:border-box}.wg--filling{cursor:crosshair;-webkit-user-select:none;user-select:none}.wg--filling .wg__cell,.wg--filling .wg__header{cursor:crosshair}.wg__cell--editing .wg__fill-handle{display:none}.wg__row--selected>.wg__cell{background:var(--wg-selection-bg)}.wg__row--selected>.wg__cell.wg__row-number,.wg--editable.wg--navigate-mode .wg__row--selected>.wg__cell.wg__row-number{background:var(--wg-selection-row-number-bg);color:var(--wg-selection-row-number-color)}.wg__row-number[data-row-number]{cursor:pointer;-webkit-user-select:none;user-select:none}.wg__row-number[data-row-number]:hover{background:var(--wg-hover-bg)}.wg__row--selected>.wg__cell.wg__row-number:hover,.wg--editable.wg--navigate-mode .wg__row--selected>.wg__cell.wg__row-number:hover{background:var(--wg-selection-row-number-bg);color:var(--wg-selection-row-number-color)}.wg__cell--column-selected{background:var(--wg-selection-bg)}.wg--selecting{cursor:default;-webkit-user-select:none;user-select:none}.wg--selecting *{-webkit-user-select:none;user-select:none}.wg:focus{outline:none}.wg__cell--in-range{background:var(--wg-cell-selection-bg)!important;position:relative;z-index:var(--wg-z-cell-highlight)}.wg__cell--editing.wg__cell--in-range{background:var(--wg-input-bg)!important}.wg__cell--editable.wg__cell--in-range:hover{background:var(--wg-cell-selection-bg)!important}.wg__cell--editable.wg__cell--in-range:hover:after{display:none}.wg__cell-range-border{position:absolute;border:var(--wg-cell-selection-border-width) solid var(--wg-cell-selection-border);pointer-events:none;z-index:var(--wg-z-selection-border);box-sizing:border-box;border-radius:1px}.wg--selecting-cells,.wg--selecting-cells *{cursor:crosshair!important;-webkit-user-select:none;user-select:none}.wg--selecting-cells .wg__cell{cursor:crosshair!important}.wg:has(.wg__cell-range-border) .wg__fill-handle{display:none}.wg__row-selection-border,.wg__column-selection-border{position:absolute;border:var(--wg-selection-border-width) solid var(--wg-selection-border-color);pointer-events:none;z-index:var(--wg-z-selection-border);box-sizing:border-box;border-radius:1px}.wg--selecting-columns,.wg--selecting-columns *{cursor:col-resize!important;-webkit-user-select:none;user-select:none}.wg--selecting-columns .wg__header{cursor:col-resize!important}.wg__header--frozen{background:var(--wg-frozen-header-bg, var(--wg-header-bg));z-index:var(--wg-z-frozen-header)!important}.wg__header--frozen.wg__header--selected,.wg__header--frozen.wg__header--selected:hover{background:var(--wg-selection-row-number-bg);color:var(--wg-selection-row-number-color)}.wg__row-number-header.wg__header--frozen{z-index:var(--wg-z-frozen-header)!important}.wg__cell--frozen{background:var(--wg-frozen-column-bg, var(--wg-surface-1))}.wg__cell--frozen-last{box-shadow:inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color)}.wg__row-number.wg__cell--frozen{background:var(--wg-header-bg);z-index:var(--wg-z-frozen)!important}.wg--striped tbody tr:nth-child(2n) .wg__cell--frozen{background:var(--wg-row-bg-even)}.wg--hoverable tbody tr:hover .wg__cell--frozen{background:var(--wg-row-bg-hover)}.wg__row--focused>.wg__cell--frozen{background:color-mix(in srgb,var(--wg-accent-color) 10%,var(--wg-frozen-column-bg, var(--wg-surface-1)))!important}.wg__row--selected>.wg__cell--frozen{background:color-mix(in srgb,var(--wg-accent-color) 15%,var(--wg-frozen-column-bg, var(--wg-surface-1)))!important}.wg__row--selected>.wg__row-number.wg__cell--frozen{background:var(--wg-selection-row-number-bg)!important;color:var(--wg-selection-row-number-color)}.wg__cell--frozen.wg__cell--column-selected{background:color-mix(in srgb,var(--wg-accent-color) 15%,var(--wg-frozen-column-bg, var(--wg-surface-1)))!important}.wg__cell--frozen.wg__cell--in-range{background:color-mix(in srgb,var(--wg-accent-color) 10%,var(--wg-frozen-column-bg, var(--wg-surface-1)))!important}.wg__header.wg__header--frozen-last,.wg__cell.wg__cell--frozen-last{overflow:visible}.wg--scrolled-horizontal .wg__header--frozen-last:after,.wg--scrolled-horizontal .wg__cell--frozen-last:after{content:"";position:absolute;top:0;right:calc(-1 * var(--wg-frozen-column-shadow-width));bottom:0;width:var(--wg-frozen-column-shadow-width);background:var(--wg-frozen-column-shadow-gradient);pointer-events:none}.wg__cell{padding:var(--wg-cell-padding);color:var(--wg-cell-color);height:var(--wg-row-min-height);box-sizing:border-box;position:relative;scroll-margin-top:calc(3 * var(--wg-rem));scroll-margin-bottom:calc(.5 * var(--wg-rem));-webkit-user-select:none;user-select:none;overflow:hidden;box-shadow:inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color)}.wg__cell-text{-webkit-user-select:none;user-select:none;pointer-events:none}.wg__cell--ellipsis .wg__cell-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wg__cell--line-clamp .wg__cell-text{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.wg__cell--editable{cursor:pointer}.wg__cell--editable:hover{background:var(--wg-cell-bg-hover)}.wg__cell--editable:hover:after{content:"";position:absolute;top:2px;right:2px;bottom:2px;left:2px;border:1px dashed var(--wg-border-color);border-radius:2px;pointer-events:none}.wg__cell--editing{position:relative;background:var(--wg-surface-1);outline:2px solid var(--wg-accent-color);outline-offset:-2px;z-index:var(--wg-z-cell-highlight)}.wg__cell--editing:after{display:none}.wg__cell--invalid{background:var(--wg-danger-bg-light);box-shadow:inset 0 0 0 2px var(--wg-danger-color),inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color)}.wg--editable.wg--navigate-mode .wg__cell:not(.wg__cell--editable){background:var(--wg-cell-readonly-bg)}.wg__row--locked{background:var(--wg-row-locked-bg)!important}.wg__row--locked .wg__cell{opacity:var(--wg-row-locked-opacity)}.wg__row--locked .wg__cell--editable{cursor:not-allowed}.wg__row--locked .wg__cell--editable:hover{background:inherit}.wg__row--locked .wg__cell--editable:hover:after{display:none}.wg__row-number--locked{opacity:1!important;cursor:help}.wg__editor{position:absolute;top:0;left:0;right:0;width:100%;padding:var(--wg-cell-padding);border:none;background:transparent;color:var(--wg-text-color-1);font-size:var(--wg-font-size-base);font-family:inherit;line-height:inherit;box-sizing:border-box}.wg__editor:focus,.wg__editor:focus-visible{outline:none;box-shadow:none}.wg__editor--text{text-align:inherit}.wg__editor--number{text-align:right}.wg__editor--valign-top{top:0;bottom:auto}.wg__editor--valign-middle{top:0;bottom:0}.wg__editor--valign-bottom{top:auto;bottom:0}.wg__editor--date{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;background:transparent;padding:var(--wg-cell-padding)}.wg__date-input{flex:1;min-width:0;height:100%;border:none;background:transparent;font:inherit;padding:0;outline:none;color:inherit}.wg__date-trigger{width:var(--wg-date-trigger-size);height:100%;display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:var(--wg-text-color-3);cursor:pointer;padding:0;flex-shrink:0}.wg__date-trigger:hover{color:var(--wg-accent-color);background:var(--wg-hover-bg)}.wg__editor--checkbox{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(var(--wg-checkbox-scale));width:auto;height:auto;margin:0;padding:0;cursor:pointer}.wg__checkbox-display{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(var(--wg-checkbox-scale));width:auto;height:auto;margin:0;padding:0;cursor:pointer;pointer-events:none}.wg__checkbox-display--readonly{cursor:default;opacity:.5}.wg__editor--custom{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;background:var(--wg-editor-bg);padding:var(--wg-cell-padding-block) var(--wg-cell-padding-inline);cursor:pointer}.wg__editor--custom:focus{outline:none}.wg__custom-value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;cursor:pointer}.wg__editor--combobox,.wg__editor--autocomplete{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;padding:var(--wg-cell-padding);padding-right:0;background:transparent;box-sizing:border-box}.wg__combobox-input,.wg__autocomplete-input{flex:1;width:100%;height:100%;padding:0;padding-right:var(--wg-dropdown-toggle-hitbox);border:none;background:transparent;color:var(--wg-text-color-1);font-size:var(--wg-font-size-base);font-family:inherit;line-height:var(--wg-line-height-base);outline:none;box-sizing:border-box;margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wg__combobox-input:focus,.wg__autocomplete-input:focus{outline:none}.wg__combobox-toggle{position:absolute;right:var(--wg-dropdown-toggle-right);top:50%;transform:translateY(-50%);font-size:var(--wg-dropdown-toggle-size);color:var(--wg-text-color-2);pointer-events:auto;cursor:pointer}.wg__combobox-toggle:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:var(--wg-editor-hitbox-height)}.wg__loading-indicator{position:absolute;right:var(--wg-dropdown-toggle-right);top:50%;transform:translateY(-50%);font-size:var(--wg-font-size-sm);animation:wg-pulse 1s infinite}@keyframes wg-pulse{0%,to{opacity:1}50%{opacity:.4}}.wg__select-trigger{display:flex;align-items:center;justify-content:space-between;cursor:pointer;background:transparent}.wg__select-trigger:focus,.wg__select-trigger:focus-visible{outline:none;box-shadow:none}.wg__select-value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wg__select-toggle{position:relative;font-size:var(--wg-dropdown-toggle-size);opacity:.6;margin-left:var(--wg-spacing-xs);flex-shrink:0;pointer-events:auto;cursor:pointer}.wg__select-toggle:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:var(--wg-editor-hitbox-height)}.wg__cell-dropdown-display{display:flex;align-items:center;justify-content:space-between;width:100%;pointer-events:none}.wg__cell-dropdown-display--toggle-on-focus .wg__select-toggle{opacity:0}.wg__cell:hover .wg__cell-dropdown-display--toggle-on-focus .wg__select-toggle,.wg__cell--focused .wg__cell-dropdown-display--toggle-on-focus .wg__select-toggle{opacity:.6}.wg__cell-date-display{display:flex;align-items:center;justify-content:space-between;width:100%;pointer-events:none}.wg__cell-date-display .wg__date-trigger{position:relative;background:none;border:none;padding:0;margin:0;cursor:pointer;opacity:.6;display:flex;align-items:center;justify-content:center;color:inherit;pointer-events:auto}.wg__cell-date-display .wg__date-trigger:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:var(--wg-editor-hitbox-height)}.wg__cell-date-display--toggle-on-focus .wg__date-trigger{opacity:0}.wg__cell:hover .wg__cell-date-display--toggle-on-focus .wg__date-trigger,.wg__cell--focused .wg__cell-date-display--toggle-on-focus .wg__date-trigger{opacity:.6}.wg__dropdown{background:var(--wg-surface-floating);border:1px solid var(--wg-border-color);border-radius:var(--wg-border-radius-sm);box-shadow:var(--wg-toolbar-shadow);max-height:var(--wg-dropdown-max-height);overflow-y:auto;font-size:var(--wg-font-size-base);font-family:inherit;line-height:var(--wg-line-height-base)}.wg__dropdown-option{display:flex;align-items:center;gap:var(--wg-dropdown-option-gap);padding:var(--wg-dropdown-option-padding);cursor:pointer;color:var(--wg-text-color-1)}.wg__dropdown-option:hover,.wg__dropdown-option--highlighted{background:var(--wg-hover-bg);box-shadow:inset 0 0 0 2px var(--wg-accent-color)}.wg__dropdown-option--selected{background:var(--wg-accent-color-light)}.wg__dropdown-option--disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.wg__dropdown-option-icon{flex-shrink:0;width:1.5em;text-align:center}.wg__dropdown-option-content{flex:1;min-width:0;overflow:hidden}.wg__dropdown-option-label{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wg__dropdown-option-subtitle{display:block;font-size:var(--wg-font-size-sm);color:var(--wg-text-color-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wg__dropdown-empty{padding:var(--wg-dropdown-empty-padding);color:var(--wg-text-color-2);font-style:italic;text-align:center}.wg__dropdown-option--align-left{justify-content:flex-start}.wg__dropdown-option--align-left .wg__dropdown-option-content{text-align:left}.wg__dropdown-option--align-center{justify-content:center}.wg__dropdown-option--align-center .wg__dropdown-option-content{text-align:center}.wg__dropdown-option--align-right{justify-content:flex-end}.wg__dropdown-option--align-right .wg__dropdown-option-content{text-align:right}.wg__dropdown-option--align-justify{justify-content:flex-start}.wg__dropdown-option--align-justify .wg__dropdown-option-content{text-align:justify}.wg--navigate-mode .wg__cell{cursor:cell}.wg__cell:focus{outline:none;box-shadow:inset 0 0 0 var(--wg-focus-border-width) var(--wg-focus-border-color),inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color)}.wg--editable .wg__cell.wg__cell--focused,.wg__cell.wg__cell--always-edit-focused{box-shadow:inset 0 0 0 var(--wg-focus-border-width) var(--wg-focus-border-color),inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color)}.wg__cell--focused:after,.wg__cell--always-edit-focused:after{display:none}.wg__row--focused>.wg__cell{background:var(--wg-row-focus-bg)}.wg__row--focused>.wg__cell.wg__row-number{background:var(--wg-row-focus-row-number-bg)}.wg--editable.wg--navigate-mode .wg__row--focused>.wg__cell{background:var(--wg-row-focus-bg)}.wg--editable.wg--navigate-mode .wg__row--focused>.wg__cell.wg__row-number{background:var(--wg-row-focus-row-number-bg)}.wg__pagination{display:flex;align-items:center;justify-content:center;gap:var(--wg-pagination-gap);padding:var(--wg-pagination-padding);border-top:var(--wg-pagination-border);background:var(--wg-pagination-bg)}.wg__pagination-btn{padding:var(--wg-pagination-btn-padding);background:var(--wg-pagination-btn-bg);border:var(--wg-pagination-btn-border);border-radius:var(--wg-pagination-btn-border-radius);color:var(--wg-cell-color);font-family:inherit;font-size:var(--wg-font-size-base);cursor:pointer;transition:all var(--wg-transition-fast)}.wg__pagination-btn:hover:not(:disabled){background:var(--wg-pagination-btn-bg-hover);border:var(--wg-pagination-btn-border-hover)}.wg__pagination-btn:active:not(:disabled){background:var(--wg-pagination-btn-bg-active)}.wg__pagination-btn:disabled{opacity:var(--wg-pagination-btn-disabled-opacity);cursor:not-allowed}.wg__pagination-info{font-size:var(--wg-font-size-base);color:var(--wg-cell-color)}.wg__pagination-count{font-size:var(--wg-font-size-sm);color:var(--wg-text-color-3);margin-left:var(--wg-spacing-xs)}.wg__pagination-pagesize{display:flex;align-items:center;gap:calc(.6 * var(--wg-rem))}.wg__pagination-select{padding:var(--wg-spacing-xs) var(--wg-spacing-sm);background:var(--wg-pagination-btn-bg);border:var(--wg-pagination-btn-border);border-radius:var(--wg-pagination-btn-border-radius);color:var(--wg-cell-color);font-family:inherit;font-size:var(--wg-font-size-base);cursor:pointer}.wg__pagination-select:hover{background:var(--wg-pagination-btn-bg-hover);border:var(--wg-pagination-btn-border-hover)}.wg__pagination-select:focus{outline:2px solid var(--wg-accent-color);outline-offset:-2px}.wg__pagination-label{font-size:var(--wg-font-size-sm);color:var(--wg-text-color-3)}.wg__pagination--left{justify-content:flex-start}.wg__pagination--right{justify-content:flex-end}.wg__pagination--top{border-top:none;border-bottom:var(--wg-pagination-border)}.wg__summary{display:flex;align-items:center;padding:var(--wg-pagination-padding);border-top:var(--wg-pagination-border);background:var(--wg-pagination-bg);font-size:var(--wg-font-size-base);color:var(--wg-cell-color)}.wg__summary--left{justify-content:flex-start}.wg__summary--right{justify-content:flex-end}.wg__summary--top{border-top:none;border-bottom:var(--wg-pagination-border)}.wg__footer{display:flex;align-items:center;justify-content:space-between;border-top:var(--wg-pagination-border);background:var(--wg-pagination-bg)}.wg__footer--top{border-top:none;border-bottom:var(--wg-pagination-border)}.wg__footer .wg__summary,.wg__footer .wg__pagination{border:none}.wg__footer .wg__summary{flex:0 0 auto}.wg__footer .wg__pagination{flex:0 0 auto;margin-left:auto}.wg__toolbar-container{position:fixed;z-index:var(--wg-z-toolbar)}.wg__toolbar{display:flex;flex-direction:column-reverse;gap:0;padding:0;background:var(--wg-toolbar-bg);border:var(--wg-toolbar-border);border-radius:var(--wg-toolbar-border-radius);box-shadow:var(--wg-toolbar-shadow)}.wg__toolbar-row{display:flex;gap:var(--wg-toolbar-row-gap);align-items:center;height:var(--wg-toolbar-row-height);padding:var(--wg-toolbar-row-padding)}.wg__toolbar-row+.wg__toolbar-row{border-top:1px solid var(--wg-toolbar-divider-color)}.wg__toolbar-divider{width:1px;height:var(--wg-toolbar-divider-height);background:var(--wg-toolbar-divider-color);margin:0 var(--wg-spacing-xs);flex-shrink:0}.wg__toolbar-btn{min-width:var(--wg-toolbar-btn-min-width);height:100%;border:none;border-radius:var(--wg-toolbar-btn-border-radius);background:transparent;color:var(--wg-toolbar-btn-color);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--wg-toolbar-btn-gap);font-family:inherit;font-size:var(--wg-font-size-base);font-weight:var(--wg-font-weight-normal);padding:var(--wg-toolbar-btn-padding);transition:background .1s ease}.wg__toolbar-btn:hover{background:var(--wg-toolbar-btn-bg-hover)}.wg__toolbar-btn:active{background:var(--wg-toolbar-btn-bg-active)}.wg__toolbar-btn:disabled{opacity:.5;cursor:not-allowed}.wg__toolbar-btn:disabled:hover{background:transparent}.wg__toolbar-btn svg{width:var(--wg-toolbar-icon-size);height:var(--wg-toolbar-icon-size);flex-shrink:0}.wg__toolbar-btn--danger:hover{background:var(--wg-danger-bg-light);color:var(--wg-danger-color)}.wg__toolbar-label{font-size:var(--wg-toolbar-label-font-size);white-space:nowrap}.wg__actions-column{width:var(--wg-toolbar-btn-min-width);min-width:var(--wg-toolbar-btn-min-width);max-width:var(--wg-toolbar-btn-min-width);padding:0!important;text-align:center}.wg__header .wg__actions-column{background:var(--wg-header-bg)}.wg__filter-row .wg__actions-column{background:var(--wg-filter-bg)}.wg__toolbar-trigger{position:relative;padding:0;background:transparent;border:none;border-radius:var(--wg-border-radius-sm);cursor:pointer;font-size:var(--wg-font-size-base);line-height:1;color:var(--wg-toolbar-trigger-color)}.wg__toolbar-trigger:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:var(--wg-editor-hitbox-height)}.wg__toolbar-trigger:hover,.wg__toolbar-trigger--active{color:var(--wg-toolbar-trigger-color-hover);background:var(--wg-toolbar-trigger-bg-hover)}.wg__inline-actions-header,.wg__inline-actions-cell{white-space:nowrap;text-align:start;padding:var(--wg-inline-actions-padding);overflow:visible}.wg__inline-actions-header{background:var(--wg-header-bg)}.wg__inline-actions-wrap{display:flex;flex-direction:column;gap:var(--wg-inline-actions-gap);align-items:flex-start}.wg__inline-actions-row{display:flex;gap:var(--wg-inline-actions-gap);align-items:center;justify-content:flex-start}.wg__inline-action-btn{width:var(--wg-toolbar-btn-min-width);max-width:var(--wg-toolbar-btn-min-width);height:calc(2.4 * var(--wg-rem));border:none;border-radius:var(--wg-toolbar-btn-border-radius);background:transparent;color:var(--wg-toolbar-btn-color);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;box-sizing:border-box;font-family:inherit;font-size:var(--wg-font-size-base);transition:background var(--wg-transition-fast)}.wg__inline-action-btn:hover{background:var(--wg-toolbar-btn-bg-hover)}.wg__inline-action-btn:active{background:var(--wg-toolbar-btn-bg-active)}.wg__inline-action-btn:disabled,.wg__inline-action-btn--disabled{opacity:.5;cursor:not-allowed}.wg__inline-action-btn:disabled:hover,.wg__inline-action-btn--disabled:hover{background:transparent}.wg__inline-action-btn--danger:hover{background:var(--wg-danger-bg-light);color:var(--wg-danger-color)}.wg__inline-action-btn svg{width:var(--wg-toolbar-icon-size);height:var(--wg-toolbar-icon-size);flex-shrink:0}.wg__shortcuts-help{position:absolute;top:var(--wg-spacing-xs);right:var(--wg-spacing-sm);z-index:var(--wg-z-shortcuts-help)}.wg__shortcuts-help--left{right:auto;left:var(--wg-spacing-sm)}.wg__shortcuts-help-icon{display:flex;align-items:center;justify-content:center;width:var(--wg-spacing-xl);height:var(--wg-spacing-xl);padding:0;border:none;border-radius:50%;background:var(--wg-surface-1);color:var(--wg-text-color-2);cursor:pointer;opacity:.7}.wg__shortcuts-help-icon:hover{opacity:1;background:var(--wg-surface-2)}.wg__shortcuts-help-icon svg{width:var(--wg-toolbar-icon-size);height:var(--wg-toolbar-icon-size)}.wg__shortcuts-help-overlay{display:none;position:absolute;top:100%;right:0;margin-top:var(--wg-spacing-xs);padding:var(--wg-spacing-md);background:var(--wg-surface-1);border:1px solid var(--wg-border-color);border-radius:var(--wg-border-radius-md);box-shadow:var(--wg-dialog-shadow);min-width:200px;max-width:var(--wg-tooltip-max-width);z-index:100}.wg__shortcuts-help--left .wg__shortcuts-help-overlay{right:auto;left:0}.wg__shortcuts-help:hover .wg__shortcuts-help-overlay,.wg__shortcuts-help:focus-within .wg__shortcuts-help-overlay{display:block}.wg__shortcuts-help-title{font-weight:var(--wg-font-weight-semibold);font-size:var(--wg-font-size-base);color:var(--wg-text-color-1);margin-bottom:var(--wg-spacing-sm);padding-bottom:var(--wg-spacing-xs);border-bottom:1px solid var(--wg-border-color)}.wg__shortcuts-help-custom{margin-bottom:var(--wg-spacing-sm);padding-bottom:var(--wg-spacing-sm);border-bottom:1px solid var(--wg-border-color);font-size:var(--wg-font-size-sm);color:var(--wg-text-color-2)}.wg__shortcuts-help-list{display:flex;flex-direction:column;gap:var(--wg-spacing-xs)}.wg__shortcuts-help-item{display:flex;align-items:center;gap:var(--wg-spacing-md)}.wg__shortcuts-help-key{display:inline-flex;align-items:center;justify-content:center;min-width:28px;padding:2px calc(.6 * var(--wg-rem));font-family:var(--wg-font-family-mono);font-size:var(--wg-font-size-xs);font-weight:var(--wg-font-weight-semibold);color:var(--wg-text-color-1);background:var(--wg-surface-2);border:1px solid var(--wg-border-color);border-radius:var(--wg-border-radius-sm)}.wg__shortcuts-help-label{flex:1;font-size:var(--wg-font-size-sm);color:var(--wg-text-color-2)}.wg--striped tbody tr:nth-child(2n){background:var(--wg-row-bg-even)}.wg--hoverable tbody tr:hover{background:var(--wg-row-bg-hover)}.wg__empty{text-align:center;padding:var(--wg-empty-padding);color:var(--wg-empty-color);font-style:italic}.wg__loading-more{text-align:center;padding:var(--wg-cell-padding);color:var(--wg-text-color-2);font-size:var(--wg-font-size-sm)}.wg__tooltip{position:absolute;z-index:var(--wg-z-tooltip);max-width:var(--wg-tooltip-max-width);padding:var(--wg-tooltip-padding);background:var(--wg-tooltip-bg);color:var(--wg-tooltip-color);font-size:var(--wg-font-size-sm);line-height:1.4;border-radius:var(--wg-border-radius-sm);box-shadow:var(--wg-tooltip-shadow);pointer-events:none;opacity:0;transition:opacity var(--wg-transition-fast)}.wg__tooltip--visible{opacity:1}.wg__tooltip-arrow{position:absolute;width:var(--wg-tooltip-arrow-size);height:var(--wg-tooltip-arrow-size);background:var(--wg-tooltip-bg);transform:rotate(45deg)}.wg__tooltip[data-placement^=top] .wg__tooltip-arrow{bottom:calc(-.5 * var(--wg-tooltip-arrow-size))}.wg__tooltip[data-placement^=bottom] .wg__tooltip-arrow{top:calc(-.5 * var(--wg-tooltip-arrow-size))}.wg__tooltip[data-placement^=left] .wg__tooltip-arrow{right:calc(-.5 * var(--wg-tooltip-arrow-size))}.wg__tooltip[data-placement^=right] .wg__tooltip-arrow{left:calc(-.5 * var(--wg-tooltip-arrow-size))}.wg__tooltip-title{font-weight:600}.wg__tooltip-desc{opacity:.85;margin-top:2px}.wg__tooltip-shortcut{margin-top:4px;opacity:.7;font-size:.9em}.wg__goto-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--wg-overlay-bg);display:flex;align-items:center;justify-content:center;z-index:1000}.wg__goto-dialog{background:var(--wg-surface-1);border-radius:var(--wg-border-radius-md);padding:var(--wg-spacing-lg);box-shadow:var(--wg-dialog-shadow);min-width:250px}.wg__goto-label{display:block;margin-bottom:var(--wg-spacing-sm);font-size:var(--wg-font-size-base);color:var(--wg-text-color-1)}.wg__goto-input{width:100%;padding:var(--wg-spacing-sm) var(--wg-spacing-md);border:1px solid var(--wg-border-color);border-radius:var(--wg-border-radius-sm);font-family:inherit;font-size:var(--wg-font-size-base);margin-bottom:var(--wg-spacing-md);box-sizing:border-box}.wg__goto-input:focus{outline:none;border-color:var(--wg-accent-color);box-shadow:0 0 0 2px color-mix(in srgb,var(--wg-accent-color) 20%,transparent)}.wg__goto-buttons{display:flex;gap:var(--wg-spacing-sm);justify-content:flex-end}.wg__goto-btn{padding:var(--wg-spacing-sm) var(--wg-spacing-md);border:1px solid var(--wg-border-color);border-radius:var(--wg-border-radius-sm);font-family:inherit;font-size:var(--wg-font-size-sm);cursor:pointer;background:var(--wg-surface-1);color:var(--wg-text-color-1)}.wg__goto-btn:hover{background:var(--wg-surface-2)}.wg__goto-btn--go{background:var(--wg-accent-color);border-color:var(--wg-accent-color);color:var(--wg-text-on-accent)}.wg__goto-btn--go:hover{background:var(--wg-accent-color-hover)}.wg__spacer-top td,.wg__spacer-bottom td{padding:0;border:none;background:transparent;height:inherit;line-height:0}@media (prefers-color-scheme: dark){:host{--wg-surface-1: #1f1f1f;--wg-surface-2: #2b2b2b;--wg-surface-3: #333333;--wg-surface-floating: #2b2b2b;--wg-text-color-1: #e0e0e0;--wg-text-color-2: #c0c0c0;--wg-text-color-3: #a0a0a0;--wg-border-color: #3d3d3d;--wg-border-color-hover: #5a5a5a;--wg-input-bg: #1f1f1f;--wg-input-border: 1px solid #5a5a5a;--wg-hover-bg: #3a3a3a;--wg-active-bg: #4a4a4a;--wg-danger-bg-light: #442726;--wg-danger-color: #f87c86}}:host([data-theme="dark"]),:host-context([data-theme="dark"]),:host([data-bs-theme="dark"]),:host-context([data-bs-theme="dark"]),:host-context(.dark){--wg-surface-1: #1f1f1f;--wg-surface-2: #2b2b2b;--wg-surface-3: #333333;--wg-surface-floating: #2b2b2b;--wg-text-color-1: #e0e0e0;--wg-text-color-2: #c0c0c0;--wg-text-color-3: #a0a0a0;--wg-border-color: #3d3d3d;--wg-border-color-hover: #5a5a5a;--wg-input-bg: #1f1f1f;--wg-input-border: 1px solid #5a5a5a;--wg-hover-bg: #3a3a3a;--wg-active-bg: #4a4a4a;--wg-danger-bg-light: #442726;--wg-danger-color: #f87c86}:host([data-theme="light"]),:host-context([data-theme="light"]),:host([data-bs-theme="light"]),:host-context([data-bs-theme="light"]),:host-context(.light){--wg-surface-1: var(--base-main-bg, #ffffff);--wg-surface-2: var(--base-elevated-bg, #f5f5f5);--wg-surface-3: var(--base-hover-bg, #ebebeb);--wg-surface-floating: var(--base-dropdown-bg, var(--base-main-bg, #ffffff));--wg-text-color-1: var(--base-text-color-1, #242424);--wg-text-color-2: var(--base-text-color-2, #424242);--wg-text-color-3: var(--base-text-color-3, #707070);--wg-border-color: var(--base-border-color, #e0e0e0);--wg-border-color-hover: var(--base-border-color, #d1d1d1);--wg-input-bg: var(--base-input-bg, #ffffff);--wg-input-border: var(--base-input-border, 1px solid #d1d1d1);--wg-hover-bg: var(--base-hover-bg, #f0f0f0);--wg-active-bg: var(--base-hover-bg, #e0e0e0);--wg-danger-bg-light: var(--base-danger-bg-light, #fde7e9);--wg-danger-color: var(--base-danger-color, #d13438)}';
|
|
4297
|
+
const Wn = ':host{--wg-rem: 10px;font-family:var(--wg-font-family);display:block;position:relative;--wg-accent-color: var(--base-accent-color, #0078d4);--wg-accent-color-hover: var(--base-accent-color-hover, #106ebe);--wg-accent-color-active: var(--base-accent-color-active, #005a9e);--wg-accent-color-light: var(--base-accent-color-light, #e6f2ff);--wg-text-color-1: var(--base-text-color-1, #242424);--wg-text-color-2: var(--base-text-color-2, #424242);--wg-text-color-3: var(--base-text-color-3, #707070);--wg-text-on-accent: var(--base-text-color-on-accent, #ffffff);--wg-surface-1: var(--base-main-bg, #ffffff);--wg-surface-2: var(--base-elevated-bg, #f5f5f5);--wg-surface-3: var(--base-hover-bg, #ebebeb);--wg-surface-floating: var(--base-dropdown-bg, var(--base-main-bg, #ffffff));--wg-border-color: var(--base-border-color, #e0e0e0);--wg-border-color-hover: var(--base-border-color, #d1d1d1);--wg-input-bg: var(--base-input-bg, #ffffff);--wg-input-color: var(--base-input-color, var(--wg-text-color-1));--wg-input-border: var(--base-input-border, 1px solid #d1d1d1);--wg-input-border-hover: var(--base-input-border-hover, 1px solid #0078d4);--wg-input-border-focus: var(--base-input-border-focus, 1px solid #0078d4);--wg-input-placeholder-color: var(--base-input-placeholder-color, #707070);--wg-danger-color: var(--base-danger-color, #d13438);--wg-danger-bg-light: var(--base-danger-bg-light, #fde7e9);--wg-hover-bg: var(--base-hover-bg, #f0f0f0);--wg-active-bg: var(--base-hover-bg, #e0e0e0);--wg-font-size-base: calc(var(--base-font-size-sm, 1.4) * var(--wg-rem));--wg-font-size-sm: calc(var(--base-font-size-xs, 1.2) * var(--wg-rem));--wg-font-size-xs: calc(var(--base-font-size-2xs, 1.1) * var(--wg-rem));--wg-font-size-lg: calc(var(--base-font-size-base, 1.6) * var(--wg-rem));--wg-font-family: var(--base-font-family, inherit);--wg-line-height-base: var(--base-line-height-normal, 1.5);--wg-font-weight-normal: var(--base-font-weight-normal, 400);--wg-font-weight-semibold: var(--base-font-weight-semibold, 600);--wg-font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;--wg-border-radius-sm: calc(var(--base-border-radius-sm, .4) * var(--wg-rem));--wg-border-radius-md: calc(var(--base-border-radius-md, .6) * var(--wg-rem));--wg-border-radius-lg: calc(var(--base-border-radius-lg, .8) * var(--wg-rem));--wg-spacing-xs: calc(.4 * var(--wg-rem));--wg-spacing-sm: calc(.8 * var(--wg-rem));--wg-spacing-md: calc(1.2 * var(--wg-rem));--wg-spacing-lg: calc(1.6 * var(--wg-rem));--wg-spacing-xl: calc(2.4 * var(--wg-rem));--wg-table-bg: var(--wg-surface-1);--wg-table-border: 1px solid var(--wg-border-color);--wg-row-number-width: calc(4 * var(--wg-rem));--wg-actions-column-width: calc(3.2 * var(--wg-rem));--wg-header-bg: var(--wg-surface-2);--wg-header-bg-hover: var(--wg-surface-3);--wg-header-bg-sorted: var(--wg-surface-3);--wg-header-color: var(--wg-text-color-1);--wg-header-border: 2px solid var(--wg-border-color);--wg-header-separator: 1px solid var(--wg-border-color);--wg-header-padding: var(--wg-spacing-sm);--wg-header-font-weight: var(--wg-font-weight-semibold);--wg-header-min-height: auto;--wg-cell-padding: var(--wg-spacing-sm);--wg-cell-padding-block: var(--wg-spacing-sm);--wg-cell-padding-inline: var(--wg-spacing-sm);--wg-row-min-height: auto;--wg-cell-color: var(--wg-text-color-1);--wg-cell-border: 1px solid var(--wg-border-color);--wg-cell-splitter-color: var(--wg-border-color);--wg-cell-splitter-width: 1px;--wg-cell-bg-hover: var(--wg-hover-bg);--wg-cell-bg-editing: var(--wg-surface-1);--wg-cell-readonly-bg: var(--base-disabled-bg, var(--wg-surface-2));--wg-row-border: 1px solid var(--wg-border-color);--wg-row-bg-even: var(--wg-surface-2);--wg-row-bg-hover: var(--wg-surface-3);--wg-filter-bg: var(--wg-surface-1);--wg-filter-border: 1px solid var(--wg-border-color);--wg-filter-padding: var(--wg-spacing-xs) var(--wg-spacing-sm);--wg-filter-input-padding: calc(.4 * var(--wg-rem)) calc(.8 * var(--wg-rem));--wg-filter-input-bg: var(--wg-input-bg);--wg-filter-input-border: var(--wg-input-border);--wg-filter-input-border-focus: var(--wg-input-border-focus);--wg-filter-input-border-radius: var(--wg-border-radius-sm);--wg-filter-input-font-size: var(--wg-font-size-sm);--wg-sort-indicator-size: calc(1.4 * var(--wg-rem));--wg-sort-indicator-opacity: .9;--wg-sort-placeholder-opacity: .3;--wg-sort-priority-size: calc(1.1 * var(--wg-rem));--wg-pagination-padding: var(--wg-spacing-md);--wg-pagination-gap: calc(1.6 * var(--wg-rem));--wg-pagination-bg: var(--wg-surface-1);--wg-pagination-border: 1px solid var(--wg-border-color);--wg-pagination-btn-padding: calc(.6 * var(--wg-rem)) calc(1.6 * var(--wg-rem));--wg-pagination-btn-bg: var(--wg-surface-1);--wg-pagination-btn-bg-hover: var(--wg-surface-2);--wg-pagination-btn-bg-active: var(--wg-surface-3);--wg-pagination-btn-border: 1px solid var(--wg-border-color);--wg-pagination-btn-border-hover: 1px solid var(--wg-border-color-hover);--wg-pagination-btn-border-radius: var(--wg-border-radius-sm);--wg-pagination-btn-disabled-opacity: .4;--wg-empty-padding: var(--wg-spacing-xl);--wg-empty-color: var(--wg-text-color-3);--wg-error-cell-bg: var(--wg-danger-bg-light);--wg-error-cell-border: 1px solid var(--wg-danger-color);--wg-error-message-color: var(--wg-danger-color);--wg-error-message-font-size: var(--wg-font-size-xs);--wg-error-indicator-color: var(--wg-danger-color);--wg-dirty-indicator-color: #ed8b00;--wg-dirty-indicator-size: 6px;--wg-dirty-cell-bg: rgba(237, 139, 0, .08);--wg-dirty-row-number-border-color: #ed8b00;--wg-editor-bg: var(--wg-surface-1);--wg-editor-outline: 2px solid var(--wg-accent-color);--wg-editor-outline-offset: -2px;--wg-editor-validating-opacity: .7;--wg-dropdown-toggle-right: var(--wg-spacing-sm);--wg-dropdown-toggle-size: calc(1.2 * var(--wg-rem));--wg-dropdown-toggle-hitbox: calc(2.4 * var(--wg-rem));--wg-date-trigger-size: calc(2.8 * var(--wg-rem));--wg-editor-hitbox-height: calc(4.8 * var(--wg-rem));--wg-checkbox-scale: 1.2;--wg-toolbar-bg: var(--wg-surface-floating);--wg-toolbar-border: 1px solid var(--wg-border-color);--wg-toolbar-border-radius: var(--wg-border-radius-sm);--wg-toolbar-shadow: var(--base-dropdown-box-shadow, 0 2px 8px rgba(0, 0, 0, .15));--wg-toolbar-divider-color: var(--wg-border-color);--wg-toolbar-divider-height: calc(1.6 * var(--wg-rem));--wg-toolbar-row-height: calc(3.7 * var(--wg-rem));--wg-toolbar-icon-size: calc(1.6 * var(--wg-rem));--wg-toolbar-btn-min-width: calc(2.4 * var(--wg-rem));--wg-toolbar-btn-padding: 0 calc(.4 * var(--wg-rem));--wg-toolbar-btn-border-radius: var(--wg-border-radius-sm);--wg-toolbar-btn-bg-hover: var(--wg-hover-bg);--wg-toolbar-btn-bg-active: var(--wg-active-bg);--wg-toolbar-btn-color: var(--wg-text-color-1);--wg-toolbar-trigger-color: var(--wg-text-color-3);--wg-toolbar-trigger-color-hover: var(--wg-text-color-1);--wg-toolbar-trigger-bg-hover: var(--wg-hover-bg);--wg-overlay-bg: rgba(0, 0, 0, .4);--wg-dialog-shadow: 0 4px 20px rgba(0, 0, 0, .15);--wg-tooltip-bg: var(--base-tooltip-bg, #333);--wg-tooltip-color: var(--base-tooltip-color, #fff);--wg-tooltip-max-width: 300px;--wg-tooltip-arrow-size: 8px;--wg-context-menu-z-index: var(--wg-z-context-menu);--wg-context-menu-min-width: calc(16 * var(--wg-rem));--wg-focus-outline: 2px solid var(--wg-accent-color);--wg-focus-outline-offset: -2px;--wg-focus-border-width: 2px;--wg-focus-border-color: var(--wg-accent-color);--wg-focus-bg: var(--wg-hover-bg);--wg-transition-fast: .1s ease;--wg-transition-normal: .15s ease;--wg-z-cell-highlight: 1;--wg-z-selection-border: 1;--wg-z-frozen: 2;--wg-z-header: 3;--wg-z-frozen-header: 4;--wg-z-fill-handle: 5;--wg-z-fill-handle-area: 4;--wg-z-resize-handle: 6;--wg-z-shortcuts-help: 10;--wg-z-reorder-indicator: 100;--wg-z-toolbar: 1000;--wg-z-context-menu: 1001;--wg-z-dropdown: 9999;--wg-z-reorder-ghost: 10000;--wg-z-tooltip: 10000;--wg-row-locked-bg: var(--base-disabled-bg, var(--wg-surface-2));--wg-row-locked-opacity: .7;--wg-frozen-column-bg: var(--wg-surface-1);--wg-frozen-header-bg: color-mix(in srgb, var(--wg-accent-color) 8%, var(--wg-header-bg));--wg-frozen-column-shadow: 2px 0 4px rgba(0, 0, 0, .1);--wg-frozen-column-shadow-active: 6px 0 12px rgba(0, 0, 0, .25);--wg-frozen-column-border: 2px solid var(--wg-border-color);--wg-frozen-column-shadow-gradient: linear-gradient(to right, rgba(0, 0, 0, .15), transparent);--wg-frozen-column-shadow-width: 8px;--wg-resize-handle-width: 12px;--wg-resize-handle-offset: -6px;--wg-resize-handle-line-width: 2px;--wg-resize-handle-color: var(--wg-border-color);--wg-resize-handle-active-color: var(--wg-accent-color);--wg-fill-handle-size: 8px;--wg-fill-handle-bg: var(--wg-surface-1);--wg-fill-handle-border-color: var(--wg-accent-color);--wg-fill-handle-border-width: 2px;--wg-fill-range-bg: color-mix(in srgb, var(--wg-accent-color) 15%, transparent);--wg-fill-range-border-color: var(--wg-accent-color);--wg-selection-bg: color-mix(in srgb, var(--wg-accent-color) 15%, transparent);--wg-selection-row-number-bg: var(--wg-accent-color);--wg-selection-row-number-color: var(--base-text-inverted, #fff);--wg-selection-border-width: 2px;--wg-selection-border-color: var(--wg-accent-color);--wg-row-focus-bg: color-mix(in srgb, var(--wg-accent-color) 10%, transparent);--wg-row-focus-row-number-bg: color-mix(in srgb, var(--wg-accent-color) 30%, transparent);--wg-cell-selection-bg: color-mix(in srgb, var(--wg-accent-color) 10%, transparent);--wg-cell-selection-border: var(--wg-accent-color);--wg-cell-selection-border-width: 2px;--wg-dropdown-max-height: 200px;--wg-dropdown-option-gap: var(--wg-spacing-sm);--wg-dropdown-option-padding: calc(.6 * var(--wg-rem)) var(--wg-spacing-sm) calc(.6 * var(--wg-rem)) calc(var(--wg-spacing-sm) - 1px);--wg-dropdown-empty-padding: calc(.8 * var(--wg-rem)) var(--wg-spacing-sm) calc(.8 * var(--wg-rem)) calc(var(--wg-spacing-sm) - 1px);--wg-inline-actions-padding: var(--wg-spacing-xs) var(--wg-spacing-sm);--wg-inline-actions-gap: calc(.2 * var(--wg-rem));--wg-toolbar-row-gap: calc(.2 * var(--wg-rem));--wg-toolbar-row-padding: 0 calc(.4 * var(--wg-rem));--wg-toolbar-label-font-size: var(--wg-font-size-sm);--wg-toolbar-btn-gap: calc(.4 * var(--wg-rem));--wg-tooltip-padding: calc(.6 * var(--wg-rem)) calc(1 * var(--wg-rem));--wg-tooltip-shadow: 0 2px 8px rgba(0, 0, 0, .2)}web-grid:not(:defined){display:block;min-height:calc(10 * var(--wg-rem));color:transparent!important;background:transparent}.wg{position:relative;width:100%;max-height:inherit;overflow:auto;overscroll-behavior:contain;border:var(--wg-table-border)}.wg--scrollable{max-height:var(--wg-scroll-max-height, 100vh)}.wg--table-border-only{border:none;overflow:visible;display:flex;flex-direction:column}.wg--table-border-only .wg__table-container{border:var(--wg-table-border);overflow:auto;max-height:inherit;flex:1;min-height:0}.wg--table-border-only .wg__table-container .wg__header{position:sticky;top:0;z-index:var(--wg-z-header)}.wg__table{width:100%;min-width:max-content;border-collapse:collapse;table-layout:fixed;background:var(--wg-table-bg);font-size:var(--wg-font-size-base);line-height:var(--wg-line-height-base)}.wg__filler{width:auto;min-width:0;padding:0!important;border:none!important;box-shadow:none!important}th.wg__filler{position:sticky;top:0;z-index:var(--wg-z-header);background:var(--wg-header-bg);box-shadow:inset 0 -2px 0 var(--wg-border-color)!important}td.wg__filler{background:transparent}.wg__table tbody tr{border-bottom:var(--wg-row-border)}.wg__row-number-header,.wg__row-number{width:var(--wg-row-number-width);min-width:var(--wg-row-number-width);max-width:var(--wg-row-number-width);box-sizing:border-box;text-align:center;color:var(--wg-text-color-2);background:var(--wg-header-bg);-webkit-user-select:none;user-select:none;font-size:var(--wg-font-size-sm)}.wg__row-number-header{cursor:pointer}.wg__row-number-header:hover{background:var(--wg-hover-bg)}.wg__row-number{box-shadow:inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color)}.wg__actions-column{width:var(--wg-actions-column-width);min-width:var(--wg-actions-column-width);max-width:var(--wg-actions-column-width);padding:0!important;text-align:center}thead .wg__actions-column{background:var(--wg-header-bg);box-shadow:inset 0 -2px 0 var(--wg-border-color)}.wg__filter-row .wg__actions-column{background:var(--wg-filter-bg);border-bottom:var(--wg-filter-border)}.wg__header{position:sticky;top:0;z-index:var(--wg-z-header);background:var(--wg-header-bg);color:var(--wg-header-color);font-weight:var(--wg-header-font-weight);padding:var(--wg-header-padding);height:var(--wg-header-min-height);box-shadow:inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color),inset 0 -2px 0 var(--wg-border-color);box-sizing:border-box;-webkit-user-select:none;user-select:none;overflow:hidden}.wg__header:last-child{box-shadow:inset 0 -2px 0 var(--wg-border-color)}.wg__header--sortable{cursor:pointer}.wg__header--sortable:hover{background:var(--wg-header-bg-hover)}.wg__header--sorted{background:var(--wg-header-bg-sorted)}.wg__header--selected,.wg__header--selected:hover{background:var(--wg-selection-row-number-bg);color:var(--wg-selection-row-number-color)}.wg__header-container{display:flex;align-items:stretch;gap:var(--wg-spacing-xs);height:100%}.wg__header-content{flex:1;min-width:0;display:flex;align-items:center;justify-content:flex-start}.wg__header-content--align-left{justify-content:flex-start}.wg__header-content--align-center{justify-content:center}.wg__header-content--align-right{justify-content:flex-end}.wg__header-content--align-justify{justify-content:flex-start}.wg__header-content--valign-top{align-items:flex-start}.wg__header-content--valign-middle{align-items:center}.wg__header-content--valign-bottom{align-items:flex-end}.wg__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wg__header-controls{flex-shrink:0;display:flex;align-items:center}.wg__sort-indicator{font-size:var(--wg-sort-indicator-size);opacity:var(--wg-sort-indicator-opacity);min-width:16px;text-align:center}.wg__sort-placeholder{opacity:var(--wg-sort-placeholder-opacity)}.wg__sort-priority{font-size:var(--wg-sort-priority-size);font-weight:var(--wg-font-weight-semibold);margin-left:2px;vertical-align:super;line-height:1}.wg__header-info{display:inline-flex;align-items:center;color:var(--wg-accent-color);cursor:help;opacity:.7;margin-left:var(--wg-spacing-xs);vertical-align:middle}.wg__header-info:hover{opacity:1}.wg__filter-row th{padding:var(--wg-filter-padding);background:var(--wg-filter-bg);border-bottom:var(--wg-filter-border)}.wg__filter-input{width:100%;padding:var(--wg-filter-input-padding);border:var(--wg-filter-input-border);border-radius:var(--wg-filter-input-border-radius);background:var(--wg-surface-1);color:var(--wg-text-color-1);font-family:inherit;font-size:var(--wg-filter-input-font-size);box-sizing:border-box}.wg__filter-input:focus{outline:none;border:var(--wg-filter-input-border-focus);box-shadow:0 0 0 1px var(--wg-accent-color)}.wg__resize-handle{position:absolute;top:0;right:var(--wg-resize-handle-offset);bottom:0;width:var(--wg-resize-handle-width);cursor:col-resize;z-index:var(--wg-z-resize-handle);opacity:0;transition:opacity .1s ease}.wg__header:hover .wg__resize-handle{opacity:1}.wg__resize-handle:after{content:"";position:absolute;top:25%;bottom:25%;left:50%;width:var(--wg-resize-handle-line-width);background:var(--wg-resize-handle-color);transform:translate(-50%);border-radius:1px}.wg__resize-handle:hover:after{background:var(--wg-resize-handle-active-color);top:15%;bottom:15%}.wg__resize-handle--active:after{background:var(--wg-resize-handle-active-color);top:0;bottom:0}.wg__resize-handle--disabled{cursor:not-allowed}.wg__resize-handle--disabled:after{display:none}.wg--resizing .wg__resize-handle{opacity:1}.wg--resizing{-webkit-user-select:none;user-select:none;cursor:col-resize}.wg--resizing .wg__cell,.wg--resizing .wg__header{cursor:col-resize}.wg--resizing .wg__table{min-width:0!important}.wg__header--dragging{opacity:1;background:var(--wg-header-bg)!important;outline:2px dashed var(--wg-accent-color);outline-offset:-2px}.wg__reorder-ghost{position:fixed;z-index:var(--wg-z-reorder-ghost);background:var(--wg-header-bg);border:2px solid var(--wg-accent-color);border-radius:var(--wg-border-radius-sm);padding:.4em .8em;font-size:var(--wg-font-size-sm);font-weight:var(--wg-header-font-weight);color:var(--wg-header-color);box-shadow:var(--wg-dialog-shadow);opacity:.95;pointer-events:none;white-space:nowrap}.wg__drop-indicator{position:absolute;width:3px;background:var(--wg-accent-color);z-index:var(--wg-z-reorder-indicator);pointer-events:none;display:none}.wg__drop-indicator:before{content:"";position:absolute;top:0;left:50%;transform:translate(-50%);border-left:6px solid transparent;border-right:6px solid transparent;border-top:8px solid var(--wg-accent-color)}.wg--reordering{cursor:grabbing;-webkit-user-select:none;user-select:none}.wg--reordering .wg__cell,.wg--reordering .wg__header{cursor:grabbing}.wg--reorderable .wg__header:not(.wg__header--frozen):hover{cursor:grab}.wg__header--frozen{cursor:default}.wg__fill-handle{position:absolute;width:var(--wg-fill-handle-size);height:var(--wg-fill-handle-size);background:var(--wg-fill-handle-bg);border:var(--wg-fill-handle-border-width) solid var(--wg-fill-handle-border-color);cursor:crosshair;z-index:var(--wg-z-fill-handle);pointer-events:auto;box-sizing:border-box}.wg__fill-handle:hover{transform:scale(1.2)}.wg__fill-range{position:absolute;background:var(--wg-fill-range-bg);border:1px dashed var(--wg-fill-range-border-color);pointer-events:none;z-index:var(--wg-z-fill-handle-area);box-sizing:border-box}.wg--filling{cursor:crosshair;-webkit-user-select:none;user-select:none}.wg--filling .wg__cell,.wg--filling .wg__header{cursor:crosshair}.wg__cell--editing .wg__fill-handle{display:none}.wg__row--selected>.wg__cell{background:var(--wg-selection-bg)}.wg__row--selected>.wg__cell.wg__row-number,.wg--editable.wg--navigate-mode .wg__row--selected>.wg__cell.wg__row-number{background:var(--wg-selection-row-number-bg);color:var(--wg-selection-row-number-color)}.wg__row-number[data-row-number]{cursor:pointer;-webkit-user-select:none;user-select:none}.wg__row-number[data-row-number]:hover{background:var(--wg-hover-bg)}.wg__row--selected>.wg__cell.wg__row-number:hover,.wg--editable.wg--navigate-mode .wg__row--selected>.wg__cell.wg__row-number:hover{background:var(--wg-selection-row-number-bg);color:var(--wg-selection-row-number-color)}.wg__cell--column-selected{background:var(--wg-selection-bg)}.wg--selecting{cursor:default;-webkit-user-select:none;user-select:none}.wg--selecting *{-webkit-user-select:none;user-select:none}.wg:focus{outline:none}.wg__cell--in-range{background:var(--wg-cell-selection-bg)!important;position:relative;z-index:var(--wg-z-cell-highlight)}.wg__cell--editing.wg__cell--in-range{background:var(--wg-input-bg)!important}.wg__cell--editable.wg__cell--in-range:hover{background:var(--wg-cell-selection-bg)!important}.wg__cell--editable.wg__cell--in-range:hover:after{display:none}.wg__cell-range-border{position:absolute;border:var(--wg-cell-selection-border-width) solid var(--wg-cell-selection-border);pointer-events:none;z-index:var(--wg-z-selection-border);box-sizing:border-box;border-radius:1px}.wg--selecting-cells,.wg--selecting-cells *{cursor:crosshair!important;-webkit-user-select:none;user-select:none}.wg--selecting-cells .wg__cell{cursor:crosshair!important}.wg:has(.wg__cell-range-border) .wg__fill-handle{display:none}.wg__row-selection-border,.wg__column-selection-border{position:absolute;border:var(--wg-selection-border-width) solid var(--wg-selection-border-color);pointer-events:none;z-index:var(--wg-z-selection-border);box-sizing:border-box;border-radius:1px}.wg--selecting-columns,.wg--selecting-columns *{cursor:col-resize!important;-webkit-user-select:none;user-select:none}.wg--selecting-columns .wg__header{cursor:col-resize!important}.wg__header--frozen{background:var(--wg-frozen-header-bg, var(--wg-header-bg));z-index:var(--wg-z-frozen-header)!important}.wg__header--frozen.wg__header--selected,.wg__header--frozen.wg__header--selected:hover{background:var(--wg-selection-row-number-bg);color:var(--wg-selection-row-number-color)}.wg__row-number-header.wg__header--frozen{z-index:var(--wg-z-frozen-header)!important}.wg__cell--frozen{background:var(--wg-frozen-column-bg, var(--wg-surface-1))}.wg__cell--frozen-last{box-shadow:inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color)}.wg__row-number.wg__cell--frozen{background:var(--wg-header-bg);z-index:var(--wg-z-frozen)!important}.wg--striped tbody tr:nth-child(2n) .wg__cell--frozen{background:var(--wg-row-bg-even)}.wg--hoverable tbody tr:hover .wg__cell--frozen{background:var(--wg-row-bg-hover)}.wg__row--focused>.wg__cell--frozen{background:color-mix(in srgb,var(--wg-accent-color) 10%,var(--wg-frozen-column-bg, var(--wg-surface-1)))!important}.wg__row--selected>.wg__cell--frozen{background:color-mix(in srgb,var(--wg-accent-color) 15%,var(--wg-frozen-column-bg, var(--wg-surface-1)))!important}.wg__row--selected>.wg__row-number.wg__cell--frozen{background:var(--wg-selection-row-number-bg)!important;color:var(--wg-selection-row-number-color)}.wg__cell--frozen.wg__cell--column-selected{background:color-mix(in srgb,var(--wg-accent-color) 15%,var(--wg-frozen-column-bg, var(--wg-surface-1)))!important}.wg__cell--frozen.wg__cell--in-range{background:color-mix(in srgb,var(--wg-accent-color) 10%,var(--wg-frozen-column-bg, var(--wg-surface-1)))!important}.wg__header.wg__header--frozen-last,.wg__cell.wg__cell--frozen-last{overflow:visible}.wg--scrolled-horizontal .wg__header--frozen-last:after,.wg--scrolled-horizontal .wg__cell--frozen-last:after{content:"";position:absolute;top:0;right:calc(-1 * var(--wg-frozen-column-shadow-width));bottom:0;width:var(--wg-frozen-column-shadow-width);background:var(--wg-frozen-column-shadow-gradient);pointer-events:none}.wg__cell{padding:var(--wg-cell-padding);color:var(--wg-cell-color);height:var(--wg-row-min-height);box-sizing:border-box;position:relative;scroll-margin-top:calc(3 * var(--wg-rem));scroll-margin-bottom:calc(.5 * var(--wg-rem));-webkit-user-select:none;user-select:none;overflow:hidden;box-shadow:inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color)}.wg__cell-text{-webkit-user-select:none;user-select:none;pointer-events:none}.wg__cell--ellipsis .wg__cell-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wg__cell--line-clamp .wg__cell-text{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.wg__cell--editable{cursor:pointer}.wg__cell--editable:hover{background:var(--wg-cell-bg-hover)}.wg__cell--editable:hover:after{content:"";position:absolute;top:2px;right:2px;bottom:2px;left:2px;border:1px dashed var(--wg-border-color);border-radius:2px;pointer-events:none}.wg__cell--editing{position:relative;background:var(--wg-surface-1);outline:2px solid var(--wg-accent-color);outline-offset:-2px;z-index:var(--wg-z-cell-highlight)}.wg__cell--editing:after{display:none}.wg__cell--invalid{background:var(--wg-danger-bg-light);box-shadow:inset 0 0 0 2px var(--wg-danger-color),inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color)}.wg--editable.wg--navigate-mode .wg__cell:not(.wg__cell--editable){background:var(--wg-cell-readonly-bg)}.wg__row--locked{background:var(--wg-row-locked-bg)!important}.wg__row--locked .wg__cell{opacity:var(--wg-row-locked-opacity)}.wg__row--locked .wg__cell--editable{cursor:not-allowed}.wg__row--locked .wg__cell--editable:hover{background:inherit}.wg__row--locked .wg__cell--editable:hover:after{display:none}.wg__row-number--locked{opacity:1!important;cursor:help}.wg__cell--dirty{background:var(--wg-dirty-cell-bg)!important}.wg__cell--dirty:before{content:"";position:absolute;top:0;left:0;width:0;height:0;border-style:solid;border-width:var(--wg-dirty-indicator-size) var(--wg-dirty-indicator-size) 0 0;border-color:var(--wg-dirty-indicator-color) transparent transparent transparent;pointer-events:none}.wg__cell--dirty.wg__cell--editing:before{display:none}.wg__row-number--dirty{box-shadow:inset 3px 0 0 var(--wg-dirty-row-number-border-color),inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color)}.wg__editor{position:absolute;top:0;left:0;right:0;width:100%;padding:var(--wg-cell-padding);border:none;background:transparent;color:var(--wg-text-color-1);font-size:var(--wg-font-size-base);font-family:inherit;line-height:inherit;box-sizing:border-box}.wg__editor:focus,.wg__editor:focus-visible{outline:none;box-shadow:none}.wg__editor--text{text-align:inherit}.wg__editor--number{text-align:right}.wg__editor--valign-top{top:0;bottom:auto}.wg__editor--valign-middle{top:0;bottom:0}.wg__editor--valign-bottom{top:auto;bottom:0}.wg__editor--date{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;background:transparent;padding:var(--wg-cell-padding)}.wg__date-input{flex:1;min-width:0;height:100%;border:none;background:transparent;font:inherit;padding:0;outline:none;color:inherit}.wg__date-trigger{width:var(--wg-date-trigger-size);height:100%;display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:var(--wg-text-color-3);cursor:pointer;padding:0;flex-shrink:0}.wg__date-trigger:hover{color:var(--wg-accent-color);background:var(--wg-hover-bg)}.wg__editor--checkbox{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(var(--wg-checkbox-scale));width:auto;height:auto;margin:0;padding:0;cursor:pointer}.wg__checkbox-display{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(var(--wg-checkbox-scale));width:auto;height:auto;margin:0;padding:0;cursor:pointer;pointer-events:none}.wg__checkbox-display--readonly{cursor:default;opacity:.5}.wg__editor--custom{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;background:var(--wg-editor-bg);padding:var(--wg-cell-padding-block) var(--wg-cell-padding-inline);cursor:pointer}.wg__editor--custom:focus{outline:none}.wg__custom-value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;cursor:pointer}.wg__editor--combobox,.wg__editor--autocomplete{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;padding:var(--wg-cell-padding);padding-right:0;background:transparent;box-sizing:border-box}.wg__combobox-input,.wg__autocomplete-input{flex:1;width:100%;height:100%;padding:0;padding-right:var(--wg-dropdown-toggle-hitbox);border:none;background:transparent;color:var(--wg-text-color-1);font-size:var(--wg-font-size-base);font-family:inherit;line-height:var(--wg-line-height-base);outline:none;box-sizing:border-box;margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wg__combobox-input:focus,.wg__autocomplete-input:focus{outline:none}.wg__combobox-toggle{position:absolute;right:var(--wg-dropdown-toggle-right);top:50%;transform:translateY(-50%);font-size:var(--wg-dropdown-toggle-size);color:var(--wg-text-color-2);pointer-events:auto;cursor:pointer}.wg__combobox-toggle:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:var(--wg-editor-hitbox-height)}.wg__loading-indicator{position:absolute;right:var(--wg-dropdown-toggle-right);top:50%;transform:translateY(-50%);font-size:var(--wg-font-size-sm);animation:wg-pulse 1s infinite}@keyframes wg-pulse{0%,to{opacity:1}50%{opacity:.4}}.wg__select-trigger{display:flex;align-items:center;justify-content:space-between;cursor:pointer;background:transparent}.wg__select-trigger:focus,.wg__select-trigger:focus-visible{outline:none;box-shadow:none}.wg__select-value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wg__select-toggle{position:relative;font-size:var(--wg-dropdown-toggle-size);opacity:.6;margin-left:var(--wg-spacing-xs);flex-shrink:0;pointer-events:auto;cursor:pointer}.wg__select-toggle:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:var(--wg-editor-hitbox-height)}.wg__cell-dropdown-display{display:flex;align-items:center;justify-content:space-between;width:100%;pointer-events:none}.wg__cell-dropdown-display--toggle-on-focus .wg__select-toggle{opacity:0}.wg__cell:hover .wg__cell-dropdown-display--toggle-on-focus .wg__select-toggle,.wg__cell--focused .wg__cell-dropdown-display--toggle-on-focus .wg__select-toggle{opacity:.6}.wg__cell-date-display{display:flex;align-items:center;justify-content:space-between;width:100%;pointer-events:none}.wg__cell-date-display .wg__date-trigger{position:relative;background:none;border:none;padding:0;margin:0;cursor:pointer;opacity:.6;display:flex;align-items:center;justify-content:center;color:inherit;pointer-events:auto}.wg__cell-date-display .wg__date-trigger:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:var(--wg-editor-hitbox-height)}.wg__cell-date-display--toggle-on-focus .wg__date-trigger{opacity:0}.wg__cell:hover .wg__cell-date-display--toggle-on-focus .wg__date-trigger,.wg__cell--focused .wg__cell-date-display--toggle-on-focus .wg__date-trigger{opacity:.6}.wg__dropdown{background:var(--wg-surface-floating);border:1px solid var(--wg-border-color);border-radius:var(--wg-border-radius-sm);box-shadow:var(--wg-toolbar-shadow);max-height:var(--wg-dropdown-max-height);overflow-y:auto;font-size:var(--wg-font-size-base);font-family:inherit;line-height:var(--wg-line-height-base)}.wg__dropdown-option{display:flex;align-items:center;gap:var(--wg-dropdown-option-gap);padding:var(--wg-dropdown-option-padding);cursor:pointer;color:var(--wg-text-color-1)}.wg__dropdown-option:hover,.wg__dropdown-option--highlighted{background:var(--wg-hover-bg);box-shadow:inset 0 0 0 2px var(--wg-accent-color)}.wg__dropdown-option--selected{background:var(--wg-accent-color-light)}.wg__dropdown-option--disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.wg__dropdown-option-icon{flex-shrink:0;width:1.5em;text-align:center}.wg__dropdown-option-content{flex:1;min-width:0;overflow:hidden}.wg__dropdown-option-label{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wg__dropdown-option-subtitle{display:block;font-size:var(--wg-font-size-sm);color:var(--wg-text-color-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wg__dropdown-empty{padding:var(--wg-dropdown-empty-padding);color:var(--wg-text-color-2);font-style:italic;text-align:center}.wg__dropdown-option--align-left{justify-content:flex-start}.wg__dropdown-option--align-left .wg__dropdown-option-content{text-align:left}.wg__dropdown-option--align-center{justify-content:center}.wg__dropdown-option--align-center .wg__dropdown-option-content{text-align:center}.wg__dropdown-option--align-right{justify-content:flex-end}.wg__dropdown-option--align-right .wg__dropdown-option-content{text-align:right}.wg__dropdown-option--align-justify{justify-content:flex-start}.wg__dropdown-option--align-justify .wg__dropdown-option-content{text-align:justify}.wg--navigate-mode .wg__cell{cursor:cell}.wg__cell:focus{outline:none;box-shadow:inset 0 0 0 var(--wg-focus-border-width) var(--wg-focus-border-color),inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color)}.wg--editable .wg__cell.wg__cell--focused,.wg__cell.wg__cell--always-edit-focused{box-shadow:inset 0 0 0 var(--wg-focus-border-width) var(--wg-focus-border-color),inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color)}.wg__cell--focused:after,.wg__cell--always-edit-focused:after{display:none}.wg__row--focused>.wg__cell{background:var(--wg-row-focus-bg)}.wg__row--focused>.wg__cell.wg__row-number{background:var(--wg-row-focus-row-number-bg)}.wg--editable.wg--navigate-mode .wg__row--focused>.wg__cell{background:var(--wg-row-focus-bg)}.wg--editable.wg--navigate-mode .wg__row--focused>.wg__cell.wg__row-number{background:var(--wg-row-focus-row-number-bg)}.wg__pagination{display:flex;align-items:center;justify-content:center;gap:var(--wg-pagination-gap);padding:var(--wg-pagination-padding);border-top:var(--wg-pagination-border);background:var(--wg-pagination-bg)}.wg__pagination-btn{padding:var(--wg-pagination-btn-padding);background:var(--wg-pagination-btn-bg);border:var(--wg-pagination-btn-border);border-radius:var(--wg-pagination-btn-border-radius);color:var(--wg-cell-color);font-family:inherit;font-size:var(--wg-font-size-base);cursor:pointer;transition:all var(--wg-transition-fast)}.wg__pagination-btn:hover:not(:disabled){background:var(--wg-pagination-btn-bg-hover);border:var(--wg-pagination-btn-border-hover)}.wg__pagination-btn:active:not(:disabled){background:var(--wg-pagination-btn-bg-active)}.wg__pagination-btn:disabled{opacity:var(--wg-pagination-btn-disabled-opacity);cursor:not-allowed}.wg__pagination-info{font-size:var(--wg-font-size-base);color:var(--wg-cell-color)}.wg__pagination-count{font-size:var(--wg-font-size-sm);color:var(--wg-text-color-3);margin-left:var(--wg-spacing-xs)}.wg__pagination-pagesize{display:flex;align-items:center;gap:calc(.6 * var(--wg-rem))}.wg__pagination-select{padding:var(--wg-spacing-xs) var(--wg-spacing-sm);background:var(--wg-pagination-btn-bg);border:var(--wg-pagination-btn-border);border-radius:var(--wg-pagination-btn-border-radius);color:var(--wg-cell-color);font-family:inherit;font-size:var(--wg-font-size-base);cursor:pointer}.wg__pagination-select:hover{background:var(--wg-pagination-btn-bg-hover);border:var(--wg-pagination-btn-border-hover)}.wg__pagination-select:focus{outline:2px solid var(--wg-accent-color);outline-offset:-2px}.wg__pagination-label{font-size:var(--wg-font-size-sm);color:var(--wg-text-color-3)}.wg__pagination--left{justify-content:flex-start}.wg__pagination--right{justify-content:flex-end}.wg__pagination--top{border-top:none;border-bottom:var(--wg-pagination-border)}.wg__summary{display:flex;align-items:center;padding:var(--wg-pagination-padding);border-top:var(--wg-pagination-border);background:var(--wg-pagination-bg);font-size:var(--wg-font-size-base);color:var(--wg-cell-color)}.wg__summary--left{justify-content:flex-start}.wg__summary--right{justify-content:flex-end}.wg__summary--top{border-top:none;border-bottom:var(--wg-pagination-border)}.wg__footer{display:flex;align-items:center;justify-content:space-between;border-top:var(--wg-pagination-border);background:var(--wg-pagination-bg)}.wg__footer--top{border-top:none;border-bottom:var(--wg-pagination-border)}.wg__footer .wg__summary,.wg__footer .wg__pagination{border:none}.wg__footer .wg__summary{flex:0 0 auto}.wg__footer .wg__pagination{flex:0 0 auto;margin-left:auto}.wg__toolbar-container{position:fixed;z-index:var(--wg-z-toolbar)}.wg__toolbar{display:flex;flex-direction:column-reverse;gap:0;padding:0;background:var(--wg-toolbar-bg);border:var(--wg-toolbar-border);border-radius:var(--wg-toolbar-border-radius);box-shadow:var(--wg-toolbar-shadow)}.wg__toolbar-row{display:flex;gap:var(--wg-toolbar-row-gap);align-items:center;height:var(--wg-toolbar-row-height);padding:var(--wg-toolbar-row-padding)}.wg__toolbar-row+.wg__toolbar-row{border-top:1px solid var(--wg-toolbar-divider-color)}.wg__toolbar-divider{width:1px;height:var(--wg-toolbar-divider-height);background:var(--wg-toolbar-divider-color);margin:0 var(--wg-spacing-xs);flex-shrink:0}.wg__toolbar-btn{min-width:var(--wg-toolbar-btn-min-width);height:100%;border:none;border-radius:var(--wg-toolbar-btn-border-radius);background:transparent;color:var(--wg-toolbar-btn-color);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--wg-toolbar-btn-gap);font-family:inherit;font-size:var(--wg-font-size-base);font-weight:var(--wg-font-weight-normal);padding:var(--wg-toolbar-btn-padding);transition:background .1s ease}.wg__toolbar-btn:hover{background:var(--wg-toolbar-btn-bg-hover)}.wg__toolbar-btn:active{background:var(--wg-toolbar-btn-bg-active)}.wg__toolbar-btn:disabled{opacity:.5;cursor:not-allowed}.wg__toolbar-btn:disabled:hover{background:transparent}.wg__toolbar-btn svg{width:var(--wg-toolbar-icon-size);height:var(--wg-toolbar-icon-size);flex-shrink:0}.wg__toolbar-btn--danger:hover{background:var(--wg-danger-bg-light);color:var(--wg-danger-color)}.wg__toolbar-label{font-size:var(--wg-toolbar-label-font-size);white-space:nowrap}.wg__actions-column{width:var(--wg-toolbar-btn-min-width);min-width:var(--wg-toolbar-btn-min-width);max-width:var(--wg-toolbar-btn-min-width);padding:0!important;text-align:center}.wg__header .wg__actions-column{background:var(--wg-header-bg)}.wg__filter-row .wg__actions-column{background:var(--wg-filter-bg)}.wg__toolbar-trigger{position:relative;padding:0;background:transparent;border:none;border-radius:var(--wg-border-radius-sm);cursor:pointer;font-size:var(--wg-font-size-base);line-height:1;color:var(--wg-toolbar-trigger-color)}.wg__toolbar-trigger:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--wg-dropdown-toggle-hitbox);height:var(--wg-editor-hitbox-height)}.wg__toolbar-trigger:hover,.wg__toolbar-trigger--active{color:var(--wg-toolbar-trigger-color-hover);background:var(--wg-toolbar-trigger-bg-hover)}.wg__inline-actions-header,.wg__inline-actions-cell{white-space:nowrap;text-align:start;padding:var(--wg-inline-actions-padding);overflow:visible}.wg__inline-actions-header{background:var(--wg-header-bg)}.wg__inline-actions-wrap{display:flex;flex-direction:column;gap:var(--wg-inline-actions-gap);align-items:flex-start}.wg__inline-actions-row{display:flex;gap:var(--wg-inline-actions-gap);align-items:center;justify-content:flex-start}.wg__inline-action-btn{width:var(--wg-toolbar-btn-min-width);max-width:var(--wg-toolbar-btn-min-width);height:calc(2.4 * var(--wg-rem));border:none;border-radius:var(--wg-toolbar-btn-border-radius);background:transparent;color:var(--wg-toolbar-btn-color);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;box-sizing:border-box;font-family:inherit;font-size:var(--wg-font-size-base);transition:background var(--wg-transition-fast)}.wg__inline-action-btn:hover{background:var(--wg-toolbar-btn-bg-hover)}.wg__inline-action-btn:active{background:var(--wg-toolbar-btn-bg-active)}.wg__inline-action-btn:disabled,.wg__inline-action-btn--disabled{opacity:.5;cursor:not-allowed}.wg__inline-action-btn:disabled:hover,.wg__inline-action-btn--disabled:hover{background:transparent}.wg__inline-action-btn--danger:hover{background:var(--wg-danger-bg-light);color:var(--wg-danger-color)}.wg__inline-action-btn svg{width:var(--wg-toolbar-icon-size);height:var(--wg-toolbar-icon-size);flex-shrink:0}.wg__shortcuts-help{position:absolute;top:var(--wg-spacing-xs);right:var(--wg-spacing-sm);z-index:var(--wg-z-shortcuts-help)}.wg__shortcuts-help--left{right:auto;left:var(--wg-spacing-sm)}.wg__shortcuts-help-icon{display:flex;align-items:center;justify-content:center;width:var(--wg-spacing-xl);height:var(--wg-spacing-xl);padding:0;border:none;border-radius:50%;background:var(--wg-surface-1);color:var(--wg-text-color-2);cursor:pointer;opacity:.7}.wg__shortcuts-help-icon:hover{opacity:1;background:var(--wg-surface-2)}.wg__shortcuts-help-icon svg{width:var(--wg-toolbar-icon-size);height:var(--wg-toolbar-icon-size)}.wg__shortcuts-help-overlay{display:none;position:absolute;top:100%;right:0;margin-top:var(--wg-spacing-xs);padding:var(--wg-spacing-md);background:var(--wg-surface-1);border:1px solid var(--wg-border-color);border-radius:var(--wg-border-radius-md);box-shadow:var(--wg-dialog-shadow);min-width:200px;max-width:var(--wg-tooltip-max-width);z-index:100}.wg__shortcuts-help--left .wg__shortcuts-help-overlay{right:auto;left:0}.wg__shortcuts-help:hover .wg__shortcuts-help-overlay,.wg__shortcuts-help:focus-within .wg__shortcuts-help-overlay{display:block}.wg__shortcuts-help-title{font-weight:var(--wg-font-weight-semibold);font-size:var(--wg-font-size-base);color:var(--wg-text-color-1);margin-bottom:var(--wg-spacing-sm);padding-bottom:var(--wg-spacing-xs);border-bottom:1px solid var(--wg-border-color)}.wg__shortcuts-help-custom{margin-bottom:var(--wg-spacing-sm);padding-bottom:var(--wg-spacing-sm);border-bottom:1px solid var(--wg-border-color);font-size:var(--wg-font-size-sm);color:var(--wg-text-color-2)}.wg__shortcuts-help-list{display:flex;flex-direction:column;gap:var(--wg-spacing-xs)}.wg__shortcuts-help-item{display:flex;align-items:center;gap:var(--wg-spacing-md)}.wg__shortcuts-help-key{display:inline-flex;align-items:center;justify-content:center;min-width:28px;padding:2px calc(.6 * var(--wg-rem));font-family:var(--wg-font-family-mono);font-size:var(--wg-font-size-xs);font-weight:var(--wg-font-weight-semibold);color:var(--wg-text-color-1);background:var(--wg-surface-2);border:1px solid var(--wg-border-color);border-radius:var(--wg-border-radius-sm)}.wg__shortcuts-help-label{flex:1;font-size:var(--wg-font-size-sm);color:var(--wg-text-color-2)}.wg--striped tbody tr:nth-child(2n){background:var(--wg-row-bg-even)}.wg--hoverable tbody tr:hover{background:var(--wg-row-bg-hover)}.wg__empty{text-align:center;padding:var(--wg-empty-padding);color:var(--wg-empty-color);font-style:italic}.wg__loading-more{text-align:center;padding:var(--wg-cell-padding);color:var(--wg-text-color-2);font-size:var(--wg-font-size-sm)}.wg__tooltip{position:absolute;z-index:var(--wg-z-tooltip);max-width:var(--wg-tooltip-max-width);padding:var(--wg-tooltip-padding);background:var(--wg-tooltip-bg);color:var(--wg-tooltip-color);font-size:var(--wg-font-size-sm);line-height:1.4;border-radius:var(--wg-border-radius-sm);box-shadow:var(--wg-tooltip-shadow);pointer-events:none;opacity:0;transition:opacity var(--wg-transition-fast)}.wg__tooltip--visible{opacity:1}.wg__tooltip-arrow{position:absolute;width:var(--wg-tooltip-arrow-size);height:var(--wg-tooltip-arrow-size);background:var(--wg-tooltip-bg);transform:rotate(45deg)}.wg__tooltip[data-placement^=top] .wg__tooltip-arrow{bottom:calc(-.5 * var(--wg-tooltip-arrow-size))}.wg__tooltip[data-placement^=bottom] .wg__tooltip-arrow{top:calc(-.5 * var(--wg-tooltip-arrow-size))}.wg__tooltip[data-placement^=left] .wg__tooltip-arrow{right:calc(-.5 * var(--wg-tooltip-arrow-size))}.wg__tooltip[data-placement^=right] .wg__tooltip-arrow{left:calc(-.5 * var(--wg-tooltip-arrow-size))}.wg__tooltip-title{font-weight:600}.wg__tooltip-desc{opacity:.85;margin-top:2px}.wg__tooltip-shortcut{margin-top:4px;opacity:.7;font-size:.9em}.wg__goto-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--wg-overlay-bg);display:flex;align-items:center;justify-content:center;z-index:1000}.wg__goto-dialog{background:var(--wg-surface-1);border-radius:var(--wg-border-radius-md);padding:var(--wg-spacing-lg);box-shadow:var(--wg-dialog-shadow);min-width:250px}.wg__goto-label{display:block;margin-bottom:var(--wg-spacing-sm);font-size:var(--wg-font-size-base);color:var(--wg-text-color-1)}.wg__goto-input{width:100%;padding:var(--wg-spacing-sm) var(--wg-spacing-md);border:1px solid var(--wg-border-color);border-radius:var(--wg-border-radius-sm);font-family:inherit;font-size:var(--wg-font-size-base);margin-bottom:var(--wg-spacing-md);box-sizing:border-box}.wg__goto-input:focus{outline:none;border-color:var(--wg-accent-color);box-shadow:0 0 0 2px color-mix(in srgb,var(--wg-accent-color) 20%,transparent)}.wg__goto-buttons{display:flex;gap:var(--wg-spacing-sm);justify-content:flex-end}.wg__goto-btn{padding:var(--wg-spacing-sm) var(--wg-spacing-md);border:1px solid var(--wg-border-color);border-radius:var(--wg-border-radius-sm);font-family:inherit;font-size:var(--wg-font-size-sm);cursor:pointer;background:var(--wg-surface-1);color:var(--wg-text-color-1)}.wg__goto-btn:hover{background:var(--wg-surface-2)}.wg__goto-btn--go{background:var(--wg-accent-color);border-color:var(--wg-accent-color);color:var(--wg-text-on-accent)}.wg__goto-btn--go:hover{background:var(--wg-accent-color-hover)}.wg__spacer-top td,.wg__spacer-bottom td{padding:0;border:none;background:transparent;height:inherit;line-height:0}@media (prefers-color-scheme: dark){:host{--wg-surface-1: #1f1f1f;--wg-surface-2: #2b2b2b;--wg-surface-3: #333333;--wg-surface-floating: #2b2b2b;--wg-text-color-1: #e0e0e0;--wg-text-color-2: #c0c0c0;--wg-text-color-3: #a0a0a0;--wg-border-color: #3d3d3d;--wg-border-color-hover: #5a5a5a;--wg-input-bg: #1f1f1f;--wg-input-border: 1px solid #5a5a5a;--wg-hover-bg: #3a3a3a;--wg-active-bg: #4a4a4a;--wg-danger-bg-light: #442726;--wg-danger-color: #f87c86;--wg-dirty-indicator-color: #ffa940;--wg-dirty-cell-bg: rgba(255, 169, 64, .12);--wg-dirty-row-number-border-color: #ffa940}}:host([data-theme="dark"]),:host-context([data-theme="dark"]),:host([data-bs-theme="dark"]),:host-context([data-bs-theme="dark"]),:host-context(.dark){--wg-surface-1: #1f1f1f;--wg-surface-2: #2b2b2b;--wg-surface-3: #333333;--wg-surface-floating: #2b2b2b;--wg-text-color-1: #e0e0e0;--wg-text-color-2: #c0c0c0;--wg-text-color-3: #a0a0a0;--wg-border-color: #3d3d3d;--wg-border-color-hover: #5a5a5a;--wg-input-bg: #1f1f1f;--wg-input-border: 1px solid #5a5a5a;--wg-hover-bg: #3a3a3a;--wg-active-bg: #4a4a4a;--wg-danger-bg-light: #442726;--wg-danger-color: #f87c86;--wg-dirty-indicator-color: #ffa940;--wg-dirty-row-number-border-color: #ffa940}:host([data-theme="light"]),:host-context([data-theme="light"]),:host([data-bs-theme="light"]),:host-context([data-bs-theme="light"]),:host-context(.light){--wg-surface-1: var(--base-main-bg, #ffffff);--wg-surface-2: var(--base-elevated-bg, #f5f5f5);--wg-surface-3: var(--base-hover-bg, #ebebeb);--wg-surface-floating: var(--base-dropdown-bg, var(--base-main-bg, #ffffff));--wg-text-color-1: var(--base-text-color-1, #242424);--wg-text-color-2: var(--base-text-color-2, #424242);--wg-text-color-3: var(--base-text-color-3, #707070);--wg-border-color: var(--base-border-color, #e0e0e0);--wg-border-color-hover: var(--base-border-color, #d1d1d1);--wg-input-bg: var(--base-input-bg, #ffffff);--wg-input-border: var(--base-input-border, 1px solid #d1d1d1);--wg-hover-bg: var(--base-hover-bg, #f0f0f0);--wg-active-bg: var(--base-hover-bg, #e0e0e0);--wg-danger-bg-light: var(--base-danger-bg-light, #fde7e9);--wg-danger-color: var(--base-danger-color, #d13438)}';
|
|
4274
4298
|
function wt(e, t, o) {
|
|
4275
4299
|
const i = o.valueMember || "value", r = t.find((s) => s[i] === e);
|
|
4276
4300
|
return r ? Ne(r, o) : e != null ? String(e) : "";
|
|
@@ -4444,7 +4468,7 @@ function yi(e, t, o, i = !1) {
|
|
|
4444
4468
|
return c + u;
|
|
4445
4469
|
}).join("")}</div>`).join("")}</div>`;
|
|
4446
4470
|
}
|
|
4447
|
-
let
|
|
4471
|
+
let q = null;
|
|
4448
4472
|
function Qn(e, t, o, i, r, s, n) {
|
|
4449
4473
|
Et();
|
|
4450
4474
|
const l = e.grid.toolbarVerticalAlign !== "top", a = yi(i, r, o, l), d = document.createElement("div");
|
|
@@ -4466,46 +4490,46 @@ function Qn(e, t, o, i, r, s, n) {
|
|
|
4466
4490
|
const S = e.grid.toolbarColumn;
|
|
4467
4491
|
if (w === "top") {
|
|
4468
4492
|
if (S !== void 0) {
|
|
4469
|
-
const
|
|
4493
|
+
const k = f.querySelectorAll(".wg__cell:not(.wg__row-number):not(.wg__inline-actions-cell)");
|
|
4470
4494
|
let I = null;
|
|
4471
4495
|
if (typeof S == "number")
|
|
4472
|
-
I =
|
|
4496
|
+
I = k[S] || null;
|
|
4473
4497
|
else
|
|
4474
|
-
for (let
|
|
4475
|
-
const E = R
|
|
4498
|
+
for (let R = 0; R < k.length; R++) {
|
|
4499
|
+
const E = k[R];
|
|
4476
4500
|
if (E.dataset.field === S) {
|
|
4477
4501
|
I = E;
|
|
4478
4502
|
break;
|
|
4479
4503
|
}
|
|
4480
4504
|
}
|
|
4481
4505
|
if (I) {
|
|
4482
|
-
const
|
|
4506
|
+
const R = I.getBoundingClientRect();
|
|
4483
4507
|
_ = {
|
|
4484
4508
|
getBoundingClientRect: () => ({
|
|
4485
|
-
x:
|
|
4486
|
-
y:
|
|
4487
|
-
top:
|
|
4488
|
-
left:
|
|
4489
|
-
bottom:
|
|
4490
|
-
right:
|
|
4509
|
+
x: R.left + R.width / 2,
|
|
4510
|
+
y: R.top,
|
|
4511
|
+
top: R.top,
|
|
4512
|
+
left: R.left + R.width / 2,
|
|
4513
|
+
bottom: R.bottom,
|
|
4514
|
+
right: R.left + R.width / 2,
|
|
4491
4515
|
width: 0,
|
|
4492
|
-
height:
|
|
4516
|
+
height: R.height,
|
|
4493
4517
|
toJSON: () => ({})
|
|
4494
4518
|
})
|
|
4495
4519
|
};
|
|
4496
4520
|
}
|
|
4497
4521
|
} else if (m === "cursor" && n !== void 0) {
|
|
4498
|
-
const
|
|
4522
|
+
const k = f.getBoundingClientRect();
|
|
4499
4523
|
_ = {
|
|
4500
4524
|
getBoundingClientRect: () => ({
|
|
4501
4525
|
x: n,
|
|
4502
|
-
y:
|
|
4503
|
-
top:
|
|
4526
|
+
y: k.top,
|
|
4527
|
+
top: k.top,
|
|
4504
4528
|
left: n,
|
|
4505
|
-
bottom:
|
|
4529
|
+
bottom: k.bottom,
|
|
4506
4530
|
right: n,
|
|
4507
4531
|
width: 0,
|
|
4508
|
-
height:
|
|
4532
|
+
height: k.height,
|
|
4509
4533
|
toJSON: () => ({})
|
|
4510
4534
|
})
|
|
4511
4535
|
};
|
|
@@ -4519,12 +4543,12 @@ function Qn(e, t, o, i, r, s, n) {
|
|
|
4519
4543
|
Pt({ padding: 8 })
|
|
4520
4544
|
// Keep within viewport
|
|
4521
4545
|
]
|
|
4522
|
-
}).then(({ x:
|
|
4523
|
-
let E =
|
|
4524
|
-
if ((e.grid.toolbarFollowsCursor || e.grid.cellToolbar) &&
|
|
4546
|
+
}).then(({ x: k, y: I, placement: R }) => {
|
|
4547
|
+
let E = k;
|
|
4548
|
+
if ((e.grid.toolbarFollowsCursor || e.grid.cellToolbar) && R.startsWith("top") && n !== void 0 && e.grid.toolbarColumn === void 0) {
|
|
4525
4549
|
const M = f.querySelectorAll(".wg__cell:not(.wg__row-number):not(.wg__inline-actions-cell)");
|
|
4526
|
-
for (const
|
|
4527
|
-
const D =
|
|
4550
|
+
for (const L of M) {
|
|
4551
|
+
const D = L.getBoundingClientRect();
|
|
4528
4552
|
if (n >= D.left && n <= D.right) {
|
|
4529
4553
|
E = so(D, e.grid.cellToolbarOffset);
|
|
4530
4554
|
break;
|
|
@@ -4535,7 +4559,7 @@ function Qn(e, t, o, i, r, s, n) {
|
|
|
4535
4559
|
left: `${E}px`,
|
|
4536
4560
|
top: `${I}px`,
|
|
4537
4561
|
visibility: "visible"
|
|
4538
|
-
}), g =
|
|
4562
|
+
}), g = R.split("-")[0], q && (q.position = g);
|
|
4539
4563
|
}).catch(() => {
|
|
4540
4564
|
c.style.visibility = "visible";
|
|
4541
4565
|
});
|
|
@@ -4547,7 +4571,7 @@ function Qn(e, t, o, i, r, s, n) {
|
|
|
4547
4571
|
m && s(m, f, w);
|
|
4548
4572
|
}
|
|
4549
4573
|
};
|
|
4550
|
-
d.addEventListener("click", h),
|
|
4574
|
+
d.addEventListener("click", h), q = {
|
|
4551
4575
|
container: d,
|
|
4552
4576
|
toolbar: c,
|
|
4553
4577
|
rowIndex: o,
|
|
@@ -4561,38 +4585,38 @@ function Qn(e, t, o, i, r, s, n) {
|
|
|
4561
4585
|
}, Z = { path: null, arrowPos: null, arrowDir: "right" };
|
|
4562
4586
|
}
|
|
4563
4587
|
function Et() {
|
|
4564
|
-
|
|
4588
|
+
q && (q.cleanup(), q = null), Z = { path: null, arrowPos: null, arrowDir: "right" };
|
|
4565
4589
|
}
|
|
4566
|
-
function
|
|
4567
|
-
return (
|
|
4590
|
+
function Ve() {
|
|
4591
|
+
return (q == null ? void 0 : q.rowIndex) ?? null;
|
|
4568
4592
|
}
|
|
4569
|
-
function
|
|
4570
|
-
return (
|
|
4593
|
+
function Vo(e) {
|
|
4594
|
+
return (q == null ? void 0 : q.container.getRootNode()) === e;
|
|
4571
4595
|
}
|
|
4572
4596
|
function Nt(e) {
|
|
4573
|
-
return (
|
|
4597
|
+
return (q == null ? void 0 : q.rowIndex) === e;
|
|
4574
4598
|
}
|
|
4575
4599
|
function Jn() {
|
|
4576
4600
|
return Z;
|
|
4577
4601
|
}
|
|
4578
4602
|
function Zn() {
|
|
4579
|
-
return
|
|
4603
|
+
return q ? { toolbar: q.toolbar, container: q.container } : null;
|
|
4580
4604
|
}
|
|
4581
4605
|
function Bt(e, t, o = "center") {
|
|
4582
|
-
if (!
|
|
4606
|
+
if (!q || q.position !== "top")
|
|
4583
4607
|
return;
|
|
4584
|
-
const i =
|
|
4608
|
+
const i = q.toolbar, r = i.getBoundingClientRect();
|
|
4585
4609
|
let s;
|
|
4586
4610
|
o === "start" ? s = e : s = e - r.width / 2;
|
|
4587
4611
|
const n = 8, l = window.innerWidth - r.width - 8;
|
|
4588
|
-
s = Math.max(n, Math.min(l, s)), i.style.left = `${s}px`,
|
|
4612
|
+
s = Math.max(n, Math.min(l, s)), i.style.left = `${s}px`, q.cursorX = e;
|
|
4589
4613
|
}
|
|
4590
|
-
function
|
|
4591
|
-
if (!
|
|
4614
|
+
function qo(e, t) {
|
|
4615
|
+
if (!q) {
|
|
4592
4616
|
Z = { path: null, arrowPos: null, arrowDir: "right" };
|
|
4593
4617
|
return;
|
|
4594
4618
|
}
|
|
4595
|
-
const { toolbar: o, rowItem: i, position: r } =
|
|
4619
|
+
const { toolbar: o, rowItem: i, position: r } = q, s = t.findIndex((C) => C === i);
|
|
4596
4620
|
if (s === -1) {
|
|
4597
4621
|
Z = { path: null, arrowPos: null, arrowDir: "right" };
|
|
4598
4622
|
return;
|
|
@@ -4602,7 +4626,7 @@ function Vo(e, t) {
|
|
|
4602
4626
|
Z = { path: null, arrowPos: null, arrowDir: "right" };
|
|
4603
4627
|
return;
|
|
4604
4628
|
}
|
|
4605
|
-
if (s ===
|
|
4629
|
+
if (s === q.rowIndex || (q.hasRowMoved = !0), !q.hasRowMoved) {
|
|
4606
4630
|
Z = { path: null, arrowPos: null, arrowDir: "right" };
|
|
4607
4631
|
return;
|
|
4608
4632
|
}
|
|
@@ -4619,8 +4643,8 @@ function Vo(e, t) {
|
|
|
4619
4643
|
Z = { path: `M ${C} ${_} H ${S} V ${v}`, arrowPos: { x: S, y: v }, arrowDir: x };
|
|
4620
4644
|
return;
|
|
4621
4645
|
}
|
|
4622
|
-
const
|
|
4623
|
-
x = f ? "left" : "right", Z = { path: `M ${C} ${_} H ${S} V ${v} H ${
|
|
4646
|
+
const k = f ? h.right - 8 : h.left + 8;
|
|
4647
|
+
x = f ? "left" : "right", Z = { path: `M ${C} ${_} H ${S} V ${v} H ${k}`, arrowPos: { x: k, y: v }, arrowDir: x };
|
|
4624
4648
|
return;
|
|
4625
4649
|
} else if (r === "right") {
|
|
4626
4650
|
const C = a.left, _ = a.top + a.height / 2, S = f ? h.left - 15 : h.right + 15;
|
|
@@ -4628,26 +4652,26 @@ function Vo(e, t) {
|
|
|
4628
4652
|
Z = { path: `M ${C} ${_} H ${S} V ${v}`, arrowPos: { x: S, y: v }, arrowDir: x };
|
|
4629
4653
|
return;
|
|
4630
4654
|
}
|
|
4631
|
-
const
|
|
4632
|
-
x = f ? "right" : "left", Z = { path: `M ${C} ${_} H ${S} V ${v} H ${
|
|
4655
|
+
const k = f ? h.left + 8 : h.right - 8;
|
|
4656
|
+
x = f ? "right" : "left", Z = { path: `M ${C} ${_} H ${S} V ${v} H ${k}`, arrowPos: { x: k, y: v }, arrowDir: x };
|
|
4633
4657
|
return;
|
|
4634
4658
|
} else {
|
|
4635
|
-
const _ = a.right, S = a.top + a.height / 2,
|
|
4659
|
+
const _ = a.right, S = a.top + a.height / 2, k = _ + 48, I = s - q.rowIndex, R = 8;
|
|
4636
4660
|
if (I === 0) {
|
|
4637
|
-
let E = d.top -
|
|
4638
|
-
m && (E = h.bottom -
|
|
4661
|
+
let E = d.top - R;
|
|
4662
|
+
m && (E = h.bottom - R), Z = { path: `M ${_} ${S} H ${k} V ${E}`, arrowPos: { x: k, y: E }, arrowDir: "down" };
|
|
4639
4663
|
return;
|
|
4640
4664
|
} else if (I === -1) {
|
|
4641
|
-
const M = a.top + a.height * 0.25,
|
|
4642
|
-
Z = { path: `M ${a.right} ${M} H ${D} V ${
|
|
4665
|
+
const M = a.top + a.height * 0.25, L = a.top + a.height * 0.75, D = a.right + 24, P = a.right + R;
|
|
4666
|
+
Z = { path: `M ${a.right} ${M} H ${D} V ${L} H ${P}`, arrowPos: { x: P, y: L }, arrowDir: "left" };
|
|
4643
4667
|
return;
|
|
4644
4668
|
} else if (I < 0) {
|
|
4645
|
-
let E = d.bottom +
|
|
4646
|
-
p && (E = h.top +
|
|
4669
|
+
let E = d.bottom + R;
|
|
4670
|
+
p && (E = h.top + R), Z = { path: `M ${_} ${S} H ${k} V ${E}`, arrowPos: { x: k, y: E }, arrowDir: "up" };
|
|
4647
4671
|
return;
|
|
4648
4672
|
} else {
|
|
4649
|
-
let E = d.top -
|
|
4650
|
-
m && (E = h.bottom -
|
|
4673
|
+
let E = d.top - R;
|
|
4674
|
+
m && (E = h.bottom - R), Z = { path: `M ${_} ${S} H ${k} V ${E}`, arrowPos: { x: k, y: E }, arrowDir: "down" };
|
|
4651
4675
|
return;
|
|
4652
4676
|
}
|
|
4653
4677
|
}
|
|
@@ -4704,36 +4728,36 @@ function ts(e) {
|
|
|
4704
4728
|
const l = e.grid.isRowToolbarVisible && e.grid.toolbarTrigger === "button" && e.grid.toolbarPosition !== "inline" ? '<th class="wg__header wg__actions-column"></th>' : "", a = t.map(({ column: d, originalIndex: c }, u) => {
|
|
4705
4729
|
const g = String(d.field), h = d.isSortable !== !1 && e.grid.sortMode !== "none", f = e.grid.getColumnSortState(g), w = e.grid.getColumnSortPriority(g), p = f !== void 0, m = e.grid.isColumnFrozen(u), y = m && u === e.grid.totalFrozenColumns - 1, v = e.grid.isColumnSelected(u), x = ["wg__header"];
|
|
4706
4730
|
h && x.push("wg__header--sortable"), p && x.push("wg__header--sorted"), m && x.push("wg__header--frozen"), y && x.push("wg__header--frozen-last"), v && x.push("wg__header--selected");
|
|
4707
|
-
const _ = e.grid.getColumnWidth(g) || d.width || d.maxWidth, S = yo(_),
|
|
4731
|
+
const _ = e.grid.getColumnWidth(g) || d.width || d.maxWidth, S = yo(_), k = d.minWidth, I = d.headerHorizontalAlign || d.horizontalAlign || "left", R = d.headerVerticalAlign || d.verticalAlign || "middle", M = `style="${[
|
|
4708
4732
|
m ? "position: sticky" : "",
|
|
4709
4733
|
m ? `left: ${o}px` : "",
|
|
4710
4734
|
m ? "z-index: 2" : "",
|
|
4711
4735
|
_ ? `width: ${_}` : "",
|
|
4712
4736
|
_ ? `max-width: ${_}` : "",
|
|
4713
|
-
|
|
4737
|
+
k ? `min-width: ${k}` : "",
|
|
4714
4738
|
`text-align: ${I}`,
|
|
4715
|
-
`vertical-align: ${
|
|
4739
|
+
`vertical-align: ${R}`
|
|
4716
4740
|
].filter(Boolean).join("; ")}"`;
|
|
4717
4741
|
m && (o += S);
|
|
4718
|
-
let
|
|
4742
|
+
let L = "";
|
|
4719
4743
|
if (h)
|
|
4720
4744
|
if (p) {
|
|
4721
|
-
const T = f.direction === "asc" ? "▲" : "▼",
|
|
4722
|
-
|
|
4745
|
+
const T = f.direction === "asc" ? "▲" : "▼", $ = e.grid.sort.length > 1 ? `<sup class="wg__sort-priority">${w}</sup>` : "";
|
|
4746
|
+
L = `<span class="wg__sort-indicator">${T}${$}</span>`;
|
|
4723
4747
|
} else
|
|
4724
|
-
|
|
4748
|
+
L = '<span class="wg__sort-indicator wg__sort-placeholder">⬍</span>';
|
|
4725
4749
|
let D = "";
|
|
4726
4750
|
d.headerInfo && (D = `<span class="wg__header-info" data-tooltip="${e.escapeHtml(d.headerInfo)}"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg></span>`);
|
|
4727
4751
|
const U = `<div class="wg__resize-handle${d.isResizable !== !1 ? "" : " wg__resize-handle--disabled"}" data-field="${g}"></div>`;
|
|
4728
4752
|
return `
|
|
4729
4753
|
<th class="${x.join(" ")}" ${M} data-field="${g}">
|
|
4730
4754
|
<div class="wg__header-container">
|
|
4731
|
-
<div class="wg__header-content wg__header-content--align-${I} wg__header-content--valign-${
|
|
4755
|
+
<div class="wg__header-content wg__header-content--align-${I} wg__header-content--valign-${R}">
|
|
4732
4756
|
<span class="wg__header-title">${e.escapeHtml(d.title)}</span>
|
|
4733
4757
|
${D}
|
|
4734
4758
|
</div>
|
|
4735
4759
|
<div class="wg__header-controls">
|
|
4736
|
-
${
|
|
4760
|
+
${L}
|
|
4737
4761
|
</div>
|
|
4738
4762
|
</div>
|
|
4739
4763
|
${U}
|
|
@@ -4752,7 +4776,7 @@ function os(e) {
|
|
|
4752
4776
|
</td>
|
|
4753
4777
|
</tr>
|
|
4754
4778
|
`;
|
|
4755
|
-
const a =
|
|
4779
|
+
const a = Ve(), d = o.map(
|
|
4756
4780
|
({ column: c }) => yo(c.width || c.maxWidth)
|
|
4757
4781
|
);
|
|
4758
4782
|
return t.map((c, u) => {
|
|
@@ -4761,9 +4785,9 @@ function os(e) {
|
|
|
4761
4785
|
if (i) {
|
|
4762
4786
|
const _ = r ? "position: sticky; left: 0; z-index: 2;" : "", S = r ? " wg__cell--frozen" : "";
|
|
4763
4787
|
if (h) {
|
|
4764
|
-
const
|
|
4765
|
-
p = `<td class="wg__cell wg__row-number wg__row-number--locked${S}" style="${_}" data-tooltip="${e.escapeHtml(
|
|
4766
|
-
} else f ? p = `<td class="wg__cell wg__row-number wg__empty-row-indicator${S}" style="${_}" data-row-number="${u}">${e.grid.newRowIndicator}</td>` : p = `<td class="wg__cell wg__row-number${S}" style="${_}" data-row-number="${u}">${u + 1}</td>`;
|
|
4788
|
+
const k = g != null && g.lockedBy ? `Locked by ${g.lockedBy}` : "This row is locked";
|
|
4789
|
+
p = `<td class="wg__cell wg__row-number wg__row-number--locked${S}" style="${_}" data-tooltip="${e.escapeHtml(k)}" data-row-number="${u}">🔒</td>`;
|
|
4790
|
+
} else f ? p = `<td class="wg__cell wg__row-number wg__empty-row-indicator${S}" style="${_}" data-row-number="${u}">${e.grid.newRowIndicator}</td>` : p = `<td class="wg__cell wg__row-number${e.grid.isDirtyIndicatorVisible && e.grid.isRowDirty(u) ? " wg__row-number--dirty" : ""}${S}" style="${_}" data-row-number="${u}">${u + 1}</td>`;
|
|
4767
4791
|
w += vo;
|
|
4768
4792
|
}
|
|
4769
4793
|
const m = s ? Si(e, c, u) : "";
|
|
@@ -4773,11 +4797,11 @@ function os(e) {
|
|
|
4773
4797
|
${Ci(u, a === u, e.grid.labels.rowActions)}
|
|
4774
4798
|
</td>
|
|
4775
4799
|
`);
|
|
4776
|
-
const v = o.map(({ column: _, originalIndex: S },
|
|
4777
|
-
const I = String(_.field),
|
|
4778
|
-
if (
|
|
4800
|
+
const v = o.map(({ column: _, originalIndex: S }, k) => {
|
|
4801
|
+
const I = String(_.field), R = e.grid.getCellValue(c, _, u), E = _.horizontalAlign || "left", M = _.verticalAlign || "middle", L = e.grid.canEditCell(u, I), D = e.grid.isCellFocused(u, S), P = e.grid.isColumnFrozen(k), U = P && k === e.grid.totalFrozenColumns - 1, T = _.editTrigger ?? e.grid.editTrigger, $ = ["wg__cell"], W = e.grid.shouldShowEditor(u, S), B = e.grid.isEditing(u, I);
|
|
4802
|
+
if (L && $.push("wg__cell--editable"), D && !B && $.push("wg__cell--focused"), D && T === "always" && $.push("wg__cell--always-edit-focused"), _.textOverflow !== "wrap" && $.push("wg__cell--ellipsis"), _.maxLines && $.push("wg__cell--line-clamp"), B && $.push("wg__cell--editing"), e.grid.isCellInvalid(u, I) && $.push("wg__cell--invalid"), e.grid.isDirtyIndicatorVisible && e.grid.isCellDirty(u, I) && $.push("wg__cell--dirty"), e.grid.isCellInSelectedRange(u, k) && $.push("wg__cell--in-range"), e.grid.isColumnSelected(k) && $.push("wg__cell--column-selected"), P && $.push("wg__cell--frozen"), U && $.push("wg__cell--frozen-last"), _.cellClass && $.push(_.cellClass), _.cellClassCallback) {
|
|
4779
4803
|
const te = e.grid.getCellRawValue(c, u, I), de = _.cellClassCallback(te, c);
|
|
4780
|
-
de &&
|
|
4804
|
+
de && $.push(de);
|
|
4781
4805
|
}
|
|
4782
4806
|
const Ce = e.grid.getColumnWidth(I) || _.width, J = _.minWidth, De = [
|
|
4783
4807
|
P ? "position: sticky" : "",
|
|
@@ -4789,7 +4813,7 @@ function os(e) {
|
|
|
4789
4813
|
J ? `min-width: ${J}` : "",
|
|
4790
4814
|
_.maxWidth ? `max-width: ${_.maxWidth}` : ""
|
|
4791
4815
|
].filter(Boolean).join("; ");
|
|
4792
|
-
P && (w += d[
|
|
4816
|
+
P && (w += d[k]);
|
|
4793
4817
|
const Se = e.grid.isNavigateMode ? 'tabindex="0"' : "";
|
|
4794
4818
|
let ee = "";
|
|
4795
4819
|
if (_.tooltipCallback) {
|
|
@@ -4804,10 +4828,10 @@ function os(e) {
|
|
|
4804
4828
|
if (te) {
|
|
4805
4829
|
const de = _.validationTooltipCallback || e.grid.validationTooltipCallback;
|
|
4806
4830
|
if (de) {
|
|
4807
|
-
const
|
|
4831
|
+
const G = e.grid.getCellRawValue(c, u, I), pt = de({
|
|
4808
4832
|
field: I,
|
|
4809
4833
|
error: te,
|
|
4810
|
-
value:
|
|
4834
|
+
value: G,
|
|
4811
4835
|
row: c,
|
|
4812
4836
|
rowIndex: u
|
|
4813
4837
|
});
|
|
@@ -4818,7 +4842,7 @@ function os(e) {
|
|
|
4818
4842
|
}
|
|
4819
4843
|
return `
|
|
4820
4844
|
<td
|
|
4821
|
-
class="${
|
|
4845
|
+
class="${$.join(" ")}"
|
|
4822
4846
|
style="${De}"
|
|
4823
4847
|
data-row="${u}"
|
|
4824
4848
|
data-col="${S}"
|
|
@@ -4826,7 +4850,7 @@ function os(e) {
|
|
|
4826
4850
|
${Se}
|
|
4827
4851
|
${ee}
|
|
4828
4852
|
>
|
|
4829
|
-
${W ? Ft(e, u, S, _) : _o(e, u, S, _,
|
|
4853
|
+
${W ? Ft(e, u, S, _) : _o(e, u, S, _, R, D, L)}
|
|
4830
4854
|
</td>
|
|
4831
4855
|
`;
|
|
4832
4856
|
}).join(""), x = ["wg__row"];
|
|
@@ -4863,36 +4887,36 @@ function No(e, t) {
|
|
|
4863
4887
|
</td>
|
|
4864
4888
|
</tr>
|
|
4865
4889
|
`;
|
|
4866
|
-
const h =
|
|
4890
|
+
const h = Ve(), f = i.map(
|
|
4867
4891
|
({ column: x }) => yo(x.width || x.maxWidth)
|
|
4868
4892
|
), w = r * n, p = (l - s) * n, m = w > 0 ? `<tr class="wg__spacer-top"><td colspan="${g}" style="height: ${w}px"></td></tr>` : "", y = [];
|
|
4869
4893
|
for (let x = r; x < s && x < o.length; x++) {
|
|
4870
|
-
const C = o[x], _ = x, S = e.grid.getRowLockInfo(C),
|
|
4871
|
-
let
|
|
4894
|
+
const C = o[x], _ = x, S = e.grid.getRowLockInfo(C), k = (S == null ? void 0 : S.isLocked) === !0, I = e.grid.isEmptyRowIndex(_);
|
|
4895
|
+
let R = 0, E = "";
|
|
4872
4896
|
if (a) {
|
|
4873
|
-
const T = d ? "position: sticky; left: 0; z-index: 2;" : "",
|
|
4874
|
-
if (
|
|
4897
|
+
const T = d ? "position: sticky; left: 0; z-index: 2;" : "", $ = d ? " wg__cell--frozen" : "";
|
|
4898
|
+
if (k) {
|
|
4875
4899
|
const W = S != null && S.lockedBy ? `Locked by ${S.lockedBy}` : "This row is locked";
|
|
4876
|
-
E = `<td class="wg__cell wg__row-number wg__row-number--locked${
|
|
4877
|
-
} else I ? E = `<td class="wg__cell wg__row-number wg__empty-row-indicator${
|
|
4878
|
-
|
|
4900
|
+
E = `<td class="wg__cell wg__row-number wg__row-number--locked${$}" style="${T}" data-tooltip="${e.escapeHtml(W)}" data-row-number="${_}">🔒</td>`;
|
|
4901
|
+
} else I ? E = `<td class="wg__cell wg__row-number wg__empty-row-indicator${$}" style="${T}" data-row-number="${_}">${e.grid.newRowIndicator}</td>` : E = `<td class="wg__cell wg__row-number${e.grid.isDirtyIndicatorVisible && e.grid.isRowDirty(_) ? " wg__row-number--dirty" : ""}${$}" style="${T}" data-row-number="${_}">${_ + 1}</td>`;
|
|
4902
|
+
R += vo;
|
|
4879
4903
|
}
|
|
4880
4904
|
const M = c ? Si(e, C, _) : "";
|
|
4881
|
-
let
|
|
4882
|
-
u && (
|
|
4905
|
+
let L = "";
|
|
4906
|
+
u && (L = `
|
|
4883
4907
|
<td class="wg__cell wg__actions-column">
|
|
4884
4908
|
${Ci(_, h === _, e.grid.labels.rowActions)}
|
|
4885
4909
|
</td>
|
|
4886
4910
|
`);
|
|
4887
|
-
const D = i.map(({ column: T, originalIndex:
|
|
4888
|
-
const B = String(T.field), K = e.grid.getCellValue(C, T, _), Ce = T.horizontalAlign || "left", J = T.verticalAlign || "middle", De = e.grid.canEditCell(_, B), Se = e.grid.isCellFocused(_,
|
|
4889
|
-
if (De &&
|
|
4911
|
+
const D = i.map(({ column: T, originalIndex: $ }, W) => {
|
|
4912
|
+
const B = String(T.field), K = e.grid.getCellValue(C, T, _), Ce = T.horizontalAlign || "left", J = T.verticalAlign || "middle", De = e.grid.canEditCell(_, B), Se = e.grid.isCellFocused(_, $), ee = e.grid.isColumnFrozen(W), te = ee && W === e.grid.totalFrozenColumns - 1, de = T.editTrigger ?? e.grid.editTrigger, G = ["wg__cell"], pt = e.grid.shouldShowEditor(_, $), So = e.grid.isEditing(_, B);
|
|
4913
|
+
if (De && G.push("wg__cell--editable"), Se && !So && G.push("wg__cell--focused"), Se && de === "always" && G.push("wg__cell--always-edit-focused"), T.textOverflow !== "wrap" && G.push("wg__cell--ellipsis"), T.maxLines && G.push("wg__cell--line-clamp"), So && G.push("wg__cell--editing"), e.grid.isCellInvalid(_, B) && G.push("wg__cell--invalid"), e.grid.isDirtyIndicatorVisible && e.grid.isCellDirty(_, B) && G.push("wg__cell--dirty"), e.grid.isCellInSelectedRange(_, W) && G.push("wg__cell--in-range"), e.grid.isColumnSelected(W) && G.push("wg__cell--column-selected"), ee && G.push("wg__cell--frozen"), te && G.push("wg__cell--frozen-last"), T.cellClass && G.push(T.cellClass), T.cellClassCallback) {
|
|
4890
4914
|
const ce = e.grid.getCellRawValue(C, _, B), xe = T.cellClassCallback(ce, C);
|
|
4891
|
-
xe &&
|
|
4915
|
+
xe && G.push(xe);
|
|
4892
4916
|
}
|
|
4893
4917
|
const xo = e.grid.getColumnWidth(B) || T.width, ko = T.minWidth, or = [
|
|
4894
4918
|
ee ? "position: sticky" : "",
|
|
4895
|
-
ee ? `left: ${
|
|
4919
|
+
ee ? `left: ${R}px` : "",
|
|
4896
4920
|
ee ? "z-index: 1" : "",
|
|
4897
4921
|
`text-align: ${Ce}`,
|
|
4898
4922
|
`vertical-align: ${J}`,
|
|
@@ -4900,7 +4924,7 @@ function No(e, t) {
|
|
|
4900
4924
|
ko ? `min-width: ${ko}` : "",
|
|
4901
4925
|
T.maxWidth ? `max-width: ${T.maxWidth}` : ""
|
|
4902
4926
|
].filter(Boolean).join("; ");
|
|
4903
|
-
ee && (
|
|
4927
|
+
ee && (R += f[W]);
|
|
4904
4928
|
const ir = e.grid.isNavigateMode ? 'tabindex="0"' : "";
|
|
4905
4929
|
let He = "";
|
|
4906
4930
|
if (T.tooltipCallback) {
|
|
@@ -4929,24 +4953,24 @@ function No(e, t) {
|
|
|
4929
4953
|
}
|
|
4930
4954
|
return `
|
|
4931
4955
|
<td
|
|
4932
|
-
class="${
|
|
4956
|
+
class="${G.join(" ")}"
|
|
4933
4957
|
style="${or}"
|
|
4934
4958
|
data-row="${_}"
|
|
4935
|
-
data-col="${
|
|
4959
|
+
data-col="${$}"
|
|
4936
4960
|
data-field="${B}"
|
|
4937
4961
|
${ir}
|
|
4938
4962
|
${He}
|
|
4939
4963
|
>
|
|
4940
|
-
${pt ? Ft(e, _,
|
|
4964
|
+
${pt ? Ft(e, _, $, T) : _o(e, _, $, T, K, Se, De)}
|
|
4941
4965
|
</td>
|
|
4942
4966
|
`;
|
|
4943
4967
|
}).join(""), P = ["wg__row"];
|
|
4944
|
-
if (
|
|
4968
|
+
if (k && P.push("wg__row--locked"), I && P.push("wg__row--empty-row"), e.grid.isRowSelected(_) && P.push("wg__row--selected"), e.grid.isRowFocused(_) && P.push("wg__row--focused"), e.grid.rowClassCallback) {
|
|
4945
4969
|
const T = e.grid.rowClassCallback(C, _);
|
|
4946
4970
|
T && P.push(T);
|
|
4947
4971
|
}
|
|
4948
|
-
const U =
|
|
4949
|
-
y.push(`<tr class="${P.join(" ")}" data-row-index="${_}" ${U}>${E}${M}${
|
|
4972
|
+
const U = k && !a ? `data-tooltip="${e.escapeHtml(S != null && S.lockedBy ? `Locked by ${S.lockedBy}` : "This row is locked")}"` : "";
|
|
4973
|
+
y.push(`<tr class="${P.join(" ")}" data-row-index="${_}" ${U}>${E}${M}${L}${D}<td class="wg__cell wg__filler" data-row="${_}"></td></tr>`);
|
|
4950
4974
|
}
|
|
4951
4975
|
const v = p > 0 ? `<tr class="wg__spacer-bottom"><td colspan="${g}" style="height: ${p}px"></td></tr>` : "";
|
|
4952
4976
|
return m + y.join("") + v;
|
|
@@ -5072,7 +5096,7 @@ function is(e, t) {
|
|
|
5072
5096
|
}
|
|
5073
5097
|
let Wo = 0;
|
|
5074
5098
|
const rs = 100;
|
|
5075
|
-
function
|
|
5099
|
+
function Q(e, t, o) {
|
|
5076
5100
|
const i = t && o && t.rowIndex === o.rowIndex && t.colIndex === o.colIndex, r = Date.now();
|
|
5077
5101
|
if (i && r - Wo < rs)
|
|
5078
5102
|
return;
|
|
@@ -5116,11 +5140,11 @@ function ns(e, t, o) {
|
|
|
5116
5140
|
function ss(e, t, o) {
|
|
5117
5141
|
if (!e.grid.isNavigateMode) return;
|
|
5118
5142
|
const i = e.grid.focusedCell, r = { rowIndex: t, colIndex: o };
|
|
5119
|
-
(i == null ? void 0 : i.rowIndex) === t && (i == null ? void 0 : i.colIndex) === o || (e.grid.setFocusedCell(t, o),
|
|
5143
|
+
(i == null ? void 0 : i.rowIndex) === t && (i == null ? void 0 : i.colIndex) === o || (e.grid.setFocusedCell(t, o), Q(e, i, r));
|
|
5120
5144
|
}
|
|
5121
5145
|
function F(e, t, o) {
|
|
5122
5146
|
const i = e.grid.focusedCell, r = { rowIndex: t, colIndex: o };
|
|
5123
|
-
e.grid.setFocusedCell(t, o),
|
|
5147
|
+
e.grid.setFocusedCell(t, o), Q(e, i, r), ht(e, t, o);
|
|
5124
5148
|
}
|
|
5125
5149
|
function oe(e, t, o, i) {
|
|
5126
5150
|
const r = e.grid.columns[o];
|
|
@@ -5128,7 +5152,7 @@ function oe(e, t, o, i) {
|
|
|
5128
5152
|
const s = String(r.field);
|
|
5129
5153
|
if (!e.grid.canEditCell(t, s))
|
|
5130
5154
|
return;
|
|
5131
|
-
e.dropdownOpen &&
|
|
5155
|
+
e.dropdownOpen && V(e);
|
|
5132
5156
|
const n = e.grid.editingCell;
|
|
5133
5157
|
if (n) {
|
|
5134
5158
|
const l = e.grid.columns.findIndex((a) => String(a.field) === n.field);
|
|
@@ -5170,13 +5194,13 @@ function lt(e, t) {
|
|
|
5170
5194
|
return a;
|
|
5171
5195
|
}
|
|
5172
5196
|
function xi(e) {
|
|
5173
|
-
if (e.dropdownOpen &&
|
|
5197
|
+
if (e.dropdownOpen && V(e), e.grid.editingCell) {
|
|
5174
5198
|
const t = e.grid.editingCell, o = e.grid.columns.findIndex((i) => String(i.field) === t.field);
|
|
5175
5199
|
j(e), e.grid.cancelEdit(), o >= 0 && H(e, t.rowIndex, o);
|
|
5176
5200
|
}
|
|
5177
5201
|
if (e.grid.focusedCell) {
|
|
5178
5202
|
const t = e.grid.focusedCell;
|
|
5179
|
-
e.grid.clearFocusedCell(),
|
|
5203
|
+
e.grid.clearFocusedCell(), Q(e, t, null), Ie(e.shadow.host);
|
|
5180
5204
|
}
|
|
5181
5205
|
}
|
|
5182
5206
|
function ls(e, t) {
|
|
@@ -5193,7 +5217,7 @@ function ls(e, t) {
|
|
|
5193
5217
|
if (document.activeElement === n || n.contains(document.activeElement))
|
|
5194
5218
|
return;
|
|
5195
5219
|
const a = e.grid.focusedCell;
|
|
5196
|
-
e.grid.clearFocusedCell(),
|
|
5220
|
+
e.grid.clearFocusedCell(), Q(e, a, null), Ie(n);
|
|
5197
5221
|
});
|
|
5198
5222
|
}
|
|
5199
5223
|
function as(e, t) {
|
|
@@ -5448,7 +5472,7 @@ function H(e, t, o, i = {}) {
|
|
|
5448
5472
|
const n = String(r.field), l = e.grid.displayItems[t];
|
|
5449
5473
|
if (!l) return;
|
|
5450
5474
|
const a = e.grid.shouldShowEditor(t, o), d = e.grid.isEditing(t, n), c = e.grid.isCellFocused(t, o), u = e.grid.canEditCell(t, n), g = e.grid.isCellInvalid(t, n), h = e.grid.visualColumns.findIndex((y) => y.originalIndex === o), f = h >= 0 && e.grid.isColumnFrozen(h), w = f && h === e.grid.totalFrozenColumns - 1, p = r.editTrigger ?? e.grid.editTrigger, m = ["wg__cell"];
|
|
5451
|
-
if (u && m.push("wg__cell--editable"), c && !d && m.push("wg__cell--focused"), c && p === "always" && m.push("wg__cell--always-edit-focused"), r.textOverflow !== "wrap" && m.push("wg__cell--ellipsis"), r.maxLines && m.push("wg__cell--line-clamp"), d && m.push("wg__cell--editing"), g && m.push("wg__cell--invalid"), h >= 0 && e.grid.isCellInSelectedRange(t, h) && m.push("wg__cell--in-range"), h >= 0 && e.grid.isColumnSelected(h) && m.push("wg__cell--column-selected"), f && m.push("wg__cell--frozen"), w && m.push("wg__cell--frozen-last"), r.cellClass && m.push(r.cellClass), r.cellClassCallback) {
|
|
5475
|
+
if (u && m.push("wg__cell--editable"), c && !d && m.push("wg__cell--focused"), c && p === "always" && m.push("wg__cell--always-edit-focused"), r.textOverflow !== "wrap" && m.push("wg__cell--ellipsis"), r.maxLines && m.push("wg__cell--line-clamp"), d && m.push("wg__cell--editing"), g && m.push("wg__cell--invalid"), e.grid.isDirtyIndicatorVisible && e.grid.isCellDirty(t, n) && m.push("wg__cell--dirty"), h >= 0 && e.grid.isCellInSelectedRange(t, h) && m.push("wg__cell--in-range"), h >= 0 && e.grid.isColumnSelected(h) && m.push("wg__cell--column-selected"), f && m.push("wg__cell--frozen"), w && m.push("wg__cell--frozen-last"), r.cellClass && m.push(r.cellClass), r.cellClassCallback) {
|
|
5452
5476
|
const y = e.grid.getCellRawValue(l, t, n), v = r.cellClassCallback(y, l);
|
|
5453
5477
|
v && m.push(v);
|
|
5454
5478
|
}
|
|
@@ -5531,7 +5555,7 @@ function xs(e, t) {
|
|
|
5531
5555
|
return !0;
|
|
5532
5556
|
}
|
|
5533
5557
|
}
|
|
5534
|
-
let
|
|
5558
|
+
let z = {
|
|
5535
5559
|
isPending: !1,
|
|
5536
5560
|
isDragging: !1,
|
|
5537
5561
|
startRowIndex: -1,
|
|
@@ -5566,17 +5590,17 @@ function vt(e) {
|
|
|
5566
5590
|
const l = e.shadow.querySelector(".wg");
|
|
5567
5591
|
if (!l) return;
|
|
5568
5592
|
const a = l.getBoundingClientRect(), d = n.getBoundingClientRect(), c = l.scrollLeft, u = l.scrollTop, g = 8, h = i === e.grid.displayItems.length - 1, f = d.right - a.left + c - g / 2, w = h ? d.top - a.top + u - g / 2 : d.bottom - a.top + u - g / 2;
|
|
5569
|
-
if (
|
|
5593
|
+
if (z.handleElement && z.handleElement.parentElement !== l && (z.handleElement.remove(), z.handleElement = null, at = null), !z.handleElement) {
|
|
5570
5594
|
const m = document.createElement("div");
|
|
5571
|
-
m.className = "wg__fill-handle", l.appendChild(m),
|
|
5595
|
+
m.className = "wg__fill-handle", l.appendChild(m), z.handleElement = m, at = o, m.addEventListener("mousedown", (y) => ks(e, y));
|
|
5572
5596
|
}
|
|
5573
|
-
|
|
5597
|
+
z.handleElement.style.left = `${f}px`, z.handleElement.style.top = `${w}px`;
|
|
5574
5598
|
}
|
|
5575
5599
|
function Ie(e) {
|
|
5576
|
-
if (
|
|
5600
|
+
if (z.handleElement) {
|
|
5577
5601
|
if (e && at && e !== at)
|
|
5578
5602
|
return;
|
|
5579
|
-
|
|
5603
|
+
z.handleElement.remove(), z.handleElement = null, at = null;
|
|
5580
5604
|
}
|
|
5581
5605
|
}
|
|
5582
5606
|
function ks(e, t) {
|
|
@@ -5585,8 +5609,8 @@ function ks(e, t) {
|
|
|
5585
5609
|
const o = e.grid.focusedCell;
|
|
5586
5610
|
if (!o) return;
|
|
5587
5611
|
const { rowIndex: i, colIndex: r } = o, n = (l = e.grid.visualColumns[r]) == null ? void 0 : l.column;
|
|
5588
|
-
n && (
|
|
5589
|
-
...
|
|
5612
|
+
n && (z = {
|
|
5613
|
+
...z,
|
|
5590
5614
|
isPending: !0,
|
|
5591
5615
|
isDragging: !1,
|
|
5592
5616
|
startRowIndex: i,
|
|
@@ -5600,17 +5624,17 @@ function ks(e, t) {
|
|
|
5600
5624
|
}
|
|
5601
5625
|
function Ri(e) {
|
|
5602
5626
|
if (!be) return;
|
|
5603
|
-
if (
|
|
5604
|
-
const o = e.clientX -
|
|
5627
|
+
if (z.isPending) {
|
|
5628
|
+
const o = e.clientX - z.startX, i = e.clientY - z.startY;
|
|
5605
5629
|
Math.sqrt(o * o + i * i) >= Ss && Rs(be);
|
|
5606
5630
|
return;
|
|
5607
5631
|
}
|
|
5608
|
-
if (!
|
|
5632
|
+
if (!z.isDragging) return;
|
|
5609
5633
|
const t = Is(be, e.clientX, e.clientY);
|
|
5610
|
-
t && (t.rowIndex !==
|
|
5634
|
+
t && (t.rowIndex !== z.currentRowIndex || t.colIndex !== z.currentColIndex) && (z.currentRowIndex = t.rowIndex, z.currentColIndex = t.colIndex, Ei(be));
|
|
5611
5635
|
}
|
|
5612
5636
|
function Rs(e) {
|
|
5613
|
-
|
|
5637
|
+
z.isPending = !1, z.isDragging = !0;
|
|
5614
5638
|
const t = e.shadow.querySelector(".wg");
|
|
5615
5639
|
t == null || t.classList.add("wg--filling"), Es(e);
|
|
5616
5640
|
}
|
|
@@ -5618,29 +5642,29 @@ function Es(e) {
|
|
|
5618
5642
|
const t = e.shadow.querySelector(".wg");
|
|
5619
5643
|
if (!t) return;
|
|
5620
5644
|
const o = document.createElement("div");
|
|
5621
|
-
o.className = "wg__fill-range", t.appendChild(o),
|
|
5645
|
+
o.className = "wg__fill-range", t.appendChild(o), z.rangeElement = o, Ei(e);
|
|
5622
5646
|
}
|
|
5623
5647
|
function Ei(e) {
|
|
5624
|
-
if (!
|
|
5648
|
+
if (!z.rangeElement) return;
|
|
5625
5649
|
const t = e.shadow.querySelector(".wg");
|
|
5626
5650
|
if (!t) return;
|
|
5627
|
-
const { startRowIndex: o, startColIndex: i, currentRowIndex: r, currentColIndex: s } =
|
|
5651
|
+
const { startRowIndex: o, startColIndex: i, currentRowIndex: r, currentColIndex: s } = z, n = Math.min(o, r), l = Math.max(o, r), a = Math.min(i, s), d = Math.max(i, s), c = e.shadow.querySelector(
|
|
5628
5652
|
`[data-row="${n}"][data-col="${a}"]`
|
|
5629
5653
|
), u = e.shadow.querySelector(
|
|
5630
5654
|
`[data-row="${l}"][data-col="${d}"]`
|
|
5631
5655
|
);
|
|
5632
5656
|
if (!c || !u) return;
|
|
5633
5657
|
const g = t.getBoundingClientRect(), h = c.getBoundingClientRect(), f = u.getBoundingClientRect(), w = t.scrollLeft, p = t.scrollTop, m = h.left - g.left + w, y = h.top - g.top + p, v = f.right - h.left, x = f.bottom - h.top;
|
|
5634
|
-
|
|
5658
|
+
z.rangeElement.style.left = `${m}px`, z.rangeElement.style.top = `${y}px`, z.rangeElement.style.width = `${v}px`, z.rangeElement.style.height = `${x}px`;
|
|
5635
5659
|
}
|
|
5636
5660
|
function Ii(e) {
|
|
5637
5661
|
if (!be) return;
|
|
5638
5662
|
const t = be;
|
|
5639
|
-
if (
|
|
5663
|
+
if (z.isPending) {
|
|
5640
5664
|
ao(t);
|
|
5641
5665
|
return;
|
|
5642
5666
|
}
|
|
5643
|
-
|
|
5667
|
+
z.isDragging && (Ts(t), ao(t));
|
|
5644
5668
|
}
|
|
5645
5669
|
function Di(e) {
|
|
5646
5670
|
e.key === "Escape" && be && (e.preventDefault(), ao(be));
|
|
@@ -5664,7 +5688,7 @@ function Ds(e, t, o, i) {
|
|
|
5664
5688
|
}
|
|
5665
5689
|
async function Ts(e) {
|
|
5666
5690
|
var y, v;
|
|
5667
|
-
const { startRowIndex: t, startColIndex: o, currentRowIndex: i, currentColIndex: r, startField: s } =
|
|
5691
|
+
const { startRowIndex: t, startColIndex: o, currentRowIndex: i, currentColIndex: r, startField: s } = z, n = e.grid.visualColumns, l = (y = n[o]) == null ? void 0 : y.column;
|
|
5668
5692
|
if (!l) return;
|
|
5669
5693
|
const a = e.grid.getRowDraft(t) ?? e.grid.displayItems[t];
|
|
5670
5694
|
if (!a) return;
|
|
@@ -5693,9 +5717,9 @@ async function Ts(e) {
|
|
|
5693
5717
|
await e.grid.commitEdit(x.rowIndex, x.field, d), H(e, x.rowIndex, x.colIndex);
|
|
5694
5718
|
}
|
|
5695
5719
|
function ao(e) {
|
|
5696
|
-
|
|
5720
|
+
z.rangeElement && (z.rangeElement.remove(), z.rangeElement = null);
|
|
5697
5721
|
const t = e.shadow.querySelector(".wg");
|
|
5698
|
-
t == null || t.classList.remove("wg--filling"), document.removeEventListener("mousemove", Ri), document.removeEventListener("mouseup", Ii), document.removeEventListener("keydown", Di),
|
|
5722
|
+
t == null || t.classList.remove("wg--filling"), document.removeEventListener("mousemove", Ri), document.removeEventListener("mouseup", Ii), document.removeEventListener("keydown", Di), z = {
|
|
5699
5723
|
isPending: !1,
|
|
5700
5724
|
isDragging: !1,
|
|
5701
5725
|
startRowIndex: -1,
|
|
@@ -5705,21 +5729,21 @@ function ao(e) {
|
|
|
5705
5729
|
startY: 0,
|
|
5706
5730
|
currentRowIndex: -1,
|
|
5707
5731
|
currentColIndex: -1,
|
|
5708
|
-
handleElement:
|
|
5732
|
+
handleElement: z.handleElement,
|
|
5709
5733
|
rangeElement: null
|
|
5710
5734
|
}, be = null;
|
|
5711
5735
|
}
|
|
5712
5736
|
function $e(e, t, o, i) {
|
|
5713
5737
|
var s;
|
|
5714
|
-
|
|
5738
|
+
V(e);
|
|
5715
5739
|
const r = document.createElement("div");
|
|
5716
5740
|
if (r.className = "wg__dropdown", r.style.cssText = `
|
|
5717
|
-
position:
|
|
5741
|
+
position: absolute;
|
|
5718
5742
|
top: 0;
|
|
5719
5743
|
left: 0;
|
|
5720
5744
|
max-height: 200px;
|
|
5721
5745
|
overflow-y: auto;
|
|
5722
|
-
z-index:
|
|
5746
|
+
z-index: var(--wg-z-dropdown);
|
|
5723
5747
|
`, o.length === 0) {
|
|
5724
5748
|
const n = e.isSearching ? i.searchingText || e.grid.labels.dropdownSearching : i.noOptionsText || e.grid.labels.dropdownNoOptions;
|
|
5725
5749
|
r.innerHTML = `<div class="wg__dropdown-empty">${e.escapeHtml(n)}</div>`;
|
|
@@ -5744,7 +5768,7 @@ function $e(e, t, o, i) {
|
|
|
5744
5768
|
}).join("");
|
|
5745
5769
|
}
|
|
5746
5770
|
return e.shadow.appendChild(r), e.dropdownOpen = !0, Ie(), et(t, r, {
|
|
5747
|
-
strategy: "
|
|
5771
|
+
strategy: "absolute",
|
|
5748
5772
|
placement: "bottom-start",
|
|
5749
5773
|
middleware: [
|
|
5750
5774
|
// Add 1px gap to prevent sub-pixel overlap with cell border
|
|
@@ -5765,7 +5789,7 @@ function $e(e, t, o, i) {
|
|
|
5765
5789
|
});
|
|
5766
5790
|
}), r;
|
|
5767
5791
|
}
|
|
5768
|
-
function
|
|
5792
|
+
function V(e) {
|
|
5769
5793
|
const t = e.shadow.querySelector(".wg__dropdown");
|
|
5770
5794
|
t == null || t.remove(), e.dropdownOpen = !1, e.highlightedIndex = -1, e.filterText = "", e.dropdownUserInteracted = !1;
|
|
5771
5795
|
}
|
|
@@ -5778,7 +5802,7 @@ function Ti(e, t, o = !0, i = !1) {
|
|
|
5778
5802
|
const { rowIndex: a, field: d, colIndex: c } = l, u = e.grid.columns[c], g = (u == null ? void 0 : u.editorOptions) || {};
|
|
5779
5803
|
if (ae(r, g)) return;
|
|
5780
5804
|
const h = Oe(r, g), f = e.grid.displayItems[a];
|
|
5781
|
-
g.onselect && f && g.onselect(r, f), e.justSelected = !0, e.isCommittingFromKeyboard = !0,
|
|
5805
|
+
g.onselect && f && g.onselect(r, f), e.justSelected = !0, e.isCommittingFromKeyboard = !0, V(e), e.grid.commitEdit(a, d, h, i), o ? e.moveFocusAfterCommit(a, d, "down") : H(e, a, c), requestAnimationFrame(() => {
|
|
5782
5806
|
e.justSelected = !1;
|
|
5783
5807
|
});
|
|
5784
5808
|
}
|
|
@@ -5866,7 +5890,7 @@ function ge(e) {
|
|
|
5866
5890
|
}
|
|
5867
5891
|
}
|
|
5868
5892
|
function Ms(e) {
|
|
5869
|
-
e.dropdownOpen ?
|
|
5893
|
+
e.dropdownOpen ? V(e) : ge(e);
|
|
5870
5894
|
}
|
|
5871
5895
|
function Ae(e, t) {
|
|
5872
5896
|
t.addEventListener("mousedown", (o) => {
|
|
@@ -5937,10 +5961,10 @@ function As(e, t) {
|
|
|
5937
5961
|
return;
|
|
5938
5962
|
}
|
|
5939
5963
|
e.searchDebounceTimer = setTimeout(() => {
|
|
5940
|
-
|
|
5964
|
+
zs(e, e.filterText, i);
|
|
5941
5965
|
}, s);
|
|
5942
5966
|
}
|
|
5943
|
-
async function
|
|
5967
|
+
async function zs(e, t, o) {
|
|
5944
5968
|
const i = o.editorOptions || {};
|
|
5945
5969
|
if (!i.searchCallback) {
|
|
5946
5970
|
const s = i.initialOptions || i.options || [], n = t.toLowerCase();
|
|
@@ -5993,7 +6017,7 @@ async function Ls(e, t, o) {
|
|
|
5993
6017
|
function Xt(e, t, o, i, r) {
|
|
5994
6018
|
const s = i ?? e.tooltipShowDelay;
|
|
5995
6019
|
e.tooltipHideTimer && (clearTimeout(e.tooltipHideTimer), e.tooltipHideTimer = null), !(e.tooltipElement && e.tooltipAnchor === t) && (e.tooltipShowTimer && clearTimeout(e.tooltipShowTimer), e.tooltipShowTimer = setTimeout(() => {
|
|
5996
|
-
|
|
6020
|
+
Ls(e, t, o, r);
|
|
5997
6021
|
}, s));
|
|
5998
6022
|
}
|
|
5999
6023
|
function bt(e, t) {
|
|
@@ -6005,7 +6029,7 @@ function bt(e, t) {
|
|
|
6005
6029
|
}, 100));
|
|
6006
6030
|
}, o));
|
|
6007
6031
|
}
|
|
6008
|
-
function
|
|
6032
|
+
function Ls(e, t, o, i) {
|
|
6009
6033
|
var l;
|
|
6010
6034
|
(l = e.tooltipElement) == null || l.remove();
|
|
6011
6035
|
const r = document.createElement("div");
|
|
@@ -6231,8 +6255,8 @@ function Hs(e, t, o, i, r, s, n, l, a) {
|
|
|
6231
6255
|
if (_.dataset.disabled === "true" || !S) continue;
|
|
6232
6256
|
if (S.toLowerCase() === x || S === v.key) {
|
|
6233
6257
|
v.preventDefault();
|
|
6234
|
-
const
|
|
6235
|
-
l(
|
|
6258
|
+
const R = _.dataset.itemId || "";
|
|
6259
|
+
l(R), p(), a();
|
|
6236
6260
|
return;
|
|
6237
6261
|
}
|
|
6238
6262
|
}
|
|
@@ -6336,7 +6360,7 @@ function jo(e, t) {
|
|
|
6336
6360
|
(r, s) => $i(r, t, s)
|
|
6337
6361
|
).join("")}</div>`;
|
|
6338
6362
|
}
|
|
6339
|
-
function
|
|
6363
|
+
function Vs(e, t, o, i = !1) {
|
|
6340
6364
|
const { field: r, columnIndex: s } = o;
|
|
6341
6365
|
switch (t) {
|
|
6342
6366
|
case "sortAsc":
|
|
@@ -6460,7 +6484,7 @@ function nt(e, t) {
|
|
|
6460
6484
|
const o = e.key.toLowerCase(), i = t.key.toLowerCase();
|
|
6461
6485
|
return o === i;
|
|
6462
6486
|
}
|
|
6463
|
-
function
|
|
6487
|
+
function qs(e) {
|
|
6464
6488
|
return e.split("+").map((t) => {
|
|
6465
6489
|
const o = t.trim();
|
|
6466
6490
|
return ["ctrl", "control", "shift", "alt", "meta", "cmd", "command"].includes(o.toLowerCase()) ? o.charAt(0).toUpperCase() + o.slice(1).toLowerCase() : o;
|
|
@@ -6532,7 +6556,7 @@ function js(e, t, o) {
|
|
|
6532
6556
|
maxWidth: s.maxWidth ? Go(s.maxWidth, 1 / 0) : null
|
|
6533
6557
|
}, ke = e, s.minWidth ? r.style.minWidth = s.minWidth : r.style.minWidth = `${Y.minWidth}px`;
|
|
6534
6558
|
const l = e.shadow.querySelector(".wg");
|
|
6535
|
-
l == null || l.classList.add("wg--resizing"), i.classList.add("wg__resize-handle--active"), document.addEventListener("mousemove", Ai), document.addEventListener("mouseup",
|
|
6559
|
+
l == null || l.classList.add("wg--resizing"), i.classList.add("wg__resize-handle--active"), document.addEventListener("mousemove", Ai), document.addEventListener("mouseup", zi), t.preventDefault();
|
|
6536
6560
|
}
|
|
6537
6561
|
function Ai(e) {
|
|
6538
6562
|
if (!Y.isResizing || !ke) return;
|
|
@@ -6540,7 +6564,7 @@ function Ai(e) {
|
|
|
6540
6564
|
let o = Y.startWidth + t;
|
|
6541
6565
|
o = Math.max(o, Y.minWidth), Y.maxWidth !== null && (o = Math.min(o, Y.maxWidth)), Y.headerCell && (Y.headerCell.style.width = `${o}px`, Y.headerCell.style.maxWidth = `${o}px`), Xs(ke, Y.field, `${o}px`), (ke.grid.freezeColumns > 0 || ke.grid.isStickyRowNumbers) && Qs(ke);
|
|
6542
6566
|
}
|
|
6543
|
-
function
|
|
6567
|
+
function zi(e) {
|
|
6544
6568
|
if (!Y.isResizing || !ke) return;
|
|
6545
6569
|
const t = ke, o = Y.field, i = `${Y.startWidth}px`, r = e.clientX - Y.startX;
|
|
6546
6570
|
let s = Y.startWidth + r;
|
|
@@ -6557,7 +6581,7 @@ function Li(e) {
|
|
|
6557
6581
|
oldWidth: i,
|
|
6558
6582
|
newWidth: n,
|
|
6559
6583
|
allWidths: t.grid.getColumnWidthsState()
|
|
6560
|
-
}), t.grid.shouldPersistColumnWidths && t.grid.gridName && t.grid.savePersistedWidths(), document.removeEventListener("mousemove", Ai), document.removeEventListener("mouseup",
|
|
6584
|
+
}), t.grid.shouldPersistColumnWidths && t.grid.gridName && t.grid.savePersistedWidths(), document.removeEventListener("mousemove", Ai), document.removeEventListener("mouseup", zi), Y = {
|
|
6561
6585
|
isResizing: !1,
|
|
6562
6586
|
startX: 0,
|
|
6563
6587
|
startWidth: 0,
|
|
@@ -6620,7 +6644,7 @@ function Zs(e, t, o) {
|
|
|
6620
6644
|
dropIndicator: null,
|
|
6621
6645
|
fromIndex: d,
|
|
6622
6646
|
currentDropIndex: d
|
|
6623
|
-
}, Re = e, document.addEventListener("mousemove",
|
|
6647
|
+
}, Re = e, document.addEventListener("mousemove", Li), document.addEventListener("mouseup", Pi), t.preventDefault();
|
|
6624
6648
|
}
|
|
6625
6649
|
function el(e, t, o) {
|
|
6626
6650
|
var r;
|
|
@@ -6637,7 +6661,7 @@ function ol(e, t) {
|
|
|
6637
6661
|
const o = e.shadow.querySelector(".wg");
|
|
6638
6662
|
o == null || o.classList.add("wg--reordering"), O.headerCell && O.headerCell.classList.add("wg__header--dragging"), O.headerCell && el(e, O.headerCell, t), tl(e);
|
|
6639
6663
|
}
|
|
6640
|
-
function
|
|
6664
|
+
function Li(e) {
|
|
6641
6665
|
if (!Re) return;
|
|
6642
6666
|
if (O.isPending) {
|
|
6643
6667
|
const i = e.clientX - O.startX, r = e.clientY - O.startY;
|
|
@@ -6722,7 +6746,7 @@ function Pi(e) {
|
|
|
6722
6746
|
function Jo(e) {
|
|
6723
6747
|
O.ghost && O.ghost.remove(), O.dropIndicator && O.dropIndicator.remove();
|
|
6724
6748
|
const t = e.shadow.querySelector(".wg");
|
|
6725
|
-
t == null || t.classList.remove("wg--reordering"), O.headerCell && O.headerCell.classList.remove("wg__header--dragging"), document.removeEventListener("mousemove",
|
|
6749
|
+
t == null || t.classList.remove("wg--reordering"), O.headerCell && O.headerCell.classList.remove("wg__header--dragging"), document.removeEventListener("mousemove", Li), document.removeEventListener("mouseup", Pi), O = {
|
|
6726
6750
|
isPending: !1,
|
|
6727
6751
|
isReordering: !1,
|
|
6728
6752
|
field: "",
|
|
@@ -6853,7 +6877,7 @@ function al() {
|
|
|
6853
6877
|
};
|
|
6854
6878
|
}
|
|
6855
6879
|
const dl = 5;
|
|
6856
|
-
let
|
|
6880
|
+
let A = {
|
|
6857
6881
|
isPending: !1,
|
|
6858
6882
|
isDragging: !1,
|
|
6859
6883
|
startRowIndex: -1,
|
|
@@ -6865,16 +6889,16 @@ let $ = {
|
|
|
6865
6889
|
rangeBorder: null
|
|
6866
6890
|
}, re = null, dt = null, Ue = null;
|
|
6867
6891
|
function Zo() {
|
|
6868
|
-
return
|
|
6892
|
+
return A.isDragging;
|
|
6869
6893
|
}
|
|
6870
6894
|
function Gt() {
|
|
6871
|
-
return
|
|
6895
|
+
return A.isPending;
|
|
6872
6896
|
}
|
|
6873
6897
|
function Oi(e, t, o, i) {
|
|
6874
6898
|
var l;
|
|
6875
6899
|
const r = i.shiftKey && e.grid.cellSelectionMode === "shift";
|
|
6876
|
-
e.grid.selectedCellRange && !r && (e.grid.clearCellSelection(), X()), (l = e.grid.visualColumns[o]) != null && l.column && (
|
|
6877
|
-
|
|
6900
|
+
e.grid.selectedCellRange && !r && (e.grid.clearCellSelection(), X()), (l = e.grid.visualColumns[o]) != null && l.column && (A = {
|
|
6901
|
+
...A,
|
|
6878
6902
|
isPending: !0,
|
|
6879
6903
|
isDragging: !1,
|
|
6880
6904
|
startRowIndex: t,
|
|
@@ -6883,7 +6907,7 @@ function Oi(e, t, o, i) {
|
|
|
6883
6907
|
startY: i.clientY,
|
|
6884
6908
|
currentRowIndex: t,
|
|
6885
6909
|
currentColIndex: o
|
|
6886
|
-
}, re = e, document.addEventListener("mousemove", Hi), document.addEventListener("mouseup",
|
|
6910
|
+
}, re = e, document.addEventListener("mousemove", Hi), document.addEventListener("mouseup", Vi), document.addEventListener("keydown", qi));
|
|
6887
6911
|
}
|
|
6888
6912
|
function cl(e, t, o) {
|
|
6889
6913
|
var i, r;
|
|
@@ -6898,7 +6922,7 @@ function cl(e, t, o) {
|
|
|
6898
6922
|
startField: String(a.field),
|
|
6899
6923
|
endField: String(d.field)
|
|
6900
6924
|
};
|
|
6901
|
-
e.grid.clearFocusedCell(), e.grid.selectCellRange(c),
|
|
6925
|
+
e.grid.clearFocusedCell(), e.grid.selectCellRange(c), Vt(e), requestAnimationFrame(() => {
|
|
6902
6926
|
requestAnimationFrame(() => {
|
|
6903
6927
|
const u = e.shadow.querySelector(".wg");
|
|
6904
6928
|
u == null || u.focus({ preventScroll: !0 });
|
|
@@ -6910,12 +6934,12 @@ function cl(e, t, o) {
|
|
|
6910
6934
|
}
|
|
6911
6935
|
function Hi(e) {
|
|
6912
6936
|
if (re) {
|
|
6913
|
-
if (
|
|
6914
|
-
const t = e.clientX -
|
|
6937
|
+
if (A.isPending) {
|
|
6938
|
+
const t = e.clientX - A.startX, o = e.clientY - A.startY;
|
|
6915
6939
|
Math.sqrt(t * t + o * o) >= dl && ul(re);
|
|
6916
6940
|
return;
|
|
6917
6941
|
}
|
|
6918
|
-
|
|
6942
|
+
A.isDragging && (dt = e, Ue || (Ue = requestAnimationFrame(gl)));
|
|
6919
6943
|
}
|
|
6920
6944
|
}
|
|
6921
6945
|
function gl() {
|
|
@@ -6923,18 +6947,18 @@ function gl() {
|
|
|
6923
6947
|
const e = dt;
|
|
6924
6948
|
dt = null;
|
|
6925
6949
|
const t = hl(re, e.clientX, e.clientY);
|
|
6926
|
-
if (t && (t.rowIndex !==
|
|
6927
|
-
|
|
6950
|
+
if (t && (t.rowIndex !== A.currentRowIndex || t.colIndex !== A.currentColIndex)) {
|
|
6951
|
+
A.currentRowIndex = t.rowIndex, A.currentColIndex = t.colIndex;
|
|
6928
6952
|
const o = Ni(re);
|
|
6929
6953
|
Fi(re), Bi(re, o);
|
|
6930
6954
|
}
|
|
6931
6955
|
}
|
|
6932
6956
|
function ul(e) {
|
|
6933
|
-
|
|
6957
|
+
A.isPending = !1, A.isDragging = !0;
|
|
6934
6958
|
const t = e.shadow.querySelector(".wg");
|
|
6935
6959
|
t == null || t.classList.add("wg--selecting-cells");
|
|
6936
6960
|
const o = e.grid.focusedCell;
|
|
6937
|
-
e.grid.clearFocusedCell(),
|
|
6961
|
+
e.grid.clearFocusedCell(), Q(e, o, null);
|
|
6938
6962
|
const i = e.shadow.querySelector(".wg__cell:focus");
|
|
6939
6963
|
i == null || i.blur();
|
|
6940
6964
|
const r = e.grid.focusedRowIndex;
|
|
@@ -6945,7 +6969,7 @@ function ul(e) {
|
|
|
6945
6969
|
Fi(e), Wi(e);
|
|
6946
6970
|
}
|
|
6947
6971
|
function Fi(e) {
|
|
6948
|
-
const { startRowIndex: t, startColIndex: o, currentRowIndex: i, currentColIndex: r } =
|
|
6972
|
+
const { startRowIndex: t, startColIndex: o, currentRowIndex: i, currentColIndex: r } = A, s = Math.min(t, i), n = Math.max(t, i), l = Math.min(o, r), a = Math.max(o, r);
|
|
6949
6973
|
e.shadow.querySelectorAll(".wg__cell--in-range").forEach((c) => c.classList.remove("wg__cell--in-range"));
|
|
6950
6974
|
for (let c = s; c <= n; c++)
|
|
6951
6975
|
for (let u = l; u <= a; u++) {
|
|
@@ -6955,21 +6979,21 @@ function Fi(e) {
|
|
|
6955
6979
|
g && g.classList.add("wg__cell--in-range");
|
|
6956
6980
|
}
|
|
6957
6981
|
}
|
|
6958
|
-
function
|
|
6982
|
+
function Vi(e) {
|
|
6959
6983
|
if (!re) return;
|
|
6960
6984
|
const t = re;
|
|
6961
|
-
if (
|
|
6962
|
-
e.shiftKey && t.grid.cellSelectionMode === "shift" && t.grid.lastClickedCell ? cl(t,
|
|
6963
|
-
rowIndex:
|
|
6964
|
-
colIndex:
|
|
6985
|
+
if (A.isPending) {
|
|
6986
|
+
e.shiftKey && t.grid.cellSelectionMode === "shift" && t.grid.lastClickedCell ? cl(t, A.startRowIndex, A.startColIndex) : t.grid.lastClickedCell = {
|
|
6987
|
+
rowIndex: A.startRowIndex,
|
|
6988
|
+
colIndex: A.startColIndex
|
|
6965
6989
|
}, yt(t);
|
|
6966
6990
|
return;
|
|
6967
6991
|
}
|
|
6968
|
-
if (
|
|
6969
|
-
if (
|
|
6992
|
+
if (!A.isDragging) return;
|
|
6993
|
+
if (A.startRowIndex === A.currentRowIndex && A.startColIndex === A.currentColIndex) {
|
|
6970
6994
|
t.shadow.querySelectorAll(".wg__cell--in-range").forEach((n) => n.classList.remove("wg__cell--in-range")), X();
|
|
6971
|
-
const { startRowIndex: r, startColIndex: s } =
|
|
6972
|
-
t.grid.setFocusedCell(r, s),
|
|
6995
|
+
const { startRowIndex: r, startColIndex: s } = A;
|
|
6996
|
+
t.grid.setFocusedCell(r, s), Q(t, null, { rowIndex: r, colIndex: s }), ht(t, r, s), yt(t);
|
|
6973
6997
|
} else
|
|
6974
6998
|
fl(t), yt(t), requestAnimationFrame(() => {
|
|
6975
6999
|
requestAnimationFrame(() => {
|
|
@@ -6978,14 +7002,14 @@ function qi(e) {
|
|
|
6978
7002
|
});
|
|
6979
7003
|
});
|
|
6980
7004
|
}
|
|
6981
|
-
function
|
|
7005
|
+
function qi(e) {
|
|
6982
7006
|
if (e.key === "Escape" && re) {
|
|
6983
7007
|
e.preventDefault();
|
|
6984
7008
|
const t = re;
|
|
6985
|
-
if (
|
|
7009
|
+
if (A.isDragging) {
|
|
6986
7010
|
t.shadow.querySelectorAll(".wg__cell--in-range").forEach((s) => s.classList.remove("wg__cell--in-range")), X();
|
|
6987
|
-
const { startRowIndex: i, startColIndex: r } =
|
|
6988
|
-
t.grid.setFocusedCell(i, r),
|
|
7011
|
+
const { startRowIndex: i, startColIndex: r } = A;
|
|
7012
|
+
t.grid.setFocusedCell(i, r), Q(t, null, { rowIndex: i, colIndex: r }), ht(t, i, r);
|
|
6989
7013
|
}
|
|
6990
7014
|
yt(t);
|
|
6991
7015
|
}
|
|
@@ -7000,7 +7024,7 @@ function hl(e, t, o) {
|
|
|
7000
7024
|
}
|
|
7001
7025
|
function fl(e) {
|
|
7002
7026
|
var d, c;
|
|
7003
|
-
const { startRowIndex: t, startColIndex: o, currentRowIndex: i, currentColIndex: r } =
|
|
7027
|
+
const { startRowIndex: t, startColIndex: o, currentRowIndex: i, currentColIndex: r } = A, s = e.grid.visualColumns, n = (d = s[o]) == null ? void 0 : d.column, l = (c = s[r]) == null ? void 0 : c.column;
|
|
7004
7028
|
if (!n || !l) return;
|
|
7005
7029
|
const a = {
|
|
7006
7030
|
startRowIndex: t,
|
|
@@ -7010,10 +7034,10 @@ function fl(e) {
|
|
|
7010
7034
|
startField: String(n.field),
|
|
7011
7035
|
endField: String(l.field)
|
|
7012
7036
|
};
|
|
7013
|
-
e.grid.clearFocusedCell(), e.grid.selectCellRange(a),
|
|
7037
|
+
e.grid.clearFocusedCell(), e.grid.selectCellRange(a), Vt(e);
|
|
7014
7038
|
}
|
|
7015
7039
|
function Ni(e) {
|
|
7016
|
-
const { startRowIndex: t, startColIndex: o, currentRowIndex: i, currentColIndex: r } =
|
|
7040
|
+
const { startRowIndex: t, startColIndex: o, currentRowIndex: i, currentColIndex: r } = A, s = e.shadow.querySelector(".wg");
|
|
7017
7041
|
if (!s) return null;
|
|
7018
7042
|
const n = Math.min(t, i), l = Math.max(t, i), a = Math.min(o, r), d = Math.max(o, r), c = e.shadow.querySelector(
|
|
7019
7043
|
`[data-row="${n}"][data-col="${a}"]`
|
|
@@ -7035,14 +7059,14 @@ function Bi(e, t) {
|
|
|
7035
7059
|
X();
|
|
7036
7060
|
return;
|
|
7037
7061
|
}
|
|
7038
|
-
let o =
|
|
7039
|
-
o || (o = document.createElement("div"), o.className = "wg__cell-range-border", t.container.appendChild(o),
|
|
7062
|
+
let o = A.rangeBorder;
|
|
7063
|
+
o || (o = document.createElement("div"), o.className = "wg__cell-range-border", t.container.appendChild(o), A.rangeBorder = o), o.style.left = `${t.left}px`, o.style.top = `${t.top}px`, o.style.width = `${t.width}px`, o.style.height = `${t.height}px`;
|
|
7040
7064
|
}
|
|
7041
7065
|
function Wi(e) {
|
|
7042
7066
|
const t = Ni(e);
|
|
7043
7067
|
Bi(e, t);
|
|
7044
7068
|
}
|
|
7045
|
-
function
|
|
7069
|
+
function Vt(e) {
|
|
7046
7070
|
X();
|
|
7047
7071
|
const t = e.grid.selectedCellRange;
|
|
7048
7072
|
if (!t) return;
|
|
@@ -7055,17 +7079,17 @@ function qt(e) {
|
|
|
7055
7079
|
);
|
|
7056
7080
|
if (!u || !g) return;
|
|
7057
7081
|
const h = o.getBoundingClientRect(), f = u.getBoundingClientRect(), w = g.getBoundingClientRect(), p = o.scrollLeft, m = o.scrollTop, y = f.left - h.left + p - o.clientLeft, v = f.top - h.top + m - o.clientTop, x = w.right - f.left, C = w.bottom - f.top, _ = document.createElement("div");
|
|
7058
|
-
_.className = "wg__cell-range-border", _.style.left = `${y}px`, _.style.top = `${v}px`, _.style.width = `${x}px`, _.style.height = `${C}px`, o.appendChild(_),
|
|
7082
|
+
_.className = "wg__cell-range-border", _.style.left = `${y}px`, _.style.top = `${v}px`, _.style.width = `${x}px`, _.style.height = `${C}px`, o.appendChild(_), A.rangeBorder = _;
|
|
7059
7083
|
}
|
|
7060
7084
|
function ei(e) {
|
|
7061
|
-
|
|
7085
|
+
A.rangeBorder && (X(), A.isDragging ? Wi(e) : Vt(e));
|
|
7062
7086
|
}
|
|
7063
7087
|
function X() {
|
|
7064
|
-
|
|
7088
|
+
A.rangeBorder && (A.rangeBorder.remove(), A.rangeBorder = null);
|
|
7065
7089
|
}
|
|
7066
7090
|
function yt(e) {
|
|
7067
7091
|
const t = e.shadow.querySelector(".wg");
|
|
7068
|
-
t == null || t.classList.remove("wg--selecting-cells"), Ue && (cancelAnimationFrame(Ue), Ue = null), dt = null, document.removeEventListener("mousemove", Hi), document.removeEventListener("mouseup",
|
|
7092
|
+
t == null || t.classList.remove("wg--selecting-cells"), Ue && (cancelAnimationFrame(Ue), Ue = null), dt = null, document.removeEventListener("mousemove", Hi), document.removeEventListener("mouseup", Vi), document.removeEventListener("keydown", qi), A = {
|
|
7069
7093
|
isPending: !1,
|
|
7070
7094
|
isDragging: !1,
|
|
7071
7095
|
startRowIndex: -1,
|
|
@@ -7074,7 +7098,7 @@ function yt(e) {
|
|
|
7074
7098
|
startY: 0,
|
|
7075
7099
|
currentRowIndex: -1,
|
|
7076
7100
|
currentColIndex: -1,
|
|
7077
|
-
rangeBorder:
|
|
7101
|
+
rangeBorder: A.rangeBorder
|
|
7078
7102
|
}, re = null;
|
|
7079
7103
|
}
|
|
7080
7104
|
const wl = 5;
|
|
@@ -7232,7 +7256,7 @@ function Gi(e) {
|
|
|
7232
7256
|
`.wg__header[data-field="${h}"]`
|
|
7233
7257
|
);
|
|
7234
7258
|
if (!m) continue;
|
|
7235
|
-
const y = f.getBoundingClientRect(), v = m.getBoundingClientRect(), x = p.getBoundingClientRect(), C = y.left - n.left + l - o.clientLeft, _ = y.top - n.top + a - o.clientTop, S = v.right - y.left,
|
|
7259
|
+
const y = f.getBoundingClientRect(), v = m.getBoundingClientRect(), x = p.getBoundingClientRect(), C = y.left - n.left + l - o.clientLeft, _ = y.top - n.top + a - o.clientTop, S = v.right - y.left, k = x.bottom - y.top, I = ji(o, C, _, S, k, "wg__column-selection-border");
|
|
7236
7260
|
Mt.push(I);
|
|
7237
7261
|
}
|
|
7238
7262
|
}
|
|
@@ -7433,10 +7457,10 @@ async function El(e, t, o, i) {
|
|
|
7433
7457
|
};
|
|
7434
7458
|
if (r.onbeforepaste && (r.onbeforepaste(h), h.cancel))
|
|
7435
7459
|
return {
|
|
7436
|
-
totalCells: a.reduce((S,
|
|
7460
|
+
totalCells: a.reduce((S, k) => S + k.length, 0),
|
|
7437
7461
|
successfulCells: 0,
|
|
7438
7462
|
failedCells: 0,
|
|
7439
|
-
skippedCells: a.reduce((S,
|
|
7463
|
+
skippedCells: a.reduce((S, k) => S + k.length, 0),
|
|
7440
7464
|
newRowsCreated: 0,
|
|
7441
7465
|
cellResults: [],
|
|
7442
7466
|
hadHeaders: l
|
|
@@ -7444,28 +7468,28 @@ async function El(e, t, o, i) {
|
|
|
7444
7468
|
let f = 0, w = u;
|
|
7445
7469
|
if (g > 0) {
|
|
7446
7470
|
const S = [];
|
|
7447
|
-
for (let
|
|
7448
|
-
const I = c ?
|
|
7449
|
-
l && n ?
|
|
7471
|
+
for (let k = 0; k < g; k++) {
|
|
7472
|
+
const I = c ? k : u + k - o, R = a[I], E = {};
|
|
7473
|
+
l && n ? R == null || R.forEach((L, D) => {
|
|
7450
7474
|
const P = n[D];
|
|
7451
|
-
P && (E[P.gridField] =
|
|
7452
|
-
}) :
|
|
7475
|
+
P && (E[P.gridField] = L);
|
|
7476
|
+
}) : R == null || R.forEach((L, D) => {
|
|
7453
7477
|
const P = i + D;
|
|
7454
7478
|
if (P < d.length) {
|
|
7455
7479
|
const U = String(d[P].column.field);
|
|
7456
|
-
E[U] =
|
|
7480
|
+
E[U] = L;
|
|
7457
7481
|
}
|
|
7458
7482
|
});
|
|
7459
7483
|
let M;
|
|
7460
|
-
r.createRowCallback ? M = r.createRowCallback(E, u +
|
|
7484
|
+
r.createRowCallback ? M = r.createRowCallback(E, u + k) : M = E, S.push(M), f++;
|
|
7461
7485
|
}
|
|
7462
7486
|
c && r.newRowPosition === "top" ? (r.items = [...S, ...r.items], w = 0) : (r.items = [...r.items, ...S], w = u);
|
|
7463
7487
|
}
|
|
7464
7488
|
const p = [], m = r.pasteMode;
|
|
7465
7489
|
for (let S = 0; S < a.length; S++) {
|
|
7466
|
-
const
|
|
7467
|
-
for (let M = 0; M <
|
|
7468
|
-
const
|
|
7490
|
+
const k = a[S], I = c ? w + S : o + S, R = c ? r.newRowPosition === "top" ? 1 + S : r.items.length - a.length + S : o + S, E = I;
|
|
7491
|
+
for (let M = 0; M < k.length; M++) {
|
|
7492
|
+
const L = k[M];
|
|
7469
7493
|
let D, P;
|
|
7470
7494
|
if (l && n) {
|
|
7471
7495
|
const K = n[M];
|
|
@@ -7475,9 +7499,9 @@ async function El(e, t, o, i) {
|
|
|
7475
7499
|
} else {
|
|
7476
7500
|
if (P = i + M, P >= d.length) {
|
|
7477
7501
|
p.push({
|
|
7478
|
-
rowIndex:
|
|
7502
|
+
rowIndex: R,
|
|
7479
7503
|
field: "",
|
|
7480
|
-
value:
|
|
7504
|
+
value: L,
|
|
7481
7505
|
isValid: !1,
|
|
7482
7506
|
wasSkipped: !0,
|
|
7483
7507
|
skipReason: "out-of-bounds"
|
|
@@ -7489,9 +7513,9 @@ async function El(e, t, o, i) {
|
|
|
7489
7513
|
const U = `${S}-${M}`;
|
|
7490
7514
|
if (h.skipCells.has(U)) {
|
|
7491
7515
|
p.push({
|
|
7492
|
-
rowIndex:
|
|
7516
|
+
rowIndex: R,
|
|
7493
7517
|
field: D,
|
|
7494
|
-
value:
|
|
7518
|
+
value: L,
|
|
7495
7519
|
isValid: !0,
|
|
7496
7520
|
wasSkipped: !0,
|
|
7497
7521
|
skipReason: "user-canceled"
|
|
@@ -7504,9 +7528,9 @@ async function El(e, t, o, i) {
|
|
|
7504
7528
|
if (!r.isCellEditable(T)) {
|
|
7505
7529
|
if (m === "editable-only") {
|
|
7506
7530
|
p.push({
|
|
7507
|
-
rowIndex:
|
|
7531
|
+
rowIndex: R,
|
|
7508
7532
|
field: D,
|
|
7509
|
-
value:
|
|
7533
|
+
value: L,
|
|
7510
7534
|
isValid: !1,
|
|
7511
7535
|
wasSkipped: !0,
|
|
7512
7536
|
skipReason: "non-editable"
|
|
@@ -7514,9 +7538,9 @@ async function El(e, t, o, i) {
|
|
|
7514
7538
|
continue;
|
|
7515
7539
|
} else if (m === "skip-non-editable") {
|
|
7516
7540
|
p.push({
|
|
7517
|
-
rowIndex:
|
|
7541
|
+
rowIndex: R,
|
|
7518
7542
|
field: D,
|
|
7519
|
-
value:
|
|
7543
|
+
value: L,
|
|
7520
7544
|
isValid: !0,
|
|
7521
7545
|
wasSkipped: !0,
|
|
7522
7546
|
skipReason: "non-editable"
|
|
@@ -7527,17 +7551,17 @@ async function El(e, t, o, i) {
|
|
|
7527
7551
|
const W = c ? r.items[E] : r.displayItems[E];
|
|
7528
7552
|
if (W && r.isRowLocked(W)) {
|
|
7529
7553
|
p.push({
|
|
7530
|
-
rowIndex:
|
|
7554
|
+
rowIndex: R,
|
|
7531
7555
|
field: D,
|
|
7532
|
-
value:
|
|
7556
|
+
value: L,
|
|
7533
7557
|
isValid: !0,
|
|
7534
7558
|
wasSkipped: !0,
|
|
7535
7559
|
skipReason: "locked"
|
|
7536
7560
|
});
|
|
7537
7561
|
continue;
|
|
7538
7562
|
}
|
|
7539
|
-
let B =
|
|
7540
|
-
if (T.beforePasteCallback && W && (B = T.beforePasteCallback(
|
|
7563
|
+
let B = L;
|
|
7564
|
+
if (T.beforePasteCallback && W && (B = T.beforePasteCallback(L, W)), c) {
|
|
7541
7565
|
const K = r.items[E];
|
|
7542
7566
|
if (K && r.shouldValidateOnPaste && T.beforeCommitCallback) {
|
|
7543
7567
|
const Ce = {
|
|
@@ -7547,13 +7571,13 @@ async function El(e, t, o, i) {
|
|
|
7547
7571
|
rowIndex: E,
|
|
7548
7572
|
field: D
|
|
7549
7573
|
}, J = await Promise.resolve(T.beforeCommitCallback(Ce)), De = J === !0 || J === void 0 || typeof J == "object" && J !== null && J.valid !== !1, Se = typeof J == "object" && J !== null ? J.error || J.message : typeof J == "string" ? J : void 0;
|
|
7550
|
-
De || (r.addInvalidCell(
|
|
7574
|
+
De || (r.addInvalidCell(R, D, Se || "Invalid value"), (_ = r.onvalidationerror) == null || _.call(r, {
|
|
7551
7575
|
row: K,
|
|
7552
|
-
rowIndex:
|
|
7576
|
+
rowIndex: R,
|
|
7553
7577
|
field: D,
|
|
7554
7578
|
error: Se || "Invalid value"
|
|
7555
7579
|
})), p.push({
|
|
7556
|
-
rowIndex:
|
|
7580
|
+
rowIndex: R,
|
|
7557
7581
|
field: D,
|
|
7558
7582
|
value: B,
|
|
7559
7583
|
isValid: De,
|
|
@@ -7562,19 +7586,19 @@ async function El(e, t, o, i) {
|
|
|
7562
7586
|
});
|
|
7563
7587
|
} else
|
|
7564
7588
|
p.push({
|
|
7565
|
-
rowIndex:
|
|
7589
|
+
rowIndex: R,
|
|
7566
7590
|
field: D,
|
|
7567
7591
|
value: B,
|
|
7568
7592
|
isValid: !0,
|
|
7569
7593
|
wasSkipped: !1
|
|
7570
7594
|
});
|
|
7571
7595
|
} else if (r.shouldValidateOnPaste) {
|
|
7572
|
-
await r.commitEdit(
|
|
7596
|
+
await r.commitEdit(R, D, B);
|
|
7573
7597
|
const K = r.invalidCells.find(
|
|
7574
|
-
(Ce) => Ce.rowIndex ===
|
|
7598
|
+
(Ce) => Ce.rowIndex === R && Ce.field === D
|
|
7575
7599
|
);
|
|
7576
7600
|
p.push({
|
|
7577
|
-
rowIndex:
|
|
7601
|
+
rowIndex: R,
|
|
7578
7602
|
field: D,
|
|
7579
7603
|
value: B,
|
|
7580
7604
|
isValid: !K,
|
|
@@ -7584,7 +7608,7 @@ async function El(e, t, o, i) {
|
|
|
7584
7608
|
} else {
|
|
7585
7609
|
const K = r.items[E];
|
|
7586
7610
|
K && (K[D] = B), p.push({
|
|
7587
|
-
rowIndex:
|
|
7611
|
+
rowIndex: R,
|
|
7588
7612
|
field: D,
|
|
7589
7613
|
value: B,
|
|
7590
7614
|
isValid: !0,
|
|
@@ -7655,7 +7679,7 @@ function Ml(e, t) {
|
|
|
7655
7679
|
const { rowIndex: o, colIndex: i } = t.target, r = e.grid.columns[i];
|
|
7656
7680
|
if (!r) return;
|
|
7657
7681
|
const s = r.editTrigger ?? e.grid.editTrigger, n = s === "always", l = e.grid.focusedCell;
|
|
7658
|
-
(!l || l.rowIndex !== o || l.colIndex !== i) && (e.filterText = "", e.searchDebounceTimer && (clearTimeout(e.searchDebounceTimer), e.searchDebounceTimer = null), e.searchAbortController && (e.searchAbortController.abort(), e.searchAbortController = null)), e.grid.setFocusedCell(o, i),
|
|
7682
|
+
(!l || l.rowIndex !== o || l.colIndex !== i) && (e.filterText = "", e.searchDebounceTimer && (clearTimeout(e.searchDebounceTimer), e.searchDebounceTimer = null), e.searchAbortController && (e.searchAbortController.abort(), e.searchAbortController = null)), e.grid.setFocusedCell(o, i), Q(e, l, { rowIndex: o, colIndex: i });
|
|
7659
7683
|
const d = e.shadow.querySelector(
|
|
7660
7684
|
`td[data-row="${o}"][data-col="${i}"]`
|
|
7661
7685
|
);
|
|
@@ -7679,19 +7703,19 @@ function Ml(e, t) {
|
|
|
7679
7703
|
}
|
|
7680
7704
|
function $l(e, t) {
|
|
7681
7705
|
const o = e.grid.focusedCell;
|
|
7682
|
-
e.grid.clearFocusedCell(),
|
|
7706
|
+
e.grid.clearFocusedCell(), Q(e, o, null);
|
|
7683
7707
|
}
|
|
7684
7708
|
const Al = {
|
|
7685
7709
|
handles: ["navigate"],
|
|
7686
7710
|
execute(e, t) {
|
|
7687
7711
|
if (t.type === "navigate")
|
|
7688
|
-
return
|
|
7712
|
+
return zl(e, t);
|
|
7689
7713
|
}
|
|
7690
7714
|
};
|
|
7691
|
-
function
|
|
7715
|
+
function zl(e, t) {
|
|
7692
7716
|
const o = t.from ?? e.grid.focusedCell;
|
|
7693
7717
|
if (!o) return;
|
|
7694
|
-
const i =
|
|
7718
|
+
const i = Ll(e, o, t), r = e.grid.columns[o.colIndex], s = r ? String(r.field) : "", n = e.grid.editingCell && e.grid.editingCell.rowIndex === o.rowIndex && e.grid.editingCell.field === s;
|
|
7695
7719
|
return i ? i.rowIndex === o.rowIndex && i.colIndex === o.colIndex ? void 0 : [{
|
|
7696
7720
|
type: "transitionCell",
|
|
7697
7721
|
from: o,
|
|
@@ -7703,7 +7727,7 @@ function Ll(e, t) {
|
|
|
7703
7727
|
{ type: "focusCell", target: o, selectText: !1 }
|
|
7704
7728
|
] : void 0;
|
|
7705
7729
|
}
|
|
7706
|
-
function
|
|
7730
|
+
function Ll(e, t, o) {
|
|
7707
7731
|
const { direction: i, ctrlKey: r } = o, { rowIndex: s, colIndex: n } = t, l = e.grid.columns, d = e.grid.displayItems.length - 1, c = l.length - 1, u = e.grid.getEditableColumns();
|
|
7708
7732
|
switch (i !== "tab" && i !== "tab-back" && i !== "enter" && (e.grid.tabTraversalStartColIndex = null), i) {
|
|
7709
7733
|
case "up":
|
|
@@ -7817,7 +7841,7 @@ function Fl(e, t) {
|
|
|
7817
7841
|
initialSearchQuery: s
|
|
7818
7842
|
});
|
|
7819
7843
|
}
|
|
7820
|
-
const
|
|
7844
|
+
const Vl = {
|
|
7821
7845
|
handles: ["openDropdown", "closeDropdown", "toggleDropdown", "dropdownNavigate", "dropdownSelect"],
|
|
7822
7846
|
execute(e, t) {
|
|
7823
7847
|
switch (t.type) {
|
|
@@ -7825,19 +7849,19 @@ const ql = {
|
|
|
7825
7849
|
ge(e);
|
|
7826
7850
|
break;
|
|
7827
7851
|
case "closeDropdown":
|
|
7828
|
-
|
|
7852
|
+
V(e);
|
|
7829
7853
|
break;
|
|
7830
7854
|
case "toggleDropdown":
|
|
7831
|
-
e.dropdownOpen ?
|
|
7855
|
+
e.dropdownOpen ? V(e) : ge(e);
|
|
7832
7856
|
break;
|
|
7833
7857
|
case "dropdownNavigate":
|
|
7834
|
-
return
|
|
7858
|
+
return ql(e, t);
|
|
7835
7859
|
case "dropdownSelect":
|
|
7836
7860
|
return Nl(e, t);
|
|
7837
7861
|
}
|
|
7838
7862
|
}
|
|
7839
7863
|
}, ti = 10;
|
|
7840
|
-
function
|
|
7864
|
+
function ql(e, t) {
|
|
7841
7865
|
if (!e.dropdownOpen) return;
|
|
7842
7866
|
const o = e.getCurrentEditorOptions();
|
|
7843
7867
|
let i = e.highlightedIndex;
|
|
@@ -7879,7 +7903,7 @@ function Vl(e, t) {
|
|
|
7879
7903
|
function Nl(e, t) {
|
|
7880
7904
|
var h;
|
|
7881
7905
|
if (!e.dropdownOpen || e.highlightedIndex < 0)
|
|
7882
|
-
return
|
|
7906
|
+
return V(e), t.thenNavigate ? [{
|
|
7883
7907
|
type: "navigate",
|
|
7884
7908
|
direction: t.thenNavigate
|
|
7885
7909
|
}] : void 0;
|
|
@@ -7890,7 +7914,7 @@ function Nl(e, t) {
|
|
|
7890
7914
|
const { rowIndex: n, field: l, colIndex: a } = s, d = e.grid.columns[a], c = (d == null ? void 0 : d.editorOptions) || {};
|
|
7891
7915
|
if (ae(o, c)) return;
|
|
7892
7916
|
const u = Oe(o, c), g = e.grid.displayItems[n];
|
|
7893
|
-
if (c.onselect && g && c.onselect(o, g), e.justSelected = !0, e.isCommittingFromKeyboard = !0,
|
|
7917
|
+
if (c.onselect && g && c.onselect(o, g), e.justSelected = !0, e.isCommittingFromKeyboard = !0, V(e), e.grid.commitEdit(n, l, u, t.commitEmptyRow ?? !1), t.thenNavigate)
|
|
7894
7918
|
return H(e, n, a), e.justSelected = !1, [{
|
|
7895
7919
|
type: "navigate",
|
|
7896
7920
|
direction: t.thenNavigate,
|
|
@@ -8052,13 +8076,13 @@ async function Zl(e, t, o) {
|
|
|
8052
8076
|
} else
|
|
8053
8077
|
d = a.value;
|
|
8054
8078
|
else a instanceof HTMLSelectElement ? d = a.value : d = a.dataset.value || "";
|
|
8055
|
-
e.dropdownOpen &&
|
|
8079
|
+
e.dropdownOpen && V(e), j(e), await e.grid.commitEdit(r, n, d, t), H(e, r, s);
|
|
8056
8080
|
}
|
|
8057
8081
|
function ea(e) {
|
|
8058
8082
|
const t = e.grid.editingCell;
|
|
8059
8083
|
if (!t) return;
|
|
8060
8084
|
const { rowIndex: o, field: i } = t, r = e.grid.columns.findIndex((n) => String(n.field) === i), s = e.grid.columns[r];
|
|
8061
|
-
e.dropdownOpen &&
|
|
8085
|
+
e.dropdownOpen && V(e), j(e), (s == null ? void 0 : s.editor) === "checkbox" && e.grid.discardCellDraft(o, i), e.grid.cancelEdit(), r >= 0 && H(e, o, r);
|
|
8062
8086
|
}
|
|
8063
8087
|
function ta(e, t) {
|
|
8064
8088
|
const o = e.grid.editingCell, i = e.grid.focusedCell;
|
|
@@ -8067,7 +8091,7 @@ function ta(e, t) {
|
|
|
8067
8091
|
if (!r) return;
|
|
8068
8092
|
const s = o ? e.grid.columns.findIndex((a) => String(a.field) === o.field) : (i == null ? void 0 : i.colIndex) ?? -1, n = e.grid.columns[s], l = n == null ? void 0 : n.editor;
|
|
8069
8093
|
if (l === "select" && e.filterText) {
|
|
8070
|
-
e.filterText = "",
|
|
8094
|
+
e.filterText = "", V(e), e.dispatch({ type: "openDropdown" });
|
|
8071
8095
|
return;
|
|
8072
8096
|
}
|
|
8073
8097
|
if (l === "autocomplete" || l === "combobox") {
|
|
@@ -8075,16 +8099,16 @@ function ta(e, t) {
|
|
|
8075
8099
|
`.wg__cell[data-row="${r.rowIndex}"][data-col="${s}"]`
|
|
8076
8100
|
), d = a == null ? void 0 : a.querySelector(".wg__combobox-input, .wg__autocomplete-input"), c = e.grid.displayItems[r.rowIndex], u = n == null ? void 0 : n.field, g = c && u ? c[u] : void 0, h = (n == null ? void 0 : n.editorOptions) || {}, f = h.initialOptions || h.options || [], w = wt(g, f, h), p = (d == null ? void 0 : d.value) ?? "";
|
|
8077
8101
|
if (d && p !== w) {
|
|
8078
|
-
e.filterText = "", d.value = w, d.focus(), d.select(),
|
|
8102
|
+
e.filterText = "", d.value = w, d.focus(), d.select(), V(e), e.dispatch({ type: "openDropdown" });
|
|
8079
8103
|
return;
|
|
8080
8104
|
}
|
|
8081
8105
|
}
|
|
8082
|
-
|
|
8106
|
+
V(e), o && (j(e), l === "checkbox" && e.grid.discardCellDraft(r.rowIndex, o.field), e.grid.cancelEdit(), H(e, r.rowIndex, s), ht(e, r.rowIndex, s));
|
|
8083
8107
|
return;
|
|
8084
8108
|
}
|
|
8085
8109
|
if (o) {
|
|
8086
8110
|
const { rowIndex: r, field: s } = o, n = e.grid.columns.findIndex((a) => String(a.field) === s), l = e.grid.columns[n];
|
|
8087
|
-
e.dropdownOpen &&
|
|
8111
|
+
e.dropdownOpen && V(e), e.datepicker && (e.datepicker.close(!0), e.datepicker = null), j(e), (l == null ? void 0 : l.editor) === "checkbox" && e.grid.discardCellDraft(r, s), e.grid.cancelEdit(), n >= 0 && (H(e, r, n), ht(e, r, n));
|
|
8088
8112
|
} else if (i) {
|
|
8089
8113
|
const { rowIndex: r, colIndex: s } = i;
|
|
8090
8114
|
e.grid.clearFocusedCell(), H(e, r, s);
|
|
@@ -8436,7 +8460,7 @@ class ba {
|
|
|
8436
8460
|
constructor(t) {
|
|
8437
8461
|
b(this, "pipeline");
|
|
8438
8462
|
b(this, "ctx");
|
|
8439
|
-
this.ctx = t, this.pipeline = Dl(t), this.pipeline.registerExecutor(Tl), this.pipeline.registerExecutor(Al), this.pipeline.registerExecutor(Pl), this.pipeline.registerExecutor(Hl), this.pipeline.registerExecutor(
|
|
8463
|
+
this.ctx = t, this.pipeline = Dl(t), this.pipeline.registerExecutor(Tl), this.pipeline.registerExecutor(Al), this.pipeline.registerExecutor(Pl), this.pipeline.registerExecutor(Hl), this.pipeline.registerExecutor(Vl), this.pipeline.registerExecutor(Wl), this.pipeline.registerExecutor(Ul), this.pipeline.registerExecutor(Ql), this.pipeline.registerExecutor(ia), this.pipeline.registerExecutor(la), this.pipeline.registerExecutor(da), this.pipeline.registerExecutor(ua), this.pipeline.registerExecutor(ha), this.pipeline.registerExecutor(wa), this.pipeline.registerExecutor(ma), this.pipeline.registerExecutor(Bl);
|
|
8440
8464
|
}
|
|
8441
8465
|
/**
|
|
8442
8466
|
* Get the effective editTrigger for a column
|
|
@@ -8691,8 +8715,8 @@ class ba {
|
|
|
8691
8715
|
if (S.length === 0)
|
|
8692
8716
|
return v && (this.ctx.isTransitioningCells = !1), !1;
|
|
8693
8717
|
w || (t.preventDefault(), t.stopPropagation());
|
|
8694
|
-
for (const
|
|
8695
|
-
this.pipeline.dispatch(
|
|
8718
|
+
for (const k of S)
|
|
8719
|
+
this.pipeline.dispatch(k);
|
|
8696
8720
|
return v && requestAnimationFrame(() => {
|
|
8697
8721
|
this.ctx.isTransitioningCells = !1;
|
|
8698
8722
|
}), !0;
|
|
@@ -8921,7 +8945,7 @@ class va extends HTMLElement {
|
|
|
8921
8945
|
this.isClosingViaToggle = !1;
|
|
8922
8946
|
}
|
|
8923
8947
|
), this.styleElement = document.createElement("style"), this.styleElement.textContent = Wn, this.shadow.appendChild(this.styleElement), this.grid.requestUpdate = () => this.requestUpdate(), this.grid._onInteractionChange = (o, i) => {
|
|
8924
|
-
o === "editingCell" && i.current === null &&
|
|
8948
|
+
o === "editingCell" && i.current === null && V(this);
|
|
8925
8949
|
};
|
|
8926
8950
|
}
|
|
8927
8951
|
get tooltipShowDelay() {
|
|
@@ -9056,6 +9080,18 @@ class va extends HTMLElement {
|
|
|
9056
9080
|
set isRowNumbersVisible(o) {
|
|
9057
9081
|
this.grid.isRowNumbersVisible = o;
|
|
9058
9082
|
}
|
|
9083
|
+
get isDirtyIndicatorVisible() {
|
|
9084
|
+
return this.grid.isDirtyIndicatorVisible;
|
|
9085
|
+
}
|
|
9086
|
+
set isDirtyIndicatorVisible(o) {
|
|
9087
|
+
this.grid.isDirtyIndicatorVisible = o;
|
|
9088
|
+
}
|
|
9089
|
+
isCellDirty(o, i) {
|
|
9090
|
+
return this.grid.isCellDirty(o, i);
|
|
9091
|
+
}
|
|
9092
|
+
isRowDirty(o) {
|
|
9093
|
+
return this.grid.isRowDirty(o);
|
|
9094
|
+
}
|
|
9059
9095
|
get isStickyRowNumbers() {
|
|
9060
9096
|
return this.grid.isStickyRowNumbers;
|
|
9061
9097
|
}
|
|
@@ -9837,7 +9873,7 @@ class va extends HTMLElement {
|
|
|
9837
9873
|
const g = this.grid.focusedCell;
|
|
9838
9874
|
this.grid.setFocusedCell(0, 0), this.scrollToRowProgrammatically(0);
|
|
9839
9875
|
const h = this.shadow.querySelector('td[data-row="0"][data-col="0"]');
|
|
9840
|
-
h && (h.focus({ preventScroll: !0 }),
|
|
9876
|
+
h && (h.focus({ preventScroll: !0 }), Q(this, g, { rowIndex: 0, colIndex: 0 }));
|
|
9841
9877
|
} else
|
|
9842
9878
|
F(this, 0, 0);
|
|
9843
9879
|
else
|
|
@@ -9850,7 +9886,7 @@ class va extends HTMLElement {
|
|
|
9850
9886
|
const f = this.grid.focusedCell;
|
|
9851
9887
|
this.grid.setFocusedCell(g, h), this.scrollToRowProgrammatically(g);
|
|
9852
9888
|
const w = this.shadow.querySelector(`td[data-row="${g}"][data-col="${h}"]`);
|
|
9853
|
-
w && (w.focus({ preventScroll: !0 }),
|
|
9889
|
+
w && (w.focus({ preventScroll: !0 }), Q(this, f, { rowIndex: g, colIndex: h }));
|
|
9854
9890
|
} else
|
|
9855
9891
|
F(this, g, h);
|
|
9856
9892
|
} else
|
|
@@ -9862,7 +9898,7 @@ class va extends HTMLElement {
|
|
|
9862
9898
|
const g = this.grid.focusedCell;
|
|
9863
9899
|
this.grid.setFocusedCell(0, r), this.scrollToRowProgrammatically(0);
|
|
9864
9900
|
const h = this.shadow.querySelector(`td[data-row="0"][data-col="${r}"]`);
|
|
9865
|
-
h && (h.focus({ preventScroll: !0 }),
|
|
9901
|
+
h && (h.focus({ preventScroll: !0 }), Q(this, g, { rowIndex: 0, colIndex: r }));
|
|
9866
9902
|
} else
|
|
9867
9903
|
F(this, 0, r);
|
|
9868
9904
|
else {
|
|
@@ -9871,7 +9907,7 @@ class va extends HTMLElement {
|
|
|
9871
9907
|
const h = this.grid.focusedCell;
|
|
9872
9908
|
this.grid.setFocusedCell(g, r), this.scrollToRowProgrammatically(g);
|
|
9873
9909
|
const f = this.shadow.querySelector(`td[data-row="${g}"][data-col="${r}"]`);
|
|
9874
|
-
f && (f.focus({ preventScroll: !0 }),
|
|
9910
|
+
f && (f.focus({ preventScroll: !0 }), Q(this, h, { rowIndex: g, colIndex: r }));
|
|
9875
9911
|
} else
|
|
9876
9912
|
F(this, g, r);
|
|
9877
9913
|
}
|
|
@@ -9883,7 +9919,7 @@ class va extends HTMLElement {
|
|
|
9883
9919
|
const h = this.grid.focusedCell;
|
|
9884
9920
|
this.grid.setFocusedCell(g, r), this.scrollToRowProgrammatically(g);
|
|
9885
9921
|
const f = this.shadow.querySelector(`td[data-row="${g}"][data-col="${r}"]`);
|
|
9886
|
-
f && (f.focus({ preventScroll: !0 }),
|
|
9922
|
+
f && (f.focus({ preventScroll: !0 }), Q(this, h, { rowIndex: g, colIndex: r }));
|
|
9887
9923
|
} else
|
|
9888
9924
|
F(this, g, r);
|
|
9889
9925
|
} else {
|
|
@@ -9892,7 +9928,7 @@ class va extends HTMLElement {
|
|
|
9892
9928
|
const h = this.grid.focusedCell;
|
|
9893
9929
|
this.grid.setFocusedCell(g, r), this.scrollToRowProgrammatically(g);
|
|
9894
9930
|
const f = this.shadow.querySelector(`td[data-row="${g}"][data-col="${r}"]`);
|
|
9895
|
-
f && (f.focus({ preventScroll: !0 }),
|
|
9931
|
+
f && (f.focus({ preventScroll: !0 }), Q(this, h, { rowIndex: g, colIndex: r }));
|
|
9896
9932
|
} else
|
|
9897
9933
|
F(this, g, r);
|
|
9898
9934
|
}
|
|
@@ -9949,7 +9985,7 @@ class va extends HTMLElement {
|
|
|
9949
9985
|
this.grid.clearSelection();
|
|
9950
9986
|
else {
|
|
9951
9987
|
const g = this.grid.focusedCell;
|
|
9952
|
-
this.grid.clearFocusedCell(),
|
|
9988
|
+
this.grid.clearFocusedCell(), Q(this, g, null), (u = o.target) == null || u.blur();
|
|
9953
9989
|
}
|
|
9954
9990
|
break;
|
|
9955
9991
|
case "Delete": {
|
|
@@ -10046,7 +10082,7 @@ class va extends HTMLElement {
|
|
|
10046
10082
|
case "Enter":
|
|
10047
10083
|
if (this.datepicker)
|
|
10048
10084
|
return;
|
|
10049
|
-
o.preventDefault(), o.stopPropagation(), this.dropdownOpen && this.highlightedIndex >= 0 ? Ti(this, this.highlightedIndex, !0, !0) : a && !this.dropdownOpen ? ge(this) : (this.isCommittingFromKeyboard = !0,
|
|
10085
|
+
o.preventDefault(), o.stopPropagation(), this.dropdownOpen && this.highlightedIndex >= 0 ? Ti(this, this.highlightedIndex, !0, !0) : a && !this.dropdownOpen ? ge(this) : (this.isCommittingFromKeyboard = !0, V(this), l === "date" && i instanceof HTMLInputElement ? await this.commitDateEditor(i, !0) : await It(this, i, !0), Ut(this, r, s, "down"));
|
|
10050
10086
|
break;
|
|
10051
10087
|
case "Tab":
|
|
10052
10088
|
if (this.datepicker)
|
|
@@ -10059,9 +10095,9 @@ class va extends HTMLElement {
|
|
|
10059
10095
|
const y = Oe(p, m);
|
|
10060
10096
|
await this.grid.commitEdit(r, s, y, w);
|
|
10061
10097
|
}
|
|
10062
|
-
|
|
10098
|
+
V(this);
|
|
10063
10099
|
} else
|
|
10064
|
-
|
|
10100
|
+
V(this), l === "date" && i instanceof HTMLInputElement ? await this.commitDateEditor(i, w) : a || await It(this, i, w);
|
|
10065
10101
|
if (w) {
|
|
10066
10102
|
Ht(this, r, u);
|
|
10067
10103
|
const p = c.length > 0 ? c[0].index : 0;
|
|
@@ -10074,7 +10110,7 @@ class va extends HTMLElement {
|
|
|
10074
10110
|
break;
|
|
10075
10111
|
case "Escape":
|
|
10076
10112
|
if (o.preventDefault(), o.stopPropagation(), this.dropdownOpen) {
|
|
10077
|
-
|
|
10113
|
+
V(this), (l === "autocomplete" || l === "combobox") && (this.filterText = "", i instanceof HTMLInputElement && (i.value = "", i.focus()));
|
|
10078
10114
|
return;
|
|
10079
10115
|
}
|
|
10080
10116
|
if (this.datepicker) {
|
|
@@ -10206,7 +10242,7 @@ class va extends HTMLElement {
|
|
|
10206
10242
|
if (p.editTrigger || this.grid.editTrigger, m !== "disabled" && (m === "click" && !y || m === "shift" && y)) {
|
|
10207
10243
|
if (this.grid.editingCell) {
|
|
10208
10244
|
const x = this.grid.editingCell, C = this.grid.columns.findIndex((_) => String(_.field) === x.field);
|
|
10209
|
-
|
|
10245
|
+
V(this), j(this), this.grid.cancelEdit(), C >= 0 && H(this, x.rowIndex, C);
|
|
10210
10246
|
}
|
|
10211
10247
|
this.grid.selectedRows.length > 0 && this.grid.clearSelection(), this.grid.selectedColumns.length > 0 && this.grid.clearColumnSelection(), Oi(this, f, w, a);
|
|
10212
10248
|
return;
|
|
@@ -10225,7 +10261,7 @@ class va extends HTMLElement {
|
|
|
10225
10261
|
if (y >= 0) {
|
|
10226
10262
|
if (this.clearAllSelections(), this.isTransitioningCells = !0, this.grid.editingCell) {
|
|
10227
10263
|
const v = this.grid.editingCell, x = this.grid.columns.findIndex((C) => String(C.field) === v.field);
|
|
10228
|
-
|
|
10264
|
+
V(this), j(this), this.grid.cancelEdit(), this.grid.setFocusedCell(p, y), x >= 0 && H(this, v.rowIndex, x);
|
|
10229
10265
|
}
|
|
10230
10266
|
oe(this, p, y), requestAnimationFrame(() => {
|
|
10231
10267
|
var _;
|
|
@@ -10248,13 +10284,13 @@ class va extends HTMLElement {
|
|
|
10248
10284
|
if (w !== m.rowIndex || p !== v) {
|
|
10249
10285
|
n.preventDefault(), this.isTransitioningCells = !0;
|
|
10250
10286
|
const x = m.rowIndex, C = v;
|
|
10251
|
-
|
|
10287
|
+
V(this), j(this), this.grid.cancelEdit(), this.grid.setFocusedCell(w, p), C >= 0 && H(this, x, C);
|
|
10252
10288
|
const _ = this.grid.columns[p], S = (_ == null ? void 0 : _.editTrigger) || this.grid.editTrigger, I = n.clientX;
|
|
10253
10289
|
requestAnimationFrame(() => {
|
|
10254
10290
|
if (this.isTransitioningCells = !1, S === "click" && _ && this.grid.isCellEditable(_)) {
|
|
10255
|
-
const
|
|
10291
|
+
const R = this.shadow.querySelector(
|
|
10256
10292
|
`td[data-row="${w}"][data-col="${p}"]`
|
|
10257
|
-
), E =
|
|
10293
|
+
), E = R ? lt({ clientX: I }, R) : void 0;
|
|
10258
10294
|
oe(this, w, p, { cursorPosition: E ?? void 0 });
|
|
10259
10295
|
} else
|
|
10260
10296
|
F(this, w, p);
|
|
@@ -10272,7 +10308,7 @@ class va extends HTMLElement {
|
|
|
10272
10308
|
if (m >= 0) {
|
|
10273
10309
|
this.isTransitioningCells = !0;
|
|
10274
10310
|
const y = this.grid.editingCell, v = y ? this.grid.columns.findIndex((x) => String(x.field) === y.field) : -1;
|
|
10275
|
-
y && (
|
|
10311
|
+
y && (V(this), j(this), this.grid.cancelEdit(), this.grid.setFocusedCell(w, m), v >= 0 && H(this, y.rowIndex, v)), oe(this, w, m), requestAnimationFrame(() => {
|
|
10276
10312
|
this.isTransitioningCells = !1, this.dropdownOpen || ge(this);
|
|
10277
10313
|
});
|
|
10278
10314
|
}
|
|
@@ -10322,7 +10358,7 @@ class va extends HTMLElement {
|
|
|
10322
10358
|
const g = parseInt(d.dataset.rowNumber || "-1", 10);
|
|
10323
10359
|
g >= 0 && pl(this, g, n);
|
|
10324
10360
|
}
|
|
10325
|
-
l.closest(".wg__row-number-header") && n.button === 0 && (n.preventDefault(), this.grid.selectAll(), this.grid.selectedCellRange &&
|
|
10361
|
+
l.closest(".wg__row-number-header") && n.button === 0 && (n.preventDefault(), this.grid.selectAll(), this.grid.selectedCellRange && Vt(this), this.render(), requestAnimationFrame(() => {
|
|
10326
10362
|
const g = this.shadow.querySelector(".wg");
|
|
10327
10363
|
g == null || g.focus({ preventScroll: !0 });
|
|
10328
10364
|
}));
|
|
@@ -10405,9 +10441,9 @@ class va extends HTMLElement {
|
|
|
10405
10441
|
}
|
|
10406
10442
|
}), this.scrollEvents.init(r), this.scrollEvents.subscribe("container", () => {
|
|
10407
10443
|
const n = r.scrollLeft > 0;
|
|
10408
|
-
i.classList.toggle("wg--scrolled-horizontal", n), this.dropdownOpen && !this.isTransitioningCells && !this.isOpeningDropdown && this.handleScrollCloseDropdown(), this.grid.shouldUseVirtualScroll() && this.handleVirtualScroll(r), this.grid.isInfiniteScrollEnabled && this.grid.hasMoreItems && !this.isLoadingMoreItems && this.handleInfiniteScroll(r),
|
|
10444
|
+
i.classList.toggle("wg--scrolled-horizontal", n), this.dropdownOpen && !this.isTransitioningCells && !this.isOpeningDropdown && this.handleScrollCloseDropdown(), this.grid.shouldUseVirtualScroll() && this.handleVirtualScroll(r), this.grid.isInfiniteScrollEnabled && this.grid.hasMoreItems && !this.isLoadingMoreItems && this.handleInfiniteScroll(r), Ve() !== null && (qo(this, this.grid.displayItems), this.renderConnector()), vt(this), this.grid.selectedCellRange && ei(this), _l(this);
|
|
10409
10445
|
}), this.scrollEvents.subscribe("window", () => {
|
|
10410
|
-
this.dropdownOpen && !this.isTransitioningCells && this.handleScrollCloseDropdown(),
|
|
10446
|
+
this.dropdownOpen && !this.isTransitioningCells && this.handleScrollCloseDropdown(), Ve() !== null && this.closeToolbarAndReset();
|
|
10411
10447
|
}), this.clickEventsSubscribed || (this.clickEvents.init(i, this), this.clickEvents.subscribe("outsideClick", () => {
|
|
10412
10448
|
let n = !1;
|
|
10413
10449
|
if (this.grid.focusedCell) {
|
|
@@ -10418,7 +10454,7 @@ class va extends HTMLElement {
|
|
|
10418
10454
|
}
|
|
10419
10455
|
if (this.grid.focusedRowIndex !== null && (this.grid.clearRowFocus(), n = !0), this.dropdownOpen || this.grid.editingCell) {
|
|
10420
10456
|
const l = this.grid.editingCell, a = l ? this.grid.columns.findIndex((d) => String(d.field) === l.field) : -1;
|
|
10421
|
-
|
|
10457
|
+
V(this), j(this), this.grid.cancelEdit(), l && a >= 0 && H(this, l.rowIndex, a);
|
|
10422
10458
|
}
|
|
10423
10459
|
this.grid.selectedCellRange && (this.grid.clearCellSelection(), X(), n = !0), this.grid.selectedRows.length > 0 && (this.grid.clearSelection(), n = !0), this.grid.selectedColumns.length > 0 && (this.grid.clearColumnSelection(), n = !0), n && this.render();
|
|
10424
10460
|
}), this.clickEvents.subscribe("sortClick", (n) => {
|
|
@@ -10473,7 +10509,7 @@ class va extends HTMLElement {
|
|
|
10473
10509
|
const l = n, a = l.target, d = a.closest(".wg__row");
|
|
10474
10510
|
if (!d) return;
|
|
10475
10511
|
const c = parseInt(d.dataset.rowIndex || "0", 10);
|
|
10476
|
-
if (!(
|
|
10512
|
+
if (!(Ve() !== c || this.grid.toolbarPosition !== "top")) {
|
|
10477
10513
|
if (this.grid.toolbarFollowsCursor && !this.grid.cellToolbar && this.grid.toolbarColumn === void 0) {
|
|
10478
10514
|
const g = a.closest(".wg__cell:not(.wg__row-number):not(.wg__inline-actions-cell)");
|
|
10479
10515
|
if (g) {
|
|
@@ -10507,7 +10543,7 @@ class va extends HTMLElement {
|
|
|
10507
10543
|
Nt(c) ? this.closeToolbarAndReset() : this.showToolbarForRow(d, c, l.clientX);
|
|
10508
10544
|
}
|
|
10509
10545
|
}), this.toolbarOutsideClickAdded || (this.toolbarOutsideClickAdded = !0, document.addEventListener("click", (n) => {
|
|
10510
|
-
if (!
|
|
10546
|
+
if (!Vo(this.shadow))
|
|
10511
10547
|
return;
|
|
10512
10548
|
const l = n.composedPath(), a = l.some((u) => {
|
|
10513
10549
|
var g;
|
|
@@ -10516,7 +10552,7 @@ class va extends HTMLElement {
|
|
|
10516
10552
|
var g;
|
|
10517
10553
|
return (g = u.classList) == null ? void 0 : g.contains("wg__toolbar-trigger");
|
|
10518
10554
|
});
|
|
10519
|
-
a || d || l.includes(this) && (this.grid.toolbarTrigger === "hover" || this.grid.toolbarTrigger === "click") ||
|
|
10555
|
+
a || d || l.includes(this) && (this.grid.toolbarTrigger === "hover" || this.grid.toolbarTrigger === "click") || Ve() !== null && this.closeToolbarAndReset();
|
|
10520
10556
|
})), this.shadow.querySelectorAll(".wg__pagination").forEach((n) => {
|
|
10521
10557
|
n.addEventListener("click", (a) => {
|
|
10522
10558
|
Us(this, a) && this.render();
|
|
@@ -10585,7 +10621,7 @@ class va extends HTMLElement {
|
|
|
10585
10621
|
const l = i.querySelector(
|
|
10586
10622
|
`td[data-row="${n.rowIndex}"][data-col="${n.colIndex}"]`
|
|
10587
10623
|
);
|
|
10588
|
-
l && (l.focus({ preventScroll: !0 }),
|
|
10624
|
+
l && (l.focus({ preventScroll: !0 }), Q(this, null, n));
|
|
10589
10625
|
}
|
|
10590
10626
|
}
|
|
10591
10627
|
/**
|
|
@@ -10610,7 +10646,7 @@ class va extends HTMLElement {
|
|
|
10610
10646
|
if (!this.grid.isShortcutsHelpVisible || !((n = this.grid.rowShortcuts) != null && n.length))
|
|
10611
10647
|
return "";
|
|
10612
10648
|
const i = this.grid.shortcutsHelpPosition === "top-left" ? "wg__shortcuts-help--left" : "", r = this.grid.rowShortcuts.map((d) => `<div class="wg__shortcuts-help-item">
|
|
10613
|
-
<span class="wg__shortcuts-help-key">${
|
|
10649
|
+
<span class="wg__shortcuts-help-key">${qs(d.key)}</span>
|
|
10614
10650
|
<span class="wg__shortcuts-help-label">${d.label}</span>
|
|
10615
10651
|
</div>`).join(""), s = ((a = (l = this.grid).shortcutsHelpContentCallback) == null ? void 0 : a.call(l)) || "";
|
|
10616
10652
|
return `
|
|
@@ -10642,15 +10678,15 @@ class va extends HTMLElement {
|
|
|
10642
10678
|
const a = this.grid.paginationPosition.split("|").map((C) => C.trim()), d = this.grid.summaryPosition ? this.grid.summaryPosition.split("|").map((C) => C.trim()) : [], c = (C, _) => {
|
|
10643
10679
|
const S = a.filter(
|
|
10644
10680
|
(M) => _ ? M.startsWith("top-") : M.startsWith("bottom-")
|
|
10645
|
-
),
|
|
10681
|
+
), k = d.filter(
|
|
10646
10682
|
(M) => _ ? M.startsWith("top-") : M.startsWith("bottom-")
|
|
10647
|
-
), I = S.length > 0,
|
|
10648
|
-
return !I && !
|
|
10649
|
-
${Yt(this,
|
|
10683
|
+
), I = S.length > 0, R = k.length > 0;
|
|
10684
|
+
return !I && !R ? "" : R && I && this.grid.isSummaryInline ? `<div class="wg__footer${_ ? " wg__footer--top" : ""}">
|
|
10685
|
+
${Yt(this, k[0])}
|
|
10650
10686
|
${Wt(this, S[0])}
|
|
10651
|
-
</div>` : [.../* @__PURE__ */ new Set([...S, ...
|
|
10652
|
-
const
|
|
10653
|
-
return D &&
|
|
10687
|
+
</div>` : [.../* @__PURE__ */ new Set([...S, ...k])].map((M) => {
|
|
10688
|
+
const L = S.includes(M), D = k.includes(M);
|
|
10689
|
+
return D && L ? `<div class="wg__footer${_ ? " wg__footer--top" : ""}">
|
|
10654
10690
|
${Yt(this, M)}
|
|
10655
10691
|
${Wt(this, M)}
|
|
10656
10692
|
</div>` : D ? Yt(this, M) : Wt(this, M);
|
|
@@ -10658,7 +10694,7 @@ class va extends HTMLElement {
|
|
|
10658
10694
|
}, u = c(a, !0), g = c(a, !1), h = this.grid.shouldUseVirtualScroll();
|
|
10659
10695
|
let f;
|
|
10660
10696
|
if (h) {
|
|
10661
|
-
const C = this.grid.displayItems, _ = this.grid.virtualScrollRowHeight, S = this.grid.virtualScrollBuffer,
|
|
10697
|
+
const C = this.grid.displayItems, _ = this.grid.virtualScrollRowHeight, S = this.grid.virtualScrollBuffer, k = (o == null ? void 0 : o.clientHeight) || 400, I = Math.max(0, Math.floor(r / _) - S), R = Math.ceil(k / _) + S * 2, E = Math.min(C.length, I + R);
|
|
10662
10698
|
this.virtualScrollStart = I, this.virtualScrollEnd = E;
|
|
10663
10699
|
const M = {
|
|
10664
10700
|
startIndex: I,
|
|
@@ -10703,15 +10739,15 @@ class va extends HTMLElement {
|
|
|
10703
10739
|
if (S || (S = this.shadow.querySelector(
|
|
10704
10740
|
`.wg__editor[data-row="${C}"][data-field="${_}"]`
|
|
10705
10741
|
)), S && (S.focus(), S instanceof HTMLInputElement && S.type === "text")) {
|
|
10706
|
-
const
|
|
10742
|
+
const k = this.grid.editingCell.cursorPosition, I = this.getCurrentEditingColumn(), R = ((x = I == null ? void 0 : I.editorOptions) == null ? void 0 : x.editStartSelection) || this.grid.editStartSelection;
|
|
10707
10743
|
if (this.grid.editingCell.initialSearchQuery !== void 0) {
|
|
10708
10744
|
const E = S.value.length;
|
|
10709
10745
|
S.setSelectionRange(E, E);
|
|
10710
10746
|
} else
|
|
10711
|
-
switch (
|
|
10747
|
+
switch (R) {
|
|
10712
10748
|
case "mousePosition":
|
|
10713
|
-
if (
|
|
10714
|
-
const E = Math.min(
|
|
10749
|
+
if (k !== void 0) {
|
|
10750
|
+
const E = Math.min(k, S.value.length);
|
|
10715
10751
|
S.setSelectionRange(E, E);
|
|
10716
10752
|
} else
|
|
10717
10753
|
S.setSelectionRange(S.value.length, S.value.length);
|
|
@@ -10894,7 +10930,7 @@ class va extends HTMLElement {
|
|
|
10894
10930
|
const h = this.shadow.querySelector(
|
|
10895
10931
|
`td[data-row="${u}"][data-col="${o}"]`
|
|
10896
10932
|
);
|
|
10897
|
-
h && (h.scrollIntoView({ block: "nearest", behavior: "auto" }), h.focus(),
|
|
10933
|
+
h && (h.scrollIntoView({ block: "nearest", behavior: "auto" }), h.focus(), Q(this, g, { rowIndex: u, colIndex: o }));
|
|
10898
10934
|
}
|
|
10899
10935
|
};
|
|
10900
10936
|
n.addEventListener("click", d), l.addEventListener("click", a), r.addEventListener("click", (c) => {
|
|
@@ -11011,7 +11047,7 @@ class va extends HTMLElement {
|
|
|
11011
11047
|
h,
|
|
11012
11048
|
g,
|
|
11013
11049
|
(f, w, p) => {
|
|
11014
|
-
if (["sortAsc", "sortDesc", "clearSort", "hideColumn", "freezeColumn", "unfreezeColumn"].includes(f) &&
|
|
11050
|
+
if (["sortAsc", "sortDesc", "clearSort", "hideColumn", "freezeColumn", "unfreezeColumn"].includes(f) && Vs(this, f, g, p), f === "show-all-columns") {
|
|
11015
11051
|
this.grid.columns.forEach((v) => {
|
|
11016
11052
|
v.isHidden = !1;
|
|
11017
11053
|
}), this.grid.columns = [...this.grid.columns];
|
|
@@ -11087,8 +11123,8 @@ class va extends HTMLElement {
|
|
|
11087
11123
|
o != null && o.length && (this.toolbarShortcutHandler = (i) => {
|
|
11088
11124
|
if (i.target.matches('input, textarea, select, [contenteditable="true"]'))
|
|
11089
11125
|
return;
|
|
11090
|
-
const s =
|
|
11091
|
-
if (s === null || !
|
|
11126
|
+
const s = Ve();
|
|
11127
|
+
if (s === null || !Vo(this.shadow)) return;
|
|
11092
11128
|
const n = this.grid.displayItems[s];
|
|
11093
11129
|
if (!n) return;
|
|
11094
11130
|
const l = this.grid.columns;
|
|
@@ -11235,7 +11271,7 @@ class va extends HTMLElement {
|
|
|
11235
11271
|
*/
|
|
11236
11272
|
handleScrollCloseDropdown() {
|
|
11237
11273
|
const o = this.grid.editingCell, i = o ? this.grid.columns.findIndex((r) => String(r.field) === o.field) : -1;
|
|
11238
|
-
|
|
11274
|
+
V(this), j(this), this.grid.cancelEdit(), o && i >= 0 && H(this, o.rowIndex, i);
|
|
11239
11275
|
}
|
|
11240
11276
|
/**
|
|
11241
11277
|
* Handle select trigger blur - cancel edit and restore display mode
|
|
@@ -11243,13 +11279,13 @@ class va extends HTMLElement {
|
|
|
11243
11279
|
handleSelectBlur(o) {
|
|
11244
11280
|
if (this.isOpeningDropdown || o != null && o.closest(".wg__dropdown")) return;
|
|
11245
11281
|
const i = this.grid.editingCell, r = i ? this.grid.columns.findIndex((s) => String(s.field) === i.field) : -1;
|
|
11246
|
-
|
|
11282
|
+
V(this), j(this), this.grid.cancelEdit(), i && r >= 0 && H(this, i.rowIndex, r);
|
|
11247
11283
|
}
|
|
11248
11284
|
/**
|
|
11249
11285
|
* Handle combobox/autocomplete blur - commit matched option or raw text
|
|
11250
11286
|
*/
|
|
11251
11287
|
handleComboboxBlur(o) {
|
|
11252
|
-
if (
|
|
11288
|
+
if (V(this), this.grid.editingCell) {
|
|
11253
11289
|
const i = this.grid.editingCell, r = this.grid.columns.findIndex((n) => String(n.field) === i.field), s = this.getCurrentEditingColumn();
|
|
11254
11290
|
if (s) {
|
|
11255
11291
|
const n = s.editorOptions || {}, a = (n.options || n.initialOptions || []).find(
|
|
@@ -11281,7 +11317,7 @@ class va extends HTMLElement {
|
|
|
11281
11317
|
this.closeToolbarAndReset();
|
|
11282
11318
|
return;
|
|
11283
11319
|
}
|
|
11284
|
-
a ? (this.render(),
|
|
11320
|
+
a ? (this.render(), qo(this, this.grid.displayItems), this.renderConnector()) : this.render();
|
|
11285
11321
|
}
|
|
11286
11322
|
/**
|
|
11287
11323
|
* Handle inline action button click (toolbarPosition="inline")
|
|
@@ -11302,10 +11338,10 @@ class va extends HTMLElement {
|
|
|
11302
11338
|
}
|
|
11303
11339
|
typeof customElements < "u" && !customElements.get("web-grid") && customElements.define("web-grid", va);
|
|
11304
11340
|
typeof window < "u" && (window.components = window.components || {}, window.components["web-grid"] = {
|
|
11305
|
-
version: () => "1.0.
|
|
11341
|
+
version: () => "1.0.4",
|
|
11306
11342
|
config: {
|
|
11307
11343
|
name: "@keenmate/web-grid",
|
|
11308
|
-
version: "1.0.
|
|
11344
|
+
version: "1.0.4",
|
|
11309
11345
|
author: "KeenMate",
|
|
11310
11346
|
license: "MIT",
|
|
11311
11347
|
repository: "git+https://github.com/KeenMate/web-grid.git",
|
|
@@ -11313,8 +11349,8 @@ typeof window < "u" && (window.components = window.components || {}, window.comp
|
|
|
11313
11349
|
},
|
|
11314
11350
|
logging: {
|
|
11315
11351
|
enableLogging: Fn,
|
|
11316
|
-
disableLogging:
|
|
11317
|
-
setLogLevel:
|
|
11352
|
+
disableLogging: Vn,
|
|
11353
|
+
setLogLevel: qn,
|
|
11318
11354
|
setCategoryLevel: Nn,
|
|
11319
11355
|
getCategories: () => [...Hn]
|
|
11320
11356
|
}
|