@ninebone/table 0.0.638 β 0.0.640
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 +229 -230
- package/dist/nine-table.js.map +1 -1
- package/dist/nine-table.umd.js +7 -7
- package/dist/nine-table.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-table.js
CHANGED
|
@@ -2,9 +2,9 @@ var Fe = Object.defineProperty;
|
|
|
2
2
|
var Ve = (q) => {
|
|
3
3
|
throw TypeError(q);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
5
|
+
var Xe = (q, i, e) => i in q ? Fe(q, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[i] = e;
|
|
6
6
|
var c = (q, i) => Fe(q, "name", { value: i, configurable: !0 });
|
|
7
|
-
var
|
|
7
|
+
var A = (q, i, e) => Xe(q, typeof i != "symbol" ? i + "" : i, e), Ye = (q, i, e) => i.has(q) || Ve("Cannot " + e);
|
|
8
8
|
var t = (q, i, e) => (Ye(q, i, "read from private field"), e ? e.call(q) : i.get(q)), d = (q, i, e) => i.has(q) ? Ve("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(q) : i.set(q, e), y = (q, i, e, s) => (Ye(q, i, "write to private field"), s ? s.call(q, e) : i.set(q, e), e);
|
|
9
9
|
var Ue = (q, i, e, s) => ({
|
|
10
10
|
set _(r) {
|
|
@@ -14,8 +14,8 @@ var Ue = (q, i, e, s) => ({
|
|
|
14
14
|
return t(q, i, s);
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
import { trace as
|
|
18
|
-
const He = class He extends
|
|
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
|
}
|
|
@@ -23,25 +23,25 @@ const He = class He extends Ze.constructor {
|
|
|
23
23
|
c(He, "Trace");
|
|
24
24
|
let oe = He;
|
|
25
25
|
const H = new oe();
|
|
26
|
-
var B,
|
|
26
|
+
var B, j, w, X, K, Z, It, G, _t;
|
|
27
27
|
const Me = class Me extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
30
30
|
d(this, B);
|
|
31
|
-
d(this,
|
|
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, G);
|
|
36
36
|
d(this, It, /* @__PURE__ */ c(() => {
|
|
37
37
|
if (!t(this, B)) return;
|
|
38
38
|
const e = t(this, B).querySelector(".ng-container-body .ng-part-body");
|
|
39
|
-
e && (y(this,
|
|
39
|
+
e && (y(this, Z, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
|
-
})), t(this,
|
|
41
|
+
})), t(this, Z).observe(e));
|
|
42
42
|
}, "#observeResize"));
|
|
43
|
-
|
|
44
|
-
if (!t(this, B) || !t(this, w) || t(this,
|
|
43
|
+
A(this, "refresh", /* @__PURE__ */ c(() => {
|
|
44
|
+
if (!t(this, B) || !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
47
|
const r = t(this, w).track, n = t(this, w).thumb, o = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, h = s.scrollWidth;
|
|
@@ -61,7 +61,7 @@ const Me = class Me extends HTMLElement {
|
|
|
61
61
|
const m = l - f;
|
|
62
62
|
g > m && (g = m), n.style.left = `${g}px`, t(this, w).left.disabled = g === 0, t(this, w).right.disabled = g >= m - 1;
|
|
63
63
|
}, "refresh"));
|
|
64
|
-
d(this,
|
|
64
|
+
d(this, G, /* @__PURE__ */ c((e) => {
|
|
65
65
|
if (!t(this, w)) return !1;
|
|
66
66
|
const s = t(this, w).container, r = s.querySelector("table");
|
|
67
67
|
if (!r) return !1;
|
|
@@ -75,16 +75,16 @@ const Me = class Me extends HTMLElement {
|
|
|
75
75
|
}, "#thumbMoveTo"));
|
|
76
76
|
d(this, _t, /* @__PURE__ */ c(() => {
|
|
77
77
|
const e = /* @__PURE__ */ c((r) => {
|
|
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 + r), y(this, X, setInterval(() => {
|
|
81
|
+
clearInterval(t(this, X)), y(this, K, setInterval(() => {
|
|
82
82
|
const o = parseInt(t(this, w).thumb.style.left || 0, 10);
|
|
83
|
-
t(this,
|
|
83
|
+
t(this, G).call(this, o + r) || clearInterval(t(this, K));
|
|
84
84
|
}, 50));
|
|
85
85
|
}, 500));
|
|
86
86
|
}, "delayScroll"), s = /* @__PURE__ */ c(() => {
|
|
87
|
-
clearInterval(t(this,
|
|
87
|
+
clearInterval(t(this, X)), clearInterval(t(this, K));
|
|
88
88
|
}, "clearTimer");
|
|
89
89
|
["mouseup", "mouseleave", "touchend"].forEach((r) => {
|
|
90
90
|
t(this, w).left.addEventListener(r, s), t(this, w).right.addEventListener(r, s), t(this, w).track.addEventListener(r, s);
|
|
@@ -96,16 +96,16 @@ const Me = class Me extends HTMLElement {
|
|
|
96
96
|
if (r.button !== 0) return;
|
|
97
97
|
r.preventDefault();
|
|
98
98
|
const n = t(this, w).track.getBoundingClientRect(), o = t(this, w).thumb.clientWidth;
|
|
99
|
-
t(this,
|
|
99
|
+
t(this, G).call(this, r.clientX - n.left - o / 2);
|
|
100
100
|
}), t(this, w).thumb.addEventListener("mousedown", (r) => {
|
|
101
101
|
if (r.button !== 0) return;
|
|
102
|
-
r.stopPropagation(), r.preventDefault(), y(this,
|
|
102
|
+
r.stopPropagation(), r.preventDefault(), y(this, j, !0), this.shiftX = r.clientX - t(this, w).thumb.getBoundingClientRect().left;
|
|
103
103
|
const n = /* @__PURE__ */ c((a) => {
|
|
104
|
-
if (!t(this,
|
|
104
|
+
if (!t(this, j)) return;
|
|
105
105
|
const h = t(this, w).track.getBoundingClientRect();
|
|
106
|
-
t(this,
|
|
106
|
+
t(this, G).call(this, a.clientX - h.left - this.shiftX);
|
|
107
107
|
}, "onMouseMove"), o = /* @__PURE__ */ c(() => {
|
|
108
|
-
y(this,
|
|
108
|
+
y(this, j, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
|
|
109
109
|
}, "onMouseUp");
|
|
110
110
|
document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
|
|
111
111
|
});
|
|
@@ -189,31 +189,31 @@ const Me = class Me extends HTMLElement {
|
|
|
189
189
|
left: this.querySelector(".ng-scroll-left"),
|
|
190
190
|
right: this.querySelector(".ng-scroll-right")
|
|
191
191
|
}), s.addEventListener("scroll", () => {
|
|
192
|
-
t(this,
|
|
192
|
+
t(this, j) || this.refresh();
|
|
193
193
|
}), t(this, _t).call(this), t(this, It).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
|
-
B = new WeakMap(),
|
|
201
|
+
B = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), It = new WeakMap(), G = new WeakMap(), _t = new WeakMap(), c(Me, "NineTableHScrollBar");
|
|
202
202
|
let ae = Me;
|
|
203
203
|
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ae);
|
|
204
|
-
var
|
|
204
|
+
var F, at, J, T, vt, xt, Nt;
|
|
205
205
|
const $e = class $e extends HTMLElement {
|
|
206
206
|
constructor() {
|
|
207
207
|
super();
|
|
208
|
-
d(this,
|
|
209
|
-
d(this,
|
|
210
|
-
d(this,
|
|
208
|
+
d(this, F);
|
|
209
|
+
d(this, at);
|
|
210
|
+
d(this, J, !1);
|
|
211
211
|
d(this, T);
|
|
212
212
|
d(this, vt, 0);
|
|
213
213
|
d(this, xt, 0);
|
|
214
|
-
|
|
215
|
-
if (!t(this,
|
|
216
|
-
const e = t(this, T).container, s = t(this, T).track, r = t(this, T).thumb, n = e.clientHeight, a = (t(this,
|
|
214
|
+
A(this, "refresh", /* @__PURE__ */ c(() => {
|
|
215
|
+
if (!t(this, F) || !t(this, T)) return;
|
|
216
|
+
const e = t(this, T).container, s = t(this, T).track, r = t(this, T).thumb, n = e.clientHeight, a = (t(this, F).data.get() || []).length, h = t(this, at).getRowHeight(), l = a * h;
|
|
217
217
|
if (l <= n || a === 0) {
|
|
218
218
|
this.style.display = "none";
|
|
219
219
|
return;
|
|
@@ -232,26 +232,26 @@ const $e = class $e extends HTMLElement {
|
|
|
232
232
|
d(this, Nt, /* @__PURE__ */ c(() => {
|
|
233
233
|
H.log("nine-table-vscrollbar.#init");
|
|
234
234
|
const e = t(this, T).container, s = /* @__PURE__ */ c(() => {
|
|
235
|
-
const n = (t(this,
|
|
235
|
+
const n = (t(this, F).data.get() || []).length, o = t(this, at).getRowHeight();
|
|
236
236
|
return n * o;
|
|
237
237
|
}, "getContentHeight");
|
|
238
238
|
e.addEventListener("scroll", () => {
|
|
239
|
-
t(this,
|
|
239
|
+
t(this, J) || this.refresh();
|
|
240
240
|
}), t(this, T).thumb.addEventListener("mousedown", (r) => {
|
|
241
241
|
if (r.button !== 0) return;
|
|
242
|
-
r.stopPropagation(), r.preventDefault(), y(this,
|
|
242
|
+
r.stopPropagation(), r.preventDefault(), y(this, J, !0), y(this, vt, r.clientY), y(this, xt, e.scrollTop);
|
|
243
243
|
const n = /* @__PURE__ */ c((a) => {
|
|
244
|
-
if (!t(this,
|
|
244
|
+
if (!t(this, J)) return;
|
|
245
245
|
const h = t(this, T).track.getBoundingClientRect(), l = t(this, T).thumb.clientHeight, u = h.height - l, b = a.clientY - t(this, vt), g = e.clientHeight, m = s(), x = Math.max(m - g, 1);
|
|
246
246
|
if (u > 0 && x > 0) {
|
|
247
|
-
const
|
|
248
|
-
let v = t(this, xt) +
|
|
249
|
-
const
|
|
250
|
-
v < 0 && (v = 0), v >
|
|
247
|
+
const E = b / u * x;
|
|
248
|
+
let v = t(this, xt) + E;
|
|
249
|
+
const I = Math.max(0, m - g);
|
|
250
|
+
v < 0 && (v = 0), v > I && (v = I), e.scrollTop = v;
|
|
251
251
|
}
|
|
252
252
|
this.refresh();
|
|
253
253
|
}, "onMouseMove"), o = /* @__PURE__ */ c(() => {
|
|
254
|
-
y(this,
|
|
254
|
+
y(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
|
|
255
255
|
}, "onMouseUp");
|
|
256
256
|
document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
|
|
257
257
|
}), t(this, T).track.addEventListener("mousedown", (r) => {
|
|
@@ -270,7 +270,7 @@ const $e = class $e extends HTMLElement {
|
|
|
270
270
|
}, "#init"));
|
|
271
271
|
}
|
|
272
272
|
connectedCallback() {
|
|
273
|
-
y(this,
|
|
273
|
+
y(this, F, this.getRootNode().host), y(this, at, this.closest("nine-table-sheet")), this.innerHTML = `
|
|
274
274
|
<style>
|
|
275
275
|
nine-table-vscrollbar {
|
|
276
276
|
display: flex;
|
|
@@ -335,7 +335,7 @@ const $e = class $e extends HTMLElement {
|
|
|
335
335
|
<button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
|
|
336
336
|
`;
|
|
337
337
|
const e = /* @__PURE__ */ c(() => {
|
|
338
|
-
const s = t(this,
|
|
338
|
+
const s = t(this, F).shadowRoot.querySelector(".ng-container-body .ng-part-body");
|
|
339
339
|
if (!s) {
|
|
340
340
|
setTimeout(e, 10);
|
|
341
341
|
return;
|
|
@@ -351,35 +351,35 @@ const $e = class $e extends HTMLElement {
|
|
|
351
351
|
e();
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
|
-
|
|
354
|
+
F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), T = new WeakMap(), vt = new WeakMap(), xt = new WeakMap(), Nt = new WeakMap(), c($e, "NineTableVScrollBar");
|
|
355
355
|
let le = $e;
|
|
356
356
|
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
|
|
357
|
-
var
|
|
357
|
+
var P, S, Q, D, _, V, tt, wt, Se, Ee, Wt, Ot, zt, St, Et, Bt, Dt, At, Ae, lt, qt, Pt;
|
|
358
358
|
const Ie = class Ie {
|
|
359
359
|
constructor(i) {
|
|
360
|
-
d(this,
|
|
360
|
+
d(this, P);
|
|
361
361
|
d(this, S);
|
|
362
|
-
d(this,
|
|
362
|
+
d(this, Q);
|
|
363
363
|
d(this, D, /* @__PURE__ */ new Map());
|
|
364
|
-
d(this,
|
|
365
|
-
d(this,
|
|
366
|
-
d(this,
|
|
364
|
+
d(this, _, null);
|
|
365
|
+
d(this, V, null);
|
|
366
|
+
d(this, tt, 0);
|
|
367
367
|
d(this, wt, 40);
|
|
368
368
|
d(this, Se, !1);
|
|
369
369
|
d(this, Ee, !1);
|
|
370
370
|
//#ticking = false; // π― κ³ μ μ€ν¬λ‘€ μ€λ‘νλ§μ© νλκ·Έ
|
|
371
371
|
d(this, Wt, 3);
|
|
372
|
-
|
|
372
|
+
A(this, "refresh", /* @__PURE__ */ c(() => {
|
|
373
373
|
var e;
|
|
374
374
|
H.log("rowManager.refresh");
|
|
375
375
|
const i = t(this, S).querySelector(".ng-container-body .ng-part-body");
|
|
376
|
-
i && (t(this, St).call(this), t(this,
|
|
376
|
+
i && (t(this, St).call(this), t(this, lt).call(this, i.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
|
|
377
377
|
}, "refresh"));
|
|
378
|
-
|
|
379
|
-
H.log("rowManager.initialize"), y(this,
|
|
378
|
+
A(this, "initialize", /* @__PURE__ */ c(() => {
|
|
379
|
+
H.log("rowManager.initialize"), y(this, Q, {
|
|
380
380
|
scrollTables: t(this, S).querySelectorAll(".ng-part-body table"),
|
|
381
381
|
firstTr: t(this, S).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
|
|
382
|
-
}), y(this,
|
|
382
|
+
}), y(this, _, null), t(this, D).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
|
|
383
383
|
const a = t(this, S).querySelector(o);
|
|
384
384
|
if (!a) return;
|
|
385
385
|
const h = a.querySelector(".ng-part-body table");
|
|
@@ -391,13 +391,13 @@ const Ie = class Ie {
|
|
|
391
391
|
});
|
|
392
392
|
const i = 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"), r = t(this, S).querySelector(".ng-container-body .ng-part-header"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer");
|
|
393
393
|
if (i) {
|
|
394
|
-
t(this, zt).call(this, i), t(this, At).call(this), t(this, St).call(this), t(this,
|
|
394
|
+
t(this, zt).call(this, i), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, i.scrollTop);
|
|
395
395
|
let o = !1;
|
|
396
396
|
const a = /* @__PURE__ */ c((h) => {
|
|
397
397
|
if (o) return;
|
|
398
398
|
o = !0;
|
|
399
399
|
const l = h.scrollTop, f = h.scrollLeft;
|
|
400
|
-
i && i.scrollTop !== l && (i.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), n && n.scrollLeft !== f && (n.scrollLeft = f), t(this,
|
|
400
|
+
i && i.scrollTop !== l && (i.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), n && n.scrollLeft !== f && (n.scrollLeft = f), t(this, lt).call(this, l), o = !1;
|
|
401
401
|
}, "handleContainerScroll");
|
|
402
402
|
[i, e, s].forEach((h) => {
|
|
403
403
|
h && h.addEventListener("scroll", () => {
|
|
@@ -418,11 +418,11 @@ const Ie = class Ie {
|
|
|
418
418
|
s.forEach((h) => {
|
|
419
419
|
o.appendChild(h.cloneNode(!0));
|
|
420
420
|
});
|
|
421
|
-
n ? n.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this,
|
|
421
|
+
n ? n.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
|
|
422
422
|
}, "#renderRows"));
|
|
423
423
|
d(this, zt, /* @__PURE__ */ c((i) => {
|
|
424
|
-
if (H.log("rowManager.#measureAndCacheHeight"), t(this,
|
|
425
|
-
return t(this,
|
|
424
|
+
if (H.log("rowManager.#measureAndCacheHeight"), t(this, _) !== null && t(this, _) > 0)
|
|
425
|
+
return t(this, _);
|
|
426
426
|
H.log("#measureAndCacheHeight");
|
|
427
427
|
const e = t(this, D).get(".ng-container-body");
|
|
428
428
|
if (!e || e.length === 0) throw new Error("invalid dom");
|
|
@@ -445,11 +445,11 @@ const Ie = class Ie {
|
|
|
445
445
|
}
|
|
446
446
|
f += g;
|
|
447
447
|
}), u.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = h, o.style.position = l, f <= 0) throw new Error("invalid dom");
|
|
448
|
-
return y(this,
|
|
448
|
+
return y(this, _, f), t(this, Et).call(this), t(this, _);
|
|
449
449
|
}, "#measureAndCacheHeight"));
|
|
450
450
|
d(this, St, /* @__PURE__ */ c(() => {
|
|
451
451
|
H.log("rowManager.#updateVirtualScrollHeight");
|
|
452
|
-
const e = (t(this,
|
|
452
|
+
const e = (t(this, P).data.get() || []).length, s = t(this, _), r = e * s;
|
|
453
453
|
H.log("π [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
|
|
454
454
|
const o = t(this, S).querySelector(n);
|
|
455
455
|
if (!o) return;
|
|
@@ -458,8 +458,8 @@ const Ie = class Ie {
|
|
|
458
458
|
});
|
|
459
459
|
}, "#updateVirtualScrollHeight"));
|
|
460
460
|
d(this, Et, /* @__PURE__ */ c(() => {
|
|
461
|
-
if (t(this,
|
|
462
|
-
const i = Math.ceil(t(this,
|
|
461
|
+
if (t(this, tt) > 0 && t(this, _) > 0) {
|
|
462
|
+
const i = Math.ceil(t(this, tt) / t(this, _));
|
|
463
463
|
y(this, wt, i + t(this, Wt));
|
|
464
464
|
}
|
|
465
465
|
}, "#updateRowCount"));
|
|
@@ -467,31 +467,31 @@ const Ie = class Ie {
|
|
|
467
467
|
var a, h, l, f, u, b;
|
|
468
468
|
const i = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
|
|
469
469
|
if (e) {
|
|
470
|
-
const g = i ? Array.from(i.querySelectorAll("tbody tr")) : [], m = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [],
|
|
471
|
-
for (let v = 0; v <
|
|
472
|
-
const
|
|
470
|
+
const g = i ? Array.from(i.querySelectorAll("tbody tr")) : [], m = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [], E = Math.max(g.length, m.length, x.length);
|
|
471
|
+
for (let v = 0; v < E; v++) {
|
|
472
|
+
const I = [
|
|
473
473
|
((a = g[v]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
|
|
474
474
|
((h = m[v]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
|
|
475
475
|
((l = x[v]) == null ? void 0 : l.getBoundingClientRect().height) || 0
|
|
476
|
-
], R = Math.max(...
|
|
476
|
+
], R = Math.max(...I);
|
|
477
477
|
R > 0 && (g[v] && (g[v].style.height = `${R}px`), m[v] && (m[v].style.height = `${R}px`), x[v] && (x[v].style.height = `${R}px`));
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
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");
|
|
481
481
|
if (n) {
|
|
482
|
-
const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], m = Array.from(n.querySelectorAll("tfoot tr")), x = o ? Array.from(o.querySelectorAll("tfoot tr")) : [],
|
|
483
|
-
for (let v = 0; v <
|
|
484
|
-
const
|
|
482
|
+
const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], m = Array.from(n.querySelectorAll("tfoot tr")), x = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], E = Math.max(g.length, m.length, x.length);
|
|
483
|
+
for (let v = 0; v < E; v++) {
|
|
484
|
+
const I = [
|
|
485
485
|
((f = g[v]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
|
|
486
486
|
((u = m[v]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
|
|
487
487
|
((b = x[v]) == null ? void 0 : b.getBoundingClientRect().height) || 0
|
|
488
|
-
], R = Math.max(...
|
|
488
|
+
], R = Math.max(...I);
|
|
489
489
|
R > 0 && (g[v] && (g[v].style.height = `${R}px`), m[v] && (m[v].style.height = `${R}px`), x[v] && (x[v].style.height = `${R}px`));
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
}, "#syncRowHeights"));
|
|
493
493
|
d(this, Dt, /* @__PURE__ */ c(() => {
|
|
494
|
-
!t(this, S) || !(t(this, S) instanceof HTMLElement) || (y(this,
|
|
494
|
+
!t(this, S) || !(t(this, S) instanceof HTMLElement) || (y(this, V, new ResizeObserver((i) => {
|
|
495
495
|
for (const e of i) {
|
|
496
496
|
const s = e.target;
|
|
497
497
|
if (!s.classList.contains("active")) continue;
|
|
@@ -501,10 +501,10 @@ const Ie = class Ie {
|
|
|
501
501
|
const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
|
|
502
502
|
o && (n += o.offsetHeight), a && (n += a.offsetHeight);
|
|
503
503
|
const h = Math.max(r - n, 100);
|
|
504
|
-
t(this,
|
|
504
|
+
t(this, tt) !== h && (y(this, tt, h), t(this, Et).call(this), t(this, _) !== null && (t(this, At).call(this), this.refresh()));
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
})), t(this,
|
|
507
|
+
})), t(this, V).observe(t(this, S)));
|
|
508
508
|
}, "#initResizeObserver"));
|
|
509
509
|
d(this, At, /* @__PURE__ */ c(() => {
|
|
510
510
|
H.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
|
|
@@ -519,43 +519,42 @@ const Ie = class Ie {
|
|
|
519
519
|
if (!s) return;
|
|
520
520
|
const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
521
521
|
if (!r) return;
|
|
522
|
-
const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, D).get(e)) == null ? void 0 : l.length) || 1, h = (t(this,
|
|
522
|
+
const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, D).get(e)) == null ? void 0 : l.length) || 1, h = (t(this, P).data.get() || []).length;
|
|
523
523
|
n.forEach((f, u) => {
|
|
524
524
|
const b = i + Math.floor(u / o);
|
|
525
525
|
if (b >= h) {
|
|
526
526
|
f.style.visibility = "hidden";
|
|
527
527
|
return;
|
|
528
528
|
}
|
|
529
|
-
const g = t(this,
|
|
529
|
+
const g = t(this, P).data.get(b);
|
|
530
530
|
f.style.display = "", t(this, qt).call(this, f, g, b);
|
|
531
531
|
});
|
|
532
532
|
});
|
|
533
533
|
}, "#adjustBufferRows"));
|
|
534
|
-
d(this,
|
|
535
|
-
var
|
|
536
|
-
const e = t(this,
|
|
534
|
+
d(this, lt, /* @__PURE__ */ c((i) => {
|
|
535
|
+
var f, u;
|
|
536
|
+
const e = t(this, _);
|
|
537
537
|
if (!e || e <= 0) return;
|
|
538
|
-
const s = t(this,
|
|
538
|
+
const s = t(this, P).data.length;
|
|
539
539
|
if (s === 0) return;
|
|
540
|
-
const r = ((
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
R.style.display = "none";
|
|
540
|
+
const r = ((f = t(this, D).get(".ng-container-body")) == null ? void 0 : f.length) || 1, n = Math.max(0, s - 1), o = Math.min(n, Math.max(0, Math.floor(i / e))), a = Math.floor(o * e);
|
|
541
|
+
H.log(`π [Scroll Inspect] scrollTop: ${i}, rowHeight: ${e}, startIndex: ${o}, offsetY: ${a}`);
|
|
542
|
+
const h = t(this, Q).firstTr, l = h && h.dataset.row !== void 0 ? parseInt(h.dataset.row, 10) : -1;
|
|
543
|
+
(u = t(this, Q)) == null || u.scrollTables.forEach((b) => {
|
|
544
|
+
b.style.transform = `translate3d(0, ${a}px, 0)`;
|
|
545
|
+
}), l !== o && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
|
|
546
|
+
const g = t(this, S).querySelector(b);
|
|
547
|
+
if (!g) return;
|
|
548
|
+
const m = g.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
549
|
+
if (!m) return;
|
|
550
|
+
Array.from(m.querySelectorAll("tr:not(.nodata)")).forEach((E, v) => {
|
|
551
|
+
const I = o + Math.floor(v / r);
|
|
552
|
+
if (I >= s) {
|
|
553
|
+
E.style.display = "none";
|
|
555
554
|
return;
|
|
556
555
|
}
|
|
557
|
-
const
|
|
558
|
-
|
|
556
|
+
const R = t(this, P).data.get(I);
|
|
557
|
+
E.style.display = "", t(this, qt).call(this, E, R, I);
|
|
559
558
|
});
|
|
560
559
|
});
|
|
561
560
|
}, "#handleScroll"));
|
|
@@ -595,20 +594,20 @@ const Ie = class Ie {
|
|
|
595
594
|
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`));
|
|
596
595
|
}
|
|
597
596
|
}, "#syncHeaderHeights"));
|
|
598
|
-
|
|
599
|
-
t(this,
|
|
597
|
+
A(this, "destroy", /* @__PURE__ */ c(() => {
|
|
598
|
+
t(this, V) && (t(this, V).disconnect(), y(this, V, null));
|
|
600
599
|
}, "destroy"));
|
|
601
|
-
y(this,
|
|
600
|
+
y(this, P, i.getRootNode().host), y(this, S, i), t(this, Dt).call(this);
|
|
602
601
|
}
|
|
603
602
|
getRowHeight() {
|
|
604
|
-
return t(this,
|
|
603
|
+
return t(this, _);
|
|
605
604
|
}
|
|
606
605
|
templateLength(i = ".ng-container-body") {
|
|
607
606
|
var e;
|
|
608
607
|
return ((e = t(this, D).get(i)) == null ? void 0 : e.length) || 1;
|
|
609
608
|
}
|
|
610
609
|
};
|
|
611
|
-
|
|
610
|
+
P = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), D = new WeakMap(), _ = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), Bt = new WeakMap(), Dt = new WeakMap(), At = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), qt = new WeakMap(), Pt = new WeakMap(), c(Ie, "RowManager");
|
|
612
611
|
let ce = Ie;
|
|
613
612
|
const jt = class jt {
|
|
614
613
|
/**
|
|
@@ -628,8 +627,8 @@ const jt = class jt {
|
|
|
628
627
|
if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
|
|
629
628
|
let u = `cell-${f}`;
|
|
630
629
|
const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), m = l.getAttribute("maxbyte"), x = l.getAttribute("type");
|
|
631
|
-
let
|
|
632
|
-
b &&
|
|
630
|
+
let E = [];
|
|
631
|
+
b && E.push(`data-bind="${b}"`), g && E.push(`data-expr="${g}"`), m && E.push(`maxbyte="${m}"`), x && E.push(`type="${x}"`), l.innerHTML = `<${u} ${E.join(" ")}></${u}>`;
|
|
633
632
|
});
|
|
634
633
|
}, "processCellTypes"), s = /* @__PURE__ */ c((a) => {
|
|
635
634
|
if (!a.querySelector("colgroup")) {
|
|
@@ -655,24 +654,24 @@ const jt = class jt {
|
|
|
655
654
|
const g = Array.from(Array(u), () => Array(b).fill(null));
|
|
656
655
|
l.forEach((m) => {
|
|
657
656
|
const x = m.sectionRowIndex;
|
|
658
|
-
let
|
|
657
|
+
let E = 0;
|
|
659
658
|
Array.from(m.querySelectorAll("th,td")).forEach((v) => {
|
|
660
|
-
for (let
|
|
661
|
-
if (g[x][
|
|
662
|
-
|
|
659
|
+
for (let z = 0; z < g[x].length; z++)
|
|
660
|
+
if (g[x][z] === null) {
|
|
661
|
+
E = z;
|
|
663
662
|
break;
|
|
664
663
|
}
|
|
665
|
-
const
|
|
666
|
-
for (let
|
|
667
|
-
for (let
|
|
668
|
-
x +
|
|
664
|
+
const I = v.rowSpan || 1, R = v.colSpan || 1;
|
|
665
|
+
for (let z = 0; z < I; z++)
|
|
666
|
+
for (let yt = 0; yt < R; yt++)
|
|
667
|
+
x + z < u && E + yt < b && (g[x + z][E + yt] = z === 0 && yt === 0 ? "1" : "0");
|
|
669
668
|
});
|
|
670
669
|
}), l.forEach((m) => {
|
|
671
670
|
const x = m.sectionRowIndex;
|
|
672
|
-
Array.from(m.querySelectorAll("th,td")).forEach((
|
|
671
|
+
Array.from(m.querySelectorAll("th,td")).forEach((E) => {
|
|
673
672
|
for (let v = 0; v < g[x].length; v++)
|
|
674
673
|
if (g[x][v] === "1") {
|
|
675
|
-
|
|
674
|
+
E.dataset.col = v, g[x][v] = "0";
|
|
676
675
|
break;
|
|
677
676
|
}
|
|
678
677
|
});
|
|
@@ -689,15 +688,15 @@ const jt = class jt {
|
|
|
689
688
|
};
|
|
690
689
|
c(jt, "TableCompiler");
|
|
691
690
|
let he = jt;
|
|
692
|
-
var Ft,
|
|
691
|
+
var Ft, et, st, Vt, Yt, ct, Ut, Xt;
|
|
693
692
|
const pt = class pt extends HTMLElement {
|
|
694
693
|
constructor() {
|
|
695
694
|
super();
|
|
696
695
|
d(this, Ft);
|
|
697
|
-
d(this,
|
|
698
|
-
d(this,
|
|
699
|
-
|
|
700
|
-
t(this,
|
|
696
|
+
d(this, et, null);
|
|
697
|
+
d(this, st);
|
|
698
|
+
A(this, "invalidate", /* @__PURE__ */ c(() => {
|
|
699
|
+
t(this, st).refresh();
|
|
701
700
|
}, "invalidate"));
|
|
702
701
|
d(this, Vt, /* @__PURE__ */ c(() => {
|
|
703
702
|
[
|
|
@@ -706,7 +705,7 @@ const pt = class pt extends HTMLElement {
|
|
|
706
705
|
{ selector: ".ng-container-right", type: "right" }
|
|
707
706
|
].forEach(({ selector: s, type: r }) => {
|
|
708
707
|
var n, o, a;
|
|
709
|
-
(n = this.querySelector(`${s} .ng-part-header`)) == null || n.appendChild(t(this,
|
|
708
|
+
(n = this.querySelector(`${s} .ng-part-header`)) == null || n.appendChild(t(this, ct).call(this, t(this, et), r, "header")), (o = this.querySelector(`${s} .ng-virtual-spacer`)) == null || o.before(t(this, ct).call(this, t(this, et), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, ct).call(this, t(this, et), r, "footer"));
|
|
710
709
|
});
|
|
711
710
|
}, "#renderSplitContainers"));
|
|
712
711
|
d(this, Yt, /* @__PURE__ */ c(() => {
|
|
@@ -720,16 +719,16 @@ const pt = class pt extends HTMLElement {
|
|
|
720
719
|
}), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${n}px`, s.style.width = `${n}px`);
|
|
721
720
|
});
|
|
722
721
|
}, "#updateContainerWidths"));
|
|
723
|
-
|
|
722
|
+
A(this, "generate", /* @__PURE__ */ c((e) => {
|
|
724
723
|
if (!e) return;
|
|
725
|
-
y(this,
|
|
724
|
+
y(this, et, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this);
|
|
726
725
|
const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), n = this.querySelector(".ng-nodata-overlay");
|
|
727
|
-
s && n && (n.style.top = `${s.offsetHeight}px`), r && n && (n.style.bottom = `${r.offsetHeight}px`), t(this,
|
|
726
|
+
s && n && (n.style.top = `${s.offsetHeight}px`), r && n && (n.style.bottom = `${r.offsetHeight}px`), t(this, st).initialize(), setTimeout(() => {
|
|
728
727
|
var o;
|
|
729
728
|
(o = this.querySelector("nine-table-hscrollbar")) == null || o.refresh();
|
|
730
729
|
}, 0);
|
|
731
730
|
}, "generate"));
|
|
732
|
-
d(this,
|
|
731
|
+
d(this, ct, /* @__PURE__ */ c((e, s, r) => {
|
|
733
732
|
const n = e.cloneNode(!0), o = n.querySelector("thead"), a = n.querySelector("tbody"), h = n.querySelector("tfoot");
|
|
734
733
|
if (r === "header") {
|
|
735
734
|
if (a && a.remove(), h && h.remove(), e.querySelector("tbody")) {
|
|
@@ -745,12 +744,12 @@ const pt = class pt extends HTMLElement {
|
|
|
745
744
|
l.remove();
|
|
746
745
|
}), n;
|
|
747
746
|
}, "#createSplitTable"));
|
|
748
|
-
|
|
749
|
-
|
|
747
|
+
A(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, st).getRowHeight(), "getRowHeight"));
|
|
748
|
+
A(this, "scrollToX", /* @__PURE__ */ c((e) => {
|
|
750
749
|
const s = this.querySelector(".ng-container-body .ng-part-body");
|
|
751
750
|
s && (s.scrollLeft = e);
|
|
752
751
|
}, "scrollToX"));
|
|
753
|
-
|
|
752
|
+
A(this, "scrollToY", /* @__PURE__ */ c((e) => {
|
|
754
753
|
const s = this.querySelector(".ng-container-body .ng-part-body");
|
|
755
754
|
s && (s.scrollTop = e);
|
|
756
755
|
}, "scrollToY"));
|
|
@@ -946,7 +945,7 @@ const pt = class pt extends HTMLElement {
|
|
|
946
945
|
</div>
|
|
947
946
|
`;
|
|
948
947
|
}, "#render"));
|
|
949
|
-
y(this,
|
|
948
|
+
y(this, st, new ce(this)), y(this, Ft, this.getRootNode().host);
|
|
950
949
|
}
|
|
951
950
|
connectedCallback() {
|
|
952
951
|
t(this, Ut).call(this);
|
|
@@ -955,7 +954,7 @@ const pt = class pt extends HTMLElement {
|
|
|
955
954
|
this.innerHTML = "", H.log("NineTableSheet destroyed.");
|
|
956
955
|
}
|
|
957
956
|
};
|
|
958
|
-
Ft = new WeakMap(),
|
|
957
|
+
Ft = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), c(pt, "NineTableSheet"), A(pt, "SCROLLBAR_SIZE", 16);
|
|
959
958
|
let $t = pt;
|
|
960
959
|
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", $t);
|
|
961
960
|
var Kt, Rt;
|
|
@@ -976,8 +975,8 @@ const _e = class _e extends HTMLElement {
|
|
|
976
975
|
Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
|
|
977
976
|
const b = f.filter((g) => g.classList.contains("active"));
|
|
978
977
|
b.length < 2 || b.forEach((g) => {
|
|
979
|
-
const m = parseInt(g.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${m}"]`),
|
|
980
|
-
x &&
|
|
978
|
+
const m = parseInt(g.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${m}"]`), E = f[m + 1];
|
|
979
|
+
x && E && E.classList.contains("active") && x.style.setProperty("display", "flex");
|
|
981
980
|
});
|
|
982
981
|
}, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = n.querySelectorAll(".nine-tab-item"), h = o.querySelectorAll("nine-table-sheet");
|
|
983
982
|
if (!a[e]) return;
|
|
@@ -1164,85 +1163,85 @@ const Ne = class Ne {
|
|
|
1164
1163
|
};
|
|
1165
1164
|
M = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Gt = new WeakMap(), c(Ne, "LayoutManager");
|
|
1166
1165
|
let fe = Ne;
|
|
1167
|
-
var kt,
|
|
1166
|
+
var kt, ht;
|
|
1168
1167
|
const We = class We {
|
|
1169
1168
|
constructor(i) {
|
|
1170
1169
|
d(this, kt);
|
|
1171
|
-
d(this,
|
|
1172
|
-
|
|
1170
|
+
d(this, ht, -1);
|
|
1171
|
+
A(this, "count", /* @__PURE__ */ c(() => t(this, kt).rawRecords.length, "count"));
|
|
1173
1172
|
y(this, kt, i);
|
|
1174
1173
|
}
|
|
1175
1174
|
get at() {
|
|
1176
|
-
return t(this,
|
|
1175
|
+
return t(this, ht);
|
|
1177
1176
|
}
|
|
1178
1177
|
set at(i) {
|
|
1179
|
-
y(this,
|
|
1178
|
+
y(this, ht, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
|
|
1180
1179
|
});
|
|
1181
1180
|
}
|
|
1182
1181
|
};
|
|
1183
|
-
kt = new WeakMap(),
|
|
1182
|
+
kt = new WeakMap(), ht = new WeakMap(), c(We, "ngRow");
|
|
1184
1183
|
let ue = We;
|
|
1185
|
-
var
|
|
1186
|
-
const
|
|
1184
|
+
var N, k, W, dt, Jt, Y, Qt, it, Ct, te, ee, ft;
|
|
1185
|
+
const O = class O {
|
|
1187
1186
|
constructor(i, e) {
|
|
1188
|
-
d(this,
|
|
1187
|
+
d(this, N);
|
|
1189
1188
|
d(this, k);
|
|
1190
|
-
d(this,
|
|
1191
|
-
d(this,
|
|
1189
|
+
d(this, W, []);
|
|
1190
|
+
d(this, dt, []);
|
|
1192
1191
|
d(this, Jt, 0);
|
|
1193
|
-
d(this,
|
|
1192
|
+
d(this, Y, []);
|
|
1194
1193
|
d(this, Qt, /* @__PURE__ */ c(() => {
|
|
1195
|
-
y(this,
|
|
1196
|
-
const i = t(this,
|
|
1194
|
+
y(this, Y, []);
|
|
1195
|
+
const i = t(this, N).template || [];
|
|
1197
1196
|
Array.from(i).forEach((e) => {
|
|
1198
1197
|
var s;
|
|
1199
|
-
t(this,
|
|
1198
|
+
t(this, Y).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
|
|
1200
1199
|
}), (t(this, k).rawRecords || []).forEach((e) => {
|
|
1201
|
-
e.__ng || (e.__ng = t(this, Ct).call(this)), e.__ng.height = t(this,
|
|
1200
|
+
e.__ng || (e.__ng = t(this, Ct).call(this)), e.__ng.height = t(this, Y).slice();
|
|
1202
1201
|
});
|
|
1203
1202
|
}, "#initialize"));
|
|
1204
|
-
d(this,
|
|
1205
|
-
const i = t(this,
|
|
1206
|
-
i == null || i.classList.toggle("nodata", this.length === 0), t(this,
|
|
1203
|
+
d(this, it, /* @__PURE__ */ c(() => {
|
|
1204
|
+
const i = t(this, N).shadowRoot.querySelector("nine-table-sheets");
|
|
1205
|
+
i == null || i.classList.toggle("nodata", this.length === 0), t(this, N).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
|
|
1207
1206
|
e.invalidate();
|
|
1208
1207
|
});
|
|
1209
1208
|
}, "#invalidate"));
|
|
1210
|
-
|
|
1209
|
+
A(this, "get", /* @__PURE__ */ c((i, e) => {
|
|
1211
1210
|
var n;
|
|
1212
1211
|
const s = this.getValidData();
|
|
1213
1212
|
if (!s || s.length <= 0) return;
|
|
1214
|
-
if (i == null) return t(this,
|
|
1213
|
+
if (i == null) return t(this, ft).call(this, s);
|
|
1215
1214
|
if (i < 0 || i >= s.length) return null;
|
|
1216
|
-
const r = typeof ((n = t(this,
|
|
1215
|
+
const r = typeof ((n = t(this, N).fields) == null ? void 0 : n.get) == "function" ? t(this, N).fields.get() : [];
|
|
1217
1216
|
if (e != null) {
|
|
1218
1217
|
const o = r.indexOf(e);
|
|
1219
1218
|
return o >= 0 ? s[i].v[o] : null;
|
|
1220
1219
|
}
|
|
1221
|
-
return t(this,
|
|
1220
|
+
return t(this, ft).call(this, s[i]);
|
|
1222
1221
|
}, "get"));
|
|
1223
|
-
|
|
1224
|
-
this.clear(), this.add(i, !1), t(this,
|
|
1222
|
+
A(this, "set", /* @__PURE__ */ c((i) => {
|
|
1223
|
+
this.clear(), this.add(i, !1), t(this, it).call(this);
|
|
1225
1224
|
}, "set"));
|
|
1226
1225
|
d(this, Ct, /* @__PURE__ */ c(() => ({
|
|
1227
|
-
rowState:
|
|
1226
|
+
rowState: O.ROW_STATE.EMPTY,
|
|
1228
1227
|
deleted: !1,
|
|
1229
1228
|
filtered: !1,
|
|
1230
|
-
height: t(this,
|
|
1229
|
+
height: t(this, Y).slice(),
|
|
1231
1230
|
o: {},
|
|
1232
1231
|
c: {},
|
|
1233
|
-
_: [0, 0, 0, 0,
|
|
1232
|
+
_: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
|
|
1234
1233
|
}), "#getDefaultMeta"));
|
|
1235
|
-
|
|
1236
|
-
y(this,
|
|
1234
|
+
A(this, "reset", /* @__PURE__ */ c(() => {
|
|
1235
|
+
y(this, W, []), y(this, dt, []), t(this, it).call(this);
|
|
1237
1236
|
}, "reset"));
|
|
1238
|
-
|
|
1237
|
+
A(this, "clear", /* @__PURE__ */ c(() => {
|
|
1239
1238
|
var i;
|
|
1240
|
-
t(this, k).rawRecords = [], y(this,
|
|
1239
|
+
t(this, k).rawRecords = [], y(this, W, []), y(this, dt, []), (i = t(this, k).viewRecords) != null && i.reset && t(this, k).viewRecords.reset();
|
|
1241
1240
|
}, "clear"));
|
|
1242
1241
|
d(this, te, /* @__PURE__ */ c((i) => {
|
|
1243
1242
|
var r;
|
|
1244
1243
|
Array.isArray(i) || (i = [i]);
|
|
1245
|
-
const e = typeof ((r = t(this,
|
|
1244
|
+
const e = typeof ((r = t(this, N).fields) == null ? void 0 : r.get) == "function" ? t(this, N).fields.get() : Object.keys(i[0] || {}), s = [];
|
|
1246
1245
|
return i.forEach((n) => {
|
|
1247
1246
|
const o = { v: [] };
|
|
1248
1247
|
e.forEach((a) => {
|
|
@@ -1251,51 +1250,51 @@ const z = class z {
|
|
|
1251
1250
|
}), s;
|
|
1252
1251
|
}, "#json2Array"));
|
|
1253
1252
|
d(this, ee, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
|
|
1254
|
-
e.__ng = t(this, Ct).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState =
|
|
1253
|
+
e.__ng = t(this, Ct).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = O.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
|
|
1255
1254
|
}), i), "#defaultInsert"));
|
|
1256
|
-
|
|
1255
|
+
A(this, "add", /* @__PURE__ */ c((i, e = !0) => {
|
|
1257
1256
|
i === void 0 && (i = {});
|
|
1258
1257
|
const s = t(this, te).call(this, i);
|
|
1259
1258
|
t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
|
|
1260
1259
|
const r = this.count() - 1;
|
|
1261
1260
|
return e || s.forEach((n, o) => {
|
|
1262
1261
|
const a = t(this, k).rawRecords[r - o];
|
|
1263
|
-
a && (a.__ng.rowState =
|
|
1264
|
-
}), t(this,
|
|
1262
|
+
a && (a.__ng.rowState = O.ROW_STATE.EMPTY);
|
|
1263
|
+
}), t(this, it).call(this), r;
|
|
1265
1264
|
}, "add"));
|
|
1266
|
-
|
|
1265
|
+
A(this, "delete", /* @__PURE__ */ c((i) => {
|
|
1267
1266
|
let e = [];
|
|
1268
1267
|
Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, k).host.row.at] : e = [parseInt(i, 10)], e.sort((s, r) => r - s).forEach((s) => {
|
|
1269
|
-
if (t(this,
|
|
1270
|
-
const r = t(this,
|
|
1271
|
-
t(this,
|
|
1272
|
-
n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState =
|
|
1268
|
+
if (t(this, W)[s]) {
|
|
1269
|
+
const r = t(this, W)[s].__ng.rowid;
|
|
1270
|
+
t(this, W)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, k).rawRecords = t(this, k).rawRecords.filter((n) => n.__ng.rowid !== r) : t(this, k).rawRecords.forEach((n) => {
|
|
1271
|
+
n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState = O.ROW_STATE.DELETE);
|
|
1273
1272
|
});
|
|
1274
1273
|
}
|
|
1275
|
-
}), this.resetRecords(), t(this,
|
|
1274
|
+
}), this.resetRecords(), t(this, it).call(this);
|
|
1276
1275
|
}, "delete"));
|
|
1277
|
-
|
|
1276
|
+
A(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
|
|
1278
1277
|
var h;
|
|
1279
1278
|
i = parseInt(i, 10);
|
|
1280
|
-
const n = (typeof ((h = t(this,
|
|
1279
|
+
const n = (typeof ((h = t(this, N).fields) == null ? void 0 : h.get) == "function" ? t(this, N).fields.get() : []).indexOf(e);
|
|
1281
1280
|
if (n < 0) return;
|
|
1282
1281
|
const o = this.getValidData()[i];
|
|
1283
1282
|
if (!o) return;
|
|
1284
1283
|
const a = o.v[n];
|
|
1285
|
-
a !== s && o.__ng.rowState !==
|
|
1284
|
+
a !== s && o.__ng.rowState !== O.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = O.ROW_STATE.UPDATE), o.v[n] = s;
|
|
1286
1285
|
}, "setValue"));
|
|
1287
|
-
|
|
1288
|
-
y(this,
|
|
1286
|
+
A(this, "resetRecords", /* @__PURE__ */ c(() => {
|
|
1287
|
+
y(this, dt, t(this, k).rawRecords.filter((i) => !i.__ng.deleted)), y(this, W, t(this, k).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, k).rawRecords.forEach((i, e) => {
|
|
1289
1288
|
i.__ng.rowidx = e;
|
|
1290
|
-
}), t(this,
|
|
1289
|
+
}), t(this, W).forEach((i, e) => {
|
|
1291
1290
|
i.__ng.i = e;
|
|
1292
1291
|
});
|
|
1293
1292
|
}, "resetRecords"));
|
|
1294
|
-
|
|
1295
|
-
d(this,
|
|
1293
|
+
A(this, "getValidData", /* @__PURE__ */ c(() => (t(this, W).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
|
|
1294
|
+
d(this, ft, /* @__PURE__ */ c((i) => {
|
|
1296
1295
|
var o;
|
|
1297
1296
|
if (!i) return i;
|
|
1298
|
-
const e = !Array.isArray(i), s = e ? [i] : i, r = typeof ((o = t(this,
|
|
1297
|
+
const e = !Array.isArray(i), s = e ? [i] : i, r = typeof ((o = t(this, N).fields) == null ? void 0 : o.get) == "function" ? t(this, N).fields.get() : [], n = s.filter((a) => !a.__ng.deleted).map((a) => {
|
|
1299
1298
|
const h = {};
|
|
1300
1299
|
return r.forEach((l, f) => {
|
|
1301
1300
|
h[l] = a.v ? a.v[f] : a[l];
|
|
@@ -1303,11 +1302,11 @@ const z = class z {
|
|
|
1303
1302
|
});
|
|
1304
1303
|
return e ? n[0] : n;
|
|
1305
1304
|
}, "#conv"));
|
|
1306
|
-
|
|
1307
|
-
y(this,
|
|
1305
|
+
A(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
|
|
1306
|
+
y(this, N, i), y(this, k, e), t(this, Qt).call(this);
|
|
1308
1307
|
}
|
|
1309
1308
|
get source() {
|
|
1310
|
-
return t(this,
|
|
1309
|
+
return t(this, ft).call(this, t(this, k).rawRecords);
|
|
1311
1310
|
}
|
|
1312
1311
|
set source(i) {
|
|
1313
1312
|
this.clear(), this.add(i, !1);
|
|
@@ -1316,31 +1315,31 @@ const z = class z {
|
|
|
1316
1315
|
return ++Ue(this, Jt)._;
|
|
1317
1316
|
}
|
|
1318
1317
|
get count() {
|
|
1319
|
-
return t(this,
|
|
1318
|
+
return t(this, W).length;
|
|
1320
1319
|
}
|
|
1321
1320
|
get length() {
|
|
1322
|
-
return t(this,
|
|
1321
|
+
return t(this, W).length;
|
|
1323
1322
|
}
|
|
1324
1323
|
getRowCount() {
|
|
1325
1324
|
return this.length;
|
|
1326
1325
|
}
|
|
1327
1326
|
};
|
|
1328
|
-
|
|
1329
|
-
|
|
1327
|
+
N = new WeakMap(), k = new WeakMap(), W = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), it = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), c(O, "ngData"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
1328
|
+
A(O, "ROW_STATE", {
|
|
1330
1329
|
EMPTY: "EMPTY",
|
|
1331
1330
|
NORMAL: "NORMAL",
|
|
1332
1331
|
INSERT: "INSERT",
|
|
1333
1332
|
UPDATE: "UPDATE",
|
|
1334
1333
|
DELETE: "DELETE"
|
|
1335
1334
|
});
|
|
1336
|
-
let ge =
|
|
1337
|
-
var
|
|
1335
|
+
let ge = O;
|
|
1336
|
+
var rt;
|
|
1338
1337
|
const Oe = class Oe {
|
|
1339
1338
|
constructor(i) {
|
|
1340
|
-
d(this,
|
|
1341
|
-
y(this,
|
|
1339
|
+
d(this, rt);
|
|
1340
|
+
y(this, rt, i), this.row = new ue(this), this.data = new ge(t(this, rt), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
|
|
1342
1341
|
var e;
|
|
1343
|
-
(e = t(this,
|
|
1342
|
+
(e = t(this, rt).view) != null && e.redraw && t(this, rt).view.redraw();
|
|
1344
1343
|
}, this.setDataSource = (e) => {
|
|
1345
1344
|
this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
|
|
1346
1345
|
}, this.getRowState = (e) => {
|
|
@@ -1355,15 +1354,15 @@ const Oe = class Oe {
|
|
|
1355
1354
|
}, this.setDataSource([]);
|
|
1356
1355
|
}
|
|
1357
1356
|
};
|
|
1358
|
-
|
|
1357
|
+
rt = new WeakMap(), c(Oe, "ngDataManager");
|
|
1359
1358
|
let be = Oe;
|
|
1360
|
-
var
|
|
1359
|
+
var ut, L, Lt, se;
|
|
1361
1360
|
const ze = class ze {
|
|
1362
1361
|
// π― μ΄μ { name: string, type: string } κ°μ²΄λ€μ λ°°μ΄λ‘ κ΄λ¦¬ν©λλ€.
|
|
1363
1362
|
constructor(i) {
|
|
1364
|
-
d(this,
|
|
1363
|
+
d(this, ut);
|
|
1365
1364
|
d(this, L, []);
|
|
1366
|
-
|
|
1365
|
+
A(this, "add", /* @__PURE__ */ c((i, e = "string") => {
|
|
1367
1366
|
i.forEach((s) => {
|
|
1368
1367
|
t(this, L).some((r) => r.name === s) || t(this, L).push({ name: s, type: e });
|
|
1369
1368
|
}), t(this, Lt).call(this);
|
|
@@ -1375,8 +1374,8 @@ const ze = class ze {
|
|
|
1375
1374
|
}), y(this, L, Array.from(i, ([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);
|
|
1376
1375
|
}, "#adjust"));
|
|
1377
1376
|
d(this, se, /* @__PURE__ */ c(() => {
|
|
1378
|
-
y(this, L, []), H.log(t(this,
|
|
1379
|
-
const i = Array.from(t(this,
|
|
1377
|
+
y(this, L, []), H.log(t(this, ut).querySelectorAll("table"));
|
|
1378
|
+
const i = Array.from(t(this, ut).querySelectorAll("table"));
|
|
1380
1379
|
if (!(!i || i.length === 0)) {
|
|
1381
1380
|
for (const e of i)
|
|
1382
1381
|
H.log(e), $("[data-bind]", e).each((s, r) => {
|
|
@@ -1406,7 +1405,7 @@ const ze = class ze {
|
|
|
1406
1405
|
t(this, Lt).call(this);
|
|
1407
1406
|
}
|
|
1408
1407
|
}, "#init"));
|
|
1409
|
-
y(this,
|
|
1408
|
+
y(this, ut, i), t(this, se).call(this);
|
|
1410
1409
|
}
|
|
1411
1410
|
// π― κΈ°μ‘΄μ νλ μ΄λ¦λ§ μ°λ κ³³λ€κ³Όμ νΈνμ μν΄ μ΄λ¦ λ°°μ΄λ§ 리ν΄νλ λ©μλ μ μ§
|
|
1412
1411
|
get() {
|
|
@@ -1428,19 +1427,19 @@ const ze = class ze {
|
|
|
1428
1427
|
return t(this, L).some((e) => e.name === i);
|
|
1429
1428
|
}
|
|
1430
1429
|
};
|
|
1431
|
-
|
|
1430
|
+
ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), c(ze, "ngFields");
|
|
1432
1431
|
let ye = ze;
|
|
1433
|
-
var
|
|
1432
|
+
var nt, ie, re;
|
|
1434
1433
|
const Be = class Be extends HTMLElement {
|
|
1435
1434
|
constructor() {
|
|
1436
1435
|
super();
|
|
1437
1436
|
//#created = false;
|
|
1438
|
-
d(this,
|
|
1437
|
+
d(this, nt);
|
|
1439
1438
|
d(this, ie);
|
|
1440
1439
|
d(this, re, /* @__PURE__ */ c(() => {
|
|
1441
1440
|
this.fields = new ye(this), y(this, ie, new fe(this)), H.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
1442
1441
|
}, "#init"));
|
|
1443
|
-
this.attachShadow({ mode: "open" }), y(this,
|
|
1442
|
+
this.attachShadow({ mode: "open" }), y(this, nt, new be(this));
|
|
1444
1443
|
}
|
|
1445
1444
|
connectedCallback() {
|
|
1446
1445
|
t(this, re).call(this);
|
|
@@ -1450,18 +1449,18 @@ const Be = class Be extends HTMLElement {
|
|
|
1450
1449
|
}
|
|
1451
1450
|
// π― μΈλΆμμ grid.data.set(...) ννλ‘ μ κ·Όν μ μλλ‘ λ°μ΄ν° λ§€λμ μ€ν
|
|
1452
1451
|
get data() {
|
|
1453
|
-
return t(this,
|
|
1452
|
+
return t(this, nt).data;
|
|
1454
1453
|
}
|
|
1455
1454
|
// π― ν(row) κ΄λ ¨ μ μ΄ μ κ·Όμ μ€ν
|
|
1456
1455
|
get row() {
|
|
1457
|
-
return t(this,
|
|
1456
|
+
return t(this, nt).row;
|
|
1458
1457
|
}
|
|
1459
1458
|
// π― μ 체 λ°μ΄ν° λ§€λμ μ κ·Ό νμν κ²½μ°
|
|
1460
1459
|
get dataManager() {
|
|
1461
|
-
return t(this,
|
|
1460
|
+
return t(this, nt);
|
|
1462
1461
|
}
|
|
1463
1462
|
};
|
|
1464
|
-
|
|
1463
|
+
nt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), c(Be, "NineTable");
|
|
1465
1464
|
let pe = Be;
|
|
1466
1465
|
customElements.get("nine-table") || customElements.define("nine-table", pe);
|
|
1467
1466
|
const mt = class mt extends HTMLElement {
|
|
@@ -1475,7 +1474,7 @@ const mt = class mt extends HTMLElement {
|
|
|
1475
1474
|
connectedCallback() {
|
|
1476
1475
|
}
|
|
1477
1476
|
};
|
|
1478
|
-
c(mt, "BasicCellElement"),
|
|
1477
|
+
c(mt, "BasicCellElement"), A(mt, "_styleCache", /* @__PURE__ */ new Map()), A(mt, "_customStyleCache", /* @__PURE__ */ new Map());
|
|
1479
1478
|
let me = mt;
|
|
1480
1479
|
var C, Ht, p, qe, Re, Te, ke, Ce;
|
|
1481
1480
|
const De = class De extends me {
|
|
@@ -1488,7 +1487,7 @@ const De = class De extends me {
|
|
|
1488
1487
|
d(this, Re);
|
|
1489
1488
|
d(this, Te);
|
|
1490
1489
|
d(this, ke);
|
|
1491
|
-
|
|
1490
|
+
A(this, "getDisplayText", /* @__PURE__ */ c((e) => {
|
|
1492
1491
|
if (t(this, p))
|
|
1493
1492
|
if (t(this, p).closest("tbody")) {
|
|
1494
1493
|
const s = t(this, p).closest("tr").data, r = parseInt(t(this, p).dataset.row);
|
|
@@ -1513,9 +1512,9 @@ const De = class De extends me {
|
|
|
1513
1512
|
var e = ninegrid.j.querySelectorAll(t(this, p)).attr("suppress");
|
|
1514
1513
|
if (e && (e = parseInt(e)), e && !isNaN(e)) {
|
|
1515
1514
|
var s = t(this, p).closest("tr"), r = [];
|
|
1516
|
-
$("th,td", s).each((v,
|
|
1517
|
-
var R = ninegrid.j.querySelectorAll(
|
|
1518
|
-
R &&
|
|
1515
|
+
$("th,td", s).each((v, I) => {
|
|
1516
|
+
var R = ninegrid.j.querySelectorAll(I).attr("suppress");
|
|
1517
|
+
R && I.dataset.row && (R = parseInt(R), !isNaN(R) && R <= e && r.push(R));
|
|
1519
1518
|
}), r.sort();
|
|
1520
1519
|
var n = !1;
|
|
1521
1520
|
if (parseInt(s.sectionRowIndex / t(this, C).template.length) > 0)
|
|
@@ -1532,12 +1531,12 @@ const De = class De extends me {
|
|
|
1532
1531
|
else
|
|
1533
1532
|
n = !0;
|
|
1534
1533
|
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"));
|
|
1535
|
-
var m = parseInt(t(this, p).dataset.matrixRow), x = m - 1,
|
|
1536
|
-
$(
|
|
1534
|
+
var m = parseInt(t(this, p).dataset.matrixRow), x = m - 1, E = t(this, C).body.querySelector(`tbody.bindable [data-col="${t(this, p).dataset.col}"][data-matrix-row="${x}"]`);
|
|
1535
|
+
$(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");
|
|
1537
1536
|
}
|
|
1538
1537
|
}
|
|
1539
1538
|
}, "#resetSuppress"));
|
|
1540
|
-
|
|
1539
|
+
A(this, "getExprValue", /* @__PURE__ */ c((e, s, r, n) => {
|
|
1541
1540
|
if (typeof e < "u")
|
|
1542
1541
|
try {
|
|
1543
1542
|
r = parseInt(r);
|
|
@@ -1588,17 +1587,17 @@ const Pe = class Pe extends ve {
|
|
|
1588
1587
|
};
|
|
1589
1588
|
c(Pe, "EditableCellElement");
|
|
1590
1589
|
let xe = Pe;
|
|
1591
|
-
var Mt,
|
|
1590
|
+
var Mt, ot, gt, bt, ne, U, Le;
|
|
1592
1591
|
const je = class je extends xe {
|
|
1593
1592
|
constructor() {
|
|
1594
1593
|
super();
|
|
1595
1594
|
d(this, Mt);
|
|
1596
|
-
d(this,
|
|
1595
|
+
d(this, ot);
|
|
1596
|
+
d(this, gt);
|
|
1597
1597
|
d(this, bt);
|
|
1598
|
-
d(this, yt);
|
|
1599
1598
|
d(this, ne);
|
|
1600
|
-
d(this,
|
|
1601
|
-
|
|
1599
|
+
d(this, U);
|
|
1600
|
+
A(this, "refresh", /* @__PURE__ */ c(() => {
|
|
1602
1601
|
const e = super.refresh();
|
|
1603
1602
|
t(this, Mt).value = e;
|
|
1604
1603
|
}, "refresh"));
|
|
@@ -1634,20 +1633,20 @@ const je = class je extends xe {
|
|
|
1634
1633
|
*/
|
|
1635
1634
|
d(this, Le, /* @__PURE__ */ c((e) => {
|
|
1636
1635
|
if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
|
|
1637
|
-
if (t(this,
|
|
1636
|
+
if (t(this, ot) == "number") {
|
|
1638
1637
|
let n = [];
|
|
1639
|
-
if (t(this,
|
|
1638
|
+
if (t(this, U) && Number(t(this, U)) > 0 && n.push("."), t(this, bt) && Number(t(this, bt)) >= 0 && n.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !n.includes(e.key) && e.preventDefault(), t(this, U) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
|
|
1640
1639
|
var s = e.target.value, r = s.indexOf(".");
|
|
1641
1640
|
if (r >= 0) {
|
|
1642
1641
|
var s = s.substr(r + 1, s.length);
|
|
1643
|
-
s.length >= Number(t(this,
|
|
1642
|
+
s.length >= Number(t(this, U)) && e.preventDefault();
|
|
1644
1643
|
}
|
|
1645
1644
|
}
|
|
1646
1645
|
}
|
|
1647
|
-
t(this,
|
|
1646
|
+
t(this, gt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, gt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
|
|
1648
1647
|
}
|
|
1649
1648
|
}, "#onKeyDown"));
|
|
1650
|
-
if (this.applyBaseStyle(), y(this,
|
|
1649
|
+
if (this.applyBaseStyle(), y(this, ot, this.getAttribute("type") || "text"), y(this, gt, this.getAttribute("maxbyte")), y(this, bt, this.getAttribute("min")), y(this, ne, this.getAttribute("max")), y(this, U, this.getAttribute("scale")), !["text", "number"].includes(t(this, ot))) throw `invalid type : ${t(this, ot)}`;
|
|
1651
1650
|
}
|
|
1652
1651
|
connectedCallback() {
|
|
1653
1652
|
for (var e = [], s = 0; s < this.attributes.length; s++)
|
|
@@ -1660,7 +1659,7 @@ const je = class je extends xe {
|
|
|
1660
1659
|
`, super.connectedCallback(), y(this, Mt, this.querySelector("input"));
|
|
1661
1660
|
}
|
|
1662
1661
|
};
|
|
1663
|
-
Mt = new WeakMap(),
|
|
1662
|
+
Mt = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), U = new WeakMap(), Le = new WeakMap(), c(je, "CellInputText");
|
|
1664
1663
|
let we = je;
|
|
1665
1664
|
customElements.get("cell-input-text");
|
|
1666
1665
|
customElements.get("cell-input") || customElements.define("cell-input", we);
|