@ninebone/table 0.0.490 → 0.0.492
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 +349 -347
- 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,17 +1,17 @@
|
|
|
1
1
|
var je = Object.defineProperty;
|
|
2
|
-
var Fe = (
|
|
3
|
-
throw TypeError(
|
|
2
|
+
var Fe = (q) => {
|
|
3
|
+
throw TypeError(q);
|
|
4
4
|
};
|
|
5
|
-
var Ue = (
|
|
6
|
-
var h = (
|
|
7
|
-
var
|
|
8
|
-
var t = (
|
|
9
|
-
var Ye = (
|
|
5
|
+
var Ue = (q, s, e) => s in q ? je(q, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[s] = e;
|
|
6
|
+
var h = (q, s) => je(q, "name", { value: s, configurable: !0 });
|
|
7
|
+
var A = (q, s, e) => Ue(q, typeof s != "symbol" ? s + "" : s, e), Ve = (q, s, e) => s.has(q) || Fe("Cannot " + e);
|
|
8
|
+
var t = (q, s, e) => (Ve(q, s, "read from private field"), e ? e.call(q) : s.get(q)), d = (q, s, e) => s.has(q) ? Fe("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(q) : s.set(q, e), y = (q, s, e, i) => (Ve(q, s, "write to private field"), i ? i.call(q, e) : s.set(q, e), e);
|
|
9
|
+
var Ye = (q, s, e, i) => ({
|
|
10
10
|
set _(r) {
|
|
11
|
-
y(
|
|
11
|
+
y(q, s, r, e);
|
|
12
12
|
},
|
|
13
13
|
get _() {
|
|
14
|
-
return t(
|
|
14
|
+
return t(q, s, i);
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
import { trace as Xe } from "@ninebone/util";
|
|
@@ -23,7 +23,7 @@ const Le = class Le extends Xe.constructor {
|
|
|
23
23
|
h(Le, "Trace");
|
|
24
24
|
let oe = Le;
|
|
25
25
|
const U = new oe();
|
|
26
|
-
var B, P, w, X, K, Z,
|
|
26
|
+
var B, P, w, X, K, Z, _t, G, Nt;
|
|
27
27
|
const He = class He extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
@@ -33,18 +33,18 @@ const He = class He extends HTMLElement {
|
|
|
33
33
|
d(this, X);
|
|
34
34
|
d(this, K);
|
|
35
35
|
d(this, Z);
|
|
36
|
-
d(this,
|
|
36
|
+
d(this, _t, /* @__PURE__ */ h(() => {
|
|
37
37
|
if (!t(this, B)) return;
|
|
38
38
|
const e = t(this, B).querySelector(".ng-container-body .ng-part-body");
|
|
39
39
|
e && (y(this, Z, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
41
|
})), t(this, Z).observe(e));
|
|
42
42
|
}, "#observeResize"));
|
|
43
|
-
|
|
43
|
+
A(this, "refresh", /* @__PURE__ */ h(() => {
|
|
44
44
|
if (!t(this, B) || !t(this, w) || t(this, P)) return;
|
|
45
|
-
const e = t(this, w).container,
|
|
46
|
-
if (!
|
|
47
|
-
const r = t(this, w).track, n = t(this, w).thumb, o = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, c =
|
|
45
|
+
const e = t(this, w).container, i = e.querySelector("table");
|
|
46
|
+
if (!i) return;
|
|
47
|
+
const r = t(this, w).track, n = t(this, w).thumb, o = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, c = i.scrollWidth;
|
|
48
48
|
if (a !== 0 && c > a)
|
|
49
49
|
o && (o.style.display = "flex");
|
|
50
50
|
else {
|
|
@@ -63,17 +63,17 @@ const He = class He extends HTMLElement {
|
|
|
63
63
|
}, "refresh"));
|
|
64
64
|
d(this, G, /* @__PURE__ */ h((e) => {
|
|
65
65
|
if (!t(this, w)) return !1;
|
|
66
|
-
const
|
|
66
|
+
const i = t(this, w).container, r = i.querySelector("table");
|
|
67
67
|
if (!r) return !1;
|
|
68
68
|
const n = t(this, w).track.getBoundingClientRect(), o = t(this, w).thumb.clientWidth;
|
|
69
69
|
let a = e;
|
|
70
70
|
a < 0 && (a = 0);
|
|
71
71
|
const c = n.width - o;
|
|
72
72
|
a > c && (a = c), a = parseInt(a, 10), t(this, w).thumb.style.left = `${a}px`, t(this, w).left.disabled = a === 0, t(this, w).right.disabled = a >= c - 1;
|
|
73
|
-
const l =
|
|
74
|
-
return c > 0 && u > 0 && (
|
|
73
|
+
const l = i.clientWidth, u = r.scrollWidth - l;
|
|
74
|
+
return c > 0 && u > 0 && (i.scrollLeft = a / c * u), a > 0 && a < c - 1;
|
|
75
75
|
}, "#thumbMoveTo"));
|
|
76
|
-
d(this,
|
|
76
|
+
d(this, Nt, /* @__PURE__ */ h(() => {
|
|
77
77
|
const e = /* @__PURE__ */ h((r) => {
|
|
78
78
|
clearInterval(t(this, X)), clearInterval(t(this, K));
|
|
79
79
|
const n = parseInt(t(this, w).thumb.style.left || 0, 10);
|
|
@@ -83,11 +83,11 @@ const He = class He extends HTMLElement {
|
|
|
83
83
|
t(this, G).call(this, o + r) || clearInterval(t(this, K));
|
|
84
84
|
}, 50));
|
|
85
85
|
}, 500));
|
|
86
|
-
}, "delayScroll"),
|
|
86
|
+
}, "delayScroll"), i = /* @__PURE__ */ h(() => {
|
|
87
87
|
clearInterval(t(this, X)), clearInterval(t(this, K));
|
|
88
88
|
}, "clearTimer");
|
|
89
89
|
["mouseup", "mouseleave", "touchend"].forEach((r) => {
|
|
90
|
-
t(this, w).left.addEventListener(r,
|
|
90
|
+
t(this, w).left.addEventListener(r, i), t(this, w).right.addEventListener(r, i), t(this, w).track.addEventListener(r, i);
|
|
91
91
|
}), t(this, w).left.addEventListener("mousedown", (r) => {
|
|
92
92
|
r.button === 0 && e(-20);
|
|
93
93
|
}), t(this, w).right.addEventListener("mousedown", (r) => {
|
|
@@ -105,7 +105,7 @@ const He = class He extends HTMLElement {
|
|
|
105
105
|
const c = t(this, w).track.getBoundingClientRect();
|
|
106
106
|
t(this, G).call(this, a.clientX - c.left - this.shiftX);
|
|
107
107
|
}, "onMouseMove"), o = /* @__PURE__ */ h(() => {
|
|
108
|
-
y(this, P, !1),
|
|
108
|
+
y(this, P, !1), i(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
|
|
109
109
|
}, "onMouseUp");
|
|
110
110
|
document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
|
|
111
111
|
});
|
|
@@ -177,20 +177,20 @@ const He = class He extends HTMLElement {
|
|
|
177
177
|
<button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
|
|
178
178
|
`;
|
|
179
179
|
const e = /* @__PURE__ */ h(() => {
|
|
180
|
-
const
|
|
181
|
-
if (!
|
|
180
|
+
const i = t(this, B).querySelector(".ng-container-body .ng-part-body");
|
|
181
|
+
if (!i) {
|
|
182
182
|
setTimeout(e, 10);
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
185
|
y(this, w, {
|
|
186
|
-
container:
|
|
186
|
+
container: i,
|
|
187
187
|
track: this.querySelector(".ng-scroll-track"),
|
|
188
188
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
189
189
|
left: this.querySelector(".ng-scroll-left"),
|
|
190
190
|
right: this.querySelector(".ng-scroll-right")
|
|
191
|
-
}),
|
|
191
|
+
}), i.addEventListener("scroll", () => {
|
|
192
192
|
t(this, P) || 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
|
}
|
|
@@ -198,28 +198,28 @@ const He = class He extends HTMLElement {
|
|
|
198
198
|
t(this, Z) && t(this, Z).disconnect();
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
B = new WeakMap(), P = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(),
|
|
201
|
+
B = new WeakMap(), P = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), _t = new WeakMap(), G = new WeakMap(), Nt = new WeakMap(), h(He, "NineTableHScrollBar");
|
|
202
202
|
let ae = He;
|
|
203
203
|
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ae);
|
|
204
|
-
var j, ot, J,
|
|
204
|
+
var j, ot, J, R, vt, wt, Wt;
|
|
205
205
|
const $e = class $e extends HTMLElement {
|
|
206
206
|
constructor() {
|
|
207
207
|
super();
|
|
208
208
|
d(this, j);
|
|
209
209
|
d(this, ot);
|
|
210
210
|
d(this, J, !1);
|
|
211
|
-
d(this,
|
|
212
|
-
d(this,
|
|
213
|
-
d(this,
|
|
214
|
-
|
|
215
|
-
if (!t(this, j) || !t(this,
|
|
216
|
-
const e = t(this,
|
|
211
|
+
d(this, R);
|
|
212
|
+
d(this, vt, 0);
|
|
213
|
+
d(this, wt, 0);
|
|
214
|
+
A(this, "refresh", /* @__PURE__ */ h(() => {
|
|
215
|
+
if (!t(this, j) || !t(this, R)) return;
|
|
216
|
+
const e = t(this, R).container, i = t(this, R).track, r = t(this, R).thumb, n = e.clientHeight, a = (t(this, j).data.get() || []).length, c = t(this, ot).getRowHeight(), l = a * c;
|
|
217
217
|
if (l <= n) {
|
|
218
|
-
r.style.display = "none", t(this,
|
|
218
|
+
r.style.display = "none", t(this, R).top.disabled = !0, t(this, R).bottom.disabled = !0;
|
|
219
219
|
return;
|
|
220
220
|
} else
|
|
221
221
|
r.style.display = "block";
|
|
222
|
-
const f =
|
|
222
|
+
const f = i.clientHeight;
|
|
223
223
|
if (f <= 0) return;
|
|
224
224
|
const u = Math.max(Math.min(f * (n / l), f), 20);
|
|
225
225
|
r.style.height = `${u}px`;
|
|
@@ -227,24 +227,24 @@ const $e = class $e extends HTMLElement {
|
|
|
227
227
|
let m = 0;
|
|
228
228
|
g > 0 && (m = b / g * (f - u));
|
|
229
229
|
const v = f - u;
|
|
230
|
-
m < 0 && (m = 0), m > v && (m = v), r.style.top = `${m}px`, t(this,
|
|
230
|
+
m < 0 && (m = 0), m > v && (m = v), r.style.top = `${m}px`, t(this, R).top.disabled = b <= 0, t(this, R).bottom.disabled = b >= g - 1;
|
|
231
231
|
}, "refresh"));
|
|
232
|
-
d(this,
|
|
233
|
-
const e = t(this,
|
|
232
|
+
d(this, Wt, /* @__PURE__ */ h(() => {
|
|
233
|
+
const e = t(this, R).container, i = /* @__PURE__ */ h(() => {
|
|
234
234
|
const n = (t(this, j).data.get() || []).length, o = t(this, ot).getRowHeight();
|
|
235
235
|
return n * o;
|
|
236
236
|
}, "getContentHeight");
|
|
237
237
|
e.addEventListener("scroll", () => {
|
|
238
238
|
t(this, J) || this.refresh();
|
|
239
|
-
}), t(this,
|
|
239
|
+
}), t(this, R).thumb.addEventListener("mousedown", (r) => {
|
|
240
240
|
if (r.button !== 0) return;
|
|
241
|
-
r.stopPropagation(), r.preventDefault(), y(this, J, !0), y(this,
|
|
241
|
+
r.stopPropagation(), r.preventDefault(), y(this, J, !0), y(this, vt, r.clientY), y(this, wt, e.scrollTop);
|
|
242
242
|
const n = /* @__PURE__ */ h((a) => {
|
|
243
243
|
if (!t(this, J)) return;
|
|
244
|
-
const c = t(this,
|
|
244
|
+
const c = t(this, R).track.getBoundingClientRect(), l = t(this, R).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, vt), g = e.clientHeight, m = i(), v = Math.max(m - g, 1);
|
|
245
245
|
if (u > 0 && v > 0) {
|
|
246
|
-
const
|
|
247
|
-
let x = t(this,
|
|
246
|
+
const E = b / u * v;
|
|
247
|
+
let x = t(this, wt) + E;
|
|
248
248
|
const H = Math.max(0, m - g);
|
|
249
249
|
x < 0 && (x = 0), x > H && (x = H), e.scrollTop = x;
|
|
250
250
|
}
|
|
@@ -253,17 +253,17 @@ const $e = class $e extends HTMLElement {
|
|
|
253
253
|
y(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
|
|
254
254
|
}, "onMouseUp");
|
|
255
255
|
document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
|
|
256
|
-
}), t(this,
|
|
257
|
-
if (r.button !== 0 || r.target === t(this,
|
|
258
|
-
const n = t(this,
|
|
256
|
+
}), t(this, R).track.addEventListener("mousedown", (r) => {
|
|
257
|
+
if (r.button !== 0 || r.target === t(this, R).thumb) return;
|
|
258
|
+
const n = t(this, R).track.getBoundingClientRect(), o = t(this, R).thumb.clientHeight, a = r.clientY - n.top - o / 2, l = n.height - o, f = e.clientHeight, u = i(), b = Math.max(u - f, 1);
|
|
259
259
|
if (l > 0 && b > 0) {
|
|
260
260
|
const g = Math.max(0, Math.min(1, a / l));
|
|
261
261
|
e.scrollTop = g * b;
|
|
262
262
|
}
|
|
263
263
|
this.refresh();
|
|
264
|
-
}), t(this,
|
|
264
|
+
}), t(this, R).top.addEventListener("click", () => {
|
|
265
265
|
e.scrollTop -= 40;
|
|
266
|
-
}), t(this,
|
|
266
|
+
}), t(this, R).bottom.addEventListener("click", () => {
|
|
267
267
|
e.scrollTop += 40;
|
|
268
268
|
});
|
|
269
269
|
}, "#init"));
|
|
@@ -334,43 +334,45 @@ const $e = class $e 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
|
|
338
|
-
if (!
|
|
337
|
+
const i = t(this, j).shadowRoot.querySelector(".ng-container-body .ng-part-body");
|
|
338
|
+
if (!i) {
|
|
339
339
|
setTimeout(e, 10);
|
|
340
340
|
return;
|
|
341
341
|
}
|
|
342
|
-
y(this,
|
|
343
|
-
container:
|
|
342
|
+
y(this, R, {
|
|
343
|
+
container: i,
|
|
344
344
|
track: this.querySelector(".ng-scroll-track"),
|
|
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, Wt).call(this), this.refresh();
|
|
349
349
|
}, "initWhenReady");
|
|
350
350
|
e();
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
|
-
j = new WeakMap(), ot = new WeakMap(), J = new WeakMap(),
|
|
353
|
+
j = new WeakMap(), ot = new WeakMap(), J = new WeakMap(), R = new WeakMap(), vt = new WeakMap(), wt = new WeakMap(), Wt = new WeakMap(), h($e, "NineTableVScrollBar");
|
|
354
354
|
let le = $e;
|
|
355
355
|
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
|
|
356
|
-
var D,
|
|
356
|
+
var D, S, z, M, F, Q, St, Se, at, Ot, Bt, Et, At, qt, zt, Dt, lt, Ee, ct, Rt, Pt;
|
|
357
357
|
const Me = class Me {
|
|
358
|
-
constructor(
|
|
358
|
+
constructor(s) {
|
|
359
359
|
d(this, D);
|
|
360
|
-
d(this,
|
|
360
|
+
d(this, S);
|
|
361
361
|
d(this, z, /* @__PURE__ */ new Map());
|
|
362
362
|
d(this, M, null);
|
|
363
363
|
d(this, F, null);
|
|
364
364
|
d(this, Q, 0);
|
|
365
|
-
d(this,
|
|
365
|
+
d(this, St, 40);
|
|
366
366
|
d(this, Se, !1);
|
|
367
367
|
d(this, at, !1);
|
|
368
|
-
d(this,
|
|
369
|
-
|
|
368
|
+
d(this, Ot, 3);
|
|
369
|
+
A(this, "refresh", /* @__PURE__ */ h(() => {
|
|
370
|
+
const s = t(this, S).querySelector(".ng-container-body .ng-part-body");
|
|
371
|
+
s && (t(this, Et).call(this, s), t(this, lt).call(this), t(this, At).call(this), t(this, ct).call(this, s.scrollTop));
|
|
370
372
|
}, "refresh"));
|
|
371
|
-
|
|
373
|
+
A(this, "initialize", /* @__PURE__ */ h(() => {
|
|
372
374
|
y(this, M, null), t(this, z).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
|
|
373
|
-
const a = t(this,
|
|
375
|
+
const a = t(this, S).querySelector(o);
|
|
374
376
|
if (!a) return;
|
|
375
377
|
const c = a.querySelector(".ng-part-body table");
|
|
376
378
|
if (!c) return;
|
|
@@ -379,15 +381,15 @@ const Me = class Me {
|
|
|
379
381
|
const u = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
|
|
380
382
|
t(this, z).set(o, u);
|
|
381
383
|
});
|
|
382
|
-
const
|
|
383
|
-
if (
|
|
384
|
-
t(this,
|
|
384
|
+
const s = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), i = t(this, S).querySelector(".ng-container-right .ng-part-body"), r = t(this, S).querySelector(".ng-container-body .ng-part-header"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer");
|
|
385
|
+
if (s) {
|
|
386
|
+
t(this, Et).call(this, s), t(this, lt).call(this), t(this, At).call(this), t(this, ct).call(this, s.scrollTop);
|
|
385
387
|
let o = !1;
|
|
386
388
|
const a = /* @__PURE__ */ h((c, l, f) => {
|
|
387
389
|
var u;
|
|
388
|
-
o || (o = !0,
|
|
390
|
+
o || (o = !0, s && s.scrollTop !== c && (s.scrollTop = c), e && e.scrollTop !== c && (e.scrollTop = c), i && i.scrollTop !== c && (i.scrollTop = c), r && r.scrollLeft !== l && (r.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(), o = !1);
|
|
389
391
|
}, "syncScroll");
|
|
390
|
-
[
|
|
392
|
+
[s, e, i].forEach((c) => {
|
|
391
393
|
c && c.addEventListener("scroll", () => {
|
|
392
394
|
t(this, at) || (y(this, at, !0), requestAnimationFrame(() => {
|
|
393
395
|
a(c.scrollTop, c.scrollLeft), y(this, at, !1);
|
|
@@ -396,61 +398,61 @@ const Me = class Me {
|
|
|
396
398
|
});
|
|
397
399
|
}
|
|
398
400
|
}, "initialize"));
|
|
399
|
-
d(this,
|
|
400
|
-
const
|
|
401
|
-
if (!
|
|
402
|
-
const r =
|
|
401
|
+
d(this, Bt, /* @__PURE__ */ h((s, e) => {
|
|
402
|
+
const i = t(this, z).get(e);
|
|
403
|
+
if (!i || i.length === 0) return;
|
|
404
|
+
const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
403
405
|
if (!r) return;
|
|
404
406
|
r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
|
|
405
407
|
const n = r.querySelector("tr.nodata"), o = document.createDocumentFragment();
|
|
406
|
-
for (let a = 0; a < t(this,
|
|
407
|
-
|
|
408
|
+
for (let a = 0; a < t(this, St); a++)
|
|
409
|
+
i.forEach((c) => {
|
|
408
410
|
o.appendChild(c.cloneNode(!0));
|
|
409
411
|
});
|
|
410
412
|
n ? n.before(o) : r.appendChild(o);
|
|
411
413
|
}, "#renderRows"));
|
|
412
|
-
d(this,
|
|
414
|
+
d(this, Et, /* @__PURE__ */ h((s) => {
|
|
413
415
|
if (t(this, M) !== null && t(this, M) > 0)
|
|
414
416
|
return t(this, M);
|
|
415
417
|
U.log("#measureAndCacheHeight");
|
|
416
418
|
const e = t(this, z).get(".ng-container-body");
|
|
417
419
|
if (!e || e.length === 0) return 24;
|
|
418
|
-
const
|
|
419
|
-
if (!
|
|
420
|
-
|
|
421
|
-
const r =
|
|
420
|
+
const i = s.querySelector("tbody.bindable-tbody");
|
|
421
|
+
if (!i) return 24;
|
|
422
|
+
i.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
|
|
423
|
+
const r = i.querySelector("tr.nodata"), n = document.createDocumentFragment();
|
|
422
424
|
e.forEach((b) => {
|
|
423
425
|
n.appendChild(b.cloneNode(!0));
|
|
424
|
-
}), r ? r.before(n) :
|
|
425
|
-
const o = t(this,
|
|
426
|
+
}), r ? r.before(n) : i.appendChild(n);
|
|
427
|
+
const o = t(this, S), a = o.style.display, c = o.style.visibility, l = o.style.position;
|
|
426
428
|
(a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
|
|
427
429
|
let f = 0;
|
|
428
|
-
const u =
|
|
430
|
+
const u = i.querySelectorAll("tr:not(.nodata)");
|
|
429
431
|
return u.forEach((b) => {
|
|
430
432
|
f += b.offsetHeight || b.getBoundingClientRect().height;
|
|
431
|
-
}), u.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, y(this, M, f > 0 ? f : 24), t(this,
|
|
433
|
+
}), u.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, y(this, M, f > 0 ? f : 24), t(this, qt).call(this), t(this, M);
|
|
432
434
|
}, "#measureAndCacheHeight"));
|
|
433
|
-
d(this,
|
|
434
|
-
const e = (t(this, D).data.get() || []).length,
|
|
435
|
+
d(this, At, /* @__PURE__ */ h(() => {
|
|
436
|
+
const e = (t(this, D).data.get() || []).length, i = t(this, M), r = e * i;
|
|
435
437
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
|
|
436
|
-
const o = t(this,
|
|
438
|
+
const o = t(this, S).querySelector(n);
|
|
437
439
|
if (!o) return;
|
|
438
440
|
const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
|
|
439
441
|
a && (a.style.height = `${r}px`);
|
|
440
442
|
});
|
|
441
443
|
}, "#updateVirtualScrollHeight"));
|
|
442
|
-
d(this,
|
|
444
|
+
d(this, qt, /* @__PURE__ */ h(() => {
|
|
443
445
|
if (t(this, Q) > 0 && t(this, M) > 0) {
|
|
444
|
-
const
|
|
445
|
-
y(this,
|
|
446
|
+
const s = Math.ceil(t(this, Q) / t(this, M));
|
|
447
|
+
y(this, St, s + t(this, Ot));
|
|
446
448
|
}
|
|
447
449
|
}, "#updateRowCount"));
|
|
448
450
|
d(this, zt, /* @__PURE__ */ h(() => {
|
|
449
451
|
var a, c, l, f, u, b;
|
|
450
|
-
const
|
|
452
|
+
const s = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), i = t(this, S).querySelector(".ng-container-right .ng-part-body table");
|
|
451
453
|
if (e) {
|
|
452
|
-
const g =
|
|
453
|
-
for (let x = 0; x <
|
|
454
|
+
const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], m = Array.from(e.querySelectorAll("tbody tr")), v = i ? Array.from(i.querySelectorAll("tbody tr")) : [], E = Math.max(g.length, m.length, v.length);
|
|
455
|
+
for (let x = 0; x < E; x++) {
|
|
454
456
|
const H = [
|
|
455
457
|
((a = g[x]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
|
|
456
458
|
((c = m[x]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
|
|
@@ -459,10 +461,10 @@ const Me = class Me {
|
|
|
459
461
|
k > 0 && (g[x] && (g[x].style.height = `${k}px`), m[x] && (m[x].style.height = `${k}px`), v[x] && (v[x].style.height = `${k}px`));
|
|
460
462
|
}
|
|
461
463
|
}
|
|
462
|
-
const r = t(this,
|
|
464
|
+
const r = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
|
|
463
465
|
if (n) {
|
|
464
|
-
const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], m = Array.from(n.querySelectorAll("tfoot tr")), v = o ? Array.from(o.querySelectorAll("tfoot tr")) : [],
|
|
465
|
-
for (let x = 0; x <
|
|
466
|
+
const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], m = Array.from(n.querySelectorAll("tfoot tr")), v = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], E = Math.max(g.length, m.length, v.length);
|
|
467
|
+
for (let x = 0; x < E; x++) {
|
|
466
468
|
const H = [
|
|
467
469
|
((f = g[x]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
|
|
468
470
|
((u = m[x]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
|
|
@@ -473,69 +475,69 @@ const Me = class Me {
|
|
|
473
475
|
}
|
|
474
476
|
}, "#syncRowHeights"));
|
|
475
477
|
d(this, Dt, /* @__PURE__ */ h(() => {
|
|
476
|
-
!t(this,
|
|
477
|
-
for (const e of
|
|
478
|
-
const
|
|
479
|
-
if (!
|
|
478
|
+
!t(this, S) || !(t(this, S) instanceof HTMLElement) || (y(this, F, new ResizeObserver((s) => {
|
|
479
|
+
for (const e of s) {
|
|
480
|
+
const i = e.target;
|
|
481
|
+
if (!i.classList.contains("active")) continue;
|
|
480
482
|
const r = e.contentRect.height;
|
|
481
483
|
if (r > 0) {
|
|
482
484
|
let n = 0;
|
|
483
|
-
const o =
|
|
485
|
+
const o = i.querySelector(".ng-part-header"), a = i.querySelector(".ng-part-footer");
|
|
484
486
|
o && (n += o.offsetHeight), a && (n += a.offsetHeight);
|
|
485
487
|
const c = Math.max(r - n, 100);
|
|
486
|
-
t(this, Q) !== c && (y(this, Q, c), t(this,
|
|
488
|
+
t(this, Q) !== c && (y(this, Q, c), t(this, qt).call(this), t(this, M) !== null && t(this, lt).call(this));
|
|
487
489
|
}
|
|
488
490
|
}
|
|
489
|
-
})), t(this, F).observe(t(this,
|
|
491
|
+
})), t(this, F).observe(t(this, S)));
|
|
490
492
|
}, "#initResizeObserver"));
|
|
491
|
-
d(this,
|
|
492
|
-
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((
|
|
493
|
-
const e = t(this,
|
|
494
|
-
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this,
|
|
493
|
+
d(this, lt, /* @__PURE__ */ h(() => {
|
|
494
|
+
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
|
|
495
|
+
const e = t(this, S).querySelector(s);
|
|
496
|
+
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Bt).call(this, e, s);
|
|
495
497
|
}), t(this, Pt).call(this), t(this, zt).call(this);
|
|
496
498
|
}, "#renderAllContainers"));
|
|
497
|
-
d(this, Ee, /* @__PURE__ */ h((
|
|
499
|
+
d(this, Ee, /* @__PURE__ */ h((s) => {
|
|
498
500
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
|
|
499
501
|
var l;
|
|
500
|
-
const
|
|
501
|
-
if (!
|
|
502
|
-
const r =
|
|
502
|
+
const i = t(this, S).querySelector(e);
|
|
503
|
+
if (!i) return;
|
|
504
|
+
const r = i.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
503
505
|
if (!r) return;
|
|
504
506
|
const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, z).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, D).data.get() || []).length;
|
|
505
507
|
n.forEach((f, u) => {
|
|
506
|
-
const b =
|
|
508
|
+
const b = s + Math.floor(u / o);
|
|
507
509
|
if (b >= c) {
|
|
508
510
|
f.style.display = "none";
|
|
509
511
|
return;
|
|
510
512
|
}
|
|
511
513
|
const g = t(this, D).data.get(b);
|
|
512
|
-
f.style.display = "", t(this,
|
|
514
|
+
f.style.display = "", t(this, Rt).call(this, f, g, b);
|
|
513
515
|
});
|
|
514
516
|
});
|
|
515
517
|
}, "#adjustBufferRows"));
|
|
516
|
-
d(this,
|
|
518
|
+
d(this, ct, /* @__PURE__ */ h((s) => {
|
|
517
519
|
var u;
|
|
518
520
|
const e = t(this, M);
|
|
519
521
|
if (!e || e <= 0) return;
|
|
520
|
-
const r = (t(this, D).data.get() || []).length, n = Math.max(0, Math.floor(
|
|
522
|
+
const r = (t(this, D).data.get() || []).length, n = Math.max(0, Math.floor(s / e)), o = n * e, a = ((u = t(this, z).get(".ng-container-body")) == null ? void 0 : u.length) || 1, c = t(this, S).querySelector(".ng-container-body"), l = c == null ? void 0 : c.querySelector(".ng-part-body tbody.bindable-tbody tr:not(.nodata)"), f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
|
|
521
523
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
|
|
522
|
-
const g = t(this,
|
|
524
|
+
const g = t(this, S).querySelector(b);
|
|
523
525
|
if (!g) return;
|
|
524
526
|
const m = g.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
525
527
|
m && (m.style.transform = `translateY(${o}px)`);
|
|
526
528
|
}), U.log("#handleScroll", f, n), f !== n && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
|
|
527
|
-
const g = t(this,
|
|
529
|
+
const g = t(this, S).querySelector(b);
|
|
528
530
|
if (!g) return;
|
|
529
531
|
const m = g.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
530
532
|
if (!m) return;
|
|
531
|
-
Array.from(m.querySelectorAll("tr:not(.nodata)")).forEach((
|
|
533
|
+
Array.from(m.querySelectorAll("tr:not(.nodata)")).forEach((E, x) => {
|
|
532
534
|
const H = n + Math.floor(x / a);
|
|
533
535
|
if (H >= r) {
|
|
534
|
-
|
|
536
|
+
E.style.display = "none";
|
|
535
537
|
return;
|
|
536
538
|
}
|
|
537
539
|
const k = t(this, D).data.get(H);
|
|
538
|
-
|
|
540
|
+
E.style.display = "", t(this, Rt).call(this, E, k, H);
|
|
539
541
|
});
|
|
540
542
|
});
|
|
541
543
|
}, "#handleScroll"));
|
|
@@ -553,18 +555,18 @@ const Me = class Me {
|
|
|
553
555
|
cell.dataset.row = dataIndex;
|
|
554
556
|
});
|
|
555
557
|
}; */
|
|
556
|
-
d(this,
|
|
557
|
-
|
|
558
|
-
r.dataset.row =
|
|
558
|
+
d(this, Rt, /* @__PURE__ */ h((s, e, i) => {
|
|
559
|
+
s.dataset.row = i, s.data = e, U.log(i), Array.from(s.cells).forEach((r, n) => {
|
|
560
|
+
r.dataset.row = i, r.querySelector(':scope > [is^="cell-"], :scope > [class*="cell-"], :scope > cell-');
|
|
559
561
|
const o = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
|
|
560
562
|
o && typeof o.refresh == "function" && o.refresh();
|
|
561
563
|
});
|
|
562
564
|
}, "#bindRowData"));
|
|
563
565
|
d(this, Pt, /* @__PURE__ */ h(() => {
|
|
564
566
|
var c, l, f;
|
|
565
|
-
const
|
|
567
|
+
const s = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), i = t(this, S).querySelector(".ng-container-right .ng-part-header table");
|
|
566
568
|
if (!e) return;
|
|
567
|
-
const r =
|
|
569
|
+
const r = s ? Array.from(s.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), o = i ? Array.from(i.querySelectorAll("tr")) : [], a = Math.max(r.length, n.length, o.length);
|
|
568
570
|
for (let u = 0; u < a; u++) {
|
|
569
571
|
const b = [
|
|
570
572
|
((c = r[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
|
|
@@ -574,43 +576,43 @@ const Me = class Me {
|
|
|
574
576
|
g > 0 && (r[u] && (r[u].style.height = `${g}px`), n[u] && (n[u].style.height = `${g}px`), o[u] && (o[u].style.height = `${g}px`));
|
|
575
577
|
}
|
|
576
578
|
}, "#syncHeaderHeights"));
|
|
577
|
-
|
|
579
|
+
A(this, "destroy", /* @__PURE__ */ h(() => {
|
|
578
580
|
t(this, F) && (t(this, F).disconnect(), y(this, F, null));
|
|
579
581
|
}, "destroy"));
|
|
580
|
-
y(this, D,
|
|
582
|
+
y(this, D, s.getRootNode().host), y(this, S, s), t(this, Dt).call(this);
|
|
581
583
|
}
|
|
582
584
|
getRowHeight() {
|
|
583
585
|
return t(this, M);
|
|
584
586
|
}
|
|
585
|
-
templateLength(
|
|
587
|
+
templateLength(s = ".ng-container-body") {
|
|
586
588
|
var e;
|
|
587
|
-
return ((e = t(this, z).get(
|
|
589
|
+
return ((e = t(this, z).get(s)) == null ? void 0 : e.length) || 1;
|
|
588
590
|
}
|
|
589
591
|
};
|
|
590
|
-
D = new WeakMap(),
|
|
592
|
+
D = new WeakMap(), S = new WeakMap(), z = new WeakMap(), M = new WeakMap(), F = new WeakMap(), Q = new WeakMap(), St = new WeakMap(), Se = new WeakMap(), at = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), Et = new WeakMap(), At = new WeakMap(), qt = new WeakMap(), zt = new WeakMap(), Dt = new WeakMap(), lt = new WeakMap(), Ee = new WeakMap(), ct = new WeakMap(), Rt = new WeakMap(), Pt = new WeakMap(), h(Me, "RowManager");
|
|
591
593
|
let ce = Me;
|
|
592
594
|
const jt = class jt {
|
|
593
595
|
/**
|
|
594
596
|
* 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
|
|
595
597
|
*/
|
|
596
|
-
static compileAll(
|
|
597
|
-
return Array.isArray(
|
|
598
|
+
static compileAll(s) {
|
|
599
|
+
return Array.isArray(s) ? s.map((e) => jt.compile(e)) : [];
|
|
598
600
|
}
|
|
599
601
|
/**
|
|
600
602
|
* 🎯 단일 원본 테이블을 받아 기본 구조 보정 및 2차원 격자 인덱스 사전 부여 완료된 마스터 테이블 반환
|
|
601
603
|
*/
|
|
602
|
-
static compile(
|
|
603
|
-
if (!
|
|
604
|
+
static compile(s) {
|
|
605
|
+
if (!s) return null;
|
|
604
606
|
const e = /* @__PURE__ */ h((a) => {
|
|
605
607
|
a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
|
|
606
608
|
const f = l.getAttribute("cell-type") || "renderer";
|
|
607
609
|
if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
|
|
608
610
|
let u = `cell-${f}`;
|
|
609
611
|
const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), m = l.getAttribute("maxbyte"), v = l.getAttribute("type");
|
|
610
|
-
let
|
|
611
|
-
b &&
|
|
612
|
+
let E = [];
|
|
613
|
+
b && E.push(`data-bind="${b}"`), g && E.push(`data-expr="${g}"`), m && E.push(`maxbyte="${m}"`), v && E.push(`type="${v}"`), l.innerHTML = `<${u} ${E.join(" ")}></${u}>`;
|
|
612
614
|
});
|
|
613
|
-
}, "processCellTypes"),
|
|
615
|
+
}, "processCellTypes"), i = /* @__PURE__ */ h((a) => {
|
|
614
616
|
if (!a.querySelector("colgroup")) {
|
|
615
617
|
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);
|
|
616
618
|
for (let b = 0; b < l; b++) {
|
|
@@ -634,30 +636,30 @@ const jt = class jt {
|
|
|
634
636
|
const g = Array.from(Array(u), () => Array(b).fill(null));
|
|
635
637
|
l.forEach((m) => {
|
|
636
638
|
const v = m.sectionRowIndex;
|
|
637
|
-
let
|
|
639
|
+
let E = 0;
|
|
638
640
|
Array.from(m.querySelectorAll("th,td")).forEach((x) => {
|
|
639
641
|
for (let O = 0; O < g[v].length; O++)
|
|
640
642
|
if (g[v][O] === null) {
|
|
641
|
-
|
|
643
|
+
E = O;
|
|
642
644
|
break;
|
|
643
645
|
}
|
|
644
646
|
const H = x.rowSpan || 1, k = x.colSpan || 1;
|
|
645
647
|
for (let O = 0; O < H; O++)
|
|
646
|
-
for (let
|
|
647
|
-
v + O < u &&
|
|
648
|
+
for (let pt = 0; pt < k; pt++)
|
|
649
|
+
v + O < u && E + pt < b && (g[v + O][E + pt] = O === 0 && pt === 0 ? "1" : "0");
|
|
648
650
|
});
|
|
649
651
|
}), l.forEach((m) => {
|
|
650
652
|
const v = m.sectionRowIndex;
|
|
651
|
-
Array.from(m.querySelectorAll("th,td")).forEach((
|
|
653
|
+
Array.from(m.querySelectorAll("th,td")).forEach((E) => {
|
|
652
654
|
for (let x = 0; x < g[v].length; x++)
|
|
653
655
|
if (g[v][x] === "1") {
|
|
654
|
-
|
|
656
|
+
E.dataset.col = x, g[v][x] = "0";
|
|
655
657
|
break;
|
|
656
658
|
}
|
|
657
659
|
});
|
|
658
660
|
});
|
|
659
|
-
}, "resetColIndex"), n =
|
|
660
|
-
return
|
|
661
|
+
}, "resetColIndex"), n = s.cloneNode(!0);
|
|
662
|
+
return i(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((a, c) => {
|
|
661
663
|
const l = a.getAttribute("fixed");
|
|
662
664
|
l && n.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
|
|
663
665
|
f.setAttribute("fixed", l);
|
|
@@ -668,14 +670,14 @@ const jt = class jt {
|
|
|
668
670
|
};
|
|
669
671
|
h(jt, "TableCompiler");
|
|
670
672
|
let he = jt;
|
|
671
|
-
var Ft, tt, et, Vt, Yt,
|
|
672
|
-
const
|
|
673
|
+
var Ft, tt, et, Vt, Yt, ht, Ut, Xt;
|
|
674
|
+
const mt = class mt extends HTMLElement {
|
|
673
675
|
constructor() {
|
|
674
676
|
super();
|
|
675
677
|
d(this, Ft);
|
|
676
678
|
d(this, tt, null);
|
|
677
679
|
d(this, et);
|
|
678
|
-
|
|
680
|
+
A(this, "invalidate", /* @__PURE__ */ h(() => {
|
|
679
681
|
t(this, et).refresh();
|
|
680
682
|
}, "invalidate"));
|
|
681
683
|
d(this, Vt, /* @__PURE__ */ h(() => {
|
|
@@ -683,40 +685,40 @@ const yt = class yt extends HTMLElement {
|
|
|
683
685
|
{ selector: ".ng-container-body", type: null },
|
|
684
686
|
{ selector: ".ng-container-left", type: "left" },
|
|
685
687
|
{ selector: ".ng-container-right", type: "right" }
|
|
686
|
-
].forEach(({ selector:
|
|
687
|
-
const n = this.querySelector(
|
|
688
|
+
].forEach(({ selector: i, type: r }) => {
|
|
689
|
+
const n = this.querySelector(i);
|
|
688
690
|
if (!n) return;
|
|
689
691
|
n.innerHTML = "";
|
|
690
692
|
const o = document.createElement("div");
|
|
691
|
-
o.className = "ng-part-header", o.appendChild(t(this,
|
|
693
|
+
o.className = "ng-part-header", o.appendChild(t(this, ht).call(this, t(this, tt), r, "header"));
|
|
692
694
|
const a = document.createElement("div");
|
|
693
695
|
a.className = "ng-part-body";
|
|
694
696
|
const c = document.createElement("div");
|
|
695
|
-
c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this,
|
|
697
|
+
c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ht).call(this, t(this, tt), r, "body"));
|
|
696
698
|
const l = document.createElement("div");
|
|
697
699
|
l.className = "ng-virtual-spacer", l.style.width = "100%", l.style.pointerEvents = "none", c.appendChild(l), a.appendChild(c);
|
|
698
700
|
const f = document.createElement("div");
|
|
699
|
-
f.className = "ng-part-footer", f.appendChild(t(this,
|
|
701
|
+
f.className = "ng-part-footer", f.appendChild(t(this, ht).call(this, t(this, tt), r, "footer")), n.appendChild(o), n.appendChild(a), n.appendChild(f);
|
|
700
702
|
});
|
|
701
703
|
}, "#renderSplitContainers"));
|
|
702
704
|
d(this, Yt, /* @__PURE__ */ h(() => {
|
|
703
705
|
["left", "right", "body"].forEach((e) => {
|
|
704
|
-
const
|
|
705
|
-
if (!
|
|
706
|
+
const i = this.querySelector(`.ng-container-${e}`), r = i == null ? void 0 : i.querySelectorAll("table");
|
|
707
|
+
if (!i || !r || r.length === 0) return;
|
|
706
708
|
let n = 0;
|
|
707
709
|
r[0].querySelectorAll("col").forEach((o) => {
|
|
708
710
|
const a = parseInt(o.getAttribute("width"), 10);
|
|
709
711
|
isNaN(n) || (n += a);
|
|
710
|
-
}), e === "body" ?
|
|
712
|
+
}), e === "body" ? i.style.flex = "1" : (i.style.flex = `0 0 ${n}px`, i.style.width = `${n}px`);
|
|
711
713
|
});
|
|
712
714
|
}, "#updateContainerWidths"));
|
|
713
|
-
|
|
715
|
+
A(this, "generate", /* @__PURE__ */ h((e) => {
|
|
714
716
|
e && (y(this, tt, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this), t(this, et).initialize(), setTimeout(() => {
|
|
715
|
-
var
|
|
716
|
-
(
|
|
717
|
+
var i;
|
|
718
|
+
(i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
|
|
717
719
|
}, 0));
|
|
718
720
|
}, "generate"));
|
|
719
|
-
d(this,
|
|
721
|
+
d(this, ht, /* @__PURE__ */ h((e, i, r) => {
|
|
720
722
|
const n = e.cloneNode(!0), o = n.querySelector("thead"), a = n.querySelector("tbody"), c = n.querySelector("tfoot");
|
|
721
723
|
if (r === "header") {
|
|
722
724
|
if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
|
|
@@ -724,28 +726,28 @@ const yt = class yt extends HTMLElement {
|
|
|
724
726
|
f.className = "fixed-tbody", n.appendChild(f);
|
|
725
727
|
}
|
|
726
728
|
} else r === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
|
|
727
|
-
return
|
|
729
|
+
return i === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
|
|
728
730
|
l.getAttribute("fixed") !== "left" && l.remove();
|
|
729
|
-
}) :
|
|
731
|
+
}) : i === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
|
|
730
732
|
l.getAttribute("fixed") !== "right" && l.remove();
|
|
731
733
|
}) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
|
|
732
734
|
l.remove();
|
|
733
735
|
}), n;
|
|
734
736
|
}, "#createSplitTable"));
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
const
|
|
738
|
-
|
|
737
|
+
A(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, et).getRowHeight(), "getRowHeight"));
|
|
738
|
+
A(this, "scrollToX", /* @__PURE__ */ h((e) => {
|
|
739
|
+
const i = this.querySelector(".ng-container-body .ng-part-body");
|
|
740
|
+
i && (i.scrollLeft = e);
|
|
739
741
|
}, "scrollToX"));
|
|
740
|
-
|
|
741
|
-
const
|
|
742
|
-
|
|
742
|
+
A(this, "scrollToY", /* @__PURE__ */ h((e) => {
|
|
743
|
+
const i = this.querySelector(".ng-container-body .ng-part-body");
|
|
744
|
+
i && (i.scrollTop = e);
|
|
743
745
|
}, "scrollToY"));
|
|
744
746
|
d(this, Ut, /* @__PURE__ */ h(() => {
|
|
745
747
|
t(this, Xt).call(this);
|
|
746
748
|
}, "#init"));
|
|
747
749
|
d(this, Xt, /* @__PURE__ */ h(() => {
|
|
748
|
-
const e =
|
|
750
|
+
const e = mt.SCROLLBAR_SIZE;
|
|
749
751
|
this.innerHTML = `
|
|
750
752
|
<style>
|
|
751
753
|
nine-table-sheet {
|
|
@@ -896,33 +898,33 @@ const yt = class yt extends HTMLElement {
|
|
|
896
898
|
this.innerHTML = "", U.log("NineTableSheet destroyed.");
|
|
897
899
|
}
|
|
898
900
|
};
|
|
899
|
-
Ft = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(),
|
|
900
|
-
let
|
|
901
|
-
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet",
|
|
902
|
-
var Kt,
|
|
901
|
+
Ft = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ht = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), h(mt, "NineTableSheet"), A(mt, "SCROLLBAR_SIZE", 16);
|
|
902
|
+
let It = mt;
|
|
903
|
+
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", It);
|
|
904
|
+
var Kt, kt;
|
|
903
905
|
const Ie = class Ie extends HTMLElement {
|
|
904
906
|
constructor() {
|
|
905
907
|
super();
|
|
906
908
|
d(this, Kt, /* @__PURE__ */ h(() => {
|
|
907
909
|
var e;
|
|
908
|
-
(e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (
|
|
910
|
+
(e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (i) => {
|
|
909
911
|
var o;
|
|
910
|
-
const r =
|
|
911
|
-
t(this,
|
|
912
|
-
}), t(this,
|
|
912
|
+
const r = i.ctrlKey || i.metaKey || i.shiftKey, n = parseInt((o = i.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
|
|
913
|
+
t(this, kt).call(this, n, r);
|
|
914
|
+
}), t(this, kt).call(this, 0, !1);
|
|
913
915
|
}, "#init"));
|
|
914
|
-
d(this,
|
|
916
|
+
d(this, kt, /* @__PURE__ */ h((e, i = !1) => {
|
|
915
917
|
const r = /* @__PURE__ */ h(() => {
|
|
916
918
|
const f = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
917
919
|
Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
|
|
918
920
|
const b = f.filter((g) => g.classList.contains("active"));
|
|
919
921
|
b.length < 2 || b.forEach((g) => {
|
|
920
|
-
const m = parseInt(g.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${m}"]`),
|
|
921
|
-
v &&
|
|
922
|
+
const m = parseInt(g.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${m}"]`), E = f[m + 1];
|
|
923
|
+
v && E && E.classList.contains("active") && v.style.setProperty("display", "flex");
|
|
922
924
|
});
|
|
923
925
|
}, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = n.querySelectorAll(".nine-tab-item"), c = o.querySelectorAll("nine-table-sheet");
|
|
924
926
|
if (!a[e]) return;
|
|
925
|
-
if (!
|
|
927
|
+
if (!i)
|
|
926
928
|
a.forEach((f, u) => {
|
|
927
929
|
f.classList.toggle("active", u === e);
|
|
928
930
|
}), c.forEach((f, u) => {
|
|
@@ -947,28 +949,28 @@ const Ie = class Ie extends HTMLElement {
|
|
|
947
949
|
t(this, Kt).call(this);
|
|
948
950
|
}
|
|
949
951
|
};
|
|
950
|
-
Kt = new WeakMap(),
|
|
952
|
+
Kt = new WeakMap(), kt = new WeakMap(), h(Ie, "NineTableSheets");
|
|
951
953
|
let de = Ie;
|
|
952
954
|
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
|
|
953
|
-
var I, Zt,
|
|
955
|
+
var I, Zt, Tt, Gt;
|
|
954
956
|
const _e = class _e {
|
|
955
|
-
constructor(
|
|
957
|
+
constructor(s) {
|
|
956
958
|
d(this, I);
|
|
957
959
|
d(this, Zt, /* @__PURE__ */ h(() => {
|
|
958
|
-
t(this, Gt).call(this), new ResizeObserver((
|
|
959
|
-
for (let e of
|
|
960
|
-
t(this, I).getAttribute("auto-height") === "true" && t(this,
|
|
960
|
+
t(this, Gt).call(this), new ResizeObserver((s) => {
|
|
961
|
+
for (let e of s)
|
|
962
|
+
t(this, I).getAttribute("auto-height") === "true" && t(this, Tt).call(this);
|
|
961
963
|
}).observe(t(this, I));
|
|
962
964
|
}, "#init"));
|
|
963
|
-
d(this,
|
|
965
|
+
d(this, Tt, /* @__PURE__ */ h(() => {
|
|
964
966
|
var c, l;
|
|
965
|
-
const
|
|
966
|
-
if (
|
|
967
|
-
const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10,
|
|
967
|
+
const s = Array.from(t(this, I).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
968
|
+
if (s.length === 0) return;
|
|
969
|
+
const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10, i = Math.max(...s.map((f) => f.getRowHeight())), r = (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, o = It.SCROLLBAR_SIZE, a = e * i + r + n + o;
|
|
968
970
|
t(this, I).style.height = `${a}px`;
|
|
969
971
|
}, "#applyAutoHeight"));
|
|
970
972
|
d(this, Gt, /* @__PURE__ */ h(() => {
|
|
971
|
-
const e = Array.from(t(this, I).children).filter((c) => c.tagName === "TABLE"),
|
|
973
|
+
const e = Array.from(t(this, I).children).filter((c) => c.tagName === "TABLE"), i = t(this, I).getAttribute("auto-height") === "true", r = e.length, n = e.map((c, l) => {
|
|
972
974
|
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>` : "";
|
|
973
975
|
return u + b;
|
|
974
976
|
}).join(""), o = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
|
|
@@ -979,7 +981,7 @@ const _e = class _e {
|
|
|
979
981
|
flex-direction: column;
|
|
980
982
|
position: relative;
|
|
981
983
|
overflow: hidden;
|
|
982
|
-
height: ${
|
|
984
|
+
height: ${i ? "auto" : "100%"};
|
|
983
985
|
background: #fff;
|
|
984
986
|
}
|
|
985
987
|
|
|
@@ -1066,74 +1068,74 @@ const _e = class _e {
|
|
|
1066
1068
|
const a = t(this, I).shadowRoot.querySelectorAll("nine-table-sheet");
|
|
1067
1069
|
a == null || a.forEach((c, l) => {
|
|
1068
1070
|
e[l] && setTimeout(() => {
|
|
1069
|
-
c.generate(e[l]),
|
|
1071
|
+
c.generate(e[l]), i && t(this, Tt).call(this);
|
|
1070
1072
|
});
|
|
1071
1073
|
});
|
|
1072
1074
|
}, "#render"));
|
|
1073
|
-
y(this, I,
|
|
1075
|
+
y(this, I, s), t(this, Zt).call(this);
|
|
1074
1076
|
}
|
|
1075
1077
|
};
|
|
1076
|
-
I = new WeakMap(), Zt = new WeakMap(),
|
|
1078
|
+
I = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Gt = new WeakMap(), h(_e, "LayoutManager");
|
|
1077
1079
|
let fe = _e;
|
|
1078
|
-
var
|
|
1080
|
+
var Ct, dt;
|
|
1079
1081
|
const Ne = class Ne {
|
|
1080
|
-
constructor(
|
|
1081
|
-
d(this,
|
|
1082
|
-
d(this,
|
|
1083
|
-
|
|
1084
|
-
y(this,
|
|
1082
|
+
constructor(s) {
|
|
1083
|
+
d(this, Ct);
|
|
1084
|
+
d(this, dt, -1);
|
|
1085
|
+
A(this, "count", /* @__PURE__ */ h(() => t(this, Ct).rawRecords.length, "count"));
|
|
1086
|
+
y(this, Ct, s);
|
|
1085
1087
|
}
|
|
1086
1088
|
get at() {
|
|
1087
|
-
return t(this,
|
|
1089
|
+
return t(this, dt);
|
|
1088
1090
|
}
|
|
1089
|
-
set at(
|
|
1090
|
-
y(this,
|
|
1091
|
+
set at(s) {
|
|
1092
|
+
y(this, dt, parseInt(s, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, dt)}"]`) && setTimeout(() => {
|
|
1091
1093
|
});
|
|
1092
1094
|
}
|
|
1093
1095
|
};
|
|
1094
|
-
|
|
1096
|
+
Ct = new WeakMap(), dt = new WeakMap(), h(Ne, "ngRow");
|
|
1095
1097
|
let ue = Ne;
|
|
1096
|
-
var _, T, N,
|
|
1098
|
+
var _, T, N, ft, Jt, V, Qt, st, Lt, te, ee, ut;
|
|
1097
1099
|
const W = class W {
|
|
1098
|
-
constructor(
|
|
1100
|
+
constructor(s, e) {
|
|
1099
1101
|
d(this, _);
|
|
1100
1102
|
d(this, T);
|
|
1101
1103
|
d(this, N, []);
|
|
1102
|
-
d(this,
|
|
1104
|
+
d(this, ft, []);
|
|
1103
1105
|
d(this, Jt, 0);
|
|
1104
1106
|
d(this, V, []);
|
|
1105
1107
|
d(this, Qt, /* @__PURE__ */ h(() => {
|
|
1106
1108
|
y(this, V, []);
|
|
1107
|
-
const
|
|
1108
|
-
Array.from(
|
|
1109
|
-
var
|
|
1110
|
-
t(this, V).push(((
|
|
1109
|
+
const s = t(this, _).template || [];
|
|
1110
|
+
Array.from(s).forEach((e) => {
|
|
1111
|
+
var i;
|
|
1112
|
+
t(this, V).push(((i = e.getBoundingClientRect) == null ? void 0 : i.call(e).height) || 24);
|
|
1111
1113
|
}), (t(this, T).rawRecords || []).forEach((e) => {
|
|
1112
|
-
e.__ng || (e.__ng = t(this,
|
|
1114
|
+
e.__ng || (e.__ng = t(this, Lt).call(this)), e.__ng.height = t(this, V).slice();
|
|
1113
1115
|
});
|
|
1114
1116
|
}, "#initialize"));
|
|
1115
1117
|
d(this, st, /* @__PURE__ */ h(() => {
|
|
1116
|
-
t(this, _).shadowRoot.querySelectorAll("nine-table-sheet").forEach((
|
|
1117
|
-
|
|
1118
|
+
t(this, _).shadowRoot.querySelectorAll("nine-table-sheet").forEach((s) => {
|
|
1119
|
+
s.invalidate();
|
|
1118
1120
|
});
|
|
1119
1121
|
}, "#invalidate"));
|
|
1120
|
-
|
|
1122
|
+
A(this, "get", /* @__PURE__ */ h((s, e) => {
|
|
1121
1123
|
var n;
|
|
1122
|
-
const
|
|
1123
|
-
if (!
|
|
1124
|
-
if (
|
|
1125
|
-
if (
|
|
1124
|
+
const i = this.getValidData();
|
|
1125
|
+
if (!i || i.length <= 0) return;
|
|
1126
|
+
if (s == null) return t(this, ut).call(this, i);
|
|
1127
|
+
if (s < 0 || s >= i.length) return null;
|
|
1126
1128
|
const r = typeof ((n = t(this, _).fields) == null ? void 0 : n.get) == "function" ? t(this, _).fields.get() : [];
|
|
1127
1129
|
if (e != null) {
|
|
1128
1130
|
const o = r.indexOf(e);
|
|
1129
|
-
return o >= 0 ? s
|
|
1131
|
+
return o >= 0 ? i[s].v[o] : null;
|
|
1130
1132
|
}
|
|
1131
|
-
return t(this,
|
|
1133
|
+
return t(this, ut).call(this, i[s]);
|
|
1132
1134
|
}, "get"));
|
|
1133
|
-
|
|
1134
|
-
this.clear(), this.add(
|
|
1135
|
+
A(this, "set", /* @__PURE__ */ h((s) => {
|
|
1136
|
+
this.clear(), this.add(s, !1), t(this, st).call(this);
|
|
1135
1137
|
}, "set"));
|
|
1136
|
-
d(this,
|
|
1138
|
+
d(this, Lt, /* @__PURE__ */ h(() => ({
|
|
1137
1139
|
rowState: W.ROW_STATE.EMPTY,
|
|
1138
1140
|
deleted: !1,
|
|
1139
1141
|
filtered: !1,
|
|
@@ -1142,70 +1144,70 @@ const W = class W {
|
|
|
1142
1144
|
c: {},
|
|
1143
1145
|
_: [0, 0, 0, 0, W.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, V).slice(), -1, {}, {}]
|
|
1144
1146
|
}), "#getDefaultMeta"));
|
|
1145
|
-
|
|
1146
|
-
y(this, N, []), y(this,
|
|
1147
|
+
A(this, "reset", /* @__PURE__ */ h(() => {
|
|
1148
|
+
y(this, N, []), y(this, ft, []), t(this, st).call(this);
|
|
1147
1149
|
}, "reset"));
|
|
1148
|
-
|
|
1149
|
-
var
|
|
1150
|
-
t(this, T).rawRecords = [], y(this, N, []), y(this,
|
|
1150
|
+
A(this, "clear", /* @__PURE__ */ h(() => {
|
|
1151
|
+
var s;
|
|
1152
|
+
t(this, T).rawRecords = [], y(this, N, []), y(this, ft, []), (s = t(this, T).viewRecords) != null && s.reset && t(this, T).viewRecords.reset();
|
|
1151
1153
|
}, "clear"));
|
|
1152
|
-
d(this, te, /* @__PURE__ */ h((
|
|
1154
|
+
d(this, te, /* @__PURE__ */ h((s) => {
|
|
1153
1155
|
var r;
|
|
1154
|
-
Array.isArray(
|
|
1155
|
-
const e = typeof ((r = t(this, _).fields) == null ? void 0 : r.get) == "function" ? t(this, _).fields.get() : Object.keys(
|
|
1156
|
-
return
|
|
1156
|
+
Array.isArray(s) || (s = [s]);
|
|
1157
|
+
const e = typeof ((r = t(this, _).fields) == null ? void 0 : r.get) == "function" ? t(this, _).fields.get() : Object.keys(s[0] || {}), i = [];
|
|
1158
|
+
return s.forEach((n) => {
|
|
1157
1159
|
const o = { v: [] };
|
|
1158
1160
|
e.forEach((a) => {
|
|
1159
1161
|
o.v.push(n[a] !== void 0 && n[a] !== null ? n[a] : "");
|
|
1160
|
-
}),
|
|
1161
|
-
}),
|
|
1162
|
+
}), i.push(o);
|
|
1163
|
+
}), i;
|
|
1162
1164
|
}, "#json2Array"));
|
|
1163
|
-
d(this, ee, /* @__PURE__ */ h((
|
|
1164
|
-
e.__ng = t(this,
|
|
1165
|
-
}),
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
const
|
|
1169
|
-
t(this, T).rawRecords = t(this, T).rawRecords.concat(t(this, ee).call(this,
|
|
1165
|
+
d(this, ee, /* @__PURE__ */ h((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
|
|
1166
|
+
e.__ng = t(this, Lt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
|
|
1167
|
+
}), s), "#defaultInsert"));
|
|
1168
|
+
A(this, "add", /* @__PURE__ */ h((s, e = !0) => {
|
|
1169
|
+
s === void 0 && (s = {});
|
|
1170
|
+
const i = t(this, te).call(this, s);
|
|
1171
|
+
t(this, T).rawRecords = t(this, T).rawRecords.concat(t(this, ee).call(this, i)), this.resetRecords();
|
|
1170
1172
|
const r = this.count() - 1;
|
|
1171
|
-
return e ||
|
|
1173
|
+
return e || i.forEach((n, o) => {
|
|
1172
1174
|
const a = t(this, T).rawRecords[r - o];
|
|
1173
1175
|
a && (a.__ng.rowState = W.ROW_STATE.EMPTY);
|
|
1174
1176
|
}), t(this, st).call(this), r;
|
|
1175
1177
|
}, "add"));
|
|
1176
|
-
|
|
1178
|
+
A(this, "delete", /* @__PURE__ */ h((s) => {
|
|
1177
1179
|
let e = [];
|
|
1178
|
-
Array.isArray(
|
|
1179
|
-
if (t(this, N)[
|
|
1180
|
-
const r = t(this, N)[
|
|
1181
|
-
t(this, N)[
|
|
1180
|
+
Array.isArray(s) ? e = s : typeof s > "u" ? e = [t(this, T).host.row.at] : e = [parseInt(s, 10)], e.sort((i, r) => r - i).forEach((i) => {
|
|
1181
|
+
if (t(this, N)[i]) {
|
|
1182
|
+
const r = t(this, N)[i].__ng.rowid;
|
|
1183
|
+
t(this, N)[i].__ng.rowState === W.ROW_STATE.INSERT ? t(this, T).rawRecords = t(this, T).rawRecords.filter((n) => n.__ng.rowid !== r) : t(this, T).rawRecords.forEach((n) => {
|
|
1182
1184
|
n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState = W.ROW_STATE.DELETE);
|
|
1183
1185
|
});
|
|
1184
1186
|
}
|
|
1185
1187
|
}), this.resetRecords(), t(this, st).call(this);
|
|
1186
1188
|
}, "delete"));
|
|
1187
|
-
|
|
1189
|
+
A(this, "setValue", /* @__PURE__ */ h((s, e, i) => {
|
|
1188
1190
|
var c;
|
|
1189
|
-
|
|
1191
|
+
s = parseInt(s, 10);
|
|
1190
1192
|
const n = (typeof ((c = t(this, _).fields) == null ? void 0 : c.get) == "function" ? t(this, _).fields.get() : []).indexOf(e);
|
|
1191
1193
|
if (n < 0) return;
|
|
1192
|
-
const o = this.getValidData()[
|
|
1194
|
+
const o = this.getValidData()[s];
|
|
1193
1195
|
if (!o) return;
|
|
1194
1196
|
const a = o.v[n];
|
|
1195
|
-
a !==
|
|
1197
|
+
a !== i && o.__ng.rowState !== W.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = W.ROW_STATE.UPDATE), o.v[n] = i;
|
|
1196
1198
|
}, "setValue"));
|
|
1197
|
-
|
|
1198
|
-
y(this,
|
|
1199
|
-
|
|
1200
|
-
}), t(this, N).forEach((
|
|
1201
|
-
|
|
1199
|
+
A(this, "resetRecords", /* @__PURE__ */ h(() => {
|
|
1200
|
+
y(this, ft, t(this, T).rawRecords.filter((s) => !s.__ng.deleted)), y(this, N, t(this, T).rawRecords.filter((s) => !s.__ng.deleted && !s.__ng.filtered)), t(this, T).rawRecords.forEach((s, e) => {
|
|
1201
|
+
s.__ng.rowidx = e;
|
|
1202
|
+
}), t(this, N).forEach((s, e) => {
|
|
1203
|
+
s.__ng.i = e;
|
|
1202
1204
|
});
|
|
1203
1205
|
}, "resetRecords"));
|
|
1204
|
-
|
|
1205
|
-
d(this,
|
|
1206
|
+
A(this, "getValidData", /* @__PURE__ */ h(() => (t(this, N).length === 0 && t(this, T).rawRecords.length > 0 && this.resetRecords(), t(this, N)), "getValidData"));
|
|
1207
|
+
d(this, ut, /* @__PURE__ */ h((s) => {
|
|
1206
1208
|
var o;
|
|
1207
|
-
if (!
|
|
1208
|
-
const e = !Array.isArray(
|
|
1209
|
+
if (!s) return s;
|
|
1210
|
+
const e = !Array.isArray(s), i = e ? [s] : s, r = typeof ((o = t(this, _).fields) == null ? void 0 : o.get) == "function" ? t(this, _).fields.get() : [], n = i.filter((a) => !a.__ng.deleted).map((a) => {
|
|
1209
1211
|
const c = {};
|
|
1210
1212
|
return r.forEach((l, f) => {
|
|
1211
1213
|
c[l] = a.v ? a.v[f] : a[l];
|
|
@@ -1213,14 +1215,14 @@ const W = class W {
|
|
|
1213
1215
|
});
|
|
1214
1216
|
return e ? n[0] : n;
|
|
1215
1217
|
}, "#conv"));
|
|
1216
|
-
|
|
1217
|
-
y(this, _,
|
|
1218
|
+
A(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
|
|
1219
|
+
y(this, _, s), y(this, T, e), t(this, Qt).call(this);
|
|
1218
1220
|
}
|
|
1219
1221
|
get source() {
|
|
1220
|
-
return t(this,
|
|
1222
|
+
return t(this, ut).call(this, t(this, T).rawRecords);
|
|
1221
1223
|
}
|
|
1222
|
-
set source(
|
|
1223
|
-
this.clear(), this.add(
|
|
1224
|
+
set source(s) {
|
|
1225
|
+
this.clear(), this.add(s, !1);
|
|
1224
1226
|
}
|
|
1225
1227
|
get nextId() {
|
|
1226
1228
|
return ++Ye(this, Jt)._;
|
|
@@ -1232,8 +1234,8 @@ const W = class W {
|
|
|
1232
1234
|
return this.length;
|
|
1233
1235
|
}
|
|
1234
1236
|
};
|
|
1235
|
-
_ = new WeakMap(), T = new WeakMap(), N = new WeakMap(),
|
|
1236
|
-
|
|
1237
|
+
_ = new WeakMap(), T = new WeakMap(), N = new WeakMap(), ft = new WeakMap(), Jt = new WeakMap(), V = new WeakMap(), Qt = new WeakMap(), st = new WeakMap(), Lt = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ut = new WeakMap(), h(W, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
|
|
1238
|
+
A(W, "ROW_STATE", {
|
|
1237
1239
|
EMPTY: "EMPTY",
|
|
1238
1240
|
NORMAL: "NORMAL",
|
|
1239
1241
|
INSERT: "INSERT",
|
|
@@ -1243,55 +1245,55 @@ E(W, "ROW_STATE", {
|
|
|
1243
1245
|
let ge = W;
|
|
1244
1246
|
var it;
|
|
1245
1247
|
const We = class We {
|
|
1246
|
-
constructor(
|
|
1248
|
+
constructor(s) {
|
|
1247
1249
|
d(this, it);
|
|
1248
|
-
y(this, it,
|
|
1250
|
+
y(this, it, s), this.row = new ue(this), this.data = new ge(t(this, it), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
|
|
1249
1251
|
var e;
|
|
1250
1252
|
(e = t(this, it).view) != null && e.redraw && t(this, it).view.redraw();
|
|
1251
1253
|
}, this.setDataSource = (e) => {
|
|
1252
1254
|
this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
|
|
1253
1255
|
}, this.getRowState = (e) => {
|
|
1254
1256
|
var r, n;
|
|
1255
|
-
const
|
|
1256
|
-
if (!(
|
|
1257
|
-
return (n = (r = this.data.getValidData()[
|
|
1257
|
+
const i = parseInt(e, 10);
|
|
1258
|
+
if (!(i >= this.data.count()))
|
|
1259
|
+
return (n = (r = this.data.getValidData()[i]) == null ? void 0 : r.__ng) == null ? void 0 : n.rowState;
|
|
1258
1260
|
}, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
|
|
1259
1261
|
this.row.at = e;
|
|
1260
|
-
}, 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,
|
|
1261
|
-
e = parseInt(e, 10), this.data.setValue(e,
|
|
1262
|
+
}, 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, i) => this.data.get(e, i), this.setColumn = (e, i, r) => {
|
|
1263
|
+
e = parseInt(e, 10), this.data.setValue(e, i, r);
|
|
1262
1264
|
}, this.setDataSource([]);
|
|
1263
1265
|
}
|
|
1264
1266
|
};
|
|
1265
1267
|
it = new WeakMap(), h(We, "ngDataManager");
|
|
1266
1268
|
let be = We;
|
|
1267
|
-
var
|
|
1269
|
+
var gt, L, Ht, se;
|
|
1268
1270
|
const Oe = class Oe {
|
|
1269
1271
|
// 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
|
|
1270
|
-
constructor(
|
|
1271
|
-
d(this,
|
|
1272
|
+
constructor(s) {
|
|
1273
|
+
d(this, gt);
|
|
1272
1274
|
d(this, L, []);
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
t(this, L).some((r) => r.name ===
|
|
1276
|
-
}), t(this,
|
|
1275
|
+
A(this, "add", /* @__PURE__ */ h((s, e = "string") => {
|
|
1276
|
+
s.forEach((i) => {
|
|
1277
|
+
t(this, L).some((r) => r.name === i) || t(this, L).push({ name: i, type: e });
|
|
1278
|
+
}), t(this, Ht).call(this);
|
|
1277
1279
|
}, "add"));
|
|
1278
|
-
d(this,
|
|
1279
|
-
const
|
|
1280
|
+
d(this, Ht, /* @__PURE__ */ h(() => {
|
|
1281
|
+
const s = /* @__PURE__ */ new Map();
|
|
1280
1282
|
t(this, L).forEach((e) => {
|
|
1281
|
-
|
|
1282
|
-
}), y(this, L, Array.from(
|
|
1283
|
+
s.set(e.name, e.type);
|
|
1284
|
+
}), y(this, L, Array.from(s, ([e, i]) => ({ name: e, type: i }))), y(this, L, t(this, L).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, L).sort((e, i) => e.name.length < i.name.length ? 1 : -1);
|
|
1283
1285
|
}, "#adjust"));
|
|
1284
1286
|
d(this, se, /* @__PURE__ */ h(() => {
|
|
1285
|
-
y(this, L, []), U.log(t(this,
|
|
1286
|
-
const
|
|
1287
|
-
if (!(!
|
|
1288
|
-
for (const e of
|
|
1289
|
-
U.log(e), $("[data-bind]", e).each((
|
|
1287
|
+
y(this, L, []), U.log(t(this, gt).querySelectorAll("table"));
|
|
1288
|
+
const s = Array.from(t(this, gt).querySelectorAll("table"));
|
|
1289
|
+
if (!(!s || s.length === 0)) {
|
|
1290
|
+
for (const e of s)
|
|
1291
|
+
U.log(e), $("[data-bind]", e).each((i, r) => {
|
|
1290
1292
|
const n = r.dataset.bind, o = r.getAttribute("data-type") || "string";
|
|
1291
1293
|
n && t(this, L).push({ name: n, type: o });
|
|
1292
|
-
}), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((
|
|
1293
|
-
$(`[${
|
|
1294
|
-
var o = n.getAttribute(
|
|
1294
|
+
}), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((i) => {
|
|
1295
|
+
$(`[${i}]`, e).each((r, n) => {
|
|
1296
|
+
var o = n.getAttribute(i);
|
|
1295
1297
|
if (o.indexOf("data.") < 0) {
|
|
1296
1298
|
const a = o.search(/[(]/g);
|
|
1297
1299
|
if (a > 0)
|
|
@@ -1310,32 +1312,32 @@ const Oe = class Oe {
|
|
|
1310
1312
|
});
|
|
1311
1313
|
});
|
|
1312
1314
|
});
|
|
1313
|
-
t(this,
|
|
1315
|
+
t(this, Ht).call(this);
|
|
1314
1316
|
}
|
|
1315
1317
|
}, "#init"));
|
|
1316
|
-
y(this,
|
|
1318
|
+
y(this, gt, s), t(this, se).call(this);
|
|
1317
1319
|
}
|
|
1318
1320
|
// 🎯 기존에 필드 이름만 쓰던 곳들과의 호환을 위해 이름 배열만 리턴하는 메서드 유지
|
|
1319
1321
|
get() {
|
|
1320
|
-
return t(this, L).map((
|
|
1322
|
+
return t(this, L).map((s) => s.name);
|
|
1321
1323
|
}
|
|
1322
1324
|
// 🎯 내부 객체 통째로 얻기
|
|
1323
1325
|
getFields() {
|
|
1324
1326
|
return t(this, L);
|
|
1325
1327
|
}
|
|
1326
1328
|
// 🎯 특정 필드의 데이터 타입 조회
|
|
1327
|
-
getType(
|
|
1328
|
-
const e = t(this, L).find((
|
|
1329
|
+
getType(s) {
|
|
1330
|
+
const e = t(this, L).find((i) => i.name === s);
|
|
1329
1331
|
return e ? e.type : "string";
|
|
1330
1332
|
}
|
|
1331
|
-
indexOf(
|
|
1332
|
-
return t(this, L).findIndex((e) => e.name ===
|
|
1333
|
+
indexOf(s) {
|
|
1334
|
+
return t(this, L).findIndex((e) => e.name === s);
|
|
1333
1335
|
}
|
|
1334
|
-
includes(
|
|
1335
|
-
return t(this, L).some((e) => e.name ===
|
|
1336
|
+
includes(s) {
|
|
1337
|
+
return t(this, L).some((e) => e.name === s);
|
|
1336
1338
|
}
|
|
1337
1339
|
};
|
|
1338
|
-
|
|
1340
|
+
gt = new WeakMap(), L = new WeakMap(), Ht = new WeakMap(), se = new WeakMap(), h(Oe, "ngFields");
|
|
1339
1341
|
let ye = Oe;
|
|
1340
1342
|
var rt, ie, re;
|
|
1341
1343
|
const Be = class Be extends HTMLElement {
|
|
@@ -1371,7 +1373,7 @@ const Be = class Be extends HTMLElement {
|
|
|
1371
1373
|
rt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), h(Be, "NineTable");
|
|
1372
1374
|
let pe = Be;
|
|
1373
1375
|
customElements.get("nine-table") || customElements.define("nine-table", pe);
|
|
1374
|
-
const
|
|
1376
|
+
const xt = class xt extends HTMLElement {
|
|
1375
1377
|
// 👈 커스텀 스타일용 캐시 추가
|
|
1376
1378
|
constructor() {
|
|
1377
1379
|
super();
|
|
@@ -1382,31 +1384,31 @@ const pt = class pt extends HTMLElement {
|
|
|
1382
1384
|
connectedCallback() {
|
|
1383
1385
|
}
|
|
1384
1386
|
};
|
|
1385
|
-
h(
|
|
1386
|
-
let me =
|
|
1387
|
-
var C,
|
|
1387
|
+
h(xt, "BasicCellElement"), A(xt, "_styleCache", /* @__PURE__ */ new Map()), A(xt, "_customStyleCache", /* @__PURE__ */ new Map());
|
|
1388
|
+
let me = xt;
|
|
1389
|
+
var C, $t, p, Ae, qe, Re, ke, Te;
|
|
1388
1390
|
const ze = class ze extends me {
|
|
1389
1391
|
constructor() {
|
|
1390
1392
|
super();
|
|
1391
1393
|
d(this, C);
|
|
1392
|
-
d(this,
|
|
1394
|
+
d(this, $t);
|
|
1393
1395
|
d(this, p);
|
|
1394
1396
|
d(this, Ae);
|
|
1395
|
-
d(this, Re);
|
|
1396
1397
|
d(this, qe);
|
|
1398
|
+
d(this, Re);
|
|
1397
1399
|
d(this, ke);
|
|
1398
|
-
|
|
1400
|
+
A(this, "getDisplayText", /* @__PURE__ */ h((e) => {
|
|
1399
1401
|
if (t(this, p))
|
|
1400
1402
|
if (t(this, p).closest("tbody")) {
|
|
1401
|
-
const
|
|
1402
|
-
if (!
|
|
1403
|
+
const i = t(this, p).closest("tr").data, r = parseInt(t(this, p).dataset.row);
|
|
1404
|
+
if (!i) return "";
|
|
1403
1405
|
if (ninegrid.isNull(t(this, p).dataset.expr)) {
|
|
1404
1406
|
if (!ninegrid.isNull(t(this, p).dataset.bind))
|
|
1405
|
-
return
|
|
1407
|
+
return i[t(this, p).dataset.bind] || ninegrid.nvl(e, "");
|
|
1406
1408
|
} else try {
|
|
1407
|
-
return this.getExprValue(t(this, p).dataset.expr,
|
|
1409
|
+
return this.getExprValue(t(this, p).dataset.expr, i, r, t(this, p));
|
|
1408
1410
|
} catch {
|
|
1409
|
-
console.error(t(this, p).dataset.expr,
|
|
1411
|
+
console.error(t(this, p).dataset.expr, i, t(this, p).dataset.row);
|
|
1410
1412
|
}
|
|
1411
1413
|
return ninegrid.nvl(e, "");
|
|
1412
1414
|
} else
|
|
@@ -1419,13 +1421,13 @@ const ze = class ze extends me {
|
|
|
1419
1421
|
if (!(!t(this, C) || !t(this, C).template || !t(this, p).closest("tbody.bindable"))) {
|
|
1420
1422
|
var e = ninegrid.j.querySelectorAll(t(this, p)).attr("suppress");
|
|
1421
1423
|
if (e && (e = parseInt(e)), e && !isNaN(e)) {
|
|
1422
|
-
var
|
|
1423
|
-
$("th,td",
|
|
1424
|
+
var i = t(this, p).closest("tr"), r = [];
|
|
1425
|
+
$("th,td", i).each((x, H) => {
|
|
1424
1426
|
var k = ninegrid.j.querySelectorAll(H).attr("suppress");
|
|
1425
1427
|
k && H.dataset.row && (k = parseInt(k), !isNaN(k) && k <= e && r.push(k));
|
|
1426
1428
|
}), r.sort();
|
|
1427
1429
|
var n = !1;
|
|
1428
|
-
if (parseInt(
|
|
1430
|
+
if (parseInt(i.sectionRowIndex / t(this, C).template.length) > 0)
|
|
1429
1431
|
for (var o of r) {
|
|
1430
1432
|
if (o > e) break;
|
|
1431
1433
|
var a = parseInt(t(this, p).dataset.row), c = a - 1, l = t(this, p).closest("tr").data, f = t(this, C).data.get(c);
|
|
@@ -1439,17 +1441,17 @@ const ze = class ze extends me {
|
|
|
1439
1441
|
else
|
|
1440
1442
|
n = !0;
|
|
1441
1443
|
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"));
|
|
1442
|
-
var m = parseInt(t(this, p).dataset.matrixRow), v = m - 1,
|
|
1443
|
-
$(
|
|
1444
|
+
var m = parseInt(t(this, p).dataset.matrixRow), v = m - 1, E = t(this, C).body.querySelector(`tbody.bindable [data-col="${t(this, p).dataset.col}"][data-matrix-row="${v}"]`);
|
|
1445
|
+
$(E).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").addClass("last-suppress") : !$(E).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").removeClass("last-suppress");
|
|
1444
1446
|
}
|
|
1445
1447
|
}
|
|
1446
1448
|
}, "#resetSuppress"));
|
|
1447
|
-
|
|
1449
|
+
A(this, "getExprValue", /* @__PURE__ */ h((e, i, r, n) => {
|
|
1448
1450
|
if (typeof e < "u")
|
|
1449
1451
|
try {
|
|
1450
1452
|
r = parseInt(r);
|
|
1451
1453
|
const o = e.replace("()", "");
|
|
1452
|
-
return t(this, C)[o] ? t(this, C)[o].call(this,
|
|
1454
|
+
return t(this, C)[o] ? t(this, C)[o].call(this, i, r, t(this, p)) : t(this, C).exprFunction(e).call(this, i, r, t(this, C).data);
|
|
1453
1455
|
} catch {
|
|
1454
1456
|
return ["NG-COMBO"].includes(this.tagName) ? "" : e;
|
|
1455
1457
|
}
|
|
@@ -1458,16 +1460,16 @@ const ze = class ze extends me {
|
|
|
1458
1460
|
}, "getExprValue"));
|
|
1459
1461
|
}
|
|
1460
1462
|
connectedCallback() {
|
|
1461
|
-
super.connectedCallback(), y(this, C, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this,
|
|
1463
|
+
super.connectedCallback(), y(this, C, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this, $t, t(this, p).closest("tr"));
|
|
1462
1464
|
}
|
|
1463
1465
|
get value() {
|
|
1464
1466
|
var e = !t(this, C) || !t(this, C).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];
|
|
1465
1467
|
return e ?? "";
|
|
1466
1468
|
}
|
|
1467
1469
|
set value(e) {
|
|
1468
|
-
var
|
|
1470
|
+
var i = parseInt(t(this, p).dataset.row);
|
|
1469
1471
|
const r = this.getAttribute("update-row-state") != "false";
|
|
1470
|
-
|
|
1472
|
+
i < 0 ? t(this, C).data.setValueNF(parseInt(t(this, p).dataset.index), t(this, p).dataset.bind, e, r) : t(this, C).data.setValue(i, t(this, p).dataset.bind, e, r);
|
|
1471
1473
|
}
|
|
1472
1474
|
get row() {
|
|
1473
1475
|
return parseInt(t(this, p).dataset.row);
|
|
@@ -1476,10 +1478,10 @@ const ze = class ze extends me {
|
|
|
1476
1478
|
return t(this, p).closest("tr").data;
|
|
1477
1479
|
}
|
|
1478
1480
|
refresh() {
|
|
1479
|
-
return t(this, p).dataset.bind, parseInt(t(this, p).dataset.row), t(this,
|
|
1481
|
+
return t(this, p).dataset.bind, parseInt(t(this, p).dataset.row), t(this, $t).data, t(this, p).dataset.row;
|
|
1480
1482
|
}
|
|
1481
1483
|
};
|
|
1482
|
-
C = new WeakMap(),
|
|
1484
|
+
C = new WeakMap(), $t = new WeakMap(), p = new WeakMap(), Ae = new WeakMap(), qe = new WeakMap(), Re = new WeakMap(), ke = new WeakMap(), Te = new WeakMap(), h(ze, "CellElement");
|
|
1483
1485
|
let xe = ze;
|
|
1484
1486
|
const De = class De extends xe {
|
|
1485
1487
|
constructor() {
|
|
@@ -1494,19 +1496,19 @@ const De = class De extends xe {
|
|
|
1494
1496
|
};
|
|
1495
1497
|
h(De, "EditableCellElement");
|
|
1496
1498
|
let ve = De;
|
|
1497
|
-
var
|
|
1499
|
+
var Mt, nt, bt, yt, ne, Y, Ce;
|
|
1498
1500
|
const Pe = class Pe extends ve {
|
|
1499
1501
|
constructor() {
|
|
1500
1502
|
super();
|
|
1501
|
-
d(this,
|
|
1503
|
+
d(this, Mt);
|
|
1502
1504
|
d(this, nt);
|
|
1503
|
-
d(this,
|
|
1504
|
-
d(this,
|
|
1505
|
+
d(this, bt);
|
|
1506
|
+
d(this, yt);
|
|
1505
1507
|
d(this, ne);
|
|
1506
1508
|
d(this, Y);
|
|
1507
|
-
|
|
1509
|
+
A(this, "refresh", /* @__PURE__ */ h(() => {
|
|
1508
1510
|
const e = super.refresh();
|
|
1509
|
-
t(this,
|
|
1511
|
+
t(this, Mt).value = e;
|
|
1510
1512
|
}, "refresh"));
|
|
1511
1513
|
/**
|
|
1512
1514
|
dataRefresh = (v) => {
|
|
@@ -1542,31 +1544,31 @@ const Pe = class Pe extends ve {
|
|
|
1542
1544
|
if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
|
|
1543
1545
|
if (t(this, nt) == "number") {
|
|
1544
1546
|
let n = [];
|
|
1545
|
-
if (t(this, Y) && Number(t(this, Y)) > 0 && n.push("."), t(this,
|
|
1546
|
-
var
|
|
1547
|
+
if (t(this, Y) && Number(t(this, Y)) > 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, Y) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
|
|
1548
|
+
var i = e.target.value, r = i.indexOf(".");
|
|
1547
1549
|
if (r >= 0) {
|
|
1548
|
-
var
|
|
1549
|
-
|
|
1550
|
+
var i = i.substr(r + 1, i.length);
|
|
1551
|
+
i.length >= Number(t(this, Y)) && e.preventDefault();
|
|
1550
1552
|
}
|
|
1551
1553
|
}
|
|
1552
1554
|
}
|
|
1553
|
-
t(this,
|
|
1555
|
+
t(this, bt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, bt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
|
|
1554
1556
|
}
|
|
1555
1557
|
}, "#onKeyDown"));
|
|
1556
|
-
if (this.applyBaseStyle(), y(this, nt, this.getAttribute("type") || "text"), y(this,
|
|
1558
|
+
if (this.applyBaseStyle(), y(this, nt, this.getAttribute("type") || "text"), y(this, bt, this.getAttribute("maxbyte")), y(this, yt, this.getAttribute("min")), y(this, ne, this.getAttribute("max")), y(this, Y, this.getAttribute("scale")), !["text", "number"].includes(t(this, nt))) throw `invalid type : ${t(this, nt)}`;
|
|
1557
1559
|
}
|
|
1558
1560
|
connectedCallback() {
|
|
1559
|
-
for (var e = [],
|
|
1560
|
-
["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[
|
|
1561
|
+
for (var e = [], i = 0; i < this.attributes.length; i++)
|
|
1562
|
+
["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[i].name) && e.push(`${this.attributes[i].name}="${this.attributes[i].value}"`);
|
|
1561
1563
|
this.innerHTML = `
|
|
1562
1564
|
<input type="text"
|
|
1563
1565
|
${e.join(" ")}
|
|
1564
1566
|
ondragstart="return false;"
|
|
1565
1567
|
>
|
|
1566
|
-
`, super.connectedCallback(), y(this,
|
|
1568
|
+
`, super.connectedCallback(), y(this, Mt, this.querySelector("input"));
|
|
1567
1569
|
}
|
|
1568
1570
|
};
|
|
1569
|
-
|
|
1571
|
+
Mt = new WeakMap(), nt = new WeakMap(), bt = new WeakMap(), yt = new WeakMap(), ne = new WeakMap(), Y = new WeakMap(), Ce = new WeakMap(), h(Pe, "CellInputText");
|
|
1570
1572
|
let we = Pe;
|
|
1571
1573
|
customElements.get("cell-input-text");
|
|
1572
1574
|
customElements.get("cell-input") || customElements.define("cell-input", we);
|