@ninebone/table 0.0.224 β 0.0.225
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 +214 -204
- 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,50 +1,50 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Ie = Object.defineProperty;
|
|
2
|
+
var $e = (w) => {
|
|
3
3
|
throw TypeError(w);
|
|
4
4
|
};
|
|
5
|
-
var Oe = (w, i, t) => i in w ?
|
|
6
|
-
var a = (w, i) =>
|
|
7
|
-
var x = (w, i, t) => Oe(w, typeof i != "symbol" ? i + "" : i, t),
|
|
8
|
-
var e = (w, i, t) => (
|
|
9
|
-
var
|
|
5
|
+
var Oe = (w, i, t) => i in w ? Ie(w, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : w[i] = t;
|
|
6
|
+
var a = (w, i) => Ie(w, "name", { value: i, configurable: !0 });
|
|
7
|
+
var x = (w, i, t) => Oe(w, typeof i != "symbol" ? i + "" : i, t), We = (w, i, t) => i.has(w) || $e("Cannot " + t);
|
|
8
|
+
var e = (w, i, t) => (We(w, i, "read from private field"), t ? t.call(w) : i.get(w)), f = (w, i, t) => i.has(w) ? $e("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(w) : i.set(w, t), y = (w, i, t, s) => (We(w, i, "write to private field"), s ? s.call(w, t) : i.set(w, t), t);
|
|
9
|
+
var ze = (w, i, t, s) => ({
|
|
10
10
|
set _(n) {
|
|
11
|
-
|
|
11
|
+
y(w, i, n, t);
|
|
12
12
|
},
|
|
13
13
|
get _() {
|
|
14
14
|
return e(w, i, s);
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
import { trace as
|
|
18
|
-
const
|
|
17
|
+
import { trace as Be } from "@ninebone/util";
|
|
18
|
+
const Ae = class Ae extends Be.constructor {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(), this.init("nine-table", "green");
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
a(
|
|
24
|
-
let pe =
|
|
25
|
-
const
|
|
26
|
-
var
|
|
27
|
-
const
|
|
23
|
+
a(Ae, "Trace");
|
|
24
|
+
let pe = Ae;
|
|
25
|
+
const j = new pe();
|
|
26
|
+
var C, B, p, D, N, P, se, V, ne;
|
|
27
|
+
const qe = class qe extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
30
|
-
f(this,
|
|
31
|
-
f(this,
|
|
32
|
-
f(this,
|
|
33
|
-
f(this, B);
|
|
30
|
+
f(this, C);
|
|
31
|
+
f(this, B, !1);
|
|
32
|
+
f(this, p);
|
|
34
33
|
f(this, D);
|
|
35
34
|
f(this, N);
|
|
36
|
-
f(this,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
t
|
|
35
|
+
f(this, P);
|
|
36
|
+
f(this, se, /* @__PURE__ */ a(() => {
|
|
37
|
+
if (!e(this, C)) return;
|
|
38
|
+
const t = e(this, C).querySelector(".ng-container-body");
|
|
39
|
+
t && (y(this, P, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
|
-
})), e(this,
|
|
41
|
+
})), e(this, P).observe(t));
|
|
42
42
|
}, "#observeResize"));
|
|
43
43
|
x(this, "refresh", /* @__PURE__ */ a(() => {
|
|
44
|
-
if (!e(this,
|
|
45
|
-
const t = e(this,
|
|
44
|
+
if (!e(this, C) || !e(this, p) || e(this, B)) return;
|
|
45
|
+
const t = e(this, p).container, s = t.querySelector("table");
|
|
46
46
|
if (!s) return;
|
|
47
|
-
const n = e(this,
|
|
47
|
+
const n = e(this, p).track, r = e(this, p).thumb, o = e(this, C).querySelector(".ng-container-bottom"), c = t.clientWidth, d = s.scrollWidth;
|
|
48
48
|
if (c !== 0 && d > c)
|
|
49
49
|
o && (o.style.display = "flex");
|
|
50
50
|
else {
|
|
@@ -59,61 +59,61 @@ const Ae = class Ae extends HTMLElement {
|
|
|
59
59
|
let g = 0;
|
|
60
60
|
b > 0 && (g = parseInt(u / b * (l - h), 10)), g < 0 && (g = 0);
|
|
61
61
|
const m = l - h;
|
|
62
|
-
g > m && (g = m), r.style.left = `${g}px`,
|
|
62
|
+
g > m && (g = m), r.style.left = `${g}px`, j.log(g), e(this, p).left.disabled = g === 0, e(this, p).right.disabled = g >= m - 1;
|
|
63
63
|
}, "refresh"));
|
|
64
|
-
f(this,
|
|
65
|
-
if (!e(this,
|
|
66
|
-
const s = e(this,
|
|
64
|
+
f(this, V, /* @__PURE__ */ a((t) => {
|
|
65
|
+
if (!e(this, p)) return !1;
|
|
66
|
+
const s = e(this, p).container, n = s.querySelector("table");
|
|
67
67
|
if (!n) return !1;
|
|
68
|
-
const r = e(this,
|
|
68
|
+
const r = e(this, p).track.getBoundingClientRect(), o = e(this, p).thumb.clientWidth;
|
|
69
69
|
let c = t;
|
|
70
70
|
c < 0 && (c = 0);
|
|
71
71
|
const d = r.width - o;
|
|
72
|
-
c > d && (c = d), c = parseInt(c, 10), e(this,
|
|
72
|
+
c > d && (c = d), c = parseInt(c, 10), e(this, p).thumb.style.left = `${c}px`, e(this, p).left.disabled = c === 0, e(this, p).right.disabled = c >= d - 1;
|
|
73
73
|
const l = s.clientWidth, h = n.scrollWidth;
|
|
74
74
|
let u = d > 0 ? -c * (h - l) / d : 0;
|
|
75
75
|
return -u > h - l && (u = -(h - l)), -u + 5 > h - l && (u = -(h - l)), l >= h && (u = 0), n.style.transform = `translateX(${u}px)`, c > 0 && c < d - 1;
|
|
76
76
|
}, "#thumbMoveTo"));
|
|
77
|
-
f(this,
|
|
77
|
+
f(this, ne, /* @__PURE__ */ a(() => {
|
|
78
78
|
const t = /* @__PURE__ */ a((n) => {
|
|
79
|
-
clearInterval(e(this,
|
|
80
|
-
const r = parseInt(e(this,
|
|
81
|
-
e(this,
|
|
82
|
-
clearInterval(e(this,
|
|
83
|
-
const o = parseInt(e(this,
|
|
84
|
-
e(this,
|
|
79
|
+
clearInterval(e(this, D)), clearInterval(e(this, N));
|
|
80
|
+
const r = parseInt(e(this, p).thumb.style.left || 0, 10);
|
|
81
|
+
e(this, V).call(this, r + n), y(this, D, setInterval(() => {
|
|
82
|
+
clearInterval(e(this, D)), y(this, N, setInterval(() => {
|
|
83
|
+
const o = parseInt(e(this, p).thumb.style.left || 0, 10);
|
|
84
|
+
e(this, V).call(this, o + n) || clearInterval(e(this, N));
|
|
85
85
|
}, 50));
|
|
86
86
|
}, 500));
|
|
87
87
|
}, "delayScroll"), s = /* @__PURE__ */ a(() => {
|
|
88
|
-
clearInterval(e(this,
|
|
88
|
+
clearInterval(e(this, D)), clearInterval(e(this, N));
|
|
89
89
|
}, "clearTimer");
|
|
90
90
|
["mouseup", "mouseleave", "touchend"].forEach((n) => {
|
|
91
|
-
e(this,
|
|
92
|
-
}), e(this,
|
|
91
|
+
e(this, p).left.addEventListener(n, s), e(this, p).right.addEventListener(n, s), e(this, p).track.addEventListener(n, s);
|
|
92
|
+
}), e(this, p).left.addEventListener("mousedown", (n) => {
|
|
93
93
|
n.button === 0 && t(-20);
|
|
94
|
-
}), e(this,
|
|
94
|
+
}), e(this, p).right.addEventListener("mousedown", (n) => {
|
|
95
95
|
n.button === 0 && t(20);
|
|
96
|
-
}), e(this,
|
|
96
|
+
}), e(this, p).left.addEventListener("touchstart", () => t(-20)), e(this, p).right.addEventListener("touchstart", () => t(20)), e(this, p).track.addEventListener("mousedown", (n) => {
|
|
97
97
|
if (n.button !== 0) return;
|
|
98
98
|
n.preventDefault();
|
|
99
|
-
const r = e(this,
|
|
100
|
-
e(this,
|
|
101
|
-
}), e(this,
|
|
99
|
+
const r = e(this, p).track.getBoundingClientRect(), o = e(this, p).thumb.clientWidth;
|
|
100
|
+
e(this, V).call(this, n.clientX - r.left - o / 2);
|
|
101
|
+
}), e(this, p).thumb.addEventListener("mousedown", (n) => {
|
|
102
102
|
if (n.button !== 0) return;
|
|
103
|
-
n.stopPropagation(), n.preventDefault(),
|
|
103
|
+
n.stopPropagation(), n.preventDefault(), y(this, B, !0), this.shiftX = n.clientX - e(this, p).thumb.getBoundingClientRect().left;
|
|
104
104
|
const r = /* @__PURE__ */ a((c) => {
|
|
105
|
-
if (!e(this,
|
|
106
|
-
const d = e(this,
|
|
107
|
-
e(this,
|
|
105
|
+
if (!e(this, B)) return;
|
|
106
|
+
const d = e(this, p).track.getBoundingClientRect();
|
|
107
|
+
e(this, V).call(this, c.clientX - d.left - this.shiftX);
|
|
108
108
|
}, "onMouseMove"), o = /* @__PURE__ */ a(() => {
|
|
109
|
-
|
|
109
|
+
y(this, B, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
|
|
110
110
|
}, "onMouseUp");
|
|
111
111
|
document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
|
|
112
112
|
});
|
|
113
113
|
}, "#init"));
|
|
114
114
|
}
|
|
115
115
|
connectedCallback() {
|
|
116
|
-
if (
|
|
116
|
+
if (y(this, C, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, C)) return;
|
|
117
117
|
this.innerHTML = `
|
|
118
118
|
<style>
|
|
119
119
|
nine-table-hscrollbar {
|
|
@@ -178,46 +178,46 @@ const Ae = class Ae extends HTMLElement {
|
|
|
178
178
|
<button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
|
|
179
179
|
`;
|
|
180
180
|
const t = /* @__PURE__ */ a(() => {
|
|
181
|
-
const s = e(this,
|
|
181
|
+
const s = e(this, C).querySelector(".ng-container-body");
|
|
182
182
|
if (!s) {
|
|
183
183
|
setTimeout(t, 10);
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
|
-
|
|
186
|
+
y(this, p, {
|
|
187
187
|
container: s,
|
|
188
188
|
track: this.querySelector(".ng-scroll-track"),
|
|
189
189
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
190
190
|
left: this.querySelector(".ng-scroll-left"),
|
|
191
191
|
right: this.querySelector(".ng-scroll-right")
|
|
192
|
-
}), e(this,
|
|
192
|
+
}), e(this, ne).call(this), e(this, se).call(this), this.refresh();
|
|
193
193
|
}, "initWhenReady");
|
|
194
194
|
t();
|
|
195
195
|
}
|
|
196
196
|
disconnectedCallback() {
|
|
197
|
-
e(this,
|
|
197
|
+
e(this, P) && e(this, P).disconnect();
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
|
-
|
|
201
|
-
let
|
|
202
|
-
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar",
|
|
203
|
-
var
|
|
204
|
-
const
|
|
200
|
+
C = new WeakMap(), B = new WeakMap(), p = new WeakMap(), D = new WeakMap(), N = new WeakMap(), P = new WeakMap(), se = new WeakMap(), V = new WeakMap(), ne = new WeakMap(), a(qe, "NineTableHScrollBar");
|
|
201
|
+
let me = qe;
|
|
202
|
+
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", me);
|
|
203
|
+
var $, k, S, W, H, M, re, oe, J;
|
|
204
|
+
const Le = class Le {
|
|
205
205
|
constructor(i) {
|
|
206
|
-
f(this,
|
|
207
|
-
f(this,
|
|
208
|
-
f(this,
|
|
209
|
-
f(this,
|
|
206
|
+
f(this, $);
|
|
207
|
+
f(this, k, []);
|
|
208
|
+
f(this, S, null);
|
|
209
|
+
f(this, W, null);
|
|
210
210
|
f(this, H, 0);
|
|
211
211
|
f(this, M, 0);
|
|
212
|
-
x(this, "getRowHeight", /* @__PURE__ */ a(() => e(this,
|
|
213
|
-
f(this,
|
|
214
|
-
e(this,
|
|
212
|
+
x(this, "getRowHeight", /* @__PURE__ */ a(() => e(this, S), "getRowHeight"));
|
|
213
|
+
f(this, re, /* @__PURE__ */ a(() => {
|
|
214
|
+
e(this, oe).call(this);
|
|
215
215
|
}, "#init"));
|
|
216
216
|
/**
|
|
217
217
|
* π― λ·°ν¬νΈ ν¬κΈ° λ³ν μμ μ λμ΄ κ³μ° λ° νμν ν κ°μ μ°μ Β·μΊμ±μ μκ²°
|
|
218
218
|
*/
|
|
219
|
-
f(this,
|
|
220
|
-
!e(this,
|
|
219
|
+
f(this, oe, /* @__PURE__ */ a(() => {
|
|
220
|
+
!e(this, $) || !(e(this, $) instanceof HTMLElement) || (y(this, W, new ResizeObserver((i) => {
|
|
221
221
|
for (const t of i) {
|
|
222
222
|
const s = t.target;
|
|
223
223
|
if (!s.classList.contains("active"))
|
|
@@ -229,33 +229,43 @@ const qe = class qe {
|
|
|
229
229
|
const c = s.querySelector(".ng-container-body") || s, d = c.querySelector("thead"), l = c.querySelector("tfoot");
|
|
230
230
|
d && (o += d.offsetHeight || d.getBoundingClientRect().height), l && (o += l.offsetHeight || l.getBoundingClientRect().height);
|
|
231
231
|
const h = Math.max(r - o, 100);
|
|
232
|
-
if (e(this, H) !== h && (
|
|
233
|
-
const u = Math.ceil(e(this, H) / e(this,
|
|
234
|
-
|
|
232
|
+
if (e(this, H) !== h && (y(this, H, h), e(this, S) !== null)) {
|
|
233
|
+
const u = Math.ceil(e(this, H) / e(this, S));
|
|
234
|
+
y(this, M, u + 20), j.log(`[RowManager] Resized. Height: ${e(this, H)}px | Target Rows: ${e(this, M)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
|
|
235
235
|
const g = s.querySelector(b);
|
|
236
|
-
g && g.querySelector("tbody") && this.
|
|
236
|
+
g && g.querySelector("tbody") && e(this, J).call(this, g);
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
-
})), e(this,
|
|
241
|
+
})), e(this, W).observe(e(this, $)));
|
|
242
242
|
}, "#initResizeObserver"));
|
|
243
243
|
x(this, "initTemplate", /* @__PURE__ */ a((i) => {
|
|
244
244
|
const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
|
|
245
245
|
if (!t) return;
|
|
246
246
|
const s = Array.from(t.querySelectorAll("tr")).filter((n) => !n.classList.contains("nodata"));
|
|
247
|
-
|
|
247
|
+
y(this, k, s.map((n) => n.cloneNode(!0))), y(this, S, null), console.log(`[RowManager] Template initialized with ${e(this, k).length} row(s).`);
|
|
248
248
|
}, "initTemplate"));
|
|
249
|
+
// π― ν
νλ¦Ώ μΆμΆ, λμ΄ μΈ‘μ , μ΄κΈ° λ λλ§μ μμμ λ§κ² λ΄λΆμμ μΌκ΄ μ²λ¦¬
|
|
250
|
+
x(this, "initialize", /* @__PURE__ */ a((i) => {
|
|
251
|
+
j.log(i);
|
|
252
|
+
const t = e(this, $).querySelector(".ng-container-body");
|
|
253
|
+
if (!t) return;
|
|
254
|
+
const s = i.querySelector("tbody.bindable") || i.querySelector("tbody");
|
|
255
|
+
if (!s) return;
|
|
256
|
+
const n = Array.from(s.querySelectorAll("tr")).filter((r) => !r.classList.contains("nodata"));
|
|
257
|
+
y(this, k, n.map((r) => r.cloneNode(!0))), y(this, S, null), this.measureAndCacheHeight(t), e(this, J).call(this, t);
|
|
258
|
+
}, "initialize"));
|
|
249
259
|
x(this, "measureAndCacheHeight", /* @__PURE__ */ a((i) => {
|
|
250
|
-
if (e(this,
|
|
251
|
-
return e(this,
|
|
252
|
-
if (e(this,
|
|
260
|
+
if (e(this, S) !== null && e(this, S) > 0)
|
|
261
|
+
return e(this, S);
|
|
262
|
+
if (e(this, k).length === 0)
|
|
253
263
|
throw new Error("[RowManager] Template TRs are empty.");
|
|
254
264
|
const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
|
|
255
265
|
if (!t) return 24;
|
|
256
266
|
t.querySelectorAll("tr:not(.nodata)").forEach((u) => u.remove());
|
|
257
267
|
const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment();
|
|
258
|
-
e(this,
|
|
268
|
+
e(this, k).forEach((u) => {
|
|
259
269
|
n.appendChild(u.cloneNode(!0));
|
|
260
270
|
}), s ? s.before(n) : t.appendChild(n);
|
|
261
271
|
const r = i.closest("nine-table-sheet"), o = r ? r.style.display : "", c = r ? r.style.visibility : "", d = r ? r.style.position : "";
|
|
@@ -264,12 +274,12 @@ const qe = class qe {
|
|
|
264
274
|
if (t.querySelectorAll("tr:not(.nodata)").forEach((u, b) => {
|
|
265
275
|
const g = u.offsetHeight || u.getBoundingClientRect().height;
|
|
266
276
|
g === 0 ? l += 40 : l += g;
|
|
267
|
-
}), r && (r.style.display = o, r.style.visibility = c, r.style.position = d),
|
|
268
|
-
const u = Math.ceil(e(this, H) / e(this,
|
|
269
|
-
|
|
277
|
+
}), r && (r.style.display = o, r.style.visibility = c, r.style.position = d), y(this, S, l), e(this, H) > 0) {
|
|
278
|
+
const u = Math.ceil(e(this, H) / e(this, S));
|
|
279
|
+
y(this, M, u + 20);
|
|
270
280
|
} else
|
|
271
|
-
|
|
272
|
-
return console.log(`[RowManager] Template Height Cached: ${e(this,
|
|
281
|
+
y(this, M, 40);
|
|
282
|
+
return console.log(`[RowManager] Template Height Cached: ${e(this, S)}px | RowCount: ${e(this, M)}`), e(this, S);
|
|
273
283
|
}, "measureAndCacheHeight"));
|
|
274
284
|
/**
|
|
275
285
|
* π― μΊμλ ν κ°μ λ°ν (μμ λλ§ μ΅μνμ λ°©μ΄ μ°μ°)
|
|
@@ -287,46 +297,46 @@ const qe = class qe {
|
|
|
287
297
|
/**
|
|
288
298
|
* π― μΊμλ ν κ°μλ₯Ό κ³§λ°λ‘ κ°μ Έμμ TR λΌλ μ£Όμ
(μ€λ³΅ κ³μ° μ κ±°)
|
|
289
299
|
*/
|
|
290
|
-
|
|
291
|
-
if (e(this,
|
|
300
|
+
f(this, J, /* @__PURE__ */ a((i) => {
|
|
301
|
+
if (e(this, k).length === 0) return;
|
|
292
302
|
const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
|
|
293
303
|
if (!t) return;
|
|
294
304
|
t.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
|
|
295
305
|
const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment(), r = e(this, M);
|
|
296
306
|
for (let o = 0; o < r; o++)
|
|
297
|
-
e(this,
|
|
307
|
+
e(this, k).forEach((c) => {
|
|
298
308
|
n.appendChild(c.cloneNode(!0));
|
|
299
309
|
});
|
|
300
310
|
s ? s.before(n) : t.appendChild(n), console.log(`[RowManager] Rendered ${r} sets into DOM.`);
|
|
301
|
-
}, "renderRows"));
|
|
311
|
+
}, "#renderRows"));
|
|
302
312
|
x(this, "destroy", /* @__PURE__ */ a(() => {
|
|
303
|
-
e(this,
|
|
313
|
+
e(this, W) && (e(this, W).disconnect(), y(this, W, null));
|
|
304
314
|
}, "destroy"));
|
|
305
|
-
|
|
315
|
+
y(this, $, i), e(this, re).call(this);
|
|
306
316
|
}
|
|
307
317
|
get templateLength() {
|
|
308
|
-
return e(this,
|
|
318
|
+
return e(this, k).length || 1;
|
|
309
319
|
}
|
|
310
320
|
};
|
|
311
|
-
|
|
312
|
-
let
|
|
313
|
-
var I,
|
|
314
|
-
const
|
|
321
|
+
$ = new WeakMap(), k = new WeakMap(), S = new WeakMap(), W = new WeakMap(), H = new WeakMap(), M = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), J = new WeakMap(), a(Le, "RowManager");
|
|
322
|
+
let we = Le;
|
|
323
|
+
var I, U, le, ae;
|
|
324
|
+
const G = class G extends HTMLElement {
|
|
315
325
|
constructor() {
|
|
316
326
|
super();
|
|
317
327
|
f(this, I, null);
|
|
318
|
-
f(this,
|
|
328
|
+
f(this, U);
|
|
319
329
|
x(this, "generate", /* @__PURE__ */ a((t) => {
|
|
320
330
|
if (!t) return;
|
|
321
331
|
const s = /* @__PURE__ */ a((l) => {
|
|
322
332
|
const h = /* @__PURE__ */ a((b) => {
|
|
323
333
|
if (b.querySelector("colgroup")) return;
|
|
324
|
-
const g = b.querySelector("tbody tr") || b.querySelector("tr"), m = g ? g.querySelectorAll("th, td").length : 1,
|
|
334
|
+
const g = b.querySelector("tbody tr") || b.querySelector("tr"), m = g ? g.querySelectorAll("th, td").length : 1, E = document.createElement("colgroup"), T = Math.max(Math.floor(b.clientWidth / m), 100);
|
|
325
335
|
for (let _ = 0; _ < m; _++) {
|
|
326
|
-
const
|
|
327
|
-
|
|
336
|
+
const Y = document.createElement("col");
|
|
337
|
+
Y.setAttribute("width", T), E.appendChild(Y);
|
|
328
338
|
}
|
|
329
|
-
b.prepend(
|
|
339
|
+
b.prepend(E);
|
|
330
340
|
}, "ensureColgroup"), u = /* @__PURE__ */ a((b) => {
|
|
331
341
|
if (b.querySelector("thead")) return;
|
|
332
342
|
const g = document.createElement("thead"), m = b.querySelector("colgroup");
|
|
@@ -334,23 +344,23 @@ const j = class j extends HTMLElement {
|
|
|
334
344
|
}, "ensureThead");
|
|
335
345
|
return h(l), u(l), l.classList.add("nine-table-element"), l;
|
|
336
346
|
}, "initializeTable"), n = t.cloneNode(!0);
|
|
337
|
-
|
|
347
|
+
y(this, I, s(n)), e(this, I).style.display = "table";
|
|
338
348
|
const r = this.querySelector(".ng-container-left"), o = this.querySelector(".ng-container-body"), c = this.querySelector(".ng-container-right"), d = /* @__PURE__ */ a((l, h, u = !1) => {
|
|
339
349
|
const b = l.cloneNode(!0), g = Array.from(b.querySelectorAll("colgroup col")), m = [];
|
|
340
|
-
return g.forEach((
|
|
341
|
-
const _ =
|
|
342
|
-
let
|
|
343
|
-
u ?
|
|
344
|
-
}), m.reverse().forEach((
|
|
345
|
-
g[
|
|
350
|
+
return g.forEach((E, T) => {
|
|
351
|
+
const _ = E.getAttribute("fixed");
|
|
352
|
+
let Y = !1;
|
|
353
|
+
u ? Y = _ !== "left" && _ !== "right" : Y = _ === h, Y || m.push(T);
|
|
354
|
+
}), m.reverse().forEach((E) => {
|
|
355
|
+
g[E] && g[E].remove(), b.querySelectorAll("tr").forEach((T) => {
|
|
346
356
|
const _ = T.querySelectorAll("th, td");
|
|
347
|
-
_[
|
|
357
|
+
_[E] && _[E].remove();
|
|
348
358
|
});
|
|
349
359
|
}), b;
|
|
350
360
|
}, "filterTableByFixed");
|
|
351
361
|
if (o) {
|
|
352
362
|
const l = d(e(this, I), null, !0);
|
|
353
|
-
o.innerHTML = "", o.appendChild(l), e(this,
|
|
363
|
+
o.innerHTML = "", o.appendChild(l), e(this, U).initialize(e(this, I));
|
|
354
364
|
}
|
|
355
365
|
if (r) {
|
|
356
366
|
const l = d(e(this, I), "left", !1);
|
|
@@ -380,7 +390,7 @@ const j = class j extends HTMLElement {
|
|
|
380
390
|
(l = this.querySelector("nine-table-hscrollbar")) == null || l.refresh();
|
|
381
391
|
}, 0);
|
|
382
392
|
}, "generate"));
|
|
383
|
-
x(this, "getRowHeight", /* @__PURE__ */ a(() => e(this,
|
|
393
|
+
x(this, "getRowHeight", /* @__PURE__ */ a(() => e(this, U).getRowHeight(), "getRowHeight"));
|
|
384
394
|
/**
|
|
385
395
|
getRowCount = () => {
|
|
386
396
|
if (!this.#tableElement) return 0;
|
|
@@ -394,8 +404,8 @@ const j = class j extends HTMLElement {
|
|
|
394
404
|
const s = this.querySelector(".ng-container-body");
|
|
395
405
|
s && (s.scrollTop = t);
|
|
396
406
|
}, "scrollToY"));
|
|
397
|
-
f(this,
|
|
398
|
-
e(this,
|
|
407
|
+
f(this, le, /* @__PURE__ */ a(() => {
|
|
408
|
+
e(this, ae).call(this), new MutationObserver((t) => {
|
|
399
409
|
const s = /* @__PURE__ */ a(() => {
|
|
400
410
|
requestAnimationFrame(() => {
|
|
401
411
|
var u, b, g;
|
|
@@ -403,11 +413,11 @@ const j = class j extends HTMLElement {
|
|
|
403
413
|
if (!r) return;
|
|
404
414
|
const c = n ? Array.from(n.querySelectorAll("tr")) : [], d = Array.from(r.querySelectorAll("tr")), l = o ? Array.from(o.querySelectorAll("tr")) : [], h = Math.max(c.length, d.length, l.length);
|
|
405
415
|
for (let m = 0; m < h; m++) {
|
|
406
|
-
const
|
|
416
|
+
const E = [
|
|
407
417
|
((u = c[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
|
|
408
418
|
((b = d[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0,
|
|
409
419
|
((g = l[m]) == null ? void 0 : g.getBoundingClientRect().height) || 0
|
|
410
|
-
], T = Math.max(...
|
|
420
|
+
], T = Math.max(...E);
|
|
411
421
|
T > 0 && (c[m] && (c[m].style.height = `${T}px`), d[m] && (d[m].style.height = `${T}px`), l[m] && (l[m].style.height = `${T}px`));
|
|
412
422
|
}
|
|
413
423
|
});
|
|
@@ -416,8 +426,8 @@ const j = class j extends HTMLElement {
|
|
|
416
426
|
n.attributeName === "class" && this.classList.contains("active") && s();
|
|
417
427
|
}).observe(this, { attributes: !0 });
|
|
418
428
|
}, "#init"));
|
|
419
|
-
f(this,
|
|
420
|
-
const t =
|
|
429
|
+
f(this, ae, /* @__PURE__ */ a(() => {
|
|
430
|
+
const t = G.SCROLLBAR_SIZE;
|
|
421
431
|
this.innerHTML = `
|
|
422
432
|
<style>
|
|
423
433
|
nine-table-sheet {
|
|
@@ -542,38 +552,38 @@ const j = class j extends HTMLElement {
|
|
|
542
552
|
</div>
|
|
543
553
|
`;
|
|
544
554
|
}, "#render"));
|
|
545
|
-
|
|
555
|
+
y(this, U, new we(this));
|
|
546
556
|
}
|
|
547
557
|
connectedCallback() {
|
|
548
|
-
e(this,
|
|
558
|
+
e(this, le).call(this);
|
|
549
559
|
}
|
|
550
560
|
disconnectedCallback() {
|
|
551
|
-
this.innerHTML = "",
|
|
561
|
+
this.innerHTML = "", j.log("NineTableSheet destroyed.");
|
|
552
562
|
}
|
|
553
563
|
};
|
|
554
|
-
I = new WeakMap(),
|
|
555
|
-
let
|
|
556
|
-
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet",
|
|
557
|
-
var
|
|
564
|
+
I = new WeakMap(), U = new WeakMap(), le = new WeakMap(), ae = new WeakMap(), a(G, "NineTableSheet"), x(G, "SCROLLBAR_SIZE", 16);
|
|
565
|
+
let ie = G;
|
|
566
|
+
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ie);
|
|
567
|
+
var ce, Q;
|
|
558
568
|
const ke = class ke extends HTMLElement {
|
|
559
569
|
constructor() {
|
|
560
570
|
super();
|
|
561
|
-
f(this,
|
|
571
|
+
f(this, ce, /* @__PURE__ */ a(() => {
|
|
562
572
|
var t;
|
|
563
573
|
(t = this.querySelector(".nine-tab-bar")) == null || t.addEventListener("click", (s) => {
|
|
564
574
|
var o;
|
|
565
575
|
const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
|
|
566
|
-
e(this,
|
|
567
|
-
}), e(this,
|
|
576
|
+
e(this, Q).call(this, r, n);
|
|
577
|
+
}), e(this, Q).call(this, 0, !1);
|
|
568
578
|
}, "#init"));
|
|
569
|
-
f(this,
|
|
579
|
+
f(this, Q, /* @__PURE__ */ a((t, s = !1) => {
|
|
570
580
|
const n = /* @__PURE__ */ a(() => {
|
|
571
581
|
const h = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
572
582
|
Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
|
|
573
583
|
const b = h.filter((g) => g.classList.contains("active"));
|
|
574
584
|
b.length < 2 || b.forEach((g) => {
|
|
575
|
-
const m = parseInt(g.getAttribute("data-index"), 10),
|
|
576
|
-
|
|
585
|
+
const m = parseInt(g.getAttribute("data-index"), 10), E = this.querySelector(`nine-splitter[data-split-index="${m}"]`), T = h[m + 1];
|
|
586
|
+
E && T && T.classList.contains("active") && E.style.setProperty("display", "flex");
|
|
577
587
|
});
|
|
578
588
|
}, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), c = r.querySelectorAll(".nine-tab-item"), d = o.querySelectorAll("nine-table-sheet");
|
|
579
589
|
if (!c[t]) return;
|
|
@@ -599,30 +609,30 @@ const ke = class ke extends HTMLElement {
|
|
|
599
609
|
}, "#switchSheet"));
|
|
600
610
|
}
|
|
601
611
|
connectedCallback() {
|
|
602
|
-
e(this,
|
|
612
|
+
e(this, ce).call(this);
|
|
603
613
|
}
|
|
604
614
|
};
|
|
605
|
-
|
|
606
|
-
let
|
|
607
|
-
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets",
|
|
608
|
-
var R,
|
|
609
|
-
const
|
|
615
|
+
ce = new WeakMap(), Q = new WeakMap(), a(ke, "NineTableSheets");
|
|
616
|
+
let ve = ke;
|
|
617
|
+
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", ve);
|
|
618
|
+
var R, he, ee, de;
|
|
619
|
+
const Ce = class Ce {
|
|
610
620
|
constructor(i) {
|
|
611
621
|
f(this, R);
|
|
612
|
-
f(this,
|
|
613
|
-
e(this,
|
|
622
|
+
f(this, he, /* @__PURE__ */ a(() => {
|
|
623
|
+
e(this, de).call(this), new ResizeObserver((i) => {
|
|
614
624
|
for (let t of i)
|
|
615
|
-
e(this, R).getAttribute("auto-height") === "true" && e(this,
|
|
625
|
+
e(this, R).getAttribute("auto-height") === "true" && e(this, ee).call(this);
|
|
616
626
|
}).observe(e(this, R));
|
|
617
627
|
}, "#init"));
|
|
618
|
-
f(this,
|
|
628
|
+
f(this, ee, /* @__PURE__ */ a(() => {
|
|
619
629
|
var d, l;
|
|
620
630
|
const i = Array.from(e(this, R).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
621
631
|
if (i.length === 0) return;
|
|
622
|
-
const t = parseInt(e(this, R).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((h) => h.getRowHeight())), n = (d = e(this, R).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : d.getBoundingClientRect().height, r = (l = e(this, R).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o =
|
|
632
|
+
const t = parseInt(e(this, R).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((h) => h.getRowHeight())), n = (d = e(this, R).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : d.getBoundingClientRect().height, r = (l = e(this, R).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = ie.SCROLLBAR_SIZE, c = t * s + n + r + o;
|
|
623
633
|
e(this, R).style.height = `${c}px`;
|
|
624
634
|
}, "#applyAutoHeight"));
|
|
625
|
-
f(this,
|
|
635
|
+
f(this, de, /* @__PURE__ */ a(() => {
|
|
626
636
|
const t = Array.from(e(this, R).children).filter((d) => d.tagName === "TABLE"), s = e(this, R).getAttribute("auto-height") === "true", n = t.length, r = t.map((d, l) => {
|
|
627
637
|
const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < n - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
|
|
628
638
|
return u + b;
|
|
@@ -729,77 +739,77 @@ const Le = class Le {
|
|
|
729
739
|
const c = e(this, R).shadowRoot.querySelectorAll("nine-table-sheet");
|
|
730
740
|
c == null || c.forEach((d, l) => {
|
|
731
741
|
t[l] && setTimeout(() => {
|
|
732
|
-
d.generate(t[l]), s && e(this,
|
|
742
|
+
d.generate(t[l]), s && e(this, ee).call(this);
|
|
733
743
|
});
|
|
734
744
|
});
|
|
735
745
|
}, "#render"));
|
|
736
|
-
|
|
746
|
+
y(this, R, i), e(this, he).call(this);
|
|
737
747
|
}
|
|
738
748
|
};
|
|
739
|
-
R = new WeakMap(),
|
|
740
|
-
let
|
|
741
|
-
var
|
|
742
|
-
const
|
|
749
|
+
R = new WeakMap(), he = new WeakMap(), ee = new WeakMap(), de = new WeakMap(), a(Ce, "LayoutManager");
|
|
750
|
+
let xe = Ce;
|
|
751
|
+
var z, X;
|
|
752
|
+
const _e = class _e {
|
|
743
753
|
constructor(i) {
|
|
744
|
-
f(this,
|
|
745
|
-
f(this,
|
|
746
|
-
x(this, "count", /* @__PURE__ */ a(() => e(this,
|
|
747
|
-
|
|
754
|
+
f(this, z);
|
|
755
|
+
f(this, X, -1);
|
|
756
|
+
x(this, "count", /* @__PURE__ */ a(() => e(this, z).rawRecords.length, "count"));
|
|
757
|
+
y(this, z, i);
|
|
748
758
|
}
|
|
749
759
|
get at() {
|
|
750
|
-
return e(this,
|
|
760
|
+
return e(this, X);
|
|
751
761
|
}
|
|
752
762
|
set at(i) {
|
|
753
763
|
var s, n;
|
|
754
|
-
|
|
755
|
-
const t = ((n = (s = e(this,
|
|
756
|
-
t && !t.querySelector(`tbody.bindable tr[data-row="${e(this,
|
|
764
|
+
y(this, X, parseInt(i, 10));
|
|
765
|
+
const t = ((n = (s = e(this, z).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || e(this, z).owner.body;
|
|
766
|
+
t && !t.querySelector(`tbody.bindable tr[data-row="${e(this, X)}"]`) && setTimeout(() => {
|
|
757
767
|
var r, o;
|
|
758
|
-
(o = (r = e(this,
|
|
768
|
+
(o = (r = e(this, z).owner).scrollTo_V1) == null || o.call(r, e(this, X));
|
|
759
769
|
});
|
|
760
770
|
}
|
|
761
771
|
};
|
|
762
|
-
|
|
763
|
-
let
|
|
764
|
-
var A, v, q, K,
|
|
765
|
-
const
|
|
772
|
+
z = new WeakMap(), X = new WeakMap(), a(_e, "ngRow");
|
|
773
|
+
let Se = _e;
|
|
774
|
+
var A, v, q, K, fe, O, ue, te, ge, be, Z;
|
|
775
|
+
const L = class L {
|
|
766
776
|
constructor(i, t) {
|
|
767
777
|
f(this, A);
|
|
768
778
|
f(this, v);
|
|
769
779
|
f(this, q, []);
|
|
770
780
|
f(this, K, []);
|
|
771
|
-
f(this,
|
|
781
|
+
f(this, fe, 0);
|
|
772
782
|
f(this, O, []);
|
|
773
|
-
f(this,
|
|
774
|
-
|
|
783
|
+
f(this, ue, /* @__PURE__ */ a(() => {
|
|
784
|
+
y(this, O, []);
|
|
775
785
|
const i = e(this, A).template || [];
|
|
776
786
|
Array.from(i).forEach((t) => {
|
|
777
787
|
var s;
|
|
778
788
|
e(this, O).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
|
|
779
789
|
}), (e(this, v).rawRecords || []).forEach((t) => {
|
|
780
|
-
t.__ng || (t.__ng = e(this,
|
|
790
|
+
t.__ng || (t.__ng = e(this, te).call(this)), t.__ng.height = e(this, O).slice();
|
|
781
791
|
});
|
|
782
792
|
}, "#initialize"));
|
|
783
793
|
x(this, "set", /* @__PURE__ */ a((i) => {
|
|
784
794
|
this.clear(), this.add(i, !1);
|
|
785
795
|
}, "set"));
|
|
786
|
-
f(this,
|
|
787
|
-
rowState:
|
|
796
|
+
f(this, te, /* @__PURE__ */ a(() => ({
|
|
797
|
+
rowState: L.ROW_STATE.EMPTY,
|
|
788
798
|
deleted: !1,
|
|
789
799
|
filtered: !1,
|
|
790
800
|
height: e(this, O).slice(),
|
|
791
801
|
o: {},
|
|
792
802
|
c: {},
|
|
793
|
-
_: [0, 0, 0, 0,
|
|
803
|
+
_: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, O).slice(), -1, {}, {}]
|
|
794
804
|
}), "#getDefaultMeta"));
|
|
795
805
|
x(this, "reset", /* @__PURE__ */ a(() => {
|
|
796
|
-
|
|
806
|
+
y(this, q, []), y(this, K, []);
|
|
797
807
|
}, "reset"));
|
|
798
808
|
x(this, "clear", /* @__PURE__ */ a(() => {
|
|
799
809
|
var i;
|
|
800
|
-
e(this, v).rawRecords = [],
|
|
810
|
+
e(this, v).rawRecords = [], y(this, q, []), y(this, K, []), (i = e(this, v).viewRecords) != null && i.reset && e(this, v).viewRecords.reset();
|
|
801
811
|
}, "clear"));
|
|
802
|
-
f(this,
|
|
812
|
+
f(this, ge, /* @__PURE__ */ a((i) => {
|
|
803
813
|
var n;
|
|
804
814
|
Array.isArray(i) || (i = [i]);
|
|
805
815
|
const t = typeof ((n = e(this, A).fields) == null ? void 0 : n.get) == "function" ? e(this, A).fields.get() : Object.keys(i[0] || {}), s = [];
|
|
@@ -810,18 +820,18 @@ const k = class k {
|
|
|
810
820
|
}), s.push(o);
|
|
811
821
|
}), s;
|
|
812
822
|
}, "#json2Array"));
|
|
813
|
-
f(this,
|
|
814
|
-
t.__ng = e(this,
|
|
823
|
+
f(this, be, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
|
|
824
|
+
t.__ng = e(this, te).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = L.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
|
|
815
825
|
}), i), "#defaultInsert"));
|
|
816
826
|
x(this, "add", /* @__PURE__ */ a((i, t = !0) => {
|
|
817
827
|
var r;
|
|
818
828
|
i === void 0 && (i = {});
|
|
819
|
-
const s = e(this,
|
|
820
|
-
e(this, v).rawRecords = e(this, v).rawRecords.concat(e(this,
|
|
829
|
+
const s = e(this, ge).call(this, i);
|
|
830
|
+
e(this, v).rawRecords = e(this, v).rawRecords.concat(e(this, be).call(this, s)), this.resetRecords();
|
|
821
831
|
const n = this.count() - 1;
|
|
822
832
|
return t || s.forEach((o, c) => {
|
|
823
833
|
const d = e(this, v).rawRecords[n - c];
|
|
824
|
-
d && (d.__ng.rowState =
|
|
834
|
+
d && (d.__ng.rowState = L.ROW_STATE.EMPTY);
|
|
825
835
|
}), (r = e(this, v).viewRecords) != null && r.reset && e(this, v).viewRecords.reset(), n;
|
|
826
836
|
}, "add"));
|
|
827
837
|
x(this, "delete", /* @__PURE__ */ a((i) => {
|
|
@@ -830,8 +840,8 @@ const k = class k {
|
|
|
830
840
|
Array.isArray(i) ? t = i : typeof i > "u" ? t = [e(this, v).owner.row.at] : t = [parseInt(i, 10)], t.sort((n, r) => r - n).forEach((n) => {
|
|
831
841
|
if (e(this, q)[n]) {
|
|
832
842
|
const r = e(this, q)[n].__ng.rowid;
|
|
833
|
-
e(this, q)[n].__ng.rowState ===
|
|
834
|
-
o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState =
|
|
843
|
+
e(this, q)[n].__ng.rowState === L.ROW_STATE.INSERT ? e(this, v).rawRecords = e(this, v).rawRecords.filter((o) => o.__ng.rowid !== r) : e(this, v).rawRecords.forEach((o) => {
|
|
844
|
+
o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = L.ROW_STATE.DELETE);
|
|
835
845
|
});
|
|
836
846
|
}
|
|
837
847
|
}), this.resetRecords(), (s = e(this, v).viewRecords) != null && s.reset && e(this, v).viewRecords.reset();
|
|
@@ -844,10 +854,10 @@ const k = class k {
|
|
|
844
854
|
const o = this.getValidData()[i];
|
|
845
855
|
if (!o) return;
|
|
846
856
|
const c = o.v[r];
|
|
847
|
-
c !== s && o.__ng.rowState !==
|
|
857
|
+
c !== s && o.__ng.rowState !== L.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(t) || (o.__ng.o[t] = c), o.__ng.rowState = L.ROW_STATE.UPDATE), o.v[r] = s, e(this, v).owner.refreshData && e(this, v).owner.refreshData(i);
|
|
848
858
|
}, "setValue"));
|
|
849
859
|
x(this, "resetRecords", /* @__PURE__ */ a(() => {
|
|
850
|
-
|
|
860
|
+
y(this, K, e(this, v).rawRecords.filter((i) => !i.__ng.deleted)), y(this, q, e(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, v).rawRecords.forEach((i, t) => {
|
|
851
861
|
i.__ng.rowidx = t;
|
|
852
862
|
}), e(this, q).forEach((i, t) => {
|
|
853
863
|
i.__ng.i = t;
|
|
@@ -879,7 +889,7 @@ const k = class k {
|
|
|
879
889
|
}
|
|
880
890
|
return e(this, Z).call(this, s[i]);
|
|
881
891
|
}, "get"));
|
|
882
|
-
|
|
892
|
+
y(this, A, i), y(this, v, t), e(this, ue).call(this);
|
|
883
893
|
}
|
|
884
894
|
get source() {
|
|
885
895
|
return e(this, Z).call(this, e(this, v).rawRecords);
|
|
@@ -888,7 +898,7 @@ const k = class k {
|
|
|
888
898
|
this.clear(), this.add(i, !1);
|
|
889
899
|
}
|
|
890
900
|
get nextId() {
|
|
891
|
-
return ++
|
|
901
|
+
return ++ze(this, fe)._;
|
|
892
902
|
}
|
|
893
903
|
get length() {
|
|
894
904
|
return e(this, q).length;
|
|
@@ -897,18 +907,18 @@ const k = class k {
|
|
|
897
907
|
return this.length;
|
|
898
908
|
}
|
|
899
909
|
};
|
|
900
|
-
A = new WeakMap(), v = new WeakMap(), q = new WeakMap(), K = new WeakMap(),
|
|
901
|
-
x(
|
|
910
|
+
A = new WeakMap(), v = new WeakMap(), q = new WeakMap(), K = new WeakMap(), fe = new WeakMap(), O = new WeakMap(), ue = new WeakMap(), te = new WeakMap(), ge = new WeakMap(), be = new WeakMap(), Z = new WeakMap(), a(L, "ngData"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
911
|
+
x(L, "ROW_STATE", {
|
|
902
912
|
EMPTY: "EMPTY",
|
|
903
913
|
NORMAL: "NORMAL",
|
|
904
914
|
INSERT: "INSERT",
|
|
905
915
|
UPDATE: "UPDATE",
|
|
906
916
|
DELETE: "DELETE"
|
|
907
917
|
});
|
|
908
|
-
let Re =
|
|
909
|
-
const
|
|
918
|
+
let Re = L;
|
|
919
|
+
const He = class He {
|
|
910
920
|
constructor(i) {
|
|
911
|
-
this.owner = i, this.row = new
|
|
921
|
+
this.owner = i, this.row = new Se(this), this.data = new Re(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
|
|
912
922
|
var t;
|
|
913
923
|
(t = this.owner.view) != null && t.redraw && this.owner.view.redraw();
|
|
914
924
|
}, this.setDataSource = (t) => {
|
|
@@ -925,37 +935,37 @@ const _e = class _e {
|
|
|
925
935
|
}, this.setDataSource([]);
|
|
926
936
|
}
|
|
927
937
|
};
|
|
928
|
-
a(
|
|
929
|
-
let
|
|
930
|
-
var
|
|
931
|
-
const
|
|
938
|
+
a(He, "ngDataManager");
|
|
939
|
+
let Ee = He;
|
|
940
|
+
var F, ye;
|
|
941
|
+
const Me = class Me extends HTMLElement {
|
|
932
942
|
constructor() {
|
|
933
943
|
super();
|
|
934
944
|
//#created = false;
|
|
935
|
-
f(this,
|
|
936
|
-
f(this,
|
|
937
|
-
this.attachShadow({ mode: "open" }),
|
|
945
|
+
f(this, F);
|
|
946
|
+
f(this, ye);
|
|
947
|
+
this.attachShadow({ mode: "open" }), y(this, F, new Ee(this));
|
|
938
948
|
}
|
|
939
949
|
connectedCallback() {
|
|
940
|
-
|
|
950
|
+
y(this, ye, new xe(this)), j.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
941
951
|
}
|
|
942
952
|
disconnectedCallback() {
|
|
943
|
-
|
|
953
|
+
j.log("NineTable disconnected.");
|
|
944
954
|
}
|
|
945
955
|
// π― μΈλΆμμ grid.data.set(...) ννλ‘ μ κ·Όν μ μλλ‘ λ°μ΄ν° λ§€λμ μ€ν
|
|
946
956
|
get data() {
|
|
947
|
-
return e(this,
|
|
957
|
+
return e(this, F).data;
|
|
948
958
|
}
|
|
949
959
|
// π― ν(row) κ΄λ ¨ μ μ΄ μ κ·Όμ μ€ν
|
|
950
960
|
get row() {
|
|
951
|
-
return e(this,
|
|
961
|
+
return e(this, F).row;
|
|
952
962
|
}
|
|
953
963
|
// π― μ 체 λ°μ΄ν° λ§€λμ μ κ·Ό νμν κ²½μ°
|
|
954
964
|
get dataManager() {
|
|
955
|
-
return e(this,
|
|
965
|
+
return e(this, F);
|
|
956
966
|
}
|
|
957
967
|
};
|
|
958
|
-
|
|
959
|
-
let
|
|
960
|
-
customElements.get("nine-table") || customElements.define("nine-table",
|
|
968
|
+
F = new WeakMap(), ye = new WeakMap(), a(Me, "NineTable");
|
|
969
|
+
let Te = Me;
|
|
970
|
+
customElements.get("nine-table") || customElements.define("nine-table", Te);
|
|
961
971
|
//# sourceMappingURL=nine-table.js.map
|