@ninebone/table 0.0.538 → 0.0.540
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 +450 -450
- package/dist/nine-table.js.map +1 -1
- package/dist/nine-table.umd.js +8 -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 Fe = Object.defineProperty;
|
|
2
|
+
var Ve = (R) => {
|
|
3
|
+
throw TypeError(R);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var h = (
|
|
7
|
-
var
|
|
8
|
-
var t = (
|
|
9
|
-
var
|
|
5
|
+
var Xe = (R, r, e) => r in R ? Fe(R, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[r] = e;
|
|
6
|
+
var h = (R, r) => Fe(R, "name", { value: r, configurable: !0 });
|
|
7
|
+
var E = (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), y = (R, r, e, s) => (Ye(R, r, "write to private field"), s ? s.call(R, e) : r.set(R, e), e);
|
|
9
|
+
var Ue = (R, r, e, s) => ({
|
|
10
10
|
set _(i) {
|
|
11
|
-
|
|
11
|
+
y(R, r, i, e);
|
|
12
12
|
},
|
|
13
13
|
get _() {
|
|
14
|
-
return t(
|
|
14
|
+
return t(R, r, s);
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
import { trace as
|
|
18
|
-
const
|
|
17
|
+
import { trace as Ke } from "@ninebone/util";
|
|
18
|
+
const He = class He extends Ke.constructor {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(), this.init("nine-table", "green");
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
h(
|
|
24
|
-
let
|
|
25
|
-
const H = new
|
|
26
|
-
var z, j, w, K, Z, G, Nt
|
|
27
|
-
const
|
|
23
|
+
h(He, "Trace");
|
|
24
|
+
let ae = He;
|
|
25
|
+
const H = new ae();
|
|
26
|
+
var z, j, w, X, K, Z, _t, G, Nt;
|
|
27
|
+
const Me = class Me extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
30
30
|
d(this, z);
|
|
31
31
|
d(this, j, !1);
|
|
32
32
|
d(this, w);
|
|
33
|
+
d(this, X);
|
|
33
34
|
d(this, K);
|
|
34
35
|
d(this, Z);
|
|
35
|
-
d(this,
|
|
36
|
-
d(this, Nt, /* @__PURE__ */ h(() => {
|
|
36
|
+
d(this, _t, /* @__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 && (y(this, Z, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
|
-
})), t(this,
|
|
41
|
+
})), t(this, Z).observe(e));
|
|
42
42
|
}, "#observeResize"));
|
|
43
|
-
|
|
43
|
+
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
44
44
|
if (!t(this, z) || !t(this, w) || t(this, j)) return;
|
|
45
45
|
const e = t(this, w).container, s = e.querySelector("table");
|
|
46
46
|
if (!s) return;
|
|
47
|
-
const i = t(this, w).track, n = t(this, w).thumb, a = t(this, z).querySelector(".ng-container-bottom"), o = e.clientWidth,
|
|
48
|
-
if (o !== 0 &&
|
|
47
|
+
const i = t(this, w).track, n = t(this, w).thumb, a = t(this, z).querySelector(".ng-container-bottom"), o = e.clientWidth, c = s.scrollWidth;
|
|
48
|
+
if (o !== 0 && c > o)
|
|
49
49
|
a && (a.style.display = "flex");
|
|
50
50
|
else {
|
|
51
51
|
a && (a.style.display = "none");
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
const f = Math.max(Math.min(
|
|
54
|
+
const l = i.clientWidth;
|
|
55
|
+
if (l <= 0) return;
|
|
56
|
+
const f = Math.max(Math.min(l * (o / c), l), 20);
|
|
57
57
|
n.style.width = `${f}px`;
|
|
58
|
-
const u = e.scrollLeft, g =
|
|
59
|
-
let
|
|
60
|
-
g > 0 && (
|
|
61
|
-
const
|
|
62
|
-
|
|
58
|
+
const u = e.scrollLeft, g = c - o;
|
|
59
|
+
let b = 0;
|
|
60
|
+
g > 0 && (b = parseInt(u / g * (l - f), 10)), b < 0 && (b = 0);
|
|
61
|
+
const x = l - f;
|
|
62
|
+
b > x && (b = x), n.style.left = `${b}px`, t(this, w).left.disabled = b === 0, t(this, w).right.disabled = b >= x - 1;
|
|
63
63
|
}, "refresh"));
|
|
64
|
-
d(this,
|
|
64
|
+
d(this, G, /* @__PURE__ */ h((e) => {
|
|
65
65
|
if (!t(this, w)) return !1;
|
|
66
66
|
const s = t(this, w).container, i = s.querySelector("table");
|
|
67
67
|
if (!i) return !1;
|
|
68
68
|
const n = t(this, w).track.getBoundingClientRect(), a = t(this, w).thumb.clientWidth;
|
|
69
69
|
let o = e;
|
|
70
70
|
o < 0 && (o = 0);
|
|
71
|
-
const
|
|
72
|
-
o >
|
|
73
|
-
const
|
|
74
|
-
return
|
|
71
|
+
const c = n.width - a;
|
|
72
|
+
o > c && (o = c), o = parseInt(o, 10), t(this, w).thumb.style.left = `${o}px`, t(this, w).left.disabled = o === 0, t(this, w).right.disabled = o >= c - 1;
|
|
73
|
+
const l = s.clientWidth, u = i.scrollWidth - l;
|
|
74
|
+
return c > 0 && u > 0 && (s.scrollLeft = o / c * u), o > 0 && o < c - 1;
|
|
75
75
|
}, "#thumbMoveTo"));
|
|
76
|
-
d(this,
|
|
76
|
+
d(this, Nt, /* @__PURE__ */ h(() => {
|
|
77
77
|
const e = /* @__PURE__ */ h((i) => {
|
|
78
|
-
clearInterval(t(this,
|
|
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,
|
|
81
|
-
clearInterval(t(this,
|
|
80
|
+
t(this, G).call(this, n + i), y(this, X, setInterval(() => {
|
|
81
|
+
clearInterval(t(this, X)), y(this, K, setInterval(() => {
|
|
82
82
|
const a = parseInt(t(this, w).thumb.style.left || 0, 10);
|
|
83
|
-
t(this,
|
|
83
|
+
t(this, G).call(this, a + i) || clearInterval(t(this, K));
|
|
84
84
|
}, 50));
|
|
85
85
|
}, 500));
|
|
86
86
|
}, "delayScroll"), s = /* @__PURE__ */ h(() => {
|
|
87
|
-
clearInterval(t(this,
|
|
87
|
+
clearInterval(t(this, X)), clearInterval(t(this, K));
|
|
88
88
|
}, "clearTimer");
|
|
89
89
|
["mouseup", "mouseleave", "touchend"].forEach((i) => {
|
|
90
90
|
t(this, w).left.addEventListener(i, s), t(this, w).right.addEventListener(i, s), t(this, w).track.addEventListener(i, s);
|
|
@@ -96,23 +96,23 @@ const $e = class $e extends HTMLElement {
|
|
|
96
96
|
if (i.button !== 0) return;
|
|
97
97
|
i.preventDefault();
|
|
98
98
|
const n = t(this, w).track.getBoundingClientRect(), a = t(this, w).thumb.clientWidth;
|
|
99
|
-
t(this,
|
|
99
|
+
t(this, G).call(this, i.clientX - n.left - a / 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(), y(this, j, !0), this.shiftX = i.clientX - t(this, w).thumb.getBoundingClientRect().left;
|
|
103
103
|
const n = /* @__PURE__ */ h((o) => {
|
|
104
104
|
if (!t(this, j)) return;
|
|
105
|
-
const
|
|
106
|
-
t(this,
|
|
105
|
+
const c = t(this, w).track.getBoundingClientRect();
|
|
106
|
+
t(this, G).call(this, o.clientX - c.left - this.shiftX);
|
|
107
107
|
}, "onMouseMove"), a = /* @__PURE__ */ h(() => {
|
|
108
|
-
|
|
108
|
+
y(this, j, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", a), this.refresh();
|
|
109
109
|
}, "onMouseUp");
|
|
110
110
|
document.addEventListener("mousemove", n), document.addEventListener("mouseup", a);
|
|
111
111
|
});
|
|
112
112
|
}, "#init"));
|
|
113
113
|
}
|
|
114
114
|
connectedCallback() {
|
|
115
|
-
if (
|
|
115
|
+
if (y(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 $e = class $e extends HTMLElement {
|
|
|
182
182
|
setTimeout(e, 10);
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
|
-
|
|
185
|
+
y(this, w, {
|
|
186
186
|
container: s,
|
|
187
187
|
track: this.querySelector(".ng-scroll-track"),
|
|
188
188
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
@@ -190,88 +190,88 @@ const $e = class $e extends HTMLElement {
|
|
|
190
190
|
right: this.querySelector(".ng-scroll-right")
|
|
191
191
|
}), s.addEventListener("scroll", () => {
|
|
192
192
|
t(this, j) || this.refresh();
|
|
193
|
-
}), t(this,
|
|
193
|
+
}), t(this, Nt).call(this), t(this, _t).call(this), this.refresh();
|
|
194
194
|
}, "initWhenReady");
|
|
195
195
|
e();
|
|
196
196
|
}
|
|
197
197
|
disconnectedCallback() {
|
|
198
|
-
t(this,
|
|
198
|
+
t(this, Z) && t(this, Z).disconnect();
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
z = new WeakMap(), j = new WeakMap(), w = new WeakMap(),
|
|
202
|
-
let
|
|
203
|
-
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar",
|
|
204
|
-
var F, at,
|
|
205
|
-
const
|
|
201
|
+
z = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), _t = new WeakMap(), G = new WeakMap(), Nt = new WeakMap(), h(Me, "NineTableHScrollBar");
|
|
202
|
+
let le = Me;
|
|
203
|
+
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", le);
|
|
204
|
+
var F, at, J, q, vt, wt, Wt;
|
|
205
|
+
const $e = class $e extends HTMLElement {
|
|
206
206
|
constructor() {
|
|
207
207
|
super();
|
|
208
208
|
d(this, F);
|
|
209
209
|
d(this, at);
|
|
210
|
-
d(this,
|
|
211
|
-
d(this,
|
|
210
|
+
d(this, J, !1);
|
|
211
|
+
d(this, q);
|
|
212
212
|
d(this, vt, 0);
|
|
213
213
|
d(this, wt, 0);
|
|
214
|
-
|
|
215
|
-
if (!t(this, F) || !t(this,
|
|
214
|
+
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
215
|
+
if (!t(this, F) || !t(this, q)) return;
|
|
216
216
|
H.log("nine-table-vscrollbar.refresh");
|
|
217
|
-
const e = t(this,
|
|
218
|
-
if (
|
|
219
|
-
i.style.display = "none", t(this,
|
|
217
|
+
const e = t(this, q).container, s = t(this, q).track, i = t(this, q).thumb, n = e.clientHeight, o = (t(this, F).data.get() || []).length, c = t(this, at).getRowHeight(), l = o * c;
|
|
218
|
+
if (l <= n) {
|
|
219
|
+
i.style.display = "none", t(this, q).top.disabled = !0, t(this, q).bottom.disabled = !0;
|
|
220
220
|
return;
|
|
221
221
|
} else
|
|
222
222
|
i.style.display = "block";
|
|
223
223
|
const f = s.clientHeight;
|
|
224
224
|
if (f <= 0) return;
|
|
225
|
-
const u = Math.max(Math.min(f * (n /
|
|
225
|
+
const u = Math.max(Math.min(f * (n / l), f), 20);
|
|
226
226
|
i.style.height = `${u}px`;
|
|
227
|
-
const g = e.scrollTop,
|
|
228
|
-
let
|
|
229
|
-
|
|
227
|
+
const g = e.scrollTop, b = Math.max(l - n, 1);
|
|
228
|
+
let x = 0;
|
|
229
|
+
b > 0 && (x = g / b * (f - u));
|
|
230
230
|
const v = f - u;
|
|
231
|
-
|
|
231
|
+
x < 0 && (x = 0), x > v && (x = v), i.style.top = `${x}px`, t(this, q).top.disabled = g <= 0, t(this, q).bottom.disabled = g >= b - 1;
|
|
232
232
|
}, "refresh"));
|
|
233
|
-
d(this,
|
|
233
|
+
d(this, Wt, /* @__PURE__ */ h(() => {
|
|
234
234
|
H.log("nine-table-vscrollbar.#init");
|
|
235
|
-
const e = t(this,
|
|
235
|
+
const e = t(this, q).container, s = /* @__PURE__ */ h(() => {
|
|
236
236
|
const n = (t(this, F).data.get() || []).length, a = t(this, at).getRowHeight();
|
|
237
237
|
return n * a;
|
|
238
238
|
}, "getContentHeight");
|
|
239
239
|
e.addEventListener("scroll", () => {
|
|
240
|
-
t(this,
|
|
241
|
-
}), t(this,
|
|
240
|
+
t(this, J) || this.refresh();
|
|
241
|
+
}), t(this, q).thumb.addEventListener("mousedown", (i) => {
|
|
242
242
|
if (i.button !== 0) return;
|
|
243
|
-
i.stopPropagation(), i.preventDefault(),
|
|
243
|
+
i.stopPropagation(), i.preventDefault(), y(this, J, !0), y(this, vt, i.clientY), y(this, wt, e.scrollTop);
|
|
244
244
|
const n = /* @__PURE__ */ h((o) => {
|
|
245
|
-
if (!t(this,
|
|
246
|
-
const
|
|
245
|
+
if (!t(this, J)) return;
|
|
246
|
+
const c = t(this, q).track.getBoundingClientRect(), l = t(this, q).thumb.clientHeight, u = c.height - l, g = o.clientY - t(this, vt), b = e.clientHeight, x = s(), v = Math.max(x - b, 1);
|
|
247
247
|
if (u > 0 && v > 0) {
|
|
248
|
-
const
|
|
249
|
-
let
|
|
250
|
-
const
|
|
251
|
-
|
|
248
|
+
const A = g / u * v;
|
|
249
|
+
let m = t(this, wt) + A;
|
|
250
|
+
const W = Math.max(0, x - b);
|
|
251
|
+
m < 0 && (m = 0), m > W && (m = W), e.scrollTop = m;
|
|
252
252
|
}
|
|
253
253
|
this.refresh();
|
|
254
254
|
}, "onMouseMove"), a = /* @__PURE__ */ h(() => {
|
|
255
|
-
|
|
255
|
+
y(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", a), this.refresh();
|
|
256
256
|
}, "onMouseUp");
|
|
257
257
|
document.addEventListener("mousemove", n), document.addEventListener("mouseup", a);
|
|
258
|
-
}), t(this,
|
|
259
|
-
if (i.button !== 0 || i.target === t(this,
|
|
260
|
-
const n = t(this,
|
|
261
|
-
if (
|
|
262
|
-
const
|
|
263
|
-
e.scrollTop =
|
|
258
|
+
}), t(this, q).track.addEventListener("mousedown", (i) => {
|
|
259
|
+
if (i.button !== 0 || i.target === t(this, q).thumb) return;
|
|
260
|
+
const n = t(this, q).track.getBoundingClientRect(), a = t(this, q).thumb.clientHeight, o = i.clientY - n.top - a / 2, l = n.height - a, f = e.clientHeight, u = s(), g = Math.max(u - f, 1);
|
|
261
|
+
if (l > 0 && g > 0) {
|
|
262
|
+
const b = Math.max(0, Math.min(1, o / l));
|
|
263
|
+
e.scrollTop = b * g;
|
|
264
264
|
}
|
|
265
265
|
this.refresh();
|
|
266
|
-
}), t(this,
|
|
266
|
+
}), t(this, q).top.addEventListener("click", () => {
|
|
267
267
|
e.scrollTop -= 40;
|
|
268
|
-
}), t(this,
|
|
268
|
+
}), t(this, q).bottom.addEventListener("click", () => {
|
|
269
269
|
e.scrollTop += 40;
|
|
270
270
|
});
|
|
271
271
|
}, "#init"));
|
|
272
272
|
}
|
|
273
273
|
connectedCallback() {
|
|
274
|
-
|
|
274
|
+
y(this, F, this.getRootNode().host), y(this, at, this.closest("nine-table-sheet")), this.innerHTML = `
|
|
275
275
|
<style>
|
|
276
276
|
nine-table-vscrollbar {
|
|
277
277
|
display: flex;
|
|
@@ -341,90 +341,90 @@ const Ie = class Ie extends HTMLElement {
|
|
|
341
341
|
setTimeout(e, 10);
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
344
|
-
|
|
344
|
+
y(this, q, {
|
|
345
345
|
container: s,
|
|
346
346
|
track: this.querySelector(".ng-scroll-track"),
|
|
347
347
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
348
348
|
top: this.querySelector(".ng-scroll-top"),
|
|
349
349
|
bottom: this.querySelector(".ng-scroll-bottom")
|
|
350
|
-
}), t(this,
|
|
350
|
+
}), t(this, Wt).call(this), this.refresh();
|
|
351
351
|
}, "initWhenReady");
|
|
352
352
|
e();
|
|
353
353
|
}
|
|
354
354
|
};
|
|
355
|
-
F = new WeakMap(), at = new WeakMap(),
|
|
356
|
-
let
|
|
357
|
-
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar",
|
|
358
|
-
var
|
|
359
|
-
const
|
|
355
|
+
F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), q = new WeakMap(), vt = new WeakMap(), wt = new WeakMap(), Wt = new WeakMap(), h($e, "NineTableVScrollBar");
|
|
356
|
+
let ce = $e;
|
|
357
|
+
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", ce);
|
|
358
|
+
var D, S, Q, P, M, V, tt, St, Ee, lt, Ot, Bt, zt, Et, At, Pt, Dt, Rt, Ae, ct, qt, jt;
|
|
359
|
+
const Ie = class Ie {
|
|
360
360
|
constructor(r) {
|
|
361
|
-
d(this,
|
|
361
|
+
d(this, D);
|
|
362
362
|
d(this, S);
|
|
363
|
-
d(this,
|
|
364
|
-
d(this,
|
|
365
|
-
d(this,
|
|
366
|
-
d(this,
|
|
363
|
+
d(this, Q);
|
|
364
|
+
d(this, P, /* @__PURE__ */ new Map());
|
|
365
|
+
d(this, M, null);
|
|
366
|
+
d(this, V, null);
|
|
367
367
|
d(this, tt, 0);
|
|
368
368
|
d(this, St, 40);
|
|
369
|
-
d(this,
|
|
369
|
+
d(this, Ee, !1);
|
|
370
370
|
d(this, lt, !1);
|
|
371
|
-
d(this,
|
|
372
|
-
|
|
371
|
+
d(this, Ot, 3);
|
|
372
|
+
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
373
|
+
var e;
|
|
373
374
|
H.log("rowManager.refresh");
|
|
374
375
|
const r = t(this, S).querySelector(".ng-container-body .ng-part-body");
|
|
375
|
-
r && (t(this,
|
|
376
|
+
r && (t(this, Et).call(this), t(this, ct).call(this, r.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
|
|
376
377
|
}, "refresh"));
|
|
377
|
-
|
|
378
|
-
H.log("rowManager.initialize"),
|
|
378
|
+
E(this, "initialize", /* @__PURE__ */ h(() => {
|
|
379
|
+
H.log("rowManager.initialize"), y(this, Q, {
|
|
379
380
|
scrollTables: t(this, S).querySelectorAll(".ng-part-body table"),
|
|
380
381
|
firstTr: t(this, S).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
|
|
381
|
-
}),
|
|
382
|
+
}), y(this, M, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
|
|
382
383
|
const o = t(this, S).querySelector(a);
|
|
383
384
|
if (!o) return;
|
|
384
|
-
const
|
|
385
|
-
if (!l) return;
|
|
386
|
-
const c = l.querySelector("tbody.bindable-tbody");
|
|
385
|
+
const c = o.querySelector(".ng-part-body table");
|
|
387
386
|
if (!c) return;
|
|
388
|
-
const
|
|
389
|
-
|
|
387
|
+
const l = c.querySelector("tbody.bindable-tbody");
|
|
388
|
+
if (!l) return;
|
|
389
|
+
const u = Array.from(l.querySelectorAll("tr")).map((g) => g.cloneNode(!0));
|
|
390
|
+
t(this, P).set(a, u);
|
|
390
391
|
});
|
|
391
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");
|
|
392
393
|
if (r) {
|
|
393
|
-
t(this,
|
|
394
|
+
t(this, zt).call(this, r), t(this, Rt).call(this), t(this, Et).call(this), t(this, ct).call(this, r.scrollTop);
|
|
394
395
|
let a = !1;
|
|
395
|
-
const o = /* @__PURE__ */ h((
|
|
396
|
+
const o = /* @__PURE__ */ h((c, l, f) => {
|
|
396
397
|
var u;
|
|
397
|
-
a || (a = !0, r && r.scrollTop !==
|
|
398
|
+
a || (a = !0, r && r.scrollTop !== c && (r.scrollTop = c), e && e.scrollTop !== c && (e.scrollTop = c), s && s.scrollTop !== c && (s.scrollTop = c), i && i.scrollLeft !== l && (i.scrollLeft = l), n && n.scrollLeft !== l && (n.scrollLeft = l), t(this, ct).call(this, c), (u = t(this, S).querySelector("nine-table-vscrollbar")) == null || u.refresh(), a = !1);
|
|
398
399
|
}, "syncScroll");
|
|
399
|
-
[r, e, s].forEach((
|
|
400
|
-
|
|
401
|
-
t(this, lt) || (
|
|
402
|
-
o(
|
|
400
|
+
[r, e, s].forEach((c) => {
|
|
401
|
+
c && c.addEventListener("scroll", () => {
|
|
402
|
+
t(this, lt) || (y(this, lt, !0), requestAnimationFrame(() => {
|
|
403
|
+
o(c.scrollTop, c.scrollLeft), y(this, lt, !1);
|
|
403
404
|
}));
|
|
404
405
|
});
|
|
405
406
|
});
|
|
406
407
|
}
|
|
407
408
|
}, "initialize"));
|
|
408
|
-
d(this,
|
|
409
|
-
d(this, zt, /* @__PURE__ */ h((r, e) => {
|
|
409
|
+
d(this, Bt, /* @__PURE__ */ h((r, e) => {
|
|
410
410
|
H.log("rowManager.#renderRows");
|
|
411
|
-
const s = t(this,
|
|
411
|
+
const s = t(this, P).get(e);
|
|
412
412
|
if (!s || s.length === 0) return;
|
|
413
413
|
const i = r.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
414
414
|
if (!i) return;
|
|
415
415
|
i.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
|
|
416
416
|
const n = i.querySelector("tr.nodata"), a = document.createDocumentFragment();
|
|
417
417
|
for (let o = 0; o < t(this, St); o++)
|
|
418
|
-
s.forEach((
|
|
419
|
-
a.appendChild(
|
|
418
|
+
s.forEach((c) => {
|
|
419
|
+
a.appendChild(c.cloneNode(!0));
|
|
420
420
|
});
|
|
421
|
-
n ? n.before(a) : i.appendChild(a), e === ".ng-container-body" && (
|
|
421
|
+
n ? n.before(a) : i.appendChild(a), e === ".ng-container-body" && (t(this, Q).firstTr = i.querySelector("tr:not(.nodata)"));
|
|
422
422
|
}, "#renderRows"));
|
|
423
|
-
d(this,
|
|
424
|
-
if (H.log("rowManager.#measureAndCacheHeight"), t(this,
|
|
425
|
-
return t(this,
|
|
423
|
+
d(this, zt, /* @__PURE__ */ h((r) => {
|
|
424
|
+
if (H.log("rowManager.#measureAndCacheHeight"), t(this, M) !== null && t(this, M) > 0)
|
|
425
|
+
return t(this, M);
|
|
426
426
|
H.log("#measureAndCacheHeight");
|
|
427
|
-
const e = t(this,
|
|
427
|
+
const e = t(this, P).get(".ng-container-body");
|
|
428
428
|
if (!e || e.length === 0) return 24;
|
|
429
429
|
const s = r.querySelector("tbody.bindable-tbody");
|
|
430
430
|
if (!s) return 24;
|
|
@@ -433,17 +433,17 @@ const _e = class _e {
|
|
|
433
433
|
e.forEach((g) => {
|
|
434
434
|
n.appendChild(g.cloneNode(!0));
|
|
435
435
|
}), i ? i.before(n) : s.appendChild(n);
|
|
436
|
-
const a = t(this, S), o = a.style.display,
|
|
436
|
+
const a = t(this, S), o = a.style.display, c = a.style.visibility, l = a.style.position;
|
|
437
437
|
(o === "none" || window.getComputedStyle(a).display === "none") && (a.style.display = "block", a.style.visibility = "hidden", a.style.position = "absolute");
|
|
438
438
|
let f = 0;
|
|
439
439
|
const u = s.querySelectorAll("tr:not(.nodata)");
|
|
440
440
|
return u.forEach((g) => {
|
|
441
441
|
f += g.offsetHeight || g.getBoundingClientRect().height;
|
|
442
|
-
}), u.forEach((g) => g.remove()), a.style.display = o, a.style.visibility =
|
|
442
|
+
}), u.forEach((g) => g.remove()), a.style.display = o, a.style.visibility = c, a.style.position = l, y(this, M, f > 0 ? f : 24), t(this, At).call(this), t(this, M);
|
|
443
443
|
}, "#measureAndCacheHeight"));
|
|
444
|
-
d(this,
|
|
444
|
+
d(this, Et, /* @__PURE__ */ h(() => {
|
|
445
445
|
H.log("rowManager.#updateVirtualScrollHeight");
|
|
446
|
-
const e = (t(this,
|
|
446
|
+
const e = (t(this, D).data.get() || []).length, s = t(this, M), i = e * s;
|
|
447
447
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
|
|
448
448
|
const a = t(this, S).querySelector(n);
|
|
449
449
|
if (!a) return;
|
|
@@ -451,41 +451,41 @@ const _e = class _e {
|
|
|
451
451
|
o && (o.style.height = `${i}px`);
|
|
452
452
|
});
|
|
453
453
|
}, "#updateVirtualScrollHeight"));
|
|
454
|
-
d(this,
|
|
455
|
-
if (t(this, tt) > 0 && t(this,
|
|
456
|
-
const r = Math.ceil(t(this, tt) / t(this,
|
|
457
|
-
|
|
454
|
+
d(this, At, /* @__PURE__ */ h(() => {
|
|
455
|
+
if (t(this, tt) > 0 && t(this, M) > 0) {
|
|
456
|
+
const r = Math.ceil(t(this, tt) / t(this, M));
|
|
457
|
+
y(this, St, r + t(this, Ot));
|
|
458
458
|
}
|
|
459
459
|
}, "#updateRowCount"));
|
|
460
460
|
d(this, Pt, /* @__PURE__ */ h(() => {
|
|
461
|
-
var o,
|
|
461
|
+
var o, c, l, f, u, g;
|
|
462
462
|
const r = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
|
|
463
463
|
if (e) {
|
|
464
|
-
const
|
|
465
|
-
for (let
|
|
466
|
-
const
|
|
467
|
-
((o =
|
|
468
|
-
((
|
|
469
|
-
((
|
|
470
|
-
],
|
|
471
|
-
|
|
464
|
+
const b = r ? Array.from(r.querySelectorAll("tbody tr")) : [], x = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(b.length, x.length, v.length);
|
|
465
|
+
for (let m = 0; m < A; m++) {
|
|
466
|
+
const W = [
|
|
467
|
+
((o = b[m]) == null ? void 0 : o.getBoundingClientRect().height) || 0,
|
|
468
|
+
((c = x[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
|
|
469
|
+
((l = v[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
|
|
470
|
+
], C = Math.max(...W);
|
|
471
|
+
C > 0 && (b[m] && (b[m].style.height = `${C}px`), x[m] && (x[m].style.height = `${C}px`), v[m] && (v[m].style.height = `${C}px`));
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
const i = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), a = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
|
|
475
475
|
if (n) {
|
|
476
|
-
const
|
|
477
|
-
for (let
|
|
478
|
-
const
|
|
479
|
-
((f =
|
|
480
|
-
((u = m
|
|
481
|
-
((g = v[
|
|
482
|
-
],
|
|
483
|
-
|
|
476
|
+
const b = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], x = Array.from(n.querySelectorAll("tfoot tr")), v = a ? Array.from(a.querySelectorAll("tfoot tr")) : [], A = Math.max(b.length, x.length, v.length);
|
|
477
|
+
for (let m = 0; m < A; m++) {
|
|
478
|
+
const W = [
|
|
479
|
+
((f = b[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
|
|
480
|
+
((u = x[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
|
|
481
|
+
((g = v[m]) == null ? void 0 : g.getBoundingClientRect().height) || 0
|
|
482
|
+
], C = Math.max(...W);
|
|
483
|
+
C > 0 && (b[m] && (b[m].style.height = `${C}px`), x[m] && (x[m].style.height = `${C}px`), v[m] && (v[m].style.height = `${C}px`));
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
}, "#syncRowHeights"));
|
|
487
|
-
d(this,
|
|
488
|
-
!t(this, S) || !(t(this, S) instanceof HTMLElement) || (
|
|
487
|
+
d(this, Dt, /* @__PURE__ */ h(() => {
|
|
488
|
+
!t(this, S) || !(t(this, S) instanceof HTMLElement) || (y(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;
|
|
@@ -494,59 +494,57 @@ const _e = class _e {
|
|
|
494
494
|
let n = 0;
|
|
495
495
|
const a = s.querySelector(".ng-part-header"), o = s.querySelector(".ng-part-footer");
|
|
496
496
|
a && (n += a.offsetHeight), o && (n += o.offsetHeight);
|
|
497
|
-
const
|
|
498
|
-
t(this, tt) !==
|
|
497
|
+
const c = Math.max(i - n, 100);
|
|
498
|
+
t(this, tt) !== c && (y(this, tt, c), t(this, At).call(this), t(this, M) !== null && (t(this, Rt).call(this), this.refresh()));
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
-
})), t(this,
|
|
501
|
+
})), t(this, V).observe(t(this, S)));
|
|
502
502
|
}, "#initResizeObserver"));
|
|
503
503
|
d(this, Rt, /* @__PURE__ */ h(() => {
|
|
504
504
|
H.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
|
|
505
505
|
const e = t(this, S).querySelector(r);
|
|
506
|
-
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this,
|
|
507
|
-
}), t(this,
|
|
506
|
+
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Bt).call(this, e, r);
|
|
507
|
+
}), t(this, jt).call(this), t(this, Pt).call(this);
|
|
508
508
|
}, "#renderAllContainers"));
|
|
509
|
-
d(this,
|
|
509
|
+
d(this, Ae, /* @__PURE__ */ h((r) => {
|
|
510
510
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
|
|
511
|
-
var
|
|
511
|
+
var l;
|
|
512
512
|
const s = t(this, S).querySelector(e);
|
|
513
513
|
if (!s) return;
|
|
514
514
|
const i = s.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
515
515
|
if (!i) return;
|
|
516
|
-
const n = Array.from(i.querySelectorAll("tr:not(.nodata)")), a = ((
|
|
516
|
+
const n = Array.from(i.querySelectorAll("tr:not(.nodata)")), a = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, D).data.get() || []).length;
|
|
517
517
|
n.forEach((f, u) => {
|
|
518
518
|
const g = r + Math.floor(u / a);
|
|
519
|
-
if (g >=
|
|
519
|
+
if (g >= c) {
|
|
520
520
|
f.style.display = "none";
|
|
521
521
|
return;
|
|
522
522
|
}
|
|
523
|
-
const
|
|
524
|
-
f.style.display = "", t(this,
|
|
523
|
+
const b = t(this, D).data.get(g);
|
|
524
|
+
f.style.display = "", t(this, qt).call(this, f, b, g);
|
|
525
525
|
});
|
|
526
526
|
});
|
|
527
527
|
}, "#adjustBufferRows"));
|
|
528
528
|
d(this, ct, /* @__PURE__ */ h((r) => {
|
|
529
|
-
var
|
|
530
|
-
const e = t(this,
|
|
529
|
+
var l, f;
|
|
530
|
+
const e = t(this, M);
|
|
531
531
|
if (!e || e <= 0) return;
|
|
532
|
-
const s = t(this,
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
g
|
|
537
|
-
|
|
538
|
-
const
|
|
539
|
-
if (!
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
if (M >= s) {
|
|
545
|
-
E.style.display = "none";
|
|
532
|
+
const s = t(this, D).data.length, i = Math.max(0, Math.floor(r / e)), n = i * e, a = ((l = t(this, P).get(".ng-container-body")) == null ? void 0 : l.length) || 1, o = t(this, Q).firstTr, c = o && o.dataset.row !== void 0 ? parseInt(o.dataset.row, 10) : -1;
|
|
533
|
+
(f = t(this, Q)) == null || f.scrollTables.forEach((u) => {
|
|
534
|
+
u.style.transform = `translateY(${n}px)`;
|
|
535
|
+
}), c !== i && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
|
|
536
|
+
const g = t(this, S).querySelector(u);
|
|
537
|
+
if (!g) return;
|
|
538
|
+
const b = g.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
539
|
+
if (!b) return;
|
|
540
|
+
Array.from(b.querySelectorAll("tr:not(.nodata)")).forEach((v, A) => {
|
|
541
|
+
const m = i + Math.floor(A / a);
|
|
542
|
+
if (m >= s) {
|
|
543
|
+
v.style.display = "none";
|
|
546
544
|
return;
|
|
547
545
|
}
|
|
548
|
-
const
|
|
549
|
-
|
|
546
|
+
const W = t(this, D).data.get(m);
|
|
547
|
+
v.style.display = "", t(this, qt).call(this, v, W, m);
|
|
550
548
|
});
|
|
551
549
|
});
|
|
552
550
|
}, "#handleScroll"));
|
|
@@ -564,49 +562,49 @@ const _e = class _e {
|
|
|
564
562
|
cell.dataset.row = dataIndex;
|
|
565
563
|
});
|
|
566
564
|
}; */
|
|
567
|
-
d(this,
|
|
565
|
+
d(this, qt, /* @__PURE__ */ h((r, e, s) => {
|
|
568
566
|
r.dataset.row = s, r.data = e, Array.from(r.cells).forEach((i, n) => {
|
|
569
567
|
i.dataset.row = s;
|
|
570
568
|
const a = Array.from(i.children).find((o) => o.tagName.toLowerCase().startsWith("cell-") || typeof o.refresh == "function");
|
|
571
569
|
a && typeof a.refresh == "function" && a.refresh();
|
|
572
570
|
});
|
|
573
571
|
}, "#bindRowData"));
|
|
574
|
-
d(this,
|
|
575
|
-
var
|
|
572
|
+
d(this, jt, /* @__PURE__ */ h(() => {
|
|
573
|
+
var c, l, f;
|
|
576
574
|
H.log("rowManager.#syncHeaderHeights");
|
|
577
575
|
const r = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), s = t(this, S).querySelector(".ng-container-right .ng-part-header table");
|
|
578
576
|
if (!e) return;
|
|
579
577
|
const i = r ? Array.from(r.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), a = s ? Array.from(s.querySelectorAll("tr")) : [], o = Math.max(i.length, n.length, a.length);
|
|
580
578
|
for (let u = 0; u < o; u++) {
|
|
581
579
|
const g = [
|
|
582
|
-
((
|
|
583
|
-
((
|
|
580
|
+
((c = i[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
|
|
581
|
+
((l = n[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
|
|
584
582
|
((f = a[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
|
|
585
|
-
],
|
|
586
|
-
|
|
583
|
+
], b = Math.max(...g);
|
|
584
|
+
b > 0 && (i[u] && (i[u].style.height = `${b}px`), n[u] && (n[u].style.height = `${b}px`), a[u] && (a[u].style.height = `${b}px`));
|
|
587
585
|
}
|
|
588
586
|
}, "#syncHeaderHeights"));
|
|
589
|
-
|
|
590
|
-
t(this,
|
|
587
|
+
E(this, "destroy", /* @__PURE__ */ h(() => {
|
|
588
|
+
t(this, V) && (t(this, V).disconnect(), y(this, V, null));
|
|
591
589
|
}, "destroy"));
|
|
592
|
-
|
|
590
|
+
y(this, D, r.getRootNode().host), y(this, S, r), t(this, Dt).call(this);
|
|
593
591
|
}
|
|
594
592
|
getRowHeight() {
|
|
595
|
-
return t(this,
|
|
593
|
+
return t(this, M);
|
|
596
594
|
}
|
|
597
595
|
templateLength(r = ".ng-container-body") {
|
|
598
596
|
var e;
|
|
599
|
-
return ((e = t(this,
|
|
597
|
+
return ((e = t(this, P).get(r)) == null ? void 0 : e.length) || 1;
|
|
600
598
|
}
|
|
601
599
|
};
|
|
602
|
-
|
|
603
|
-
let
|
|
604
|
-
const
|
|
600
|
+
D = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), P = new WeakMap(), M = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), St = new WeakMap(), Ee = new WeakMap(), lt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), zt = new WeakMap(), Et = new WeakMap(), At = new WeakMap(), Pt = new WeakMap(), Dt = new WeakMap(), Rt = new WeakMap(), Ae = new WeakMap(), ct = new WeakMap(), qt = new WeakMap(), jt = new WeakMap(), h(Ie, "RowManager");
|
|
601
|
+
let he = Ie;
|
|
602
|
+
const Ft = class Ft {
|
|
605
603
|
/**
|
|
606
604
|
* 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
|
|
607
605
|
*/
|
|
608
606
|
static compileAll(r) {
|
|
609
|
-
return Array.isArray(r) ? r.map((e) =>
|
|
607
|
+
return Array.isArray(r) ? r.map((e) => Ft.compile(e)) : [];
|
|
610
608
|
}
|
|
611
609
|
/**
|
|
612
610
|
* 🎯 단일 원본 테이블을 받아 기본 구조 보정 및 2차원 격자 인덱스 사전 부여 완료된 마스터 테이블 반환
|
|
@@ -614,83 +612,83 @@ const Vt = class Vt {
|
|
|
614
612
|
static compile(r) {
|
|
615
613
|
if (!r) return null;
|
|
616
614
|
const e = /* @__PURE__ */ h((o) => {
|
|
617
|
-
o.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((
|
|
618
|
-
const f =
|
|
619
|
-
if (
|
|
615
|
+
o.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
|
|
616
|
+
const f = l.getAttribute("cell-type") || "renderer";
|
|
617
|
+
if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
|
|
620
618
|
let u = `cell-${f}`;
|
|
621
|
-
const g =
|
|
622
|
-
let
|
|
623
|
-
g &&
|
|
619
|
+
const g = l.getAttribute("data-bind"), b = l.getAttribute("data-expr"), x = l.getAttribute("maxbyte"), v = l.getAttribute("type");
|
|
620
|
+
let A = [];
|
|
621
|
+
g && A.push(`data-bind="${g}"`), b && A.push(`data-expr="${b}"`), x && A.push(`maxbyte="${x}"`), v && A.push(`type="${v}"`), l.innerHTML = `<${u} ${A.join(" ")}></${u}>`;
|
|
624
622
|
});
|
|
625
623
|
}, "processCellTypes"), s = /* @__PURE__ */ h((o) => {
|
|
626
624
|
if (!o.querySelector("colgroup")) {
|
|
627
|
-
const
|
|
628
|
-
for (let g = 0; g <
|
|
629
|
-
const
|
|
630
|
-
|
|
625
|
+
const c = o.querySelector("tbody tr") || o.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(o.clientWidth / l), 100);
|
|
626
|
+
for (let g = 0; g < l; g++) {
|
|
627
|
+
const b = document.createElement("col");
|
|
628
|
+
b.setAttribute("width", u), f.appendChild(b);
|
|
631
629
|
}
|
|
632
630
|
o.prepend(f);
|
|
633
631
|
}
|
|
634
632
|
if (!o.querySelector("thead")) {
|
|
635
|
-
const
|
|
636
|
-
|
|
633
|
+
const c = document.createElement("thead"), l = o.querySelector("colgroup");
|
|
634
|
+
l ? l.after(c) : o.prepend(c);
|
|
637
635
|
}
|
|
638
636
|
o.classList.add("nine-table-element"), o.style.display = "table";
|
|
639
|
-
}, "ensureTableStructure"), i = /* @__PURE__ */ h((o,
|
|
640
|
-
const
|
|
637
|
+
}, "ensureTableStructure"), i = /* @__PURE__ */ h((o, c) => {
|
|
638
|
+
const l = Array.from(o.querySelectorAll(c + " tr")), f = Array.from(o.querySelectorAll(c + " th," + c + " td")), u = l.length;
|
|
641
639
|
if (u === 0 || f.length === 0) return;
|
|
642
640
|
let g = 0;
|
|
643
|
-
f.forEach((
|
|
644
|
-
g +=
|
|
641
|
+
f.forEach((x) => {
|
|
642
|
+
g += x.colSpan || 1;
|
|
645
643
|
});
|
|
646
|
-
const
|
|
647
|
-
|
|
648
|
-
const v =
|
|
649
|
-
let
|
|
650
|
-
Array.from(
|
|
651
|
-
for (let B = 0; B <
|
|
652
|
-
if (
|
|
653
|
-
|
|
644
|
+
const b = Array.from(Array(u), () => Array(g).fill(null));
|
|
645
|
+
l.forEach((x) => {
|
|
646
|
+
const v = x.sectionRowIndex;
|
|
647
|
+
let A = 0;
|
|
648
|
+
Array.from(x.querySelectorAll("th,td")).forEach((m) => {
|
|
649
|
+
for (let B = 0; B < b[v].length; B++)
|
|
650
|
+
if (b[v][B] === null) {
|
|
651
|
+
A = B;
|
|
654
652
|
break;
|
|
655
653
|
}
|
|
656
|
-
const
|
|
657
|
-
for (let B = 0; B <
|
|
658
|
-
for (let pt = 0; pt <
|
|
659
|
-
v + B < u &&
|
|
654
|
+
const W = m.rowSpan || 1, C = m.colSpan || 1;
|
|
655
|
+
for (let B = 0; B < W; B++)
|
|
656
|
+
for (let pt = 0; pt < C; pt++)
|
|
657
|
+
v + B < u && A + pt < g && (b[v + B][A + pt] = B === 0 && pt === 0 ? "1" : "0");
|
|
660
658
|
});
|
|
661
|
-
}),
|
|
662
|
-
const v =
|
|
663
|
-
Array.from(
|
|
664
|
-
for (let
|
|
665
|
-
if (
|
|
666
|
-
|
|
659
|
+
}), l.forEach((x) => {
|
|
660
|
+
const v = x.sectionRowIndex;
|
|
661
|
+
Array.from(x.querySelectorAll("th,td")).forEach((A) => {
|
|
662
|
+
for (let m = 0; m < b[v].length; m++)
|
|
663
|
+
if (b[v][m] === "1") {
|
|
664
|
+
A.dataset.col = m, b[v][m] = "0";
|
|
667
665
|
break;
|
|
668
666
|
}
|
|
669
667
|
});
|
|
670
668
|
});
|
|
671
669
|
}, "resetColIndex"), n = r.cloneNode(!0);
|
|
672
|
-
return s(n), e(n), i(n, "thead"), i(n, "tbody"), i(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((o,
|
|
673
|
-
const
|
|
674
|
-
|
|
675
|
-
f.setAttribute("fixed",
|
|
670
|
+
return s(n), e(n), i(n, "thead"), i(n, "tbody"), i(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((o, c) => {
|
|
671
|
+
const l = o.getAttribute("fixed");
|
|
672
|
+
l && n.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
|
|
673
|
+
f.setAttribute("fixed", l);
|
|
676
674
|
});
|
|
677
675
|
}), n;
|
|
678
676
|
}
|
|
679
677
|
// 🎯 [추가] td/th에 선언된 cell-type 속성을 읽어 커스텀 태그로 자동 감싸기
|
|
680
678
|
};
|
|
681
|
-
h(
|
|
682
|
-
let
|
|
683
|
-
var
|
|
679
|
+
h(Ft, "TableCompiler");
|
|
680
|
+
let de = Ft;
|
|
681
|
+
var Vt, et, st, Yt, Ut, ht, Xt, Kt;
|
|
684
682
|
const mt = class mt extends HTMLElement {
|
|
685
683
|
constructor() {
|
|
686
684
|
super();
|
|
687
|
-
d(this,
|
|
685
|
+
d(this, Vt);
|
|
688
686
|
d(this, et, null);
|
|
689
687
|
d(this, st);
|
|
690
|
-
|
|
688
|
+
E(this, "invalidate", /* @__PURE__ */ h(() => {
|
|
691
689
|
t(this, st).refresh();
|
|
692
690
|
}, "invalidate"));
|
|
693
|
-
d(this,
|
|
691
|
+
d(this, Yt, /* @__PURE__ */ h(() => {
|
|
694
692
|
[
|
|
695
693
|
{ selector: ".ng-container-body", type: null },
|
|
696
694
|
{ selector: ".ng-container-left", type: "left" },
|
|
@@ -703,15 +701,15 @@ const mt = class mt extends HTMLElement {
|
|
|
703
701
|
a.className = "ng-part-header", a.appendChild(t(this, ht).call(this, t(this, et), i, "header"));
|
|
704
702
|
const o = document.createElement("div");
|
|
705
703
|
o.className = "ng-part-body";
|
|
706
|
-
const l = document.createElement("div");
|
|
707
|
-
l.className = "ng-scroll-content", l.style.position = "relative", l.style.width = "100%", l.appendChild(t(this, ht).call(this, t(this, et), i, "body"));
|
|
708
704
|
const c = document.createElement("div");
|
|
709
|
-
c.className = "ng-
|
|
705
|
+
c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ht).call(this, t(this, et), i, "body"));
|
|
706
|
+
const l = document.createElement("div");
|
|
707
|
+
l.className = "ng-virtual-spacer", l.style.width = "100%", l.style.pointerEvents = "none", c.appendChild(l), o.appendChild(c);
|
|
710
708
|
const f = document.createElement("div");
|
|
711
709
|
f.className = "ng-part-footer", f.appendChild(t(this, ht).call(this, t(this, et), i, "footer")), n.appendChild(a), n.appendChild(o), n.appendChild(f);
|
|
712
710
|
});
|
|
713
711
|
}, "#renderSplitContainers"));
|
|
714
|
-
d(this,
|
|
712
|
+
d(this, Ut, /* @__PURE__ */ h(() => {
|
|
715
713
|
["left", "right", "body"].forEach((e) => {
|
|
716
714
|
const s = this.querySelector(`.ng-container-${e}`), i = s == null ? void 0 : s.querySelectorAll("table");
|
|
717
715
|
if (!s || !i || i.length === 0) return;
|
|
@@ -722,41 +720,41 @@ const mt = class mt extends HTMLElement {
|
|
|
722
720
|
}), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${n}px`, s.style.width = `${n}px`);
|
|
723
721
|
});
|
|
724
722
|
}, "#updateContainerWidths"));
|
|
725
|
-
|
|
726
|
-
e && (
|
|
723
|
+
E(this, "generate", /* @__PURE__ */ h((e) => {
|
|
724
|
+
e && (y(this, et, de.compile(e)), t(this, Yt).call(this), t(this, Ut).call(this), t(this, st).initialize(), setTimeout(() => {
|
|
727
725
|
var s;
|
|
728
726
|
(s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
|
|
729
727
|
}, 0));
|
|
730
728
|
}, "generate"));
|
|
731
729
|
d(this, ht, /* @__PURE__ */ h((e, s, i) => {
|
|
732
|
-
const n = e.cloneNode(!0), a = n.querySelector("thead"), o = n.querySelector("tbody"),
|
|
730
|
+
const n = e.cloneNode(!0), a = n.querySelector("thead"), o = n.querySelector("tbody"), c = n.querySelector("tfoot");
|
|
733
731
|
if (i === "header") {
|
|
734
|
-
if (o && o.remove(),
|
|
732
|
+
if (o && o.remove(), c && c.remove(), e.querySelector("tbody")) {
|
|
735
733
|
const f = document.createElement("tbody");
|
|
736
734
|
f.className = "fixed-tbody", n.appendChild(f);
|
|
737
735
|
}
|
|
738
|
-
} else i === "body" ? (a && a.remove(),
|
|
739
|
-
return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((
|
|
740
|
-
|
|
741
|
-
}) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((
|
|
742
|
-
|
|
743
|
-
}) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((
|
|
744
|
-
|
|
736
|
+
} else i === "body" ? (a && a.remove(), c && c.remove(), o && (o.className = "bindable-tbody")) : i === "footer" && (a && a.remove(), o && o.remove());
|
|
737
|
+
return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
|
|
738
|
+
l.getAttribute("fixed") !== "left" && l.remove();
|
|
739
|
+
}) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
|
|
740
|
+
l.getAttribute("fixed") !== "right" && l.remove();
|
|
741
|
+
}) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
|
|
742
|
+
l.remove();
|
|
745
743
|
}), n;
|
|
746
744
|
}, "#createSplitTable"));
|
|
747
|
-
|
|
748
|
-
|
|
745
|
+
E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, st).getRowHeight(), "getRowHeight"));
|
|
746
|
+
E(this, "scrollToX", /* @__PURE__ */ h((e) => {
|
|
749
747
|
const s = this.querySelector(".ng-container-body .ng-part-body");
|
|
750
748
|
s && (s.scrollLeft = e);
|
|
751
749
|
}, "scrollToX"));
|
|
752
|
-
|
|
750
|
+
E(this, "scrollToY", /* @__PURE__ */ h((e) => {
|
|
753
751
|
const s = this.querySelector(".ng-container-body .ng-part-body");
|
|
754
752
|
s && (s.scrollTop = e);
|
|
755
753
|
}, "scrollToY"));
|
|
756
|
-
d(this,
|
|
757
|
-
t(this,
|
|
754
|
+
d(this, Xt, /* @__PURE__ */ h(() => {
|
|
755
|
+
t(this, Kt).call(this);
|
|
758
756
|
}, "#init"));
|
|
759
|
-
d(this,
|
|
757
|
+
d(this, Kt, /* @__PURE__ */ h(() => {
|
|
760
758
|
const e = mt.SCROLLBAR_SIZE;
|
|
761
759
|
this.innerHTML = `
|
|
762
760
|
<style>
|
|
@@ -859,6 +857,8 @@ const mt = class mt extends HTMLElement {
|
|
|
859
857
|
border-collapse: collapse;
|
|
860
858
|
width: 100%;
|
|
861
859
|
table-layout: fixed;
|
|
860
|
+
will-change: transform; /* 🎯 GPU 레이어로 분리하여 렌더링 떨림 방지 */
|
|
861
|
+
transform: translateZ(0); /* 🎯 강제 하드웨어 가속 트리거 */
|
|
862
862
|
}
|
|
863
863
|
|
|
864
864
|
nine-table-sheet th, nine-table-sheet td {
|
|
@@ -899,23 +899,23 @@ const mt = class mt extends HTMLElement {
|
|
|
899
899
|
</div>
|
|
900
900
|
`;
|
|
901
901
|
}, "#render"));
|
|
902
|
-
|
|
902
|
+
y(this, st, new he(this)), y(this, Vt, this.getRootNode().host);
|
|
903
903
|
}
|
|
904
904
|
connectedCallback() {
|
|
905
|
-
t(this,
|
|
905
|
+
t(this, Xt).call(this);
|
|
906
906
|
}
|
|
907
907
|
disconnectedCallback() {
|
|
908
908
|
this.innerHTML = "", H.log("NineTableSheet destroyed.");
|
|
909
909
|
}
|
|
910
910
|
};
|
|
911
|
-
|
|
912
|
-
let
|
|
913
|
-
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet",
|
|
914
|
-
var
|
|
915
|
-
const
|
|
911
|
+
Vt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Yt = new WeakMap(), Ut = new WeakMap(), ht = new WeakMap(), Xt = new WeakMap(), Kt = new WeakMap(), h(mt, "NineTableSheet"), E(mt, "SCROLLBAR_SIZE", 16);
|
|
912
|
+
let It = mt;
|
|
913
|
+
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", It);
|
|
914
|
+
var Zt, kt;
|
|
915
|
+
const _e = class _e extends HTMLElement {
|
|
916
916
|
constructor() {
|
|
917
917
|
super();
|
|
918
|
-
d(this,
|
|
918
|
+
d(this, Zt, /* @__PURE__ */ h(() => {
|
|
919
919
|
var e;
|
|
920
920
|
(e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
|
|
921
921
|
var a;
|
|
@@ -926,18 +926,18 @@ const Ne = class Ne extends HTMLElement {
|
|
|
926
926
|
d(this, kt, /* @__PURE__ */ h((e, s = !1) => {
|
|
927
927
|
const i = /* @__PURE__ */ h(() => {
|
|
928
928
|
const f = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
929
|
-
Array.from(this.querySelectorAll("nine-splitter")).forEach((
|
|
930
|
-
const g = f.filter((
|
|
931
|
-
g.length < 2 || g.forEach((
|
|
932
|
-
const
|
|
933
|
-
v &&
|
|
929
|
+
Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
|
|
930
|
+
const g = f.filter((b) => b.classList.contains("active"));
|
|
931
|
+
g.length < 2 || g.forEach((b) => {
|
|
932
|
+
const x = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${x}"]`), A = f[x + 1];
|
|
933
|
+
v && A && A.classList.contains("active") && v.style.setProperty("display", "flex");
|
|
934
934
|
});
|
|
935
|
-
}, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), a = this.querySelector("nine-table-sheets-body"), o = n.querySelectorAll(".nine-tab-item"),
|
|
935
|
+
}, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), a = this.querySelector("nine-table-sheets-body"), o = n.querySelectorAll(".nine-tab-item"), c = a.querySelectorAll("nine-table-sheet");
|
|
936
936
|
if (!o[e]) return;
|
|
937
937
|
if (!s)
|
|
938
938
|
o.forEach((f, u) => {
|
|
939
939
|
f.classList.toggle("active", u === e);
|
|
940
|
-
}),
|
|
940
|
+
}), c.forEach((f, u) => {
|
|
941
941
|
const g = u === e;
|
|
942
942
|
f.classList.toggle("active", g), f.style.flex = g ? "1 1 100%" : "";
|
|
943
943
|
});
|
|
@@ -949,42 +949,42 @@ const Ne = class Ne extends HTMLElement {
|
|
|
949
949
|
const g = a.querySelector(`nine-table-sheet[data-index="${e}"]`);
|
|
950
950
|
g && (g.classList.toggle("active"), g.classList.contains("active") || (g.style.flex = ""));
|
|
951
951
|
}
|
|
952
|
-
const
|
|
953
|
-
|
|
954
|
-
f.style.flex =
|
|
952
|
+
const l = a.querySelectorAll("nine-table-sheet.active");
|
|
953
|
+
l == null || l.forEach((f) => {
|
|
954
|
+
f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
|
|
955
955
|
}), i();
|
|
956
956
|
}, "#switchSheet"));
|
|
957
957
|
}
|
|
958
958
|
connectedCallback() {
|
|
959
|
-
t(this,
|
|
959
|
+
t(this, Zt).call(this);
|
|
960
960
|
}
|
|
961
961
|
};
|
|
962
|
-
|
|
963
|
-
let
|
|
964
|
-
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets",
|
|
965
|
-
var
|
|
966
|
-
const
|
|
962
|
+
Zt = new WeakMap(), kt = new WeakMap(), h(_e, "NineTableSheets");
|
|
963
|
+
let fe = _e;
|
|
964
|
+
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", fe);
|
|
965
|
+
var I, Gt, Tt, Jt;
|
|
966
|
+
const Ne = class Ne {
|
|
967
967
|
constructor(r) {
|
|
968
|
-
d(this,
|
|
969
|
-
d(this,
|
|
970
|
-
t(this,
|
|
968
|
+
d(this, I);
|
|
969
|
+
d(this, Gt, /* @__PURE__ */ h(() => {
|
|
970
|
+
t(this, Jt).call(this), new ResizeObserver((r) => {
|
|
971
971
|
for (let e of r)
|
|
972
|
-
t(this,
|
|
973
|
-
}).observe(t(this,
|
|
972
|
+
t(this, I).getAttribute("auto-height") === "true" && t(this, Tt).call(this);
|
|
973
|
+
}).observe(t(this, I));
|
|
974
974
|
}, "#init"));
|
|
975
|
-
d(this,
|
|
976
|
-
var
|
|
977
|
-
const r = Array.from(t(this,
|
|
975
|
+
d(this, Tt, /* @__PURE__ */ h(() => {
|
|
976
|
+
var c, l;
|
|
977
|
+
const r = Array.from(t(this, I).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
978
978
|
if (r.length === 0) return;
|
|
979
|
-
const e = parseInt(t(this,
|
|
980
|
-
t(this,
|
|
979
|
+
const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10, s = Math.max(...r.map((f) => f.getRowHeight())), i = (c = t(this, I).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, I).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, a = It.SCROLLBAR_SIZE, o = e * s + i + n + a;
|
|
980
|
+
t(this, I).style.height = `${o}px`;
|
|
981
981
|
}, "#applyAutoHeight"));
|
|
982
|
-
d(this,
|
|
983
|
-
const e = Array.from(t(this,
|
|
984
|
-
const u = `<nine-table-sheet class="${
|
|
982
|
+
d(this, Jt, /* @__PURE__ */ h(() => {
|
|
983
|
+
const e = Array.from(t(this, I).children).filter((c) => c.tagName === "TABLE"), s = t(this, I).getAttribute("auto-height") === "true", i = e.length, n = e.map((c, l) => {
|
|
984
|
+
const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, g = l < i - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
|
|
985
985
|
return u + g;
|
|
986
|
-
}).join(""), a = e.map((
|
|
987
|
-
t(this,
|
|
986
|
+
}).join(""), a = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
|
|
987
|
+
t(this, I).shadowRoot.innerHTML = `
|
|
988
988
|
<style>
|
|
989
989
|
:host {
|
|
990
990
|
display: flex;
|
|
@@ -1075,96 +1075,96 @@ const We = class We {
|
|
|
1075
1075
|
</nine-table-body>
|
|
1076
1076
|
<nine-table-footer></nine-table-footer>
|
|
1077
1077
|
`;
|
|
1078
|
-
const o = t(this,
|
|
1079
|
-
o == null || o.forEach((
|
|
1080
|
-
e[
|
|
1081
|
-
|
|
1078
|
+
const o = t(this, I).shadowRoot.querySelectorAll("nine-table-sheet");
|
|
1079
|
+
o == null || o.forEach((c, l) => {
|
|
1080
|
+
e[l] && setTimeout(() => {
|
|
1081
|
+
c.generate(e[l]), s && t(this, Tt).call(this);
|
|
1082
1082
|
});
|
|
1083
1083
|
});
|
|
1084
1084
|
}, "#render"));
|
|
1085
|
-
|
|
1085
|
+
y(this, I, r), t(this, Gt).call(this);
|
|
1086
1086
|
}
|
|
1087
1087
|
};
|
|
1088
|
-
|
|
1089
|
-
let
|
|
1090
|
-
var
|
|
1091
|
-
const
|
|
1088
|
+
I = new WeakMap(), Gt = new WeakMap(), Tt = new WeakMap(), Jt = new WeakMap(), h(Ne, "LayoutManager");
|
|
1089
|
+
let ue = Ne;
|
|
1090
|
+
var Ct, dt;
|
|
1091
|
+
const We = class We {
|
|
1092
1092
|
constructor(r) {
|
|
1093
|
-
d(this,
|
|
1093
|
+
d(this, Ct);
|
|
1094
1094
|
d(this, dt, -1);
|
|
1095
|
-
|
|
1096
|
-
|
|
1095
|
+
E(this, "count", /* @__PURE__ */ h(() => t(this, Ct).rawRecords.length, "count"));
|
|
1096
|
+
y(this, Ct, r);
|
|
1097
1097
|
}
|
|
1098
1098
|
get at() {
|
|
1099
1099
|
return t(this, dt);
|
|
1100
1100
|
}
|
|
1101
1101
|
set at(r) {
|
|
1102
|
-
|
|
1102
|
+
y(this, dt, parseInt(r, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, dt)}"]`) && setTimeout(() => {
|
|
1103
1103
|
});
|
|
1104
1104
|
}
|
|
1105
1105
|
};
|
|
1106
|
-
|
|
1107
|
-
let
|
|
1108
|
-
var
|
|
1106
|
+
Ct = new WeakMap(), dt = new WeakMap(), h(We, "ngRow");
|
|
1107
|
+
let ge = We;
|
|
1108
|
+
var _, k, N, ft, Qt, Y, te, rt, Lt, ee, se, ut;
|
|
1109
1109
|
const O = class O {
|
|
1110
1110
|
constructor(r, e) {
|
|
1111
|
-
d(this,
|
|
1111
|
+
d(this, _);
|
|
1112
1112
|
d(this, k);
|
|
1113
|
-
d(this,
|
|
1113
|
+
d(this, N, []);
|
|
1114
1114
|
d(this, ft, []);
|
|
1115
|
-
d(this,
|
|
1116
|
-
d(this,
|
|
1117
|
-
d(this,
|
|
1118
|
-
|
|
1119
|
-
const r = t(this,
|
|
1115
|
+
d(this, Qt, 0);
|
|
1116
|
+
d(this, Y, []);
|
|
1117
|
+
d(this, te, /* @__PURE__ */ h(() => {
|
|
1118
|
+
y(this, Y, []);
|
|
1119
|
+
const r = t(this, _).template || [];
|
|
1120
1120
|
Array.from(r).forEach((e) => {
|
|
1121
1121
|
var s;
|
|
1122
|
-
t(this,
|
|
1122
|
+
t(this, Y).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
|
|
1123
1123
|
}), (t(this, k).rawRecords || []).forEach((e) => {
|
|
1124
|
-
e.__ng || (e.__ng = t(this,
|
|
1124
|
+
e.__ng || (e.__ng = t(this, Lt).call(this)), e.__ng.height = t(this, Y).slice();
|
|
1125
1125
|
});
|
|
1126
1126
|
}, "#initialize"));
|
|
1127
1127
|
d(this, rt, /* @__PURE__ */ h(() => {
|
|
1128
|
-
t(this,
|
|
1128
|
+
t(this, _).shadowRoot.querySelectorAll("nine-table-sheet").forEach((r) => {
|
|
1129
1129
|
r.invalidate();
|
|
1130
1130
|
});
|
|
1131
1131
|
}, "#invalidate"));
|
|
1132
|
-
|
|
1132
|
+
E(this, "get", /* @__PURE__ */ h((r, e) => {
|
|
1133
1133
|
var n;
|
|
1134
1134
|
const s = this.getValidData();
|
|
1135
1135
|
if (!s || s.length <= 0) return;
|
|
1136
1136
|
if (r == null) return t(this, ut).call(this, s);
|
|
1137
1137
|
if (r < 0 || r >= s.length) return null;
|
|
1138
|
-
const i = typeof ((n = t(this,
|
|
1138
|
+
const i = typeof ((n = t(this, _).fields) == null ? void 0 : n.get) == "function" ? t(this, _).fields.get() : [];
|
|
1139
1139
|
if (e != null) {
|
|
1140
1140
|
const a = i.indexOf(e);
|
|
1141
1141
|
return a >= 0 ? s[r].v[a] : null;
|
|
1142
1142
|
}
|
|
1143
1143
|
return t(this, ut).call(this, s[r]);
|
|
1144
1144
|
}, "get"));
|
|
1145
|
-
|
|
1145
|
+
E(this, "set", /* @__PURE__ */ h((r) => {
|
|
1146
1146
|
this.clear(), this.add(r, !1), t(this, rt).call(this);
|
|
1147
1147
|
}, "set"));
|
|
1148
|
-
d(this,
|
|
1148
|
+
d(this, Lt, /* @__PURE__ */ h(() => ({
|
|
1149
1149
|
rowState: O.ROW_STATE.EMPTY,
|
|
1150
1150
|
deleted: !1,
|
|
1151
1151
|
filtered: !1,
|
|
1152
|
-
height: t(this,
|
|
1152
|
+
height: t(this, Y).slice(),
|
|
1153
1153
|
o: {},
|
|
1154
1154
|
c: {},
|
|
1155
|
-
_: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this,
|
|
1155
|
+
_: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
|
|
1156
1156
|
}), "#getDefaultMeta"));
|
|
1157
|
-
|
|
1158
|
-
|
|
1157
|
+
E(this, "reset", /* @__PURE__ */ h(() => {
|
|
1158
|
+
y(this, N, []), y(this, ft, []), t(this, rt).call(this);
|
|
1159
1159
|
}, "reset"));
|
|
1160
|
-
|
|
1160
|
+
E(this, "clear", /* @__PURE__ */ h(() => {
|
|
1161
1161
|
var r;
|
|
1162
|
-
t(this, k).rawRecords = [],
|
|
1162
|
+
t(this, k).rawRecords = [], y(this, N, []), y(this, ft, []), (r = t(this, k).viewRecords) != null && r.reset && t(this, k).viewRecords.reset();
|
|
1163
1163
|
}, "clear"));
|
|
1164
|
-
d(this,
|
|
1164
|
+
d(this, ee, /* @__PURE__ */ h((r) => {
|
|
1165
1165
|
var i;
|
|
1166
1166
|
Array.isArray(r) || (r = [r]);
|
|
1167
|
-
const e = typeof ((i = t(this,
|
|
1167
|
+
const e = typeof ((i = t(this, _).fields) == null ? void 0 : i.get) == "function" ? t(this, _).fields.get() : Object.keys(r[0] || {}), s = [];
|
|
1168
1168
|
return r.forEach((n) => {
|
|
1169
1169
|
const a = { v: [] };
|
|
1170
1170
|
e.forEach((o) => {
|
|
@@ -1172,61 +1172,61 @@ const O = class O {
|
|
|
1172
1172
|
}), s.push(a);
|
|
1173
1173
|
}), s;
|
|
1174
1174
|
}, "#json2Array"));
|
|
1175
|
-
d(this,
|
|
1176
|
-
e.__ng = t(this,
|
|
1175
|
+
d(this, se, /* @__PURE__ */ h((r) => (Array.isArray(r) || (r = [r]), r.forEach((e) => {
|
|
1176
|
+
e.__ng = t(this, Lt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = O.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
|
|
1177
1177
|
}), r), "#defaultInsert"));
|
|
1178
|
-
|
|
1178
|
+
E(this, "add", /* @__PURE__ */ h((r, e = !0) => {
|
|
1179
1179
|
r === void 0 && (r = {});
|
|
1180
|
-
const s = t(this,
|
|
1181
|
-
t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this,
|
|
1180
|
+
const s = t(this, ee).call(this, r);
|
|
1181
|
+
t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, se).call(this, s)), this.resetRecords();
|
|
1182
1182
|
const i = this.count() - 1;
|
|
1183
1183
|
return e || s.forEach((n, a) => {
|
|
1184
1184
|
const o = t(this, k).rawRecords[i - a];
|
|
1185
1185
|
o && (o.__ng.rowState = O.ROW_STATE.EMPTY);
|
|
1186
1186
|
}), t(this, rt).call(this), i;
|
|
1187
1187
|
}, "add"));
|
|
1188
|
-
|
|
1188
|
+
E(this, "delete", /* @__PURE__ */ h((r) => {
|
|
1189
1189
|
let e = [];
|
|
1190
1190
|
Array.isArray(r) ? e = r : typeof r > "u" ? e = [t(this, k).host.row.at] : e = [parseInt(r, 10)], e.sort((s, i) => i - s).forEach((s) => {
|
|
1191
|
-
if (t(this,
|
|
1192
|
-
const i = t(this,
|
|
1193
|
-
t(this,
|
|
1191
|
+
if (t(this, N)[s]) {
|
|
1192
|
+
const i = t(this, N)[s].__ng.rowid;
|
|
1193
|
+
t(this, N)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, k).rawRecords = t(this, k).rawRecords.filter((n) => n.__ng.rowid !== i) : t(this, k).rawRecords.forEach((n) => {
|
|
1194
1194
|
n.__ng.rowid === i && (n.__ng.deleted = !0, n.__ng.rowState = O.ROW_STATE.DELETE);
|
|
1195
1195
|
});
|
|
1196
1196
|
}
|
|
1197
1197
|
}), this.resetRecords(), t(this, rt).call(this);
|
|
1198
1198
|
}, "delete"));
|
|
1199
|
-
|
|
1200
|
-
var
|
|
1199
|
+
E(this, "setValue", /* @__PURE__ */ h((r, e, s) => {
|
|
1200
|
+
var c;
|
|
1201
1201
|
r = parseInt(r, 10);
|
|
1202
|
-
const n = (typeof ((
|
|
1202
|
+
const n = (typeof ((c = t(this, _).fields) == null ? void 0 : c.get) == "function" ? t(this, _).fields.get() : []).indexOf(e);
|
|
1203
1203
|
if (n < 0) return;
|
|
1204
1204
|
const a = this.getValidData()[r];
|
|
1205
1205
|
if (!a) return;
|
|
1206
1206
|
const o = a.v[n];
|
|
1207
1207
|
o !== s && a.__ng.rowState !== O.ROW_STATE.INSERT && (a.__ng.o.hasOwnProperty(e) || (a.__ng.o[e] = o), a.__ng.rowState = O.ROW_STATE.UPDATE), a.v[n] = s;
|
|
1208
1208
|
}, "setValue"));
|
|
1209
|
-
|
|
1210
|
-
|
|
1209
|
+
E(this, "resetRecords", /* @__PURE__ */ h(() => {
|
|
1210
|
+
y(this, ft, t(this, k).rawRecords.filter((r) => !r.__ng.deleted)), y(this, N, t(this, k).rawRecords.filter((r) => !r.__ng.deleted && !r.__ng.filtered)), t(this, k).rawRecords.forEach((r, e) => {
|
|
1211
1211
|
r.__ng.rowidx = e;
|
|
1212
|
-
}), t(this,
|
|
1212
|
+
}), t(this, N).forEach((r, e) => {
|
|
1213
1213
|
r.__ng.i = e;
|
|
1214
1214
|
});
|
|
1215
1215
|
}, "resetRecords"));
|
|
1216
|
-
|
|
1216
|
+
E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, N).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, N)), "getValidData"));
|
|
1217
1217
|
d(this, ut, /* @__PURE__ */ h((r) => {
|
|
1218
1218
|
var a;
|
|
1219
1219
|
if (!r) return r;
|
|
1220
|
-
const e = !Array.isArray(r), s = e ? [r] : r, i = typeof ((a = t(this,
|
|
1221
|
-
const
|
|
1222
|
-
return i.forEach((
|
|
1223
|
-
l
|
|
1224
|
-
}),
|
|
1220
|
+
const e = !Array.isArray(r), s = e ? [r] : r, i = typeof ((a = t(this, _).fields) == null ? void 0 : a.get) == "function" ? t(this, _).fields.get() : [], n = s.filter((o) => !o.__ng.deleted).map((o) => {
|
|
1221
|
+
const c = {};
|
|
1222
|
+
return i.forEach((l, f) => {
|
|
1223
|
+
c[l] = o.v ? o.v[f] : o[l];
|
|
1224
|
+
}), c.__ng = o.__ng, c;
|
|
1225
1225
|
});
|
|
1226
1226
|
return e ? n[0] : n;
|
|
1227
1227
|
}, "#conv"));
|
|
1228
|
-
|
|
1229
|
-
|
|
1228
|
+
E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
|
|
1229
|
+
y(this, _, r), y(this, k, e), t(this, te).call(this);
|
|
1230
1230
|
}
|
|
1231
1231
|
get source() {
|
|
1232
1232
|
return t(this, ut).call(this, t(this, k).rawRecords);
|
|
@@ -1235,32 +1235,32 @@ const O = class O {
|
|
|
1235
1235
|
this.clear(), this.add(r, !1);
|
|
1236
1236
|
}
|
|
1237
1237
|
get nextId() {
|
|
1238
|
-
return ++
|
|
1238
|
+
return ++Ue(this, Qt)._;
|
|
1239
1239
|
}
|
|
1240
1240
|
get count() {
|
|
1241
|
-
return t(this,
|
|
1241
|
+
return t(this, N).length;
|
|
1242
1242
|
}
|
|
1243
1243
|
get length() {
|
|
1244
|
-
return t(this,
|
|
1244
|
+
return t(this, N).length;
|
|
1245
1245
|
}
|
|
1246
1246
|
getRowCount() {
|
|
1247
1247
|
return this.length;
|
|
1248
1248
|
}
|
|
1249
1249
|
};
|
|
1250
|
-
|
|
1251
|
-
|
|
1250
|
+
_ = new WeakMap(), k = new WeakMap(), N = new WeakMap(), ft = new WeakMap(), Qt = new WeakMap(), Y = new WeakMap(), te = new WeakMap(), rt = new WeakMap(), Lt = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), ut = new WeakMap(), h(O, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
|
|
1251
|
+
E(O, "ROW_STATE", {
|
|
1252
1252
|
EMPTY: "EMPTY",
|
|
1253
1253
|
NORMAL: "NORMAL",
|
|
1254
1254
|
INSERT: "INSERT",
|
|
1255
1255
|
UPDATE: "UPDATE",
|
|
1256
1256
|
DELETE: "DELETE"
|
|
1257
1257
|
});
|
|
1258
|
-
let
|
|
1258
|
+
let be = O;
|
|
1259
1259
|
var it;
|
|
1260
|
-
const
|
|
1260
|
+
const Oe = class Oe {
|
|
1261
1261
|
constructor(r) {
|
|
1262
1262
|
d(this, it);
|
|
1263
|
-
|
|
1263
|
+
y(this, it, r), this.row = new ge(this), this.data = new be(t(this, it), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
|
|
1264
1264
|
var e;
|
|
1265
1265
|
(e = t(this, it).view) != null && e.redraw && t(this, it).view.redraw();
|
|
1266
1266
|
}, this.setDataSource = (e) => {
|
|
@@ -1277,27 +1277,27 @@ const Be = class Be {
|
|
|
1277
1277
|
}, this.setDataSource([]);
|
|
1278
1278
|
}
|
|
1279
1279
|
};
|
|
1280
|
-
it = new WeakMap(), h(
|
|
1281
|
-
let
|
|
1282
|
-
var gt, L,
|
|
1283
|
-
const
|
|
1280
|
+
it = new WeakMap(), h(Oe, "ngDataManager");
|
|
1281
|
+
let ye = Oe;
|
|
1282
|
+
var gt, L, Ht, re;
|
|
1283
|
+
const Be = class Be {
|
|
1284
1284
|
// 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
|
|
1285
1285
|
constructor(r) {
|
|
1286
1286
|
d(this, gt);
|
|
1287
1287
|
d(this, L, []);
|
|
1288
|
-
|
|
1288
|
+
E(this, "add", /* @__PURE__ */ h((r, e = "string") => {
|
|
1289
1289
|
r.forEach((s) => {
|
|
1290
1290
|
t(this, L).some((i) => i.name === s) || t(this, L).push({ name: s, type: e });
|
|
1291
|
-
}), t(this,
|
|
1291
|
+
}), t(this, Ht).call(this);
|
|
1292
1292
|
}, "add"));
|
|
1293
|
-
d(this,
|
|
1293
|
+
d(this, Ht, /* @__PURE__ */ h(() => {
|
|
1294
1294
|
const r = /* @__PURE__ */ new Map();
|
|
1295
1295
|
t(this, L).forEach((e) => {
|
|
1296
1296
|
r.set(e.name, e.type);
|
|
1297
|
-
}),
|
|
1297
|
+
}), y(this, L, Array.from(r, ([e, s]) => ({ name: e, type: s }))), y(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);
|
|
1298
1298
|
}, "#adjust"));
|
|
1299
|
-
d(this,
|
|
1300
|
-
|
|
1299
|
+
d(this, re, /* @__PURE__ */ h(() => {
|
|
1300
|
+
y(this, L, []), H.log(t(this, gt).querySelectorAll("table"));
|
|
1301
1301
|
const r = Array.from(t(this, gt).querySelectorAll("table"));
|
|
1302
1302
|
if (!(!r || r.length === 0)) {
|
|
1303
1303
|
for (const e of r)
|
|
@@ -1318,17 +1318,17 @@ const ze = class ze {
|
|
|
1318
1318
|
}
|
|
1319
1319
|
a.split("data.").forEach((o) => {
|
|
1320
1320
|
if (o.trim() != "") {
|
|
1321
|
-
const
|
|
1322
|
-
let
|
|
1323
|
-
|
|
1321
|
+
const c = o.search(/[^_A-Za-z0-9]/g);
|
|
1322
|
+
let l = "";
|
|
1323
|
+
c >= 0 ? l = o.substring(0, c) : a.startsWith("data.") && (l = o.replace("data.", "")), l && t(this, L).push({ name: l, type: "string" });
|
|
1324
1324
|
}
|
|
1325
1325
|
});
|
|
1326
1326
|
});
|
|
1327
1327
|
});
|
|
1328
|
-
t(this,
|
|
1328
|
+
t(this, Ht).call(this);
|
|
1329
1329
|
}
|
|
1330
1330
|
}, "#init"));
|
|
1331
|
-
|
|
1331
|
+
y(this, gt, r), t(this, re).call(this);
|
|
1332
1332
|
}
|
|
1333
1333
|
// 🎯 기존에 필드 이름만 쓰던 곳들과의 호환을 위해 이름 배열만 리턴하는 메서드 유지
|
|
1334
1334
|
get() {
|
|
@@ -1350,22 +1350,22 @@ const ze = class ze {
|
|
|
1350
1350
|
return t(this, L).some((e) => e.name === r);
|
|
1351
1351
|
}
|
|
1352
1352
|
};
|
|
1353
|
-
gt = new WeakMap(), L = new WeakMap(),
|
|
1354
|
-
let
|
|
1355
|
-
var nt,
|
|
1356
|
-
const
|
|
1353
|
+
gt = new WeakMap(), L = new WeakMap(), Ht = new WeakMap(), re = new WeakMap(), h(Be, "ngFields");
|
|
1354
|
+
let pe = Be;
|
|
1355
|
+
var nt, ie, ne;
|
|
1356
|
+
const ze = class ze extends HTMLElement {
|
|
1357
1357
|
constructor() {
|
|
1358
1358
|
super();
|
|
1359
1359
|
//#created = false;
|
|
1360
1360
|
d(this, nt);
|
|
1361
|
-
d(this,
|
|
1362
|
-
d(this,
|
|
1363
|
-
this.fields = new
|
|
1361
|
+
d(this, ie);
|
|
1362
|
+
d(this, ne, /* @__PURE__ */ h(() => {
|
|
1363
|
+
this.fields = new pe(this), y(this, ie, new ue(this)), H.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
1364
1364
|
}, "#init"));
|
|
1365
|
-
this.attachShadow({ mode: "open" }),
|
|
1365
|
+
this.attachShadow({ mode: "open" }), y(this, nt, new ye(this));
|
|
1366
1366
|
}
|
|
1367
1367
|
connectedCallback() {
|
|
1368
|
-
t(this,
|
|
1368
|
+
t(this, ne).call(this);
|
|
1369
1369
|
}
|
|
1370
1370
|
disconnectedCallback() {
|
|
1371
1371
|
H.log("NineTable disconnected.");
|
|
@@ -1383,9 +1383,9 @@ const De = class De extends HTMLElement {
|
|
|
1383
1383
|
return t(this, nt);
|
|
1384
1384
|
}
|
|
1385
1385
|
};
|
|
1386
|
-
nt = new WeakMap(),
|
|
1387
|
-
let
|
|
1388
|
-
customElements.get("nine-table") || customElements.define("nine-table",
|
|
1386
|
+
nt = new WeakMap(), ie = new WeakMap(), ne = new WeakMap(), h(ze, "NineTable");
|
|
1387
|
+
let me = ze;
|
|
1388
|
+
customElements.get("nine-table") || customElements.define("nine-table", me);
|
|
1389
1389
|
const xt = class xt extends HTMLElement {
|
|
1390
1390
|
// 👈 커스텀 스타일용 캐시 추가
|
|
1391
1391
|
constructor() {
|
|
@@ -1397,20 +1397,20 @@ const xt = class xt extends HTMLElement {
|
|
|
1397
1397
|
connectedCallback() {
|
|
1398
1398
|
}
|
|
1399
1399
|
};
|
|
1400
|
-
h(xt, "BasicCellElement"),
|
|
1401
|
-
let
|
|
1402
|
-
var
|
|
1403
|
-
const Pe = class Pe extends
|
|
1400
|
+
h(xt, "BasicCellElement"), E(xt, "_styleCache", /* @__PURE__ */ new Map()), E(xt, "_customStyleCache", /* @__PURE__ */ new Map());
|
|
1401
|
+
let xe = xt;
|
|
1402
|
+
var T, Mt, p, Re, qe, ke, Te, Ce;
|
|
1403
|
+
const Pe = class Pe extends xe {
|
|
1404
1404
|
constructor() {
|
|
1405
1405
|
super();
|
|
1406
|
-
d(this,
|
|
1407
|
-
d(this,
|
|
1406
|
+
d(this, T);
|
|
1407
|
+
d(this, Mt);
|
|
1408
1408
|
d(this, p);
|
|
1409
1409
|
d(this, Re);
|
|
1410
|
-
d(this,
|
|
1410
|
+
d(this, qe);
|
|
1411
1411
|
d(this, ke);
|
|
1412
|
-
d(this,
|
|
1413
|
-
|
|
1412
|
+
d(this, Te);
|
|
1413
|
+
E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
|
|
1414
1414
|
if (t(this, p))
|
|
1415
1415
|
if (t(this, p).closest("tbody")) {
|
|
1416
1416
|
const s = t(this, p).closest("tr").data, i = parseInt(t(this, p).dataset.row);
|
|
@@ -1426,27 +1426,27 @@ const Pe = class Pe extends ve {
|
|
|
1426
1426
|
return ninegrid.nvl(e, "");
|
|
1427
1427
|
} else
|
|
1428
1428
|
try {
|
|
1429
|
-
return t(this,
|
|
1429
|
+
return t(this, T).exprFunction(t(this, p).dataset.expr).call(this, null, -1, t(this, T).data);
|
|
1430
1430
|
} catch {
|
|
1431
1431
|
}
|
|
1432
1432
|
}, "getDisplayText"));
|
|
1433
|
-
d(this,
|
|
1434
|
-
if (!(!t(this,
|
|
1433
|
+
d(this, Ce, /* @__PURE__ */ h(() => {
|
|
1434
|
+
if (!(!t(this, T) || !t(this, T).template || !t(this, p).closest("tbody.bindable"))) {
|
|
1435
1435
|
var e = ninegrid.j.querySelectorAll(t(this, p)).attr("suppress");
|
|
1436
1436
|
if (e && (e = parseInt(e)), e && !isNaN(e)) {
|
|
1437
1437
|
var s = t(this, p).closest("tr"), i = [];
|
|
1438
|
-
$("th,td", s).each((
|
|
1439
|
-
var
|
|
1440
|
-
|
|
1438
|
+
$("th,td", s).each((m, W) => {
|
|
1439
|
+
var C = ninegrid.j.querySelectorAll(W).attr("suppress");
|
|
1440
|
+
C && W.dataset.row && (C = parseInt(C), !isNaN(C) && C <= e && i.push(C));
|
|
1441
1441
|
}), i.sort();
|
|
1442
1442
|
var n = !1;
|
|
1443
|
-
if (parseInt(s.sectionRowIndex / t(this,
|
|
1443
|
+
if (parseInt(s.sectionRowIndex / t(this, T).template.length) > 0)
|
|
1444
1444
|
for (var a of i) {
|
|
1445
1445
|
if (a > e) break;
|
|
1446
|
-
var o = parseInt(t(this, p).dataset.row),
|
|
1446
|
+
var o = parseInt(t(this, p).dataset.row), c = o - 1, l = t(this, p).closest("tr").data, f = t(this, T).data.get(c);
|
|
1447
1447
|
t(this, p).dataset.matrixRow;
|
|
1448
|
-
var u = t(this,
|
|
1449
|
-
if (g !=
|
|
1448
|
+
var u = t(this, T).body.querySelector(`tbody.bindable [suppress="${a}"][data-matrix-row="${t(this, p).dataset.matrixRow}"]`), g = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, o) : l[u.dataset.bind], b = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, c) : f[u.dataset.bind];
|
|
1449
|
+
if (g != b) {
|
|
1450
1450
|
n = !0;
|
|
1451
1451
|
break;
|
|
1452
1452
|
}
|
|
@@ -1454,17 +1454,17 @@ const Pe = class Pe extends ve {
|
|
|
1454
1454
|
else
|
|
1455
1455
|
n = !0;
|
|
1456
1456
|
n ? ninegrid.j.querySelectorAll(t(this, p)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, p)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, p)).hasClass("hidden") || (n ? ninegrid.j.querySelectorAll(t(this, p)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, p)).addClass("hidden"));
|
|
1457
|
-
var
|
|
1458
|
-
$(
|
|
1457
|
+
var x = parseInt(t(this, p).dataset.matrixRow), v = x - 1, A = t(this, T).body.querySelector(`tbody.bindable [data-col="${t(this, p).dataset.col}"][data-matrix-row="${v}"]`);
|
|
1458
|
+
$(A).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").addClass("last-suppress") : !$(A).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").removeClass("last-suppress");
|
|
1459
1459
|
}
|
|
1460
1460
|
}
|
|
1461
1461
|
}, "#resetSuppress"));
|
|
1462
|
-
|
|
1462
|
+
E(this, "getExprValue", /* @__PURE__ */ h((e, s, i, n) => {
|
|
1463
1463
|
if (typeof e < "u")
|
|
1464
1464
|
try {
|
|
1465
1465
|
i = parseInt(i);
|
|
1466
1466
|
const a = e.replace("()", "");
|
|
1467
|
-
return t(this,
|
|
1467
|
+
return t(this, T)[a] ? t(this, T)[a].call(this, s, i, t(this, p)) : t(this, T).exprFunction(e).call(this, s, i, t(this, T).data);
|
|
1468
1468
|
} catch {
|
|
1469
1469
|
return ["NG-COMBO"].includes(this.tagName) ? "" : e;
|
|
1470
1470
|
}
|
|
@@ -1473,16 +1473,16 @@ const Pe = class Pe extends ve {
|
|
|
1473
1473
|
}, "getExprValue"));
|
|
1474
1474
|
}
|
|
1475
1475
|
connectedCallback() {
|
|
1476
|
-
super.connectedCallback(),
|
|
1476
|
+
super.connectedCallback(), y(this, T, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this, Mt, t(this, p).closest("tr"));
|
|
1477
1477
|
}
|
|
1478
1478
|
get value() {
|
|
1479
|
-
var e = !t(this,
|
|
1479
|
+
var e = !t(this, T) || !t(this, T).dataManager || !t(this, p) || !t(this, p).dataset || !t(this, p).dataset.row || !t(this, p).dataset.bind ? "" : t(this, p).closest("tr").data[t(this, p).dataset.bind];
|
|
1480
1480
|
return e ?? "";
|
|
1481
1481
|
}
|
|
1482
1482
|
set value(e) {
|
|
1483
1483
|
var s = parseInt(t(this, p).dataset.row);
|
|
1484
1484
|
const i = this.getAttribute("update-row-state") != "false";
|
|
1485
|
-
s < 0 ? t(this,
|
|
1485
|
+
s < 0 ? t(this, T).data.setValueNF(parseInt(t(this, p).dataset.index), t(this, p).dataset.bind, e, i) : t(this, T).data.setValue(s, t(this, p).dataset.bind, e, i);
|
|
1486
1486
|
}
|
|
1487
1487
|
get row() {
|
|
1488
1488
|
return parseInt(t(this, p).dataset.row);
|
|
@@ -1492,12 +1492,12 @@ const Pe = class Pe extends ve {
|
|
|
1492
1492
|
}
|
|
1493
1493
|
refresh() {
|
|
1494
1494
|
const e = t(this, p).dataset.bind;
|
|
1495
|
-
return parseInt(t(this, p).dataset.row), t(this,
|
|
1495
|
+
return parseInt(t(this, p).dataset.row), t(this, Mt).data[e];
|
|
1496
1496
|
}
|
|
1497
1497
|
};
|
|
1498
|
-
|
|
1499
|
-
let
|
|
1500
|
-
const
|
|
1498
|
+
T = new WeakMap(), Mt = new WeakMap(), p = new WeakMap(), Re = new WeakMap(), qe = new WeakMap(), ke = new WeakMap(), Te = new WeakMap(), Ce = new WeakMap(), h(Pe, "CellElement");
|
|
1499
|
+
let ve = Pe;
|
|
1500
|
+
const De = class De extends ve {
|
|
1501
1501
|
constructor() {
|
|
1502
1502
|
super();
|
|
1503
1503
|
}
|
|
@@ -1508,21 +1508,21 @@ const je = class je extends we {
|
|
|
1508
1508
|
return super.refresh();
|
|
1509
1509
|
}
|
|
1510
1510
|
};
|
|
1511
|
-
h(
|
|
1512
|
-
let
|
|
1513
|
-
var
|
|
1514
|
-
const
|
|
1511
|
+
h(De, "EditableCellElement");
|
|
1512
|
+
let we = De;
|
|
1513
|
+
var $t, ot, bt, yt, oe, U, Le;
|
|
1514
|
+
const je = class je extends we {
|
|
1515
1515
|
constructor() {
|
|
1516
1516
|
super();
|
|
1517
|
-
d(this,
|
|
1517
|
+
d(this, $t);
|
|
1518
1518
|
d(this, ot);
|
|
1519
1519
|
d(this, bt);
|
|
1520
1520
|
d(this, yt);
|
|
1521
|
-
d(this,
|
|
1522
|
-
d(this,
|
|
1523
|
-
|
|
1521
|
+
d(this, oe);
|
|
1522
|
+
d(this, U);
|
|
1523
|
+
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
1524
1524
|
const e = super.refresh();
|
|
1525
|
-
H.log("::", e), t(this,
|
|
1525
|
+
H.log("::", e), t(this, $t).value = e;
|
|
1526
1526
|
}, "refresh"));
|
|
1527
1527
|
/**
|
|
1528
1528
|
dataRefresh = (v) => {
|
|
@@ -1554,22 +1554,22 @@ const Fe = class Fe extends Se {
|
|
|
1554
1554
|
if (!v) this.reset();
|
|
1555
1555
|
};
|
|
1556
1556
|
*/
|
|
1557
|
-
d(this,
|
|
1557
|
+
d(this, Le, /* @__PURE__ */ h((e) => {
|
|
1558
1558
|
if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
|
|
1559
1559
|
if (t(this, ot) == "number") {
|
|
1560
1560
|
let n = [];
|
|
1561
|
-
if (t(this,
|
|
1561
|
+
if (t(this, U) && Number(t(this, U)) > 0 && n.push("."), t(this, yt) && Number(t(this, yt)) >= 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) {
|
|
1562
1562
|
var s = e.target.value, i = s.indexOf(".");
|
|
1563
1563
|
if (i >= 0) {
|
|
1564
1564
|
var s = s.substr(i + 1, s.length);
|
|
1565
|
-
s.length >= Number(t(this,
|
|
1565
|
+
s.length >= Number(t(this, U)) && e.preventDefault();
|
|
1566
1566
|
}
|
|
1567
1567
|
}
|
|
1568
1568
|
}
|
|
1569
1569
|
t(this, bt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, bt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
|
|
1570
1570
|
}
|
|
1571
1571
|
}, "#onKeyDown"));
|
|
1572
|
-
if (this.applyBaseStyle(),
|
|
1572
|
+
if (this.applyBaseStyle(), y(this, ot, this.getAttribute("type") || "text"), y(this, bt, this.getAttribute("maxbyte")), y(this, yt, this.getAttribute("min")), y(this, oe, this.getAttribute("max")), y(this, U, this.getAttribute("scale")), !["text", "number"].includes(t(this, ot))) throw `invalid type : ${t(this, ot)}`;
|
|
1573
1573
|
}
|
|
1574
1574
|
connectedCallback() {
|
|
1575
1575
|
for (var e = [], s = 0; s < this.attributes.length; s++)
|
|
@@ -1579,11 +1579,11 @@ const Fe = class Fe extends Se {
|
|
|
1579
1579
|
${e.join(" ")}
|
|
1580
1580
|
ondragstart="return false;"
|
|
1581
1581
|
>
|
|
1582
|
-
`, super.connectedCallback(),
|
|
1582
|
+
`, super.connectedCallback(), y(this, $t, this.querySelector("input"));
|
|
1583
1583
|
}
|
|
1584
1584
|
};
|
|
1585
|
-
|
|
1586
|
-
let
|
|
1585
|
+
$t = new WeakMap(), ot = new WeakMap(), bt = new WeakMap(), yt = new WeakMap(), oe = new WeakMap(), U = new WeakMap(), Le = new WeakMap(), h(je, "CellInputText");
|
|
1586
|
+
let Se = je;
|
|
1587
1587
|
customElements.get("cell-input-text");
|
|
1588
|
-
customElements.get("cell-input") || customElements.define("cell-input",
|
|
1588
|
+
customElements.get("cell-input") || customElements.define("cell-input", Se);
|
|
1589
1589
|
//# sourceMappingURL=nine-table.js.map
|