@ninebone/table 0.0.131 β 0.0.133
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 +221 -210
- package/dist/nine-table.js.map +1 -1
- package/dist/nine-table.umd.js +4 -4
- package/dist/nine-table.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-table.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Me = Object.defineProperty;
|
|
2
|
+
var Ie = (w) => {
|
|
3
3
|
throw TypeError(w);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var c = (w, i) =>
|
|
7
|
-
var v = (w, i, t) =>
|
|
8
|
-
var e = (w, i, t) => (
|
|
5
|
+
var We = (w, i, t) => i in w ? Me(w, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : w[i] = t;
|
|
6
|
+
var c = (w, i) => Me(w, "name", { value: i, configurable: !0 });
|
|
7
|
+
var v = (w, i, t) => We(w, typeof i != "symbol" ? i + "" : i, t), $e = (w, i, t) => i.has(w) || Ie("Cannot " + t);
|
|
8
|
+
var e = (w, i, t) => ($e(w, i, "read from private field"), t ? t.call(w) : i.get(w)), f = (w, i, t) => i.has(w) ? Ie("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(w) : i.set(w, t), p = (w, i, t, s) => ($e(w, i, "write to private field"), s ? s.call(w, t) : i.set(w, t), t);
|
|
9
9
|
var He = (w, i, t, s) => ({
|
|
10
10
|
set _(n) {
|
|
11
11
|
p(w, i, n, t);
|
|
@@ -14,38 +14,38 @@ var He = (w, i, t, s) => ({
|
|
|
14
14
|
return e(w, i, s);
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
import { trace as
|
|
18
|
-
const Re = class Re extends
|
|
17
|
+
import { trace as ze } from "@ninebone/util";
|
|
18
|
+
const Re = class Re extends ze.constructor {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(), this.init("nine-table", "green");
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
c(Re, "Trace");
|
|
24
|
-
let
|
|
25
|
-
const
|
|
26
|
-
var
|
|
27
|
-
const
|
|
24
|
+
let be = Re;
|
|
25
|
+
const j = new be();
|
|
26
|
+
var _, O, y, B, D, N, ee, P, te;
|
|
27
|
+
const Te = class Te extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (!e(this,
|
|
38
|
-
const t = e(this,
|
|
39
|
-
t && (p(this,
|
|
30
|
+
f(this, _);
|
|
31
|
+
f(this, O, !1);
|
|
32
|
+
f(this, y);
|
|
33
|
+
f(this, B);
|
|
34
|
+
f(this, D);
|
|
35
|
+
f(this, N);
|
|
36
|
+
f(this, ee, /* @__PURE__ */ c(() => {
|
|
37
|
+
if (!e(this, _)) return;
|
|
38
|
+
const t = e(this, _).querySelector(".ng-container-body");
|
|
39
|
+
t && (p(this, N, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
|
-
})), e(this,
|
|
41
|
+
})), e(this, N).observe(t));
|
|
42
42
|
}, "#observeResize"));
|
|
43
43
|
v(this, "refresh", /* @__PURE__ */ c(() => {
|
|
44
|
-
if (!e(this,
|
|
44
|
+
if (!e(this, _) || !e(this, y) || e(this, O)) return;
|
|
45
45
|
const t = e(this, y).container, s = t.querySelector("table");
|
|
46
46
|
if (!s) return;
|
|
47
|
-
const n = e(this, y).track, o = e(this, y).thumb, r = e(this,
|
|
48
|
-
if (l !== 0 &&
|
|
47
|
+
const n = e(this, y).track, o = e(this, y).thumb, r = e(this, _).querySelector(".ng-container-bottom"), l = t.clientWidth, u = s.scrollWidth;
|
|
48
|
+
if (l !== 0 && u > l)
|
|
49
49
|
r && (r.style.display = "flex");
|
|
50
50
|
else {
|
|
51
51
|
r && (r.style.display = "none");
|
|
@@ -53,7 +53,7 @@ const Ee = class Ee extends HTMLElement {
|
|
|
53
53
|
}
|
|
54
54
|
const a = n.clientWidth;
|
|
55
55
|
if (a <= 0) return;
|
|
56
|
-
const b = Math.max(Math.min(a * (l /
|
|
56
|
+
const b = Math.max(Math.min(a * (l / u), a), 20);
|
|
57
57
|
o.style.width = `${b}px`;
|
|
58
58
|
let h = 0;
|
|
59
59
|
const g = s.style.transform;
|
|
@@ -62,36 +62,36 @@ const Ee = class Ee extends HTMLElement {
|
|
|
62
62
|
x && x[1] && (h = parseFloat(x[1]));
|
|
63
63
|
} else
|
|
64
64
|
h = parseInt(s.style.left || 0, 10);
|
|
65
|
-
let d = parseInt(Math.abs(h) * a /
|
|
65
|
+
let d = parseInt(Math.abs(h) * a / u, 10);
|
|
66
66
|
d < 0 && (d = 0);
|
|
67
67
|
const S = a - b;
|
|
68
68
|
d > S && (d = S), o.style.left = `${d}px`, e(this, y).left.disabled = d === 0, e(this, y).right.disabled = d >= S - 1;
|
|
69
69
|
}, "refresh"));
|
|
70
|
-
|
|
70
|
+
f(this, P, /* @__PURE__ */ c((t) => {
|
|
71
71
|
if (!e(this, y)) return !1;
|
|
72
72
|
const s = e(this, y).container, n = s.querySelector("table");
|
|
73
73
|
if (!n) return !1;
|
|
74
74
|
const o = e(this, y).track.getBoundingClientRect(), r = e(this, y).thumb.clientWidth;
|
|
75
75
|
let l = t;
|
|
76
76
|
l < 0 && (l = 0);
|
|
77
|
-
const
|
|
78
|
-
l >
|
|
77
|
+
const u = o.width - r;
|
|
78
|
+
l > u && (l = u), l = parseInt(l, 10), e(this, y).thumb.style.left = `${l}px`, e(this, y).left.disabled = l === 0, e(this, y).right.disabled = l >= u - 1;
|
|
79
79
|
const a = s.clientWidth, b = n.scrollWidth;
|
|
80
|
-
let h =
|
|
81
|
-
return -h > b - a && (h = -(b - a)), -h + 5 > b - a && (h = -(b - a)), a >= b && (h = 0), n.style.transform = `translateX(${h}px)`, l > 0 && l <
|
|
80
|
+
let h = u > 0 ? -l * (b - a) / u : 0;
|
|
81
|
+
return -h > b - a && (h = -(b - a)), -h + 5 > b - a && (h = -(b - a)), a >= b && (h = 0), n.style.transform = `translateX(${h}px)`, l > 0 && l < u - 1;
|
|
82
82
|
}, "#thumbMoveTo"));
|
|
83
|
-
|
|
83
|
+
f(this, te, /* @__PURE__ */ c(() => {
|
|
84
84
|
const t = /* @__PURE__ */ c((n) => {
|
|
85
|
-
clearInterval(e(this,
|
|
85
|
+
clearInterval(e(this, B)), clearInterval(e(this, D));
|
|
86
86
|
const o = parseInt(e(this, y).thumb.style.left || 0, 10);
|
|
87
|
-
e(this,
|
|
88
|
-
clearInterval(e(this,
|
|
87
|
+
e(this, P).call(this, o + n), p(this, B, setInterval(() => {
|
|
88
|
+
clearInterval(e(this, B)), p(this, D, setInterval(() => {
|
|
89
89
|
const r = parseInt(e(this, y).thumb.style.left || 0, 10);
|
|
90
|
-
e(this,
|
|
90
|
+
e(this, P).call(this, r + n) || clearInterval(e(this, D));
|
|
91
91
|
}, 50));
|
|
92
92
|
}, 500));
|
|
93
93
|
}, "delayScroll"), s = /* @__PURE__ */ c(() => {
|
|
94
|
-
clearInterval(e(this,
|
|
94
|
+
clearInterval(e(this, B)), clearInterval(e(this, D));
|
|
95
95
|
}, "clearTimer");
|
|
96
96
|
["mouseup", "mouseleave", "touchend"].forEach((n) => {
|
|
97
97
|
e(this, y).left.addEventListener(n, s), e(this, y).right.addEventListener(n, s), e(this, y).track.addEventListener(n, s);
|
|
@@ -103,23 +103,23 @@ const Ee = class Ee extends HTMLElement {
|
|
|
103
103
|
if (n.button !== 0) return;
|
|
104
104
|
n.preventDefault();
|
|
105
105
|
const o = e(this, y).track.getBoundingClientRect(), r = e(this, y).thumb.clientWidth;
|
|
106
|
-
e(this,
|
|
106
|
+
e(this, P).call(this, n.clientX - o.left - r / 2);
|
|
107
107
|
}), e(this, y).thumb.addEventListener("mousedown", (n) => {
|
|
108
108
|
if (n.button !== 0) return;
|
|
109
|
-
n.stopPropagation(), n.preventDefault(), p(this,
|
|
109
|
+
n.stopPropagation(), n.preventDefault(), p(this, O, !0), this.shiftX = n.clientX - e(this, y).thumb.getBoundingClientRect().left;
|
|
110
110
|
const o = /* @__PURE__ */ c((l) => {
|
|
111
|
-
if (!e(this,
|
|
112
|
-
const
|
|
113
|
-
e(this,
|
|
111
|
+
if (!e(this, O)) return;
|
|
112
|
+
const u = e(this, y).track.getBoundingClientRect();
|
|
113
|
+
e(this, P).call(this, l.clientX - u.left - this.shiftX);
|
|
114
114
|
}, "onMouseMove"), r = /* @__PURE__ */ c(() => {
|
|
115
|
-
p(this,
|
|
115
|
+
p(this, O, !1), s(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
|
|
116
116
|
}, "onMouseUp");
|
|
117
117
|
document.addEventListener("mousemove", o), document.addEventListener("mouseup", r);
|
|
118
118
|
});
|
|
119
119
|
}, "#init"));
|
|
120
120
|
}
|
|
121
121
|
connectedCallback() {
|
|
122
|
-
if (p(this,
|
|
122
|
+
if (p(this, _, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, _)) return;
|
|
123
123
|
this.innerHTML = `
|
|
124
124
|
<style>
|
|
125
125
|
nine-table-hscrollbar {
|
|
@@ -184,7 +184,7 @@ const Ee = class Ee extends HTMLElement {
|
|
|
184
184
|
<button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
|
|
185
185
|
`;
|
|
186
186
|
const t = /* @__PURE__ */ c(() => {
|
|
187
|
-
const s = e(this,
|
|
187
|
+
const s = e(this, _).querySelector(".ng-container-body");
|
|
188
188
|
if (!s) {
|
|
189
189
|
setTimeout(t, 10);
|
|
190
190
|
return;
|
|
@@ -200,26 +200,29 @@ const Ee = class Ee extends HTMLElement {
|
|
|
200
200
|
t();
|
|
201
201
|
}
|
|
202
202
|
disconnectedCallback() {
|
|
203
|
-
e(this,
|
|
203
|
+
e(this, N) && e(this, N).disconnect();
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
|
-
|
|
207
|
-
let
|
|
208
|
-
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar",
|
|
209
|
-
var
|
|
210
|
-
const
|
|
206
|
+
_ = new WeakMap(), O = new WeakMap(), y = new WeakMap(), B = new WeakMap(), D = new WeakMap(), N = new WeakMap(), ee = new WeakMap(), P = new WeakMap(), te = new WeakMap(), c(Te, "NineTableHScrollBar");
|
|
207
|
+
let ge = Te;
|
|
208
|
+
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ge);
|
|
209
|
+
var X, M, q, $, I, H, ie, se;
|
|
210
|
+
const qe = class qe {
|
|
211
211
|
constructor(i) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
212
|
+
f(this, X);
|
|
213
|
+
f(this, M, []);
|
|
214
|
+
f(this, q, null);
|
|
215
|
+
f(this, $, null);
|
|
216
|
+
f(this, I, 0);
|
|
217
|
+
f(this, H, 0);
|
|
218
|
+
f(this, ie, /* @__PURE__ */ c(() => {
|
|
219
|
+
e(this, se).call(this);
|
|
220
|
+
}, "#init"));
|
|
218
221
|
/**
|
|
219
222
|
* π― λ·°ν¬νΈ ν¬κΈ° λ³ν μμ μ λμ΄ κ³μ° λ° νμν ν κ°μ μ°μ Β·μΊμ±μ μκ²°
|
|
220
223
|
*/
|
|
221
|
-
|
|
222
|
-
!e(this,
|
|
224
|
+
f(this, se, /* @__PURE__ */ c(() => {
|
|
225
|
+
!e(this, X) || !(e(this, X) instanceof HTMLElement) || (p(this, $, new ResizeObserver((i) => {
|
|
223
226
|
for (const t of i) {
|
|
224
227
|
const s = t.target;
|
|
225
228
|
if (!s.classList.contains("active"))
|
|
@@ -228,96 +231,104 @@ const Te = class Te {
|
|
|
228
231
|
if (n > 0) {
|
|
229
232
|
const o = s.clientHeight || s.getBoundingClientRect().height || n;
|
|
230
233
|
let r = 0;
|
|
231
|
-
const l = s.querySelector(".ng-container-body") || s,
|
|
232
|
-
|
|
234
|
+
const l = s.querySelector(".ng-container-body") || s, u = l.querySelector("thead"), a = l.querySelector("tfoot");
|
|
235
|
+
u && (r += u.offsetHeight || u.getBoundingClientRect().height), a && (r += a.offsetHeight || a.getBoundingClientRect().height);
|
|
233
236
|
const b = Math.max(o - r, 100);
|
|
234
|
-
if (e(this,
|
|
235
|
-
const h = Math.ceil(e(this,
|
|
236
|
-
p(this,
|
|
237
|
+
if (e(this, I) !== b && (p(this, I, b), e(this, q) !== null)) {
|
|
238
|
+
const h = Math.ceil(e(this, I) / e(this, q));
|
|
239
|
+
p(this, H, h + 20), j.log(`[RowManager] Resized. Height: ${e(this, I)}px | Target Rows: ${e(this, H)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
|
|
237
240
|
const d = s.querySelector(g);
|
|
238
241
|
d && d.querySelector("tbody") && this.renderRows(d);
|
|
239
242
|
});
|
|
240
243
|
}
|
|
241
244
|
}
|
|
242
245
|
}
|
|
243
|
-
})), e(this, $).observe(e(this,
|
|
246
|
+
})), e(this, $).observe(e(this, X)));
|
|
244
247
|
}, "#initResizeObserver"));
|
|
245
248
|
v(this, "initTemplate", /* @__PURE__ */ c((i) => {
|
|
246
249
|
const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
|
|
247
250
|
if (!t) return;
|
|
248
251
|
const s = Array.from(t.querySelectorAll("tr")).filter((n) => !n.classList.contains("nodata"));
|
|
249
|
-
p(this,
|
|
252
|
+
p(this, M, s.map((n) => n.cloneNode(!0))), p(this, q, null), console.log(`[RowManager] Template initialized with ${e(this, M).length} row(s).`);
|
|
250
253
|
}, "initTemplate"));
|
|
251
254
|
v(this, "measureAndCacheHeight", /* @__PURE__ */ c((i) => {
|
|
252
255
|
if (e(this, q) !== null)
|
|
253
256
|
return e(this, q);
|
|
254
|
-
if (e(this,
|
|
257
|
+
if (e(this, M).length === 0)
|
|
255
258
|
throw new Error("[RowManager] Template TRs are empty.");
|
|
256
259
|
const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
|
|
257
260
|
if (!t) return 24;
|
|
258
261
|
t.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
|
|
259
262
|
const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment();
|
|
260
|
-
e(this,
|
|
263
|
+
e(this, M).forEach((l) => {
|
|
261
264
|
n.appendChild(l.cloneNode(!0));
|
|
262
265
|
}), s ? s.before(n) : t.appendChild(n);
|
|
263
266
|
let o = 0;
|
|
264
|
-
if (t.querySelectorAll("tr:not(.nodata)").forEach((l,
|
|
267
|
+
if (t.querySelectorAll("tr:not(.nodata)").forEach((l, u) => {
|
|
265
268
|
const a = l.offsetHeight;
|
|
266
269
|
if (a === 0)
|
|
267
|
-
throw new Error(`[RowManager] Rendered TR[${
|
|
270
|
+
throw new Error(`[RowManager] Rendered TR[${u}] height is 0. Check CSS styles.`);
|
|
268
271
|
o += a;
|
|
269
|
-
}), p(this, q, o), e(this,
|
|
270
|
-
const l = Math.ceil(e(this,
|
|
271
|
-
p(this,
|
|
272
|
+
}), p(this, q, o), e(this, I) > 0) {
|
|
273
|
+
const l = Math.ceil(e(this, I) / e(this, q));
|
|
274
|
+
p(this, H, l + 20);
|
|
272
275
|
}
|
|
273
|
-
return console.log(`[RowManager] Template Height Cached: ${e(this, q)}px | RowCount: ${e(this,
|
|
276
|
+
return console.log(`[RowManager] Template Height Cached: ${e(this, q)}px | RowCount: ${e(this, H)}`), e(this, q);
|
|
274
277
|
}, "measureAndCacheHeight"));
|
|
275
278
|
/**
|
|
276
279
|
* π― μΊμλ ν κ°μ λ°ν (μμ λλ§ μ΅μνμ λ°©μ΄ μ°μ°)
|
|
277
280
|
*/
|
|
278
|
-
|
|
281
|
+
/**
|
|
282
|
+
calculateRequiredRowCount = (container) => {
|
|
283
|
+
if (this.#cachedRowCount > 0) {
|
|
284
|
+
return this.#cachedRowCount;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
this.measureAndCacheHeight(container);
|
|
288
|
+
return this.#cachedRowCount || 40;
|
|
289
|
+
};
|
|
290
|
+
*/
|
|
279
291
|
/**
|
|
280
292
|
* π― μΊμλ ν κ°μλ₯Ό κ³§λ°λ‘ κ°μ Έμμ TR λΌλ μ£Όμ
(μ€λ³΅ κ³μ° μ κ±°)
|
|
281
293
|
*/
|
|
282
|
-
v(this, "renderRows", /* @__PURE__ */ c((i
|
|
283
|
-
if (e(this,
|
|
284
|
-
const
|
|
285
|
-
if (!
|
|
286
|
-
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
o.appendChild(f.cloneNode(!0));
|
|
294
|
+
v(this, "renderRows", /* @__PURE__ */ c((i) => {
|
|
295
|
+
if (e(this, M).length === 0) return;
|
|
296
|
+
const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
|
|
297
|
+
if (!t) return;
|
|
298
|
+
t.querySelectorAll("tr:not(.nodata)").forEach((r) => r.remove());
|
|
299
|
+
const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment(), o = e(this, H);
|
|
300
|
+
for (let r = 0; r < o; r++)
|
|
301
|
+
e(this, M).forEach((l) => {
|
|
302
|
+
n.appendChild(l.cloneNode(!0));
|
|
292
303
|
});
|
|
293
|
-
|
|
304
|
+
s ? s.before(n) : t.appendChild(n), console.log(`[RowManager] Rendered ${o} sets into DOM.`);
|
|
294
305
|
}, "renderRows"));
|
|
295
306
|
v(this, "destroy", /* @__PURE__ */ c(() => {
|
|
296
307
|
e(this, $) && (e(this, $).disconnect(), p(this, $, null));
|
|
297
308
|
}, "destroy"));
|
|
298
|
-
p(this,
|
|
309
|
+
p(this, X, i), e(this, ie).call(this);
|
|
299
310
|
}
|
|
300
311
|
get templateLength() {
|
|
301
|
-
return e(this,
|
|
312
|
+
return e(this, M).length || 1;
|
|
302
313
|
}
|
|
303
314
|
};
|
|
304
|
-
|
|
305
|
-
let
|
|
306
|
-
var
|
|
307
|
-
const
|
|
315
|
+
X = new WeakMap(), M = new WeakMap(), q = new WeakMap(), $ = new WeakMap(), I = new WeakMap(), H = new WeakMap(), ie = new WeakMap(), se = new WeakMap(), c(qe, "RowManager");
|
|
316
|
+
let pe = qe;
|
|
317
|
+
var A, F, ne;
|
|
318
|
+
const Z = class Z extends HTMLElement {
|
|
308
319
|
constructor() {
|
|
309
320
|
super();
|
|
310
|
-
|
|
311
|
-
|
|
321
|
+
f(this, A, null);
|
|
322
|
+
f(this, F);
|
|
312
323
|
v(this, "init", /* @__PURE__ */ c((t) => {
|
|
313
324
|
if (!t) return;
|
|
314
325
|
const s = /* @__PURE__ */ c((a) => {
|
|
315
326
|
const b = /* @__PURE__ */ c((g) => {
|
|
316
327
|
if (g.querySelector("colgroup")) return;
|
|
317
328
|
const d = g.querySelector("tbody tr") || g.querySelector("tr"), S = d ? d.querySelectorAll("th, td").length : 1, x = document.createElement("colgroup"), k = Math.max(Math.floor((g.clientWidth || 600) / S), 100);
|
|
318
|
-
for (let
|
|
319
|
-
const
|
|
320
|
-
|
|
329
|
+
for (let R = 0; R < S; R++) {
|
|
330
|
+
const ue = document.createElement("col");
|
|
331
|
+
ue.setAttribute("width", k), x.appendChild(ue);
|
|
321
332
|
}
|
|
322
333
|
g.prepend(x);
|
|
323
334
|
}, "ensureColgroup"), h = /* @__PURE__ */ c((g) => {
|
|
@@ -327,40 +338,40 @@ const j = class j extends HTMLElement {
|
|
|
327
338
|
}, "ensureThead");
|
|
328
339
|
return b(a), h(a), a.classList.add("nine-table-element"), a;
|
|
329
340
|
}, "initializeTable"), n = t.cloneNode(!0);
|
|
330
|
-
p(this,
|
|
331
|
-
const o = this.querySelector(".ng-container-left"), r = this.querySelector(".ng-container-body"), l = this.querySelector(".ng-container-right"),
|
|
341
|
+
p(this, A, s(n)), e(this, A).style.display = "table", e(this, F).initTemplate(e(this, A));
|
|
342
|
+
const o = this.querySelector(".ng-container-left"), r = this.querySelector(".ng-container-body"), l = this.querySelector(".ng-container-right"), u = /* @__PURE__ */ c((a, b, h = !1) => {
|
|
332
343
|
const g = a.cloneNode(!0), d = Array.from(g.querySelectorAll("colgroup col")), S = [];
|
|
333
344
|
return d.forEach((x, k) => {
|
|
334
|
-
const
|
|
335
|
-
(h ? !
|
|
345
|
+
const R = x.getAttribute("fixed");
|
|
346
|
+
(h ? !R || R === "" : R === b) || S.push(k);
|
|
336
347
|
}), S.reverse().forEach((x) => {
|
|
337
348
|
d[x] && d[x].remove(), g.querySelectorAll("tr").forEach((k) => {
|
|
338
|
-
const
|
|
339
|
-
|
|
349
|
+
const R = k.querySelectorAll("th, td");
|
|
350
|
+
R[x] && R[x].remove();
|
|
340
351
|
});
|
|
341
352
|
}), g;
|
|
342
353
|
}, "filterTableByFixed");
|
|
343
354
|
if (r) {
|
|
344
|
-
const a =
|
|
345
|
-
r.innerHTML = "", r.appendChild(a), e(this,
|
|
355
|
+
const a = u(e(this, A), null, !0);
|
|
356
|
+
r.innerHTML = "", r.appendChild(a), e(this, F).measureAndCacheHeight(r);
|
|
346
357
|
}
|
|
347
358
|
if (o) {
|
|
348
|
-
const a =
|
|
359
|
+
const a = u(e(this, A), "left", !1);
|
|
349
360
|
let b = 0;
|
|
350
361
|
a.querySelectorAll("col").forEach((g) => {
|
|
351
362
|
const d = parseInt(g.getAttribute("width"), 10);
|
|
352
363
|
isNaN(d) || (b += d);
|
|
353
|
-
}), o.innerHTML = "", o.appendChild(a)
|
|
364
|
+
}), o.innerHTML = "", o.appendChild(a);
|
|
354
365
|
const h = b > 0 ? b : 0;
|
|
355
366
|
o.style.flex = `0 0 ${h}px`, o.style.width = `${h}px`;
|
|
356
367
|
}
|
|
357
368
|
if (l) {
|
|
358
|
-
const a =
|
|
369
|
+
const a = u(e(this, A), "right", !1);
|
|
359
370
|
let b = 0;
|
|
360
371
|
a.querySelectorAll("col").forEach((g) => {
|
|
361
372
|
const d = parseInt(g.getAttribute("width"), 10);
|
|
362
373
|
isNaN(d) || (b += d);
|
|
363
|
-
}), l.innerHTML = "", l.appendChild(a)
|
|
374
|
+
}), l.innerHTML = "", l.appendChild(a);
|
|
364
375
|
const h = b > 0 ? b : 0;
|
|
365
376
|
l.style.flex = `0 0 ${h}px`, l.style.width = `${h}px`;
|
|
366
377
|
}
|
|
@@ -374,9 +385,9 @@ const j = class j extends HTMLElement {
|
|
|
374
385
|
setTimeout(() => {
|
|
375
386
|
const a = this.querySelector("nine-table-hscrollbar");
|
|
376
387
|
a && typeof a.refresh == "function" && a.refresh();
|
|
377
|
-
}, 0),
|
|
388
|
+
}, 0), j.log(`NineTableSheet 3-split initialized with rows: ${this.getRowCount()}`);
|
|
378
389
|
}, "init"));
|
|
379
|
-
v(this, "getRowCount", /* @__PURE__ */ c(() => e(this,
|
|
390
|
+
v(this, "getRowCount", /* @__PURE__ */ c(() => e(this, A) ? e(this, A).querySelectorAll("tbody tr").length : 0, "getRowCount"));
|
|
380
391
|
v(this, "scrollToX", /* @__PURE__ */ c((t) => {
|
|
381
392
|
const s = this.querySelector(".ng-container-body");
|
|
382
393
|
s && (s.scrollLeft = t);
|
|
@@ -385,8 +396,8 @@ const j = class j extends HTMLElement {
|
|
|
385
396
|
const s = this.querySelector(".ng-container-body");
|
|
386
397
|
s && (s.scrollTop = t);
|
|
387
398
|
}, "scrollToY"));
|
|
388
|
-
|
|
389
|
-
const t =
|
|
399
|
+
f(this, ne, /* @__PURE__ */ c(() => {
|
|
400
|
+
const t = Z.SCROLLBAR_SIZE;
|
|
390
401
|
this.innerHTML = `
|
|
391
402
|
<style>
|
|
392
403
|
nine-table-sheet {
|
|
@@ -502,23 +513,23 @@ const j = class j extends HTMLElement {
|
|
|
502
513
|
</div>
|
|
503
514
|
`;
|
|
504
515
|
}, "#render"));
|
|
505
|
-
p(this,
|
|
516
|
+
p(this, F, new pe(this));
|
|
506
517
|
}
|
|
507
518
|
connectedCallback() {
|
|
508
|
-
e(this,
|
|
519
|
+
e(this, ne).call(this);
|
|
509
520
|
}
|
|
510
521
|
disconnectedCallback() {
|
|
511
|
-
this.innerHTML = "",
|
|
522
|
+
this.innerHTML = "", j.log("NineTableSheet destroyed.");
|
|
512
523
|
}
|
|
513
524
|
};
|
|
514
|
-
|
|
515
|
-
let
|
|
516
|
-
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet",
|
|
517
|
-
var
|
|
518
|
-
const
|
|
525
|
+
A = new WeakMap(), F = new WeakMap(), ne = new WeakMap(), c(Z, "NineTableSheet"), v(Z, "SCROLLBAR_SIZE", 16);
|
|
526
|
+
let ye = Z;
|
|
527
|
+
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ye);
|
|
528
|
+
var re;
|
|
529
|
+
const Ce = class Ce extends HTMLElement {
|
|
519
530
|
constructor() {
|
|
520
531
|
super();
|
|
521
|
-
|
|
532
|
+
f(this, re, /* @__PURE__ */ c(() => {
|
|
522
533
|
const t = this.querySelector(".nine-tab-bar");
|
|
523
534
|
t && (t.addEventListener("click", (s) => {
|
|
524
535
|
const n = s.target.closest(".nine-tab-item");
|
|
@@ -534,14 +545,14 @@ const qe = class qe extends HTMLElement {
|
|
|
534
545
|
const S = parseInt(d.dataset.splitIndex, 10), x = h.querySelector(`nine-table-sheet[data-index="${S - 1}"]`), k = h.querySelector(`nine-table-sheet[data-index="${S}"]`);
|
|
535
546
|
x && k && x.classList.contains("active") && k.classList.contains("active") ? d.classList.add("active") : d.classList.remove("active");
|
|
536
547
|
});
|
|
537
|
-
}, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"), l = o.querySelectorAll(".nine-tab-item"),
|
|
548
|
+
}, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"), l = o.querySelectorAll(".nine-tab-item"), u = r.querySelectorAll("nine-table-sheet");
|
|
538
549
|
if (!l[t]) return;
|
|
539
550
|
if (!s)
|
|
540
551
|
l.forEach((h, g) => {
|
|
541
552
|
h.classList.toggle("active", g === t);
|
|
542
553
|
const d = r.querySelector(`nine-table-sheet[data-index="${g}"]`);
|
|
543
554
|
d && (d.style.flex = "");
|
|
544
|
-
}),
|
|
555
|
+
}), u.forEach((h, g) => {
|
|
545
556
|
h.classList.toggle("active", g === t);
|
|
546
557
|
});
|
|
547
558
|
else {
|
|
@@ -571,36 +582,36 @@ const qe = class qe extends HTMLElement {
|
|
|
571
582
|
}, "switchSheet"));
|
|
572
583
|
}
|
|
573
584
|
connectedCallback() {
|
|
574
|
-
e(this,
|
|
585
|
+
e(this, re).call(this);
|
|
575
586
|
}
|
|
576
587
|
};
|
|
577
|
-
|
|
578
|
-
let
|
|
579
|
-
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets",
|
|
580
|
-
var
|
|
581
|
-
const
|
|
588
|
+
re = new WeakMap(), c(Ce, "NineTableSheets");
|
|
589
|
+
let we = Ce;
|
|
590
|
+
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", we);
|
|
591
|
+
var L, G, oe, J, le;
|
|
592
|
+
const ke = class ke {
|
|
582
593
|
constructor(i) {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
const i = e(this,
|
|
594
|
+
f(this, L);
|
|
595
|
+
f(this, G, null);
|
|
596
|
+
f(this, oe, /* @__PURE__ */ c(() => {
|
|
597
|
+
const i = e(this, L).host;
|
|
587
598
|
i && (p(this, G, new ResizeObserver((t) => {
|
|
588
599
|
for (let s of t)
|
|
589
600
|
i.getAttribute("auto-height") === "true" && e(this, J).call(this, i);
|
|
590
601
|
})), e(this, G).observe(i));
|
|
591
602
|
}, "#observeResize"));
|
|
592
|
-
|
|
593
|
-
var k,
|
|
603
|
+
f(this, J, /* @__PURE__ */ c((i) => {
|
|
604
|
+
var k, R;
|
|
594
605
|
const t = (k = i.shadowRoot) == null ? void 0 : k.querySelector("nine-table-sheet.active");
|
|
595
606
|
if (!t) return;
|
|
596
|
-
const s = ((
|
|
607
|
+
const s = ((R = t.getRowCount) == null ? void 0 : R.call(t)) || 0, n = parseInt(i.getAttribute("max-display-row"), 10) || 10, o = Math.min(s, n), r = t.querySelector("tbody tr") || t.querySelector("tr"), l = r ? r.getBoundingClientRect().height : 32, u = e(this, L).querySelector("nine-table-header"), a = e(this, L).querySelector("nine-table-sheets-footer"), b = u ? u.getBoundingClientRect().height : 40, h = a ? a.getBoundingClientRect().height : 32, d = b + h + 16, S = o * l + d;
|
|
597
608
|
i.style.height = `${S}px`, i.style.maxHeight = `${n * l + d}px`;
|
|
598
|
-
const x = e(this,
|
|
609
|
+
const x = e(this, L).querySelector("nine-table-sheets-body");
|
|
599
610
|
x && (x.style.overflowY = s > n ? "auto" : "hidden");
|
|
600
611
|
}, "#applyAutoHeight"));
|
|
601
|
-
|
|
602
|
-
const i = e(this,
|
|
603
|
-
e(this,
|
|
612
|
+
f(this, le, /* @__PURE__ */ c(() => {
|
|
613
|
+
const i = e(this, L).host, s = Array.from(i.children).filter((u) => u.tagName === "TABLE"), n = i.getAttribute("auto-height") === "true", o = s.map((u, a) => `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`).join(""), r = s.map((u, a) => `<div class="nine-tab-item ${a === 0 ? "active" : ""}" data-index="${a}">Sheet ${a + 1}</div>`).join("");
|
|
614
|
+
e(this, L).innerHTML = `
|
|
604
615
|
<style>
|
|
605
616
|
:host {
|
|
606
617
|
display: flex;
|
|
@@ -698,71 +709,71 @@ const Ce = class Ce {
|
|
|
698
709
|
</nine-table-body>
|
|
699
710
|
<nine-table-footer></nine-table-footer>
|
|
700
711
|
`;
|
|
701
|
-
const l = e(this,
|
|
702
|
-
l == null || l.forEach((
|
|
712
|
+
const l = e(this, L).querySelectorAll("nine-table-sheet");
|
|
713
|
+
l == null || l.forEach((u, a) => {
|
|
703
714
|
s[a] && setTimeout(() => {
|
|
704
|
-
|
|
715
|
+
u.init(s[a]), n && e(this, J).call(this, i);
|
|
705
716
|
});
|
|
706
717
|
});
|
|
707
718
|
}, "#render"));
|
|
708
|
-
p(this,
|
|
719
|
+
p(this, L, i), e(this, le).call(this), e(this, oe).call(this);
|
|
709
720
|
}
|
|
710
721
|
};
|
|
711
|
-
|
|
712
|
-
let
|
|
713
|
-
var
|
|
714
|
-
const
|
|
722
|
+
L = new WeakMap(), G = new WeakMap(), oe = new WeakMap(), J = new WeakMap(), le = new WeakMap(), c(ke, "LayoutManager");
|
|
723
|
+
let me = ke;
|
|
724
|
+
var W, V;
|
|
725
|
+
const Ae = class Ae {
|
|
715
726
|
constructor(i) {
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
v(this, "count", /* @__PURE__ */ c(() => e(this,
|
|
719
|
-
p(this,
|
|
727
|
+
f(this, W);
|
|
728
|
+
f(this, V, -1);
|
|
729
|
+
v(this, "count", /* @__PURE__ */ c(() => e(this, W).rawRecords.length, "count"));
|
|
730
|
+
p(this, W, i);
|
|
720
731
|
}
|
|
721
732
|
get at() {
|
|
722
|
-
return e(this,
|
|
733
|
+
return e(this, V);
|
|
723
734
|
}
|
|
724
735
|
set at(i) {
|
|
725
736
|
var s, n;
|
|
726
|
-
p(this,
|
|
727
|
-
const t = ((n = (s = e(this,
|
|
728
|
-
t && !t.querySelector(`tbody.bindable tr[data-row="${e(this,
|
|
737
|
+
p(this, V, parseInt(i, 10));
|
|
738
|
+
const t = ((n = (s = e(this, W).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || e(this, W).owner.body;
|
|
739
|
+
t && !t.querySelector(`tbody.bindable tr[data-row="${e(this, V)}"]`) && setTimeout(() => {
|
|
729
740
|
var o, r;
|
|
730
|
-
(r = (o = e(this,
|
|
741
|
+
(r = (o = e(this, W).owner).scrollTo_V1) == null || r.call(o, e(this, V));
|
|
731
742
|
});
|
|
732
743
|
}
|
|
733
744
|
};
|
|
734
|
-
|
|
735
|
-
let
|
|
736
|
-
var
|
|
745
|
+
W = new WeakMap(), V = new WeakMap(), c(Ae, "ngRow");
|
|
746
|
+
let ve = Ae;
|
|
747
|
+
var E, m, C, U, ae, z, ce, Q, he, de, K;
|
|
737
748
|
const T = class T {
|
|
738
749
|
constructor(i, t) {
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
p(this,
|
|
747
|
-
const i = e(this,
|
|
750
|
+
f(this, E);
|
|
751
|
+
f(this, m);
|
|
752
|
+
f(this, C, []);
|
|
753
|
+
f(this, U, []);
|
|
754
|
+
f(this, ae, 0);
|
|
755
|
+
f(this, z, []);
|
|
756
|
+
f(this, ce, /* @__PURE__ */ c(() => {
|
|
757
|
+
p(this, z, []);
|
|
758
|
+
const i = e(this, E).template || [];
|
|
748
759
|
Array.from(i).forEach((t) => {
|
|
749
760
|
var s;
|
|
750
|
-
e(this,
|
|
761
|
+
e(this, z).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
|
|
751
762
|
}), (e(this, m).rawRecords || []).forEach((t) => {
|
|
752
|
-
t.__ng || (t.__ng = e(this, Q).call(this)), t.__ng.height = e(this,
|
|
763
|
+
t.__ng || (t.__ng = e(this, Q).call(this)), t.__ng.height = e(this, z).slice();
|
|
753
764
|
});
|
|
754
765
|
}, "#initialize"));
|
|
755
766
|
v(this, "set", /* @__PURE__ */ c((i) => {
|
|
756
767
|
this.clear(), this.add(i, !1);
|
|
757
768
|
}, "set"));
|
|
758
|
-
|
|
769
|
+
f(this, Q, /* @__PURE__ */ c(() => ({
|
|
759
770
|
rowState: T.ROW_STATE.EMPTY,
|
|
760
771
|
deleted: !1,
|
|
761
772
|
filtered: !1,
|
|
762
|
-
height: e(this,
|
|
773
|
+
height: e(this, z).slice(),
|
|
763
774
|
o: {},
|
|
764
775
|
c: {},
|
|
765
|
-
_: [0, 0, 0, 0, T.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this,
|
|
776
|
+
_: [0, 0, 0, 0, T.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, z).slice(), -1, {}, {}]
|
|
766
777
|
}), "#getDefaultMeta"));
|
|
767
778
|
v(this, "reset", /* @__PURE__ */ c(() => {
|
|
768
779
|
p(this, C, []), p(this, U, []);
|
|
@@ -771,10 +782,10 @@ const T = class T {
|
|
|
771
782
|
var i;
|
|
772
783
|
e(this, m).rawRecords = [], p(this, C, []), p(this, U, []), (i = e(this, m).viewRecords) != null && i.reset && e(this, m).viewRecords.reset();
|
|
773
784
|
}, "clear"));
|
|
774
|
-
|
|
785
|
+
f(this, he, /* @__PURE__ */ c((i) => {
|
|
775
786
|
var n;
|
|
776
787
|
Array.isArray(i) || (i = [i]);
|
|
777
|
-
const t = typeof ((n = e(this,
|
|
788
|
+
const t = typeof ((n = e(this, E).fields) == null ? void 0 : n.get) == "function" ? e(this, E).fields.get() : Object.keys(i[0] || {}), s = [];
|
|
778
789
|
return i.forEach((o) => {
|
|
779
790
|
const r = { v: [] };
|
|
780
791
|
t.forEach((l) => {
|
|
@@ -782,18 +793,18 @@ const T = class T {
|
|
|
782
793
|
}), s.push(r);
|
|
783
794
|
}), s;
|
|
784
795
|
}, "#json2Array"));
|
|
785
|
-
|
|
796
|
+
f(this, de, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
|
|
786
797
|
t.__ng = e(this, Q).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = T.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
|
|
787
798
|
}), i), "#defaultInsert"));
|
|
788
799
|
v(this, "add", /* @__PURE__ */ c((i, t = !0) => {
|
|
789
800
|
var o;
|
|
790
801
|
i === void 0 && (i = {});
|
|
791
|
-
const s = e(this,
|
|
792
|
-
e(this, m).rawRecords = e(this, m).rawRecords.concat(e(this,
|
|
802
|
+
const s = e(this, he).call(this, i);
|
|
803
|
+
e(this, m).rawRecords = e(this, m).rawRecords.concat(e(this, de).call(this, s)), this.resetRecords();
|
|
793
804
|
const n = this.count() - 1;
|
|
794
805
|
return t || s.forEach((r, l) => {
|
|
795
|
-
const
|
|
796
|
-
|
|
806
|
+
const u = e(this, m).rawRecords[n - l];
|
|
807
|
+
u && (u.__ng.rowState = T.ROW_STATE.EMPTY);
|
|
797
808
|
}), (o = e(this, m).viewRecords) != null && o.reset && e(this, m).viewRecords.reset(), n;
|
|
798
809
|
}, "add"));
|
|
799
810
|
v(this, "delete", /* @__PURE__ */ c((i) => {
|
|
@@ -809,9 +820,9 @@ const T = class T {
|
|
|
809
820
|
}), this.resetRecords(), (s = e(this, m).viewRecords) != null && s.reset && e(this, m).viewRecords.reset();
|
|
810
821
|
}, "delete"));
|
|
811
822
|
v(this, "setValue", /* @__PURE__ */ c((i, t, s) => {
|
|
812
|
-
var
|
|
823
|
+
var u;
|
|
813
824
|
i = parseInt(i, 10);
|
|
814
|
-
const o = (typeof ((
|
|
825
|
+
const o = (typeof ((u = e(this, E).fields) == null ? void 0 : u.get) == "function" ? e(this, E).fields.get() : []).indexOf(t);
|
|
815
826
|
if (o < 0) return;
|
|
816
827
|
const r = this.getValidData()[i];
|
|
817
828
|
if (!r) return;
|
|
@@ -826,10 +837,10 @@ const T = class T {
|
|
|
826
837
|
});
|
|
827
838
|
}, "resetRecords"));
|
|
828
839
|
v(this, "getValidData", /* @__PURE__ */ c(() => (e(this, C).length === 0 && e(this, m).rawRecords.length > 0 && this.resetRecords(), e(this, C)), "getValidData"));
|
|
829
|
-
|
|
840
|
+
f(this, K, /* @__PURE__ */ c((i) => {
|
|
830
841
|
var s;
|
|
831
842
|
if (!i) return i;
|
|
832
|
-
const t = typeof ((s = e(this,
|
|
843
|
+
const t = typeof ((s = e(this, E).fields) == null ? void 0 : s.get) == "function" ? e(this, E).fields.get() : [];
|
|
833
844
|
return Array.isArray(i) ? i.filter((n) => !n.__ng.deleted).map((n) => {
|
|
834
845
|
const o = {};
|
|
835
846
|
return t.forEach((r, l) => {
|
|
@@ -844,14 +855,14 @@ const T = class T {
|
|
|
844
855
|
if (!s || s.length <= 0) return;
|
|
845
856
|
if (i == null) return e(this, K).call(this, s);
|
|
846
857
|
if (i < 0 || i >= s.length) return null;
|
|
847
|
-
const n = typeof ((o = e(this,
|
|
858
|
+
const n = typeof ((o = e(this, E).fields) == null ? void 0 : o.get) == "function" ? e(this, E).fields.get() : [];
|
|
848
859
|
if (t != null) {
|
|
849
860
|
const r = n.indexOf(t);
|
|
850
861
|
return r >= 0 ? s[i].v[r] : null;
|
|
851
862
|
}
|
|
852
863
|
return e(this, K).call(this, s[i]);
|
|
853
864
|
}, "get"));
|
|
854
|
-
p(this,
|
|
865
|
+
p(this, E, i), p(this, m, t), e(this, ce).call(this);
|
|
855
866
|
}
|
|
856
867
|
get source() {
|
|
857
868
|
return e(this, K).call(this, e(this, m).rawRecords);
|
|
@@ -860,10 +871,10 @@ const T = class T {
|
|
|
860
871
|
this.clear(), this.add(i, !1);
|
|
861
872
|
}
|
|
862
873
|
get nextId() {
|
|
863
|
-
return ++He(this,
|
|
874
|
+
return ++He(this, ae)._;
|
|
864
875
|
}
|
|
865
876
|
};
|
|
866
|
-
|
|
877
|
+
E = new WeakMap(), m = new WeakMap(), C = new WeakMap(), U = new WeakMap(), ae = new WeakMap(), z = new WeakMap(), ce = new WeakMap(), Q = new WeakMap(), he = new WeakMap(), de = new WeakMap(), K = new WeakMap(), c(T, "ngData"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
867
878
|
v(T, "ROW_STATE", {
|
|
868
879
|
EMPTY: "EMPTY",
|
|
869
880
|
NORMAL: "NORMAL",
|
|
@@ -871,10 +882,10 @@ v(T, "ROW_STATE", {
|
|
|
871
882
|
UPDATE: "UPDATE",
|
|
872
883
|
DELETE: "DELETE"
|
|
873
884
|
});
|
|
874
|
-
let
|
|
875
|
-
const
|
|
885
|
+
let xe = T;
|
|
886
|
+
const Le = class Le {
|
|
876
887
|
constructor(i) {
|
|
877
|
-
this.owner = i, this.row = new
|
|
888
|
+
this.owner = i, this.row = new ve(this), this.data = new xe(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
|
|
878
889
|
var t;
|
|
879
890
|
(t = this.owner.view) != null && t.redraw && this.owner.view.redraw();
|
|
880
891
|
}, this.setDataSource = (t) => {
|
|
@@ -891,37 +902,37 @@ const Ae = class Ae {
|
|
|
891
902
|
}, this.setDataSource([]);
|
|
892
903
|
}
|
|
893
904
|
};
|
|
894
|
-
c(
|
|
895
|
-
let
|
|
896
|
-
var
|
|
897
|
-
const
|
|
905
|
+
c(Le, "ngDataManager");
|
|
906
|
+
let Se = Le;
|
|
907
|
+
var Y, fe;
|
|
908
|
+
const _e = class _e extends HTMLElement {
|
|
898
909
|
constructor() {
|
|
899
910
|
super();
|
|
900
911
|
//#created = false;
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
this.attachShadow({ mode: "open" }), p(this,
|
|
912
|
+
f(this, Y);
|
|
913
|
+
f(this, fe);
|
|
914
|
+
this.attachShadow({ mode: "open" }), p(this, Y, new Se(this));
|
|
904
915
|
}
|
|
905
916
|
connectedCallback() {
|
|
906
|
-
p(this,
|
|
917
|
+
p(this, fe, new me(this.shadowRoot)), j.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
907
918
|
}
|
|
908
919
|
disconnectedCallback() {
|
|
909
|
-
|
|
920
|
+
j.log("NineTable disconnected.");
|
|
910
921
|
}
|
|
911
922
|
// π― μΈλΆμμ grid.data.set(...) ννλ‘ μ κ·Όν μ μλλ‘ λ°μ΄ν° λ§€λμ μ€ν
|
|
912
923
|
get data() {
|
|
913
|
-
return e(this,
|
|
924
|
+
return e(this, Y).data;
|
|
914
925
|
}
|
|
915
926
|
// π― ν(row) κ΄λ ¨ μ μ΄ μ κ·Όμ μ€ν
|
|
916
927
|
get row() {
|
|
917
|
-
return e(this,
|
|
928
|
+
return e(this, Y).row;
|
|
918
929
|
}
|
|
919
930
|
// π― μ 체 λ°μ΄ν° λ§€λμ μ κ·Ό νμν κ²½μ°
|
|
920
931
|
get dataManager() {
|
|
921
|
-
return e(this,
|
|
932
|
+
return e(this, Y);
|
|
922
933
|
}
|
|
923
934
|
};
|
|
924
|
-
|
|
925
|
-
let
|
|
926
|
-
customElements.get("nine-table") || customElements.define("nine-table",
|
|
935
|
+
Y = new WeakMap(), fe = new WeakMap(), c(_e, "NineTable");
|
|
936
|
+
let Ee = _e;
|
|
937
|
+
customElements.get("nine-table") || customElements.define("nine-table", Ee);
|
|
927
938
|
//# sourceMappingURL=nine-table.js.map
|