@ninebone/table 0.0.596 → 0.0.598
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nine-table.js +152 -153
- package/dist/nine-table.js.map +1 -1
- package/dist/nine-table.umd.js +6 -6
- package/dist/nine-table.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-table.js
CHANGED
|
@@ -3,7 +3,7 @@ var Ve = (R) => {
|
|
|
3
3
|
throw TypeError(R);
|
|
4
4
|
};
|
|
5
5
|
var Xe = (R, i, e) => i in R ? Fe(R, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[i] = e;
|
|
6
|
-
var
|
|
6
|
+
var c = (R, i) => Fe(R, "name", { value: i, configurable: !0 });
|
|
7
7
|
var E = (R, i, e) => Xe(R, typeof i != "symbol" ? i + "" : i, e), Ye = (R, i, e) => i.has(R) || Ve("Cannot " + e);
|
|
8
8
|
var t = (R, i, e) => (Ye(R, i, "read from private field"), e ? e.call(R) : i.get(R)), d = (R, i, e) => i.has(R) ? Ve("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(R) : i.set(R, e), p = (R, i, e, s) => (Ye(R, i, "write to private field"), s ? s.call(R, e) : i.set(R, e), e);
|
|
9
9
|
var Ue = (R, i, e, s) => ({
|
|
@@ -20,7 +20,7 @@ const He = class He extends Ke.constructor {
|
|
|
20
20
|
super(), this.init("nine-table", "green");
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
c(He, "Trace");
|
|
24
24
|
let oe = He;
|
|
25
25
|
const W = new oe();
|
|
26
26
|
var z, j, w, X, K, Z, It, G, _t;
|
|
@@ -33,19 +33,19 @@ const Me = class Me extends HTMLElement {
|
|
|
33
33
|
d(this, X);
|
|
34
34
|
d(this, K);
|
|
35
35
|
d(this, Z);
|
|
36
|
-
d(this, It, /* @__PURE__ */
|
|
36
|
+
d(this, It, /* @__PURE__ */ c(() => {
|
|
37
37
|
if (!t(this, z)) return;
|
|
38
38
|
const e = t(this, z).querySelector(".ng-container-body .ng-part-body");
|
|
39
39
|
e && (p(this, Z, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
41
|
})), t(this, Z).observe(e));
|
|
42
42
|
}, "#observeResize"));
|
|
43
|
-
E(this, "refresh", /* @__PURE__ */
|
|
43
|
+
E(this, "refresh", /* @__PURE__ */ c(() => {
|
|
44
44
|
if (!t(this, z) || !t(this, w) || t(this, j)) return;
|
|
45
45
|
const e = t(this, w).container, s = e.querySelector("table");
|
|
46
46
|
if (!s) return;
|
|
47
|
-
const r = t(this, w).track, n = t(this, w).thumb, o = t(this, z).querySelector(".ng-container-bottom"), a = e.clientWidth,
|
|
48
|
-
if (a !== 0 &&
|
|
47
|
+
const r = t(this, w).track, n = t(this, w).thumb, o = t(this, z).querySelector(".ng-container-bottom"), a = e.clientWidth, h = s.scrollWidth;
|
|
48
|
+
if (a !== 0 && h > a)
|
|
49
49
|
o && (o.style.display = "flex");
|
|
50
50
|
else {
|
|
51
51
|
o && (o.style.display = "none");
|
|
@@ -53,28 +53,28 @@ const Me = class Me extends HTMLElement {
|
|
|
53
53
|
}
|
|
54
54
|
const l = r.clientWidth;
|
|
55
55
|
if (l <= 0) return;
|
|
56
|
-
const f = Math.max(Math.min(l * (a /
|
|
56
|
+
const f = Math.max(Math.min(l * (a / h), l), 20);
|
|
57
57
|
n.style.width = `${f}px`;
|
|
58
|
-
const u = e.scrollLeft, g =
|
|
58
|
+
const u = e.scrollLeft, g = h - a;
|
|
59
59
|
let b = 0;
|
|
60
60
|
g > 0 && (b = parseInt(u / g * (l - f), 10)), b < 0 && (b = 0);
|
|
61
61
|
const m = l - f;
|
|
62
62
|
b > m && (b = m), n.style.left = `${b}px`, t(this, w).left.disabled = b === 0, t(this, w).right.disabled = b >= m - 1;
|
|
63
63
|
}, "refresh"));
|
|
64
|
-
d(this, G, /* @__PURE__ */
|
|
64
|
+
d(this, G, /* @__PURE__ */ c((e) => {
|
|
65
65
|
if (!t(this, w)) return !1;
|
|
66
66
|
const s = t(this, w).container, r = s.querySelector("table");
|
|
67
67
|
if (!r) return !1;
|
|
68
68
|
const n = t(this, w).track.getBoundingClientRect(), o = t(this, w).thumb.clientWidth;
|
|
69
69
|
let a = e;
|
|
70
70
|
a < 0 && (a = 0);
|
|
71
|
-
const
|
|
72
|
-
a >
|
|
71
|
+
const h = n.width - o;
|
|
72
|
+
a > h && (a = h), a = parseInt(a, 10), t(this, w).thumb.style.left = `${a}px`, t(this, w).left.disabled = a === 0, t(this, w).right.disabled = a >= h - 1;
|
|
73
73
|
const l = s.clientWidth, u = r.scrollWidth - l;
|
|
74
|
-
return
|
|
74
|
+
return h > 0 && u > 0 && (s.scrollLeft = a / h * u), a > 0 && a < h - 1;
|
|
75
75
|
}, "#thumbMoveTo"));
|
|
76
|
-
d(this, _t, /* @__PURE__ */
|
|
77
|
-
const e = /* @__PURE__ */
|
|
76
|
+
d(this, _t, /* @__PURE__ */ c(() => {
|
|
77
|
+
const e = /* @__PURE__ */ c((r) => {
|
|
78
78
|
clearInterval(t(this, X)), clearInterval(t(this, K));
|
|
79
79
|
const n = parseInt(t(this, w).thumb.style.left || 0, 10);
|
|
80
80
|
t(this, G).call(this, n + r), p(this, X, setInterval(() => {
|
|
@@ -83,7 +83,7 @@ const Me = class Me extends HTMLElement {
|
|
|
83
83
|
t(this, G).call(this, o + r) || clearInterval(t(this, K));
|
|
84
84
|
}, 50));
|
|
85
85
|
}, 500));
|
|
86
|
-
}, "delayScroll"), s = /* @__PURE__ */
|
|
86
|
+
}, "delayScroll"), s = /* @__PURE__ */ c(() => {
|
|
87
87
|
clearInterval(t(this, X)), clearInterval(t(this, K));
|
|
88
88
|
}, "clearTimer");
|
|
89
89
|
["mouseup", "mouseleave", "touchend"].forEach((r) => {
|
|
@@ -100,11 +100,11 @@ const Me = class Me extends HTMLElement {
|
|
|
100
100
|
}), t(this, w).thumb.addEventListener("mousedown", (r) => {
|
|
101
101
|
if (r.button !== 0) return;
|
|
102
102
|
r.stopPropagation(), r.preventDefault(), p(this, j, !0), this.shiftX = r.clientX - t(this, w).thumb.getBoundingClientRect().left;
|
|
103
|
-
const n = /* @__PURE__ */
|
|
103
|
+
const n = /* @__PURE__ */ c((a) => {
|
|
104
104
|
if (!t(this, j)) return;
|
|
105
|
-
const
|
|
106
|
-
t(this, G).call(this, a.clientX -
|
|
107
|
-
}, "onMouseMove"), o = /* @__PURE__ */
|
|
105
|
+
const h = t(this, w).track.getBoundingClientRect();
|
|
106
|
+
t(this, G).call(this, a.clientX - h.left - this.shiftX);
|
|
107
|
+
}, "onMouseMove"), o = /* @__PURE__ */ c(() => {
|
|
108
108
|
p(this, j, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
|
|
109
109
|
}, "onMouseUp");
|
|
110
110
|
document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
|
|
@@ -176,7 +176,7 @@ const Me = class Me extends HTMLElement {
|
|
|
176
176
|
<div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
|
|
177
177
|
<button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
|
|
178
178
|
`;
|
|
179
|
-
const e = /* @__PURE__ */
|
|
179
|
+
const e = /* @__PURE__ */ c(() => {
|
|
180
180
|
const s = t(this, z).querySelector(".ng-container-body .ng-part-body");
|
|
181
181
|
if (!s) {
|
|
182
182
|
setTimeout(e, 10);
|
|
@@ -198,7 +198,7 @@ const Me = class Me extends HTMLElement {
|
|
|
198
198
|
t(this, Z) && t(this, Z).disconnect();
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
z = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), It = new WeakMap(), G = new WeakMap(), _t = new WeakMap(),
|
|
201
|
+
z = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), It = new WeakMap(), G = new WeakMap(), _t = new WeakMap(), c(Me, "NineTableHScrollBar");
|
|
202
202
|
let ae = Me;
|
|
203
203
|
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ae);
|
|
204
204
|
var F, at, J, q, vt, xt, Nt;
|
|
@@ -211,9 +211,9 @@ const $e = class $e extends HTMLElement {
|
|
|
211
211
|
d(this, q);
|
|
212
212
|
d(this, vt, 0);
|
|
213
213
|
d(this, xt, 0);
|
|
214
|
-
E(this, "refresh", /* @__PURE__ */
|
|
214
|
+
E(this, "refresh", /* @__PURE__ */ c(() => {
|
|
215
215
|
if (!t(this, F) || !t(this, q)) return;
|
|
216
|
-
const e = t(this, q).container, s = t(this, q).track, r = t(this, q).thumb, n = e.clientHeight, a = (t(this, F).data.get() || []).length,
|
|
216
|
+
const e = t(this, q).container, s = t(this, q).track, r = t(this, q).thumb, n = e.clientHeight, a = (t(this, F).data.get() || []).length, h = t(this, at).getRowHeight(), l = a * h;
|
|
217
217
|
if (l <= n) {
|
|
218
218
|
r.style.display = "none", t(this, q).top.disabled = !0, t(this, q).bottom.disabled = !0;
|
|
219
219
|
return;
|
|
@@ -229,9 +229,9 @@ const $e = class $e extends HTMLElement {
|
|
|
229
229
|
const x = f - u;
|
|
230
230
|
m < 0 && (m = 0), m > x && (m = x), r.style.top = `${m}px`, t(this, q).top.disabled = g <= 0, t(this, q).bottom.disabled = g >= b - 1;
|
|
231
231
|
}, "refresh"));
|
|
232
|
-
d(this, Nt, /* @__PURE__ */
|
|
232
|
+
d(this, Nt, /* @__PURE__ */ c(() => {
|
|
233
233
|
W.log("nine-table-vscrollbar.#init");
|
|
234
|
-
const e = t(this, q).container, s = /* @__PURE__ */
|
|
234
|
+
const e = t(this, q).container, s = /* @__PURE__ */ c(() => {
|
|
235
235
|
const n = (t(this, F).data.get() || []).length, o = t(this, at).getRowHeight();
|
|
236
236
|
return n * o;
|
|
237
237
|
}, "getContentHeight");
|
|
@@ -240,9 +240,9 @@ const $e = class $e extends HTMLElement {
|
|
|
240
240
|
}), t(this, q).thumb.addEventListener("mousedown", (r) => {
|
|
241
241
|
if (r.button !== 0) return;
|
|
242
242
|
r.stopPropagation(), r.preventDefault(), p(this, J, !0), p(this, vt, r.clientY), p(this, xt, e.scrollTop);
|
|
243
|
-
const n = /* @__PURE__ */
|
|
243
|
+
const n = /* @__PURE__ */ c((a) => {
|
|
244
244
|
if (!t(this, J)) return;
|
|
245
|
-
const
|
|
245
|
+
const h = t(this, q).track.getBoundingClientRect(), l = t(this, q).thumb.clientHeight, u = h.height - l, g = a.clientY - t(this, vt), b = e.clientHeight, m = s(), x = Math.max(m - b, 1);
|
|
246
246
|
if (u > 0 && x > 0) {
|
|
247
247
|
const A = g / u * x;
|
|
248
248
|
let v = t(this, xt) + A;
|
|
@@ -250,7 +250,7 @@ const $e = class $e extends HTMLElement {
|
|
|
250
250
|
v < 0 && (v = 0), v > M && (v = M), e.scrollTop = v;
|
|
251
251
|
}
|
|
252
252
|
this.refresh();
|
|
253
|
-
}, "onMouseMove"), o = /* @__PURE__ */
|
|
253
|
+
}, "onMouseMove"), o = /* @__PURE__ */ c(() => {
|
|
254
254
|
p(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
|
|
255
255
|
}, "onMouseUp");
|
|
256
256
|
document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
|
|
@@ -334,7 +334,7 @@ const $e = class $e extends HTMLElement {
|
|
|
334
334
|
<div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
|
|
335
335
|
<button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
|
|
336
336
|
`;
|
|
337
|
-
const e = /* @__PURE__ */
|
|
337
|
+
const e = /* @__PURE__ */ c(() => {
|
|
338
338
|
const s = t(this, F).shadowRoot.querySelector(".ng-container-body .ng-part-body");
|
|
339
339
|
if (!s) {
|
|
340
340
|
setTimeout(e, 10);
|
|
@@ -351,7 +351,7 @@ const $e = class $e extends HTMLElement {
|
|
|
351
351
|
e();
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
|
-
F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), q = new WeakMap(), vt = new WeakMap(), xt = new WeakMap(), Nt = new WeakMap(),
|
|
354
|
+
F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), q = new WeakMap(), vt = new WeakMap(), xt = new WeakMap(), Nt = new WeakMap(), c($e, "NineTableVScrollBar");
|
|
355
355
|
let le = $e;
|
|
356
356
|
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
|
|
357
357
|
var P, S, Q, D, I, V, tt, wt, Se, Ae, Wt, Ot, Bt, St, At, zt, Dt, Et, Ee, lt, Rt, Pt;
|
|
@@ -369,22 +369,22 @@ const Ie = class Ie {
|
|
|
369
369
|
d(this, Ae, !1);
|
|
370
370
|
//#ticking = false; // 🎯 고속 스크롤 스로틀링용 플래그
|
|
371
371
|
d(this, Wt, 3);
|
|
372
|
-
E(this, "refresh", /* @__PURE__ */
|
|
372
|
+
E(this, "refresh", /* @__PURE__ */ c(() => {
|
|
373
373
|
var e;
|
|
374
374
|
W.log("rowManager.refresh");
|
|
375
375
|
const i = t(this, S).querySelector(".ng-container-body .ng-part-body");
|
|
376
376
|
i && (t(this, St).call(this), t(this, lt).call(this, i.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
|
|
377
377
|
}, "refresh"));
|
|
378
|
-
E(this, "initialize", /* @__PURE__ */
|
|
378
|
+
E(this, "initialize", /* @__PURE__ */ c(() => {
|
|
379
379
|
W.log("rowManager.initialize"), p(this, Q, {
|
|
380
380
|
scrollTables: t(this, S).querySelectorAll(".ng-part-body table"),
|
|
381
381
|
firstTr: t(this, S).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
|
|
382
382
|
}), p(this, I, null), t(this, D).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
|
|
383
383
|
const a = t(this, S).querySelector(o);
|
|
384
384
|
if (!a) return;
|
|
385
|
-
const
|
|
386
|
-
if (!
|
|
387
|
-
const l =
|
|
385
|
+
const h = a.querySelector(".ng-part-body table");
|
|
386
|
+
if (!h) return;
|
|
387
|
+
const l = h.querySelector("tbody.bindable-tbody");
|
|
388
388
|
if (!l) return;
|
|
389
389
|
const u = Array.from(l.querySelectorAll("tr")).map((g) => g.cloneNode(!0));
|
|
390
390
|
t(this, D).set(o, u);
|
|
@@ -393,20 +393,20 @@ const Ie = class Ie {
|
|
|
393
393
|
if (i) {
|
|
394
394
|
t(this, Bt).call(this, i), t(this, Et).call(this), t(this, St).call(this), t(this, lt).call(this, i.scrollTop);
|
|
395
395
|
let o = !1;
|
|
396
|
-
const a = /* @__PURE__ */
|
|
396
|
+
const a = /* @__PURE__ */ c((h) => {
|
|
397
397
|
if (o) return;
|
|
398
398
|
o = !0;
|
|
399
|
-
const l =
|
|
399
|
+
const l = h.scrollTop, f = h.scrollLeft;
|
|
400
400
|
i && i.scrollTop !== l && (i.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), n && n.scrollLeft !== f && (n.scrollLeft = f), t(this, lt).call(this, l), o = !1;
|
|
401
401
|
}, "handleContainerScroll");
|
|
402
|
-
[i, e, s].forEach((
|
|
403
|
-
|
|
404
|
-
a(
|
|
402
|
+
[i, e, s].forEach((h) => {
|
|
403
|
+
h && h.addEventListener("scroll", () => {
|
|
404
|
+
a(h);
|
|
405
405
|
}, { passive: !0 });
|
|
406
406
|
});
|
|
407
407
|
}
|
|
408
408
|
}, "initialize"));
|
|
409
|
-
d(this, Ot, /* @__PURE__ */
|
|
409
|
+
d(this, Ot, /* @__PURE__ */ c((i, e) => {
|
|
410
410
|
W.log("rowManager.#renderRows");
|
|
411
411
|
const s = t(this, D).get(e);
|
|
412
412
|
if (!s || s.length === 0) return;
|
|
@@ -415,12 +415,12 @@ const Ie = class Ie {
|
|
|
415
415
|
r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
|
|
416
416
|
const n = r.querySelector("tr.nodata"), o = document.createDocumentFragment();
|
|
417
417
|
for (let a = 0; a < t(this, wt); a++)
|
|
418
|
-
s.forEach((
|
|
419
|
-
o.appendChild(
|
|
418
|
+
s.forEach((h) => {
|
|
419
|
+
o.appendChild(h.cloneNode(!0));
|
|
420
420
|
});
|
|
421
421
|
n ? n.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
|
|
422
422
|
}, "#renderRows"));
|
|
423
|
-
d(this, Bt, /* @__PURE__ */
|
|
423
|
+
d(this, Bt, /* @__PURE__ */ c((i) => {
|
|
424
424
|
if (W.log("rowManager.#measureAndCacheHeight"), t(this, I) !== null && t(this, I) > 0)
|
|
425
425
|
return t(this, I);
|
|
426
426
|
W.log("#measureAndCacheHeight");
|
|
@@ -433,15 +433,15 @@ const Ie = class Ie {
|
|
|
433
433
|
e.forEach((g) => {
|
|
434
434
|
n.appendChild(g.cloneNode(!0));
|
|
435
435
|
}), r ? r.before(n) : s.appendChild(n);
|
|
436
|
-
const o = t(this, S), a = o.style.display,
|
|
436
|
+
const o = t(this, S), a = o.style.display, h = o.style.visibility, l = o.style.position;
|
|
437
437
|
(a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
|
|
438
438
|
let f = 0;
|
|
439
439
|
const u = s.querySelectorAll("tr:not(.nodata)");
|
|
440
440
|
return u.forEach((g) => {
|
|
441
441
|
f += g.offsetHeight || g.getBoundingClientRect().height;
|
|
442
|
-
}), u.forEach((g) => g.remove()), o.style.display = a, o.style.visibility =
|
|
442
|
+
}), u.forEach((g) => g.remove()), o.style.display = a, o.style.visibility = h, o.style.position = l, p(this, I, f > 0 ? f : 24), t(this, At).call(this), t(this, I);
|
|
443
443
|
}, "#measureAndCacheHeight"));
|
|
444
|
-
d(this, St, /* @__PURE__ */
|
|
444
|
+
d(this, St, /* @__PURE__ */ c(() => {
|
|
445
445
|
W.log("rowManager.#updateVirtualScrollHeight");
|
|
446
446
|
const e = (t(this, P).data.get() || []).length, s = t(this, I), r = e * s;
|
|
447
447
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
|
|
@@ -451,21 +451,21 @@ const Ie = class Ie {
|
|
|
451
451
|
a && (a.style.height = `${r}px`);
|
|
452
452
|
});
|
|
453
453
|
}, "#updateVirtualScrollHeight"));
|
|
454
|
-
d(this, At, /* @__PURE__ */
|
|
454
|
+
d(this, At, /* @__PURE__ */ c(() => {
|
|
455
455
|
if (t(this, tt) > 0 && t(this, I) > 0) {
|
|
456
456
|
const i = Math.ceil(t(this, tt) / t(this, I));
|
|
457
457
|
p(this, wt, i + t(this, Wt));
|
|
458
458
|
}
|
|
459
459
|
}, "#updateRowCount"));
|
|
460
|
-
d(this, zt, /* @__PURE__ */
|
|
461
|
-
var a,
|
|
460
|
+
d(this, zt, /* @__PURE__ */ c(() => {
|
|
461
|
+
var a, h, l, f, u, g;
|
|
462
462
|
const i = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
|
|
463
463
|
if (e) {
|
|
464
464
|
const b = i ? Array.from(i.querySelectorAll("tbody tr")) : [], m = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(b.length, m.length, x.length);
|
|
465
465
|
for (let v = 0; v < A; v++) {
|
|
466
466
|
const M = [
|
|
467
467
|
((a = b[v]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
|
|
468
|
-
((
|
|
468
|
+
((h = m[v]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
|
|
469
469
|
((l = x[v]) == null ? void 0 : l.getBoundingClientRect().height) || 0
|
|
470
470
|
], T = Math.max(...M);
|
|
471
471
|
T > 0 && (b[v] && (b[v].style.height = `${T}px`), m[v] && (m[v].style.height = `${T}px`), x[v] && (x[v].style.height = `${T}px`));
|
|
@@ -484,7 +484,7 @@ const Ie = class Ie {
|
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
}, "#syncRowHeights"));
|
|
487
|
-
d(this, Dt, /* @__PURE__ */
|
|
487
|
+
d(this, Dt, /* @__PURE__ */ c(() => {
|
|
488
488
|
!t(this, S) || !(t(this, S) instanceof HTMLElement) || (p(this, V, new ResizeObserver((i) => {
|
|
489
489
|
for (const e of i) {
|
|
490
490
|
const s = e.target;
|
|
@@ -494,29 +494,29 @@ const Ie = class Ie {
|
|
|
494
494
|
let n = 0;
|
|
495
495
|
const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
|
|
496
496
|
o && (n += o.offsetHeight), a && (n += a.offsetHeight);
|
|
497
|
-
const
|
|
498
|
-
t(this, tt) !==
|
|
497
|
+
const h = Math.max(r - n, 100);
|
|
498
|
+
t(this, tt) !== h && (p(this, tt, h), t(this, At).call(this), t(this, I) !== null && (t(this, Et).call(this), this.refresh()));
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
501
|
})), t(this, V).observe(t(this, S)));
|
|
502
502
|
}, "#initResizeObserver"));
|
|
503
|
-
d(this, Et, /* @__PURE__ */
|
|
503
|
+
d(this, Et, /* @__PURE__ */ c(() => {
|
|
504
504
|
W.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
|
|
505
505
|
const e = t(this, S).querySelector(i);
|
|
506
506
|
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ot).call(this, e, i);
|
|
507
507
|
}), t(this, Pt).call(this), t(this, zt).call(this);
|
|
508
508
|
}, "#renderAllContainers"));
|
|
509
|
-
d(this, Ee, /* @__PURE__ */
|
|
509
|
+
d(this, Ee, /* @__PURE__ */ c((i) => {
|
|
510
510
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
|
|
511
511
|
var l;
|
|
512
512
|
const s = t(this, S).querySelector(e);
|
|
513
513
|
if (!s) return;
|
|
514
514
|
const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
515
515
|
if (!r) return;
|
|
516
|
-
const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, D).get(e)) == null ? void 0 : l.length) || 1,
|
|
516
|
+
const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, D).get(e)) == null ? void 0 : l.length) || 1, h = (t(this, P).data.get() || []).length;
|
|
517
517
|
n.forEach((f, u) => {
|
|
518
518
|
const g = i + Math.floor(u / o);
|
|
519
|
-
if (g >=
|
|
519
|
+
if (g >= h) {
|
|
520
520
|
f.style.display = "none";
|
|
521
521
|
return;
|
|
522
522
|
}
|
|
@@ -525,13 +525,13 @@ const Ie = class Ie {
|
|
|
525
525
|
});
|
|
526
526
|
});
|
|
527
527
|
}, "#adjustBufferRows"));
|
|
528
|
-
d(this, lt, /* @__PURE__ */
|
|
528
|
+
d(this, lt, /* @__PURE__ */ c((i) => {
|
|
529
529
|
var f, u;
|
|
530
530
|
const e = t(this, I);
|
|
531
531
|
if (!e || e <= 0) return;
|
|
532
532
|
const s = t(this, P).data.length;
|
|
533
533
|
if (s === 0) return;
|
|
534
|
-
const r = ((f = t(this, D).get(".ng-container-body")) == null ? void 0 : f.length) || 1, n = Math.max(0, s - 1), o = Math.min(n, Math.max(0, Math.floor(i / e))), a = Math.floor(o * e),
|
|
534
|
+
const r = ((f = t(this, D).get(".ng-container-body")) == null ? void 0 : f.length) || 1, n = Math.max(0, s - 1), o = Math.min(n, Math.max(0, Math.floor(i / e))), a = Math.floor(o * e), h = t(this, Q).firstTr, l = h && h.dataset.row !== void 0 ? parseInt(h.dataset.row, 10) : -1;
|
|
535
535
|
(u = t(this, Q)) == null || u.scrollTables.forEach((g) => {
|
|
536
536
|
g.style.transform = `translate3d(0, ${a}px, 0)`;
|
|
537
537
|
}), l !== o && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
|
|
@@ -564,29 +564,29 @@ const Ie = class Ie {
|
|
|
564
564
|
cell.dataset.row = dataIndex;
|
|
565
565
|
});
|
|
566
566
|
}; */
|
|
567
|
-
d(this, Rt, /* @__PURE__ */
|
|
567
|
+
d(this, Rt, /* @__PURE__ */ c((i, e, s) => {
|
|
568
568
|
i.dataset.row = s, i.data = e, Array.from(i.cells).forEach((r, n) => {
|
|
569
569
|
r.dataset.row = s;
|
|
570
570
|
const o = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
|
|
571
571
|
o && typeof o.refresh == "function" && o.refresh();
|
|
572
572
|
});
|
|
573
573
|
}, "#bindRowData"));
|
|
574
|
-
d(this, Pt, /* @__PURE__ */
|
|
575
|
-
var
|
|
574
|
+
d(this, Pt, /* @__PURE__ */ c(() => {
|
|
575
|
+
var h, l, f;
|
|
576
576
|
W.log("rowManager.#syncHeaderHeights");
|
|
577
577
|
const i = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), s = t(this, S).querySelector(".ng-container-right .ng-part-header table");
|
|
578
578
|
if (!e) return;
|
|
579
579
|
const r = i ? Array.from(i.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, n.length, o.length);
|
|
580
580
|
for (let u = 0; u < a; u++) {
|
|
581
581
|
const g = [
|
|
582
|
-
((
|
|
582
|
+
((h = r[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
|
|
583
583
|
((l = n[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
|
|
584
584
|
((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
|
|
585
585
|
], b = Math.max(...g);
|
|
586
586
|
b > 0 && (r[u] && (r[u].style.height = `${b}px`), n[u] && (n[u].style.height = `${b}px`), o[u] && (o[u].style.height = `${b}px`));
|
|
587
587
|
}
|
|
588
588
|
}, "#syncHeaderHeights"));
|
|
589
|
-
E(this, "destroy", /* @__PURE__ */
|
|
589
|
+
E(this, "destroy", /* @__PURE__ */ c(() => {
|
|
590
590
|
t(this, V) && (t(this, V).disconnect(), p(this, V, null));
|
|
591
591
|
}, "destroy"));
|
|
592
592
|
p(this, P, i.getRootNode().host), p(this, S, i), t(this, Dt).call(this);
|
|
@@ -599,7 +599,7 @@ const Ie = class Ie {
|
|
|
599
599
|
return ((e = t(this, D).get(i)) == null ? void 0 : e.length) || 1;
|
|
600
600
|
}
|
|
601
601
|
};
|
|
602
|
-
P = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), D = new WeakMap(), I = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ae = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), At = new WeakMap(), zt = new WeakMap(), Dt = new WeakMap(), Et = new WeakMap(), Ee = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), Pt = new WeakMap(),
|
|
602
|
+
P = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), D = new WeakMap(), I = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ae = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), At = new WeakMap(), zt = new WeakMap(), Dt = new WeakMap(), Et = new WeakMap(), Ee = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), Pt = new WeakMap(), c(Ie, "RowManager");
|
|
603
603
|
let ce = Ie;
|
|
604
604
|
const jt = class jt {
|
|
605
605
|
/**
|
|
@@ -613,7 +613,7 @@ const jt = class jt {
|
|
|
613
613
|
*/
|
|
614
614
|
static compile(i) {
|
|
615
615
|
if (!i) return null;
|
|
616
|
-
const e = /* @__PURE__ */
|
|
616
|
+
const e = /* @__PURE__ */ c((a) => {
|
|
617
617
|
a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
|
|
618
618
|
const f = l.getAttribute("cell-type") || "renderer";
|
|
619
619
|
if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
|
|
@@ -622,9 +622,9 @@ const jt = class jt {
|
|
|
622
622
|
let A = [];
|
|
623
623
|
g && A.push(`data-bind="${g}"`), b && A.push(`data-expr="${b}"`), m && A.push(`maxbyte="${m}"`), x && A.push(`type="${x}"`), l.innerHTML = `<${u} ${A.join(" ")}></${u}>`;
|
|
624
624
|
});
|
|
625
|
-
}, "processCellTypes"), s = /* @__PURE__ */
|
|
625
|
+
}, "processCellTypes"), s = /* @__PURE__ */ c((a) => {
|
|
626
626
|
if (!a.querySelector("colgroup")) {
|
|
627
|
-
const
|
|
627
|
+
const h = a.querySelector("tbody tr") || a.querySelector("tr"), l = h ? h.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(a.clientWidth / l), 100);
|
|
628
628
|
for (let g = 0; g < l; g++) {
|
|
629
629
|
const b = document.createElement("col");
|
|
630
630
|
b.setAttribute("width", u), f.appendChild(b);
|
|
@@ -632,12 +632,12 @@ const jt = class jt {
|
|
|
632
632
|
a.prepend(f);
|
|
633
633
|
}
|
|
634
634
|
if (!a.querySelector("thead")) {
|
|
635
|
-
const
|
|
636
|
-
l ? l.after(
|
|
635
|
+
const h = document.createElement("thead"), l = a.querySelector("colgroup");
|
|
636
|
+
l ? l.after(h) : a.prepend(h);
|
|
637
637
|
}
|
|
638
638
|
a.classList.add("nine-table-element"), a.style.display = "table";
|
|
639
|
-
}, "ensureTableStructure"), r = /* @__PURE__ */
|
|
640
|
-
const l = Array.from(a.querySelectorAll(
|
|
639
|
+
}, "ensureTableStructure"), r = /* @__PURE__ */ c((a, h) => {
|
|
640
|
+
const l = Array.from(a.querySelectorAll(h + " tr")), f = Array.from(a.querySelectorAll(h + " th," + h + " td")), u = l.length;
|
|
641
641
|
if (u === 0 || f.length === 0) return;
|
|
642
642
|
let g = 0;
|
|
643
643
|
f.forEach((m) => {
|
|
@@ -669,16 +669,16 @@ const jt = class jt {
|
|
|
669
669
|
});
|
|
670
670
|
});
|
|
671
671
|
}, "resetColIndex"), n = i.cloneNode(!0);
|
|
672
|
-
return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((a,
|
|
672
|
+
return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((a, h) => {
|
|
673
673
|
const l = a.getAttribute("fixed");
|
|
674
|
-
l && n.querySelectorAll(`thead [data-col="${
|
|
674
|
+
l && n.querySelectorAll(`thead [data-col="${h}"], tbody [data-col="${h}"], tfoot [data-col="${h}"]`).forEach((f) => {
|
|
675
675
|
f.setAttribute("fixed", l);
|
|
676
676
|
});
|
|
677
677
|
}), n;
|
|
678
678
|
}
|
|
679
679
|
// 🎯 [추가] td/th에 선언된 cell-type 속성을 읽어 커스텀 태그로 자동 감싸기
|
|
680
680
|
};
|
|
681
|
-
|
|
681
|
+
c(jt, "TableCompiler");
|
|
682
682
|
let he = jt;
|
|
683
683
|
var Ft, et, st, Vt, Yt, ct, Ut, Xt;
|
|
684
684
|
const yt = class yt extends HTMLElement {
|
|
@@ -687,21 +687,20 @@ const yt = class yt extends HTMLElement {
|
|
|
687
687
|
d(this, Ft);
|
|
688
688
|
d(this, et, null);
|
|
689
689
|
d(this, st);
|
|
690
|
-
E(this, "invalidate", /* @__PURE__ */
|
|
690
|
+
E(this, "invalidate", /* @__PURE__ */ c(() => {
|
|
691
691
|
t(this, st).refresh();
|
|
692
692
|
}, "invalidate"));
|
|
693
|
-
d(this, Vt, /* @__PURE__ */
|
|
693
|
+
d(this, Vt, /* @__PURE__ */ c(() => {
|
|
694
694
|
[
|
|
695
695
|
{ selector: ".ng-container-body", type: null },
|
|
696
696
|
{ selector: ".ng-container-left", type: "left" },
|
|
697
697
|
{ selector: ".ng-container-right", type: "right" }
|
|
698
698
|
].forEach(({ selector: s, type: r }) => {
|
|
699
|
-
var o, a
|
|
700
|
-
|
|
701
|
-
(o = this.querySelector(`${s} .ng-part-header`)) == null || o.appendChild(t(this, ct).call(this, t(this, et), r, "header")), (a = this.querySelector(`${s} .ng-scroll-content`)) == null || a.insertBefore(t(this, ct).call(this, t(this, et), r, "body"), n), (c = this.querySelector(`${s} .ng-part-footer`)) == null || c.appendChild(t(this, ct).call(this, t(this, et), r, "footer"));
|
|
699
|
+
var n, o, a;
|
|
700
|
+
(n = this.querySelector(`${s} .ng-part-header`)) == null || n.appendChild(t(this, ct).call(this, t(this, et), r, "header")), (o = this.querySelector(`${s} .ng-virtual-spacer`)) == null || o.before(t(this, ct).call(this, t(this, et), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, ct).call(this, t(this, et), r, "footer"));
|
|
702
701
|
});
|
|
703
702
|
}, "#renderSplitContainers"));
|
|
704
|
-
d(this, Yt, /* @__PURE__ */
|
|
703
|
+
d(this, Yt, /* @__PURE__ */ c(() => {
|
|
705
704
|
["left", "right", "body"].forEach((e) => {
|
|
706
705
|
const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
|
|
707
706
|
if (!s || !r || r.length === 0) return;
|
|
@@ -712,20 +711,20 @@ const yt = class yt extends HTMLElement {
|
|
|
712
711
|
}), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${n}px`, s.style.width = `${n}px`);
|
|
713
712
|
});
|
|
714
713
|
}, "#updateContainerWidths"));
|
|
715
|
-
E(this, "generate", /* @__PURE__ */
|
|
714
|
+
E(this, "generate", /* @__PURE__ */ c((e) => {
|
|
716
715
|
e && (p(this, et, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this), t(this, st).initialize(), setTimeout(() => {
|
|
717
716
|
var s;
|
|
718
717
|
(s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
|
|
719
718
|
}, 0));
|
|
720
719
|
}, "generate"));
|
|
721
|
-
d(this, ct, /* @__PURE__ */
|
|
722
|
-
const n = e.cloneNode(!0), o = n.querySelector("thead"), a = n.querySelector("tbody"),
|
|
720
|
+
d(this, ct, /* @__PURE__ */ c((e, s, r) => {
|
|
721
|
+
const n = e.cloneNode(!0), o = n.querySelector("thead"), a = n.querySelector("tbody"), h = n.querySelector("tfoot");
|
|
723
722
|
if (r === "header") {
|
|
724
|
-
if (a && a.remove(),
|
|
723
|
+
if (a && a.remove(), h && h.remove(), e.querySelector("tbody")) {
|
|
725
724
|
const f = document.createElement("tbody");
|
|
726
725
|
f.className = "fixed-tbody", n.appendChild(f);
|
|
727
726
|
}
|
|
728
|
-
} else r === "body" ? (o && o.remove(),
|
|
727
|
+
} else r === "body" ? (o && o.remove(), h && h.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
|
|
729
728
|
return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
|
|
730
729
|
l.getAttribute("fixed") !== "left" && l.remove();
|
|
731
730
|
}) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
|
|
@@ -734,19 +733,19 @@ const yt = class yt extends HTMLElement {
|
|
|
734
733
|
l.remove();
|
|
735
734
|
}), n;
|
|
736
735
|
}, "#createSplitTable"));
|
|
737
|
-
E(this, "getRowHeight", /* @__PURE__ */
|
|
738
|
-
E(this, "scrollToX", /* @__PURE__ */
|
|
736
|
+
E(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, st).getRowHeight(), "getRowHeight"));
|
|
737
|
+
E(this, "scrollToX", /* @__PURE__ */ c((e) => {
|
|
739
738
|
const s = this.querySelector(".ng-container-body .ng-part-body");
|
|
740
739
|
s && (s.scrollLeft = e);
|
|
741
740
|
}, "scrollToX"));
|
|
742
|
-
E(this, "scrollToY", /* @__PURE__ */
|
|
741
|
+
E(this, "scrollToY", /* @__PURE__ */ c((e) => {
|
|
743
742
|
const s = this.querySelector(".ng-container-body .ng-part-body");
|
|
744
743
|
s && (s.scrollTop = e);
|
|
745
744
|
}, "scrollToY"));
|
|
746
|
-
d(this, Ut, /* @__PURE__ */
|
|
745
|
+
d(this, Ut, /* @__PURE__ */ c(() => {
|
|
747
746
|
t(this, Xt).call(this);
|
|
748
747
|
}, "#init"));
|
|
749
|
-
d(this, Xt, /* @__PURE__ */
|
|
748
|
+
d(this, Xt, /* @__PURE__ */ c(() => {
|
|
750
749
|
const e = yt.SCROLLBAR_SIZE;
|
|
751
750
|
this.innerHTML = `
|
|
752
751
|
<style>
|
|
@@ -939,14 +938,14 @@ const yt = class yt extends HTMLElement {
|
|
|
939
938
|
this.innerHTML = "", W.log("NineTableSheet destroyed.");
|
|
940
939
|
}
|
|
941
940
|
};
|
|
942
|
-
Ft = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(),
|
|
941
|
+
Ft = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), c(yt, "NineTableSheet"), E(yt, "SCROLLBAR_SIZE", 16);
|
|
943
942
|
let $t = yt;
|
|
944
943
|
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", $t);
|
|
945
944
|
var Kt, qt;
|
|
946
945
|
const _e = class _e extends HTMLElement {
|
|
947
946
|
constructor() {
|
|
948
947
|
super();
|
|
949
|
-
d(this, Kt, /* @__PURE__ */
|
|
948
|
+
d(this, Kt, /* @__PURE__ */ c(() => {
|
|
950
949
|
var e;
|
|
951
950
|
(e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
|
|
952
951
|
var o;
|
|
@@ -954,8 +953,8 @@ const _e = class _e extends HTMLElement {
|
|
|
954
953
|
t(this, qt).call(this, n, r);
|
|
955
954
|
}), t(this, qt).call(this, 0, !1);
|
|
956
955
|
}, "#init"));
|
|
957
|
-
d(this, qt, /* @__PURE__ */
|
|
958
|
-
const r = /* @__PURE__ */
|
|
956
|
+
d(this, qt, /* @__PURE__ */ c((e, s = !1) => {
|
|
957
|
+
const r = /* @__PURE__ */ c(() => {
|
|
959
958
|
const f = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
960
959
|
Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
|
|
961
960
|
const g = f.filter((b) => b.classList.contains("active"));
|
|
@@ -963,12 +962,12 @@ const _e = class _e extends HTMLElement {
|
|
|
963
962
|
const m = parseInt(b.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${m}"]`), A = f[m + 1];
|
|
964
963
|
x && A && A.classList.contains("active") && x.style.setProperty("display", "flex");
|
|
965
964
|
});
|
|
966
|
-
}, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = n.querySelectorAll(".nine-tab-item"),
|
|
965
|
+
}, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = n.querySelectorAll(".nine-tab-item"), h = o.querySelectorAll("nine-table-sheet");
|
|
967
966
|
if (!a[e]) return;
|
|
968
967
|
if (!s)
|
|
969
968
|
a.forEach((f, u) => {
|
|
970
969
|
f.classList.toggle("active", u === e);
|
|
971
|
-
}),
|
|
970
|
+
}), h.forEach((f, u) => {
|
|
972
971
|
const g = u === e;
|
|
973
972
|
f.classList.toggle("active", g), f.style.flex = g ? "1 1 100%" : "";
|
|
974
973
|
});
|
|
@@ -990,31 +989,31 @@ const _e = class _e extends HTMLElement {
|
|
|
990
989
|
t(this, Kt).call(this);
|
|
991
990
|
}
|
|
992
991
|
};
|
|
993
|
-
Kt = new WeakMap(), qt = new WeakMap(),
|
|
992
|
+
Kt = new WeakMap(), qt = new WeakMap(), c(_e, "NineTableSheets");
|
|
994
993
|
let de = _e;
|
|
995
994
|
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
|
|
996
995
|
var H, Zt, Tt, Gt;
|
|
997
996
|
const Ne = class Ne {
|
|
998
997
|
constructor(i) {
|
|
999
998
|
d(this, H);
|
|
1000
|
-
d(this, Zt, /* @__PURE__ */
|
|
999
|
+
d(this, Zt, /* @__PURE__ */ c(() => {
|
|
1001
1000
|
t(this, Gt).call(this), new ResizeObserver((i) => {
|
|
1002
1001
|
for (let e of i)
|
|
1003
1002
|
t(this, H).getAttribute("auto-height") === "true" && t(this, Tt).call(this);
|
|
1004
1003
|
}).observe(t(this, H));
|
|
1005
1004
|
}, "#init"));
|
|
1006
|
-
d(this, Tt, /* @__PURE__ */
|
|
1007
|
-
var
|
|
1005
|
+
d(this, Tt, /* @__PURE__ */ c(() => {
|
|
1006
|
+
var h, l;
|
|
1008
1007
|
const i = Array.from(t(this, H).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
1009
1008
|
if (i.length === 0) return;
|
|
1010
|
-
const e = parseInt(t(this, H).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (
|
|
1009
|
+
const e = parseInt(t(this, H).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (h = t(this, H).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, n = (l = t(this, H).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = $t.SCROLLBAR_SIZE, a = e * s + r + n + o;
|
|
1011
1010
|
t(this, H).style.height = `${a}px`;
|
|
1012
1011
|
}, "#applyAutoHeight"));
|
|
1013
|
-
d(this, Gt, /* @__PURE__ */
|
|
1014
|
-
const e = Array.from(t(this, H).children).filter((
|
|
1012
|
+
d(this, Gt, /* @__PURE__ */ c(() => {
|
|
1013
|
+
const e = Array.from(t(this, H).children).filter((h) => h.tagName === "TABLE"), s = t(this, H).getAttribute("auto-height") === "true", r = e.length, n = e.map((h, l) => {
|
|
1015
1014
|
const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, g = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
|
|
1016
1015
|
return u + g;
|
|
1017
|
-
}).join(""), o = e.map((
|
|
1016
|
+
}).join(""), o = e.map((h, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
|
|
1018
1017
|
t(this, H).shadowRoot.innerHTML = `
|
|
1019
1018
|
<style>
|
|
1020
1019
|
:host {
|
|
@@ -1124,23 +1123,23 @@ const Ne = class Ne {
|
|
|
1124
1123
|
<nine-table-footer></nine-table-footer>
|
|
1125
1124
|
`, t(this, H).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
|
|
1126
1125
|
const a = t(this, H).shadowRoot.querySelectorAll("nine-table-sheet");
|
|
1127
|
-
a == null || a.forEach((
|
|
1126
|
+
a == null || a.forEach((h, l) => {
|
|
1128
1127
|
e[l] && setTimeout(() => {
|
|
1129
|
-
|
|
1128
|
+
h.generate(e[l]), s && t(this, Tt).call(this);
|
|
1130
1129
|
});
|
|
1131
1130
|
});
|
|
1132
1131
|
}, "#render"));
|
|
1133
1132
|
p(this, H, i), t(this, Zt).call(this);
|
|
1134
1133
|
}
|
|
1135
1134
|
};
|
|
1136
|
-
H = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Gt = new WeakMap(),
|
|
1135
|
+
H = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Gt = new WeakMap(), c(Ne, "LayoutManager");
|
|
1137
1136
|
let fe = Ne;
|
|
1138
1137
|
var kt, ht;
|
|
1139
1138
|
const We = class We {
|
|
1140
1139
|
constructor(i) {
|
|
1141
1140
|
d(this, kt);
|
|
1142
1141
|
d(this, ht, -1);
|
|
1143
|
-
E(this, "count", /* @__PURE__ */
|
|
1142
|
+
E(this, "count", /* @__PURE__ */ c(() => t(this, kt).rawRecords.length, "count"));
|
|
1144
1143
|
p(this, kt, i);
|
|
1145
1144
|
}
|
|
1146
1145
|
get at() {
|
|
@@ -1151,7 +1150,7 @@ const We = class We {
|
|
|
1151
1150
|
});
|
|
1152
1151
|
}
|
|
1153
1152
|
};
|
|
1154
|
-
kt = new WeakMap(), ht = new WeakMap(),
|
|
1153
|
+
kt = new WeakMap(), ht = new WeakMap(), c(We, "ngRow");
|
|
1155
1154
|
let ue = We;
|
|
1156
1155
|
var _, k, N, dt, Jt, Y, Qt, it, Ct, te, ee, ft;
|
|
1157
1156
|
const O = class O {
|
|
@@ -1162,7 +1161,7 @@ const O = class O {
|
|
|
1162
1161
|
d(this, dt, []);
|
|
1163
1162
|
d(this, Jt, 0);
|
|
1164
1163
|
d(this, Y, []);
|
|
1165
|
-
d(this, Qt, /* @__PURE__ */
|
|
1164
|
+
d(this, Qt, /* @__PURE__ */ c(() => {
|
|
1166
1165
|
p(this, Y, []);
|
|
1167
1166
|
const i = t(this, _).template || [];
|
|
1168
1167
|
Array.from(i).forEach((e) => {
|
|
@@ -1172,12 +1171,12 @@ const O = class O {
|
|
|
1172
1171
|
e.__ng || (e.__ng = t(this, Ct).call(this)), e.__ng.height = t(this, Y).slice();
|
|
1173
1172
|
});
|
|
1174
1173
|
}, "#initialize"));
|
|
1175
|
-
d(this, it, /* @__PURE__ */
|
|
1174
|
+
d(this, it, /* @__PURE__ */ c(() => {
|
|
1176
1175
|
t(this, _).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
|
|
1177
1176
|
i.invalidate();
|
|
1178
1177
|
});
|
|
1179
1178
|
}, "#invalidate"));
|
|
1180
|
-
E(this, "get", /* @__PURE__ */
|
|
1179
|
+
E(this, "get", /* @__PURE__ */ c((i, e) => {
|
|
1181
1180
|
var n;
|
|
1182
1181
|
const s = this.getValidData();
|
|
1183
1182
|
if (!s || s.length <= 0) return;
|
|
@@ -1190,10 +1189,10 @@ const O = class O {
|
|
|
1190
1189
|
}
|
|
1191
1190
|
return t(this, ft).call(this, s[i]);
|
|
1192
1191
|
}, "get"));
|
|
1193
|
-
E(this, "set", /* @__PURE__ */
|
|
1192
|
+
E(this, "set", /* @__PURE__ */ c((i) => {
|
|
1194
1193
|
this.clear(), this.add(i, !1), t(this, it).call(this);
|
|
1195
1194
|
}, "set"));
|
|
1196
|
-
d(this, Ct, /* @__PURE__ */
|
|
1195
|
+
d(this, Ct, /* @__PURE__ */ c(() => ({
|
|
1197
1196
|
rowState: O.ROW_STATE.EMPTY,
|
|
1198
1197
|
deleted: !1,
|
|
1199
1198
|
filtered: !1,
|
|
@@ -1202,14 +1201,14 @@ const O = class O {
|
|
|
1202
1201
|
c: {},
|
|
1203
1202
|
_: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
|
|
1204
1203
|
}), "#getDefaultMeta"));
|
|
1205
|
-
E(this, "reset", /* @__PURE__ */
|
|
1204
|
+
E(this, "reset", /* @__PURE__ */ c(() => {
|
|
1206
1205
|
p(this, N, []), p(this, dt, []), t(this, it).call(this);
|
|
1207
1206
|
}, "reset"));
|
|
1208
|
-
E(this, "clear", /* @__PURE__ */
|
|
1207
|
+
E(this, "clear", /* @__PURE__ */ c(() => {
|
|
1209
1208
|
var i;
|
|
1210
1209
|
t(this, k).rawRecords = [], p(this, N, []), p(this, dt, []), (i = t(this, k).viewRecords) != null && i.reset && t(this, k).viewRecords.reset();
|
|
1211
1210
|
}, "clear"));
|
|
1212
|
-
d(this, te, /* @__PURE__ */
|
|
1211
|
+
d(this, te, /* @__PURE__ */ c((i) => {
|
|
1213
1212
|
var r;
|
|
1214
1213
|
Array.isArray(i) || (i = [i]);
|
|
1215
1214
|
const e = typeof ((r = t(this, _).fields) == null ? void 0 : r.get) == "function" ? t(this, _).fields.get() : Object.keys(i[0] || {}), s = [];
|
|
@@ -1220,10 +1219,10 @@ const O = class O {
|
|
|
1220
1219
|
}), s.push(o);
|
|
1221
1220
|
}), s;
|
|
1222
1221
|
}, "#json2Array"));
|
|
1223
|
-
d(this, ee, /* @__PURE__ */
|
|
1222
|
+
d(this, ee, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
|
|
1224
1223
|
e.__ng = t(this, Ct).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = O.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
|
|
1225
1224
|
}), i), "#defaultInsert"));
|
|
1226
|
-
E(this, "add", /* @__PURE__ */
|
|
1225
|
+
E(this, "add", /* @__PURE__ */ c((i, e = !0) => {
|
|
1227
1226
|
i === void 0 && (i = {});
|
|
1228
1227
|
const s = t(this, te).call(this, i);
|
|
1229
1228
|
t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
|
|
@@ -1233,7 +1232,7 @@ const O = class O {
|
|
|
1233
1232
|
a && (a.__ng.rowState = O.ROW_STATE.EMPTY);
|
|
1234
1233
|
}), t(this, it).call(this), r;
|
|
1235
1234
|
}, "add"));
|
|
1236
|
-
E(this, "delete", /* @__PURE__ */
|
|
1235
|
+
E(this, "delete", /* @__PURE__ */ c((i) => {
|
|
1237
1236
|
let e = [];
|
|
1238
1237
|
Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, k).host.row.at] : e = [parseInt(i, 10)], e.sort((s, r) => r - s).forEach((s) => {
|
|
1239
1238
|
if (t(this, N)[s]) {
|
|
@@ -1244,36 +1243,36 @@ const O = class O {
|
|
|
1244
1243
|
}
|
|
1245
1244
|
}), this.resetRecords(), t(this, it).call(this);
|
|
1246
1245
|
}, "delete"));
|
|
1247
|
-
E(this, "setValue", /* @__PURE__ */
|
|
1248
|
-
var
|
|
1246
|
+
E(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
|
|
1247
|
+
var h;
|
|
1249
1248
|
i = parseInt(i, 10);
|
|
1250
|
-
const n = (typeof ((
|
|
1249
|
+
const n = (typeof ((h = t(this, _).fields) == null ? void 0 : h.get) == "function" ? t(this, _).fields.get() : []).indexOf(e);
|
|
1251
1250
|
if (n < 0) return;
|
|
1252
1251
|
const o = this.getValidData()[i];
|
|
1253
1252
|
if (!o) return;
|
|
1254
1253
|
const a = o.v[n];
|
|
1255
1254
|
a !== s && o.__ng.rowState !== O.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = O.ROW_STATE.UPDATE), o.v[n] = s;
|
|
1256
1255
|
}, "setValue"));
|
|
1257
|
-
E(this, "resetRecords", /* @__PURE__ */
|
|
1256
|
+
E(this, "resetRecords", /* @__PURE__ */ c(() => {
|
|
1258
1257
|
p(this, dt, t(this, k).rawRecords.filter((i) => !i.__ng.deleted)), p(this, N, t(this, k).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, k).rawRecords.forEach((i, e) => {
|
|
1259
1258
|
i.__ng.rowidx = e;
|
|
1260
1259
|
}), t(this, N).forEach((i, e) => {
|
|
1261
1260
|
i.__ng.i = e;
|
|
1262
1261
|
});
|
|
1263
1262
|
}, "resetRecords"));
|
|
1264
|
-
E(this, "getValidData", /* @__PURE__ */
|
|
1265
|
-
d(this, ft, /* @__PURE__ */
|
|
1263
|
+
E(this, "getValidData", /* @__PURE__ */ c(() => (t(this, N).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, N)), "getValidData"));
|
|
1264
|
+
d(this, ft, /* @__PURE__ */ c((i) => {
|
|
1266
1265
|
var o;
|
|
1267
1266
|
if (!i) return i;
|
|
1268
1267
|
const e = !Array.isArray(i), s = e ? [i] : i, r = typeof ((o = t(this, _).fields) == null ? void 0 : o.get) == "function" ? t(this, _).fields.get() : [], n = s.filter((a) => !a.__ng.deleted).map((a) => {
|
|
1269
|
-
const
|
|
1268
|
+
const h = {};
|
|
1270
1269
|
return r.forEach((l, f) => {
|
|
1271
|
-
|
|
1272
|
-
}),
|
|
1270
|
+
h[l] = a.v ? a.v[f] : a[l];
|
|
1271
|
+
}), h.__ng = a.__ng, h;
|
|
1273
1272
|
});
|
|
1274
1273
|
return e ? n[0] : n;
|
|
1275
1274
|
}, "#conv"));
|
|
1276
|
-
E(this, "count", /* @__PURE__ */
|
|
1275
|
+
E(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
|
|
1277
1276
|
p(this, _, i), p(this, k, e), t(this, Qt).call(this);
|
|
1278
1277
|
}
|
|
1279
1278
|
get source() {
|
|
@@ -1295,7 +1294,7 @@ const O = class O {
|
|
|
1295
1294
|
return this.length;
|
|
1296
1295
|
}
|
|
1297
1296
|
};
|
|
1298
|
-
_ = new WeakMap(), k = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), it = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(),
|
|
1297
|
+
_ = new WeakMap(), k = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), it = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), c(O, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
|
|
1299
1298
|
E(O, "ROW_STATE", {
|
|
1300
1299
|
EMPTY: "EMPTY",
|
|
1301
1300
|
NORMAL: "NORMAL",
|
|
@@ -1325,7 +1324,7 @@ const Oe = class Oe {
|
|
|
1325
1324
|
}, this.setDataSource([]);
|
|
1326
1325
|
}
|
|
1327
1326
|
};
|
|
1328
|
-
rt = new WeakMap(),
|
|
1327
|
+
rt = new WeakMap(), c(Oe, "ngDataManager");
|
|
1329
1328
|
let be = Oe;
|
|
1330
1329
|
var ut, L, Lt, se;
|
|
1331
1330
|
const Be = class Be {
|
|
@@ -1333,18 +1332,18 @@ const Be = class Be {
|
|
|
1333
1332
|
constructor(i) {
|
|
1334
1333
|
d(this, ut);
|
|
1335
1334
|
d(this, L, []);
|
|
1336
|
-
E(this, "add", /* @__PURE__ */
|
|
1335
|
+
E(this, "add", /* @__PURE__ */ c((i, e = "string") => {
|
|
1337
1336
|
i.forEach((s) => {
|
|
1338
1337
|
t(this, L).some((r) => r.name === s) || t(this, L).push({ name: s, type: e });
|
|
1339
1338
|
}), t(this, Lt).call(this);
|
|
1340
1339
|
}, "add"));
|
|
1341
|
-
d(this, Lt, /* @__PURE__ */
|
|
1340
|
+
d(this, Lt, /* @__PURE__ */ c(() => {
|
|
1342
1341
|
const i = /* @__PURE__ */ new Map();
|
|
1343
1342
|
t(this, L).forEach((e) => {
|
|
1344
1343
|
i.set(e.name, e.type);
|
|
1345
1344
|
}), p(this, L, Array.from(i, ([e, s]) => ({ name: e, type: s }))), p(this, L, t(this, L).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, L).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
|
|
1346
1345
|
}, "#adjust"));
|
|
1347
|
-
d(this, se, /* @__PURE__ */
|
|
1346
|
+
d(this, se, /* @__PURE__ */ c(() => {
|
|
1348
1347
|
p(this, L, []), W.log(t(this, ut).querySelectorAll("table"));
|
|
1349
1348
|
const i = Array.from(t(this, ut).querySelectorAll("table"));
|
|
1350
1349
|
if (!(!i || i.length === 0)) {
|
|
@@ -1366,9 +1365,9 @@ const Be = class Be {
|
|
|
1366
1365
|
}
|
|
1367
1366
|
o.split("data.").forEach((a) => {
|
|
1368
1367
|
if (a.trim() != "") {
|
|
1369
|
-
const
|
|
1368
|
+
const h = a.search(/[^_A-Za-z0-9]/g);
|
|
1370
1369
|
let l = "";
|
|
1371
|
-
|
|
1370
|
+
h >= 0 ? l = a.substring(0, h) : o.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, L).push({ name: l, type: "string" });
|
|
1372
1371
|
}
|
|
1373
1372
|
});
|
|
1374
1373
|
});
|
|
@@ -1398,7 +1397,7 @@ const Be = class Be {
|
|
|
1398
1397
|
return t(this, L).some((e) => e.name === i);
|
|
1399
1398
|
}
|
|
1400
1399
|
};
|
|
1401
|
-
ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(),
|
|
1400
|
+
ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), c(Be, "ngFields");
|
|
1402
1401
|
let pe = Be;
|
|
1403
1402
|
var nt, ie, re;
|
|
1404
1403
|
const ze = class ze extends HTMLElement {
|
|
@@ -1407,7 +1406,7 @@ const ze = class ze extends HTMLElement {
|
|
|
1407
1406
|
//#created = false;
|
|
1408
1407
|
d(this, nt);
|
|
1409
1408
|
d(this, ie);
|
|
1410
|
-
d(this, re, /* @__PURE__ */
|
|
1409
|
+
d(this, re, /* @__PURE__ */ c(() => {
|
|
1411
1410
|
this.fields = new pe(this), p(this, ie, new fe(this)), W.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
1412
1411
|
}, "#init"));
|
|
1413
1412
|
this.attachShadow({ mode: "open" }), p(this, nt, new be(this));
|
|
@@ -1431,7 +1430,7 @@ const ze = class ze extends HTMLElement {
|
|
|
1431
1430
|
return t(this, nt);
|
|
1432
1431
|
}
|
|
1433
1432
|
};
|
|
1434
|
-
nt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(),
|
|
1433
|
+
nt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), c(ze, "NineTable");
|
|
1435
1434
|
let ye = ze;
|
|
1436
1435
|
customElements.get("nine-table") || customElements.define("nine-table", ye);
|
|
1437
1436
|
const mt = class mt extends HTMLElement {
|
|
@@ -1445,7 +1444,7 @@ const mt = class mt extends HTMLElement {
|
|
|
1445
1444
|
connectedCallback() {
|
|
1446
1445
|
}
|
|
1447
1446
|
};
|
|
1448
|
-
|
|
1447
|
+
c(mt, "BasicCellElement"), E(mt, "_styleCache", /* @__PURE__ */ new Map()), E(mt, "_customStyleCache", /* @__PURE__ */ new Map());
|
|
1449
1448
|
let me = mt;
|
|
1450
1449
|
var C, Ht, y, Re, qe, Te, ke, Ce;
|
|
1451
1450
|
const De = class De extends me {
|
|
@@ -1458,7 +1457,7 @@ const De = class De extends me {
|
|
|
1458
1457
|
d(this, qe);
|
|
1459
1458
|
d(this, Te);
|
|
1460
1459
|
d(this, ke);
|
|
1461
|
-
E(this, "getDisplayText", /* @__PURE__ */
|
|
1460
|
+
E(this, "getDisplayText", /* @__PURE__ */ c((e) => {
|
|
1462
1461
|
if (t(this, y))
|
|
1463
1462
|
if (t(this, y).closest("tbody")) {
|
|
1464
1463
|
const s = t(this, y).closest("tr").data, r = parseInt(t(this, y).dataset.row);
|
|
@@ -1478,7 +1477,7 @@ const De = class De extends me {
|
|
|
1478
1477
|
} catch {
|
|
1479
1478
|
}
|
|
1480
1479
|
}, "getDisplayText"));
|
|
1481
|
-
d(this, Ce, /* @__PURE__ */
|
|
1480
|
+
d(this, Ce, /* @__PURE__ */ c(() => {
|
|
1482
1481
|
if (!(!t(this, C) || !t(this, C).template || !t(this, y).closest("tbody.bindable"))) {
|
|
1483
1482
|
var e = ninegrid.j.querySelectorAll(t(this, y)).attr("suppress");
|
|
1484
1483
|
if (e && (e = parseInt(e)), e && !isNaN(e)) {
|
|
@@ -1491,9 +1490,9 @@ const De = class De extends me {
|
|
|
1491
1490
|
if (parseInt(s.sectionRowIndex / t(this, C).template.length) > 0)
|
|
1492
1491
|
for (var o of r) {
|
|
1493
1492
|
if (o > e) break;
|
|
1494
|
-
var a = parseInt(t(this, y).dataset.row),
|
|
1493
|
+
var a = parseInt(t(this, y).dataset.row), h = a - 1, l = t(this, y).closest("tr").data, f = t(this, C).data.get(h);
|
|
1495
1494
|
t(this, y).dataset.matrixRow;
|
|
1496
|
-
var u = t(this, C).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, y).dataset.matrixRow}"]`), g = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, a) : l[u.dataset.bind], b = u.dataset.expr ? this.getExprValue(u.dataset.expr, f,
|
|
1495
|
+
var u = t(this, C).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, y).dataset.matrixRow}"]`), g = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, a) : l[u.dataset.bind], b = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, h) : f[u.dataset.bind];
|
|
1497
1496
|
if (g != b) {
|
|
1498
1497
|
n = !0;
|
|
1499
1498
|
break;
|
|
@@ -1507,7 +1506,7 @@ const De = class De extends me {
|
|
|
1507
1506
|
}
|
|
1508
1507
|
}
|
|
1509
1508
|
}, "#resetSuppress"));
|
|
1510
|
-
E(this, "getExprValue", /* @__PURE__ */
|
|
1509
|
+
E(this, "getExprValue", /* @__PURE__ */ c((e, s, r, n) => {
|
|
1511
1510
|
if (typeof e < "u")
|
|
1512
1511
|
try {
|
|
1513
1512
|
r = parseInt(r);
|
|
@@ -1543,7 +1542,7 @@ const De = class De extends me {
|
|
|
1543
1542
|
return parseInt(t(this, y).dataset.row), t(this, Ht).data[e];
|
|
1544
1543
|
}
|
|
1545
1544
|
};
|
|
1546
|
-
C = new WeakMap(), Ht = new WeakMap(), y = new WeakMap(), Re = new WeakMap(), qe = new WeakMap(), Te = new WeakMap(), ke = new WeakMap(), Ce = new WeakMap(),
|
|
1545
|
+
C = new WeakMap(), Ht = new WeakMap(), y = new WeakMap(), Re = new WeakMap(), qe = new WeakMap(), Te = new WeakMap(), ke = new WeakMap(), Ce = new WeakMap(), c(De, "CellElement");
|
|
1547
1546
|
let ve = De;
|
|
1548
1547
|
const Pe = class Pe extends ve {
|
|
1549
1548
|
constructor() {
|
|
@@ -1556,7 +1555,7 @@ const Pe = class Pe extends ve {
|
|
|
1556
1555
|
return super.refresh();
|
|
1557
1556
|
}
|
|
1558
1557
|
};
|
|
1559
|
-
|
|
1558
|
+
c(Pe, "EditableCellElement");
|
|
1560
1559
|
let xe = Pe;
|
|
1561
1560
|
var Mt, ot, gt, bt, ne, U, Le;
|
|
1562
1561
|
const je = class je extends xe {
|
|
@@ -1568,7 +1567,7 @@ const je = class je extends xe {
|
|
|
1568
1567
|
d(this, bt);
|
|
1569
1568
|
d(this, ne);
|
|
1570
1569
|
d(this, U);
|
|
1571
|
-
E(this, "refresh", /* @__PURE__ */
|
|
1570
|
+
E(this, "refresh", /* @__PURE__ */ c(() => {
|
|
1572
1571
|
const e = super.refresh();
|
|
1573
1572
|
t(this, Mt).value = e;
|
|
1574
1573
|
}, "refresh"));
|
|
@@ -1602,7 +1601,7 @@ const je = class je extends xe {
|
|
|
1602
1601
|
if (!v) this.reset();
|
|
1603
1602
|
};
|
|
1604
1603
|
*/
|
|
1605
|
-
d(this, Le, /* @__PURE__ */
|
|
1604
|
+
d(this, Le, /* @__PURE__ */ c((e) => {
|
|
1606
1605
|
if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
|
|
1607
1606
|
if (t(this, ot) == "number") {
|
|
1608
1607
|
let n = [];
|
|
@@ -1630,7 +1629,7 @@ const je = class je extends xe {
|
|
|
1630
1629
|
`, super.connectedCallback(), p(this, Mt, this.querySelector("input"));
|
|
1631
1630
|
}
|
|
1632
1631
|
};
|
|
1633
|
-
Mt = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), U = new WeakMap(), Le = new WeakMap(),
|
|
1632
|
+
Mt = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), U = new WeakMap(), Le = new WeakMap(), c(je, "CellInputText");
|
|
1634
1633
|
let we = je;
|
|
1635
1634
|
customElements.get("cell-input-text");
|
|
1636
1635
|
customElements.get("cell-input") || customElements.define("cell-input", we);
|