@ninebone/table 0.0.533 β 0.0.535
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 +51 -51
- 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
|
@@ -201,12 +201,12 @@ const Me = class Me extends HTMLElement {
|
|
|
201
201
|
z = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), _t = new WeakMap(), G = new WeakMap(), Nt = new WeakMap(), h(Me, "NineTableHScrollBar");
|
|
202
202
|
let le = Me;
|
|
203
203
|
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", le);
|
|
204
|
-
var F,
|
|
204
|
+
var F, at, J, q, vt, wt, Wt;
|
|
205
205
|
const $e = class $e extends HTMLElement {
|
|
206
206
|
constructor() {
|
|
207
207
|
super();
|
|
208
208
|
d(this, F);
|
|
209
|
-
d(this,
|
|
209
|
+
d(this, at);
|
|
210
210
|
d(this, J, !1);
|
|
211
211
|
d(this, q);
|
|
212
212
|
d(this, vt, 0);
|
|
@@ -214,7 +214,7 @@ const $e = class $e extends HTMLElement {
|
|
|
214
214
|
A(this, "refresh", /* @__PURE__ */ h(() => {
|
|
215
215
|
if (!t(this, F) || !t(this, q)) return;
|
|
216
216
|
H.log("nine-table-vscrollbar.refresh");
|
|
217
|
-
const e = t(this, q).container, s = t(this, q).track, i = t(this, q).thumb, n = e.clientHeight, o = (t(this, F).data.get() || []).length, l = t(this,
|
|
217
|
+
const e = t(this, q).container, s = t(this, q).track, i = t(this, q).thumb, n = e.clientHeight, o = (t(this, F).data.get() || []).length, l = t(this, at).getRowHeight(), c = o * l;
|
|
218
218
|
if (c <= n) {
|
|
219
219
|
i.style.display = "none", t(this, q).top.disabled = !0, t(this, q).bottom.disabled = !0;
|
|
220
220
|
return;
|
|
@@ -233,7 +233,7 @@ const $e = class $e extends HTMLElement {
|
|
|
233
233
|
d(this, Wt, /* @__PURE__ */ h(() => {
|
|
234
234
|
H.log("nine-table-vscrollbar.#init");
|
|
235
235
|
const e = t(this, q).container, s = /* @__PURE__ */ h(() => {
|
|
236
|
-
const n = (t(this, F).data.get() || []).length, a = t(this,
|
|
236
|
+
const n = (t(this, F).data.get() || []).length, a = t(this, at).getRowHeight();
|
|
237
237
|
return n * a;
|
|
238
238
|
}, "getContentHeight");
|
|
239
239
|
e.addEventListener("scroll", () => {
|
|
@@ -271,7 +271,7 @@ const $e = class $e extends HTMLElement {
|
|
|
271
271
|
}, "#init"));
|
|
272
272
|
}
|
|
273
273
|
connectedCallback() {
|
|
274
|
-
y(this, F, this.getRootNode().host), y(this,
|
|
274
|
+
y(this, F, this.getRootNode().host), y(this, at, this.closest("nine-table-sheet")), this.innerHTML = `
|
|
275
275
|
<style>
|
|
276
276
|
nine-table-vscrollbar {
|
|
277
277
|
display: flex;
|
|
@@ -352,19 +352,19 @@ const $e = class $e extends HTMLElement {
|
|
|
352
352
|
e();
|
|
353
353
|
}
|
|
354
354
|
};
|
|
355
|
-
F = new WeakMap(),
|
|
355
|
+
F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), q = new WeakMap(), vt = new WeakMap(), wt = new WeakMap(), Wt = new WeakMap(), h($e, "NineTableVScrollBar");
|
|
356
356
|
let ce = $e;
|
|
357
357
|
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", ce);
|
|
358
|
-
var P, S,
|
|
358
|
+
var P, S, Q, D, I, V, tt, St, Ee, lt, Ot, Bt, zt, Et, At, Dt, Pt, Rt, Ae, ct, qt, jt;
|
|
359
359
|
const Ie = class Ie {
|
|
360
360
|
constructor(r) {
|
|
361
361
|
d(this, P);
|
|
362
362
|
d(this, S);
|
|
363
|
-
d(this,
|
|
363
|
+
d(this, Q);
|
|
364
364
|
d(this, D, /* @__PURE__ */ new Map());
|
|
365
365
|
d(this, I, null);
|
|
366
366
|
d(this, V, null);
|
|
367
|
-
d(this,
|
|
367
|
+
d(this, tt, 0);
|
|
368
368
|
d(this, St, 40);
|
|
369
369
|
d(this, Ee, !1);
|
|
370
370
|
d(this, lt, !1);
|
|
@@ -375,7 +375,7 @@ const Ie = class Ie {
|
|
|
375
375
|
r && (t(this, Et).call(this), t(this, ct).call(this, r.scrollTop));
|
|
376
376
|
}, "refresh"));
|
|
377
377
|
A(this, "initialize", /* @__PURE__ */ h(() => {
|
|
378
|
-
H.log("rowManager.initialize"), y(this,
|
|
378
|
+
H.log("rowManager.initialize"), y(this, Q, {
|
|
379
379
|
scrollTables: t(this, S).querySelectorAll(".ng-part-body table"),
|
|
380
380
|
firstTr: t(this, S).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
|
|
381
381
|
}), y(this, I, null), t(this, D).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
|
|
@@ -451,8 +451,8 @@ const Ie = class Ie {
|
|
|
451
451
|
});
|
|
452
452
|
}, "#updateVirtualScrollHeight"));
|
|
453
453
|
d(this, At, /* @__PURE__ */ h(() => {
|
|
454
|
-
if (t(this,
|
|
455
|
-
const r = Math.ceil(t(this,
|
|
454
|
+
if (t(this, tt) > 0 && t(this, I) > 0) {
|
|
455
|
+
const r = Math.ceil(t(this, tt) / t(this, I));
|
|
456
456
|
y(this, St, r + t(this, Ot));
|
|
457
457
|
}
|
|
458
458
|
}, "#updateRowCount"));
|
|
@@ -494,7 +494,7 @@ const Ie = class Ie {
|
|
|
494
494
|
const a = s.querySelector(".ng-part-header"), o = s.querySelector(".ng-part-footer");
|
|
495
495
|
a && (n += a.offsetHeight), o && (n += o.offsetHeight);
|
|
496
496
|
const l = Math.max(i - n, 100);
|
|
497
|
-
t(this,
|
|
497
|
+
t(this, tt) !== l && (y(this, tt, l), t(this, At).call(this), t(this, I) !== null && (t(this, Rt).call(this), this.refresh()));
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
})), t(this, V).observe(t(this, S)));
|
|
@@ -529,9 +529,9 @@ const Ie = class Ie {
|
|
|
529
529
|
const e = t(this, I);
|
|
530
530
|
if (!e || e <= 0) return;
|
|
531
531
|
const s = t(this, P).data.length, i = Math.max(0, Math.floor(r / e)), n = i * e, a = ((f = t(this, D).get(".ng-container-body")) == null ? void 0 : f.length) || 1, o = t(this, S).querySelector(".ng-container-body"), l = o == null ? void 0 : o.querySelector(".ng-part-body tbody.bindable-tbody tr:not(.nodata)");
|
|
532
|
-
H.log(t(this,
|
|
532
|
+
H.log(t(this, Q).firstTr, t(this, Q).firstTr.dataset.row);
|
|
533
533
|
const c = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
|
|
534
|
-
(u = t(this,
|
|
534
|
+
(u = t(this, Q)) == null || u.scrollTables.forEach((g) => {
|
|
535
535
|
g.style.transform = `translateY(${n}px)`;
|
|
536
536
|
}), c !== i && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
|
|
537
537
|
const b = t(this, S).querySelector(g);
|
|
@@ -598,7 +598,7 @@ const Ie = class Ie {
|
|
|
598
598
|
return ((e = t(this, D).get(r)) == null ? void 0 : e.length) || 1;
|
|
599
599
|
}
|
|
600
600
|
};
|
|
601
|
-
P = new WeakMap(), S = new WeakMap(),
|
|
601
|
+
P = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), D = new WeakMap(), I = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), St = new WeakMap(), Ee = new WeakMap(), lt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), zt = new WeakMap(), Et = new WeakMap(), At = new WeakMap(), Dt = new WeakMap(), Pt = new WeakMap(), Rt = new WeakMap(), Ae = new WeakMap(), ct = new WeakMap(), qt = new WeakMap(), jt = new WeakMap(), h(Ie, "RowManager");
|
|
602
602
|
let he = Ie;
|
|
603
603
|
const Ft = class Ft {
|
|
604
604
|
/**
|
|
@@ -679,15 +679,15 @@ const Ft = class Ft {
|
|
|
679
679
|
};
|
|
680
680
|
h(Ft, "TableCompiler");
|
|
681
681
|
let de = Ft;
|
|
682
|
-
var Vt,
|
|
682
|
+
var Vt, et, st, Yt, Ut, ht, Xt, Kt;
|
|
683
683
|
const mt = class mt extends HTMLElement {
|
|
684
684
|
constructor() {
|
|
685
685
|
super();
|
|
686
686
|
d(this, Vt);
|
|
687
|
-
d(this,
|
|
688
|
-
d(this,
|
|
687
|
+
d(this, et, null);
|
|
688
|
+
d(this, st);
|
|
689
689
|
A(this, "invalidate", /* @__PURE__ */ h(() => {
|
|
690
|
-
t(this,
|
|
690
|
+
t(this, st).refresh();
|
|
691
691
|
}, "invalidate"));
|
|
692
692
|
d(this, Yt, /* @__PURE__ */ h(() => {
|
|
693
693
|
[
|
|
@@ -699,15 +699,15 @@ const mt = class mt extends HTMLElement {
|
|
|
699
699
|
if (!n) return;
|
|
700
700
|
n.innerHTML = "";
|
|
701
701
|
const a = document.createElement("div");
|
|
702
|
-
a.className = "ng-part-header", a.appendChild(t(this, ht).call(this, t(this,
|
|
702
|
+
a.className = "ng-part-header", a.appendChild(t(this, ht).call(this, t(this, et), i, "header"));
|
|
703
703
|
const o = document.createElement("div");
|
|
704
704
|
o.className = "ng-part-body";
|
|
705
705
|
const l = document.createElement("div");
|
|
706
|
-
l.className = "ng-scroll-content", l.style.position = "relative", l.style.width = "100%", l.appendChild(t(this, ht).call(this, t(this,
|
|
706
|
+
l.className = "ng-scroll-content", l.style.position = "relative", l.style.width = "100%", l.appendChild(t(this, ht).call(this, t(this, et), i, "body"));
|
|
707
707
|
const c = document.createElement("div");
|
|
708
708
|
c.className = "ng-virtual-spacer", c.style.width = "100%", c.style.pointerEvents = "none", l.appendChild(c), o.appendChild(l);
|
|
709
709
|
const f = document.createElement("div");
|
|
710
|
-
f.className = "ng-part-footer", f.appendChild(t(this, ht).call(this, t(this,
|
|
710
|
+
f.className = "ng-part-footer", f.appendChild(t(this, ht).call(this, t(this, et), i, "footer")), n.appendChild(a), n.appendChild(o), n.appendChild(f);
|
|
711
711
|
});
|
|
712
712
|
}, "#renderSplitContainers"));
|
|
713
713
|
d(this, Ut, /* @__PURE__ */ h(() => {
|
|
@@ -722,7 +722,7 @@ const mt = class mt extends HTMLElement {
|
|
|
722
722
|
});
|
|
723
723
|
}, "#updateContainerWidths"));
|
|
724
724
|
A(this, "generate", /* @__PURE__ */ h((e) => {
|
|
725
|
-
e && (y(this,
|
|
725
|
+
e && (y(this, et, de.compile(e)), t(this, Yt).call(this), t(this, Ut).call(this), t(this, st).initialize(), setTimeout(() => {
|
|
726
726
|
var s;
|
|
727
727
|
(s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
|
|
728
728
|
}, 0));
|
|
@@ -743,7 +743,7 @@ const mt = class mt extends HTMLElement {
|
|
|
743
743
|
c.remove();
|
|
744
744
|
}), n;
|
|
745
745
|
}, "#createSplitTable"));
|
|
746
|
-
A(this, "getRowHeight", /* @__PURE__ */ h(() => t(this,
|
|
746
|
+
A(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, st).getRowHeight(), "getRowHeight"));
|
|
747
747
|
A(this, "scrollToX", /* @__PURE__ */ h((e) => {
|
|
748
748
|
const s = this.querySelector(".ng-container-body .ng-part-body");
|
|
749
749
|
s && (s.scrollLeft = e);
|
|
@@ -898,7 +898,7 @@ const mt = class mt extends HTMLElement {
|
|
|
898
898
|
</div>
|
|
899
899
|
`;
|
|
900
900
|
}, "#render"));
|
|
901
|
-
y(this,
|
|
901
|
+
y(this, st, new he(this)), y(this, Vt, this.getRootNode().host);
|
|
902
902
|
}
|
|
903
903
|
connectedCallback() {
|
|
904
904
|
t(this, Xt).call(this);
|
|
@@ -907,7 +907,7 @@ const mt = class mt extends HTMLElement {
|
|
|
907
907
|
this.innerHTML = "", H.log("NineTableSheet destroyed.");
|
|
908
908
|
}
|
|
909
909
|
};
|
|
910
|
-
Vt = new WeakMap(),
|
|
910
|
+
Vt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Yt = new WeakMap(), Ut = new WeakMap(), ht = new WeakMap(), Xt = new WeakMap(), Kt = new WeakMap(), h(mt, "NineTableSheet"), A(mt, "SCROLLBAR_SIZE", 16);
|
|
911
911
|
let It = mt;
|
|
912
912
|
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", It);
|
|
913
913
|
var Zt, kt;
|
|
@@ -1104,7 +1104,7 @@ const We = class We {
|
|
|
1104
1104
|
};
|
|
1105
1105
|
Ct = new WeakMap(), dt = new WeakMap(), h(We, "ngRow");
|
|
1106
1106
|
let ge = We;
|
|
1107
|
-
var N, T, W, ft, Qt, Y, te,
|
|
1107
|
+
var N, T, W, ft, Qt, Y, te, rt, Lt, ee, se, ut;
|
|
1108
1108
|
const O = class O {
|
|
1109
1109
|
constructor(r, e) {
|
|
1110
1110
|
d(this, N);
|
|
@@ -1123,7 +1123,7 @@ const O = class O {
|
|
|
1123
1123
|
e.__ng || (e.__ng = t(this, Lt).call(this)), e.__ng.height = t(this, Y).slice();
|
|
1124
1124
|
});
|
|
1125
1125
|
}, "#initialize"));
|
|
1126
|
-
d(this,
|
|
1126
|
+
d(this, rt, /* @__PURE__ */ h(() => {
|
|
1127
1127
|
t(this, N).shadowRoot.querySelectorAll("nine-table-sheet").forEach((r) => {
|
|
1128
1128
|
r.invalidate();
|
|
1129
1129
|
});
|
|
@@ -1142,7 +1142,7 @@ const O = class O {
|
|
|
1142
1142
|
return t(this, ut).call(this, s[r]);
|
|
1143
1143
|
}, "get"));
|
|
1144
1144
|
A(this, "set", /* @__PURE__ */ h((r) => {
|
|
1145
|
-
this.clear(), this.add(r, !1), t(this,
|
|
1145
|
+
this.clear(), this.add(r, !1), t(this, rt).call(this);
|
|
1146
1146
|
}, "set"));
|
|
1147
1147
|
d(this, Lt, /* @__PURE__ */ h(() => ({
|
|
1148
1148
|
rowState: O.ROW_STATE.EMPTY,
|
|
@@ -1154,7 +1154,7 @@ const O = class O {
|
|
|
1154
1154
|
_: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
|
|
1155
1155
|
}), "#getDefaultMeta"));
|
|
1156
1156
|
A(this, "reset", /* @__PURE__ */ h(() => {
|
|
1157
|
-
y(this, W, []), y(this, ft, []), t(this,
|
|
1157
|
+
y(this, W, []), y(this, ft, []), t(this, rt).call(this);
|
|
1158
1158
|
}, "reset"));
|
|
1159
1159
|
A(this, "clear", /* @__PURE__ */ h(() => {
|
|
1160
1160
|
var r;
|
|
@@ -1182,7 +1182,7 @@ const O = class O {
|
|
|
1182
1182
|
return e || s.forEach((n, a) => {
|
|
1183
1183
|
const o = t(this, T).rawRecords[i - a];
|
|
1184
1184
|
o && (o.__ng.rowState = O.ROW_STATE.EMPTY);
|
|
1185
|
-
}), t(this,
|
|
1185
|
+
}), t(this, rt).call(this), i;
|
|
1186
1186
|
}, "add"));
|
|
1187
1187
|
A(this, "delete", /* @__PURE__ */ h((r) => {
|
|
1188
1188
|
let e = [];
|
|
@@ -1193,7 +1193,7 @@ const O = class O {
|
|
|
1193
1193
|
n.__ng.rowid === i && (n.__ng.deleted = !0, n.__ng.rowState = O.ROW_STATE.DELETE);
|
|
1194
1194
|
});
|
|
1195
1195
|
}
|
|
1196
|
-
}), this.resetRecords(), t(this,
|
|
1196
|
+
}), this.resetRecords(), t(this, rt).call(this);
|
|
1197
1197
|
}, "delete"));
|
|
1198
1198
|
A(this, "setValue", /* @__PURE__ */ h((r, e, s) => {
|
|
1199
1199
|
var l;
|
|
@@ -1246,7 +1246,7 @@ const O = class O {
|
|
|
1246
1246
|
return this.length;
|
|
1247
1247
|
}
|
|
1248
1248
|
};
|
|
1249
|
-
N = new WeakMap(), T = new WeakMap(), W = new WeakMap(), ft = new WeakMap(), Qt = new WeakMap(), Y = new WeakMap(), te = new WeakMap(),
|
|
1249
|
+
N = new WeakMap(), T = new WeakMap(), W = new WeakMap(), ft = new WeakMap(), Qt = new WeakMap(), Y = new WeakMap(), te = new WeakMap(), rt = new WeakMap(), Lt = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), ut = new WeakMap(), h(O, "ngData"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
1250
1250
|
A(O, "ROW_STATE", {
|
|
1251
1251
|
EMPTY: "EMPTY",
|
|
1252
1252
|
NORMAL: "NORMAL",
|
|
@@ -1255,13 +1255,13 @@ A(O, "ROW_STATE", {
|
|
|
1255
1255
|
DELETE: "DELETE"
|
|
1256
1256
|
});
|
|
1257
1257
|
let be = O;
|
|
1258
|
-
var
|
|
1258
|
+
var it;
|
|
1259
1259
|
const Oe = class Oe {
|
|
1260
1260
|
constructor(r) {
|
|
1261
|
-
d(this,
|
|
1262
|
-
y(this,
|
|
1261
|
+
d(this, it);
|
|
1262
|
+
y(this, it, r), this.row = new ge(this), this.data = new be(t(this, it), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
|
|
1263
1263
|
var e;
|
|
1264
|
-
(e = t(this,
|
|
1264
|
+
(e = t(this, it).view) != null && e.redraw && t(this, it).view.redraw();
|
|
1265
1265
|
}, this.setDataSource = (e) => {
|
|
1266
1266
|
this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
|
|
1267
1267
|
}, this.getRowState = (e) => {
|
|
@@ -1276,7 +1276,7 @@ const Oe = class Oe {
|
|
|
1276
1276
|
}, this.setDataSource([]);
|
|
1277
1277
|
}
|
|
1278
1278
|
};
|
|
1279
|
-
|
|
1279
|
+
it = new WeakMap(), h(Oe, "ngDataManager");
|
|
1280
1280
|
let ye = Oe;
|
|
1281
1281
|
var gt, L, Ht, re;
|
|
1282
1282
|
const Be = class Be {
|
|
@@ -1351,17 +1351,17 @@ const Be = class Be {
|
|
|
1351
1351
|
};
|
|
1352
1352
|
gt = new WeakMap(), L = new WeakMap(), Ht = new WeakMap(), re = new WeakMap(), h(Be, "ngFields");
|
|
1353
1353
|
let pe = Be;
|
|
1354
|
-
var
|
|
1354
|
+
var nt, ie, ne;
|
|
1355
1355
|
const ze = class ze extends HTMLElement {
|
|
1356
1356
|
constructor() {
|
|
1357
1357
|
super();
|
|
1358
1358
|
//#created = false;
|
|
1359
|
-
d(this,
|
|
1359
|
+
d(this, nt);
|
|
1360
1360
|
d(this, ie);
|
|
1361
1361
|
d(this, ne, /* @__PURE__ */ h(() => {
|
|
1362
1362
|
this.fields = new pe(this), y(this, ie, new ue(this)), H.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
1363
1363
|
}, "#init"));
|
|
1364
|
-
this.attachShadow({ mode: "open" }), y(this,
|
|
1364
|
+
this.attachShadow({ mode: "open" }), y(this, nt, new ye(this));
|
|
1365
1365
|
}
|
|
1366
1366
|
connectedCallback() {
|
|
1367
1367
|
t(this, ne).call(this);
|
|
@@ -1371,18 +1371,18 @@ const ze = class ze extends HTMLElement {
|
|
|
1371
1371
|
}
|
|
1372
1372
|
// π― μΈλΆμμ grid.data.set(...) ννλ‘ μ κ·Όν μ μλλ‘ λ°μ΄ν° λ§€λμ μ€ν
|
|
1373
1373
|
get data() {
|
|
1374
|
-
return t(this,
|
|
1374
|
+
return t(this, nt).data;
|
|
1375
1375
|
}
|
|
1376
1376
|
// π― ν(row) κ΄λ ¨ μ μ΄ μ κ·Όμ μ€ν
|
|
1377
1377
|
get row() {
|
|
1378
|
-
return t(this,
|
|
1378
|
+
return t(this, nt).row;
|
|
1379
1379
|
}
|
|
1380
1380
|
// π― μ 체 λ°μ΄ν° λ§€λμ μ κ·Ό νμν κ²½μ°
|
|
1381
1381
|
get dataManager() {
|
|
1382
|
-
return t(this,
|
|
1382
|
+
return t(this, nt);
|
|
1383
1383
|
}
|
|
1384
1384
|
};
|
|
1385
|
-
|
|
1385
|
+
nt = new WeakMap(), ie = new WeakMap(), ne = new WeakMap(), h(ze, "NineTable");
|
|
1386
1386
|
let me = ze;
|
|
1387
1387
|
customElements.get("nine-table") || customElements.define("nine-table", me);
|
|
1388
1388
|
const xt = class xt extends HTMLElement {
|
|
@@ -1509,12 +1509,12 @@ const Pe = class Pe extends ve {
|
|
|
1509
1509
|
};
|
|
1510
1510
|
h(Pe, "EditableCellElement");
|
|
1511
1511
|
let we = Pe;
|
|
1512
|
-
var $t,
|
|
1512
|
+
var $t, ot, bt, yt, oe, U, Le;
|
|
1513
1513
|
const je = class je extends we {
|
|
1514
1514
|
constructor() {
|
|
1515
1515
|
super();
|
|
1516
1516
|
d(this, $t);
|
|
1517
|
-
d(this,
|
|
1517
|
+
d(this, ot);
|
|
1518
1518
|
d(this, bt);
|
|
1519
1519
|
d(this, yt);
|
|
1520
1520
|
d(this, oe);
|
|
@@ -1555,7 +1555,7 @@ const je = class je extends we {
|
|
|
1555
1555
|
*/
|
|
1556
1556
|
d(this, Le, /* @__PURE__ */ h((e) => {
|
|
1557
1557
|
if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
|
|
1558
|
-
if (t(this,
|
|
1558
|
+
if (t(this, ot) == "number") {
|
|
1559
1559
|
let n = [];
|
|
1560
1560
|
if (t(this, U) && Number(t(this, U)) > 0 && n.push("."), t(this, yt) && Number(t(this, yt)) >= 0 && n.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !n.includes(e.key) && e.preventDefault(), t(this, U) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
|
|
1561
1561
|
var s = e.target.value, i = s.indexOf(".");
|
|
@@ -1568,7 +1568,7 @@ const je = class je extends we {
|
|
|
1568
1568
|
t(this, bt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, bt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
|
|
1569
1569
|
}
|
|
1570
1570
|
}, "#onKeyDown"));
|
|
1571
|
-
if (this.applyBaseStyle(), y(this,
|
|
1571
|
+
if (this.applyBaseStyle(), y(this, ot, this.getAttribute("type") || "text"), y(this, bt, this.getAttribute("maxbyte")), y(this, yt, this.getAttribute("min")), y(this, oe, this.getAttribute("max")), y(this, U, this.getAttribute("scale")), !["text", "number"].includes(t(this, ot))) throw `invalid type : ${t(this, ot)}`;
|
|
1572
1572
|
}
|
|
1573
1573
|
connectedCallback() {
|
|
1574
1574
|
for (var e = [], s = 0; s < this.attributes.length; s++)
|
|
@@ -1581,7 +1581,7 @@ const je = class je extends we {
|
|
|
1581
1581
|
`, super.connectedCallback(), y(this, $t, this.querySelector("input"));
|
|
1582
1582
|
}
|
|
1583
1583
|
};
|
|
1584
|
-
$t = new WeakMap(),
|
|
1584
|
+
$t = new WeakMap(), ot = new WeakMap(), bt = new WeakMap(), yt = new WeakMap(), oe = new WeakMap(), U = new WeakMap(), Le = new WeakMap(), h(je, "CellInputText");
|
|
1585
1585
|
let Se = je;
|
|
1586
1586
|
customElements.get("cell-input-text");
|
|
1587
1587
|
customElements.get("cell-input") || customElements.define("cell-input", Se);
|