@ninebone/table 0.0.493 β 0.0.494
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 +126 -126
- package/dist/nine-table.js.map +1 -1
- package/dist/nine-table.umd.js +6 -6
- package/dist/nine-table.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-table.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var je = Object.defineProperty;
|
|
2
|
-
var Fe = (
|
|
3
|
-
throw TypeError(
|
|
2
|
+
var Fe = (R) => {
|
|
3
|
+
throw TypeError(R);
|
|
4
4
|
};
|
|
5
|
-
var Ue = (
|
|
6
|
-
var h = (
|
|
7
|
-
var A = (
|
|
8
|
-
var t = (
|
|
9
|
-
var Ye = (
|
|
5
|
+
var Ue = (R, s, e) => s in R ? je(R, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[s] = e;
|
|
6
|
+
var h = (R, s) => je(R, "name", { value: s, configurable: !0 });
|
|
7
|
+
var A = (R, s, e) => Ue(R, typeof s != "symbol" ? s + "" : s, e), Ve = (R, s, e) => s.has(R) || Fe("Cannot " + e);
|
|
8
|
+
var t = (R, s, e) => (Ve(R, s, "read from private field"), e ? e.call(R) : s.get(R)), d = (R, s, e) => s.has(R) ? Fe("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(R) : s.set(R, e), y = (R, s, e, i) => (Ve(R, s, "write to private field"), i ? i.call(R, e) : s.set(R, e), e);
|
|
9
|
+
var Ye = (R, s, e, i) => ({
|
|
10
10
|
set _(r) {
|
|
11
|
-
y(
|
|
11
|
+
y(R, s, r, e);
|
|
12
12
|
},
|
|
13
13
|
get _() {
|
|
14
|
-
return t(
|
|
14
|
+
return t(R, s, i);
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
import { trace as Xe } from "@ninebone/util";
|
|
@@ -23,7 +23,7 @@ const Le = class Le extends Xe.constructor {
|
|
|
23
23
|
h(Le, "Trace");
|
|
24
24
|
let oe = Le;
|
|
25
25
|
const P = new oe();
|
|
26
|
-
var B, j, w, X, K, Z,
|
|
26
|
+
var B, j, w, X, K, Z, It, G, _t;
|
|
27
27
|
const He = class He extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
@@ -33,7 +33,7 @@ const He = class He extends HTMLElement {
|
|
|
33
33
|
d(this, X);
|
|
34
34
|
d(this, K);
|
|
35
35
|
d(this, Z);
|
|
36
|
-
d(this,
|
|
36
|
+
d(this, It, /* @__PURE__ */ h(() => {
|
|
37
37
|
if (!t(this, B)) return;
|
|
38
38
|
const e = t(this, B).querySelector(".ng-container-body .ng-part-body");
|
|
39
39
|
e && (y(this, Z, new ResizeObserver(() => {
|
|
@@ -73,7 +73,7 @@ const He = class He extends HTMLElement {
|
|
|
73
73
|
const l = i.clientWidth, u = r.scrollWidth - l;
|
|
74
74
|
return c > 0 && u > 0 && (i.scrollLeft = a / c * u), a > 0 && a < c - 1;
|
|
75
75
|
}, "#thumbMoveTo"));
|
|
76
|
-
d(this,
|
|
76
|
+
d(this, _t, /* @__PURE__ */ h(() => {
|
|
77
77
|
const e = /* @__PURE__ */ h((r) => {
|
|
78
78
|
clearInterval(t(this, X)), clearInterval(t(this, K));
|
|
79
79
|
const n = parseInt(t(this, w).thumb.style.left || 0, 10);
|
|
@@ -190,7 +190,7 @@ const He = class He extends HTMLElement {
|
|
|
190
190
|
right: this.querySelector(".ng-scroll-right")
|
|
191
191
|
}), i.addEventListener("scroll", () => {
|
|
192
192
|
t(this, j) || this.refresh();
|
|
193
|
-
}), t(this,
|
|
193
|
+
}), t(this, _t).call(this), t(this, It).call(this), this.refresh();
|
|
194
194
|
}, "initWhenReady");
|
|
195
195
|
e();
|
|
196
196
|
}
|
|
@@ -198,24 +198,24 @@ const He = class He extends HTMLElement {
|
|
|
198
198
|
t(this, Z) && t(this, Z).disconnect();
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
B = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = 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(), h(He, "NineTableHScrollBar");
|
|
202
202
|
let ae = He;
|
|
203
203
|
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ae);
|
|
204
|
-
var F, ot, J,
|
|
204
|
+
var F, ot, J, q, xt, vt, Nt;
|
|
205
205
|
const Me = class Me extends HTMLElement {
|
|
206
206
|
constructor() {
|
|
207
207
|
super();
|
|
208
208
|
d(this, F);
|
|
209
209
|
d(this, ot);
|
|
210
210
|
d(this, J, !1);
|
|
211
|
-
d(this,
|
|
211
|
+
d(this, q);
|
|
212
|
+
d(this, xt, 0);
|
|
212
213
|
d(this, vt, 0);
|
|
213
|
-
d(this, wt, 0);
|
|
214
214
|
A(this, "refresh", /* @__PURE__ */ h(() => {
|
|
215
|
-
if (!t(this, F) || !t(this,
|
|
216
|
-
const e = t(this,
|
|
215
|
+
if (!t(this, F) || !t(this, q)) return;
|
|
216
|
+
const e = t(this, q).container, i = t(this, q).track, r = t(this, q).thumb, n = e.clientHeight, a = (t(this, F).data.get() || []).length, c = t(this, ot).getRowHeight(), l = a * c;
|
|
217
217
|
if (l <= n) {
|
|
218
|
-
r.style.display = "none", t(this,
|
|
218
|
+
r.style.display = "none", t(this, q).top.disabled = !0, t(this, q).bottom.disabled = !0;
|
|
219
219
|
return;
|
|
220
220
|
} else
|
|
221
221
|
r.style.display = "block";
|
|
@@ -227,24 +227,24 @@ const Me = class Me extends HTMLElement {
|
|
|
227
227
|
let m = 0;
|
|
228
228
|
g > 0 && (m = b / g * (f - u));
|
|
229
229
|
const v = f - u;
|
|
230
|
-
m < 0 && (m = 0), m > v && (m = v), r.style.top = `${m}px`, t(this,
|
|
230
|
+
m < 0 && (m = 0), m > v && (m = v), r.style.top = `${m}px`, t(this, q).top.disabled = b <= 0, t(this, q).bottom.disabled = b >= g - 1;
|
|
231
231
|
}, "refresh"));
|
|
232
|
-
d(this,
|
|
233
|
-
const e = t(this,
|
|
232
|
+
d(this, Nt, /* @__PURE__ */ h(() => {
|
|
233
|
+
const e = t(this, q).container, i = /* @__PURE__ */ h(() => {
|
|
234
234
|
const n = (t(this, F).data.get() || []).length, o = t(this, ot).getRowHeight();
|
|
235
235
|
return n * o;
|
|
236
236
|
}, "getContentHeight");
|
|
237
237
|
e.addEventListener("scroll", () => {
|
|
238
238
|
t(this, J) || this.refresh();
|
|
239
|
-
}), t(this,
|
|
239
|
+
}), t(this, q).thumb.addEventListener("mousedown", (r) => {
|
|
240
240
|
if (r.button !== 0) return;
|
|
241
|
-
r.stopPropagation(), r.preventDefault(), y(this, J, !0), y(this,
|
|
241
|
+
r.stopPropagation(), r.preventDefault(), y(this, J, !0), y(this, xt, r.clientY), y(this, vt, e.scrollTop);
|
|
242
242
|
const n = /* @__PURE__ */ h((a) => {
|
|
243
243
|
if (!t(this, J)) return;
|
|
244
|
-
const c = t(this,
|
|
244
|
+
const c = t(this, q).track.getBoundingClientRect(), l = t(this, q).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, xt), g = e.clientHeight, m = i(), v = Math.max(m - g, 1);
|
|
245
245
|
if (u > 0 && v > 0) {
|
|
246
246
|
const E = b / u * v;
|
|
247
|
-
let x = t(this,
|
|
247
|
+
let x = t(this, vt) + E;
|
|
248
248
|
const H = Math.max(0, m - g);
|
|
249
249
|
x < 0 && (x = 0), x > H && (x = H), e.scrollTop = x;
|
|
250
250
|
}
|
|
@@ -253,17 +253,17 @@ const Me = class Me extends HTMLElement {
|
|
|
253
253
|
y(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
|
|
254
254
|
}, "onMouseUp");
|
|
255
255
|
document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
|
|
256
|
-
}), t(this,
|
|
257
|
-
if (r.button !== 0 || r.target === t(this,
|
|
258
|
-
const n = t(this,
|
|
256
|
+
}), t(this, q).track.addEventListener("mousedown", (r) => {
|
|
257
|
+
if (r.button !== 0 || r.target === t(this, q).thumb) return;
|
|
258
|
+
const n = t(this, q).track.getBoundingClientRect(), o = t(this, q).thumb.clientHeight, a = r.clientY - n.top - o / 2, l = n.height - o, f = e.clientHeight, u = i(), b = Math.max(u - f, 1);
|
|
259
259
|
if (l > 0 && b > 0) {
|
|
260
260
|
const g = Math.max(0, Math.min(1, a / l));
|
|
261
261
|
e.scrollTop = g * b;
|
|
262
262
|
}
|
|
263
263
|
this.refresh();
|
|
264
|
-
}), t(this,
|
|
264
|
+
}), t(this, q).top.addEventListener("click", () => {
|
|
265
265
|
e.scrollTop -= 40;
|
|
266
|
-
}), t(this,
|
|
266
|
+
}), t(this, q).bottom.addEventListener("click", () => {
|
|
267
267
|
e.scrollTop += 40;
|
|
268
268
|
});
|
|
269
269
|
}, "#init"));
|
|
@@ -339,21 +339,21 @@ const Me = class Me extends HTMLElement {
|
|
|
339
339
|
setTimeout(e, 10);
|
|
340
340
|
return;
|
|
341
341
|
}
|
|
342
|
-
y(this,
|
|
342
|
+
y(this, q, {
|
|
343
343
|
container: i,
|
|
344
344
|
track: this.querySelector(".ng-scroll-track"),
|
|
345
345
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
346
346
|
top: this.querySelector(".ng-scroll-top"),
|
|
347
347
|
bottom: this.querySelector(".ng-scroll-bottom")
|
|
348
|
-
}), t(this,
|
|
348
|
+
}), t(this, Nt).call(this), this.refresh();
|
|
349
349
|
}, "initWhenReady");
|
|
350
350
|
e();
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
|
-
F = new WeakMap(), ot = new WeakMap(), J = new WeakMap(),
|
|
353
|
+
F = new WeakMap(), ot = new WeakMap(), J = new WeakMap(), q = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), Nt = new WeakMap(), h(Me, "NineTableVScrollBar");
|
|
354
354
|
let le = Me;
|
|
355
355
|
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
|
|
356
|
-
var D, S, z, M, V, Q,
|
|
356
|
+
var D, S, z, M, V, Q, wt, Se, at, Wt, Ot, Bt, St, Et, zt, Dt, At, Ee, lt, Rt, Pt;
|
|
357
357
|
const $e = class $e {
|
|
358
358
|
constructor(s) {
|
|
359
359
|
d(this, D);
|
|
@@ -362,14 +362,14 @@ const $e = class $e {
|
|
|
362
362
|
d(this, M, null);
|
|
363
363
|
d(this, V, null);
|
|
364
364
|
d(this, Q, 0);
|
|
365
|
-
d(this,
|
|
365
|
+
d(this, wt, 40);
|
|
366
366
|
d(this, Se, !1);
|
|
367
367
|
d(this, at, !1);
|
|
368
|
-
d(this,
|
|
368
|
+
d(this, Wt, 3);
|
|
369
369
|
A(this, "refresh", /* @__PURE__ */ h(() => {
|
|
370
370
|
P.log("rowManager.refresh");
|
|
371
371
|
const s = t(this, S).querySelector(".ng-container-body .ng-part-body");
|
|
372
|
-
s && (t(this,
|
|
372
|
+
s && (t(this, St).call(this), t(this, lt).call(this, s.scrollTop));
|
|
373
373
|
}, "refresh"));
|
|
374
374
|
A(this, "initialize", /* @__PURE__ */ h(() => {
|
|
375
375
|
y(this, M, null), t(this, z).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
|
|
@@ -384,11 +384,11 @@ const $e = class $e {
|
|
|
384
384
|
});
|
|
385
385
|
const s = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), i = t(this, S).querySelector(".ng-container-right .ng-part-body"), r = t(this, S).querySelector(".ng-container-body .ng-part-header"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer");
|
|
386
386
|
if (s) {
|
|
387
|
-
t(this,
|
|
387
|
+
t(this, Bt).call(this, s), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, s.scrollTop);
|
|
388
388
|
let o = !1;
|
|
389
389
|
const a = /* @__PURE__ */ h((c, l, f) => {
|
|
390
390
|
var u;
|
|
391
|
-
o || (o = !0, s && s.scrollTop !== c && (s.scrollTop = c), e && e.scrollTop !== c && (e.scrollTop = c), i && i.scrollTop !== c && (i.scrollTop = c), r && r.scrollLeft !== l && (r.scrollLeft = l), n && n.scrollLeft !== l && (n.scrollLeft = l), t(this,
|
|
391
|
+
o || (o = !0, s && s.scrollTop !== c && (s.scrollTop = c), e && e.scrollTop !== c && (e.scrollTop = c), i && i.scrollTop !== c && (i.scrollTop = c), r && r.scrollLeft !== l && (r.scrollLeft = l), n && n.scrollLeft !== l && (n.scrollLeft = l), t(this, lt).call(this, c), (u = t(this, S).querySelector("nine-table-vscrollbar")) == null || u.refresh(), o = !1);
|
|
392
392
|
}, "syncScroll");
|
|
393
393
|
[s, e, i].forEach((c) => {
|
|
394
394
|
c && c.addEventListener("scroll", () => {
|
|
@@ -399,20 +399,20 @@ const $e = class $e {
|
|
|
399
399
|
});
|
|
400
400
|
}
|
|
401
401
|
}, "initialize"));
|
|
402
|
-
d(this,
|
|
402
|
+
d(this, Ot, /* @__PURE__ */ h((s, e) => {
|
|
403
403
|
const i = t(this, z).get(e);
|
|
404
404
|
if (!i || i.length === 0) return;
|
|
405
405
|
const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
406
406
|
if (!r) return;
|
|
407
407
|
r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
|
|
408
408
|
const n = r.querySelector("tr.nodata"), o = document.createDocumentFragment();
|
|
409
|
-
for (let a = 0; a < t(this,
|
|
409
|
+
for (let a = 0; a < t(this, wt); a++)
|
|
410
410
|
i.forEach((c) => {
|
|
411
411
|
o.appendChild(c.cloneNode(!0));
|
|
412
412
|
});
|
|
413
413
|
n ? n.before(o) : r.appendChild(o);
|
|
414
414
|
}, "#renderRows"));
|
|
415
|
-
d(this,
|
|
415
|
+
d(this, Bt, /* @__PURE__ */ h((s) => {
|
|
416
416
|
if (t(this, M) !== null && t(this, M) > 0)
|
|
417
417
|
return t(this, M);
|
|
418
418
|
P.log("#measureAndCacheHeight");
|
|
@@ -431,9 +431,9 @@ const $e = class $e {
|
|
|
431
431
|
const u = i.querySelectorAll("tr:not(.nodata)");
|
|
432
432
|
return u.forEach((b) => {
|
|
433
433
|
f += b.offsetHeight || b.getBoundingClientRect().height;
|
|
434
|
-
}), u.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, y(this, M, f > 0 ? f : 24), t(this,
|
|
434
|
+
}), u.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, y(this, M, f > 0 ? f : 24), t(this, Et).call(this), t(this, M);
|
|
435
435
|
}, "#measureAndCacheHeight"));
|
|
436
|
-
d(this,
|
|
436
|
+
d(this, St, /* @__PURE__ */ h(() => {
|
|
437
437
|
const e = (t(this, D).data.get() || []).length, i = t(this, M), r = e * i;
|
|
438
438
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
|
|
439
439
|
const o = t(this, S).querySelector(n);
|
|
@@ -442,10 +442,10 @@ const $e = class $e {
|
|
|
442
442
|
a && (a.style.height = `${r}px`);
|
|
443
443
|
});
|
|
444
444
|
}, "#updateVirtualScrollHeight"));
|
|
445
|
-
d(this,
|
|
445
|
+
d(this, Et, /* @__PURE__ */ h(() => {
|
|
446
446
|
if (t(this, Q) > 0 && t(this, M) > 0) {
|
|
447
447
|
const s = Math.ceil(t(this, Q) / t(this, M));
|
|
448
|
-
y(this,
|
|
448
|
+
y(this, wt, s + t(this, Wt));
|
|
449
449
|
}
|
|
450
450
|
}, "#updateRowCount"));
|
|
451
451
|
d(this, zt, /* @__PURE__ */ h(() => {
|
|
@@ -486,15 +486,15 @@ const $e = class $e {
|
|
|
486
486
|
const o = i.querySelector(".ng-part-header"), a = i.querySelector(".ng-part-footer");
|
|
487
487
|
o && (n += o.offsetHeight), a && (n += a.offsetHeight);
|
|
488
488
|
const c = Math.max(r - n, 100);
|
|
489
|
-
t(this, Q) !== c && (y(this, Q, c), t(this,
|
|
489
|
+
t(this, Q) !== c && (y(this, Q, c), t(this, Et).call(this), t(this, M) !== null && t(this, At).call(this));
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
})), t(this, V).observe(t(this, S)));
|
|
493
493
|
}, "#initResizeObserver"));
|
|
494
|
-
d(this,
|
|
494
|
+
d(this, At, /* @__PURE__ */ h(() => {
|
|
495
495
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
|
|
496
496
|
const e = t(this, S).querySelector(s);
|
|
497
|
-
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this,
|
|
497
|
+
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ot).call(this, e, s);
|
|
498
498
|
}), t(this, Pt).call(this), t(this, zt).call(this);
|
|
499
499
|
}, "#renderAllContainers"));
|
|
500
500
|
d(this, Ee, /* @__PURE__ */ h((s) => {
|
|
@@ -516,7 +516,7 @@ const $e = class $e {
|
|
|
516
516
|
});
|
|
517
517
|
});
|
|
518
518
|
}, "#adjustBufferRows"));
|
|
519
|
-
d(this,
|
|
519
|
+
d(this, lt, /* @__PURE__ */ h((s) => {
|
|
520
520
|
var u;
|
|
521
521
|
const e = t(this, M);
|
|
522
522
|
if (!e || e <= 0) return;
|
|
@@ -557,8 +557,8 @@ const $e = class $e {
|
|
|
557
557
|
});
|
|
558
558
|
}; */
|
|
559
559
|
d(this, Rt, /* @__PURE__ */ h((s, e, i) => {
|
|
560
|
-
s.dataset.row = i, s.data = e,
|
|
561
|
-
r.dataset.row = i
|
|
560
|
+
s.dataset.row = i, s.data = e, Array.from(s.cells).forEach((r, n) => {
|
|
561
|
+
r.dataset.row = i;
|
|
562
562
|
const o = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
|
|
563
563
|
o && typeof o.refresh == "function" && o.refresh();
|
|
564
564
|
});
|
|
@@ -590,7 +590,7 @@ const $e = class $e {
|
|
|
590
590
|
return ((e = t(this, z).get(s)) == null ? void 0 : e.length) || 1;
|
|
591
591
|
}
|
|
592
592
|
};
|
|
593
|
-
D = new WeakMap(), S = new WeakMap(), z = new WeakMap(), M = new WeakMap(), V = new WeakMap(), Q = new WeakMap(),
|
|
593
|
+
D = new WeakMap(), S = new WeakMap(), z = new WeakMap(), M = new WeakMap(), V = new WeakMap(), Q = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), at = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), zt = new WeakMap(), Dt = new WeakMap(), At = new WeakMap(), Ee = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), Pt = new WeakMap(), h($e, "RowManager");
|
|
594
594
|
let ce = $e;
|
|
595
595
|
const jt = class jt {
|
|
596
596
|
/**
|
|
@@ -646,8 +646,8 @@ const jt = class jt {
|
|
|
646
646
|
}
|
|
647
647
|
const H = x.rowSpan || 1, k = x.colSpan || 1;
|
|
648
648
|
for (let O = 0; O < H; O++)
|
|
649
|
-
for (let
|
|
650
|
-
v + O < u && E +
|
|
649
|
+
for (let yt = 0; yt < k; yt++)
|
|
650
|
+
v + O < u && E + yt < b && (g[v + O][E + yt] = O === 0 && yt === 0 ? "1" : "0");
|
|
651
651
|
});
|
|
652
652
|
}), l.forEach((m) => {
|
|
653
653
|
const v = m.sectionRowIndex;
|
|
@@ -671,8 +671,8 @@ const jt = class jt {
|
|
|
671
671
|
};
|
|
672
672
|
h(jt, "TableCompiler");
|
|
673
673
|
let he = jt;
|
|
674
|
-
var Ft, tt, et, Vt, Yt,
|
|
675
|
-
const
|
|
674
|
+
var Ft, tt, et, Vt, Yt, ct, Ut, Xt;
|
|
675
|
+
const pt = class pt extends HTMLElement {
|
|
676
676
|
constructor() {
|
|
677
677
|
super();
|
|
678
678
|
d(this, Ft);
|
|
@@ -691,15 +691,15 @@ const mt = class mt extends HTMLElement {
|
|
|
691
691
|
if (!n) return;
|
|
692
692
|
n.innerHTML = "";
|
|
693
693
|
const o = document.createElement("div");
|
|
694
|
-
o.className = "ng-part-header", o.appendChild(t(this,
|
|
694
|
+
o.className = "ng-part-header", o.appendChild(t(this, ct).call(this, t(this, tt), r, "header"));
|
|
695
695
|
const a = document.createElement("div");
|
|
696
696
|
a.className = "ng-part-body";
|
|
697
697
|
const c = document.createElement("div");
|
|
698
|
-
c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this,
|
|
698
|
+
c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ct).call(this, t(this, tt), r, "body"));
|
|
699
699
|
const l = document.createElement("div");
|
|
700
700
|
l.className = "ng-virtual-spacer", l.style.width = "100%", l.style.pointerEvents = "none", c.appendChild(l), a.appendChild(c);
|
|
701
701
|
const f = document.createElement("div");
|
|
702
|
-
f.className = "ng-part-footer", f.appendChild(t(this,
|
|
702
|
+
f.className = "ng-part-footer", f.appendChild(t(this, ct).call(this, t(this, tt), r, "footer")), n.appendChild(o), n.appendChild(a), n.appendChild(f);
|
|
703
703
|
});
|
|
704
704
|
}, "#renderSplitContainers"));
|
|
705
705
|
d(this, Yt, /* @__PURE__ */ h(() => {
|
|
@@ -719,7 +719,7 @@ const mt = class mt extends HTMLElement {
|
|
|
719
719
|
(i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
|
|
720
720
|
}, 0));
|
|
721
721
|
}, "generate"));
|
|
722
|
-
d(this,
|
|
722
|
+
d(this, ct, /* @__PURE__ */ h((e, i, r) => {
|
|
723
723
|
const n = e.cloneNode(!0), o = n.querySelector("thead"), a = n.querySelector("tbody"), c = n.querySelector("tfoot");
|
|
724
724
|
if (r === "header") {
|
|
725
725
|
if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
|
|
@@ -748,7 +748,7 @@ const mt = class mt extends HTMLElement {
|
|
|
748
748
|
t(this, Xt).call(this);
|
|
749
749
|
}, "#init"));
|
|
750
750
|
d(this, Xt, /* @__PURE__ */ h(() => {
|
|
751
|
-
const e =
|
|
751
|
+
const e = pt.SCROLLBAR_SIZE;
|
|
752
752
|
this.innerHTML = `
|
|
753
753
|
<style>
|
|
754
754
|
nine-table-sheet {
|
|
@@ -899,10 +899,10 @@ const mt = class mt extends HTMLElement {
|
|
|
899
899
|
this.innerHTML = "", P.log("NineTableSheet destroyed.");
|
|
900
900
|
}
|
|
901
901
|
};
|
|
902
|
-
Ft = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(),
|
|
903
|
-
let
|
|
904
|
-
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet",
|
|
905
|
-
var Kt,
|
|
902
|
+
Ft = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), h(pt, "NineTableSheet"), A(pt, "SCROLLBAR_SIZE", 16);
|
|
903
|
+
let $t = pt;
|
|
904
|
+
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", $t);
|
|
905
|
+
var Kt, qt;
|
|
906
906
|
const Ie = class Ie extends HTMLElement {
|
|
907
907
|
constructor() {
|
|
908
908
|
super();
|
|
@@ -911,10 +911,10 @@ const Ie = class Ie extends HTMLElement {
|
|
|
911
911
|
(e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (i) => {
|
|
912
912
|
var o;
|
|
913
913
|
const r = i.ctrlKey || i.metaKey || i.shiftKey, n = parseInt((o = i.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
|
|
914
|
-
t(this,
|
|
915
|
-
}), t(this,
|
|
914
|
+
t(this, qt).call(this, n, r);
|
|
915
|
+
}), t(this, qt).call(this, 0, !1);
|
|
916
916
|
}, "#init"));
|
|
917
|
-
d(this,
|
|
917
|
+
d(this, qt, /* @__PURE__ */ h((e, i = !1) => {
|
|
918
918
|
const r = /* @__PURE__ */ h(() => {
|
|
919
919
|
const f = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
920
920
|
Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
|
|
@@ -950,24 +950,24 @@ const Ie = class Ie extends HTMLElement {
|
|
|
950
950
|
t(this, Kt).call(this);
|
|
951
951
|
}
|
|
952
952
|
};
|
|
953
|
-
Kt = new WeakMap(),
|
|
953
|
+
Kt = new WeakMap(), qt = new WeakMap(), h(Ie, "NineTableSheets");
|
|
954
954
|
let de = Ie;
|
|
955
955
|
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
|
|
956
|
-
var I, Zt,
|
|
956
|
+
var I, Zt, kt, Gt;
|
|
957
957
|
const _e = class _e {
|
|
958
958
|
constructor(s) {
|
|
959
959
|
d(this, I);
|
|
960
960
|
d(this, Zt, /* @__PURE__ */ h(() => {
|
|
961
961
|
t(this, Gt).call(this), new ResizeObserver((s) => {
|
|
962
962
|
for (let e of s)
|
|
963
|
-
t(this, I).getAttribute("auto-height") === "true" && t(this,
|
|
963
|
+
t(this, I).getAttribute("auto-height") === "true" && t(this, kt).call(this);
|
|
964
964
|
}).observe(t(this, I));
|
|
965
965
|
}, "#init"));
|
|
966
|
-
d(this,
|
|
966
|
+
d(this, kt, /* @__PURE__ */ h(() => {
|
|
967
967
|
var c, l;
|
|
968
968
|
const s = Array.from(t(this, I).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
969
969
|
if (s.length === 0) return;
|
|
970
|
-
const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10, i = Math.max(...s.map((f) => f.getRowHeight())), r = (c = t(this, I).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, I).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o =
|
|
970
|
+
const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10, i = Math.max(...s.map((f) => f.getRowHeight())), r = (c = t(this, I).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, I).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = $t.SCROLLBAR_SIZE, a = e * i + r + n + o;
|
|
971
971
|
t(this, I).style.height = `${a}px`;
|
|
972
972
|
}, "#applyAutoHeight"));
|
|
973
973
|
d(this, Gt, /* @__PURE__ */ h(() => {
|
|
@@ -1069,40 +1069,40 @@ const _e = class _e {
|
|
|
1069
1069
|
const a = t(this, I).shadowRoot.querySelectorAll("nine-table-sheet");
|
|
1070
1070
|
a == null || a.forEach((c, l) => {
|
|
1071
1071
|
e[l] && setTimeout(() => {
|
|
1072
|
-
c.generate(e[l]), i && t(this,
|
|
1072
|
+
c.generate(e[l]), i && t(this, kt).call(this);
|
|
1073
1073
|
});
|
|
1074
1074
|
});
|
|
1075
1075
|
}, "#render"));
|
|
1076
1076
|
y(this, I, s), t(this, Zt).call(this);
|
|
1077
1077
|
}
|
|
1078
1078
|
};
|
|
1079
|
-
I = new WeakMap(), Zt = new WeakMap(),
|
|
1079
|
+
I = new WeakMap(), Zt = new WeakMap(), kt = new WeakMap(), Gt = new WeakMap(), h(_e, "LayoutManager");
|
|
1080
1080
|
let fe = _e;
|
|
1081
|
-
var
|
|
1081
|
+
var Tt, ht;
|
|
1082
1082
|
const Ne = class Ne {
|
|
1083
1083
|
constructor(s) {
|
|
1084
|
-
d(this,
|
|
1085
|
-
d(this,
|
|
1086
|
-
A(this, "count", /* @__PURE__ */ h(() => t(this,
|
|
1087
|
-
y(this,
|
|
1084
|
+
d(this, Tt);
|
|
1085
|
+
d(this, ht, -1);
|
|
1086
|
+
A(this, "count", /* @__PURE__ */ h(() => t(this, Tt).rawRecords.length, "count"));
|
|
1087
|
+
y(this, Tt, s);
|
|
1088
1088
|
}
|
|
1089
1089
|
get at() {
|
|
1090
|
-
return t(this,
|
|
1090
|
+
return t(this, ht);
|
|
1091
1091
|
}
|
|
1092
1092
|
set at(s) {
|
|
1093
|
-
y(this,
|
|
1093
|
+
y(this, ht, parseInt(s, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
|
|
1094
1094
|
});
|
|
1095
1095
|
}
|
|
1096
1096
|
};
|
|
1097
|
-
|
|
1097
|
+
Tt = new WeakMap(), ht = new WeakMap(), h(Ne, "ngRow");
|
|
1098
1098
|
let ue = Ne;
|
|
1099
|
-
var _, T, N,
|
|
1099
|
+
var _, T, N, dt, Jt, Y, Qt, st, Ct, te, ee, ft;
|
|
1100
1100
|
const W = class W {
|
|
1101
1101
|
constructor(s, e) {
|
|
1102
1102
|
d(this, _);
|
|
1103
1103
|
d(this, T);
|
|
1104
1104
|
d(this, N, []);
|
|
1105
|
-
d(this,
|
|
1105
|
+
d(this, dt, []);
|
|
1106
1106
|
d(this, Jt, 0);
|
|
1107
1107
|
d(this, Y, []);
|
|
1108
1108
|
d(this, Qt, /* @__PURE__ */ h(() => {
|
|
@@ -1112,7 +1112,7 @@ const W = class W {
|
|
|
1112
1112
|
var i;
|
|
1113
1113
|
t(this, Y).push(((i = e.getBoundingClientRect) == null ? void 0 : i.call(e).height) || 24);
|
|
1114
1114
|
}), (t(this, T).rawRecords || []).forEach((e) => {
|
|
1115
|
-
e.__ng || (e.__ng = t(this,
|
|
1115
|
+
e.__ng || (e.__ng = t(this, Ct).call(this)), e.__ng.height = t(this, Y).slice();
|
|
1116
1116
|
});
|
|
1117
1117
|
}, "#initialize"));
|
|
1118
1118
|
d(this, st, /* @__PURE__ */ h(() => {
|
|
@@ -1124,19 +1124,19 @@ const W = class W {
|
|
|
1124
1124
|
var n;
|
|
1125
1125
|
const i = this.getValidData();
|
|
1126
1126
|
if (!i || i.length <= 0) return;
|
|
1127
|
-
if (s == null) return t(this,
|
|
1127
|
+
if (s == null) return t(this, ft).call(this, i);
|
|
1128
1128
|
if (s < 0 || s >= i.length) return null;
|
|
1129
1129
|
const r = typeof ((n = t(this, _).fields) == null ? void 0 : n.get) == "function" ? t(this, _).fields.get() : [];
|
|
1130
1130
|
if (e != null) {
|
|
1131
1131
|
const o = r.indexOf(e);
|
|
1132
1132
|
return o >= 0 ? i[s].v[o] : null;
|
|
1133
1133
|
}
|
|
1134
|
-
return t(this,
|
|
1134
|
+
return t(this, ft).call(this, i[s]);
|
|
1135
1135
|
}, "get"));
|
|
1136
1136
|
A(this, "set", /* @__PURE__ */ h((s) => {
|
|
1137
1137
|
this.clear(), this.add(s, !1), t(this, st).call(this);
|
|
1138
1138
|
}, "set"));
|
|
1139
|
-
d(this,
|
|
1139
|
+
d(this, Ct, /* @__PURE__ */ h(() => ({
|
|
1140
1140
|
rowState: W.ROW_STATE.EMPTY,
|
|
1141
1141
|
deleted: !1,
|
|
1142
1142
|
filtered: !1,
|
|
@@ -1146,11 +1146,11 @@ const W = class W {
|
|
|
1146
1146
|
_: [0, 0, 0, 0, W.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
|
|
1147
1147
|
}), "#getDefaultMeta"));
|
|
1148
1148
|
A(this, "reset", /* @__PURE__ */ h(() => {
|
|
1149
|
-
y(this, N, []), y(this,
|
|
1149
|
+
y(this, N, []), y(this, dt, []), t(this, st).call(this);
|
|
1150
1150
|
}, "reset"));
|
|
1151
1151
|
A(this, "clear", /* @__PURE__ */ h(() => {
|
|
1152
1152
|
var s;
|
|
1153
|
-
t(this, T).rawRecords = [], y(this, N, []), y(this,
|
|
1153
|
+
t(this, T).rawRecords = [], y(this, N, []), y(this, dt, []), (s = t(this, T).viewRecords) != null && s.reset && t(this, T).viewRecords.reset();
|
|
1154
1154
|
}, "clear"));
|
|
1155
1155
|
d(this, te, /* @__PURE__ */ h((s) => {
|
|
1156
1156
|
var r;
|
|
@@ -1164,7 +1164,7 @@ const W = class W {
|
|
|
1164
1164
|
}), i;
|
|
1165
1165
|
}, "#json2Array"));
|
|
1166
1166
|
d(this, ee, /* @__PURE__ */ h((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
|
|
1167
|
-
e.__ng = t(this,
|
|
1167
|
+
e.__ng = t(this, Ct).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
|
|
1168
1168
|
}), s), "#defaultInsert"));
|
|
1169
1169
|
A(this, "add", /* @__PURE__ */ h((s, e = !0) => {
|
|
1170
1170
|
s === void 0 && (s = {});
|
|
@@ -1198,14 +1198,14 @@ const W = class W {
|
|
|
1198
1198
|
a !== i && o.__ng.rowState !== W.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = W.ROW_STATE.UPDATE), o.v[n] = i;
|
|
1199
1199
|
}, "setValue"));
|
|
1200
1200
|
A(this, "resetRecords", /* @__PURE__ */ h(() => {
|
|
1201
|
-
y(this,
|
|
1201
|
+
y(this, dt, t(this, T).rawRecords.filter((s) => !s.__ng.deleted)), y(this, N, t(this, T).rawRecords.filter((s) => !s.__ng.deleted && !s.__ng.filtered)), t(this, T).rawRecords.forEach((s, e) => {
|
|
1202
1202
|
s.__ng.rowidx = e;
|
|
1203
1203
|
}), t(this, N).forEach((s, e) => {
|
|
1204
1204
|
s.__ng.i = e;
|
|
1205
1205
|
});
|
|
1206
1206
|
}, "resetRecords"));
|
|
1207
1207
|
A(this, "getValidData", /* @__PURE__ */ h(() => (t(this, N).length === 0 && t(this, T).rawRecords.length > 0 && this.resetRecords(), t(this, N)), "getValidData"));
|
|
1208
|
-
d(this,
|
|
1208
|
+
d(this, ft, /* @__PURE__ */ h((s) => {
|
|
1209
1209
|
var o;
|
|
1210
1210
|
if (!s) return s;
|
|
1211
1211
|
const e = !Array.isArray(s), i = e ? [s] : s, r = typeof ((o = t(this, _).fields) == null ? void 0 : o.get) == "function" ? t(this, _).fields.get() : [], n = i.filter((a) => !a.__ng.deleted).map((a) => {
|
|
@@ -1220,7 +1220,7 @@ const W = class W {
|
|
|
1220
1220
|
y(this, _, s), y(this, T, e), t(this, Qt).call(this);
|
|
1221
1221
|
}
|
|
1222
1222
|
get source() {
|
|
1223
|
-
return t(this,
|
|
1223
|
+
return t(this, ft).call(this, t(this, T).rawRecords);
|
|
1224
1224
|
}
|
|
1225
1225
|
set source(s) {
|
|
1226
1226
|
this.clear(), this.add(s, !1);
|
|
@@ -1235,7 +1235,7 @@ const W = class W {
|
|
|
1235
1235
|
return this.length;
|
|
1236
1236
|
}
|
|
1237
1237
|
};
|
|
1238
|
-
_ = new WeakMap(), T = new WeakMap(), N = new WeakMap(),
|
|
1238
|
+
_ = new WeakMap(), T = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), st = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), h(W, "ngData"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
1239
1239
|
A(W, "ROW_STATE", {
|
|
1240
1240
|
EMPTY: "EMPTY",
|
|
1241
1241
|
NORMAL: "NORMAL",
|
|
@@ -1267,26 +1267,26 @@ const We = class We {
|
|
|
1267
1267
|
};
|
|
1268
1268
|
it = new WeakMap(), h(We, "ngDataManager");
|
|
1269
1269
|
let be = We;
|
|
1270
|
-
var
|
|
1270
|
+
var ut, L, Lt, se;
|
|
1271
1271
|
const Oe = class Oe {
|
|
1272
1272
|
// π― μ΄μ { name: string, type: string } κ°μ²΄λ€μ λ°°μ΄λ‘ κ΄λ¦¬ν©λλ€.
|
|
1273
1273
|
constructor(s) {
|
|
1274
|
-
d(this,
|
|
1274
|
+
d(this, ut);
|
|
1275
1275
|
d(this, L, []);
|
|
1276
1276
|
A(this, "add", /* @__PURE__ */ h((s, e = "string") => {
|
|
1277
1277
|
s.forEach((i) => {
|
|
1278
1278
|
t(this, L).some((r) => r.name === i) || t(this, L).push({ name: i, type: e });
|
|
1279
|
-
}), t(this,
|
|
1279
|
+
}), t(this, Lt).call(this);
|
|
1280
1280
|
}, "add"));
|
|
1281
|
-
d(this,
|
|
1281
|
+
d(this, Lt, /* @__PURE__ */ h(() => {
|
|
1282
1282
|
const s = /* @__PURE__ */ new Map();
|
|
1283
1283
|
t(this, L).forEach((e) => {
|
|
1284
1284
|
s.set(e.name, e.type);
|
|
1285
1285
|
}), y(this, L, Array.from(s, ([e, i]) => ({ name: e, type: i }))), y(this, L, t(this, L).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, L).sort((e, i) => e.name.length < i.name.length ? 1 : -1);
|
|
1286
1286
|
}, "#adjust"));
|
|
1287
1287
|
d(this, se, /* @__PURE__ */ h(() => {
|
|
1288
|
-
y(this, L, []), P.log(t(this,
|
|
1289
|
-
const s = Array.from(t(this,
|
|
1288
|
+
y(this, L, []), P.log(t(this, ut).querySelectorAll("table"));
|
|
1289
|
+
const s = Array.from(t(this, ut).querySelectorAll("table"));
|
|
1290
1290
|
if (!(!s || s.length === 0)) {
|
|
1291
1291
|
for (const e of s)
|
|
1292
1292
|
P.log(e), $("[data-bind]", e).each((i, r) => {
|
|
@@ -1313,10 +1313,10 @@ const Oe = class Oe {
|
|
|
1313
1313
|
});
|
|
1314
1314
|
});
|
|
1315
1315
|
});
|
|
1316
|
-
t(this,
|
|
1316
|
+
t(this, Lt).call(this);
|
|
1317
1317
|
}
|
|
1318
1318
|
}, "#init"));
|
|
1319
|
-
y(this,
|
|
1319
|
+
y(this, ut, s), t(this, se).call(this);
|
|
1320
1320
|
}
|
|
1321
1321
|
// π― κΈ°μ‘΄μ νλ μ΄λ¦λ§ μ°λ κ³³λ€κ³Όμ νΈνμ μν΄ μ΄λ¦ λ°°μ΄λ§ 리ν΄νλ λ©μλ μ μ§
|
|
1322
1322
|
get() {
|
|
@@ -1338,7 +1338,7 @@ const Oe = class Oe {
|
|
|
1338
1338
|
return t(this, L).some((e) => e.name === s);
|
|
1339
1339
|
}
|
|
1340
1340
|
};
|
|
1341
|
-
|
|
1341
|
+
ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), h(Oe, "ngFields");
|
|
1342
1342
|
let ye = Oe;
|
|
1343
1343
|
var rt, ie, re;
|
|
1344
1344
|
const Be = class Be extends HTMLElement {
|
|
@@ -1374,7 +1374,7 @@ const Be = class Be extends HTMLElement {
|
|
|
1374
1374
|
rt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), h(Be, "NineTable");
|
|
1375
1375
|
let pe = Be;
|
|
1376
1376
|
customElements.get("nine-table") || customElements.define("nine-table", pe);
|
|
1377
|
-
const
|
|
1377
|
+
const mt = class mt extends HTMLElement {
|
|
1378
1378
|
// π 컀μ€ν
μ€νμΌμ© μΊμ μΆκ°
|
|
1379
1379
|
constructor() {
|
|
1380
1380
|
super();
|
|
@@ -1385,18 +1385,18 @@ const xt = class xt extends HTMLElement {
|
|
|
1385
1385
|
connectedCallback() {
|
|
1386
1386
|
}
|
|
1387
1387
|
};
|
|
1388
|
-
h(
|
|
1389
|
-
let me =
|
|
1390
|
-
var C,
|
|
1388
|
+
h(mt, "BasicCellElement"), A(mt, "_styleCache", /* @__PURE__ */ new Map()), A(mt, "_customStyleCache", /* @__PURE__ */ new Map());
|
|
1389
|
+
let me = mt;
|
|
1390
|
+
var C, Ht, p, Ae, Re, qe, ke, Te;
|
|
1391
1391
|
const ze = class ze extends me {
|
|
1392
1392
|
constructor() {
|
|
1393
1393
|
super();
|
|
1394
1394
|
d(this, C);
|
|
1395
|
-
d(this,
|
|
1395
|
+
d(this, Ht);
|
|
1396
1396
|
d(this, p);
|
|
1397
1397
|
d(this, Ae);
|
|
1398
|
-
d(this, qe);
|
|
1399
1398
|
d(this, Re);
|
|
1399
|
+
d(this, qe);
|
|
1400
1400
|
d(this, ke);
|
|
1401
1401
|
A(this, "getDisplayText", /* @__PURE__ */ h((e) => {
|
|
1402
1402
|
if (t(this, p))
|
|
@@ -1461,7 +1461,7 @@ const ze = class ze extends me {
|
|
|
1461
1461
|
}, "getExprValue"));
|
|
1462
1462
|
}
|
|
1463
1463
|
connectedCallback() {
|
|
1464
|
-
super.connectedCallback(), y(this, C, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this,
|
|
1464
|
+
super.connectedCallback(), y(this, C, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this, Ht, t(this, p).closest("tr"));
|
|
1465
1465
|
}
|
|
1466
1466
|
get value() {
|
|
1467
1467
|
var e = !t(this, C) || !t(this, C).dataManager || !t(this, p) || !t(this, p).dataset || !t(this, p).dataset.row || !t(this, p).dataset.bind ? "" : t(this, p).closest("tr").data[t(this, p).dataset.bind];
|
|
@@ -1479,10 +1479,10 @@ const ze = class ze extends me {
|
|
|
1479
1479
|
return t(this, p).closest("tr").data;
|
|
1480
1480
|
}
|
|
1481
1481
|
refresh() {
|
|
1482
|
-
return t(this, p).dataset.bind, parseInt(t(this, p).dataset.row), t(this,
|
|
1482
|
+
return t(this, p).dataset.bind, parseInt(t(this, p).dataset.row), t(this, Ht).data, t(this, p).dataset.row;
|
|
1483
1483
|
}
|
|
1484
1484
|
};
|
|
1485
|
-
C = new WeakMap(),
|
|
1485
|
+
C = new WeakMap(), Ht = new WeakMap(), p = new WeakMap(), Ae = new WeakMap(), Re = new WeakMap(), qe = new WeakMap(), ke = new WeakMap(), Te = new WeakMap(), h(ze, "CellElement");
|
|
1486
1486
|
let xe = ze;
|
|
1487
1487
|
const De = class De extends xe {
|
|
1488
1488
|
constructor() {
|
|
@@ -1497,19 +1497,19 @@ const De = class De extends xe {
|
|
|
1497
1497
|
};
|
|
1498
1498
|
h(De, "EditableCellElement");
|
|
1499
1499
|
let ve = De;
|
|
1500
|
-
var
|
|
1500
|
+
var Mt, nt, gt, bt, ne, U, Ce;
|
|
1501
1501
|
const Pe = class Pe extends ve {
|
|
1502
1502
|
constructor() {
|
|
1503
1503
|
super();
|
|
1504
|
-
d(this,
|
|
1504
|
+
d(this, Mt);
|
|
1505
1505
|
d(this, nt);
|
|
1506
|
+
d(this, gt);
|
|
1506
1507
|
d(this, bt);
|
|
1507
|
-
d(this, yt);
|
|
1508
1508
|
d(this, ne);
|
|
1509
1509
|
d(this, U);
|
|
1510
1510
|
A(this, "refresh", /* @__PURE__ */ h(() => {
|
|
1511
1511
|
const e = super.refresh();
|
|
1512
|
-
t(this,
|
|
1512
|
+
P.log("::", e), t(this, Mt).value = e;
|
|
1513
1513
|
}, "refresh"));
|
|
1514
1514
|
/**
|
|
1515
1515
|
dataRefresh = (v) => {
|
|
@@ -1545,7 +1545,7 @@ const Pe = class Pe extends ve {
|
|
|
1545
1545
|
if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
|
|
1546
1546
|
if (t(this, nt) == "number") {
|
|
1547
1547
|
let n = [];
|
|
1548
|
-
if (t(this, U) && Number(t(this, U)) > 0 && n.push("."), t(this,
|
|
1548
|
+
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) {
|
|
1549
1549
|
var i = e.target.value, r = i.indexOf(".");
|
|
1550
1550
|
if (r >= 0) {
|
|
1551
1551
|
var i = i.substr(r + 1, i.length);
|
|
@@ -1553,10 +1553,10 @@ const Pe = class Pe extends ve {
|
|
|
1553
1553
|
}
|
|
1554
1554
|
}
|
|
1555
1555
|
}
|
|
1556
|
-
t(this,
|
|
1556
|
+
t(this, gt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, gt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
|
|
1557
1557
|
}
|
|
1558
1558
|
}, "#onKeyDown"));
|
|
1559
|
-
if (this.applyBaseStyle(), y(this, nt, this.getAttribute("type") || "text"), y(this,
|
|
1559
|
+
if (this.applyBaseStyle(), y(this, nt, 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, nt))) throw `invalid type : ${t(this, nt)}`;
|
|
1560
1560
|
}
|
|
1561
1561
|
connectedCallback() {
|
|
1562
1562
|
for (var e = [], i = 0; i < this.attributes.length; i++)
|
|
@@ -1566,10 +1566,10 @@ const Pe = class Pe extends ve {
|
|
|
1566
1566
|
${e.join(" ")}
|
|
1567
1567
|
ondragstart="return false;"
|
|
1568
1568
|
>
|
|
1569
|
-
`, super.connectedCallback(), y(this,
|
|
1569
|
+
`, super.connectedCallback(), y(this, Mt, this.querySelector("input"));
|
|
1570
1570
|
}
|
|
1571
1571
|
};
|
|
1572
|
-
|
|
1572
|
+
Mt = new WeakMap(), nt = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), U = new WeakMap(), Ce = new WeakMap(), h(Pe, "CellInputText");
|
|
1573
1573
|
let we = Pe;
|
|
1574
1574
|
customElements.get("cell-input-text");
|
|
1575
1575
|
customElements.get("cell-input") || customElements.define("cell-input", we);
|