@ninebone/table 0.0.705 → 0.0.707
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 +580 -573
- 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
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var Qe = Object.defineProperty;
|
|
2
|
+
var ts = (q) => {
|
|
3
|
+
throw TypeError(q);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var h = (
|
|
7
|
-
var
|
|
8
|
-
var t = (
|
|
9
|
-
var
|
|
5
|
+
var ns = (q, n, e) => n in q ? Qe(q, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[n] = e;
|
|
6
|
+
var h = (q, n) => Qe(q, "name", { value: n, configurable: !0 });
|
|
7
|
+
var A = (q, n, e) => ns(q, typeof n != "symbol" ? n + "" : n, e), fe = (q, n, e) => n.has(q) || ts("Cannot " + e);
|
|
8
|
+
var t = (q, n, e) => (fe(q, n, "read from private field"), e ? e.call(q) : n.get(q)), d = (q, n, e) => n.has(q) ? ts("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(q) : n.set(q, e), p = (q, n, e, s) => (fe(q, n, "write to private field"), s ? s.call(q, e) : n.set(q, e), e), vt = (q, n, e) => (fe(q, n, "access private method"), e);
|
|
9
|
+
var es = (q, n, e, s) => ({
|
|
10
10
|
set _(r) {
|
|
11
|
-
p(
|
|
11
|
+
p(q, n, r, e);
|
|
12
12
|
},
|
|
13
13
|
get _() {
|
|
14
|
-
return t(
|
|
14
|
+
return t(q, n, s);
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
import { trace as
|
|
18
|
-
const
|
|
17
|
+
import { trace as rs } from "@ninebone/util";
|
|
18
|
+
const We = class We extends rs.constructor {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(), this.init("nine-table", "green");
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
h(
|
|
24
|
-
let
|
|
25
|
-
const
|
|
26
|
-
var B, F, S,
|
|
27
|
-
const
|
|
23
|
+
h(We, "Trace");
|
|
24
|
+
let ue = We;
|
|
25
|
+
const R = new ue();
|
|
26
|
+
var B, F, S, K, Z, G, Dt, J, Pt;
|
|
27
|
+
const Be = class Be extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
30
30
|
d(this, B);
|
|
31
31
|
d(this, F, !1);
|
|
32
32
|
d(this, S);
|
|
33
|
-
d(this, X);
|
|
34
33
|
d(this, K);
|
|
35
34
|
d(this, Z);
|
|
36
|
-
d(this,
|
|
35
|
+
d(this, G);
|
|
36
|
+
d(this, Dt, /* @__PURE__ */ h(() => {
|
|
37
37
|
if (!t(this, B)) return;
|
|
38
38
|
const e = t(this, B).querySelector(".ng-container-body .ng-part-body");
|
|
39
|
-
e && (p(this,
|
|
39
|
+
e && (p(this, G, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
|
-
})), t(this,
|
|
41
|
+
})), t(this, G).observe(e));
|
|
42
42
|
}, "#observeResize"));
|
|
43
|
-
|
|
43
|
+
A(this, "refresh", /* @__PURE__ */ h(() => {
|
|
44
44
|
if (!t(this, B) || !t(this, S) || t(this, F)) return;
|
|
45
45
|
const e = t(this, S).container, s = e.querySelector("table");
|
|
46
46
|
if (!s) return;
|
|
47
|
-
const r = t(this, S).track,
|
|
47
|
+
const r = t(this, S).track, o = t(this, S).thumb, i = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
|
|
48
48
|
if (a !== 0 && c > a)
|
|
49
|
-
|
|
49
|
+
i && (i.style.display = "flex");
|
|
50
50
|
else {
|
|
51
|
-
|
|
51
|
+
i && (i.style.display = "none");
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
const l = r.clientWidth;
|
|
55
55
|
if (l <= 0) return;
|
|
56
56
|
const f = Math.max(Math.min(l * (a / c), l), 20);
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
let
|
|
60
|
-
b > 0 && (
|
|
61
|
-
const
|
|
62
|
-
|
|
57
|
+
o.style.width = `${f}px`;
|
|
58
|
+
const u = e.scrollLeft, b = c - a;
|
|
59
|
+
let g = 0;
|
|
60
|
+
b > 0 && (g = parseInt(u / b * (l - f), 10)), g < 0 && (g = 0);
|
|
61
|
+
const x = l - f;
|
|
62
|
+
g > x && (g = x), o.style.left = `${g}px`, t(this, S).left.disabled = g === 0, t(this, S).right.disabled = g >= x - 1;
|
|
63
63
|
}, "refresh"));
|
|
64
|
-
d(this,
|
|
64
|
+
d(this, J, /* @__PURE__ */ h((e) => {
|
|
65
65
|
if (!t(this, S)) return !1;
|
|
66
66
|
const s = t(this, S).container, r = s.querySelector("table");
|
|
67
67
|
if (!r) return !1;
|
|
68
|
-
const
|
|
68
|
+
const o = t(this, S).track.getBoundingClientRect(), i = t(this, S).thumb.clientWidth;
|
|
69
69
|
let a = e;
|
|
70
70
|
a < 0 && (a = 0);
|
|
71
|
-
const c =
|
|
71
|
+
const c = o.width - i;
|
|
72
72
|
a > c && (a = c), a = parseInt(a, 10), t(this, S).thumb.style.left = `${a}px`, t(this, S).left.disabled = a === 0, t(this, S).right.disabled = a >= c - 1;
|
|
73
|
-
const l = s.clientWidth,
|
|
74
|
-
return c > 0 &&
|
|
73
|
+
const l = s.clientWidth, u = r.scrollWidth - l;
|
|
74
|
+
return c > 0 && u > 0 && (s.scrollLeft = a / c * u), a > 0 && a < c - 1;
|
|
75
75
|
}, "#thumbMoveTo"));
|
|
76
|
-
d(this,
|
|
76
|
+
d(this, Pt, /* @__PURE__ */ h(() => {
|
|
77
77
|
const e = /* @__PURE__ */ h((r) => {
|
|
78
|
-
clearInterval(t(this,
|
|
79
|
-
const
|
|
80
|
-
t(this,
|
|
81
|
-
clearInterval(t(this,
|
|
82
|
-
const
|
|
83
|
-
t(this,
|
|
78
|
+
clearInterval(t(this, K)), clearInterval(t(this, Z));
|
|
79
|
+
const o = parseInt(t(this, S).thumb.style.left || 0, 10);
|
|
80
|
+
t(this, J).call(this, o + r), p(this, K, setInterval(() => {
|
|
81
|
+
clearInterval(t(this, K)), p(this, Z, setInterval(() => {
|
|
82
|
+
const i = parseInt(t(this, S).thumb.style.left || 0, 10);
|
|
83
|
+
t(this, J).call(this, i + r) || clearInterval(t(this, Z));
|
|
84
84
|
}, 50));
|
|
85
85
|
}, 500));
|
|
86
86
|
}, "delayScroll"), s = /* @__PURE__ */ h(() => {
|
|
87
|
-
clearInterval(t(this,
|
|
87
|
+
clearInterval(t(this, K)), clearInterval(t(this, Z));
|
|
88
88
|
}, "clearTimer");
|
|
89
89
|
["mouseup", "mouseleave", "touchend"].forEach((r) => {
|
|
90
90
|
t(this, S).left.addEventListener(r, s), t(this, S).right.addEventListener(r, s), t(this, S).track.addEventListener(r, s);
|
|
@@ -95,19 +95,19 @@ const We = class We extends HTMLElement {
|
|
|
95
95
|
}), t(this, S).left.addEventListener("touchstart", () => e(-20)), t(this, S).right.addEventListener("touchstart", () => e(20)), t(this, S).track.addEventListener("mousedown", (r) => {
|
|
96
96
|
if (r.button !== 0) return;
|
|
97
97
|
r.preventDefault();
|
|
98
|
-
const
|
|
99
|
-
t(this,
|
|
98
|
+
const o = t(this, S).track.getBoundingClientRect(), i = t(this, S).thumb.clientWidth;
|
|
99
|
+
t(this, J).call(this, r.clientX - o.left - i / 2);
|
|
100
100
|
}), t(this, S).thumb.addEventListener("mousedown", (r) => {
|
|
101
101
|
if (r.button !== 0) return;
|
|
102
102
|
r.stopPropagation(), r.preventDefault(), p(this, F, !0), this.shiftX = r.clientX - t(this, S).thumb.getBoundingClientRect().left;
|
|
103
|
-
const
|
|
103
|
+
const o = /* @__PURE__ */ h((a) => {
|
|
104
104
|
if (!t(this, F)) return;
|
|
105
105
|
const c = t(this, S).track.getBoundingClientRect();
|
|
106
|
-
t(this,
|
|
107
|
-
}, "onMouseMove"),
|
|
108
|
-
p(this, F, !1), s(), document.removeEventListener("mousemove",
|
|
106
|
+
t(this, J).call(this, a.clientX - c.left - this.shiftX);
|
|
107
|
+
}, "onMouseMove"), i = /* @__PURE__ */ h(() => {
|
|
108
|
+
p(this, F, !1), s(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
|
|
109
109
|
}, "onMouseUp");
|
|
110
|
-
document.addEventListener("mousemove",
|
|
110
|
+
document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
|
|
111
111
|
});
|
|
112
112
|
}, "#init"));
|
|
113
113
|
}
|
|
@@ -190,75 +190,75 @@ const We = class We extends HTMLElement {
|
|
|
190
190
|
right: this.querySelector(".ng-scroll-right")
|
|
191
191
|
}), s.addEventListener("scroll", () => {
|
|
192
192
|
t(this, F) || this.refresh();
|
|
193
|
-
}), t(this,
|
|
193
|
+
}), t(this, Pt).call(this), t(this, Dt).call(this), this.refresh();
|
|
194
194
|
}, "initWhenReady");
|
|
195
195
|
e();
|
|
196
196
|
}
|
|
197
197
|
disconnectedCallback() {
|
|
198
|
-
t(this,
|
|
198
|
+
t(this, G) && t(this, G).disconnect();
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
B = new WeakMap(), F = new WeakMap(), S = new WeakMap(),
|
|
202
|
-
let
|
|
203
|
-
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar",
|
|
204
|
-
var
|
|
205
|
-
const
|
|
201
|
+
B = new WeakMap(), F = new WeakMap(), S = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), G = new WeakMap(), Dt = new WeakMap(), J = new WeakMap(), Pt = new WeakMap(), h(Be, "NineTableHScrollBar");
|
|
202
|
+
let ge = Be;
|
|
203
|
+
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ge);
|
|
204
|
+
var Q, tt, ht, k, Rt, Et, Ft;
|
|
205
|
+
const De = class De extends HTMLElement {
|
|
206
206
|
constructor() {
|
|
207
207
|
super();
|
|
208
|
-
d(this, J);
|
|
209
208
|
d(this, Q);
|
|
210
|
-
d(this,
|
|
209
|
+
d(this, tt);
|
|
210
|
+
d(this, ht, !1);
|
|
211
211
|
d(this, k);
|
|
212
|
-
d(this,
|
|
213
|
-
d(this,
|
|
214
|
-
|
|
215
|
-
if (
|
|
216
|
-
const e = t(this, k).container, s = t(this, k).track, r = t(this, k).thumb,
|
|
217
|
-
if (c <=
|
|
212
|
+
d(this, Rt, 0);
|
|
213
|
+
d(this, Et, 0);
|
|
214
|
+
A(this, "refresh", /* @__PURE__ */ h(() => {
|
|
215
|
+
if (R.log("vscrollbar.refresh"), !t(this, Q) || !t(this, k)) return;
|
|
216
|
+
const e = t(this, k).container, s = t(this, k).track, r = t(this, k).thumb, o = e.clientHeight, i = t(this, Q).data.length, a = t(this, tt).getRowHeight(), c = i * a;
|
|
217
|
+
if (c <= o || i === 0) {
|
|
218
218
|
this.style.display = "none";
|
|
219
219
|
return;
|
|
220
220
|
} else
|
|
221
221
|
this.style.display = "flex";
|
|
222
222
|
const l = s.clientHeight;
|
|
223
223
|
if (l <= 0) return;
|
|
224
|
-
const f = Math.max(Math.min(l * (
|
|
224
|
+
const f = Math.max(Math.min(l * (o / c), l), 20);
|
|
225
225
|
r.style.height = `${f}px`;
|
|
226
|
-
const
|
|
227
|
-
|
|
228
|
-
let
|
|
229
|
-
b > 0 && (
|
|
230
|
-
const
|
|
231
|
-
|
|
226
|
+
const u = e.scrollTop, b = Math.max(c - o, 1);
|
|
227
|
+
R.log(e, u, b);
|
|
228
|
+
let g = 0;
|
|
229
|
+
b > 0 && (g = u / b * (l - f));
|
|
230
|
+
const x = l - f;
|
|
231
|
+
g < 0 && (g = 0), g > x && (g = x), r.style.top = `${g}px`, t(this, k).top.disabled = u <= 0, t(this, k).bottom.disabled = u >= b - 1;
|
|
232
232
|
}, "refresh"));
|
|
233
|
-
d(this,
|
|
234
|
-
|
|
233
|
+
d(this, Ft, /* @__PURE__ */ h(() => {
|
|
234
|
+
R.log("nine-table-vscrollbar.#init");
|
|
235
235
|
const e = t(this, k).container, s = /* @__PURE__ */ h(() => {
|
|
236
|
-
const
|
|
237
|
-
return
|
|
236
|
+
const o = (t(this, Q).data.get() || []).length, i = t(this, tt).getRowHeight();
|
|
237
|
+
return o * i;
|
|
238
238
|
}, "getContentHeight");
|
|
239
239
|
t(this, k).thumb.addEventListener("mousedown", (r) => {
|
|
240
240
|
if (r.button !== 0) return;
|
|
241
|
-
r.stopPropagation(), r.preventDefault(), p(this,
|
|
242
|
-
const
|
|
243
|
-
if (!t(this,
|
|
244
|
-
const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight,
|
|
245
|
-
if (
|
|
246
|
-
const
|
|
247
|
-
let
|
|
248
|
-
const z = Math.max(0,
|
|
249
|
-
|
|
241
|
+
r.stopPropagation(), r.preventDefault(), p(this, ht, !0), p(this, Rt, r.clientY), p(this, Et, e.scrollTop);
|
|
242
|
+
const o = /* @__PURE__ */ h((a) => {
|
|
243
|
+
if (!t(this, ht)) return;
|
|
244
|
+
const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, Rt), g = e.clientHeight, x = s(), v = Math.max(x - g, 1);
|
|
245
|
+
if (u > 0 && v > 0) {
|
|
246
|
+
const E = b / u * v;
|
|
247
|
+
let y = t(this, Et) + E;
|
|
248
|
+
const z = Math.max(0, x - g);
|
|
249
|
+
y < 0 && (y = 0), y > z && (y = z), e.scrollTop = y;
|
|
250
250
|
}
|
|
251
251
|
this.refresh();
|
|
252
|
-
}, "onMouseMove"),
|
|
253
|
-
p(this,
|
|
252
|
+
}, "onMouseMove"), i = /* @__PURE__ */ h(() => {
|
|
253
|
+
p(this, ht, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
|
|
254
254
|
}, "onMouseUp");
|
|
255
|
-
document.addEventListener("mousemove",
|
|
255
|
+
document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
|
|
256
256
|
}), t(this, k).track.addEventListener("mousedown", (r) => {
|
|
257
257
|
if (r.button !== 0 || r.target === t(this, k).thumb) return;
|
|
258
|
-
const
|
|
258
|
+
const o = t(this, k).track.getBoundingClientRect(), i = t(this, k).thumb.clientHeight, a = r.clientY - o.top - i / 2, l = o.height - i, f = e.clientHeight, u = s(), b = Math.max(u - f, 1);
|
|
259
259
|
if (l > 0 && b > 0) {
|
|
260
|
-
const
|
|
261
|
-
e.scrollTop =
|
|
260
|
+
const g = Math.max(0, Math.min(1, a / l));
|
|
261
|
+
e.scrollTop = g * b;
|
|
262
262
|
}
|
|
263
263
|
this.refresh();
|
|
264
264
|
}), t(this, k).top.addEventListener("click", () => {
|
|
@@ -269,7 +269,7 @@ const Oe = class Oe extends HTMLElement {
|
|
|
269
269
|
}, "#init"));
|
|
270
270
|
}
|
|
271
271
|
connectedCallback() {
|
|
272
|
-
p(this,
|
|
272
|
+
p(this, Q, this.getRootNode().host), p(this, tt, this.closest("nine-table-sheet")), this.innerHTML = `
|
|
273
273
|
<style>
|
|
274
274
|
nine-table-vscrollbar {
|
|
275
275
|
display: flex;
|
|
@@ -334,7 +334,7 @@ const Oe = class Oe extends HTMLElement {
|
|
|
334
334
|
<button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
|
|
335
335
|
`;
|
|
336
336
|
const e = /* @__PURE__ */ h(() => {
|
|
337
|
-
const s = t(this,
|
|
337
|
+
const s = t(this, tt).querySelector(".ng-container-body .ng-part-body");
|
|
338
338
|
if (!s) {
|
|
339
339
|
setTimeout(e, 10);
|
|
340
340
|
return;
|
|
@@ -345,59 +345,59 @@ const Oe = class Oe extends HTMLElement {
|
|
|
345
345
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
346
346
|
top: this.querySelector(".ng-scroll-top"),
|
|
347
347
|
bottom: this.querySelector(".ng-scroll-bottom")
|
|
348
|
-
}), t(this,
|
|
348
|
+
}), t(this, Ft).call(this), this.refresh();
|
|
349
349
|
}, "initWhenReady");
|
|
350
350
|
e();
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
|
-
|
|
354
|
-
let
|
|
355
|
-
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar",
|
|
356
|
-
var P, w,
|
|
357
|
-
const
|
|
353
|
+
Q = new WeakMap(), tt = new WeakMap(), ht = new WeakMap(), k = new WeakMap(), Rt = new WeakMap(), Et = new WeakMap(), Ft = new WeakMap(), h(De, "NineTableVScrollBar");
|
|
354
|
+
let be = De;
|
|
355
|
+
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", be);
|
|
356
|
+
var P, w, et, D, I, j, st, At, Le, He, jt, Yt, qt, Tt, kt, Vt, Ut, Ct, $e, dt, Lt, Xt;
|
|
357
|
+
const Pe = class Pe {
|
|
358
358
|
constructor(n) {
|
|
359
359
|
d(this, P);
|
|
360
360
|
d(this, w);
|
|
361
|
-
d(this,
|
|
361
|
+
d(this, et);
|
|
362
362
|
d(this, D, /* @__PURE__ */ new Map());
|
|
363
363
|
d(this, I, null);
|
|
364
364
|
d(this, j, null);
|
|
365
|
-
d(this,
|
|
366
|
-
d(this,
|
|
367
|
-
d(this,
|
|
368
|
-
d(this,
|
|
365
|
+
d(this, st, 0);
|
|
366
|
+
d(this, At, 40);
|
|
367
|
+
d(this, Le, !1);
|
|
368
|
+
d(this, He, !1);
|
|
369
369
|
//#ticking = false; // 🎯 고속 스크롤 스로틀링용 플래그
|
|
370
|
-
d(this,
|
|
371
|
-
|
|
370
|
+
d(this, jt, 3);
|
|
371
|
+
A(this, "refresh", /* @__PURE__ */ h(() => {
|
|
372
372
|
var e;
|
|
373
|
-
|
|
373
|
+
R.log("rowManager.refresh");
|
|
374
374
|
const n = t(this, w).querySelector(".ng-container-body .ng-part-body");
|
|
375
|
-
n && (t(this,
|
|
375
|
+
n && (t(this, qt).call(this), t(this, Tt).call(this), t(this, dt).call(this, n.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
|
|
376
376
|
}, "refresh"));
|
|
377
|
-
|
|
378
|
-
|
|
377
|
+
A(this, "initialize", /* @__PURE__ */ h(() => {
|
|
378
|
+
R.log("rowManager.initialize"), p(this, et, {
|
|
379
379
|
scrollTables: t(this, w).querySelectorAll(".ng-part-body table"),
|
|
380
380
|
firstTr: t(this, w).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
|
|
381
|
-
}), p(this, I, null), t(this, D).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((
|
|
382
|
-
const a = t(this, w).querySelector(
|
|
381
|
+
}), p(this, I, null), t(this, D).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
|
|
382
|
+
const a = t(this, w).querySelector(i);
|
|
383
383
|
if (!a) return;
|
|
384
384
|
const c = a.querySelector(".ng-part-body table");
|
|
385
385
|
if (!c) return;
|
|
386
386
|
const l = c.querySelector("tbody.bindable-tbody");
|
|
387
387
|
if (!l) return;
|
|
388
|
-
const
|
|
389
|
-
t(this, D).set(
|
|
388
|
+
const u = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
|
|
389
|
+
t(this, D).set(i, u);
|
|
390
390
|
});
|
|
391
|
-
const n = t(this, w).querySelector(".ng-container-body .ng-part-body"), e = t(this, w).querySelector(".ng-container-left .ng-part-body"), s = t(this, w).querySelector(".ng-container-right .ng-part-body"), r = t(this, w).querySelector(".ng-container-body .ng-part-header"),
|
|
391
|
+
const n = t(this, w).querySelector(".ng-container-body .ng-part-body"), e = t(this, w).querySelector(".ng-container-left .ng-part-body"), s = t(this, w).querySelector(".ng-container-right .ng-part-body"), r = t(this, w).querySelector(".ng-container-body .ng-part-header"), o = t(this, w).querySelector(".ng-container-body .ng-part-footer");
|
|
392
392
|
if (n) {
|
|
393
|
-
t(this,
|
|
394
|
-
let
|
|
393
|
+
t(this, qt).call(this), t(this, Ct).call(this), t(this, Tt).call(this), t(this, dt).call(this, n.scrollTop);
|
|
394
|
+
let i = !1;
|
|
395
395
|
const a = /* @__PURE__ */ h((c) => {
|
|
396
|
-
var
|
|
397
|
-
if (
|
|
398
|
-
|
|
396
|
+
var u;
|
|
397
|
+
if (i) return;
|
|
398
|
+
i = !0;
|
|
399
399
|
const l = c.scrollTop, f = c.scrollLeft;
|
|
400
|
-
n && n.scrollTop !== l && (n.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f),
|
|
400
|
+
n && n.scrollTop !== l && (n.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), o && o.scrollLeft !== f && (o.scrollLeft = f), t(this, dt).call(this, l), (u = t(this, w).querySelector("nine-table-vscrollbar")) == null || u.refresh(), i = !1;
|
|
401
401
|
}, "handleContainerScroll");
|
|
402
402
|
[n, e, s].forEach((c) => {
|
|
403
403
|
c == null || c.addEventListener("scroll", () => {
|
|
@@ -406,158 +406,158 @@ const Be = class Be {
|
|
|
406
406
|
});
|
|
407
407
|
}
|
|
408
408
|
}, "initialize"));
|
|
409
|
-
d(this,
|
|
410
|
-
|
|
409
|
+
d(this, Yt, /* @__PURE__ */ h((n, e) => {
|
|
410
|
+
R.log("rowManager.#renderRows");
|
|
411
411
|
const s = t(this, D).get(e);
|
|
412
412
|
if (!s || s.length === 0) return;
|
|
413
413
|
const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
414
414
|
if (!r) return;
|
|
415
415
|
r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
|
|
416
|
-
const
|
|
417
|
-
for (let a = 0; a < t(this,
|
|
416
|
+
const o = r.querySelector("tr.nodata"), i = document.createDocumentFragment();
|
|
417
|
+
for (let a = 0; a < t(this, At); a++)
|
|
418
418
|
s.forEach((c) => {
|
|
419
|
-
|
|
419
|
+
i.appendChild(c.cloneNode(!0));
|
|
420
420
|
});
|
|
421
|
-
|
|
421
|
+
o ? o.before(i) : r.appendChild(i), e === ".ng-container-body" && (t(this, et).firstTr = r.querySelector("tr:not(.nodata)"));
|
|
422
422
|
}, "#renderRows"));
|
|
423
|
-
d(this,
|
|
423
|
+
d(this, qt, /* @__PURE__ */ h(() => {
|
|
424
424
|
if (t(this, I) !== null && t(this, I) > 0)
|
|
425
425
|
return t(this, I);
|
|
426
426
|
const n = t(this, w).querySelector(".ng-container-body .ng-part-body");
|
|
427
|
-
|
|
427
|
+
R.log("rowManager.#measureAndCacheHeight");
|
|
428
428
|
const e = t(this, D).get(".ng-container-body");
|
|
429
429
|
if (!e || e.length === 0) throw new Error("invalid dom");
|
|
430
430
|
const s = n.querySelector("tbody.bindable-tbody");
|
|
431
|
-
if (
|
|
431
|
+
if (R.log(s), !s) throw new Error("invalid dom");
|
|
432
432
|
s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
|
|
433
|
-
const r = s.querySelector("tr.nodata"),
|
|
433
|
+
const r = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
|
|
434
434
|
e.forEach((b) => {
|
|
435
|
-
|
|
436
|
-
}), r ? r.before(
|
|
437
|
-
const
|
|
438
|
-
(a === "none" || window.getComputedStyle(
|
|
435
|
+
o.appendChild(b.cloneNode(!0));
|
|
436
|
+
}), r ? r.before(o) : s.appendChild(o);
|
|
437
|
+
const i = t(this, w), a = i.style.display, c = i.style.visibility, l = i.style.position;
|
|
438
|
+
(a === "none" || window.getComputedStyle(i).display === "none") && (i.style.display = "block", i.style.visibility = "hidden", i.style.position = "absolute");
|
|
439
439
|
let f = 0;
|
|
440
|
-
const
|
|
441
|
-
return
|
|
442
|
-
let
|
|
443
|
-
if (
|
|
444
|
-
const
|
|
445
|
-
|
|
440
|
+
const u = s.querySelectorAll("tr");
|
|
441
|
+
return u.forEach((b) => {
|
|
442
|
+
let g = b.offsetHeight || b.getBoundingClientRect().height;
|
|
443
|
+
if (g === 0) {
|
|
444
|
+
const x = window.getComputedStyle(b);
|
|
445
|
+
g = parseFloat(x.height) || parseFloat(x.minHeight) || 0;
|
|
446
446
|
}
|
|
447
|
-
f +=
|
|
448
|
-
}),
|
|
447
|
+
f += g;
|
|
448
|
+
}), u.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, f <= 0 ? -1 : (p(this, I, f), t(this, kt).call(this), t(this, I));
|
|
449
449
|
}, "#measureAndCacheHeight"));
|
|
450
|
-
d(this,
|
|
451
|
-
|
|
450
|
+
d(this, Tt, /* @__PURE__ */ h(() => {
|
|
451
|
+
R.log("rowManager.#updateVirtualScrollHeight");
|
|
452
452
|
const e = (t(this, P).data.get() || []).length, s = t(this, I), r = e * s;
|
|
453
|
-
|
|
454
|
-
const
|
|
455
|
-
if (!
|
|
456
|
-
const a =
|
|
453
|
+
R.log("🔍 [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
|
|
454
|
+
const i = t(this, w).querySelector(o);
|
|
455
|
+
if (!i) return;
|
|
456
|
+
const a = i.querySelector(".ng-part-body .ng-virtual-spacer");
|
|
457
457
|
a && (a.style.height = `${r}px`);
|
|
458
458
|
});
|
|
459
459
|
}, "#updateVirtualScrollHeight"));
|
|
460
|
-
d(this,
|
|
461
|
-
if (t(this,
|
|
462
|
-
const n = Math.ceil(t(this,
|
|
463
|
-
p(this,
|
|
460
|
+
d(this, kt, /* @__PURE__ */ h(() => {
|
|
461
|
+
if (t(this, st) > 0 && t(this, I) > 0) {
|
|
462
|
+
const n = Math.ceil(t(this, st) / t(this, I));
|
|
463
|
+
p(this, At, n + t(this, jt));
|
|
464
464
|
}
|
|
465
465
|
}, "#updateRowCount"));
|
|
466
|
-
d(this,
|
|
467
|
-
var a, c, l, f,
|
|
466
|
+
d(this, Vt, /* @__PURE__ */ h(() => {
|
|
467
|
+
var a, c, l, f, u, b;
|
|
468
468
|
const n = t(this, w).querySelector(".ng-container-left .ng-part-body table"), e = t(this, w).querySelector(".ng-container-body .ng-part-body table"), s = t(this, w).querySelector(".ng-container-right .ng-part-body table");
|
|
469
469
|
if (e) {
|
|
470
|
-
const
|
|
471
|
-
for (let
|
|
470
|
+
const g = n ? Array.from(n.querySelectorAll("tbody tr")) : [], x = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], E = Math.max(g.length, x.length, v.length);
|
|
471
|
+
for (let y = 0; y < E; y++) {
|
|
472
472
|
const z = [
|
|
473
|
-
((a =
|
|
474
|
-
((c =
|
|
475
|
-
((l = v[
|
|
473
|
+
((a = g[y]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
|
|
474
|
+
((c = x[y]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
|
|
475
|
+
((l = v[y]) == null ? void 0 : l.getBoundingClientRect().height) || 0
|
|
476
476
|
], T = Math.max(...z);
|
|
477
|
-
T > 0 && (
|
|
477
|
+
T > 0 && (g[y] && (g[y].style.height = `${T}px`), x[y] && (x[y].style.height = `${T}px`), v[y] && (v[y].style.height = `${T}px`));
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
const r = t(this, w).querySelector(".ng-container-left .ng-part-footer table"),
|
|
481
|
-
if (
|
|
482
|
-
const
|
|
483
|
-
for (let
|
|
480
|
+
const r = t(this, w).querySelector(".ng-container-left .ng-part-footer table"), o = t(this, w).querySelector(".ng-container-body .ng-part-footer table"), i = t(this, w).querySelector(".ng-container-right .ng-part-footer table");
|
|
481
|
+
if (o) {
|
|
482
|
+
const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], x = Array.from(o.querySelectorAll("tfoot tr")), v = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], E = Math.max(g.length, x.length, v.length);
|
|
483
|
+
for (let y = 0; y < E; y++) {
|
|
484
484
|
const z = [
|
|
485
|
-
((f =
|
|
486
|
-
((
|
|
487
|
-
((b = v[
|
|
485
|
+
((f = g[y]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
|
|
486
|
+
((u = x[y]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
|
|
487
|
+
((b = v[y]) == null ? void 0 : b.getBoundingClientRect().height) || 0
|
|
488
488
|
], T = Math.max(...z);
|
|
489
|
-
T > 0 && (
|
|
489
|
+
T > 0 && (g[y] && (g[y].style.height = `${T}px`), x[y] && (x[y].style.height = `${T}px`), v[y] && (v[y].style.height = `${T}px`));
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
}, "#syncRowHeights"));
|
|
493
|
-
d(this,
|
|
493
|
+
d(this, Ut, /* @__PURE__ */ h(() => {
|
|
494
494
|
!t(this, w) || !(t(this, w) instanceof HTMLElement) || (p(this, j, new ResizeObserver((n) => {
|
|
495
495
|
for (const e of n) {
|
|
496
496
|
const s = e.target;
|
|
497
497
|
if (!s.classList.contains("active")) continue;
|
|
498
498
|
const r = e.contentRect.height;
|
|
499
499
|
if (r > 0) {
|
|
500
|
-
let
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
const c = Math.max(r -
|
|
504
|
-
t(this,
|
|
500
|
+
let o = 0;
|
|
501
|
+
const i = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
|
|
502
|
+
i && (o += i.offsetHeight), a && (o += a.offsetHeight);
|
|
503
|
+
const c = Math.max(r - o, 100);
|
|
504
|
+
t(this, st) !== c && (p(this, st, c), t(this, kt).call(this), t(this, I) !== null && (t(this, Ct).call(this), this.refresh()));
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
})), t(this, j).observe(t(this, w)));
|
|
508
508
|
}, "#initResizeObserver"));
|
|
509
|
-
d(this,
|
|
510
|
-
|
|
509
|
+
d(this, Ct, /* @__PURE__ */ h(() => {
|
|
510
|
+
R.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
|
|
511
511
|
const e = t(this, w).querySelector(n);
|
|
512
|
-
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this,
|
|
513
|
-
}), t(this,
|
|
512
|
+
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Yt).call(this, e, n);
|
|
513
|
+
}), t(this, Xt).call(this), t(this, Vt).call(this);
|
|
514
514
|
}, "#renderAllContainers"));
|
|
515
|
-
d(this,
|
|
515
|
+
d(this, $e, /* @__PURE__ */ h((n) => {
|
|
516
516
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
|
|
517
517
|
var l;
|
|
518
518
|
const s = t(this, w).querySelector(e);
|
|
519
519
|
if (!s) return;
|
|
520
520
|
const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
521
521
|
if (!r) return;
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
const b = n + Math.floor(
|
|
522
|
+
const o = Array.from(r.querySelectorAll("tr:not(.nodata)")), i = ((l = t(this, D).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, P).data.get() || []).length;
|
|
523
|
+
o.forEach((f, u) => {
|
|
524
|
+
const b = n + Math.floor(u / i);
|
|
525
525
|
if (b >= c) {
|
|
526
526
|
f.style.visibility = "hidden";
|
|
527
527
|
return;
|
|
528
528
|
}
|
|
529
|
-
const
|
|
530
|
-
f.style.display = "", t(this,
|
|
529
|
+
const g = t(this, P).data.get(b);
|
|
530
|
+
f.style.display = "", t(this, Lt).call(this, f, g, b);
|
|
531
531
|
});
|
|
532
532
|
});
|
|
533
533
|
}, "#adjustBufferRows"));
|
|
534
|
-
d(this,
|
|
535
|
-
var
|
|
534
|
+
d(this, dt, /* @__PURE__ */ h((n) => {
|
|
535
|
+
var u, b;
|
|
536
536
|
const e = t(this, I);
|
|
537
537
|
if (!e || e <= 0) return;
|
|
538
538
|
const s = t(this, P).data.length;
|
|
539
539
|
if (s === 0) return;
|
|
540
|
-
const r = ((
|
|
541
|
-
|
|
542
|
-
const
|
|
540
|
+
const r = ((u = t(this, D).get(".ng-container-body")) == null ? void 0 : u.length) || 1, o = t(this, w).querySelector(".ng-container-body .ng-part-body");
|
|
541
|
+
R.log("bodyContainer.clientHeight", o.clientHeight);
|
|
542
|
+
const i = Math.max(0, s - Math.floor(o.clientHeight / e)), a = Math.min(i, Math.max(0, Math.floor(n / e)));
|
|
543
543
|
let c = Math.floor(a * e);
|
|
544
|
-
|
|
545
|
-
const l = t(this,
|
|
546
|
-
(b = t(this,
|
|
547
|
-
|
|
548
|
-
}), f !== a && (
|
|
549
|
-
const
|
|
550
|
-
if (!
|
|
551
|
-
const v =
|
|
544
|
+
R.log(`📜 [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && R.log(`📜 [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
|
|
545
|
+
const l = t(this, et).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
|
|
546
|
+
(b = t(this, et)) == null || b.scrollTables.forEach((g) => {
|
|
547
|
+
g.style.transform = `translate3d(0, ${c}px, 0)`;
|
|
548
|
+
}), f !== a && (R.log(`🔄 [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
|
|
549
|
+
const x = t(this, w).querySelector(g);
|
|
550
|
+
if (!x) return;
|
|
551
|
+
const v = x.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
552
552
|
if (!v) return;
|
|
553
|
-
Array.from(v.querySelectorAll("tr:not(.nodata)")).forEach((
|
|
553
|
+
Array.from(v.querySelectorAll("tr:not(.nodata)")).forEach((y, z) => {
|
|
554
554
|
const T = a + Math.floor(z / r);
|
|
555
555
|
if (T >= s) {
|
|
556
|
-
|
|
556
|
+
y.style.display = "none";
|
|
557
557
|
return;
|
|
558
558
|
}
|
|
559
|
-
const
|
|
560
|
-
|
|
559
|
+
const O = t(this, P).data.get(T);
|
|
560
|
+
y.style.display = "", t(this, Lt).call(this, y, O, T);
|
|
561
561
|
});
|
|
562
562
|
}));
|
|
563
563
|
}, "#handleScroll"));
|
|
@@ -575,32 +575,32 @@ const Be = class Be {
|
|
|
575
575
|
cell.dataset.row = dataIndex;
|
|
576
576
|
});
|
|
577
577
|
}; */
|
|
578
|
-
d(this,
|
|
579
|
-
n.dataset.row = s, n.data = e, Array.from(n.cells).forEach((r,
|
|
578
|
+
d(this, Lt, /* @__PURE__ */ h((n, e, s) => {
|
|
579
|
+
n.dataset.row = s, n.data = e, Array.from(n.cells).forEach((r, o) => {
|
|
580
580
|
r.dataset.row = s;
|
|
581
|
-
const
|
|
582
|
-
|
|
581
|
+
const i = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
|
|
582
|
+
i && typeof i.refresh == "function" && i.refresh();
|
|
583
583
|
});
|
|
584
584
|
}, "#bindRowData"));
|
|
585
|
-
d(this,
|
|
585
|
+
d(this, Xt, /* @__PURE__ */ h(() => {
|
|
586
586
|
var c, l, f;
|
|
587
|
-
|
|
587
|
+
R.log("rowManager.#syncHeaderHeights");
|
|
588
588
|
const n = t(this, w).querySelector(".ng-container-left .ng-part-header table"), e = t(this, w).querySelector(".ng-container-body .ng-part-header table"), s = t(this, w).querySelector(".ng-container-right .ng-part-header table");
|
|
589
589
|
if (!e) return;
|
|
590
|
-
const r = n ? Array.from(n.querySelectorAll("tr")) : [],
|
|
591
|
-
for (let
|
|
590
|
+
const r = n ? Array.from(n.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), i = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, o.length, i.length);
|
|
591
|
+
for (let u = 0; u < a; u++) {
|
|
592
592
|
const b = [
|
|
593
|
-
((c = r[
|
|
594
|
-
((l =
|
|
595
|
-
((f =
|
|
596
|
-
],
|
|
597
|
-
|
|
593
|
+
((c = r[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
|
|
594
|
+
((l = o[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
|
|
595
|
+
((f = i[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
|
|
596
|
+
], g = Math.max(...b);
|
|
597
|
+
g > 0 && (r[u] && (r[u].style.height = `${g}px`), o[u] && (o[u].style.height = `${g}px`), i[u] && (i[u].style.height = `${g}px`));
|
|
598
598
|
}
|
|
599
599
|
}, "#syncHeaderHeights"));
|
|
600
|
-
|
|
600
|
+
A(this, "destroy", /* @__PURE__ */ h(() => {
|
|
601
601
|
t(this, j) && (t(this, j).disconnect(), p(this, j, null));
|
|
602
602
|
}, "destroy"));
|
|
603
|
-
p(this, P, n.getRootNode().host), p(this, w, n), t(this,
|
|
603
|
+
p(this, P, n.getRootNode().host), p(this, w, n), t(this, Ut).call(this);
|
|
604
604
|
}
|
|
605
605
|
getRowHeight() {
|
|
606
606
|
return t(this, I);
|
|
@@ -610,14 +610,14 @@ const Be = class Be {
|
|
|
610
610
|
return ((e = t(this, D).get(n)) == null ? void 0 : e.length) || 1;
|
|
611
611
|
}
|
|
612
612
|
};
|
|
613
|
-
P = new WeakMap(), w = new WeakMap(),
|
|
614
|
-
let
|
|
615
|
-
const
|
|
613
|
+
P = new WeakMap(), w = new WeakMap(), et = new WeakMap(), D = new WeakMap(), I = new WeakMap(), j = new WeakMap(), st = new WeakMap(), At = new WeakMap(), Le = new WeakMap(), He = new WeakMap(), jt = new WeakMap(), Yt = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(), kt = new WeakMap(), Vt = new WeakMap(), Ut = new WeakMap(), Ct = new WeakMap(), $e = new WeakMap(), dt = new WeakMap(), Lt = new WeakMap(), Xt = new WeakMap(), h(Pe, "RowManager");
|
|
614
|
+
let pe = Pe;
|
|
615
|
+
const Kt = class Kt {
|
|
616
616
|
/**
|
|
617
617
|
* 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
|
|
618
618
|
*/
|
|
619
619
|
static compileAll(n) {
|
|
620
|
-
return Array.isArray(n) ? n.map((e) =>
|
|
620
|
+
return Array.isArray(n) ? n.map((e) => Kt.compile(e)) : [];
|
|
621
621
|
}
|
|
622
622
|
/**
|
|
623
623
|
* 🎯 단일 원본 테이블을 받아 기본 구조 보정 및 2차원 격자 인덱스 사전 부여 완료된 마스터 테이블 반환
|
|
@@ -628,17 +628,17 @@ const Vt = class Vt {
|
|
|
628
628
|
a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
|
|
629
629
|
const f = l.getAttribute("cell-type") || "renderer";
|
|
630
630
|
if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
|
|
631
|
-
let
|
|
632
|
-
const b = l.getAttribute("data-bind"),
|
|
633
|
-
let
|
|
634
|
-
b &&
|
|
631
|
+
let u = `cell-${f}`;
|
|
632
|
+
const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), x = l.getAttribute("maxbyte"), v = l.getAttribute("type");
|
|
633
|
+
let E = [];
|
|
634
|
+
b && E.push(`data-bind="${b}"`), g && E.push(`data-expr="${g}"`), x && E.push(`maxbyte="${x}"`), v && E.push(`type="${v}"`), l.innerHTML = `<${u} ${E.join(" ")}></${u}>`;
|
|
635
635
|
});
|
|
636
636
|
}, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
|
|
637
637
|
if (!a.querySelector("colgroup")) {
|
|
638
|
-
const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"),
|
|
638
|
+
const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(a.clientWidth / l), 100);
|
|
639
639
|
for (let b = 0; b < l; b++) {
|
|
640
|
-
const
|
|
641
|
-
|
|
640
|
+
const g = document.createElement("col");
|
|
641
|
+
g.setAttribute("width", u), f.appendChild(g);
|
|
642
642
|
}
|
|
643
643
|
a.prepend(f);
|
|
644
644
|
}
|
|
@@ -648,197 +648,204 @@ const Vt = class Vt {
|
|
|
648
648
|
}
|
|
649
649
|
a.classList.add("nine-table-element");
|
|
650
650
|
}, "ensureTableStructure"), r = /* @__PURE__ */ h((a, c) => {
|
|
651
|
-
const l = Array.from(a.querySelectorAll(c + " tr")), f = Array.from(a.querySelectorAll(c + " th," + c + " td")),
|
|
652
|
-
if (
|
|
651
|
+
const l = Array.from(a.querySelectorAll(c + " tr")), f = Array.from(a.querySelectorAll(c + " th," + c + " td")), u = l.length;
|
|
652
|
+
if (u === 0 || f.length === 0) return;
|
|
653
653
|
let b = 0;
|
|
654
|
-
f.forEach((
|
|
655
|
-
b +=
|
|
654
|
+
f.forEach((x) => {
|
|
655
|
+
b += x.colSpan || 1;
|
|
656
656
|
});
|
|
657
|
-
const
|
|
658
|
-
l.forEach((
|
|
659
|
-
const v =
|
|
660
|
-
let
|
|
661
|
-
Array.from(
|
|
662
|
-
for (let
|
|
663
|
-
if (
|
|
664
|
-
|
|
657
|
+
const g = Array.from(Array(u), () => Array(b).fill(null));
|
|
658
|
+
l.forEach((x) => {
|
|
659
|
+
const v = x.sectionRowIndex;
|
|
660
|
+
let E = 0;
|
|
661
|
+
Array.from(x.querySelectorAll("th,td")).forEach((y) => {
|
|
662
|
+
for (let O = 0; O < g[v].length; O++)
|
|
663
|
+
if (g[v][O] === null) {
|
|
664
|
+
E = O;
|
|
665
665
|
break;
|
|
666
666
|
}
|
|
667
|
-
const z =
|
|
668
|
-
for (let
|
|
669
|
-
for (let
|
|
670
|
-
v +
|
|
667
|
+
const z = y.rowSpan || 1, T = y.colSpan || 1;
|
|
668
|
+
for (let O = 0; O < z; O++)
|
|
669
|
+
for (let xt = 0; xt < T; xt++)
|
|
670
|
+
v + O < u && E + xt < b && (g[v + O][E + xt] = O === 0 && xt === 0 ? "1" : "0");
|
|
671
671
|
});
|
|
672
|
-
}), l.forEach((
|
|
673
|
-
const v =
|
|
674
|
-
Array.from(
|
|
675
|
-
for (let
|
|
676
|
-
if (
|
|
677
|
-
|
|
672
|
+
}), l.forEach((x) => {
|
|
673
|
+
const v = x.sectionRowIndex;
|
|
674
|
+
Array.from(x.querySelectorAll("th,td")).forEach((E) => {
|
|
675
|
+
for (let y = 0; y < g[v].length; y++)
|
|
676
|
+
if (g[v][y] === "1") {
|
|
677
|
+
E.dataset.col = y, g[v][y] = "0";
|
|
678
678
|
break;
|
|
679
679
|
}
|
|
680
680
|
});
|
|
681
681
|
});
|
|
682
|
-
}, "resetColIndex"),
|
|
683
|
-
return s(
|
|
682
|
+
}, "resetColIndex"), o = n.cloneNode(!0);
|
|
683
|
+
return s(o), e(o), r(o, "thead"), r(o, "tbody"), r(o, "tfoot"), Array.from(o.querySelectorAll("colgroup col")).forEach((a, c) => {
|
|
684
684
|
const l = a.getAttribute("fixed");
|
|
685
|
-
l &&
|
|
685
|
+
l && o.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
|
|
686
686
|
f.setAttribute("fixed", l);
|
|
687
687
|
});
|
|
688
|
-
}),
|
|
688
|
+
}), o;
|
|
689
689
|
}
|
|
690
690
|
// 🎯 [추가] td/th에 선언된 cell-type 속성을 읽어 커스텀 태그로 자동 감싸기
|
|
691
691
|
};
|
|
692
|
-
h(
|
|
693
|
-
let
|
|
694
|
-
var Y,
|
|
695
|
-
const
|
|
692
|
+
h(Kt, "TableCompiler");
|
|
693
|
+
let ye = Kt;
|
|
694
|
+
var Y, nt, X, Wt, ss;
|
|
695
|
+
const Fe = class Fe {
|
|
696
696
|
constructor(n) {
|
|
697
|
-
d(this,
|
|
697
|
+
d(this, X);
|
|
698
698
|
d(this, Y);
|
|
699
|
-
d(this,
|
|
700
|
-
|
|
701
|
-
const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this,
|
|
702
|
-
|
|
703
|
-
const
|
|
699
|
+
d(this, nt, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
|
|
700
|
+
A(this, "render", /* @__PURE__ */ h(() => {
|
|
701
|
+
const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this, nt);
|
|
702
|
+
R.log("🎨 [CellSelection.render] Rendering range ->", t(this, nt));
|
|
703
|
+
const o = t(this, Y).querySelectorAll(
|
|
704
704
|
".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
|
|
705
705
|
);
|
|
706
|
-
if (
|
|
706
|
+
if (o.forEach((a) => {
|
|
707
707
|
a.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach((c) => {
|
|
708
708
|
c.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
|
|
709
709
|
});
|
|
710
710
|
}), n < 0 || e < 0) {
|
|
711
|
-
|
|
711
|
+
R.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
|
|
712
712
|
return;
|
|
713
713
|
}
|
|
714
|
-
let
|
|
715
|
-
|
|
714
|
+
let i = 0;
|
|
715
|
+
o.forEach((a) => {
|
|
716
716
|
a.querySelectorAll("tbody tr").forEach((c) => {
|
|
717
717
|
if (c.classList.contains("nodata")) return;
|
|
718
|
-
const l =
|
|
719
|
-
|
|
720
|
-
const
|
|
721
|
-
if (isNaN(
|
|
722
|
-
const b = parseInt(f.rowSpan || 1, 10),
|
|
723
|
-
|
|
718
|
+
const { matrixRow: l } = vt(this, X, Wt).call(this, c);
|
|
719
|
+
l < 0 || c.querySelectorAll("td, th").forEach((f) => {
|
|
720
|
+
const u = parseInt(f.dataset.col, 10);
|
|
721
|
+
if (isNaN(u)) return;
|
|
722
|
+
const b = parseInt(f.rowSpan || 1, 10), g = parseInt(f.colSpan || 1, 10), x = l + b - 1, v = u + g - 1;
|
|
723
|
+
x >= n && l <= s && v >= e && u <= r && (i++, f.classList.add("selected"), l === n && f.classList.add("selected-top"), x === s && f.classList.add("selected-bottom"), u === e && f.classList.add("selected-left"), v === r && f.classList.add("selected-right"));
|
|
724
724
|
});
|
|
725
725
|
});
|
|
726
|
-
}),
|
|
726
|
+
}), R.log(`✨ [CellSelection.render] Total rendered cells marked: ${i}`);
|
|
727
727
|
}, "render"));
|
|
728
|
-
p(this, Y, n),
|
|
728
|
+
p(this, Y, n), vt(this, X, ss).call(this), R.log("🎯 [CellSelection] Initialized");
|
|
729
729
|
}
|
|
730
730
|
setRange(n, e, s, r) {
|
|
731
|
-
|
|
732
|
-
let
|
|
733
|
-
p(this,
|
|
731
|
+
R.log(`🔍 [CellSelection.setRange] Input -> startRow: ${n}, startCol: ${e}, endRow: ${s}, endCol: ${r}`);
|
|
732
|
+
let o = Math.min(n, s), i = Math.max(n, s), a = Math.min(e, r), c = Math.max(e, r);
|
|
733
|
+
p(this, nt, { startRow: o, startCol: a, endRow: i, endCol: c }), R.log("📦 [CellSelection.setRange] Final Range ->", t(this, nt)), this.render();
|
|
734
734
|
}
|
|
735
735
|
};
|
|
736
|
-
Y = new WeakMap(),
|
|
736
|
+
Y = new WeakMap(), nt = new WeakMap(), X = new WeakSet(), Wt = /* @__PURE__ */ h(function(n) {
|
|
737
|
+
if (!n || n.classList.contains("nodata")) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
|
|
738
|
+
const e = parseInt(n.dataset.row, 10);
|
|
739
|
+
if (isNaN(e)) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
|
|
740
|
+
const s = n.closest("tbody"), o = Array.from(s.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), i = o.indexOf(n), a = o.length > 0 ? o.length : 1, c = e * a + i;
|
|
741
|
+
return { dataRow: e, subRowIndex: i, matrixRow: c };
|
|
742
|
+
}, "#getMatrixRow"), ss = /* @__PURE__ */ h(function() {
|
|
737
743
|
const n = t(this, Y).querySelector(".ng-container-top");
|
|
738
744
|
if (!n) {
|
|
739
|
-
|
|
745
|
+
R.log("❌ [CellSelection] .ng-container-top not found!");
|
|
740
746
|
return;
|
|
741
747
|
}
|
|
742
748
|
n.addEventListener("mousedown", (e) => {
|
|
743
749
|
if (e.button !== 0) return;
|
|
744
750
|
const s = e.target.closest("td, th");
|
|
745
751
|
if (!s || s.dataset.row === void 0 || s.dataset.col === void 0 || s.closest("tr").classList.contains("nodata")) return;
|
|
746
|
-
const r =
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
752
|
+
const r = s.closest("tr"), { matrixRow: o } = vt(this, X, Wt).call(this, r), i = parseInt(s.dataset.col, 10);
|
|
753
|
+
if (o < 0) return;
|
|
754
|
+
R.log(`🖱️ [MouseDown Success] startRow: ${o}, startCol: ${i}`), this.setRange(o, i, o, i);
|
|
755
|
+
const a = /* @__PURE__ */ h((l) => {
|
|
756
|
+
const f = document.elementFromPoint(l.clientX, l.clientY);
|
|
757
|
+
let u = f == null ? void 0 : f.closest("td, th");
|
|
758
|
+
if (!u || !t(this, Y).contains(u)) {
|
|
759
|
+
const v = t(this, Y).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
|
|
760
|
+
for (const E of v) {
|
|
761
|
+
const y = E.getBoundingClientRect();
|
|
762
|
+
if (l.clientX >= y.left && l.clientX <= y.right && l.clientY >= y.top && l.clientY <= y.bottom) {
|
|
763
|
+
u = E;
|
|
757
764
|
break;
|
|
758
765
|
}
|
|
759
766
|
}
|
|
760
767
|
}
|
|
761
|
-
if (!
|
|
762
|
-
const g =
|
|
763
|
-
this.setRange(
|
|
764
|
-
}, "onMouseMove"),
|
|
765
|
-
|
|
768
|
+
if (!u || u.dataset.row === void 0 || u.dataset.col === void 0 || u.closest("tr").classList.contains("nodata")) return;
|
|
769
|
+
const b = u.closest("tr"), { matrixRow: g } = vt(this, X, Wt).call(this, b), x = parseInt(u.dataset.col, 10);
|
|
770
|
+
g < 0 || this.setRange(o, i, g, x);
|
|
771
|
+
}, "onMouseMove"), c = /* @__PURE__ */ h(() => {
|
|
772
|
+
R.log("🖱️ [MouseUp] Drag ended."), document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", c);
|
|
766
773
|
}, "onMouseUp");
|
|
767
|
-
document.addEventListener("mousemove",
|
|
774
|
+
document.addEventListener("mousemove", a), document.addEventListener("mouseup", c);
|
|
768
775
|
});
|
|
769
|
-
}, "#initEvents"), h(
|
|
770
|
-
let
|
|
771
|
-
var
|
|
772
|
-
const
|
|
776
|
+
}, "#initEvents"), h(Fe, "CellSelection");
|
|
777
|
+
let me = Fe;
|
|
778
|
+
var Zt, rt, ot, Ht, Gt, Jt, ft, Qt, te;
|
|
779
|
+
const wt = class wt extends HTMLElement {
|
|
773
780
|
constructor() {
|
|
774
781
|
super();
|
|
775
|
-
d(this,
|
|
776
|
-
d(this,
|
|
777
|
-
d(this,
|
|
778
|
-
d(this,
|
|
779
|
-
|
|
780
|
-
|
|
782
|
+
d(this, Zt);
|
|
783
|
+
d(this, rt, null);
|
|
784
|
+
d(this, ot);
|
|
785
|
+
d(this, Ht);
|
|
786
|
+
A(this, "invalidate", /* @__PURE__ */ h(() => {
|
|
787
|
+
R.log("sheet.invalidate()"), t(this, ot).refresh();
|
|
781
788
|
}, "invalidate"));
|
|
782
|
-
|
|
783
|
-
if (
|
|
784
|
-
p(this,
|
|
785
|
-
const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"),
|
|
786
|
-
s &&
|
|
787
|
-
var
|
|
788
|
-
(
|
|
789
|
+
A(this, "generate", /* @__PURE__ */ h((e) => {
|
|
790
|
+
if (R.log("sheet.generate()"), !e) return;
|
|
791
|
+
p(this, rt, ye.compile(e)), t(this, Gt).call(this), t(this, Jt).call(this);
|
|
792
|
+
const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), o = this.querySelector(".ng-nodata-overlay");
|
|
793
|
+
s && o && (o.style.top = `${s.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, ot).initialize(), setTimeout(() => {
|
|
794
|
+
var i;
|
|
795
|
+
(i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
|
|
789
796
|
}, 0);
|
|
790
797
|
}, "generate"));
|
|
791
|
-
d(this,
|
|
798
|
+
d(this, Gt, /* @__PURE__ */ h(() => {
|
|
792
799
|
[
|
|
793
800
|
{ selector: ".ng-container-body", type: null },
|
|
794
801
|
{ selector: ".ng-container-left", type: "left" },
|
|
795
802
|
{ selector: ".ng-container-right", type: "right" }
|
|
796
803
|
].forEach(({ selector: s, type: r }) => {
|
|
797
|
-
var
|
|
798
|
-
(
|
|
804
|
+
var o, i, a;
|
|
805
|
+
(o = this.querySelector(`${s} .ng-part-header`)) == null || o.appendChild(t(this, ft).call(this, t(this, rt), r, "header")), (i = this.querySelector(`${s} .ng-virtual-spacer`)) == null || i.before(t(this, ft).call(this, t(this, rt), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, ft).call(this, t(this, rt), r, "footer"));
|
|
799
806
|
});
|
|
800
807
|
}, "#renderSplitContainers"));
|
|
801
|
-
d(this,
|
|
808
|
+
d(this, Jt, /* @__PURE__ */ h(() => {
|
|
802
809
|
["left", "right", "body"].forEach((e) => {
|
|
803
810
|
const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
|
|
804
811
|
if (!s || !r || r.length === 0) return;
|
|
805
|
-
let
|
|
806
|
-
r[0].querySelectorAll("col").forEach((
|
|
807
|
-
const a = parseInt(
|
|
808
|
-
isNaN(
|
|
809
|
-
}), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${
|
|
812
|
+
let o = 0;
|
|
813
|
+
r[0].querySelectorAll("col").forEach((i) => {
|
|
814
|
+
const a = parseInt(i.getAttribute("width"), 10);
|
|
815
|
+
isNaN(o) || (o += a);
|
|
816
|
+
}), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${o}px`, s.style.width = `${o}px`);
|
|
810
817
|
});
|
|
811
818
|
}, "#updateContainerWidths"));
|
|
812
|
-
d(this,
|
|
813
|
-
const
|
|
819
|
+
d(this, ft, /* @__PURE__ */ h((e, s, r) => {
|
|
820
|
+
const o = e.cloneNode(!0), i = o.querySelector("thead"), a = o.querySelector("tbody"), c = o.querySelector("tfoot");
|
|
814
821
|
if (r === "header") {
|
|
815
822
|
if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
|
|
816
823
|
const f = document.createElement("tbody");
|
|
817
|
-
f.className = "fixed-tbody",
|
|
824
|
+
f.className = "fixed-tbody", o.appendChild(f);
|
|
818
825
|
}
|
|
819
|
-
} else r === "body" ? (
|
|
820
|
-
return s === "left" ?
|
|
826
|
+
} else r === "body" ? (i && i.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (i && i.remove(), a && a.remove());
|
|
827
|
+
return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
|
|
821
828
|
l.getAttribute("fixed") !== "left" && l.remove();
|
|
822
|
-
}) : s === "right" ?
|
|
829
|
+
}) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
|
|
823
830
|
l.getAttribute("fixed") !== "right" && l.remove();
|
|
824
|
-
}) :
|
|
831
|
+
}) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
|
|
825
832
|
l.remove();
|
|
826
|
-
}),
|
|
833
|
+
}), o;
|
|
827
834
|
}, "#createSplitTable"));
|
|
828
|
-
|
|
829
|
-
|
|
835
|
+
A(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, ot).getRowHeight(), "getRowHeight"));
|
|
836
|
+
A(this, "scrollToX", /* @__PURE__ */ h((e) => {
|
|
830
837
|
const s = this.querySelector(".ng-container-body .ng-part-body");
|
|
831
838
|
s && (s.scrollLeft = e);
|
|
832
839
|
}, "scrollToX"));
|
|
833
|
-
|
|
840
|
+
A(this, "scrollToY", /* @__PURE__ */ h((e) => {
|
|
834
841
|
const s = this.querySelector(".ng-container-body .ng-part-body");
|
|
835
842
|
s && (s.scrollTop = e);
|
|
836
843
|
}, "scrollToY"));
|
|
837
|
-
d(this,
|
|
838
|
-
t(this,
|
|
844
|
+
d(this, Qt, /* @__PURE__ */ h(() => {
|
|
845
|
+
t(this, te).call(this), p(this, Ht, new me(this));
|
|
839
846
|
}, "#init"));
|
|
840
|
-
d(this,
|
|
841
|
-
const e =
|
|
847
|
+
d(this, te, /* @__PURE__ */ h(() => {
|
|
848
|
+
const e = wt.SCROLLBAR_SIZE;
|
|
842
849
|
this.innerHTML = `
|
|
843
850
|
<style>
|
|
844
851
|
nine-table-sheet {
|
|
@@ -1038,94 +1045,94 @@ const xt = class xt extends HTMLElement {
|
|
|
1038
1045
|
</div>
|
|
1039
1046
|
`;
|
|
1040
1047
|
}, "#render"));
|
|
1041
|
-
p(this,
|
|
1048
|
+
p(this, ot, new pe(this)), p(this, Zt, this.getRootNode().host);
|
|
1042
1049
|
}
|
|
1043
1050
|
connectedCallback() {
|
|
1044
|
-
t(this,
|
|
1051
|
+
t(this, Qt).call(this);
|
|
1045
1052
|
}
|
|
1046
1053
|
get selection() {
|
|
1047
|
-
return t(this,
|
|
1054
|
+
return t(this, Ht);
|
|
1048
1055
|
}
|
|
1049
1056
|
disconnectedCallback() {
|
|
1050
|
-
this.innerHTML = "",
|
|
1057
|
+
this.innerHTML = "", R.log("NineTableSheet destroyed.");
|
|
1051
1058
|
}
|
|
1052
1059
|
};
|
|
1053
|
-
|
|
1054
|
-
let
|
|
1055
|
-
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet",
|
|
1056
|
-
var
|
|
1057
|
-
const
|
|
1060
|
+
Zt = new WeakMap(), rt = new WeakMap(), ot = new WeakMap(), Ht = new WeakMap(), Gt = new WeakMap(), Jt = new WeakMap(), ft = new WeakMap(), Qt = new WeakMap(), te = new WeakMap(), h(wt, "NineTableSheet"), A(wt, "SCROLLBAR_SIZE", 16);
|
|
1061
|
+
let Bt = wt;
|
|
1062
|
+
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Bt);
|
|
1063
|
+
var ee, $t;
|
|
1064
|
+
const je = class je extends HTMLElement {
|
|
1058
1065
|
constructor() {
|
|
1059
1066
|
super();
|
|
1060
|
-
d(this,
|
|
1067
|
+
d(this, ee, /* @__PURE__ */ h(() => {
|
|
1061
1068
|
var e;
|
|
1062
1069
|
(e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
|
|
1063
|
-
var
|
|
1064
|
-
const r = s.ctrlKey || s.metaKey || s.shiftKey,
|
|
1065
|
-
t(this,
|
|
1066
|
-
}), t(this,
|
|
1070
|
+
var i;
|
|
1071
|
+
const r = s.ctrlKey || s.metaKey || s.shiftKey, o = parseInt((i = s.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
|
|
1072
|
+
t(this, $t).call(this, o, r);
|
|
1073
|
+
}), t(this, $t).call(this, 0, !1);
|
|
1067
1074
|
}, "#init"));
|
|
1068
|
-
d(this,
|
|
1075
|
+
d(this, $t, /* @__PURE__ */ h((e, s = !1) => {
|
|
1069
1076
|
const r = /* @__PURE__ */ h(() => {
|
|
1070
1077
|
const f = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
1071
|
-
Array.from(this.querySelectorAll("nine-splitter")).forEach((
|
|
1072
|
-
const b = f.filter((
|
|
1073
|
-
b.length < 2 || b.forEach((
|
|
1074
|
-
const
|
|
1075
|
-
v &&
|
|
1078
|
+
Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
|
|
1079
|
+
const b = f.filter((g) => g.classList.contains("active"));
|
|
1080
|
+
b.length < 2 || b.forEach((g) => {
|
|
1081
|
+
const x = parseInt(g.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${x}"]`), E = f[x + 1];
|
|
1082
|
+
v && E && E.classList.contains("active") && v.style.setProperty("display", "flex");
|
|
1076
1083
|
});
|
|
1077
|
-
}, "updateSplitters"),
|
|
1084
|
+
}, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), i = this.querySelector("nine-table-sheets-body"), a = o.querySelectorAll(".nine-tab-item"), c = i.querySelectorAll("nine-table-sheet");
|
|
1078
1085
|
if (!a[e]) return;
|
|
1079
1086
|
if (!s)
|
|
1080
|
-
a.forEach((f,
|
|
1081
|
-
f.classList.toggle("active",
|
|
1082
|
-
}), c.forEach((f,
|
|
1083
|
-
const b =
|
|
1087
|
+
a.forEach((f, u) => {
|
|
1088
|
+
f.classList.toggle("active", u === e);
|
|
1089
|
+
}), c.forEach((f, u) => {
|
|
1090
|
+
const b = u === e;
|
|
1084
1091
|
f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
|
|
1085
1092
|
});
|
|
1086
1093
|
else {
|
|
1087
|
-
const f = a[e],
|
|
1088
|
-
if (f.classList.contains("active") &&
|
|
1094
|
+
const f = a[e], u = o.querySelectorAll(".nine-tab-item.active");
|
|
1095
|
+
if (f.classList.contains("active") && u.length <= 1)
|
|
1089
1096
|
return;
|
|
1090
1097
|
f.classList.toggle("active");
|
|
1091
|
-
const b =
|
|
1098
|
+
const b = i.querySelector(`nine-table-sheet[data-index="${e}"]`);
|
|
1092
1099
|
b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
|
|
1093
1100
|
}
|
|
1094
|
-
const l =
|
|
1101
|
+
const l = i.querySelectorAll("nine-table-sheet.active");
|
|
1095
1102
|
l == null || l.forEach((f) => {
|
|
1096
1103
|
f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
|
|
1097
1104
|
}), r();
|
|
1098
1105
|
}, "#switchSheet"));
|
|
1099
1106
|
}
|
|
1100
1107
|
connectedCallback() {
|
|
1101
|
-
t(this,
|
|
1108
|
+
t(this, ee).call(this);
|
|
1102
1109
|
}
|
|
1103
1110
|
};
|
|
1104
|
-
|
|
1105
|
-
let
|
|
1106
|
-
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets",
|
|
1107
|
-
var M,
|
|
1108
|
-
const
|
|
1111
|
+
ee = new WeakMap(), $t = new WeakMap(), h(je, "NineTableSheets");
|
|
1112
|
+
let xe = je;
|
|
1113
|
+
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", xe);
|
|
1114
|
+
var M, se, Mt, ne;
|
|
1115
|
+
const Ye = class Ye {
|
|
1109
1116
|
constructor(n) {
|
|
1110
1117
|
d(this, M);
|
|
1111
|
-
d(this,
|
|
1112
|
-
t(this,
|
|
1118
|
+
d(this, se, /* @__PURE__ */ h(() => {
|
|
1119
|
+
t(this, ne).call(this), new ResizeObserver((n) => {
|
|
1113
1120
|
for (let e of n)
|
|
1114
|
-
t(this, M).getAttribute("auto-height") === "true" && t(this,
|
|
1121
|
+
t(this, M).getAttribute("auto-height") === "true" && t(this, Mt).call(this);
|
|
1115
1122
|
}).observe(t(this, M));
|
|
1116
1123
|
}, "#init"));
|
|
1117
|
-
d(this,
|
|
1124
|
+
d(this, Mt, /* @__PURE__ */ h(() => {
|
|
1118
1125
|
var c, l;
|
|
1119
1126
|
const n = Array.from(t(this, M).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
1120
1127
|
if (n.length === 0) return;
|
|
1121
|
-
const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((f) => f.getRowHeight())), r = (c = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height,
|
|
1128
|
+
const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((f) => f.getRowHeight())), r = (c = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = Bt.SCROLLBAR_SIZE, a = e * s + r + o + i;
|
|
1122
1129
|
t(this, M).style.height = `${a}px`;
|
|
1123
1130
|
}, "#applyAutoHeight"));
|
|
1124
|
-
d(this,
|
|
1125
|
-
const e = Array.from(t(this, M).children).filter((c) => c.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", r = e.length,
|
|
1126
|
-
const
|
|
1127
|
-
return
|
|
1128
|
-
}).join(""),
|
|
1131
|
+
d(this, ne, /* @__PURE__ */ h(() => {
|
|
1132
|
+
const e = Array.from(t(this, M).children).filter((c) => c.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", r = e.length, o = e.map((c, l) => {
|
|
1133
|
+
const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
|
|
1134
|
+
return u + b;
|
|
1135
|
+
}).join(""), i = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
|
|
1129
1136
|
t(this, M).shadowRoot.innerHTML = `
|
|
1130
1137
|
<style>
|
|
1131
1138
|
:host {
|
|
@@ -1237,9 +1244,9 @@ const Fe = class Fe {
|
|
|
1237
1244
|
<nine-table-body>
|
|
1238
1245
|
<nine-table-summary></nine-table-summary>
|
|
1239
1246
|
<nine-table-sheets>
|
|
1240
|
-
<nine-table-sheets-body>${
|
|
1247
|
+
<nine-table-sheets-body>${o}</nine-table-sheets-body>
|
|
1241
1248
|
<nine-table-sheets-footer>
|
|
1242
|
-
<div class="nine-tab-bar">${
|
|
1249
|
+
<div class="nine-tab-bar">${i}</div>
|
|
1243
1250
|
<div class="sheets-counter">Total : <span id="row-count">0</span></div>
|
|
1244
1251
|
</nine-table-sheets-footer>
|
|
1245
1252
|
</nine-table-sheets>
|
|
@@ -1250,50 +1257,50 @@ const Fe = class Fe {
|
|
|
1250
1257
|
const a = t(this, M).shadowRoot.querySelectorAll("nine-table-sheet");
|
|
1251
1258
|
a == null || a.forEach((c, l) => {
|
|
1252
1259
|
e[l] && setTimeout(() => {
|
|
1253
|
-
c.generate(e[l]), s && t(this,
|
|
1260
|
+
c.generate(e[l]), s && t(this, Mt).call(this);
|
|
1254
1261
|
});
|
|
1255
1262
|
});
|
|
1256
1263
|
}, "#render"));
|
|
1257
|
-
p(this, M, n), t(this,
|
|
1264
|
+
p(this, M, n), t(this, se).call(this);
|
|
1258
1265
|
}
|
|
1259
1266
|
};
|
|
1260
|
-
M = new WeakMap(),
|
|
1261
|
-
let
|
|
1262
|
-
var
|
|
1263
|
-
const
|
|
1267
|
+
M = new WeakMap(), se = new WeakMap(), Mt = new WeakMap(), ne = new WeakMap(), h(Ye, "LayoutManager");
|
|
1268
|
+
let ve = Ye;
|
|
1269
|
+
var It, ut;
|
|
1270
|
+
const Ve = class Ve {
|
|
1264
1271
|
constructor(n) {
|
|
1265
|
-
d(this,
|
|
1266
|
-
d(this,
|
|
1267
|
-
|
|
1268
|
-
p(this,
|
|
1272
|
+
d(this, It);
|
|
1273
|
+
d(this, ut, -1);
|
|
1274
|
+
A(this, "count", /* @__PURE__ */ h(() => t(this, It).rawRecords.length, "count"));
|
|
1275
|
+
p(this, It, n);
|
|
1269
1276
|
}
|
|
1270
1277
|
get at() {
|
|
1271
|
-
return t(this,
|
|
1278
|
+
return t(this, ut);
|
|
1272
1279
|
}
|
|
1273
1280
|
set at(n) {
|
|
1274
|
-
p(this,
|
|
1281
|
+
p(this, ut, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ut)}"]`) && setTimeout(() => {
|
|
1275
1282
|
});
|
|
1276
1283
|
}
|
|
1277
1284
|
};
|
|
1278
|
-
|
|
1279
|
-
let
|
|
1280
|
-
var _, C, N, gt,
|
|
1281
|
-
const
|
|
1285
|
+
It = new WeakMap(), ut = new WeakMap(), h(Ve, "ngRow");
|
|
1286
|
+
let we = Ve;
|
|
1287
|
+
var _, C, N, gt, re, V, oe, it, _t, ie, ae, bt;
|
|
1288
|
+
const W = class W {
|
|
1282
1289
|
constructor(n, e) {
|
|
1283
1290
|
d(this, _);
|
|
1284
1291
|
d(this, C);
|
|
1285
1292
|
d(this, N, []);
|
|
1286
1293
|
d(this, gt, []);
|
|
1287
|
-
d(this,
|
|
1294
|
+
d(this, re, 0);
|
|
1288
1295
|
d(this, V, []);
|
|
1289
|
-
d(this,
|
|
1296
|
+
d(this, oe, /* @__PURE__ */ h(() => {
|
|
1290
1297
|
p(this, V, []);
|
|
1291
1298
|
const n = t(this, _).template || [];
|
|
1292
1299
|
Array.from(n).forEach((e) => {
|
|
1293
1300
|
var s;
|
|
1294
1301
|
t(this, V).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
|
|
1295
1302
|
}), (t(this, C).rawRecords || []).forEach((e) => {
|
|
1296
|
-
e.__ng || (e.__ng = t(this,
|
|
1303
|
+
e.__ng || (e.__ng = t(this, _t).call(this)), e.__ng.height = t(this, V).slice();
|
|
1297
1304
|
});
|
|
1298
1305
|
}, "#initialize"));
|
|
1299
1306
|
d(this, it, /* @__PURE__ */ h(() => {
|
|
@@ -1302,113 +1309,113 @@ const O = class O {
|
|
|
1302
1309
|
e.invalidate();
|
|
1303
1310
|
});
|
|
1304
1311
|
}, "#invalidate"));
|
|
1305
|
-
|
|
1306
|
-
var
|
|
1312
|
+
A(this, "get", /* @__PURE__ */ h((n, e) => {
|
|
1313
|
+
var o;
|
|
1307
1314
|
const s = this.getValidData();
|
|
1308
1315
|
if (!s || s.length <= 0) return;
|
|
1309
|
-
if (n == null) return t(this,
|
|
1316
|
+
if (n == null) return t(this, bt).call(this, s);
|
|
1310
1317
|
if (n < 0 || n >= s.length) return null;
|
|
1311
|
-
const r = typeof ((
|
|
1318
|
+
const r = typeof ((o = t(this, _).fields) == null ? void 0 : o.get) == "function" ? t(this, _).fields.get() : [];
|
|
1312
1319
|
if (e != null) {
|
|
1313
|
-
const
|
|
1314
|
-
return
|
|
1320
|
+
const i = r.indexOf(e);
|
|
1321
|
+
return i >= 0 ? s[n].v[i] : null;
|
|
1315
1322
|
}
|
|
1316
|
-
return t(this,
|
|
1323
|
+
return t(this, bt).call(this, s[n]);
|
|
1317
1324
|
}, "get"));
|
|
1318
|
-
|
|
1325
|
+
A(this, "set", /* @__PURE__ */ h((n) => {
|
|
1319
1326
|
this.clear(), this.add(n, !1), t(this, it).call(this);
|
|
1320
1327
|
}, "set"));
|
|
1321
|
-
d(this,
|
|
1322
|
-
rowState:
|
|
1328
|
+
d(this, _t, /* @__PURE__ */ h(() => ({
|
|
1329
|
+
rowState: W.ROW_STATE.EMPTY,
|
|
1323
1330
|
deleted: !1,
|
|
1324
1331
|
filtered: !1,
|
|
1325
1332
|
height: t(this, V).slice(),
|
|
1326
1333
|
o: {},
|
|
1327
1334
|
c: {},
|
|
1328
|
-
_: [0, 0, 0, 0,
|
|
1335
|
+
_: [0, 0, 0, 0, W.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, V).slice(), -1, {}, {}]
|
|
1329
1336
|
}), "#getDefaultMeta"));
|
|
1330
|
-
|
|
1337
|
+
A(this, "reset", /* @__PURE__ */ h(() => {
|
|
1331
1338
|
p(this, N, []), p(this, gt, []), t(this, it).call(this);
|
|
1332
1339
|
}, "reset"));
|
|
1333
|
-
|
|
1340
|
+
A(this, "clear", /* @__PURE__ */ h(() => {
|
|
1334
1341
|
var n;
|
|
1335
1342
|
t(this, C).rawRecords = [], p(this, N, []), p(this, gt, []), (n = t(this, C).viewRecords) != null && n.reset && t(this, C).viewRecords.reset();
|
|
1336
1343
|
}, "clear"));
|
|
1337
|
-
d(this,
|
|
1344
|
+
d(this, ie, /* @__PURE__ */ h((n) => {
|
|
1338
1345
|
var r;
|
|
1339
1346
|
Array.isArray(n) || (n = [n]);
|
|
1340
1347
|
const e = typeof ((r = t(this, _).fields) == null ? void 0 : r.get) == "function" ? t(this, _).fields.get() : Object.keys(n[0] || {}), s = [];
|
|
1341
|
-
return n.forEach((
|
|
1342
|
-
const
|
|
1348
|
+
return n.forEach((o) => {
|
|
1349
|
+
const i = { v: [] };
|
|
1343
1350
|
e.forEach((a) => {
|
|
1344
|
-
|
|
1345
|
-
}), s.push(
|
|
1351
|
+
i.v.push(o[a] !== void 0 && o[a] !== null ? o[a] : "");
|
|
1352
|
+
}), s.push(i);
|
|
1346
1353
|
}), s;
|
|
1347
1354
|
}, "#json2Array"));
|
|
1348
|
-
d(this,
|
|
1349
|
-
e.__ng = t(this,
|
|
1355
|
+
d(this, ae, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
|
|
1356
|
+
e.__ng = t(this, _t).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
|
|
1350
1357
|
}), n), "#defaultInsert"));
|
|
1351
|
-
|
|
1358
|
+
A(this, "add", /* @__PURE__ */ h((n, e = !0) => {
|
|
1352
1359
|
n === void 0 && (n = {});
|
|
1353
|
-
const s = t(this,
|
|
1354
|
-
t(this, C).rawRecords = t(this, C).rawRecords.concat(t(this,
|
|
1360
|
+
const s = t(this, ie).call(this, n);
|
|
1361
|
+
t(this, C).rawRecords = t(this, C).rawRecords.concat(t(this, ae).call(this, s)), this.resetRecords();
|
|
1355
1362
|
const r = this.count() - 1;
|
|
1356
|
-
return e || s.forEach((
|
|
1357
|
-
const a = t(this, C).rawRecords[r -
|
|
1358
|
-
a && (a.__ng.rowState =
|
|
1363
|
+
return e || s.forEach((o, i) => {
|
|
1364
|
+
const a = t(this, C).rawRecords[r - i];
|
|
1365
|
+
a && (a.__ng.rowState = W.ROW_STATE.EMPTY);
|
|
1359
1366
|
}), t(this, it).call(this), r;
|
|
1360
1367
|
}, "add"));
|
|
1361
|
-
|
|
1368
|
+
A(this, "delete", /* @__PURE__ */ h((n) => {
|
|
1362
1369
|
let e = [];
|
|
1363
1370
|
Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, C).host.row.at] : e = [parseInt(n, 10)], e.sort((s, r) => r - s).forEach((s) => {
|
|
1364
1371
|
if (t(this, N)[s]) {
|
|
1365
1372
|
const r = t(this, N)[s].__ng.rowid;
|
|
1366
|
-
t(this, N)[s].__ng.rowState ===
|
|
1367
|
-
|
|
1373
|
+
t(this, N)[s].__ng.rowState === W.ROW_STATE.INSERT ? t(this, C).rawRecords = t(this, C).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, C).rawRecords.forEach((o) => {
|
|
1374
|
+
o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = W.ROW_STATE.DELETE);
|
|
1368
1375
|
});
|
|
1369
1376
|
}
|
|
1370
1377
|
}), this.resetRecords(), t(this, it).call(this);
|
|
1371
1378
|
}, "delete"));
|
|
1372
|
-
|
|
1379
|
+
A(this, "setValue", /* @__PURE__ */ h((n, e, s) => {
|
|
1373
1380
|
var c;
|
|
1374
1381
|
n = parseInt(n, 10);
|
|
1375
|
-
const
|
|
1376
|
-
if (
|
|
1377
|
-
const
|
|
1378
|
-
if (!
|
|
1379
|
-
const a =
|
|
1380
|
-
a !== s &&
|
|
1382
|
+
const o = (typeof ((c = t(this, _).fields) == null ? void 0 : c.get) == "function" ? t(this, _).fields.get() : []).indexOf(e);
|
|
1383
|
+
if (o < 0) return;
|
|
1384
|
+
const i = this.getValidData()[n];
|
|
1385
|
+
if (!i) return;
|
|
1386
|
+
const a = i.v[o];
|
|
1387
|
+
a !== s && i.__ng.rowState !== W.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = W.ROW_STATE.UPDATE), i.v[o] = s;
|
|
1381
1388
|
}, "setValue"));
|
|
1382
|
-
|
|
1389
|
+
A(this, "resetRecords", /* @__PURE__ */ h(() => {
|
|
1383
1390
|
p(this, gt, t(this, C).rawRecords.filter((n) => !n.__ng.deleted)), p(this, N, t(this, C).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, C).rawRecords.forEach((n, e) => {
|
|
1384
1391
|
n.__ng.rowidx = e;
|
|
1385
1392
|
}), t(this, N).forEach((n, e) => {
|
|
1386
1393
|
n.__ng.i = e;
|
|
1387
1394
|
});
|
|
1388
1395
|
}, "resetRecords"));
|
|
1389
|
-
|
|
1390
|
-
d(this,
|
|
1391
|
-
var
|
|
1396
|
+
A(this, "getValidData", /* @__PURE__ */ h(() => (t(this, N).length === 0 && t(this, C).rawRecords.length > 0 && this.resetRecords(), t(this, N)), "getValidData"));
|
|
1397
|
+
d(this, bt, /* @__PURE__ */ h((n) => {
|
|
1398
|
+
var i;
|
|
1392
1399
|
if (!n) return n;
|
|
1393
|
-
const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((
|
|
1400
|
+
const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((i = t(this, _).fields) == null ? void 0 : i.get) == "function" ? t(this, _).fields.get() : [], o = s.filter((a) => !a.__ng.deleted).map((a) => {
|
|
1394
1401
|
const c = {};
|
|
1395
1402
|
return r.forEach((l, f) => {
|
|
1396
1403
|
c[l] = a.v ? a.v[f] : a[l];
|
|
1397
1404
|
}), c.__ng = a.__ng, c;
|
|
1398
1405
|
});
|
|
1399
|
-
return e ?
|
|
1406
|
+
return e ? o[0] : o;
|
|
1400
1407
|
}, "#conv"));
|
|
1401
|
-
|
|
1402
|
-
p(this, _, n), p(this, C, e), t(this,
|
|
1408
|
+
A(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
|
|
1409
|
+
p(this, _, n), p(this, C, e), t(this, oe).call(this);
|
|
1403
1410
|
}
|
|
1404
1411
|
get source() {
|
|
1405
|
-
return t(this,
|
|
1412
|
+
return t(this, bt).call(this, t(this, C).rawRecords);
|
|
1406
1413
|
}
|
|
1407
1414
|
set source(n) {
|
|
1408
1415
|
this.clear(), this.add(n, !1);
|
|
1409
1416
|
}
|
|
1410
1417
|
get nextId() {
|
|
1411
|
-
return ++
|
|
1418
|
+
return ++es(this, re)._;
|
|
1412
1419
|
}
|
|
1413
1420
|
get count() {
|
|
1414
1421
|
return t(this, N).length;
|
|
@@ -1420,29 +1427,29 @@ const O = class O {
|
|
|
1420
1427
|
return this.length;
|
|
1421
1428
|
}
|
|
1422
1429
|
};
|
|
1423
|
-
_ = new WeakMap(), C = new WeakMap(), N = new WeakMap(), gt = new WeakMap(),
|
|
1424
|
-
|
|
1430
|
+
_ = new WeakMap(), C = new WeakMap(), N = new WeakMap(), gt = new WeakMap(), re = new WeakMap(), V = new WeakMap(), oe = new WeakMap(), it = new WeakMap(), _t = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), bt = new WeakMap(), h(W, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
|
|
1431
|
+
A(W, "ROW_STATE", {
|
|
1425
1432
|
EMPTY: "EMPTY",
|
|
1426
1433
|
NORMAL: "NORMAL",
|
|
1427
1434
|
INSERT: "INSERT",
|
|
1428
1435
|
UPDATE: "UPDATE",
|
|
1429
1436
|
DELETE: "DELETE"
|
|
1430
1437
|
});
|
|
1431
|
-
let
|
|
1432
|
-
var
|
|
1433
|
-
const
|
|
1438
|
+
let Se = W;
|
|
1439
|
+
var at;
|
|
1440
|
+
const Ue = class Ue {
|
|
1434
1441
|
constructor(n) {
|
|
1435
|
-
d(this,
|
|
1436
|
-
p(this,
|
|
1442
|
+
d(this, at);
|
|
1443
|
+
p(this, at, n), this.row = new we(this), this.data = new Se(t(this, at), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
|
|
1437
1444
|
var e;
|
|
1438
|
-
(e = t(this,
|
|
1445
|
+
(e = t(this, at).view) != null && e.redraw && t(this, at).view.redraw();
|
|
1439
1446
|
}, this.setDataSource = (e) => {
|
|
1440
1447
|
this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
|
|
1441
1448
|
}, this.getRowState = (e) => {
|
|
1442
|
-
var r,
|
|
1449
|
+
var r, o;
|
|
1443
1450
|
const s = parseInt(e, 10);
|
|
1444
1451
|
if (!(s >= this.data.count()))
|
|
1445
|
-
return (
|
|
1452
|
+
return (o = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : o.rowState;
|
|
1446
1453
|
}, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
|
|
1447
1454
|
this.row.at = e;
|
|
1448
1455
|
}, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, s) => this.data.get(e, s), this.setColumn = (e, s, r) => {
|
|
@@ -1450,58 +1457,58 @@ const Ye = class Ye {
|
|
|
1450
1457
|
}, this.setDataSource([]);
|
|
1451
1458
|
}
|
|
1452
1459
|
};
|
|
1453
|
-
|
|
1454
|
-
let
|
|
1455
|
-
var
|
|
1456
|
-
const
|
|
1460
|
+
at = new WeakMap(), h(Ue, "ngDataManager");
|
|
1461
|
+
let Re = Ue;
|
|
1462
|
+
var pt, H, Nt, le;
|
|
1463
|
+
const Xe = class Xe {
|
|
1457
1464
|
// 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
|
|
1458
1465
|
constructor(n) {
|
|
1459
|
-
d(this,
|
|
1466
|
+
d(this, pt);
|
|
1460
1467
|
d(this, H, []);
|
|
1461
|
-
|
|
1468
|
+
A(this, "add", /* @__PURE__ */ h((n, e = "string") => {
|
|
1462
1469
|
n.forEach((s) => {
|
|
1463
1470
|
t(this, H).some((r) => r.name === s) || t(this, H).push({ name: s, type: e });
|
|
1464
|
-
}), t(this,
|
|
1471
|
+
}), t(this, Nt).call(this);
|
|
1465
1472
|
}, "add"));
|
|
1466
|
-
d(this,
|
|
1473
|
+
d(this, Nt, /* @__PURE__ */ h(() => {
|
|
1467
1474
|
const n = /* @__PURE__ */ new Map();
|
|
1468
1475
|
t(this, H).forEach((e) => {
|
|
1469
1476
|
n.set(e.name, e.type);
|
|
1470
1477
|
}), p(this, H, Array.from(n, ([e, s]) => ({ name: e, type: s }))), p(this, H, t(this, H).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, H).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
|
|
1471
1478
|
}, "#adjust"));
|
|
1472
|
-
d(this,
|
|
1473
|
-
p(this, H, []),
|
|
1474
|
-
const n = Array.from(t(this,
|
|
1479
|
+
d(this, le, /* @__PURE__ */ h(() => {
|
|
1480
|
+
p(this, H, []), R.log(t(this, pt).querySelectorAll("table"));
|
|
1481
|
+
const n = Array.from(t(this, pt).querySelectorAll("table"));
|
|
1475
1482
|
if (!(!n || n.length === 0)) {
|
|
1476
1483
|
for (const e of n)
|
|
1477
|
-
|
|
1478
|
-
const
|
|
1479
|
-
|
|
1484
|
+
R.log(e), $("[data-bind]", e).each((s, r) => {
|
|
1485
|
+
const o = r.dataset.bind, i = r.getAttribute("data-type") || "string";
|
|
1486
|
+
o && t(this, H).push({ name: o, type: i });
|
|
1480
1487
|
}), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
|
|
1481
|
-
$(`[${s}]`, e).each((r,
|
|
1482
|
-
var
|
|
1483
|
-
if (
|
|
1484
|
-
const a =
|
|
1488
|
+
$(`[${s}]`, e).each((r, o) => {
|
|
1489
|
+
var i = o.getAttribute(s);
|
|
1490
|
+
if (i.indexOf("data.") < 0) {
|
|
1491
|
+
const a = i.search(/[(]/g);
|
|
1485
1492
|
if (a > 0)
|
|
1486
1493
|
try {
|
|
1487
|
-
|
|
1494
|
+
i = String(window[i.substring(0, a).trim()]);
|
|
1488
1495
|
} catch {
|
|
1489
|
-
|
|
1496
|
+
i = "";
|
|
1490
1497
|
}
|
|
1491
1498
|
}
|
|
1492
|
-
|
|
1499
|
+
i.split("data.").forEach((a) => {
|
|
1493
1500
|
if (a.trim() != "") {
|
|
1494
1501
|
const c = a.search(/[^_A-Za-z0-9]/g);
|
|
1495
1502
|
let l = "";
|
|
1496
|
-
c >= 0 ? l = a.substring(0, c) :
|
|
1503
|
+
c >= 0 ? l = a.substring(0, c) : i.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, H).push({ name: l, type: "string" });
|
|
1497
1504
|
}
|
|
1498
1505
|
});
|
|
1499
1506
|
});
|
|
1500
1507
|
});
|
|
1501
|
-
t(this,
|
|
1508
|
+
t(this, Nt).call(this);
|
|
1502
1509
|
}
|
|
1503
1510
|
}, "#init"));
|
|
1504
|
-
p(this,
|
|
1511
|
+
p(this, pt, n), t(this, le).call(this);
|
|
1505
1512
|
}
|
|
1506
1513
|
// 🎯 기존에 필드 이름만 쓰던 곳들과의 호환을 위해 이름 배열만 리턴하는 메서드 유지
|
|
1507
1514
|
get() {
|
|
@@ -1523,43 +1530,43 @@ const Ve = class Ve {
|
|
|
1523
1530
|
return t(this, H).some((e) => e.name === n);
|
|
1524
1531
|
}
|
|
1525
1532
|
};
|
|
1526
|
-
|
|
1527
|
-
let
|
|
1528
|
-
var
|
|
1529
|
-
const
|
|
1533
|
+
pt = new WeakMap(), H = new WeakMap(), Nt = new WeakMap(), le = new WeakMap(), h(Xe, "ngFields");
|
|
1534
|
+
let Ee = Xe;
|
|
1535
|
+
var lt, ce, he;
|
|
1536
|
+
const Ke = class Ke extends HTMLElement {
|
|
1530
1537
|
constructor() {
|
|
1531
1538
|
super();
|
|
1532
1539
|
//#created = false;
|
|
1533
|
-
d(this,
|
|
1534
|
-
d(this,
|
|
1535
|
-
d(this,
|
|
1536
|
-
this.fields = new
|
|
1540
|
+
d(this, lt);
|
|
1541
|
+
d(this, ce);
|
|
1542
|
+
d(this, he, /* @__PURE__ */ h(() => {
|
|
1543
|
+
this.fields = new Ee(this), p(this, ce, new ve(this)), R.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
1537
1544
|
}, "#init"));
|
|
1538
|
-
this.attachShadow({ mode: "open" }), p(this,
|
|
1545
|
+
this.attachShadow({ mode: "open" }), p(this, lt, new Re(this));
|
|
1539
1546
|
}
|
|
1540
1547
|
connectedCallback() {
|
|
1541
|
-
t(this,
|
|
1548
|
+
t(this, he).call(this);
|
|
1542
1549
|
}
|
|
1543
1550
|
disconnectedCallback() {
|
|
1544
|
-
|
|
1551
|
+
R.log("NineTable disconnected.");
|
|
1545
1552
|
}
|
|
1546
1553
|
// 🎯 외부에서 grid.data.set(...) 형태로 접근할 수 있도록 데이터 매니저 오픈
|
|
1547
1554
|
get data() {
|
|
1548
|
-
return t(this,
|
|
1555
|
+
return t(this, lt).data;
|
|
1549
1556
|
}
|
|
1550
1557
|
// 🎯 행(row) 관련 제어 접근자 오픈
|
|
1551
1558
|
get row() {
|
|
1552
|
-
return t(this,
|
|
1559
|
+
return t(this, lt).row;
|
|
1553
1560
|
}
|
|
1554
1561
|
// 🎯 전체 데이터 매니저 접근 필요할 경우
|
|
1555
1562
|
get dataManager() {
|
|
1556
|
-
return t(this,
|
|
1563
|
+
return t(this, lt);
|
|
1557
1564
|
}
|
|
1558
1565
|
};
|
|
1559
|
-
|
|
1560
|
-
let
|
|
1561
|
-
customElements.get("nine-table") || customElements.define("nine-table",
|
|
1562
|
-
const
|
|
1566
|
+
lt = new WeakMap(), ce = new WeakMap(), he = new WeakMap(), h(Ke, "NineTable");
|
|
1567
|
+
let Ae = Ke;
|
|
1568
|
+
customElements.get("nine-table") || customElements.define("nine-table", Ae);
|
|
1569
|
+
const St = class St extends HTMLElement {
|
|
1563
1570
|
// 👈 커스텀 스타일용 캐시 추가
|
|
1564
1571
|
constructor() {
|
|
1565
1572
|
super();
|
|
@@ -1570,74 +1577,74 @@ const vt = class vt extends HTMLElement {
|
|
|
1570
1577
|
connectedCallback() {
|
|
1571
1578
|
}
|
|
1572
1579
|
};
|
|
1573
|
-
h(
|
|
1574
|
-
let
|
|
1575
|
-
var L,
|
|
1576
|
-
const
|
|
1580
|
+
h(St, "BasicCellElement"), A(St, "_styleCache", /* @__PURE__ */ new Map()), A(St, "_customStyleCache", /* @__PURE__ */ new Map());
|
|
1581
|
+
let qe = St;
|
|
1582
|
+
var L, zt, m, Me, Ie, _e, Ne, ze;
|
|
1583
|
+
const Ze = class Ze extends qe {
|
|
1577
1584
|
constructor() {
|
|
1578
1585
|
super();
|
|
1579
1586
|
d(this, L);
|
|
1580
|
-
d(this,
|
|
1581
|
-
d(this,
|
|
1582
|
-
d(this, He);
|
|
1583
|
-
d(this, $e);
|
|
1587
|
+
d(this, zt);
|
|
1588
|
+
d(this, m);
|
|
1584
1589
|
d(this, Me);
|
|
1585
1590
|
d(this, Ie);
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1591
|
+
d(this, _e);
|
|
1592
|
+
d(this, Ne);
|
|
1593
|
+
A(this, "getDisplayText", /* @__PURE__ */ h((e) => {
|
|
1594
|
+
if (t(this, m))
|
|
1595
|
+
if (t(this, m).closest("tbody")) {
|
|
1596
|
+
const s = t(this, m).closest("tr").data, r = parseInt(t(this, m).dataset.row);
|
|
1590
1597
|
if (!s) return "";
|
|
1591
|
-
if (ninegrid.isNull(t(this,
|
|
1592
|
-
if (!ninegrid.isNull(t(this,
|
|
1593
|
-
return s[t(this,
|
|
1598
|
+
if (ninegrid.isNull(t(this, m).dataset.expr)) {
|
|
1599
|
+
if (!ninegrid.isNull(t(this, m).dataset.bind))
|
|
1600
|
+
return s[t(this, m).dataset.bind] || ninegrid.nvl(e, "");
|
|
1594
1601
|
} else try {
|
|
1595
|
-
return this.getExprValue(t(this,
|
|
1602
|
+
return this.getExprValue(t(this, m).dataset.expr, s, r, t(this, m));
|
|
1596
1603
|
} catch {
|
|
1597
|
-
console.error(t(this,
|
|
1604
|
+
console.error(t(this, m).dataset.expr, s, t(this, m).dataset.row);
|
|
1598
1605
|
}
|
|
1599
1606
|
return ninegrid.nvl(e, "");
|
|
1600
1607
|
} else
|
|
1601
1608
|
try {
|
|
1602
|
-
return t(this, L).exprFunction(t(this,
|
|
1609
|
+
return t(this, L).exprFunction(t(this, m).dataset.expr).call(this, null, -1, t(this, L).data);
|
|
1603
1610
|
} catch {
|
|
1604
1611
|
}
|
|
1605
1612
|
}, "getDisplayText"));
|
|
1606
|
-
d(this,
|
|
1607
|
-
if (!(!t(this, L) || !t(this, L).template || !t(this,
|
|
1608
|
-
var e = ninegrid.j.querySelectorAll(t(this,
|
|
1613
|
+
d(this, ze, /* @__PURE__ */ h(() => {
|
|
1614
|
+
if (!(!t(this, L) || !t(this, L).template || !t(this, m).closest("tbody.bindable"))) {
|
|
1615
|
+
var e = ninegrid.j.querySelectorAll(t(this, m)).attr("suppress");
|
|
1609
1616
|
if (e && (e = parseInt(e)), e && !isNaN(e)) {
|
|
1610
|
-
var s = t(this,
|
|
1611
|
-
$("th,td", s).each((
|
|
1617
|
+
var s = t(this, m).closest("tr"), r = [];
|
|
1618
|
+
$("th,td", s).each((y, z) => {
|
|
1612
1619
|
var T = ninegrid.j.querySelectorAll(z).attr("suppress");
|
|
1613
1620
|
T && z.dataset.row && (T = parseInt(T), !isNaN(T) && T <= e && r.push(T));
|
|
1614
1621
|
}), r.sort();
|
|
1615
|
-
var
|
|
1622
|
+
var o = !1;
|
|
1616
1623
|
if (parseInt(s.sectionRowIndex / t(this, L).template.length) > 0)
|
|
1617
|
-
for (var
|
|
1618
|
-
if (
|
|
1619
|
-
var a = parseInt(t(this,
|
|
1620
|
-
t(this,
|
|
1621
|
-
var
|
|
1622
|
-
if (b !=
|
|
1623
|
-
|
|
1624
|
+
for (var i of r) {
|
|
1625
|
+
if (i > e) break;
|
|
1626
|
+
var a = parseInt(t(this, m).dataset.row), c = a - 1, l = t(this, m).closest("tr").data, f = t(this, L).data.get(c);
|
|
1627
|
+
t(this, m).dataset.matrixRow;
|
|
1628
|
+
var u = t(this, L).body.querySelector(`tbody.bindable [suppress="${i}"][data-matrix-row="${t(this, m).dataset.matrixRow}"]`), b = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, a) : l[u.dataset.bind], g = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, c) : f[u.dataset.bind];
|
|
1629
|
+
if (b != g) {
|
|
1630
|
+
o = !0;
|
|
1624
1631
|
break;
|
|
1625
1632
|
}
|
|
1626
1633
|
}
|
|
1627
1634
|
else
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
var
|
|
1631
|
-
$(
|
|
1635
|
+
o = !0;
|
|
1636
|
+
o ? ninegrid.j.querySelectorAll(t(this, m)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, m)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, m)).hasClass("hidden") || (o ? ninegrid.j.querySelectorAll(t(this, m)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, m)).addClass("hidden"));
|
|
1637
|
+
var x = parseInt(t(this, m).dataset.matrixRow), v = x - 1, E = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, m).dataset.col}"][data-matrix-row="${v}"]`);
|
|
1638
|
+
$(E).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, m)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").addClass("last-suppress") : !$(E).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, m)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").removeClass("last-suppress");
|
|
1632
1639
|
}
|
|
1633
1640
|
}
|
|
1634
1641
|
}, "#resetSuppress"));
|
|
1635
|
-
|
|
1642
|
+
A(this, "getExprValue", /* @__PURE__ */ h((e, s, r, o) => {
|
|
1636
1643
|
if (typeof e < "u")
|
|
1637
1644
|
try {
|
|
1638
1645
|
r = parseInt(r);
|
|
1639
|
-
const
|
|
1640
|
-
return t(this, L)[
|
|
1646
|
+
const i = e.replace("()", "");
|
|
1647
|
+
return t(this, L)[i] ? t(this, L)[i].call(this, s, r, t(this, m)) : t(this, L).exprFunction(e).call(this, s, r, t(this, L).data);
|
|
1641
1648
|
} catch {
|
|
1642
1649
|
return ["NG-COMBO"].includes(this.tagName) ? "" : e;
|
|
1643
1650
|
}
|
|
@@ -1646,31 +1653,31 @@ const Xe = class Xe extends Ae {
|
|
|
1646
1653
|
}, "getExprValue"));
|
|
1647
1654
|
}
|
|
1648
1655
|
connectedCallback() {
|
|
1649
|
-
super.connectedCallback(), p(this, L, this.getRootNode().host), p(this,
|
|
1656
|
+
super.connectedCallback(), p(this, L, this.getRootNode().host), p(this, m, this.closest("th,td")), p(this, zt, t(this, m).closest("tr"));
|
|
1650
1657
|
}
|
|
1651
1658
|
get value() {
|
|
1652
|
-
var e = !t(this, L) || !t(this, L).dataManager || !t(this,
|
|
1659
|
+
var e = !t(this, L) || !t(this, L).dataManager || !t(this, m) || !t(this, m).dataset || !t(this, m).dataset.row || !t(this, m).dataset.bind ? "" : t(this, m).closest("tr").data[t(this, m).dataset.bind];
|
|
1653
1660
|
return e ?? "";
|
|
1654
1661
|
}
|
|
1655
1662
|
set value(e) {
|
|
1656
|
-
var s = parseInt(t(this,
|
|
1663
|
+
var s = parseInt(t(this, m).dataset.row);
|
|
1657
1664
|
const r = this.getAttribute("update-row-state") != "false";
|
|
1658
|
-
s < 0 ? t(this, L).data.setValueNF(parseInt(t(this,
|
|
1665
|
+
s < 0 ? t(this, L).data.setValueNF(parseInt(t(this, m).dataset.index), t(this, m).dataset.bind, e, r) : t(this, L).data.setValue(s, t(this, m).dataset.bind, e, r);
|
|
1659
1666
|
}
|
|
1660
1667
|
get row() {
|
|
1661
|
-
return parseInt(t(this,
|
|
1668
|
+
return parseInt(t(this, m).dataset.row);
|
|
1662
1669
|
}
|
|
1663
1670
|
get data() {
|
|
1664
|
-
return t(this,
|
|
1671
|
+
return t(this, m).closest("tr").data;
|
|
1665
1672
|
}
|
|
1666
1673
|
refresh() {
|
|
1667
|
-
const e = t(this,
|
|
1668
|
-
return parseInt(t(this,
|
|
1674
|
+
const e = t(this, m).dataset.bind;
|
|
1675
|
+
return parseInt(t(this, m).dataset.row), t(this, zt).data[e];
|
|
1669
1676
|
}
|
|
1670
1677
|
};
|
|
1671
|
-
L = new WeakMap(),
|
|
1672
|
-
let
|
|
1673
|
-
const
|
|
1678
|
+
L = new WeakMap(), zt = new WeakMap(), m = new WeakMap(), Me = new WeakMap(), Ie = new WeakMap(), _e = new WeakMap(), Ne = new WeakMap(), ze = new WeakMap(), h(Ze, "CellElement");
|
|
1679
|
+
let Te = Ze;
|
|
1680
|
+
const Ge = class Ge extends Te {
|
|
1674
1681
|
constructor() {
|
|
1675
1682
|
super();
|
|
1676
1683
|
}
|
|
@@ -1681,21 +1688,21 @@ const Ke = class Ke extends Re {
|
|
|
1681
1688
|
return super.refresh();
|
|
1682
1689
|
}
|
|
1683
1690
|
};
|
|
1684
|
-
h(
|
|
1685
|
-
let
|
|
1686
|
-
var
|
|
1687
|
-
const
|
|
1691
|
+
h(Ge, "EditableCellElement");
|
|
1692
|
+
let ke = Ge;
|
|
1693
|
+
var Ot, ct, yt, mt, de, U, Oe;
|
|
1694
|
+
const Je = class Je extends ke {
|
|
1688
1695
|
constructor() {
|
|
1689
1696
|
super();
|
|
1690
|
-
d(this,
|
|
1691
|
-
d(this,
|
|
1692
|
-
d(this, pt);
|
|
1697
|
+
d(this, Ot);
|
|
1698
|
+
d(this, ct);
|
|
1693
1699
|
d(this, yt);
|
|
1694
|
-
d(this,
|
|
1700
|
+
d(this, mt);
|
|
1701
|
+
d(this, de);
|
|
1695
1702
|
d(this, U);
|
|
1696
|
-
|
|
1703
|
+
A(this, "refresh", /* @__PURE__ */ h(() => {
|
|
1697
1704
|
const e = super.refresh();
|
|
1698
|
-
t(this,
|
|
1705
|
+
t(this, Ot).value = e;
|
|
1699
1706
|
}, "refresh"));
|
|
1700
1707
|
/**
|
|
1701
1708
|
dataRefresh = (v) => {
|
|
@@ -1727,11 +1734,11 @@ const Ze = class Ze extends qe {
|
|
|
1727
1734
|
if (!v) this.reset();
|
|
1728
1735
|
};
|
|
1729
1736
|
*/
|
|
1730
|
-
d(this,
|
|
1737
|
+
d(this, Oe, /* @__PURE__ */ h((e) => {
|
|
1731
1738
|
if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
|
|
1732
|
-
if (t(this,
|
|
1733
|
-
let
|
|
1734
|
-
if (t(this, U) && Number(t(this, U)) > 0 &&
|
|
1739
|
+
if (t(this, ct) == "number") {
|
|
1740
|
+
let o = [];
|
|
1741
|
+
if (t(this, U) && Number(t(this, U)) > 0 && o.push("."), t(this, mt) && Number(t(this, mt)) >= 0 && o.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !o.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) {
|
|
1735
1742
|
var s = e.target.value, r = s.indexOf(".");
|
|
1736
1743
|
if (r >= 0) {
|
|
1737
1744
|
var s = s.substr(r + 1, s.length);
|
|
@@ -1739,10 +1746,10 @@ const Ze = class Ze extends qe {
|
|
|
1739
1746
|
}
|
|
1740
1747
|
}
|
|
1741
1748
|
}
|
|
1742
|
-
t(this,
|
|
1749
|
+
t(this, yt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, yt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
|
|
1743
1750
|
}
|
|
1744
1751
|
}, "#onKeyDown"));
|
|
1745
|
-
if (this.applyBaseStyle(), p(this,
|
|
1752
|
+
if (this.applyBaseStyle(), p(this, ct, this.getAttribute("type") || "text"), p(this, yt, this.getAttribute("maxbyte")), p(this, mt, this.getAttribute("min")), p(this, de, this.getAttribute("max")), p(this, U, this.getAttribute("scale")), !["text", "number"].includes(t(this, ct))) throw `invalid type : ${t(this, ct)}`;
|
|
1746
1753
|
}
|
|
1747
1754
|
connectedCallback() {
|
|
1748
1755
|
for (var e = [], s = 0; s < this.attributes.length; s++)
|
|
@@ -1752,11 +1759,11 @@ const Ze = class Ze extends qe {
|
|
|
1752
1759
|
${e.join(" ")}
|
|
1753
1760
|
ondragstart="return false;"
|
|
1754
1761
|
>
|
|
1755
|
-
`, super.connectedCallback(), p(this,
|
|
1762
|
+
`, super.connectedCallback(), p(this, Ot, this.querySelector("input"));
|
|
1756
1763
|
}
|
|
1757
1764
|
};
|
|
1758
|
-
|
|
1759
|
-
let
|
|
1765
|
+
Ot = new WeakMap(), ct = new WeakMap(), yt = new WeakMap(), mt = new WeakMap(), de = new WeakMap(), U = new WeakMap(), Oe = new WeakMap(), h(Je, "CellInputText");
|
|
1766
|
+
let Ce = Je;
|
|
1760
1767
|
customElements.get("cell-input-text");
|
|
1761
|
-
customElements.get("cell-input") || customElements.define("cell-input",
|
|
1768
|
+
customElements.get("cell-input") || customElements.define("cell-input", Ce);
|
|
1762
1769
|
//# sourceMappingURL=nine-table.js.map
|