@ninebone/table 0.0.579 → 0.0.580
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 +147 -145
- 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
|
@@ -5,10 +5,10 @@ var Ve = (R) => {
|
|
|
5
5
|
var Xe = (R, r, e) => r in R ? Fe(R, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[r] = e;
|
|
6
6
|
var h = (R, r) => Fe(R, "name", { value: r, configurable: !0 });
|
|
7
7
|
var A = (R, r, e) => Xe(R, typeof r != "symbol" ? r + "" : r, e), Ye = (R, r, e) => r.has(R) || Ve("Cannot " + e);
|
|
8
|
-
var t = (R, r, e) => (Ye(R, r, "read from private field"), e ? e.call(R) : r.get(R)), d = (R, r, e) => r.has(R) ? Ve("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(R) : r.set(R, e),
|
|
8
|
+
var t = (R, r, e) => (Ye(R, r, "read from private field"), e ? e.call(R) : r.get(R)), d = (R, r, e) => r.has(R) ? Ve("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(R) : r.set(R, e), p = (R, r, e, s) => (Ye(R, r, "write to private field"), s ? s.call(R, e) : r.set(R, e), e);
|
|
9
9
|
var Ue = (R, r, e, s) => ({
|
|
10
10
|
set _(i) {
|
|
11
|
-
|
|
11
|
+
p(R, r, i, e);
|
|
12
12
|
},
|
|
13
13
|
get _() {
|
|
14
14
|
return t(R, r, s);
|
|
@@ -36,7 +36,7 @@ const Me = class Me extends HTMLElement {
|
|
|
36
36
|
d(this, It, /* @__PURE__ */ h(() => {
|
|
37
37
|
if (!t(this, z)) return;
|
|
38
38
|
const e = t(this, z).querySelector(".ng-container-body .ng-part-body");
|
|
39
|
-
e && (
|
|
39
|
+
e && (p(this, Z, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
41
|
})), t(this, Z).observe(e));
|
|
42
42
|
}, "#observeResize"));
|
|
@@ -77,8 +77,8 @@ const Me = class Me extends HTMLElement {
|
|
|
77
77
|
const e = /* @__PURE__ */ h((i) => {
|
|
78
78
|
clearInterval(t(this, X)), clearInterval(t(this, K));
|
|
79
79
|
const n = parseInt(t(this, w).thumb.style.left || 0, 10);
|
|
80
|
-
t(this, G).call(this, n + i),
|
|
81
|
-
clearInterval(t(this, X)),
|
|
80
|
+
t(this, G).call(this, n + i), p(this, X, setInterval(() => {
|
|
81
|
+
clearInterval(t(this, X)), p(this, K, setInterval(() => {
|
|
82
82
|
const o = parseInt(t(this, w).thumb.style.left || 0, 10);
|
|
83
83
|
t(this, G).call(this, o + i) || clearInterval(t(this, K));
|
|
84
84
|
}, 50));
|
|
@@ -99,20 +99,20 @@ const Me = class Me extends HTMLElement {
|
|
|
99
99
|
t(this, G).call(this, i.clientX - n.left - o / 2);
|
|
100
100
|
}), t(this, w).thumb.addEventListener("mousedown", (i) => {
|
|
101
101
|
if (i.button !== 0) return;
|
|
102
|
-
i.stopPropagation(), i.preventDefault(),
|
|
102
|
+
i.stopPropagation(), i.preventDefault(), p(this, j, !0), this.shiftX = i.clientX - t(this, w).thumb.getBoundingClientRect().left;
|
|
103
103
|
const n = /* @__PURE__ */ h((a) => {
|
|
104
104
|
if (!t(this, j)) return;
|
|
105
105
|
const c = t(this, w).track.getBoundingClientRect();
|
|
106
106
|
t(this, G).call(this, a.clientX - c.left - this.shiftX);
|
|
107
107
|
}, "onMouseMove"), o = /* @__PURE__ */ h(() => {
|
|
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);
|
|
111
111
|
});
|
|
112
112
|
}, "#init"));
|
|
113
113
|
}
|
|
114
114
|
connectedCallback() {
|
|
115
|
-
if (
|
|
115
|
+
if (p(this, z, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, z)) return;
|
|
116
116
|
this.innerHTML = `
|
|
117
117
|
<style>
|
|
118
118
|
nine-table-hscrollbar {
|
|
@@ -182,7 +182,7 @@ const Me = class Me extends HTMLElement {
|
|
|
182
182
|
setTimeout(e, 10);
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
|
-
|
|
185
|
+
p(this, w, {
|
|
186
186
|
container: s,
|
|
187
187
|
track: this.querySelector(".ng-scroll-track"),
|
|
188
188
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
@@ -201,19 +201,19 @@ const Me = class Me extends HTMLElement {
|
|
|
201
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(), h(Me, "NineTableHScrollBar");
|
|
202
202
|
let ae = Me;
|
|
203
203
|
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ae);
|
|
204
|
-
var F,
|
|
204
|
+
var F, at, J, q, xt, vt, Nt;
|
|
205
205
|
const $e = class $e extends HTMLElement {
|
|
206
206
|
constructor() {
|
|
207
207
|
super();
|
|
208
208
|
d(this, F);
|
|
209
|
-
d(this,
|
|
209
|
+
d(this, at);
|
|
210
210
|
d(this, J, !1);
|
|
211
211
|
d(this, q);
|
|
212
|
-
d(this, mt, 0);
|
|
213
212
|
d(this, xt, 0);
|
|
213
|
+
d(this, vt, 0);
|
|
214
214
|
A(this, "refresh", /* @__PURE__ */ h(() => {
|
|
215
215
|
if (!t(this, F) || !t(this, q)) return;
|
|
216
|
-
const e = t(this, q).container, s = t(this, q).track, i = t(this, q).thumb, n = e.clientHeight, a = (t(this, F).data.get() || []).length, c = t(this,
|
|
216
|
+
const e = t(this, q).container, s = t(this, q).track, i = t(this, q).thumb, n = e.clientHeight, a = (t(this, F).data.get() || []).length, c = t(this, at).getRowHeight(), l = a * c;
|
|
217
217
|
if (l <= n) {
|
|
218
218
|
i.style.display = "none", t(this, q).top.disabled = !0, t(this, q).bottom.disabled = !0;
|
|
219
219
|
return;
|
|
@@ -232,26 +232,26 @@ const $e = class $e extends HTMLElement {
|
|
|
232
232
|
d(this, Nt, /* @__PURE__ */ h(() => {
|
|
233
233
|
W.log("nine-table-vscrollbar.#init");
|
|
234
234
|
const e = t(this, q).container, s = /* @__PURE__ */ h(() => {
|
|
235
|
-
const n = (t(this, F).data.get() || []).length, o = t(this,
|
|
235
|
+
const n = (t(this, F).data.get() || []).length, o = t(this, at).getRowHeight();
|
|
236
236
|
return n * o;
|
|
237
237
|
}, "getContentHeight");
|
|
238
238
|
e.addEventListener("scroll", () => {
|
|
239
239
|
t(this, J) || this.refresh();
|
|
240
240
|
}), t(this, q).thumb.addEventListener("mousedown", (i) => {
|
|
241
241
|
if (i.button !== 0) return;
|
|
242
|
-
i.stopPropagation(), i.preventDefault(),
|
|
242
|
+
i.stopPropagation(), i.preventDefault(), p(this, J, !0), p(this, xt, i.clientY), p(this, vt, e.scrollTop);
|
|
243
243
|
const n = /* @__PURE__ */ h((a) => {
|
|
244
244
|
if (!t(this, J)) return;
|
|
245
|
-
const c = t(this, q).track.getBoundingClientRect(), l = t(this, q).thumb.clientHeight, u = c.height - l, g = a.clientY - t(this,
|
|
245
|
+
const c = t(this, q).track.getBoundingClientRect(), l = t(this, q).thumb.clientHeight, u = c.height - l, g = a.clientY - t(this, xt), b = e.clientHeight, m = s(), v = Math.max(m - b, 1);
|
|
246
246
|
if (u > 0 && v > 0) {
|
|
247
247
|
const E = g / u * v;
|
|
248
|
-
let x = t(this,
|
|
248
|
+
let x = t(this, vt) + E;
|
|
249
249
|
const M = Math.max(0, m - b);
|
|
250
250
|
x < 0 && (x = 0), x > M && (x = M), e.scrollTop = x;
|
|
251
251
|
}
|
|
252
252
|
this.refresh();
|
|
253
253
|
}, "onMouseMove"), o = /* @__PURE__ */ h(() => {
|
|
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);
|
|
257
257
|
}), t(this, q).track.addEventListener("mousedown", (i) => {
|
|
@@ -270,7 +270,7 @@ const $e = class $e extends HTMLElement {
|
|
|
270
270
|
}, "#init"));
|
|
271
271
|
}
|
|
272
272
|
connectedCallback() {
|
|
273
|
-
|
|
273
|
+
p(this, F, this.getRootNode().host), p(this, at, this.closest("nine-table-sheet")), this.innerHTML = `
|
|
274
274
|
<style>
|
|
275
275
|
nine-table-vscrollbar {
|
|
276
276
|
display: flex;
|
|
@@ -340,7 +340,7 @@ const $e = class $e extends HTMLElement {
|
|
|
340
340
|
setTimeout(e, 10);
|
|
341
341
|
return;
|
|
342
342
|
}
|
|
343
|
-
|
|
343
|
+
p(this, q, {
|
|
344
344
|
container: s,
|
|
345
345
|
track: this.querySelector(".ng-scroll-track"),
|
|
346
346
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
@@ -351,10 +351,10 @@ const $e = class $e extends HTMLElement {
|
|
|
351
351
|
e();
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
|
-
F = new WeakMap(),
|
|
354
|
+
F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), q = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), Nt = new WeakMap(), h($e, "NineTableVScrollBar");
|
|
355
355
|
let le = $e;
|
|
356
356
|
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
|
|
357
|
-
var D, S, Q, P, I, V, tt,
|
|
357
|
+
var D, S, Q, P, I, V, tt, wt, Se, Ee, Wt, Ot, Bt, St, Et, zt, Pt, At, Ae, lt, Rt, Dt;
|
|
358
358
|
const Ie = class Ie {
|
|
359
359
|
constructor(r) {
|
|
360
360
|
d(this, D);
|
|
@@ -364,7 +364,7 @@ const Ie = class Ie {
|
|
|
364
364
|
d(this, I, null);
|
|
365
365
|
d(this, V, null);
|
|
366
366
|
d(this, tt, 0);
|
|
367
|
-
d(this,
|
|
367
|
+
d(this, wt, 40);
|
|
368
368
|
d(this, Se, !1);
|
|
369
369
|
d(this, Ee, !1);
|
|
370
370
|
//#ticking = false; // 🎯 고속 스크롤 스로틀링용 플래그
|
|
@@ -373,13 +373,13 @@ const Ie = class Ie {
|
|
|
373
373
|
var e;
|
|
374
374
|
W.log("rowManager.refresh");
|
|
375
375
|
const r = t(this, S).querySelector(".ng-container-body .ng-part-body");
|
|
376
|
-
r && (t(this,
|
|
376
|
+
r && (t(this, St).call(this), t(this, lt).call(this, r.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
|
|
377
377
|
}, "refresh"));
|
|
378
378
|
A(this, "initialize", /* @__PURE__ */ h(() => {
|
|
379
|
-
W.log("rowManager.initialize"),
|
|
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, P).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
385
|
const c = a.querySelector(".ng-part-body table");
|
|
@@ -391,13 +391,13 @@ const Ie = class Ie {
|
|
|
391
391
|
});
|
|
392
392
|
const r = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), s = t(this, S).querySelector(".ng-container-right .ng-part-body"), i = t(this, S).querySelector(".ng-container-body .ng-part-header"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer");
|
|
393
393
|
if (r) {
|
|
394
|
-
t(this, Bt).call(this, r), t(this,
|
|
394
|
+
t(this, Bt).call(this, r), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, r.scrollTop);
|
|
395
395
|
let o = !1;
|
|
396
396
|
const a = /* @__PURE__ */ h((c) => {
|
|
397
397
|
if (o) return;
|
|
398
398
|
o = !0;
|
|
399
399
|
const l = c.scrollTop, f = c.scrollLeft;
|
|
400
|
-
r && r.scrollTop !== l && (r.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), i && i.scrollLeft !== f && (i.scrollLeft = f), n && n.scrollLeft !== f && (n.scrollLeft = f), t(this,
|
|
400
|
+
r && r.scrollTop !== l && (r.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), i && i.scrollLeft !== f && (i.scrollLeft = f), n && n.scrollLeft !== f && (n.scrollLeft = f), t(this, lt).call(this, l), o = !1;
|
|
401
401
|
}, "handleContainerScroll");
|
|
402
402
|
[r, e, s].forEach((c) => {
|
|
403
403
|
c && c.addEventListener("scroll", () => {
|
|
@@ -414,7 +414,7 @@ const Ie = class Ie {
|
|
|
414
414
|
if (!i) return;
|
|
415
415
|
i.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
|
|
416
416
|
const n = i.querySelector("tr.nodata"), o = document.createDocumentFragment();
|
|
417
|
-
for (let a = 0; a < t(this,
|
|
417
|
+
for (let a = 0; a < t(this, wt); a++)
|
|
418
418
|
s.forEach((c) => {
|
|
419
419
|
o.appendChild(c.cloneNode(!0));
|
|
420
420
|
});
|
|
@@ -439,9 +439,9 @@ const Ie = class Ie {
|
|
|
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 = c, o.style.position = l,
|
|
442
|
+
}), u.forEach((g) => g.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, p(this, I, f > 0 ? f : 24), t(this, Et).call(this), t(this, I);
|
|
443
443
|
}, "#measureAndCacheHeight"));
|
|
444
|
-
d(this,
|
|
444
|
+
d(this, St, /* @__PURE__ */ h(() => {
|
|
445
445
|
W.log("rowManager.#updateVirtualScrollHeight");
|
|
446
446
|
const e = (t(this, D).data.get() || []).length, s = t(this, I), i = e * s;
|
|
447
447
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
|
|
@@ -451,10 +451,10 @@ const Ie = class Ie {
|
|
|
451
451
|
a && (a.style.height = `${i}px`);
|
|
452
452
|
});
|
|
453
453
|
}, "#updateVirtualScrollHeight"));
|
|
454
|
-
d(this,
|
|
454
|
+
d(this, Et, /* @__PURE__ */ h(() => {
|
|
455
455
|
if (t(this, tt) > 0 && t(this, I) > 0) {
|
|
456
456
|
const r = Math.ceil(t(this, tt) / t(this, I));
|
|
457
|
-
|
|
457
|
+
p(this, wt, r + t(this, Wt));
|
|
458
458
|
}
|
|
459
459
|
}, "#updateRowCount"));
|
|
460
460
|
d(this, zt, /* @__PURE__ */ h(() => {
|
|
@@ -485,7 +485,7 @@ const Ie = class Ie {
|
|
|
485
485
|
}
|
|
486
486
|
}, "#syncRowHeights"));
|
|
487
487
|
d(this, Pt, /* @__PURE__ */ h(() => {
|
|
488
|
-
!t(this, S) || !(t(this, S) instanceof HTMLElement) || (
|
|
488
|
+
!t(this, S) || !(t(this, S) instanceof HTMLElement) || (p(this, V, new ResizeObserver((r) => {
|
|
489
489
|
for (const e of r) {
|
|
490
490
|
const s = e.target;
|
|
491
491
|
if (!s.classList.contains("active")) continue;
|
|
@@ -495,12 +495,12 @@ const Ie = class Ie {
|
|
|
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
497
|
const c = Math.max(i - n, 100);
|
|
498
|
-
t(this, tt) !== c && (
|
|
498
|
+
t(this, tt) !== c && (p(this, tt, c), t(this, Et).call(this), t(this, I) !== null && (t(this, At).call(this), this.refresh()));
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
501
|
})), t(this, V).observe(t(this, S)));
|
|
502
502
|
}, "#initResizeObserver"));
|
|
503
|
-
d(this,
|
|
503
|
+
d(this, At, /* @__PURE__ */ h(() => {
|
|
504
504
|
W.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
|
|
505
505
|
const e = t(this, S).querySelector(r);
|
|
506
506
|
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ot).call(this, e, r);
|
|
@@ -521,11 +521,11 @@ const Ie = class Ie {
|
|
|
521
521
|
return;
|
|
522
522
|
}
|
|
523
523
|
const b = t(this, D).data.get(g);
|
|
524
|
-
f.style.display = "", t(this,
|
|
524
|
+
f.style.display = "", t(this, Rt).call(this, f, b, g);
|
|
525
525
|
});
|
|
526
526
|
});
|
|
527
527
|
}, "#adjustBufferRows"));
|
|
528
|
-
d(this,
|
|
528
|
+
d(this, lt, /* @__PURE__ */ h((r) => {
|
|
529
529
|
var f, u;
|
|
530
530
|
const e = t(this, I);
|
|
531
531
|
if (!e || e <= 0) return;
|
|
@@ -546,7 +546,7 @@ const Ie = class Ie {
|
|
|
546
546
|
return;
|
|
547
547
|
}
|
|
548
548
|
const T = t(this, D).data.get(M);
|
|
549
|
-
E.style.display = "", t(this,
|
|
549
|
+
E.style.display = "", t(this, Rt).call(this, E, T, M);
|
|
550
550
|
});
|
|
551
551
|
});
|
|
552
552
|
}, "#handleScroll"));
|
|
@@ -564,7 +564,7 @@ const Ie = class Ie {
|
|
|
564
564
|
cell.dataset.row = dataIndex;
|
|
565
565
|
});
|
|
566
566
|
}; */
|
|
567
|
-
d(this,
|
|
567
|
+
d(this, Rt, /* @__PURE__ */ h((r, e, s) => {
|
|
568
568
|
r.dataset.row = s, r.data = e, Array.from(r.cells).forEach((i, n) => {
|
|
569
569
|
i.dataset.row = s;
|
|
570
570
|
const o = Array.from(i.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
|
|
@@ -587,9 +587,9 @@ const Ie = class Ie {
|
|
|
587
587
|
}
|
|
588
588
|
}, "#syncHeaderHeights"));
|
|
589
589
|
A(this, "destroy", /* @__PURE__ */ h(() => {
|
|
590
|
-
t(this, V) && (t(this, V).disconnect(),
|
|
590
|
+
t(this, V) && (t(this, V).disconnect(), p(this, V, null));
|
|
591
591
|
}, "destroy"));
|
|
592
|
-
|
|
592
|
+
p(this, D, r.getRootNode().host), p(this, S, r), t(this, Pt).call(this);
|
|
593
593
|
}
|
|
594
594
|
getRowHeight() {
|
|
595
595
|
return t(this, I);
|
|
@@ -599,7 +599,7 @@ const Ie = class Ie {
|
|
|
599
599
|
return ((e = t(this, P).get(r)) == null ? void 0 : e.length) || 1;
|
|
600
600
|
}
|
|
601
601
|
};
|
|
602
|
-
D = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), P = new WeakMap(), I = new WeakMap(), V = new WeakMap(), tt = new WeakMap(),
|
|
602
|
+
D = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), P = new WeakMap(), I = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), zt = new WeakMap(), Pt = new WeakMap(), At = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), Dt = new WeakMap(), h(Ie, "RowManager");
|
|
603
603
|
let ce = Ie;
|
|
604
604
|
const jt = class jt {
|
|
605
605
|
/**
|
|
@@ -655,8 +655,8 @@ const jt = class jt {
|
|
|
655
655
|
}
|
|
656
656
|
const M = x.rowSpan || 1, T = x.colSpan || 1;
|
|
657
657
|
for (let B = 0; B < M; B++)
|
|
658
|
-
for (let
|
|
659
|
-
v + B < u && E +
|
|
658
|
+
for (let pt = 0; pt < T; pt++)
|
|
659
|
+
v + B < u && E + pt < g && (b[v + B][E + pt] = B === 0 && pt === 0 ? "1" : "0");
|
|
660
660
|
});
|
|
661
661
|
}), l.forEach((m) => {
|
|
662
662
|
const v = m.sectionRowIndex;
|
|
@@ -680,15 +680,15 @@ const jt = class jt {
|
|
|
680
680
|
};
|
|
681
681
|
h(jt, "TableCompiler");
|
|
682
682
|
let he = jt;
|
|
683
|
-
var Ft,
|
|
683
|
+
var Ft, et, st, Vt, Yt, ct, Ut, Xt;
|
|
684
684
|
const yt = class yt extends HTMLElement {
|
|
685
685
|
constructor() {
|
|
686
686
|
super();
|
|
687
687
|
d(this, Ft);
|
|
688
|
-
d(this,
|
|
689
|
-
d(this,
|
|
688
|
+
d(this, et, null);
|
|
689
|
+
d(this, st);
|
|
690
690
|
A(this, "invalidate", /* @__PURE__ */ h(() => {
|
|
691
|
-
t(this,
|
|
691
|
+
t(this, st).refresh();
|
|
692
692
|
}, "invalidate"));
|
|
693
693
|
d(this, Vt, /* @__PURE__ */ h(() => {
|
|
694
694
|
[
|
|
@@ -699,14 +699,16 @@ const yt = class yt extends HTMLElement {
|
|
|
699
699
|
const n = this.querySelector(s);
|
|
700
700
|
if (!n) return;
|
|
701
701
|
n.innerHTML = "";
|
|
702
|
-
const o =
|
|
702
|
+
const o = document.createElement("div");
|
|
703
|
+
o.className = "ng-part-header", o.appendChild(t(this, ct).call(this, t(this, et), i, "header"));
|
|
704
|
+
const a = document.createElement("div");
|
|
703
705
|
a.className = "ng-part-body";
|
|
704
706
|
const c = document.createElement("div");
|
|
705
|
-
c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this,
|
|
707
|
+
c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ct).call(this, t(this, et), i, "body"));
|
|
706
708
|
const l = document.createElement("div");
|
|
707
709
|
l.className = "ng-virtual-spacer", l.style.width = "100%", l.style.pointerEvents = "none", c.appendChild(l), a.appendChild(c);
|
|
708
710
|
const f = document.createElement("div");
|
|
709
|
-
f.className = "ng-part-footer", f.appendChild(t(this,
|
|
711
|
+
f.className = "ng-part-footer", f.appendChild(t(this, ct).call(this, t(this, et), i, "footer")), n.appendChild(o), n.appendChild(a), n.appendChild(f);
|
|
710
712
|
});
|
|
711
713
|
}, "#renderSplitContainers"));
|
|
712
714
|
d(this, Yt, /* @__PURE__ */ h(() => {
|
|
@@ -721,12 +723,12 @@ const yt = class yt extends HTMLElement {
|
|
|
721
723
|
});
|
|
722
724
|
}, "#updateContainerWidths"));
|
|
723
725
|
A(this, "generate", /* @__PURE__ */ h((e) => {
|
|
724
|
-
e && (
|
|
726
|
+
e && (p(this, et, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this), t(this, st).initialize(), setTimeout(() => {
|
|
725
727
|
var s;
|
|
726
728
|
(s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
|
|
727
729
|
}, 0));
|
|
728
730
|
}, "generate"));
|
|
729
|
-
d(this,
|
|
731
|
+
d(this, ct, /* @__PURE__ */ h((e, s, i) => {
|
|
730
732
|
const n = e.cloneNode(!0), o = n.querySelector("thead"), a = n.querySelector("tbody"), c = n.querySelector("tfoot");
|
|
731
733
|
if (i === "header") {
|
|
732
734
|
if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
|
|
@@ -742,7 +744,7 @@ const yt = class yt extends HTMLElement {
|
|
|
742
744
|
l.remove();
|
|
743
745
|
}), n;
|
|
744
746
|
}, "#createSplitTable"));
|
|
745
|
-
A(this, "getRowHeight", /* @__PURE__ */ h(() => t(this,
|
|
747
|
+
A(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, st).getRowHeight(), "getRowHeight"));
|
|
746
748
|
A(this, "scrollToX", /* @__PURE__ */ h((e) => {
|
|
747
749
|
const s = this.querySelector(".ng-container-body .ng-part-body");
|
|
748
750
|
s && (s.scrollLeft = e);
|
|
@@ -904,7 +906,7 @@ const yt = class yt extends HTMLElement {
|
|
|
904
906
|
</div>
|
|
905
907
|
`;
|
|
906
908
|
}, "#render"));
|
|
907
|
-
|
|
909
|
+
p(this, st, new ce(this)), p(this, Ft, this.getRootNode().host);
|
|
908
910
|
}
|
|
909
911
|
connectedCallback() {
|
|
910
912
|
t(this, Ut).call(this);
|
|
@@ -913,7 +915,7 @@ const yt = class yt extends HTMLElement {
|
|
|
913
915
|
this.innerHTML = "", W.log("NineTableSheet destroyed.");
|
|
914
916
|
}
|
|
915
917
|
};
|
|
916
|
-
Ft = new WeakMap(),
|
|
918
|
+
Ft = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), h(yt, "NineTableSheet"), A(yt, "SCROLLBAR_SIZE", 16);
|
|
917
919
|
let $t = yt;
|
|
918
920
|
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", $t);
|
|
919
921
|
var Kt, qt;
|
|
@@ -1104,40 +1106,40 @@ const Ne = class Ne {
|
|
|
1104
1106
|
});
|
|
1105
1107
|
});
|
|
1106
1108
|
}, "#render"));
|
|
1107
|
-
|
|
1109
|
+
p(this, H, r), t(this, Zt).call(this);
|
|
1108
1110
|
}
|
|
1109
1111
|
};
|
|
1110
1112
|
H = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Gt = new WeakMap(), h(Ne, "LayoutManager");
|
|
1111
1113
|
let fe = Ne;
|
|
1112
|
-
var kt,
|
|
1114
|
+
var kt, ht;
|
|
1113
1115
|
const We = class We {
|
|
1114
1116
|
constructor(r) {
|
|
1115
1117
|
d(this, kt);
|
|
1116
|
-
d(this,
|
|
1118
|
+
d(this, ht, -1);
|
|
1117
1119
|
A(this, "count", /* @__PURE__ */ h(() => t(this, kt).rawRecords.length, "count"));
|
|
1118
|
-
|
|
1120
|
+
p(this, kt, r);
|
|
1119
1121
|
}
|
|
1120
1122
|
get at() {
|
|
1121
|
-
return t(this,
|
|
1123
|
+
return t(this, ht);
|
|
1122
1124
|
}
|
|
1123
1125
|
set at(r) {
|
|
1124
|
-
|
|
1126
|
+
p(this, ht, parseInt(r, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
|
|
1125
1127
|
});
|
|
1126
1128
|
}
|
|
1127
1129
|
};
|
|
1128
|
-
kt = new WeakMap(),
|
|
1130
|
+
kt = new WeakMap(), ht = new WeakMap(), h(We, "ngRow");
|
|
1129
1131
|
let ue = We;
|
|
1130
|
-
var _, k, N,
|
|
1132
|
+
var _, k, N, dt, Jt, Y, Qt, rt, Ct, te, ee, ft;
|
|
1131
1133
|
const O = class O {
|
|
1132
1134
|
constructor(r, e) {
|
|
1133
1135
|
d(this, _);
|
|
1134
1136
|
d(this, k);
|
|
1135
1137
|
d(this, N, []);
|
|
1136
|
-
d(this,
|
|
1138
|
+
d(this, dt, []);
|
|
1137
1139
|
d(this, Jt, 0);
|
|
1138
1140
|
d(this, Y, []);
|
|
1139
1141
|
d(this, Qt, /* @__PURE__ */ h(() => {
|
|
1140
|
-
|
|
1142
|
+
p(this, Y, []);
|
|
1141
1143
|
const r = t(this, _).template || [];
|
|
1142
1144
|
Array.from(r).forEach((e) => {
|
|
1143
1145
|
var s;
|
|
@@ -1146,7 +1148,7 @@ const O = class O {
|
|
|
1146
1148
|
e.__ng || (e.__ng = t(this, Ct).call(this)), e.__ng.height = t(this, Y).slice();
|
|
1147
1149
|
});
|
|
1148
1150
|
}, "#initialize"));
|
|
1149
|
-
d(this,
|
|
1151
|
+
d(this, rt, /* @__PURE__ */ h(() => {
|
|
1150
1152
|
const r = t(this, _).shadowRoot.querySelector("nine-table-sheets");
|
|
1151
1153
|
r == null || r.classList.toggle("nodata", this.length === 0), t(this, _).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
|
|
1152
1154
|
e.invalidate();
|
|
@@ -1156,17 +1158,17 @@ const O = class O {
|
|
|
1156
1158
|
var n;
|
|
1157
1159
|
const s = this.getValidData();
|
|
1158
1160
|
if (!s || s.length <= 0) return;
|
|
1159
|
-
if (r == null) return t(this,
|
|
1161
|
+
if (r == null) return t(this, ft).call(this, s);
|
|
1160
1162
|
if (r < 0 || r >= s.length) return null;
|
|
1161
1163
|
const i = typeof ((n = t(this, _).fields) == null ? void 0 : n.get) == "function" ? t(this, _).fields.get() : [];
|
|
1162
1164
|
if (e != null) {
|
|
1163
1165
|
const o = i.indexOf(e);
|
|
1164
1166
|
return o >= 0 ? s[r].v[o] : null;
|
|
1165
1167
|
}
|
|
1166
|
-
return t(this,
|
|
1168
|
+
return t(this, ft).call(this, s[r]);
|
|
1167
1169
|
}, "get"));
|
|
1168
1170
|
A(this, "set", /* @__PURE__ */ h((r) => {
|
|
1169
|
-
this.clear(), this.add(r, !1), t(this,
|
|
1171
|
+
this.clear(), this.add(r, !1), t(this, rt).call(this);
|
|
1170
1172
|
}, "set"));
|
|
1171
1173
|
d(this, Ct, /* @__PURE__ */ h(() => ({
|
|
1172
1174
|
rowState: O.ROW_STATE.EMPTY,
|
|
@@ -1178,11 +1180,11 @@ const O = class O {
|
|
|
1178
1180
|
_: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
|
|
1179
1181
|
}), "#getDefaultMeta"));
|
|
1180
1182
|
A(this, "reset", /* @__PURE__ */ h(() => {
|
|
1181
|
-
|
|
1183
|
+
p(this, N, []), p(this, dt, []), t(this, rt).call(this);
|
|
1182
1184
|
}, "reset"));
|
|
1183
1185
|
A(this, "clear", /* @__PURE__ */ h(() => {
|
|
1184
1186
|
var r;
|
|
1185
|
-
t(this, k).rawRecords = [],
|
|
1187
|
+
t(this, k).rawRecords = [], p(this, N, []), p(this, dt, []), (r = t(this, k).viewRecords) != null && r.reset && t(this, k).viewRecords.reset();
|
|
1186
1188
|
}, "clear"));
|
|
1187
1189
|
d(this, te, /* @__PURE__ */ h((r) => {
|
|
1188
1190
|
var i;
|
|
@@ -1206,7 +1208,7 @@ const O = class O {
|
|
|
1206
1208
|
return e || s.forEach((n, o) => {
|
|
1207
1209
|
const a = t(this, k).rawRecords[i - o];
|
|
1208
1210
|
a && (a.__ng.rowState = O.ROW_STATE.EMPTY);
|
|
1209
|
-
}), t(this,
|
|
1211
|
+
}), t(this, rt).call(this), i;
|
|
1210
1212
|
}, "add"));
|
|
1211
1213
|
A(this, "delete", /* @__PURE__ */ h((r) => {
|
|
1212
1214
|
let e = [];
|
|
@@ -1217,7 +1219,7 @@ const O = class O {
|
|
|
1217
1219
|
n.__ng.rowid === i && (n.__ng.deleted = !0, n.__ng.rowState = O.ROW_STATE.DELETE);
|
|
1218
1220
|
});
|
|
1219
1221
|
}
|
|
1220
|
-
}), this.resetRecords(), t(this,
|
|
1222
|
+
}), this.resetRecords(), t(this, rt).call(this);
|
|
1221
1223
|
}, "delete"));
|
|
1222
1224
|
A(this, "setValue", /* @__PURE__ */ h((r, e, s) => {
|
|
1223
1225
|
var c;
|
|
@@ -1230,14 +1232,14 @@ const O = class O {
|
|
|
1230
1232
|
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;
|
|
1231
1233
|
}, "setValue"));
|
|
1232
1234
|
A(this, "resetRecords", /* @__PURE__ */ h(() => {
|
|
1233
|
-
|
|
1235
|
+
p(this, dt, t(this, k).rawRecords.filter((r) => !r.__ng.deleted)), p(this, N, t(this, k).rawRecords.filter((r) => !r.__ng.deleted && !r.__ng.filtered)), t(this, k).rawRecords.forEach((r, e) => {
|
|
1234
1236
|
r.__ng.rowidx = e;
|
|
1235
1237
|
}), t(this, N).forEach((r, e) => {
|
|
1236
1238
|
r.__ng.i = e;
|
|
1237
1239
|
});
|
|
1238
1240
|
}, "resetRecords"));
|
|
1239
1241
|
A(this, "getValidData", /* @__PURE__ */ h(() => (t(this, N).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, N)), "getValidData"));
|
|
1240
|
-
d(this,
|
|
1242
|
+
d(this, ft, /* @__PURE__ */ h((r) => {
|
|
1241
1243
|
var o;
|
|
1242
1244
|
if (!r) return r;
|
|
1243
1245
|
const e = !Array.isArray(r), s = e ? [r] : r, i = typeof ((o = t(this, _).fields) == null ? void 0 : o.get) == "function" ? t(this, _).fields.get() : [], n = s.filter((a) => !a.__ng.deleted).map((a) => {
|
|
@@ -1249,10 +1251,10 @@ const O = class O {
|
|
|
1249
1251
|
return e ? n[0] : n;
|
|
1250
1252
|
}, "#conv"));
|
|
1251
1253
|
A(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
|
|
1252
|
-
|
|
1254
|
+
p(this, _, r), p(this, k, e), t(this, Qt).call(this);
|
|
1253
1255
|
}
|
|
1254
1256
|
get source() {
|
|
1255
|
-
return t(this,
|
|
1257
|
+
return t(this, ft).call(this, t(this, k).rawRecords);
|
|
1256
1258
|
}
|
|
1257
1259
|
set source(r) {
|
|
1258
1260
|
this.clear(), this.add(r, !1);
|
|
@@ -1270,7 +1272,7 @@ const O = class O {
|
|
|
1270
1272
|
return this.length;
|
|
1271
1273
|
}
|
|
1272
1274
|
};
|
|
1273
|
-
_ = new WeakMap(), k = new WeakMap(), N = new WeakMap(),
|
|
1275
|
+
_ = new WeakMap(), k = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), rt = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), h(O, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
|
|
1274
1276
|
A(O, "ROW_STATE", {
|
|
1275
1277
|
EMPTY: "EMPTY",
|
|
1276
1278
|
NORMAL: "NORMAL",
|
|
@@ -1279,13 +1281,13 @@ A(O, "ROW_STATE", {
|
|
|
1279
1281
|
DELETE: "DELETE"
|
|
1280
1282
|
});
|
|
1281
1283
|
let ge = O;
|
|
1282
|
-
var
|
|
1284
|
+
var it;
|
|
1283
1285
|
const Oe = class Oe {
|
|
1284
1286
|
constructor(r) {
|
|
1285
|
-
d(this,
|
|
1286
|
-
|
|
1287
|
+
d(this, it);
|
|
1288
|
+
p(this, it, r), this.row = new ue(this), this.data = new ge(t(this, it), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
|
|
1287
1289
|
var e;
|
|
1288
|
-
(e = t(this,
|
|
1290
|
+
(e = t(this, it).view) != null && e.redraw && t(this, it).view.redraw();
|
|
1289
1291
|
}, this.setDataSource = (e) => {
|
|
1290
1292
|
this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
|
|
1291
1293
|
}, this.getRowState = (e) => {
|
|
@@ -1300,13 +1302,13 @@ const Oe = class Oe {
|
|
|
1300
1302
|
}, this.setDataSource([]);
|
|
1301
1303
|
}
|
|
1302
1304
|
};
|
|
1303
|
-
|
|
1305
|
+
it = new WeakMap(), h(Oe, "ngDataManager");
|
|
1304
1306
|
let be = Oe;
|
|
1305
|
-
var
|
|
1307
|
+
var ut, L, Lt, se;
|
|
1306
1308
|
const Be = class Be {
|
|
1307
1309
|
// 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
|
|
1308
1310
|
constructor(r) {
|
|
1309
|
-
d(this,
|
|
1311
|
+
d(this, ut);
|
|
1310
1312
|
d(this, L, []);
|
|
1311
1313
|
A(this, "add", /* @__PURE__ */ h((r, e = "string") => {
|
|
1312
1314
|
r.forEach((s) => {
|
|
@@ -1317,11 +1319,11 @@ const Be = class Be {
|
|
|
1317
1319
|
const r = /* @__PURE__ */ new Map();
|
|
1318
1320
|
t(this, L).forEach((e) => {
|
|
1319
1321
|
r.set(e.name, e.type);
|
|
1320
|
-
}),
|
|
1322
|
+
}), p(this, L, Array.from(r, ([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);
|
|
1321
1323
|
}, "#adjust"));
|
|
1322
1324
|
d(this, se, /* @__PURE__ */ h(() => {
|
|
1323
|
-
|
|
1324
|
-
const r = Array.from(t(this,
|
|
1325
|
+
p(this, L, []), W.log(t(this, ut).querySelectorAll("table"));
|
|
1326
|
+
const r = Array.from(t(this, ut).querySelectorAll("table"));
|
|
1325
1327
|
if (!(!r || r.length === 0)) {
|
|
1326
1328
|
for (const e of r)
|
|
1327
1329
|
W.log(e), $("[data-bind]", e).each((s, i) => {
|
|
@@ -1351,7 +1353,7 @@ const Be = class Be {
|
|
|
1351
1353
|
t(this, Lt).call(this);
|
|
1352
1354
|
}
|
|
1353
1355
|
}, "#init"));
|
|
1354
|
-
|
|
1356
|
+
p(this, ut, r), t(this, se).call(this);
|
|
1355
1357
|
}
|
|
1356
1358
|
// 🎯 기존에 필드 이름만 쓰던 곳들과의 호환을 위해 이름 배열만 리턴하는 메서드 유지
|
|
1357
1359
|
get() {
|
|
@@ -1373,19 +1375,19 @@ const Be = class Be {
|
|
|
1373
1375
|
return t(this, L).some((e) => e.name === r);
|
|
1374
1376
|
}
|
|
1375
1377
|
};
|
|
1376
|
-
|
|
1377
|
-
let
|
|
1378
|
-
var
|
|
1378
|
+
ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), h(Be, "ngFields");
|
|
1379
|
+
let pe = Be;
|
|
1380
|
+
var nt, re, ie;
|
|
1379
1381
|
const ze = class ze extends HTMLElement {
|
|
1380
1382
|
constructor() {
|
|
1381
1383
|
super();
|
|
1382
1384
|
//#created = false;
|
|
1383
|
-
d(this,
|
|
1385
|
+
d(this, nt);
|
|
1384
1386
|
d(this, re);
|
|
1385
1387
|
d(this, ie, /* @__PURE__ */ h(() => {
|
|
1386
|
-
this.fields = new
|
|
1388
|
+
this.fields = new pe(this), p(this, re, new fe(this)), W.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
1387
1389
|
}, "#init"));
|
|
1388
|
-
this.attachShadow({ mode: "open" }),
|
|
1390
|
+
this.attachShadow({ mode: "open" }), p(this, nt, new be(this));
|
|
1389
1391
|
}
|
|
1390
1392
|
connectedCallback() {
|
|
1391
1393
|
t(this, ie).call(this);
|
|
@@ -1395,21 +1397,21 @@ const ze = class ze extends HTMLElement {
|
|
|
1395
1397
|
}
|
|
1396
1398
|
// 🎯 외부에서 grid.data.set(...) 형태로 접근할 수 있도록 데이터 매니저 오픈
|
|
1397
1399
|
get data() {
|
|
1398
|
-
return t(this,
|
|
1400
|
+
return t(this, nt).data;
|
|
1399
1401
|
}
|
|
1400
1402
|
// 🎯 행(row) 관련 제어 접근자 오픈
|
|
1401
1403
|
get row() {
|
|
1402
|
-
return t(this,
|
|
1404
|
+
return t(this, nt).row;
|
|
1403
1405
|
}
|
|
1404
1406
|
// 🎯 전체 데이터 매니저 접근 필요할 경우
|
|
1405
1407
|
get dataManager() {
|
|
1406
|
-
return t(this,
|
|
1408
|
+
return t(this, nt);
|
|
1407
1409
|
}
|
|
1408
1410
|
};
|
|
1409
|
-
|
|
1410
|
-
let
|
|
1411
|
-
customElements.get("nine-table") || customElements.define("nine-table",
|
|
1412
|
-
const
|
|
1411
|
+
nt = new WeakMap(), re = new WeakMap(), ie = new WeakMap(), h(ze, "NineTable");
|
|
1412
|
+
let ye = ze;
|
|
1413
|
+
customElements.get("nine-table") || customElements.define("nine-table", ye);
|
|
1414
|
+
const mt = class mt extends HTMLElement {
|
|
1413
1415
|
// 👈 커스텀 스타일용 캐시 추가
|
|
1414
1416
|
constructor() {
|
|
1415
1417
|
super();
|
|
@@ -1420,44 +1422,44 @@ const pt = class pt extends HTMLElement {
|
|
|
1420
1422
|
connectedCallback() {
|
|
1421
1423
|
}
|
|
1422
1424
|
};
|
|
1423
|
-
h(
|
|
1424
|
-
let me =
|
|
1425
|
-
var C, Ht,
|
|
1425
|
+
h(mt, "BasicCellElement"), A(mt, "_styleCache", /* @__PURE__ */ new Map()), A(mt, "_customStyleCache", /* @__PURE__ */ new Map());
|
|
1426
|
+
let me = mt;
|
|
1427
|
+
var C, Ht, y, Re, qe, Te, ke, Ce;
|
|
1426
1428
|
const Pe = class Pe extends me {
|
|
1427
1429
|
constructor() {
|
|
1428
1430
|
super();
|
|
1429
1431
|
d(this, C);
|
|
1430
1432
|
d(this, Ht);
|
|
1431
|
-
d(this,
|
|
1433
|
+
d(this, y);
|
|
1432
1434
|
d(this, Re);
|
|
1433
1435
|
d(this, qe);
|
|
1434
1436
|
d(this, Te);
|
|
1435
1437
|
d(this, ke);
|
|
1436
1438
|
A(this, "getDisplayText", /* @__PURE__ */ h((e) => {
|
|
1437
|
-
if (t(this,
|
|
1438
|
-
if (t(this,
|
|
1439
|
-
const s = t(this,
|
|
1439
|
+
if (t(this, y))
|
|
1440
|
+
if (t(this, y).closest("tbody")) {
|
|
1441
|
+
const s = t(this, y).closest("tr").data, i = parseInt(t(this, y).dataset.row);
|
|
1440
1442
|
if (!s) return "";
|
|
1441
|
-
if (ninegrid.isNull(t(this,
|
|
1442
|
-
if (!ninegrid.isNull(t(this,
|
|
1443
|
-
return s[t(this,
|
|
1443
|
+
if (ninegrid.isNull(t(this, y).dataset.expr)) {
|
|
1444
|
+
if (!ninegrid.isNull(t(this, y).dataset.bind))
|
|
1445
|
+
return s[t(this, y).dataset.bind] || ninegrid.nvl(e, "");
|
|
1444
1446
|
} else try {
|
|
1445
|
-
return this.getExprValue(t(this,
|
|
1447
|
+
return this.getExprValue(t(this, y).dataset.expr, s, i, t(this, y));
|
|
1446
1448
|
} catch {
|
|
1447
|
-
console.error(t(this,
|
|
1449
|
+
console.error(t(this, y).dataset.expr, s, t(this, y).dataset.row);
|
|
1448
1450
|
}
|
|
1449
1451
|
return ninegrid.nvl(e, "");
|
|
1450
1452
|
} else
|
|
1451
1453
|
try {
|
|
1452
|
-
return t(this, C).exprFunction(t(this,
|
|
1454
|
+
return t(this, C).exprFunction(t(this, y).dataset.expr).call(this, null, -1, t(this, C).data);
|
|
1453
1455
|
} catch {
|
|
1454
1456
|
}
|
|
1455
1457
|
}, "getDisplayText"));
|
|
1456
1458
|
d(this, Ce, /* @__PURE__ */ h(() => {
|
|
1457
|
-
if (!(!t(this, C) || !t(this, C).template || !t(this,
|
|
1458
|
-
var e = ninegrid.j.querySelectorAll(t(this,
|
|
1459
|
+
if (!(!t(this, C) || !t(this, C).template || !t(this, y).closest("tbody.bindable"))) {
|
|
1460
|
+
var e = ninegrid.j.querySelectorAll(t(this, y)).attr("suppress");
|
|
1459
1461
|
if (e && (e = parseInt(e)), e && !isNaN(e)) {
|
|
1460
|
-
var s = t(this,
|
|
1462
|
+
var s = t(this, y).closest("tr"), i = [];
|
|
1461
1463
|
$("th,td", s).each((x, M) => {
|
|
1462
1464
|
var T = ninegrid.j.querySelectorAll(M).attr("suppress");
|
|
1463
1465
|
T && M.dataset.row && (T = parseInt(T), !isNaN(T) && T <= e && i.push(T));
|
|
@@ -1466,9 +1468,9 @@ const Pe = class Pe extends me {
|
|
|
1466
1468
|
if (parseInt(s.sectionRowIndex / t(this, C).template.length) > 0)
|
|
1467
1469
|
for (var o of i) {
|
|
1468
1470
|
if (o > e) break;
|
|
1469
|
-
var a = parseInt(t(this,
|
|
1470
|
-
t(this,
|
|
1471
|
-
var u = t(this, C).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this,
|
|
1471
|
+
var a = parseInt(t(this, y).dataset.row), c = a - 1, l = t(this, y).closest("tr").data, f = t(this, C).data.get(c);
|
|
1472
|
+
t(this, y).dataset.matrixRow;
|
|
1473
|
+
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, c) : f[u.dataset.bind];
|
|
1472
1474
|
if (g != b) {
|
|
1473
1475
|
n = !0;
|
|
1474
1476
|
break;
|
|
@@ -1476,9 +1478,9 @@ const Pe = class Pe extends me {
|
|
|
1476
1478
|
}
|
|
1477
1479
|
else
|
|
1478
1480
|
n = !0;
|
|
1479
|
-
n ? ninegrid.j.querySelectorAll(t(this,
|
|
1480
|
-
var m = parseInt(t(this,
|
|
1481
|
-
$(E).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this,
|
|
1481
|
+
n ? ninegrid.j.querySelectorAll(t(this, y)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, y)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, y)).hasClass("hidden") || (n ? ninegrid.j.querySelectorAll(t(this, y)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, y)).addClass("hidden"));
|
|
1482
|
+
var m = parseInt(t(this, y).dataset.matrixRow), v = m - 1, E = t(this, C).body.querySelector(`tbody.bindable [data-col="${t(this, y).dataset.col}"][data-matrix-row="${v}"]`);
|
|
1483
|
+
$(E).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").addClass("last-suppress") : !$(E).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").removeClass("last-suppress");
|
|
1482
1484
|
}
|
|
1483
1485
|
}
|
|
1484
1486
|
}, "#resetSuppress"));
|
|
@@ -1487,7 +1489,7 @@ const Pe = class Pe extends me {
|
|
|
1487
1489
|
try {
|
|
1488
1490
|
i = parseInt(i);
|
|
1489
1491
|
const o = e.replace("()", "");
|
|
1490
|
-
return t(this, C)[o] ? t(this, C)[o].call(this, s, i, t(this,
|
|
1492
|
+
return t(this, C)[o] ? t(this, C)[o].call(this, s, i, t(this, y)) : t(this, C).exprFunction(e).call(this, s, i, t(this, C).data);
|
|
1491
1493
|
} catch {
|
|
1492
1494
|
return ["NG-COMBO"].includes(this.tagName) ? "" : e;
|
|
1493
1495
|
}
|
|
@@ -1496,29 +1498,29 @@ const Pe = class Pe extends me {
|
|
|
1496
1498
|
}, "getExprValue"));
|
|
1497
1499
|
}
|
|
1498
1500
|
connectedCallback() {
|
|
1499
|
-
super.connectedCallback(),
|
|
1501
|
+
super.connectedCallback(), p(this, C, this.getRootNode().host), p(this, y, this.closest("th,td")), p(this, Ht, t(this, y).closest("tr"));
|
|
1500
1502
|
}
|
|
1501
1503
|
get value() {
|
|
1502
|
-
var e = !t(this, C) || !t(this, C).dataManager || !t(this,
|
|
1504
|
+
var e = !t(this, C) || !t(this, C).dataManager || !t(this, y) || !t(this, y).dataset || !t(this, y).dataset.row || !t(this, y).dataset.bind ? "" : t(this, y).closest("tr").data[t(this, y).dataset.bind];
|
|
1503
1505
|
return e ?? "";
|
|
1504
1506
|
}
|
|
1505
1507
|
set value(e) {
|
|
1506
|
-
var s = parseInt(t(this,
|
|
1508
|
+
var s = parseInt(t(this, y).dataset.row);
|
|
1507
1509
|
const i = this.getAttribute("update-row-state") != "false";
|
|
1508
|
-
s < 0 ? t(this, C).data.setValueNF(parseInt(t(this,
|
|
1510
|
+
s < 0 ? t(this, C).data.setValueNF(parseInt(t(this, y).dataset.index), t(this, y).dataset.bind, e, i) : t(this, C).data.setValue(s, t(this, y).dataset.bind, e, i);
|
|
1509
1511
|
}
|
|
1510
1512
|
get row() {
|
|
1511
|
-
return parseInt(t(this,
|
|
1513
|
+
return parseInt(t(this, y).dataset.row);
|
|
1512
1514
|
}
|
|
1513
1515
|
get data() {
|
|
1514
|
-
return t(this,
|
|
1516
|
+
return t(this, y).closest("tr").data;
|
|
1515
1517
|
}
|
|
1516
1518
|
refresh() {
|
|
1517
|
-
const e = t(this,
|
|
1518
|
-
return parseInt(t(this,
|
|
1519
|
+
const e = t(this, y).dataset.bind;
|
|
1520
|
+
return parseInt(t(this, y).dataset.row), t(this, Ht).data[e];
|
|
1519
1521
|
}
|
|
1520
1522
|
};
|
|
1521
|
-
C = new WeakMap(), Ht = new WeakMap(),
|
|
1523
|
+
C = new WeakMap(), Ht = new WeakMap(), y = new WeakMap(), Re = new WeakMap(), qe = new WeakMap(), Te = new WeakMap(), ke = new WeakMap(), Ce = new WeakMap(), h(Pe, "CellElement");
|
|
1522
1524
|
let xe = Pe;
|
|
1523
1525
|
const De = class De extends xe {
|
|
1524
1526
|
constructor() {
|
|
@@ -1533,14 +1535,14 @@ const De = class De extends xe {
|
|
|
1533
1535
|
};
|
|
1534
1536
|
h(De, "EditableCellElement");
|
|
1535
1537
|
let ve = De;
|
|
1536
|
-
var Mt,
|
|
1538
|
+
var Mt, ot, gt, bt, ne, U, Le;
|
|
1537
1539
|
const je = class je extends ve {
|
|
1538
1540
|
constructor() {
|
|
1539
1541
|
super();
|
|
1540
1542
|
d(this, Mt);
|
|
1541
|
-
d(this,
|
|
1542
|
-
d(this, ut);
|
|
1543
|
+
d(this, ot);
|
|
1543
1544
|
d(this, gt);
|
|
1545
|
+
d(this, bt);
|
|
1544
1546
|
d(this, ne);
|
|
1545
1547
|
d(this, U);
|
|
1546
1548
|
A(this, "refresh", /* @__PURE__ */ h(() => {
|
|
@@ -1579,9 +1581,9 @@ const je = class je extends ve {
|
|
|
1579
1581
|
*/
|
|
1580
1582
|
d(this, Le, /* @__PURE__ */ h((e) => {
|
|
1581
1583
|
if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
|
|
1582
|
-
if (t(this,
|
|
1584
|
+
if (t(this, ot) == "number") {
|
|
1583
1585
|
let n = [];
|
|
1584
|
-
if (t(this, U) && Number(t(this, U)) > 0 && n.push("."), t(this,
|
|
1586
|
+
if (t(this, U) && Number(t(this, U)) > 0 && n.push("."), t(this, bt) && Number(t(this, bt)) >= 0 && n.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !n.includes(e.key) && e.preventDefault(), t(this, U) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
|
|
1585
1587
|
var s = e.target.value, i = s.indexOf(".");
|
|
1586
1588
|
if (i >= 0) {
|
|
1587
1589
|
var s = s.substr(i + 1, s.length);
|
|
@@ -1589,10 +1591,10 @@ const je = class je extends ve {
|
|
|
1589
1591
|
}
|
|
1590
1592
|
}
|
|
1591
1593
|
}
|
|
1592
|
-
t(this,
|
|
1594
|
+
t(this, gt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, gt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
|
|
1593
1595
|
}
|
|
1594
1596
|
}, "#onKeyDown"));
|
|
1595
|
-
if (this.applyBaseStyle(),
|
|
1597
|
+
if (this.applyBaseStyle(), p(this, ot, this.getAttribute("type") || "text"), p(this, gt, this.getAttribute("maxbyte")), p(this, bt, this.getAttribute("min")), p(this, ne, this.getAttribute("max")), p(this, U, this.getAttribute("scale")), !["text", "number"].includes(t(this, ot))) throw `invalid type : ${t(this, ot)}`;
|
|
1596
1598
|
}
|
|
1597
1599
|
connectedCallback() {
|
|
1598
1600
|
for (var e = [], s = 0; s < this.attributes.length; s++)
|
|
@@ -1602,10 +1604,10 @@ const je = class je extends ve {
|
|
|
1602
1604
|
${e.join(" ")}
|
|
1603
1605
|
ondragstart="return false;"
|
|
1604
1606
|
>
|
|
1605
|
-
`, super.connectedCallback(),
|
|
1607
|
+
`, super.connectedCallback(), p(this, Mt, this.querySelector("input"));
|
|
1606
1608
|
}
|
|
1607
1609
|
};
|
|
1608
|
-
Mt = new WeakMap(),
|
|
1610
|
+
Mt = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), U = new WeakMap(), Le = new WeakMap(), h(je, "CellInputText");
|
|
1609
1611
|
let we = je;
|
|
1610
1612
|
customElements.get("cell-input-text");
|
|
1611
1613
|
customElements.get("cell-input") || customElements.define("cell-input", we);
|