@ninebone/table 0.0.720 β 0.0.721
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 +174 -187
- 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,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var ds = Object.defineProperty;
|
|
2
|
+
var fs = (q) => {
|
|
3
3
|
throw TypeError(q);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var h = (q, s) =>
|
|
7
|
-
var E = (q, s, e) =>
|
|
8
|
-
var t = (q, s, e) => (
|
|
9
|
-
var
|
|
5
|
+
var ps = (q, s, e) => s in q ? ds(q, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[s] = e;
|
|
6
|
+
var h = (q, s) => ds(q, "name", { value: s, configurable: !0 });
|
|
7
|
+
var E = (q, s, e) => ps(q, typeof s != "symbol" ? s + "" : s, e), xe = (q, s, e) => s.has(q) || fs("Cannot " + e);
|
|
8
|
+
var t = (q, s, e) => (xe(q, s, "read from private field"), e ? e.call(q) : s.get(q)), d = (q, s, e) => s.has(q) ? fs("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(q) : s.set(q, e), p = (q, s, e, n) => (xe(q, s, "write to private field"), n ? n.call(q, e) : s.set(q, e), e), Q = (q, s, e) => (xe(q, s, "access private method"), e);
|
|
9
|
+
var us = (q, s, e, n) => ({
|
|
10
10
|
set _(r) {
|
|
11
11
|
p(q, s, r, e);
|
|
12
12
|
},
|
|
@@ -14,17 +14,17 @@ var ys = (q, s, e, n) => ({
|
|
|
14
14
|
return t(q, s, n);
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
import { trace as
|
|
18
|
-
const
|
|
17
|
+
import { trace as ys } from "@ninebone/util";
|
|
18
|
+
const Ue = class Ue extends ys.constructor {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(), this.init("nine-table", "green");
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
h(
|
|
24
|
-
let
|
|
25
|
-
const R = new
|
|
26
|
-
var B, K, A, tt, et, st,
|
|
27
|
-
const
|
|
23
|
+
h(Ue, "Trace");
|
|
24
|
+
let we = Ue;
|
|
25
|
+
const R = new we();
|
|
26
|
+
var B, K, A, tt, et, st, jt, nt, Yt;
|
|
27
|
+
const Xe = class Xe extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
30
30
|
d(this, B);
|
|
@@ -33,7 +33,7 @@ const Ze = class Ze extends HTMLElement {
|
|
|
33
33
|
d(this, tt);
|
|
34
34
|
d(this, et);
|
|
35
35
|
d(this, st);
|
|
36
|
-
d(this,
|
|
36
|
+
d(this, jt, /* @__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 && (p(this, st, new ResizeObserver(() => {
|
|
@@ -73,7 +73,7 @@ const Ze = class Ze extends HTMLElement {
|
|
|
73
73
|
const l = n.clientWidth, u = r.scrollWidth - l;
|
|
74
74
|
return c > 0 && u > 0 && (n.scrollLeft = a / c * u), a > 0 && a < c - 1;
|
|
75
75
|
}, "#thumbMoveTo"));
|
|
76
|
-
d(this,
|
|
76
|
+
d(this, Yt, /* @__PURE__ */ h(() => {
|
|
77
77
|
const e = /* @__PURE__ */ h((r) => {
|
|
78
78
|
clearInterval(t(this, tt)), clearInterval(t(this, et));
|
|
79
79
|
const o = parseInt(t(this, A).thumb.style.left || 0, 10);
|
|
@@ -190,7 +190,7 @@ const Ze = class Ze extends HTMLElement {
|
|
|
190
190
|
right: this.querySelector(".ng-scroll-right")
|
|
191
191
|
}), n.addEventListener("scroll", () => {
|
|
192
192
|
t(this, K) || this.refresh();
|
|
193
|
-
}), t(this,
|
|
193
|
+
}), t(this, Yt).call(this), t(this, jt).call(this), this.refresh();
|
|
194
194
|
}, "initWhenReady");
|
|
195
195
|
e();
|
|
196
196
|
}
|
|
@@ -198,11 +198,11 @@ const Ze = class Ze extends HTMLElement {
|
|
|
198
198
|
t(this, st) && t(this, st).disconnect();
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
B = new WeakMap(), K = new WeakMap(), A = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(),
|
|
202
|
-
let
|
|
203
|
-
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar",
|
|
204
|
-
var rt, ot, bt, C, Tt, Ct,
|
|
205
|
-
const
|
|
201
|
+
B = new WeakMap(), K = new WeakMap(), A = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), jt = new WeakMap(), nt = new WeakMap(), Yt = new WeakMap(), h(Xe, "NineTableHScrollBar");
|
|
202
|
+
let ve = Xe;
|
|
203
|
+
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ve);
|
|
204
|
+
var rt, ot, bt, C, Tt, Ct, Vt;
|
|
205
|
+
const Ke = class Ke extends HTMLElement {
|
|
206
206
|
constructor() {
|
|
207
207
|
super();
|
|
208
208
|
d(this, rt);
|
|
@@ -230,7 +230,7 @@ const Je = class Je extends HTMLElement {
|
|
|
230
230
|
const y = l - f;
|
|
231
231
|
g < 0 && (g = 0), g > y && (g = y), r.style.top = `${g}px`, t(this, C).top.disabled = u <= 0, t(this, C).bottom.disabled = u >= b - 1;
|
|
232
232
|
}, "refresh"));
|
|
233
|
-
d(this,
|
|
233
|
+
d(this, Vt, /* @__PURE__ */ h(() => {
|
|
234
234
|
R.log("nine-table-vscrollbar.#init");
|
|
235
235
|
const e = t(this, C).container, n = /* @__PURE__ */ h(() => {
|
|
236
236
|
const o = (t(this, rt).data.get() || []).length, i = t(this, ot).getRowHeight();
|
|
@@ -345,16 +345,16 @@ const Je = class Je extends HTMLElement {
|
|
|
345
345
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
346
346
|
top: this.querySelector(".ng-scroll-top"),
|
|
347
347
|
bottom: this.querySelector(".ng-scroll-bottom")
|
|
348
|
-
}), t(this,
|
|
348
|
+
}), t(this, Vt).call(this), this.refresh();
|
|
349
349
|
}, "initWhenReady");
|
|
350
350
|
e();
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
|
-
rt = new WeakMap(), ot = new WeakMap(), bt = new WeakMap(), C = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(),
|
|
354
|
-
let
|
|
355
|
-
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar",
|
|
356
|
-
var j, S, it, P, D, G, at, kt,
|
|
357
|
-
const
|
|
353
|
+
rt = new WeakMap(), ot = new WeakMap(), bt = new WeakMap(), C = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Vt = new WeakMap(), h(Ke, "NineTableVScrollBar");
|
|
354
|
+
let Se = Ke;
|
|
355
|
+
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Se);
|
|
356
|
+
var j, S, it, P, D, G, at, kt, Oe, ze, Ut, Xt, Lt, It, Ht, Kt, Gt, Mt, We, pt, $t, Zt;
|
|
357
|
+
const Ge = class Ge {
|
|
358
358
|
constructor(s) {
|
|
359
359
|
d(this, j);
|
|
360
360
|
d(this, S);
|
|
@@ -364,10 +364,10 @@ const Qe = class Qe {
|
|
|
364
364
|
d(this, G, null);
|
|
365
365
|
d(this, at, 0);
|
|
366
366
|
d(this, kt, 40);
|
|
367
|
-
d(this,
|
|
368
|
-
d(this,
|
|
367
|
+
d(this, Oe, !1);
|
|
368
|
+
d(this, ze, !1);
|
|
369
369
|
//#ticking = false; // π― κ³ μ μ€ν¬λ‘€ μ€λ‘νλ§μ© νλκ·Έ
|
|
370
|
-
d(this,
|
|
370
|
+
d(this, Ut, 3);
|
|
371
371
|
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
372
372
|
var e;
|
|
373
373
|
R.log("rowManager.refresh");
|
|
@@ -406,7 +406,7 @@ const Qe = class Qe {
|
|
|
406
406
|
});
|
|
407
407
|
}
|
|
408
408
|
}, "initialize"));
|
|
409
|
-
d(this,
|
|
409
|
+
d(this, Xt, /* @__PURE__ */ h((s, e) => {
|
|
410
410
|
R.log("rowManager.#renderRows");
|
|
411
411
|
const n = t(this, P).get(e);
|
|
412
412
|
if (!n || n.length === 0) return;
|
|
@@ -460,10 +460,10 @@ const Qe = class Qe {
|
|
|
460
460
|
d(this, Ht, /* @__PURE__ */ h(() => {
|
|
461
461
|
if (t(this, at) > 0 && t(this, D) > 0) {
|
|
462
462
|
const s = Math.ceil(t(this, at) / t(this, D));
|
|
463
|
-
p(this, kt, s + t(this,
|
|
463
|
+
p(this, kt, s + t(this, Ut));
|
|
464
464
|
}
|
|
465
465
|
}, "#updateRowCount"));
|
|
466
|
-
d(this,
|
|
466
|
+
d(this, Kt, /* @__PURE__ */ h(() => {
|
|
467
467
|
var a, c, l, f, u, b;
|
|
468
468
|
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"), n = t(this, S).querySelector(".ng-container-right .ng-part-body table");
|
|
469
469
|
if (e) {
|
|
@@ -490,7 +490,7 @@ const Qe = class Qe {
|
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
}, "#syncRowHeights"));
|
|
493
|
-
d(this,
|
|
493
|
+
d(this, Gt, /* @__PURE__ */ h(() => {
|
|
494
494
|
!t(this, S) || !(t(this, S) instanceof HTMLElement) || (p(this, G, new ResizeObserver((s) => {
|
|
495
495
|
for (const e of s) {
|
|
496
496
|
const n = e.target;
|
|
@@ -509,10 +509,10 @@ const Qe = class Qe {
|
|
|
509
509
|
d(this, Mt, /* @__PURE__ */ h(() => {
|
|
510
510
|
R.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
|
|
511
511
|
const e = t(this, S).querySelector(s);
|
|
512
|
-
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this,
|
|
513
|
-
}), t(this,
|
|
512
|
+
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Xt).call(this, e, s);
|
|
513
|
+
}), t(this, Zt).call(this), t(this, Kt).call(this);
|
|
514
514
|
}, "#renderAllContainers"));
|
|
515
|
-
d(this,
|
|
515
|
+
d(this, We, /* @__PURE__ */ h((s) => {
|
|
516
516
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
|
|
517
517
|
var l;
|
|
518
518
|
const n = t(this, S).querySelector(e);
|
|
@@ -582,7 +582,7 @@ const Qe = class Qe {
|
|
|
582
582
|
i && typeof i.refresh == "function" && i.refresh();
|
|
583
583
|
});
|
|
584
584
|
}, "#bindRowData"));
|
|
585
|
-
d(this,
|
|
585
|
+
d(this, Zt, /* @__PURE__ */ h(() => {
|
|
586
586
|
var c, l, f;
|
|
587
587
|
R.log("rowManager.#syncHeaderHeights");
|
|
588
588
|
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"), n = t(this, S).querySelector(".ng-container-right .ng-part-header table");
|
|
@@ -600,7 +600,7 @@ const Qe = class Qe {
|
|
|
600
600
|
E(this, "destroy", /* @__PURE__ */ h(() => {
|
|
601
601
|
t(this, G) && (t(this, G).disconnect(), p(this, G, null));
|
|
602
602
|
}, "destroy"));
|
|
603
|
-
p(this, j, s.getRootNode().host), p(this, S, s), t(this,
|
|
603
|
+
p(this, j, s.getRootNode().host), p(this, S, s), t(this, Gt).call(this);
|
|
604
604
|
}
|
|
605
605
|
getRowHeight() {
|
|
606
606
|
return t(this, D);
|
|
@@ -610,14 +610,14 @@ const Qe = class Qe {
|
|
|
610
610
|
return ((e = t(this, P).get(s)) == null ? void 0 : e.length) || 1;
|
|
611
611
|
}
|
|
612
612
|
};
|
|
613
|
-
j = new WeakMap(), S = new WeakMap(), it = new WeakMap(), P = new WeakMap(), D = new WeakMap(), G = new WeakMap(), at = new WeakMap(), kt = new WeakMap(),
|
|
614
|
-
let
|
|
615
|
-
const
|
|
613
|
+
j = new WeakMap(), S = new WeakMap(), it = new WeakMap(), P = new WeakMap(), D = new WeakMap(), G = new WeakMap(), at = new WeakMap(), kt = new WeakMap(), Oe = new WeakMap(), ze = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), Lt = new WeakMap(), It = new WeakMap(), Ht = new WeakMap(), Kt = new WeakMap(), Gt = new WeakMap(), Mt = new WeakMap(), We = new WeakMap(), pt = new WeakMap(), $t = new WeakMap(), Zt = new WeakMap(), h(Ge, "RowManager");
|
|
614
|
+
let Re = Ge;
|
|
615
|
+
const Jt = class Jt {
|
|
616
616
|
/**
|
|
617
617
|
* π― λ μ΄μμ λ΄μ μ¬λ¬ rawTables λ°°μ΄μ μΌκ΄λ‘ λ°μ λ¨μΌ λ§μ€ν° ν
νλ¦ΏμΌλ‘ μ¬μ μ»΄νμΌν©λλ€.
|
|
618
618
|
*/
|
|
619
619
|
static compileAll(s) {
|
|
620
|
-
return Array.isArray(s) ? s.map((e) =>
|
|
620
|
+
return Array.isArray(s) ? s.map((e) => Jt.compile(e)) : [];
|
|
621
621
|
}
|
|
622
622
|
/**
|
|
623
623
|
* π― λ¨μΌ μλ³Έ ν
μ΄λΈμ λ°μ κΈ°λ³Έ ꡬ쑰 보μ λ° 2μ°¨μ 격μ μΈλ±μ€ μ¬μ λΆμ¬ μλ£λ λ§μ€ν° ν
μ΄λΈ λ°ν
|
|
@@ -689,10 +689,10 @@ const Qt = class Qt {
|
|
|
689
689
|
}
|
|
690
690
|
// π― [μΆκ°] td/thμ μ μΈλ cell-type μμ±μ μ½μ΄ 컀μ€ν
νκ·Έλ‘ μλ κ°μΈκΈ°
|
|
691
691
|
};
|
|
692
|
-
h(
|
|
693
|
-
let
|
|
694
|
-
var _, Y, U, At,
|
|
695
|
-
const
|
|
692
|
+
h(Jt, "TableCompiler");
|
|
693
|
+
let Ae = Jt;
|
|
694
|
+
var _, Y, U, At, gs;
|
|
695
|
+
const Ze = class Ze {
|
|
696
696
|
constructor(s) {
|
|
697
697
|
d(this, U);
|
|
698
698
|
d(this, _);
|
|
@@ -725,7 +725,7 @@ const ts = class ts {
|
|
|
725
725
|
});
|
|
726
726
|
}), R.log(`β¨ [CellSelection.render] Total rendered cells marked: ${i}`);
|
|
727
727
|
}, "render"));
|
|
728
|
-
p(this, _, s), Q(this, U,
|
|
728
|
+
p(this, _, s), Q(this, U, gs).call(this), t(this, _).querySelectorAll(
|
|
729
729
|
".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
|
|
730
730
|
).forEach((n) => {
|
|
731
731
|
n.addEventListener("scroll", () => {
|
|
@@ -750,8 +750,8 @@ const ts = class ts {
|
|
|
750
750
|
if (isNaN(v)) return;
|
|
751
751
|
const m = parseInt(w.rowSpan || 1, 10), I = parseInt(w.colSpan || 1, 10), T = y + m - 1, H = v + I - 1;
|
|
752
752
|
if (T >= o && y <= i && H >= a && v <= c) {
|
|
753
|
-
const X = Math.min(o, y),
|
|
754
|
-
(X !== o ||
|
|
753
|
+
const X = Math.min(o, y), ls = Math.max(i, T), cs = Math.min(a, v), hs = Math.max(c, H);
|
|
754
|
+
(X !== o || ls !== i || cs !== a || hs !== c) && (o = X, i = ls, a = cs, c = hs, f = !0);
|
|
755
755
|
}
|
|
756
756
|
});
|
|
757
757
|
});
|
|
@@ -765,7 +765,7 @@ _ = new WeakMap(), Y = new WeakMap(), U = new WeakSet(), At = /* @__PURE__ */ h(
|
|
|
765
765
|
if (isNaN(e)) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
|
|
766
766
|
const n = s.closest("tbody"), o = Array.from(n.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), i = o.indexOf(s), a = o.length > 0 ? o.length : 1, c = e * a + (i >= 0 ? i : s.sectionRowIndex % a);
|
|
767
767
|
return { dataRow: e, subRowIndex: i, matrixRow: c };
|
|
768
|
-
}, "#getMatrixRow"),
|
|
768
|
+
}, "#getMatrixRow"), gs = /* @__PURE__ */ h(function() {
|
|
769
769
|
const s = t(this, _).querySelector(".ng-container-top");
|
|
770
770
|
if (!s) {
|
|
771
771
|
R.log("β [CellSelection] .ng-container-top not found!");
|
|
@@ -803,17 +803,17 @@ _ = new WeakMap(), Y = new WeakMap(), U = new WeakSet(), At = /* @__PURE__ */ h(
|
|
|
803
803
|
}, "onMouseUp");
|
|
804
804
|
document.addEventListener("mousemove", a), document.addEventListener("mouseup", c);
|
|
805
805
|
});
|
|
806
|
-
}, "#initEvents"), h(
|
|
807
|
-
let
|
|
808
|
-
var V, lt, te, ee,
|
|
809
|
-
const
|
|
806
|
+
}, "#initEvents"), h(Ze, "CellSelection");
|
|
807
|
+
let Ee = Ze;
|
|
808
|
+
var V, lt, Qt, te, ee, bs;
|
|
809
|
+
const Je = class Je {
|
|
810
810
|
constructor(s) {
|
|
811
|
-
d(this,
|
|
811
|
+
d(this, ee);
|
|
812
812
|
d(this, V);
|
|
813
813
|
d(this, lt, null);
|
|
814
|
+
d(this, Qt, -1);
|
|
814
815
|
d(this, te, -1);
|
|
815
|
-
|
|
816
|
-
p(this, V, s), Q(this, se, xs).call(this), R.log("π― [CellNavigation] Initialized");
|
|
816
|
+
p(this, V, s), Q(this, ee, bs).call(this), R.log("π― [CellNavigation] Initialized");
|
|
817
817
|
}
|
|
818
818
|
get currentCell() {
|
|
819
819
|
return t(this, lt);
|
|
@@ -823,7 +823,7 @@ const es = class es {
|
|
|
823
823
|
p(this, lt, s), s.focus();
|
|
824
824
|
const e = parseInt(s.dataset.row, 10), n = parseInt(s.dataset.col, 10);
|
|
825
825
|
if (!isNaN(e) && !isNaN(n)) {
|
|
826
|
-
p(this,
|
|
826
|
+
p(this, Qt, e), p(this, te, n);
|
|
827
827
|
const r = s.closest("tr"), o = r == null ? void 0 : r.closest("tbody");
|
|
828
828
|
if (o) {
|
|
829
829
|
const a = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((u) => parseInt(u.dataset.row, 10) === e), c = a.length > 0 ? a.length : 1, l = a.indexOf(r), f = e * c + (l >= 0 ? l : 0);
|
|
@@ -863,53 +863,37 @@ const es = class es {
|
|
|
863
863
|
}
|
|
864
864
|
}
|
|
865
865
|
};
|
|
866
|
-
V = new WeakMap(), lt = new WeakMap(),
|
|
866
|
+
V = new WeakMap(), lt = new WeakMap(), Qt = new WeakMap(), te = new WeakMap(), ee = new WeakSet(), bs = /* @__PURE__ */ h(function() {
|
|
867
867
|
t(this, V).addEventListener("mousedown", (s) => {
|
|
868
868
|
const e = s.target.closest("td, th");
|
|
869
869
|
!e || e.dataset.row === void 0 || e.dataset.col === void 0 || e.closest("tr").classList.contains("nodata") || (this.currentCell = e);
|
|
870
870
|
}), t(this, V).addEventListener("keydown", (s) => {
|
|
871
871
|
["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(s.code) && this.moveCell(s);
|
|
872
872
|
});
|
|
873
|
-
}, "#initEvents"), h(
|
|
874
|
-
let
|
|
875
|
-
var
|
|
876
|
-
const ss = class ss {
|
|
877
|
-
constructor(s) {
|
|
878
|
-
d(this, ne);
|
|
879
|
-
d(this, _t);
|
|
880
|
-
d(this, Nt);
|
|
881
|
-
p(this, ne, s), p(this, _t, new Te(s)), p(this, Nt, new Ce(s)), R.log("π― [CellManager] Master Initialized");
|
|
882
|
-
}
|
|
883
|
-
get selection() {
|
|
884
|
-
return t(this, _t);
|
|
885
|
-
}
|
|
886
|
-
get navigation() {
|
|
887
|
-
return t(this, Nt);
|
|
888
|
-
}
|
|
889
|
-
};
|
|
890
|
-
ne = new WeakMap(), _t = new WeakMap(), Nt = new WeakMap(), h(ss, "CellManager");
|
|
891
|
-
let ke = ss;
|
|
892
|
-
var re, ct, ht, oe, ie, ae, yt, le, ce;
|
|
873
|
+
}, "#initEvents"), h(Je, "CellNavigation");
|
|
874
|
+
let qe = Je;
|
|
875
|
+
var se, ct, ht, _t, ne, re, oe, yt, ie, ae;
|
|
893
876
|
const Et = class Et extends HTMLElement {
|
|
894
877
|
constructor() {
|
|
895
878
|
super();
|
|
896
|
-
d(this,
|
|
879
|
+
d(this, se);
|
|
897
880
|
d(this, ct, null);
|
|
898
881
|
d(this, ht);
|
|
899
|
-
d(this,
|
|
882
|
+
d(this, _t);
|
|
883
|
+
d(this, ne);
|
|
900
884
|
E(this, "invalidate", /* @__PURE__ */ h(() => {
|
|
901
885
|
R.log("sheet.invalidate()"), t(this, ht).refresh();
|
|
902
886
|
}, "invalidate"));
|
|
903
887
|
E(this, "generate", /* @__PURE__ */ h((e) => {
|
|
904
888
|
if (R.log("sheet.generate()"), !e) return;
|
|
905
|
-
p(this, ct,
|
|
889
|
+
p(this, ct, Ae.compile(e)), t(this, re).call(this), t(this, oe).call(this);
|
|
906
890
|
const n = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), o = this.querySelector(".ng-nodata-overlay");
|
|
907
891
|
n && o && (o.style.top = `${n.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, ht).initialize(), setTimeout(() => {
|
|
908
892
|
var i;
|
|
909
893
|
(i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
|
|
910
894
|
}, 0);
|
|
911
895
|
}, "generate"));
|
|
912
|
-
d(this,
|
|
896
|
+
d(this, re, /* @__PURE__ */ h(() => {
|
|
913
897
|
[
|
|
914
898
|
{ selector: ".ng-container-body", type: null },
|
|
915
899
|
{ selector: ".ng-container-left", type: "left" },
|
|
@@ -919,7 +903,7 @@ const Et = class Et extends HTMLElement {
|
|
|
919
903
|
(o = this.querySelector(`${n} .ng-part-header`)) == null || o.appendChild(t(this, yt).call(this, t(this, ct), r, "header")), (i = this.querySelector(`${n} .ng-virtual-spacer`)) == null || i.before(t(this, yt).call(this, t(this, ct), r, "body")), (a = this.querySelector(`${n} .ng-part-footer`)) == null || a.appendChild(t(this, yt).call(this, t(this, ct), r, "footer"));
|
|
920
904
|
});
|
|
921
905
|
}, "#renderSplitContainers"));
|
|
922
|
-
d(this,
|
|
906
|
+
d(this, oe, /* @__PURE__ */ h(() => {
|
|
923
907
|
["left", "right", "body"].forEach((e) => {
|
|
924
908
|
const n = this.querySelector(`.ng-container-${e}`), r = n == null ? void 0 : n.querySelectorAll("table");
|
|
925
909
|
if (!n || !r || r.length === 0) return;
|
|
@@ -955,10 +939,10 @@ const Et = class Et extends HTMLElement {
|
|
|
955
939
|
const n = this.querySelector(".ng-container-body .ng-part-body");
|
|
956
940
|
n && (n.scrollTop = e);
|
|
957
941
|
}, "scrollToY"));
|
|
958
|
-
d(this,
|
|
959
|
-
t(this,
|
|
942
|
+
d(this, ie, /* @__PURE__ */ h(() => {
|
|
943
|
+
t(this, ae).call(this), p(this, _t, new Ee(this)), p(this, ne, new qe(this));
|
|
960
944
|
}, "#init"));
|
|
961
|
-
d(this,
|
|
945
|
+
d(this, ae, /* @__PURE__ */ h(() => {
|
|
962
946
|
const e = Et.SCROLLBAR_SIZE;
|
|
963
947
|
this.innerHTML = `
|
|
964
948
|
<style>
|
|
@@ -1160,31 +1144,34 @@ const Et = class Et extends HTMLElement {
|
|
|
1160
1144
|
</div>
|
|
1161
1145
|
`;
|
|
1162
1146
|
}, "#render"));
|
|
1163
|
-
p(this, ht, new
|
|
1147
|
+
p(this, ht, new Re(this)), p(this, se, this.getRootNode().host);
|
|
1164
1148
|
}
|
|
1165
1149
|
connectedCallback() {
|
|
1166
|
-
t(this,
|
|
1150
|
+
t(this, ie).call(this);
|
|
1151
|
+
}
|
|
1152
|
+
get selection() {
|
|
1153
|
+
return t(this, _t);
|
|
1167
1154
|
}
|
|
1168
1155
|
disconnectedCallback() {
|
|
1169
1156
|
this.innerHTML = "", R.log("NineTableSheet destroyed.");
|
|
1170
1157
|
}
|
|
1171
1158
|
};
|
|
1172
|
-
|
|
1173
|
-
let
|
|
1174
|
-
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet",
|
|
1175
|
-
var
|
|
1176
|
-
const
|
|
1159
|
+
se = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), _t = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), yt = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), h(Et, "NineTableSheet"), E(Et, "SCROLLBAR_SIZE", 16);
|
|
1160
|
+
let Ft = Et;
|
|
1161
|
+
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Ft);
|
|
1162
|
+
var le, Nt;
|
|
1163
|
+
const Qe = class Qe extends HTMLElement {
|
|
1177
1164
|
constructor() {
|
|
1178
1165
|
super();
|
|
1179
|
-
d(this,
|
|
1166
|
+
d(this, le, /* @__PURE__ */ h(() => {
|
|
1180
1167
|
var e;
|
|
1181
1168
|
(e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (n) => {
|
|
1182
1169
|
var i;
|
|
1183
1170
|
const r = n.ctrlKey || n.metaKey || n.shiftKey, o = parseInt((i = n.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
|
|
1184
|
-
t(this,
|
|
1185
|
-
}), t(this,
|
|
1171
|
+
t(this, Nt).call(this, o, r);
|
|
1172
|
+
}), t(this, Nt).call(this, 0, !1);
|
|
1186
1173
|
}, "#init"));
|
|
1187
|
-
d(this,
|
|
1174
|
+
d(this, Nt, /* @__PURE__ */ h((e, n = !1) => {
|
|
1188
1175
|
const r = /* @__PURE__ */ h(() => {
|
|
1189
1176
|
const f = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
1190
1177
|
Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
|
|
@@ -1217,30 +1204,30 @@ const ns = class ns extends HTMLElement {
|
|
|
1217
1204
|
}, "#switchSheet"));
|
|
1218
1205
|
}
|
|
1219
1206
|
connectedCallback() {
|
|
1220
|
-
t(this,
|
|
1207
|
+
t(this, le).call(this);
|
|
1221
1208
|
}
|
|
1222
1209
|
};
|
|
1223
|
-
|
|
1224
|
-
let
|
|
1225
|
-
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets",
|
|
1226
|
-
var N,
|
|
1227
|
-
const
|
|
1210
|
+
le = new WeakMap(), Nt = new WeakMap(), h(Qe, "NineTableSheets");
|
|
1211
|
+
let Te = Qe;
|
|
1212
|
+
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Te);
|
|
1213
|
+
var N, ce, Dt, he;
|
|
1214
|
+
const ts = class ts {
|
|
1228
1215
|
constructor(s) {
|
|
1229
1216
|
d(this, N);
|
|
1230
|
-
d(this,
|
|
1231
|
-
t(this,
|
|
1217
|
+
d(this, ce, /* @__PURE__ */ h(() => {
|
|
1218
|
+
t(this, he).call(this), new ResizeObserver((s) => {
|
|
1232
1219
|
for (let e of s)
|
|
1233
|
-
t(this, N).getAttribute("auto-height") === "true" && t(this,
|
|
1220
|
+
t(this, N).getAttribute("auto-height") === "true" && t(this, Dt).call(this);
|
|
1234
1221
|
}).observe(t(this, N));
|
|
1235
1222
|
}, "#init"));
|
|
1236
|
-
d(this,
|
|
1223
|
+
d(this, Dt, /* @__PURE__ */ h(() => {
|
|
1237
1224
|
var c, l;
|
|
1238
1225
|
const s = Array.from(t(this, N).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
1239
1226
|
if (s.length === 0) return;
|
|
1240
|
-
const e = parseInt(t(this, N).getAttribute("max-display-row"), 10) || 10, n = Math.max(...s.map((f) => f.getRowHeight())), r = (c = t(this, N).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, N).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i =
|
|
1227
|
+
const e = parseInt(t(this, N).getAttribute("max-display-row"), 10) || 10, n = Math.max(...s.map((f) => f.getRowHeight())), r = (c = t(this, N).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, N).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = Ft.SCROLLBAR_SIZE, a = e * n + r + o + i;
|
|
1241
1228
|
t(this, N).style.height = `${a}px`;
|
|
1242
1229
|
}, "#applyAutoHeight"));
|
|
1243
|
-
d(this,
|
|
1230
|
+
d(this, he, /* @__PURE__ */ h(() => {
|
|
1244
1231
|
const e = Array.from(t(this, N).children).filter((c) => c.tagName === "TABLE"), n = t(this, N).getAttribute("auto-height") === "true", r = e.length, o = e.map((c, l) => {
|
|
1245
1232
|
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>` : "";
|
|
1246
1233
|
return u + b;
|
|
@@ -1369,22 +1356,22 @@ const rs = class rs {
|
|
|
1369
1356
|
const a = t(this, N).shadowRoot.querySelectorAll("nine-table-sheet");
|
|
1370
1357
|
a == null || a.forEach((c, l) => {
|
|
1371
1358
|
e[l] && setTimeout(() => {
|
|
1372
|
-
c.generate(e[l]), n && t(this,
|
|
1359
|
+
c.generate(e[l]), n && t(this, Dt).call(this);
|
|
1373
1360
|
});
|
|
1374
1361
|
});
|
|
1375
1362
|
}, "#render"));
|
|
1376
|
-
p(this, N, s), t(this,
|
|
1363
|
+
p(this, N, s), t(this, ce).call(this);
|
|
1377
1364
|
}
|
|
1378
1365
|
};
|
|
1379
|
-
N = new WeakMap(),
|
|
1380
|
-
let
|
|
1381
|
-
var
|
|
1382
|
-
const
|
|
1366
|
+
N = new WeakMap(), ce = new WeakMap(), Dt = new WeakMap(), he = new WeakMap(), h(ts, "LayoutManager");
|
|
1367
|
+
let Ce = ts;
|
|
1368
|
+
var Ot, mt;
|
|
1369
|
+
const es = class es {
|
|
1383
1370
|
constructor(s) {
|
|
1384
|
-
d(this,
|
|
1371
|
+
d(this, Ot);
|
|
1385
1372
|
d(this, mt, -1);
|
|
1386
|
-
E(this, "count", /* @__PURE__ */ h(() => t(this,
|
|
1387
|
-
p(this,
|
|
1373
|
+
E(this, "count", /* @__PURE__ */ h(() => t(this, Ot).rawRecords.length, "count"));
|
|
1374
|
+
p(this, Ot, s);
|
|
1388
1375
|
}
|
|
1389
1376
|
get at() {
|
|
1390
1377
|
return t(this, mt);
|
|
@@ -1394,25 +1381,25 @@ const os = class os {
|
|
|
1394
1381
|
});
|
|
1395
1382
|
}
|
|
1396
1383
|
};
|
|
1397
|
-
|
|
1398
|
-
let
|
|
1399
|
-
var O, k, z, xt,
|
|
1384
|
+
Ot = new WeakMap(), mt = new WeakMap(), h(es, "ngRow");
|
|
1385
|
+
let ke = es;
|
|
1386
|
+
var O, k, z, xt, de, Z, fe, dt, zt, ue, ge, wt;
|
|
1400
1387
|
const W = class W {
|
|
1401
1388
|
constructor(s, e) {
|
|
1402
1389
|
d(this, O);
|
|
1403
1390
|
d(this, k);
|
|
1404
1391
|
d(this, z, []);
|
|
1405
1392
|
d(this, xt, []);
|
|
1406
|
-
d(this,
|
|
1393
|
+
d(this, de, 0);
|
|
1407
1394
|
d(this, Z, []);
|
|
1408
|
-
d(this,
|
|
1395
|
+
d(this, fe, /* @__PURE__ */ h(() => {
|
|
1409
1396
|
p(this, Z, []);
|
|
1410
1397
|
const s = t(this, O).template || [];
|
|
1411
1398
|
Array.from(s).forEach((e) => {
|
|
1412
1399
|
var n;
|
|
1413
1400
|
t(this, Z).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
|
|
1414
1401
|
}), (t(this, k).rawRecords || []).forEach((e) => {
|
|
1415
|
-
e.__ng || (e.__ng = t(this,
|
|
1402
|
+
e.__ng || (e.__ng = t(this, zt).call(this)), e.__ng.height = t(this, Z).slice();
|
|
1416
1403
|
});
|
|
1417
1404
|
}, "#initialize"));
|
|
1418
1405
|
d(this, dt, /* @__PURE__ */ h(() => {
|
|
@@ -1437,7 +1424,7 @@ const W = class W {
|
|
|
1437
1424
|
E(this, "set", /* @__PURE__ */ h((s) => {
|
|
1438
1425
|
this.clear(), this.add(s, !1), t(this, dt).call(this);
|
|
1439
1426
|
}, "set"));
|
|
1440
|
-
d(this,
|
|
1427
|
+
d(this, zt, /* @__PURE__ */ h(() => ({
|
|
1441
1428
|
rowState: W.ROW_STATE.EMPTY,
|
|
1442
1429
|
deleted: !1,
|
|
1443
1430
|
filtered: !1,
|
|
@@ -1453,7 +1440,7 @@ const W = class W {
|
|
|
1453
1440
|
var s;
|
|
1454
1441
|
t(this, k).rawRecords = [], p(this, z, []), p(this, xt, []), (s = t(this, k).viewRecords) != null && s.reset && t(this, k).viewRecords.reset();
|
|
1455
1442
|
}, "clear"));
|
|
1456
|
-
d(this,
|
|
1443
|
+
d(this, ue, /* @__PURE__ */ h((s) => {
|
|
1457
1444
|
var r;
|
|
1458
1445
|
Array.isArray(s) || (s = [s]);
|
|
1459
1446
|
const e = typeof ((r = t(this, O).fields) == null ? void 0 : r.get) == "function" ? t(this, O).fields.get() : Object.keys(s[0] || {}), n = [];
|
|
@@ -1464,13 +1451,13 @@ const W = class W {
|
|
|
1464
1451
|
}), n.push(i);
|
|
1465
1452
|
}), n;
|
|
1466
1453
|
}, "#json2Array"));
|
|
1467
|
-
d(this,
|
|
1468
|
-
e.__ng = t(this,
|
|
1454
|
+
d(this, ge, /* @__PURE__ */ h((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
|
|
1455
|
+
e.__ng = t(this, zt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
|
|
1469
1456
|
}), s), "#defaultInsert"));
|
|
1470
1457
|
E(this, "add", /* @__PURE__ */ h((s, e = !0) => {
|
|
1471
1458
|
s === void 0 && (s = {});
|
|
1472
|
-
const n = t(this,
|
|
1473
|
-
t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this,
|
|
1459
|
+
const n = t(this, ue).call(this, s);
|
|
1460
|
+
t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, ge).call(this, n)), this.resetRecords();
|
|
1474
1461
|
const r = this.count() - 1;
|
|
1475
1462
|
return e || n.forEach((o, i) => {
|
|
1476
1463
|
const a = t(this, k).rawRecords[r - i];
|
|
@@ -1518,7 +1505,7 @@ const W = class W {
|
|
|
1518
1505
|
return e ? o[0] : o;
|
|
1519
1506
|
}, "#conv"));
|
|
1520
1507
|
E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
|
|
1521
|
-
p(this, O, s), p(this, k, e), t(this,
|
|
1508
|
+
p(this, O, s), p(this, k, e), t(this, fe).call(this);
|
|
1522
1509
|
}
|
|
1523
1510
|
get source() {
|
|
1524
1511
|
return t(this, wt).call(this, t(this, k).rawRecords);
|
|
@@ -1527,7 +1514,7 @@ const W = class W {
|
|
|
1527
1514
|
this.clear(), this.add(s, !1);
|
|
1528
1515
|
}
|
|
1529
1516
|
get nextId() {
|
|
1530
|
-
return ++
|
|
1517
|
+
return ++us(this, de)._;
|
|
1531
1518
|
}
|
|
1532
1519
|
get count() {
|
|
1533
1520
|
return t(this, z).length;
|
|
@@ -1539,7 +1526,7 @@ const W = class W {
|
|
|
1539
1526
|
return this.length;
|
|
1540
1527
|
}
|
|
1541
1528
|
};
|
|
1542
|
-
O = new WeakMap(), k = new WeakMap(), z = new WeakMap(), xt = new WeakMap(),
|
|
1529
|
+
O = new WeakMap(), k = new WeakMap(), z = new WeakMap(), xt = new WeakMap(), de = new WeakMap(), Z = new WeakMap(), fe = new WeakMap(), dt = new WeakMap(), zt = new WeakMap(), ue = new WeakMap(), ge = new WeakMap(), wt = new WeakMap(), h(W, "ngData"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
1543
1530
|
E(W, "ROW_STATE", {
|
|
1544
1531
|
EMPTY: "EMPTY",
|
|
1545
1532
|
NORMAL: "NORMAL",
|
|
@@ -1547,12 +1534,12 @@ E(W, "ROW_STATE", {
|
|
|
1547
1534
|
UPDATE: "UPDATE",
|
|
1548
1535
|
DELETE: "DELETE"
|
|
1549
1536
|
});
|
|
1550
|
-
let
|
|
1537
|
+
let Le = W;
|
|
1551
1538
|
var ft;
|
|
1552
|
-
const
|
|
1539
|
+
const ss = class ss {
|
|
1553
1540
|
constructor(s) {
|
|
1554
1541
|
d(this, ft);
|
|
1555
|
-
p(this, ft, s), this.row = new
|
|
1542
|
+
p(this, ft, s), this.row = new ke(this), this.data = new Le(t(this, ft), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
|
|
1556
1543
|
var e;
|
|
1557
1544
|
(e = t(this, ft).view) != null && e.redraw && t(this, ft).view.redraw();
|
|
1558
1545
|
}, this.setDataSource = (e) => {
|
|
@@ -1569,10 +1556,10 @@ const is = class is {
|
|
|
1569
1556
|
}, this.setDataSource([]);
|
|
1570
1557
|
}
|
|
1571
1558
|
};
|
|
1572
|
-
ft = new WeakMap(), h(
|
|
1573
|
-
let
|
|
1574
|
-
var vt, M,
|
|
1575
|
-
const
|
|
1559
|
+
ft = new WeakMap(), h(ss, "ngDataManager");
|
|
1560
|
+
let Ie = ss;
|
|
1561
|
+
var vt, M, Wt, be;
|
|
1562
|
+
const ns = class ns {
|
|
1576
1563
|
// π― μ΄μ { name: string, type: string } κ°μ²΄λ€μ λ°°μ΄λ‘ κ΄λ¦¬ν©λλ€.
|
|
1577
1564
|
constructor(s) {
|
|
1578
1565
|
d(this, vt);
|
|
@@ -1580,15 +1567,15 @@ const as = class as {
|
|
|
1580
1567
|
E(this, "add", /* @__PURE__ */ h((s, e = "string") => {
|
|
1581
1568
|
s.forEach((n) => {
|
|
1582
1569
|
t(this, M).some((r) => r.name === n) || t(this, M).push({ name: n, type: e });
|
|
1583
|
-
}), t(this,
|
|
1570
|
+
}), t(this, Wt).call(this);
|
|
1584
1571
|
}, "add"));
|
|
1585
|
-
d(this,
|
|
1572
|
+
d(this, Wt, /* @__PURE__ */ h(() => {
|
|
1586
1573
|
const s = /* @__PURE__ */ new Map();
|
|
1587
1574
|
t(this, M).forEach((e) => {
|
|
1588
1575
|
s.set(e.name, e.type);
|
|
1589
1576
|
}), p(this, M, Array.from(s, ([e, n]) => ({ name: e, type: n }))), p(this, M, t(this, M).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, M).sort((e, n) => e.name.length < n.name.length ? 1 : -1);
|
|
1590
1577
|
}, "#adjust"));
|
|
1591
|
-
d(this,
|
|
1578
|
+
d(this, be, /* @__PURE__ */ h(() => {
|
|
1592
1579
|
p(this, M, []), R.log(t(this, vt).querySelectorAll("table"));
|
|
1593
1580
|
const s = Array.from(t(this, vt).querySelectorAll("table"));
|
|
1594
1581
|
if (!(!s || s.length === 0)) {
|
|
@@ -1617,10 +1604,10 @@ const as = class as {
|
|
|
1617
1604
|
});
|
|
1618
1605
|
});
|
|
1619
1606
|
});
|
|
1620
|
-
t(this,
|
|
1607
|
+
t(this, Wt).call(this);
|
|
1621
1608
|
}
|
|
1622
1609
|
}, "#init"));
|
|
1623
|
-
p(this, vt, s), t(this,
|
|
1610
|
+
p(this, vt, s), t(this, be).call(this);
|
|
1624
1611
|
}
|
|
1625
1612
|
// π― κΈ°μ‘΄μ νλ μ΄λ¦λ§ μ°λ κ³³λ€κ³Όμ νΈνμ μν΄ μ΄λ¦ λ°°μ΄λ§ 리ν΄νλ λ©μλ μ μ§
|
|
1626
1613
|
get() {
|
|
@@ -1642,22 +1629,22 @@ const as = class as {
|
|
|
1642
1629
|
return t(this, M).some((e) => e.name === s);
|
|
1643
1630
|
}
|
|
1644
1631
|
};
|
|
1645
|
-
vt = new WeakMap(), M = new WeakMap(),
|
|
1646
|
-
let
|
|
1647
|
-
var ut,
|
|
1648
|
-
const
|
|
1632
|
+
vt = new WeakMap(), M = new WeakMap(), Wt = new WeakMap(), be = new WeakMap(), h(ns, "ngFields");
|
|
1633
|
+
let He = ns;
|
|
1634
|
+
var ut, pe, ye;
|
|
1635
|
+
const rs = class rs extends HTMLElement {
|
|
1649
1636
|
constructor() {
|
|
1650
1637
|
super();
|
|
1651
1638
|
//#created = false;
|
|
1652
1639
|
d(this, ut);
|
|
1653
|
-
d(this,
|
|
1654
|
-
d(this,
|
|
1655
|
-
this.fields = new
|
|
1640
|
+
d(this, pe);
|
|
1641
|
+
d(this, ye, /* @__PURE__ */ h(() => {
|
|
1642
|
+
this.fields = new He(this), p(this, pe, new Ce(this)), R.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
1656
1643
|
}, "#init"));
|
|
1657
|
-
this.attachShadow({ mode: "open" }), p(this, ut, new
|
|
1644
|
+
this.attachShadow({ mode: "open" }), p(this, ut, new Ie(this));
|
|
1658
1645
|
}
|
|
1659
1646
|
connectedCallback() {
|
|
1660
|
-
t(this,
|
|
1647
|
+
t(this, ye).call(this);
|
|
1661
1648
|
}
|
|
1662
1649
|
disconnectedCallback() {
|
|
1663
1650
|
R.log("NineTable disconnected.");
|
|
@@ -1675,9 +1662,9 @@ const ls = class ls extends HTMLElement {
|
|
|
1675
1662
|
return t(this, ut);
|
|
1676
1663
|
}
|
|
1677
1664
|
};
|
|
1678
|
-
ut = new WeakMap(),
|
|
1679
|
-
let
|
|
1680
|
-
customElements.get("nine-table") || customElements.define("nine-table",
|
|
1665
|
+
ut = new WeakMap(), pe = new WeakMap(), ye = new WeakMap(), h(rs, "NineTable");
|
|
1666
|
+
let Me = rs;
|
|
1667
|
+
customElements.get("nine-table") || customElements.define("nine-table", Me);
|
|
1681
1668
|
const qt = class qt extends HTMLElement {
|
|
1682
1669
|
// π 컀μ€ν
μ€νμΌμ© μΊμ μΆκ°
|
|
1683
1670
|
constructor() {
|
|
@@ -1690,18 +1677,18 @@ const qt = class qt extends HTMLElement {
|
|
|
1690
1677
|
}
|
|
1691
1678
|
};
|
|
1692
1679
|
h(qt, "BasicCellElement"), E(qt, "_styleCache", /* @__PURE__ */ new Map()), E(qt, "_customStyleCache", /* @__PURE__ */ new Map());
|
|
1693
|
-
let
|
|
1694
|
-
var L,
|
|
1695
|
-
const
|
|
1680
|
+
let $e = qt;
|
|
1681
|
+
var L, Bt, x, Be, Pe, Fe, je, Ye;
|
|
1682
|
+
const os = class os extends $e {
|
|
1696
1683
|
constructor() {
|
|
1697
1684
|
super();
|
|
1698
1685
|
d(this, L);
|
|
1699
|
-
d(this,
|
|
1686
|
+
d(this, Bt);
|
|
1700
1687
|
d(this, x);
|
|
1688
|
+
d(this, Be);
|
|
1689
|
+
d(this, Pe);
|
|
1690
|
+
d(this, Fe);
|
|
1701
1691
|
d(this, je);
|
|
1702
|
-
d(this, Ye);
|
|
1703
|
-
d(this, Ve);
|
|
1704
|
-
d(this, Ue);
|
|
1705
1692
|
E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
|
|
1706
1693
|
if (t(this, x))
|
|
1707
1694
|
if (t(this, x).closest("tbody")) {
|
|
@@ -1722,7 +1709,7 @@ const cs = class cs extends De {
|
|
|
1722
1709
|
} catch {
|
|
1723
1710
|
}
|
|
1724
1711
|
}, "getDisplayText"));
|
|
1725
|
-
d(this,
|
|
1712
|
+
d(this, Ye, /* @__PURE__ */ h(() => {
|
|
1726
1713
|
if (!(!t(this, L) || !t(this, L).template || !t(this, x).closest("tbody.bindable"))) {
|
|
1727
1714
|
var e = ninegrid.j.querySelectorAll(t(this, x)).attr("suppress");
|
|
1728
1715
|
if (e && (e = parseInt(e)), e && !isNaN(e)) {
|
|
@@ -1765,7 +1752,7 @@ const cs = class cs extends De {
|
|
|
1765
1752
|
}, "getExprValue"));
|
|
1766
1753
|
}
|
|
1767
1754
|
connectedCallback() {
|
|
1768
|
-
super.connectedCallback(), p(this, L, this.getRootNode().host), p(this, x, this.closest("th,td")), p(this,
|
|
1755
|
+
super.connectedCallback(), p(this, L, this.getRootNode().host), p(this, x, this.closest("th,td")), p(this, Bt, t(this, x).closest("tr"));
|
|
1769
1756
|
}
|
|
1770
1757
|
get value() {
|
|
1771
1758
|
var e = !t(this, L) || !t(this, L).dataManager || !t(this, x) || !t(this, x).dataset || !t(this, x).dataset.row || !t(this, x).dataset.bind ? "" : t(this, x).closest("tr").data[t(this, x).dataset.bind];
|
|
@@ -1784,12 +1771,12 @@ const cs = class cs extends De {
|
|
|
1784
1771
|
}
|
|
1785
1772
|
refresh() {
|
|
1786
1773
|
const e = t(this, x).dataset.bind;
|
|
1787
|
-
return parseInt(t(this, x).dataset.row), t(this,
|
|
1774
|
+
return parseInt(t(this, x).dataset.row), t(this, Bt).data[e];
|
|
1788
1775
|
}
|
|
1789
1776
|
};
|
|
1790
|
-
L = new WeakMap(),
|
|
1791
|
-
let
|
|
1792
|
-
const
|
|
1777
|
+
L = new WeakMap(), Bt = new WeakMap(), x = new WeakMap(), Be = new WeakMap(), Pe = new WeakMap(), Fe = new WeakMap(), je = new WeakMap(), Ye = new WeakMap(), h(os, "CellElement");
|
|
1778
|
+
let _e = os;
|
|
1779
|
+
const is = class is extends _e {
|
|
1793
1780
|
constructor() {
|
|
1794
1781
|
super();
|
|
1795
1782
|
}
|
|
@@ -1800,21 +1787,21 @@ const hs = class hs extends Oe {
|
|
|
1800
1787
|
return super.refresh();
|
|
1801
1788
|
}
|
|
1802
1789
|
};
|
|
1803
|
-
h(
|
|
1804
|
-
let
|
|
1805
|
-
var
|
|
1806
|
-
const
|
|
1790
|
+
h(is, "EditableCellElement");
|
|
1791
|
+
let Ne = is;
|
|
1792
|
+
var Pt, gt, St, Rt, me, J, Ve;
|
|
1793
|
+
const as = class as extends Ne {
|
|
1807
1794
|
constructor() {
|
|
1808
1795
|
super();
|
|
1809
|
-
d(this,
|
|
1796
|
+
d(this, Pt);
|
|
1810
1797
|
d(this, gt);
|
|
1811
1798
|
d(this, St);
|
|
1812
1799
|
d(this, Rt);
|
|
1813
|
-
d(this,
|
|
1800
|
+
d(this, me);
|
|
1814
1801
|
d(this, J);
|
|
1815
1802
|
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
1816
1803
|
const e = super.refresh();
|
|
1817
|
-
t(this,
|
|
1804
|
+
t(this, Pt).value = e;
|
|
1818
1805
|
}, "refresh"));
|
|
1819
1806
|
/**
|
|
1820
1807
|
dataRefresh = (v) => {
|
|
@@ -1846,7 +1833,7 @@ const ds = class ds extends ze {
|
|
|
1846
1833
|
if (!v) this.reset();
|
|
1847
1834
|
};
|
|
1848
1835
|
*/
|
|
1849
|
-
d(this,
|
|
1836
|
+
d(this, Ve, /* @__PURE__ */ h((e) => {
|
|
1850
1837
|
if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
|
|
1851
1838
|
if (t(this, gt) == "number") {
|
|
1852
1839
|
let o = [];
|
|
@@ -1861,7 +1848,7 @@ const ds = class ds extends ze {
|
|
|
1861
1848
|
t(this, St) && ninegrid.getByteLength(e.target.value) >= Number(t(this, St)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
|
|
1862
1849
|
}
|
|
1863
1850
|
}, "#onKeyDown"));
|
|
1864
|
-
if (this.applyBaseStyle(), p(this, gt, this.getAttribute("type") || "text"), p(this, St, this.getAttribute("maxbyte")), p(this, Rt, this.getAttribute("min")), p(this,
|
|
1851
|
+
if (this.applyBaseStyle(), p(this, gt, this.getAttribute("type") || "text"), p(this, St, this.getAttribute("maxbyte")), p(this, Rt, this.getAttribute("min")), p(this, me, this.getAttribute("max")), p(this, J, this.getAttribute("scale")), !["text", "number"].includes(t(this, gt))) throw `invalid type : ${t(this, gt)}`;
|
|
1865
1852
|
}
|
|
1866
1853
|
connectedCallback() {
|
|
1867
1854
|
for (var e = [], n = 0; n < this.attributes.length; n++)
|
|
@@ -1871,11 +1858,11 @@ const ds = class ds extends ze {
|
|
|
1871
1858
|
${e.join(" ")}
|
|
1872
1859
|
ondragstart="return false;"
|
|
1873
1860
|
>
|
|
1874
|
-
`, super.connectedCallback(), p(this,
|
|
1861
|
+
`, super.connectedCallback(), p(this, Pt, this.querySelector("input"));
|
|
1875
1862
|
}
|
|
1876
1863
|
};
|
|
1877
|
-
|
|
1878
|
-
let
|
|
1864
|
+
Pt = new WeakMap(), gt = new WeakMap(), St = new WeakMap(), Rt = new WeakMap(), me = new WeakMap(), J = new WeakMap(), Ve = new WeakMap(), h(as, "CellInputText");
|
|
1865
|
+
let De = as;
|
|
1879
1866
|
customElements.get("cell-input-text");
|
|
1880
|
-
customElements.get("cell-input") || customElements.define("cell-input",
|
|
1867
|
+
customElements.get("cell-input") || customElements.define("cell-input", De);
|
|
1881
1868
|
//# sourceMappingURL=nine-table.js.map
|