@guiexpert/solid-table 1.0.12 → 1.0.13
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/GuiexpertTable.d.ts +6 -0
- package/GuiexpertTableProps.d.ts +1 -0
- package/index.cjs +3 -3
- package/index.js +293 -229
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
const
|
|
2
|
-
equals:
|
|
1
|
+
const xe = (l, e) => l === e, J = Symbol("solid-proxy"), he = {
|
|
2
|
+
equals: xe
|
|
3
3
|
};
|
|
4
|
-
let
|
|
5
|
-
const L = 1,
|
|
4
|
+
let pe = Se;
|
|
5
|
+
const L = 1, N = 2, fe = {
|
|
6
6
|
owned: null,
|
|
7
7
|
cleanups: null,
|
|
8
8
|
context: null,
|
|
9
9
|
owner: null
|
|
10
10
|
};
|
|
11
11
|
var A = null;
|
|
12
|
-
let
|
|
13
|
-
function
|
|
14
|
-
const t = b, s = A, i = l.length === 0, o = e === void 0 ? s : e, r = i ?
|
|
12
|
+
let U = null, b = null, x = null, F = null, K = 0;
|
|
13
|
+
function Ee(l, e) {
|
|
14
|
+
const t = b, s = A, i = l.length === 0, o = e === void 0 ? s : e, r = i ? fe : {
|
|
15
15
|
owned: null,
|
|
16
16
|
cleanups: null,
|
|
17
17
|
context: o ? o.context : null,
|
|
18
18
|
owner: o
|
|
19
|
-
}, n = i ? l : () => l(() =>
|
|
19
|
+
}, n = i ? l : () => l(() => W(() => z(r)));
|
|
20
20
|
A = r, b = null;
|
|
21
21
|
try {
|
|
22
|
-
return
|
|
22
|
+
return V(n, !0);
|
|
23
23
|
} finally {
|
|
24
24
|
b = t, A = s;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
const s =
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
function Ee(l, e, t) {
|
|
32
|
-
ue = Oe;
|
|
33
|
-
const s = te(l, e, !1, L);
|
|
34
|
-
(!t || !t.render) && (s.user = !0), F ? F.push(s) : W(s);
|
|
27
|
+
function Q(l, e, t) {
|
|
28
|
+
const s = se(l, e, !1, L);
|
|
29
|
+
H(s);
|
|
35
30
|
}
|
|
36
31
|
function Ae(l, e, t) {
|
|
37
|
-
|
|
38
|
-
const s =
|
|
39
|
-
|
|
32
|
+
pe = Fe;
|
|
33
|
+
const s = se(l, e, !1, L);
|
|
34
|
+
(!t || !t.render) && (s.user = !0), F ? F.push(s) : H(s);
|
|
35
|
+
}
|
|
36
|
+
function Me(l, e, t) {
|
|
37
|
+
t = t ? Object.assign({}, he, t) : he;
|
|
38
|
+
const s = se(l, e, !0, 0);
|
|
39
|
+
return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, H(s), Te.bind(s);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function W(l) {
|
|
42
42
|
if (b === null)
|
|
43
43
|
return l();
|
|
44
44
|
const e = b;
|
|
@@ -49,16 +49,16 @@ function P(l) {
|
|
|
49
49
|
b = e;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
|
|
52
|
+
function Re(l) {
|
|
53
|
+
Ae(() => W(l));
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Te() {
|
|
56
56
|
if (this.sources && this.state)
|
|
57
57
|
if (this.state === L)
|
|
58
|
-
|
|
58
|
+
H(this);
|
|
59
59
|
else {
|
|
60
60
|
const l = x;
|
|
61
|
-
x = null,
|
|
61
|
+
x = null, V(() => j(this), !1), x = l;
|
|
62
62
|
}
|
|
63
63
|
if (b) {
|
|
64
64
|
const l = this.observers ? this.observers.length : 0;
|
|
@@ -66,34 +66,42 @@ function Re() {
|
|
|
66
66
|
}
|
|
67
67
|
return this.value;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function De(l, e, t) {
|
|
70
70
|
let s = l.value;
|
|
71
|
-
return (!l.comparator || !l.comparator(s, e)) && (l.value = e, l.observers && l.observers.length &&
|
|
71
|
+
return (!l.comparator || !l.comparator(s, e)) && (l.value = e, l.observers && l.observers.length && V(() => {
|
|
72
72
|
for (let i = 0; i < l.observers.length; i += 1) {
|
|
73
|
-
const o = l.observers[i], r =
|
|
74
|
-
r &&
|
|
73
|
+
const o = l.observers[i], r = U && U.running;
|
|
74
|
+
r && U.disposed.has(o), (r ? !o.tState : !o.state) && (o.pure ? x.push(o) : F.push(o), o.observers && ge(o)), r || (o.state = L);
|
|
75
75
|
}
|
|
76
76
|
if (x.length > 1e6)
|
|
77
77
|
throw x = [], new Error();
|
|
78
78
|
}, !1)), e;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function H(l) {
|
|
81
81
|
if (!l.fn)
|
|
82
82
|
return;
|
|
83
|
-
|
|
84
|
-
const e =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
z(l);
|
|
84
|
+
const e = K;
|
|
85
|
+
Ie(
|
|
86
|
+
l,
|
|
87
|
+
l.value,
|
|
88
|
+
e
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
function Ie(l, e, t) {
|
|
88
92
|
let s;
|
|
93
|
+
const i = A, o = b;
|
|
94
|
+
b = A = l;
|
|
89
95
|
try {
|
|
90
96
|
s = l.fn(e);
|
|
91
|
-
} catch (
|
|
92
|
-
return l.pure && (l.state = L, l.owned && l.owned.forEach(
|
|
97
|
+
} catch (r) {
|
|
98
|
+
return l.pure && (l.state = L, l.owned && l.owned.forEach(z), l.owned = null), l.updatedAt = t + 1, me(r);
|
|
99
|
+
} finally {
|
|
100
|
+
b = o, A = i;
|
|
93
101
|
}
|
|
94
|
-
(!l.updatedAt || l.updatedAt <= t) && (l.updatedAt != null && "observers" in l ?
|
|
102
|
+
(!l.updatedAt || l.updatedAt <= t) && (l.updatedAt != null && "observers" in l ? De(l, s) : l.value = s, l.updatedAt = t);
|
|
95
103
|
}
|
|
96
|
-
function
|
|
104
|
+
function se(l, e, t, s = L, i) {
|
|
97
105
|
const o = {
|
|
98
106
|
fn: l,
|
|
99
107
|
state: s,
|
|
@@ -107,74 +115,74 @@ function te(l, e, t, s = L, i) {
|
|
|
107
115
|
context: A ? A.context : null,
|
|
108
116
|
pure: t
|
|
109
117
|
};
|
|
110
|
-
return A === null || A !==
|
|
118
|
+
return A === null || A !== fe && (A.owned ? A.owned.push(o) : A.owned = [o]), o;
|
|
111
119
|
}
|
|
112
|
-
function
|
|
120
|
+
function _(l) {
|
|
113
121
|
if (l.state === 0)
|
|
114
122
|
return;
|
|
115
|
-
if (l.state ===
|
|
116
|
-
return
|
|
117
|
-
if (l.suspense &&
|
|
123
|
+
if (l.state === N)
|
|
124
|
+
return j(l);
|
|
125
|
+
if (l.suspense && W(l.suspense.inFallback))
|
|
118
126
|
return l.suspense.effects.push(l);
|
|
119
127
|
const e = [l];
|
|
120
|
-
for (; (l = l.owner) && (!l.updatedAt || l.updatedAt <
|
|
128
|
+
for (; (l = l.owner) && (!l.updatedAt || l.updatedAt < K); )
|
|
121
129
|
l.state && e.push(l);
|
|
122
130
|
for (let t = e.length - 1; t >= 0; t--)
|
|
123
131
|
if (l = e[t], l.state === L)
|
|
124
|
-
|
|
125
|
-
else if (l.state ===
|
|
132
|
+
H(l);
|
|
133
|
+
else if (l.state === N) {
|
|
126
134
|
const s = x;
|
|
127
|
-
x = null,
|
|
135
|
+
x = null, V(() => j(l, e[0]), !1), x = s;
|
|
128
136
|
}
|
|
129
137
|
}
|
|
130
|
-
function
|
|
138
|
+
function V(l, e) {
|
|
131
139
|
if (x)
|
|
132
140
|
return l();
|
|
133
141
|
let t = !1;
|
|
134
|
-
e || (x = []), F ? t = !0 : F = [],
|
|
142
|
+
e || (x = []), F ? t = !0 : F = [], K++;
|
|
135
143
|
try {
|
|
136
144
|
const s = l();
|
|
137
|
-
return
|
|
145
|
+
return Oe(t), s;
|
|
138
146
|
} catch (s) {
|
|
139
|
-
t || (F = null), x = null,
|
|
147
|
+
t || (F = null), x = null, me(s);
|
|
140
148
|
}
|
|
141
149
|
}
|
|
142
|
-
function
|
|
143
|
-
if (x && (
|
|
150
|
+
function Oe(l) {
|
|
151
|
+
if (x && (Se(x), x = null), l)
|
|
144
152
|
return;
|
|
145
153
|
const e = F;
|
|
146
|
-
F = null, e.length &&
|
|
154
|
+
F = null, e.length && V(() => pe(e), !1);
|
|
147
155
|
}
|
|
148
|
-
function
|
|
156
|
+
function Se(l) {
|
|
149
157
|
for (let e = 0; e < l.length; e++)
|
|
150
|
-
|
|
158
|
+
_(l[e]);
|
|
151
159
|
}
|
|
152
|
-
function
|
|
160
|
+
function Fe(l) {
|
|
153
161
|
let e, t = 0;
|
|
154
162
|
for (e = 0; e < l.length; e++) {
|
|
155
163
|
const s = l[e];
|
|
156
|
-
s.user ? l[t++] = s :
|
|
164
|
+
s.user ? l[t++] = s : _(s);
|
|
157
165
|
}
|
|
158
166
|
for (e = 0; e < t; e++)
|
|
159
|
-
|
|
167
|
+
_(l[e]);
|
|
160
168
|
}
|
|
161
|
-
function
|
|
169
|
+
function j(l, e) {
|
|
162
170
|
l.state = 0;
|
|
163
171
|
for (let t = 0; t < l.sources.length; t += 1) {
|
|
164
172
|
const s = l.sources[t];
|
|
165
173
|
if (s.sources) {
|
|
166
174
|
const i = s.state;
|
|
167
|
-
i === L ? s !== e && (!s.updatedAt || s.updatedAt <
|
|
175
|
+
i === L ? s !== e && (!s.updatedAt || s.updatedAt < K) && _(s) : i === N && j(s, e);
|
|
168
176
|
}
|
|
169
177
|
}
|
|
170
178
|
}
|
|
171
|
-
function
|
|
179
|
+
function ge(l) {
|
|
172
180
|
for (let e = 0; e < l.observers.length; e += 1) {
|
|
173
181
|
const t = l.observers[e];
|
|
174
|
-
t.state || (t.state =
|
|
182
|
+
t.state || (t.state = N, t.pure ? x.push(t) : F.push(t), t.observers && ge(t));
|
|
175
183
|
}
|
|
176
184
|
}
|
|
177
|
-
function
|
|
185
|
+
function z(l) {
|
|
178
186
|
let e;
|
|
179
187
|
if (l.sources)
|
|
180
188
|
for (; l.sources.length; ) {
|
|
@@ -186,7 +194,7 @@ function K(l) {
|
|
|
186
194
|
}
|
|
187
195
|
if (l.owned) {
|
|
188
196
|
for (e = l.owned.length - 1; e >= 0; e--)
|
|
189
|
-
|
|
197
|
+
z(l.owned[e]);
|
|
190
198
|
l.owned = null;
|
|
191
199
|
}
|
|
192
200
|
if (l.cleanups) {
|
|
@@ -196,26 +204,26 @@ function K(l) {
|
|
|
196
204
|
}
|
|
197
205
|
l.state = 0;
|
|
198
206
|
}
|
|
199
|
-
function
|
|
207
|
+
function Le(l) {
|
|
200
208
|
return l instanceof Error ? l : new Error(typeof l == "string" ? l : "Unknown error", {
|
|
201
209
|
cause: l
|
|
202
210
|
});
|
|
203
211
|
}
|
|
204
|
-
function
|
|
205
|
-
throw
|
|
212
|
+
function me(l, e = A) {
|
|
213
|
+
throw Le(l);
|
|
206
214
|
}
|
|
207
|
-
function
|
|
215
|
+
function k() {
|
|
208
216
|
return !0;
|
|
209
217
|
}
|
|
210
|
-
const
|
|
218
|
+
const $e = {
|
|
211
219
|
get(l, e, t) {
|
|
212
|
-
return e ===
|
|
220
|
+
return e === J ? t : l.get(e);
|
|
213
221
|
},
|
|
214
222
|
has(l, e) {
|
|
215
|
-
return e ===
|
|
223
|
+
return e === J ? !0 : l.has(e);
|
|
216
224
|
},
|
|
217
|
-
set:
|
|
218
|
-
deleteProperty:
|
|
225
|
+
set: k,
|
|
226
|
+
deleteProperty: k,
|
|
219
227
|
getOwnPropertyDescriptor(l, e) {
|
|
220
228
|
return {
|
|
221
229
|
configurable: !0,
|
|
@@ -223,52 +231,55 @@ const Le = {
|
|
|
223
231
|
get() {
|
|
224
232
|
return l.get(e);
|
|
225
233
|
},
|
|
226
|
-
set:
|
|
227
|
-
deleteProperty:
|
|
234
|
+
set: k,
|
|
235
|
+
deleteProperty: k
|
|
228
236
|
};
|
|
229
237
|
},
|
|
230
238
|
ownKeys(l) {
|
|
231
239
|
return l.keys();
|
|
232
240
|
}
|
|
233
241
|
};
|
|
234
|
-
function
|
|
242
|
+
function q(l) {
|
|
235
243
|
return (l = typeof l == "function" ? l() : l) ? l : {};
|
|
236
244
|
}
|
|
237
|
-
function
|
|
245
|
+
function Be() {
|
|
238
246
|
for (let l = 0, e = this.length; l < e; ++l) {
|
|
239
247
|
const t = this[l]();
|
|
240
248
|
if (t !== void 0)
|
|
241
249
|
return t;
|
|
242
250
|
}
|
|
243
251
|
}
|
|
244
|
-
function
|
|
252
|
+
function be(...l) {
|
|
245
253
|
let e = !1;
|
|
246
254
|
for (let o = 0; o < l.length; o++) {
|
|
247
255
|
const r = l[o];
|
|
248
|
-
e = e || !!r &&
|
|
256
|
+
e = e || !!r && J in r, l[o] = typeof r == "function" ? (e = !0, Me(r)) : r;
|
|
249
257
|
}
|
|
250
258
|
if (e)
|
|
251
|
-
return new Proxy(
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
259
|
+
return new Proxy(
|
|
260
|
+
{
|
|
261
|
+
get(o) {
|
|
262
|
+
for (let r = l.length - 1; r >= 0; r--) {
|
|
263
|
+
const n = q(l[r])[o];
|
|
264
|
+
if (n !== void 0)
|
|
265
|
+
return n;
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
has(o) {
|
|
269
|
+
for (let r = l.length - 1; r >= 0; r--)
|
|
270
|
+
if (o in q(l[r]))
|
|
271
|
+
return !0;
|
|
272
|
+
return !1;
|
|
273
|
+
},
|
|
274
|
+
keys() {
|
|
275
|
+
const o = [];
|
|
276
|
+
for (let r = 0; r < l.length; r++)
|
|
277
|
+
o.push(...Object.keys(q(l[r])));
|
|
278
|
+
return [...new Set(o)];
|
|
257
279
|
}
|
|
258
280
|
},
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
if (o in U(l[r]))
|
|
262
|
-
return !0;
|
|
263
|
-
return !1;
|
|
264
|
-
},
|
|
265
|
-
keys() {
|
|
266
|
-
const o = [];
|
|
267
|
-
for (let r = 0; r < l.length; r++)
|
|
268
|
-
o.push(...Object.keys(U(l[r])));
|
|
269
|
-
return [...new Set(o)];
|
|
270
|
-
}
|
|
271
|
-
}, Le);
|
|
281
|
+
$e
|
|
282
|
+
);
|
|
272
283
|
const t = {}, s = {}, i = /* @__PURE__ */ new Set();
|
|
273
284
|
for (let o = l.length - 1; o >= 0; o--) {
|
|
274
285
|
const r = l[o];
|
|
@@ -284,7 +295,7 @@ function me(...l) {
|
|
|
284
295
|
c.get ? (i.add(d), Object.defineProperty(t, d, {
|
|
285
296
|
enumerable: !0,
|
|
286
297
|
configurable: !0,
|
|
287
|
-
get:
|
|
298
|
+
get: Be.bind(s[d] = [c.get.bind(r)])
|
|
288
299
|
})) : (c.value !== void 0 && i.add(d), t[d] = c.value);
|
|
289
300
|
else {
|
|
290
301
|
const p = s[d];
|
|
@@ -294,7 +305,7 @@ function me(...l) {
|
|
|
294
305
|
}
|
|
295
306
|
return t;
|
|
296
307
|
}
|
|
297
|
-
function
|
|
308
|
+
function Pe(l, e, t) {
|
|
298
309
|
let s = t.length, i = e.length, o = s, r = 0, n = 0, a = e[i - 1].nextSibling, h = null;
|
|
299
310
|
for (; r < i || n < o; ) {
|
|
300
311
|
if (e[r] === t[n]) {
|
|
@@ -339,31 +350,31 @@ function Be(l, e, t) {
|
|
|
339
350
|
}
|
|
340
351
|
}
|
|
341
352
|
}
|
|
342
|
-
function
|
|
353
|
+
function We(l, e, t, s = {}) {
|
|
343
354
|
let i;
|
|
344
|
-
return
|
|
345
|
-
i = o, e === document ? l() :
|
|
355
|
+
return Ee((o) => {
|
|
356
|
+
i = o, e === document ? l() : Ge(e, l(), e.firstChild ? null : void 0, t);
|
|
346
357
|
}, s.owner), () => {
|
|
347
358
|
i(), e.textContent = "";
|
|
348
359
|
};
|
|
349
360
|
}
|
|
350
|
-
function
|
|
361
|
+
function He(l, e, t) {
|
|
351
362
|
let s;
|
|
352
363
|
const i = () => {
|
|
353
364
|
const r = document.createElement("template");
|
|
354
365
|
return r.innerHTML = l, t ? r.content.firstChild.firstChild : r.content.firstChild;
|
|
355
|
-
}, o = e ? () =>
|
|
366
|
+
}, o = e ? () => W(() => document.importNode(s || (s = i()), !0)) : () => (s || (s = i())).cloneNode(!0);
|
|
356
367
|
return o.cloneNode = o, o;
|
|
357
368
|
}
|
|
358
|
-
function
|
|
359
|
-
return
|
|
369
|
+
function Ve(l, e, t) {
|
|
370
|
+
return W(() => l(e, t));
|
|
360
371
|
}
|
|
361
|
-
function
|
|
372
|
+
function Ge(l, e, t, s) {
|
|
362
373
|
if (t !== void 0 && !s && (s = []), typeof e != "function")
|
|
363
|
-
return
|
|
364
|
-
|
|
374
|
+
return X(l, e, s, t);
|
|
375
|
+
Q((i) => X(l, e(), i, t), s);
|
|
365
376
|
}
|
|
366
|
-
function
|
|
377
|
+
function X(l, e, t, s, i) {
|
|
367
378
|
for (; typeof t == "function"; )
|
|
368
379
|
t = t();
|
|
369
380
|
if (e === t)
|
|
@@ -372,34 +383,34 @@ function j(l, e, t, s, i) {
|
|
|
372
383
|
if (l = r && t[0] && t[0].parentNode || l, o === "string" || o === "number")
|
|
373
384
|
if (o === "number" && (e = e.toString()), r) {
|
|
374
385
|
let n = t[0];
|
|
375
|
-
n && n.nodeType === 3 ? n.data = e : n = document.createTextNode(e), t =
|
|
386
|
+
n && n.nodeType === 3 ? n.data = e : n = document.createTextNode(e), t = P(l, t, s, n);
|
|
376
387
|
} else
|
|
377
388
|
t !== "" && typeof t == "string" ? t = l.firstChild.data = e : t = l.textContent = e;
|
|
378
389
|
else if (e == null || o === "boolean")
|
|
379
|
-
t =
|
|
390
|
+
t = P(l, t, s);
|
|
380
391
|
else {
|
|
381
392
|
if (o === "function")
|
|
382
|
-
return
|
|
393
|
+
return Q(() => {
|
|
383
394
|
let n = e();
|
|
384
395
|
for (; typeof n == "function"; )
|
|
385
396
|
n = n();
|
|
386
|
-
t =
|
|
397
|
+
t = X(l, n, t, s);
|
|
387
398
|
}), () => t;
|
|
388
399
|
if (Array.isArray(e)) {
|
|
389
400
|
const n = [], a = t && Array.isArray(t);
|
|
390
|
-
if (
|
|
391
|
-
return
|
|
401
|
+
if (Z(n, e, t, i))
|
|
402
|
+
return Q(() => t = X(l, n, t, s, !0)), () => t;
|
|
392
403
|
if (n.length === 0) {
|
|
393
|
-
if (t =
|
|
404
|
+
if (t = P(l, t, s), r)
|
|
394
405
|
return t;
|
|
395
406
|
} else
|
|
396
|
-
a ? t.length === 0 ?
|
|
407
|
+
a ? t.length === 0 ? ce(l, n, s) : Pe(l, t, n) : (t && P(l), ce(l, n));
|
|
397
408
|
t = n;
|
|
398
409
|
} else if (e.nodeType) {
|
|
399
410
|
if (Array.isArray(t)) {
|
|
400
411
|
if (r)
|
|
401
|
-
return t =
|
|
402
|
-
|
|
412
|
+
return t = P(l, t, s, e);
|
|
413
|
+
P(l, t, null, e);
|
|
403
414
|
} else
|
|
404
415
|
t == null || t === "" || !l.firstChild ? l.appendChild(e) : l.replaceChild(e, l.firstChild);
|
|
405
416
|
t = e;
|
|
@@ -407,7 +418,7 @@ function j(l, e, t, s, i) {
|
|
|
407
418
|
}
|
|
408
419
|
return t;
|
|
409
420
|
}
|
|
410
|
-
function
|
|
421
|
+
function Z(l, e, t, s) {
|
|
411
422
|
let i = !1;
|
|
412
423
|
for (let o = 0, r = e.length; o < r; o++) {
|
|
413
424
|
let n = e[o], a = t && t[o], h;
|
|
@@ -415,12 +426,16 @@ function Q(l, e, t, s) {
|
|
|
415
426
|
if ((h = typeof n) == "object" && n.nodeType)
|
|
416
427
|
l.push(n);
|
|
417
428
|
else if (Array.isArray(n))
|
|
418
|
-
i =
|
|
429
|
+
i = Z(l, n, a) || i;
|
|
419
430
|
else if (h === "function")
|
|
420
431
|
if (s) {
|
|
421
432
|
for (; typeof n == "function"; )
|
|
422
433
|
n = n();
|
|
423
|
-
i =
|
|
434
|
+
i = Z(
|
|
435
|
+
l,
|
|
436
|
+
Array.isArray(n) ? n : [n],
|
|
437
|
+
Array.isArray(a) ? a : [a]
|
|
438
|
+
) || i;
|
|
424
439
|
} else
|
|
425
440
|
l.push(n), i = !0;
|
|
426
441
|
else {
|
|
@@ -430,11 +445,11 @@ function Q(l, e, t, s) {
|
|
|
430
445
|
}
|
|
431
446
|
return i;
|
|
432
447
|
}
|
|
433
|
-
function
|
|
448
|
+
function ce(l, e, t = null) {
|
|
434
449
|
for (let s = 0, i = e.length; s < i; s++)
|
|
435
450
|
l.insertBefore(e[s], t);
|
|
436
451
|
}
|
|
437
|
-
function
|
|
452
|
+
function P(l, e, t, s) {
|
|
438
453
|
if (t === void 0)
|
|
439
454
|
return l.textContent = "";
|
|
440
455
|
const i = s || document.createTextNode("");
|
|
@@ -452,39 +467,64 @@ function B(l, e, t, s) {
|
|
|
452
467
|
l.insertBefore(i, t);
|
|
453
468
|
return [i];
|
|
454
469
|
}
|
|
455
|
-
class
|
|
470
|
+
class ut {
|
|
456
471
|
constructor(e) {
|
|
457
472
|
this.code = e;
|
|
458
473
|
}
|
|
459
474
|
render(e, t, s, i, o, r, n) {
|
|
460
|
-
const a =
|
|
475
|
+
const a = be({
|
|
461
476
|
rowIndex: t,
|
|
462
477
|
columnIndex: s,
|
|
463
478
|
areaIdent: i,
|
|
464
479
|
areaModel: o,
|
|
465
480
|
cellValue: r
|
|
466
481
|
});
|
|
467
|
-
|
|
482
|
+
We(
|
|
468
483
|
() => this.code(a),
|
|
469
484
|
e
|
|
470
485
|
);
|
|
471
486
|
}
|
|
472
487
|
}
|
|
473
|
-
const
|
|
488
|
+
const pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
474
489
|
__proto__: null
|
|
475
490
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
476
|
-
|
|
477
|
-
|
|
491
|
+
class $ {
|
|
492
|
+
// The constructor is private to prevent direct construction calls
|
|
493
|
+
// with the `new` operator
|
|
494
|
+
constructor() {
|
|
495
|
+
this.alreadySet = !1;
|
|
496
|
+
}
|
|
497
|
+
static getInstance() {
|
|
498
|
+
return $.instance || ($.instance = new $()), $.instance;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Method to set the license key for the application.
|
|
502
|
+
* A 'meta' element is created with content as 'guiexperttable=<license key>'
|
|
503
|
+
* and appended into the head section of the document
|
|
504
|
+
*
|
|
505
|
+
* @param {string} key - The license key to set for the application.
|
|
506
|
+
*
|
|
507
|
+
* @return {void} - This method does not return anything
|
|
508
|
+
*/
|
|
509
|
+
setLicenseKey(e) {
|
|
510
|
+
if (e && !this.alreadySet) {
|
|
511
|
+
const t = document.createElement("meta");
|
|
512
|
+
t.content = "license=" + e, t.name = "guiexperttable", document.getElementsByTagName("head")[0].appendChild(t), this.alreadySet = !0;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
478
515
|
}
|
|
479
516
|
function ee(l) {
|
|
517
|
+
return l && l.type === "TreeRow";
|
|
518
|
+
}
|
|
519
|
+
function te(l) {
|
|
480
520
|
return l && l.type === "AreaModelTree";
|
|
481
521
|
}
|
|
482
|
-
class
|
|
522
|
+
class ie {
|
|
483
523
|
constructor(e = -1, t = -1, s = -1, i = -1, o, r, n, a = 0, h = 0, d = 0, c = "") {
|
|
484
524
|
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = i, this.areaIdent = o, this.sideIdent = r, this.originalEvent = n, this.clickCount = a, this.draggingX = h, this.draggingY = d, this.action = c;
|
|
485
525
|
}
|
|
486
526
|
clone() {
|
|
487
|
-
return new
|
|
527
|
+
return new ie(
|
|
488
528
|
this.rowIndex,
|
|
489
529
|
this.rowTop,
|
|
490
530
|
this.columnIndex,
|
|
@@ -499,25 +539,25 @@ class se {
|
|
|
499
539
|
);
|
|
500
540
|
}
|
|
501
541
|
}
|
|
502
|
-
class
|
|
542
|
+
class B {
|
|
503
543
|
constructor(e = ">", t = "", s = []) {
|
|
504
544
|
this.content = e, this.style = t, this.classes = s;
|
|
505
545
|
}
|
|
506
546
|
}
|
|
507
|
-
class
|
|
508
|
-
constructor(e = new
|
|
547
|
+
class ye {
|
|
548
|
+
constructor(e = new B(
|
|
509
549
|
">",
|
|
510
550
|
"transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
|
|
511
551
|
["gt-table-tree-arrow-expanded"]
|
|
512
|
-
), t = new
|
|
552
|
+
), t = new B(
|
|
513
553
|
">",
|
|
514
554
|
"",
|
|
515
555
|
["ge-table-tree-arrow-collapsed"]
|
|
516
|
-
), s = new
|
|
556
|
+
), s = new B(
|
|
517
557
|
">",
|
|
518
558
|
"color:transparent;",
|
|
519
559
|
["gt-table-tree-arrow-hidden"]
|
|
520
|
-
), i = new
|
|
560
|
+
), i = new B(
|
|
521
561
|
"↕",
|
|
522
562
|
"",
|
|
523
563
|
["gt-table-tree-arrow-expanded-all"]
|
|
@@ -525,12 +565,12 @@ class be {
|
|
|
525
565
|
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = i;
|
|
526
566
|
}
|
|
527
567
|
}
|
|
528
|
-
class
|
|
529
|
-
constructor(e = new
|
|
568
|
+
class ve {
|
|
569
|
+
constructor(e = new B("↑", "", ["ge-header-sorted-asc"]), t = new B("↓", "", ["ge-header-sorted-desc"]), s = new B("↑", "color:transparent;", [])) {
|
|
530
570
|
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
|
|
531
571
|
}
|
|
532
572
|
}
|
|
533
|
-
class
|
|
573
|
+
class ke {
|
|
534
574
|
constructor(e) {
|
|
535
575
|
this.domService = e;
|
|
536
576
|
}
|
|
@@ -650,7 +690,7 @@ class _e {
|
|
|
650
690
|
}
|
|
651
691
|
return this.domService.appendChild(e, n), n;
|
|
652
692
|
}
|
|
653
|
-
addSortedIcon(e, t = "", s = new
|
|
693
|
+
addSortedIcon(e, t = "", s = new ve(), i = -1) {
|
|
654
694
|
const o = this.domService.createElement("div");
|
|
655
695
|
this.domService.addClass(o, "ge-table-sorted-icon-div"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "top", "0"), this.domService.setStyle(o, "right", "0"), this.domService.setStyle(o, "width", "20px"), this.domService.setStyle(o, "background", "transparent"), this.domService.setStyle(o, "cursor", "pointer"), this.domService.setAttribute(o, "data-col-index", `${i}`), this.domService.setAttribute(o, "data-area", "header");
|
|
656
696
|
let r;
|
|
@@ -661,7 +701,7 @@ class _e {
|
|
|
661
701
|
this.domService.addClass(o, h);
|
|
662
702
|
return this.domService.appendChild(e, o), o;
|
|
663
703
|
}
|
|
664
|
-
addArrowDiv(e, t = "none", s = new
|
|
704
|
+
addArrowDiv(e, t = "none", s = new ye(), i = -1, o = -1, r = "body") {
|
|
665
705
|
const n = this.domService.createElement("div");
|
|
666
706
|
this.domService.addClass(n, "ge-table-tree-arrow-div"), this.domService.setStyle(n, "display", "inline-block"), this.domService.setStyle(n, "position", ""), this.domService.setStyle(n, "width", "20px"), this.domService.setStyle(n, "background", "transparent"), this.domService.setStyle(n, "cursor", "pointer"), this.domService.setAttribute(n, "data-row-index", `${i}`), this.domService.setAttribute(n, "data-col-index", `${o}`), this.domService.setAttribute(n, "data-area", `${r}`);
|
|
667
707
|
let a;
|
|
@@ -711,20 +751,20 @@ class _e {
|
|
|
711
751
|
return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
|
|
712
752
|
}
|
|
713
753
|
}
|
|
714
|
-
const
|
|
715
|
-
class
|
|
754
|
+
const oe = (l) => l === "header" ? "header" : l === "footer" ? "footer" : "body";
|
|
755
|
+
class Ne {
|
|
716
756
|
constructor(e, t) {
|
|
717
757
|
if (this.rowIdx = -1, this.colIdx = -1, this.action = null, this.inputType = null, this.className = "", e !== null && (e instanceof HTMLDivElement || e instanceof HTMLSpanElement || e instanceof HTMLInputElement)) {
|
|
718
758
|
this.className = e.className, this.action = e.getAttribute("data-ge-action"), this.inputType = e.getAttribute("data-input-type"), this.rowIdx = Number(e.getAttribute("data-row-index")), this.colIdx = Number(e.getAttribute("data-col-index"));
|
|
719
759
|
const s = e.getAttribute("data-area");
|
|
720
|
-
if (s && (this.areaIdent =
|
|
760
|
+
if (s && (this.areaIdent = oe(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
|
|
721
761
|
const i = e;
|
|
722
762
|
this.value = i.value;
|
|
723
763
|
}
|
|
724
764
|
}
|
|
725
765
|
}
|
|
726
766
|
}
|
|
727
|
-
class
|
|
767
|
+
class _e {
|
|
728
768
|
constructor(e) {
|
|
729
769
|
this.tableScope = e, this.expandedAll = !0, this.mouseDown = !1, this.dragging = !1, this.tableScope.hostElement.addEventListener("click", this.onHostElementClicked.bind(this)), this.tableScope.hostElement.addEventListener("dblclick", this.onHostElementDblClicked.bind(this)), this.tableScope.hostElement.addEventListener("mousedown", this.onMouseDown.bind(this)), this.tableScope.hostElement.addEventListener("mousemove", this.onMouseMove.bind(this)), this.tableScope.hostElement.addEventListener("mouseup", this.onMouseUp.bind(this)), this.tableScope.hostElement.addEventListener("contextmenu", this.onContextmenu.bind(this)), this.tableScope.hostElement._MouseHandler = "true", this.tableScope.scrollViewport.addEventListener("scroll", this.tableScope.adjustAfterScrolling.bind(this.tableScope)), [window, this.tableScope.hostElement].forEach(
|
|
730
770
|
(t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
|
|
@@ -750,12 +790,12 @@ class Ge {
|
|
|
750
790
|
* @return {void}
|
|
751
791
|
*/
|
|
752
792
|
onHostElementClicked(e) {
|
|
753
|
-
const t = new
|
|
793
|
+
const t = new Ne(e.target, this.tableScope);
|
|
754
794
|
if (t.action === "toggleExpandCollapseAll")
|
|
755
795
|
this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
|
|
756
796
|
else if (t.inputType === "checkbox" && t.areaIdent)
|
|
757
797
|
this.tableScope.toggleRowCheckbox(t.rowIdx, t.colIdx, t.areaIdent), e.preventDefault(), e.stopPropagation();
|
|
758
|
-
else if (
|
|
798
|
+
else if (ee(t.row) && t.areaModel) {
|
|
759
799
|
const s = t.colIdx === this.getArrowColumnIndex() && e.altKey, i = t.className.includes("ge-table-tree-arrow-div");
|
|
760
800
|
if (console.info(i, s), s || i) {
|
|
761
801
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -777,12 +817,12 @@ class Ge {
|
|
|
777
817
|
*/
|
|
778
818
|
onHostElementDblClicked(e) {
|
|
779
819
|
if (e.target instanceof HTMLElement) {
|
|
780
|
-
const t = e.target, s = t.getAttribute("data-area"), i =
|
|
820
|
+
const t = e.target, s = t.getAttribute("data-area"), i = oe(s), o = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), n = this.tableScope.tableModel.getAreaModel(i);
|
|
781
821
|
if (s && i === "header")
|
|
782
822
|
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, o, r));
|
|
783
823
|
else if (t.getAttribute("data-row-index")) {
|
|
784
824
|
const a = n.getRowByIndex(o);
|
|
785
|
-
if (s && i === "body" && n.isEditable(o, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, r)),
|
|
825
|
+
if (s && i === "body" && n.isEditable(o, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, r)), ee(a) && r === this.getArrowColumnIndex()) {
|
|
786
826
|
e.preventDefault(), e.stopPropagation();
|
|
787
827
|
const h = a;
|
|
788
828
|
h.expanded = !h.expanded, "recalcVisibleTreeRows" in n && n.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(h);
|
|
@@ -850,7 +890,7 @@ class Ge {
|
|
|
850
890
|
}
|
|
851
891
|
}
|
|
852
892
|
}
|
|
853
|
-
class
|
|
893
|
+
class je {
|
|
854
894
|
constructor(e) {
|
|
855
895
|
this.tableScope = e;
|
|
856
896
|
}
|
|
@@ -876,21 +916,23 @@ class Ne {
|
|
|
876
916
|
/**
|
|
877
917
|
* Scrolls the table body to the specified pixel coordinates.
|
|
878
918
|
*
|
|
879
|
-
* @param {number}
|
|
880
|
-
* @param {number}
|
|
919
|
+
* @param {number} px - The horizontal pixel coordinate to scroll to. Defaults to 0.
|
|
920
|
+
* @param {number} py - The vertical pixel coordinate to scroll to. Defaults to 0.
|
|
881
921
|
* @return {void}
|
|
882
922
|
*/
|
|
883
923
|
scrollToPixel(e = 0, t = 0) {
|
|
924
|
+
this.tableScope.scrollToPixel(e, t);
|
|
884
925
|
}
|
|
885
926
|
/**
|
|
886
927
|
* Scrolls to the specified index in both horizontal and vertical directions.
|
|
887
928
|
*
|
|
888
|
-
* @param {number}
|
|
889
|
-
* @param {number}
|
|
929
|
+
* @param {number} indexX - The index of the column to scroll to in the horizontal direction. Default is 0.
|
|
930
|
+
* @param {number} indexY - The index of the row to scroll to in the vertical direction. Default is 0.
|
|
890
931
|
*
|
|
891
932
|
* @return undefined
|
|
892
933
|
*/
|
|
893
934
|
scrollToIndex(e = 0, t = 0) {
|
|
935
|
+
this.tableScope.scrollToIndex(e, t);
|
|
894
936
|
}
|
|
895
937
|
/**
|
|
896
938
|
* Sets whether the header is visible or not.
|
|
@@ -955,7 +997,7 @@ class Ne {
|
|
|
955
997
|
this.tableScope.repaint();
|
|
956
998
|
}
|
|
957
999
|
}
|
|
958
|
-
class
|
|
1000
|
+
class le {
|
|
959
1001
|
constructor(e) {
|
|
960
1002
|
this.getStorageKeyFn = e;
|
|
961
1003
|
}
|
|
@@ -1030,7 +1072,7 @@ class oe {
|
|
|
1030
1072
|
// }
|
|
1031
1073
|
// }
|
|
1032
1074
|
}
|
|
1033
|
-
class
|
|
1075
|
+
class Xe extends le {
|
|
1034
1076
|
constructor(e) {
|
|
1035
1077
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
1036
1078
|
}
|
|
@@ -1052,14 +1094,14 @@ class je extends oe {
|
|
|
1052
1094
|
}
|
|
1053
1095
|
}
|
|
1054
1096
|
}
|
|
1055
|
-
class
|
|
1097
|
+
class Ke {
|
|
1056
1098
|
constructor(e = "collapsed", t = [], s = !1, i = !1) {
|
|
1057
1099
|
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = i;
|
|
1058
1100
|
}
|
|
1059
1101
|
}
|
|
1060
|
-
class
|
|
1102
|
+
class ze extends le {
|
|
1061
1103
|
constructor(e) {
|
|
1062
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
1104
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Ke(), this.load();
|
|
1063
1105
|
}
|
|
1064
1106
|
collapsedExpandedStateGet() {
|
|
1065
1107
|
return this.collapsedExpandedState;
|
|
@@ -1091,7 +1133,7 @@ class Ke extends oe {
|
|
|
1091
1133
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
1092
1134
|
}
|
|
1093
1135
|
}
|
|
1094
|
-
class
|
|
1136
|
+
class Ye extends le {
|
|
1095
1137
|
constructor(e) {
|
|
1096
1138
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
1097
1139
|
}
|
|
@@ -1118,7 +1160,7 @@ class O {
|
|
|
1118
1160
|
this.left = e, this.width = t, this.height = s, this.top = i, this.index = o;
|
|
1119
1161
|
}
|
|
1120
1162
|
}
|
|
1121
|
-
class
|
|
1163
|
+
class Ue {
|
|
1122
1164
|
constructor(e, t, s, i) {
|
|
1123
1165
|
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = i, this.scrollTop = 0, this.areaBodyWestGeo = new O(), this.areaBodyCenterGeo = new O(), this.areaBodyEastGeo = new O();
|
|
1124
1166
|
const o = this.hostElement;
|
|
@@ -1304,7 +1346,7 @@ class D {
|
|
|
1304
1346
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
1305
1347
|
}
|
|
1306
1348
|
}
|
|
1307
|
-
class
|
|
1349
|
+
class qe {
|
|
1308
1350
|
constructor(e, t) {
|
|
1309
1351
|
this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
|
|
1310
1352
|
}
|
|
@@ -1337,22 +1379,22 @@ class Ue {
|
|
|
1337
1379
|
return !1;
|
|
1338
1380
|
}
|
|
1339
1381
|
}
|
|
1340
|
-
class
|
|
1382
|
+
class Je {
|
|
1341
1383
|
constructor(e, t, s) {
|
|
1342
1384
|
this.header = e, this.body = t, this.footer = s;
|
|
1343
1385
|
}
|
|
1344
1386
|
}
|
|
1345
|
-
class
|
|
1387
|
+
class Qe extends Ue {
|
|
1346
1388
|
constructor(e, t, s, i) {
|
|
1347
1389
|
var r, n;
|
|
1348
1390
|
super(e, t, s, i), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
1349
1391
|
header: [],
|
|
1350
1392
|
body: [],
|
|
1351
1393
|
footer: []
|
|
1352
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
1394
|
+
}, this.tree = !1, this.colAndRowspanModels = new Je(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.editing = !1, this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (n = this.tableOptions) != null && n.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), te(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
1353
1395
|
(a) => {
|
|
1354
1396
|
var h;
|
|
1355
|
-
this.colAndRowspanModels[a] = new
|
|
1397
|
+
this.colAndRowspanModels[a] = new qe(t, t.getAreaModel(a)), (h = this.colAndRowspanModels[a]) == null || h.init();
|
|
1356
1398
|
}
|
|
1357
1399
|
);
|
|
1358
1400
|
}
|
|
@@ -1530,8 +1572,8 @@ class Je extends Ye {
|
|
|
1530
1572
|
{ cursor: "pointer" }
|
|
1531
1573
|
), I = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
1532
1574
|
if (I) {
|
|
1533
|
-
const
|
|
1534
|
-
this.dom.domService.appendChild(T,
|
|
1575
|
+
const G = this.dom.domService.createText(I.content);
|
|
1576
|
+
this.dom.domService.appendChild(T, G), I.style && this.dom.applyStyleString(T, I.style);
|
|
1535
1577
|
}
|
|
1536
1578
|
}
|
|
1537
1579
|
}
|
|
@@ -1704,12 +1746,12 @@ class Je extends Ye {
|
|
|
1704
1746
|
lastRowOfModel: c,
|
|
1705
1747
|
gammaRange: p
|
|
1706
1748
|
}) {
|
|
1707
|
-
var
|
|
1749
|
+
var de;
|
|
1708
1750
|
const u = this.editorRenderer && this.editorRendererRow === i && this.editorRendererColumn === o ? this.editorRenderer : e.getCellRenderer(i, o), m = { left: r, width: n, height: a, top: h, index: o }, S = e.getRowByIndex(i);
|
|
1709
1751
|
let f = "none";
|
|
1710
|
-
if (o === this.getTreeArrowColumnIndex() &&
|
|
1752
|
+
if (o === this.getTreeArrowColumnIndex() && ee(S)) {
|
|
1711
1753
|
const y = S;
|
|
1712
|
-
(
|
|
1754
|
+
(de = y.children) != null && de.length ? y.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
|
|
1713
1755
|
}
|
|
1714
1756
|
let C;
|
|
1715
1757
|
if (t === "header") {
|
|
@@ -1732,19 +1774,19 @@ class Je extends Ye {
|
|
|
1732
1774
|
T && this.dom.setAttribute(R, "title", T);
|
|
1733
1775
|
const I = this.tableModel.getColumnDef(o);
|
|
1734
1776
|
I && I.classes[t] && this.dom.addClasses(I.classes[t], R);
|
|
1735
|
-
let
|
|
1736
|
-
u && (
|
|
1737
|
-
const
|
|
1738
|
-
if (
|
|
1777
|
+
let G;
|
|
1778
|
+
u && (G = u.render(R, i, o, t, e, E, this.dom.domService));
|
|
1779
|
+
const ae = e.getCustomClassesAt(i, o);
|
|
1780
|
+
if (ae.length && this.dom.addClasses(ae, R), this.dom.addColumnBorderDivs(this.tableOptions, d, m, t, s), c && this.dom.addHorizontalBorder({ left: r, width: n, height: a, top: h + a }, d), this.getFocusModel && t === "body") {
|
|
1739
1781
|
const y = this.getFocusModel();
|
|
1740
1782
|
y != null && y.hasFocus(i, o) && this.dom.addFocusBorderDivs(d, m, {});
|
|
1741
1783
|
}
|
|
1742
1784
|
t === "header" && this.dom.setAttribute(R, "data-ge-action", "drag-column");
|
|
1743
|
-
const
|
|
1744
|
-
if (
|
|
1745
|
-
for (const y in
|
|
1746
|
-
this.dom.setStyle(R, y,
|
|
1747
|
-
return [R,
|
|
1785
|
+
const Y = e.getCustomStyleAt(i, o);
|
|
1786
|
+
if (Y)
|
|
1787
|
+
for (const y in Y)
|
|
1788
|
+
this.dom.setStyle(R, y, Y[y]);
|
|
1789
|
+
return [R, G];
|
|
1748
1790
|
}
|
|
1749
1791
|
applyCssClasses(e, t = {}) {
|
|
1750
1792
|
e && Object.entries(t).forEach(([s, i]) => {
|
|
@@ -1881,12 +1923,12 @@ class Je extends Ye {
|
|
|
1881
1923
|
a.setAttribute(d, "data-col-index", `${t}`), a.setAttribute(d, "data-row-index", `${e}`), a.setAttribute(d, "data-area", "header"), a.setAttribute(d, "data-ge-action", "resize-column"), a.addClass(d, "ge-table-column-resize-handle"), a.setStyle(d, "display", "clip"), a.setStyle(d, "position", "absolute"), a.setStyle(d, "cursor", "col-resize"), a.setStyle(d, "left", `${s + o - h}px`), a.setStyle(d, "top", `${i}px`), a.setStyle(d, "width", `${h}px`), a.setStyle(d, "height", `${r}px`), a.appendChild(n, d);
|
|
1882
1924
|
}
|
|
1883
1925
|
}
|
|
1884
|
-
class
|
|
1926
|
+
class Ze {
|
|
1885
1927
|
constructor(e, t) {
|
|
1886
1928
|
this.columnIndex = e, this.sortState = t;
|
|
1887
1929
|
}
|
|
1888
1930
|
}
|
|
1889
|
-
class
|
|
1931
|
+
class et {
|
|
1890
1932
|
constructor(e) {
|
|
1891
1933
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
1892
1934
|
}
|
|
@@ -1902,26 +1944,26 @@ class Ze {
|
|
|
1902
1944
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
1903
1945
|
const t = e.target, s = t.getAttribute("data-area"), i = t.getAttribute("data-row-index"), o = t.getAttribute("data-col-index");
|
|
1904
1946
|
if (s && i && o) {
|
|
1905
|
-
const r =
|
|
1947
|
+
const r = oe(s), n = Number(i), a = Number(o);
|
|
1906
1948
|
this.tableScope.updateModelValueAfterEdit(r, n, a, t.value);
|
|
1907
1949
|
}
|
|
1908
1950
|
}
|
|
1909
1951
|
}
|
|
1910
1952
|
}
|
|
1911
|
-
class
|
|
1953
|
+
class tt {
|
|
1912
1954
|
constructor(e = -1, t = -1) {
|
|
1913
1955
|
this.rowIndex = e, this.columnIndex = t;
|
|
1914
1956
|
}
|
|
1915
1957
|
}
|
|
1916
|
-
class
|
|
1958
|
+
class re {
|
|
1917
1959
|
constructor(e) {
|
|
1918
1960
|
this.cells = e;
|
|
1919
1961
|
}
|
|
1920
1962
|
static createSingle(e, t) {
|
|
1921
|
-
return new
|
|
1963
|
+
return new re([new tt(e, t)]);
|
|
1922
1964
|
}
|
|
1923
1965
|
}
|
|
1924
|
-
class
|
|
1966
|
+
class st {
|
|
1925
1967
|
constructor(e) {
|
|
1926
1968
|
var t, s;
|
|
1927
1969
|
this.tableScope = e, (t = this.tableScope.tableOptions) != null && t.getSelectionModel && (this.getSelectionModel = this.tableScope.tableOptions.getSelectionModel), (s = this.tableScope.tableOptions) != null && s.getFocusModel && (this.getFocusModel = this.tableScope.tableOptions.getFocusModel);
|
|
@@ -1962,7 +2004,7 @@ class tt {
|
|
|
1962
2004
|
});
|
|
1963
2005
|
}
|
|
1964
2006
|
}
|
|
1965
|
-
class
|
|
2007
|
+
class it {
|
|
1966
2008
|
get() {
|
|
1967
2009
|
return {
|
|
1968
2010
|
f2: "START_EDITING",
|
|
@@ -1980,7 +2022,7 @@ class st {
|
|
|
1980
2022
|
};
|
|
1981
2023
|
}
|
|
1982
2024
|
}
|
|
1983
|
-
class
|
|
2025
|
+
class ot {
|
|
1984
2026
|
get() {
|
|
1985
2027
|
return {
|
|
1986
2028
|
f2: "START_EDITING",
|
|
@@ -2000,7 +2042,7 @@ class it {
|
|
|
2000
2042
|
};
|
|
2001
2043
|
}
|
|
2002
2044
|
}
|
|
2003
|
-
class
|
|
2045
|
+
class lt {
|
|
2004
2046
|
constructor(e) {
|
|
2005
2047
|
this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
|
|
2006
2048
|
}
|
|
@@ -2008,7 +2050,7 @@ class ot {
|
|
|
2008
2050
|
this.listener.includes(e) || this.listener.push(e);
|
|
2009
2051
|
}
|
|
2010
2052
|
init() {
|
|
2011
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
2053
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new ot().get()) : Object.assign(this.shortcutActionIdMapping, new it().get()), Object.assign(this.shortcutActionIdMapping, this.tableScope.tableOptions.shortcutActionIdMapping), this.isDebug() && console.debug("ShortcutService", this.shortcutActionIdMapping), this.tableScope.hostElement.addEventListener("keydown", this.onKeyDown.bind(this));
|
|
2012
2054
|
}
|
|
2013
2055
|
isMacintosh() {
|
|
2014
2056
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -2052,7 +2094,7 @@ class ot {
|
|
|
2052
2094
|
return e.altKey && t.push("alt"), e.shiftKey && t.push("shift"), e.ctrlKey && t.push("ctrl"), e.metaKey && t.push("meta"), e.code && t.push(e.code.toLowerCase().replace(/key/g, "")), t.sort();
|
|
2053
2095
|
}
|
|
2054
2096
|
}
|
|
2055
|
-
class
|
|
2097
|
+
class ue {
|
|
2056
2098
|
onCheckboxChanged(e) {
|
|
2057
2099
|
}
|
|
2058
2100
|
onContextmenu(e) {
|
|
@@ -2068,7 +2110,7 @@ class ce {
|
|
|
2068
2110
|
onMouseMoved(e) {
|
|
2069
2111
|
}
|
|
2070
2112
|
}
|
|
2071
|
-
class
|
|
2113
|
+
class we {
|
|
2072
2114
|
setStyle(e, t, s) {
|
|
2073
2115
|
return e.style[t] = s, e;
|
|
2074
2116
|
}
|
|
@@ -2095,7 +2137,7 @@ class ve {
|
|
|
2095
2137
|
e.setAttribute(t, s);
|
|
2096
2138
|
}
|
|
2097
2139
|
}
|
|
2098
|
-
class
|
|
2140
|
+
class rt {
|
|
2099
2141
|
render(e, t, s, i, o, r, n) {
|
|
2100
2142
|
if (o.isEditable(t, s)) {
|
|
2101
2143
|
n.addClass(e, "ge-table-row-input-div");
|
|
@@ -2116,7 +2158,7 @@ class lt {
|
|
|
2116
2158
|
}
|
|
2117
2159
|
}
|
|
2118
2160
|
}
|
|
2119
|
-
class
|
|
2161
|
+
class nt {
|
|
2120
2162
|
constructor(e = "none", t = "single") {
|
|
2121
2163
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
|
|
2122
2164
|
}
|
|
@@ -2160,7 +2202,7 @@ class rt {
|
|
|
2160
2202
|
this.selectionType !== "none" && (this.allSelected = !1, this.selectionMode === "single" && (this.ranges = []), this.selectionType === "row" ? (e.c1 = 0, e.c2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "column" ? (e.r1 = 0, e.r2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "cell" ? (e.r2 = e.r1, e.c2 = e.c1) : this.selectionType, this.ranges.push(e));
|
|
2161
2203
|
}
|
|
2162
2204
|
}
|
|
2163
|
-
class
|
|
2205
|
+
class at {
|
|
2164
2206
|
constructor(e = "none") {
|
|
2165
2207
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
|
|
2166
2208
|
}
|
|
@@ -2183,29 +2225,29 @@ class nt {
|
|
|
2183
2225
|
return [this.rowIndex, this.columnIndex];
|
|
2184
2226
|
}
|
|
2185
2227
|
}
|
|
2186
|
-
const
|
|
2187
|
-
class
|
|
2228
|
+
const dt = new nt(), ht = new at("cell");
|
|
2229
|
+
class Ce {
|
|
2188
2230
|
constructor() {
|
|
2189
2231
|
this.overflowX = "auto", this.overflowY = "auto", this.horizontalBorderVisible = !0, this.verticalBorderVisible = !0, this.footerSeparatorBorderVisible = !0, this.headerSeparatorBorderVisible = !0, this.fixedEastSeparatorBorderVisible = !0, this.fixedWestSeparatorBorderVisible = !0, this.tableTopBorderVisible = !0, this.tableBottomBorderVisible = !0, this.hoverRowVisible = !0, this.hoverColumnVisible = !0, this.columnsResizable = !0, this.columnsDraggable = !0, this.columnResizeHandleWidthInPx = 4, this.defaultRowHeights = {
|
|
2190
2232
|
header: 34,
|
|
2191
2233
|
body: 34,
|
|
2192
2234
|
footer: 34
|
|
2193
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new
|
|
2235
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ye(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new ve(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new rt(), this.getSelectionModel = () => dt, this.getFocusModel = () => ht;
|
|
2194
2236
|
}
|
|
2195
2237
|
}
|
|
2196
|
-
class
|
|
2238
|
+
class ne extends Qe {
|
|
2197
2239
|
constructor(e, t, s, i, o) {
|
|
2198
2240
|
var r;
|
|
2199
2241
|
if (super(
|
|
2200
2242
|
e,
|
|
2201
2243
|
t,
|
|
2202
|
-
new
|
|
2244
|
+
new ke(s),
|
|
2203
2245
|
i
|
|
2204
|
-
), this.eventListener = o, this.selectionService = new
|
|
2246
|
+
), this.eventListener = o, this.licenseManager = $.getInstance(), this.selectionService = new st(this), this.api = new je(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, o || (this.eventListener = new ue()), (r = this.tableOptions) != null && r.autoRestoreOptions) {
|
|
2205
2247
|
const n = this.tableOptions.autoRestoreOptions, a = n.getStorageKeyFn;
|
|
2206
|
-
a && (n.autoRestoreScrollPosition && (this.storeScrollPosStateService = new
|
|
2248
|
+
a && (n.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Xe(a)), n.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ze(a)), n.autoRestoreSortingState && (this.storeSortingService = new Ye(a)));
|
|
2207
2249
|
}
|
|
2208
|
-
this.mouseHandler = new
|
|
2250
|
+
this.mouseHandler = new _e(this), this.inputHandler = new et(this), this.shortcutService = new lt(this), this.shortcutService.addListener(this.selectionService);
|
|
2209
2251
|
}
|
|
2210
2252
|
/**
|
|
2211
2253
|
* Creates a TableScope instance.
|
|
@@ -2218,8 +2260,8 @@ class re extends Je {
|
|
|
2218
2260
|
*
|
|
2219
2261
|
* @return {TableScope} - The newly created TableScope instance.
|
|
2220
2262
|
*/
|
|
2221
|
-
static create(e, t, s = new
|
|
2222
|
-
return new
|
|
2263
|
+
static create(e, t, s = new Ce(), i = new ue(), o = new we()) {
|
|
2264
|
+
return new ne(
|
|
2223
2265
|
e,
|
|
2224
2266
|
t,
|
|
2225
2267
|
o,
|
|
@@ -2241,7 +2283,7 @@ class re extends Je {
|
|
|
2241
2283
|
return !1;
|
|
2242
2284
|
}
|
|
2243
2285
|
updateModelValueAfterEdit(e, t, s, i) {
|
|
2244
|
-
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, i) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(
|
|
2286
|
+
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, i) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(re.createSingle(t, s)), this.hostElement.focus());
|
|
2245
2287
|
}
|
|
2246
2288
|
/**
|
|
2247
2289
|
* Retrieves the TableApi object.
|
|
@@ -2270,7 +2312,7 @@ class re extends Je {
|
|
|
2270
2312
|
* @return {GeMouseEvent} - The created GeMouseEvent object.
|
|
2271
2313
|
*/
|
|
2272
2314
|
createGeMouseEvent(e) {
|
|
2273
|
-
const t = new
|
|
2315
|
+
const t = new ie();
|
|
2274
2316
|
if (t.originalEvent = e, e) {
|
|
2275
2317
|
const s = e.target;
|
|
2276
2318
|
if ([t.areaIdent, t.sideIdent] = this.getAreaAndSideIdentByAttr(s), t.rowIndex = this.getNumberByAttr(s, "data-row-index"), t.columnIndex = this.getNumberByAttr(s, "data-col-index"), t.action = this.getStringByAttr(s, "data-ge-action"), t.areaIdent) {
|
|
@@ -2339,7 +2381,7 @@ class re extends Je {
|
|
|
2339
2381
|
toggleExpandCollapseAll(e = !0) {
|
|
2340
2382
|
var s;
|
|
2341
2383
|
const t = this.tableModel.getBodyModel();
|
|
2342
|
-
|
|
2384
|
+
te(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
|
|
2343
2385
|
}
|
|
2344
2386
|
/**
|
|
2345
2387
|
* Toggles the checkbox state of a specific row in a table.
|
|
@@ -2396,7 +2438,7 @@ class re extends Je {
|
|
|
2396
2438
|
const i = this.tableModel.getColumnDef(s);
|
|
2397
2439
|
if (i != null && i.sortable && i.sortable()) {
|
|
2398
2440
|
e.preventDefault(), e.stopPropagation();
|
|
2399
|
-
const n = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, a = i.sortState ?? "", h = n[(n.indexOf(a) + 1) % n.length], d = new
|
|
2441
|
+
const n = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, a = i.sortState ?? "", h = n[(n.indexOf(a) + 1) % n.length], d = new Ze(s, h);
|
|
2400
2442
|
this.tableModel.doSort([d]) && ((o = this.tableModel.getColumnDefs()) == null || o.forEach((p) => p.sortState = ""), i.sortState = h), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([d]);
|
|
2401
2443
|
}
|
|
2402
2444
|
}
|
|
@@ -2486,7 +2528,7 @@ class re extends Je {
|
|
|
2486
2528
|
const s = this.tableOptions.autoRestoreOptions, i = s.getRowId;
|
|
2487
2529
|
if (s.autoRestoreCollapsedExpandedState && i) {
|
|
2488
2530
|
const o = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
|
|
2489
|
-
if (
|
|
2531
|
+
if (te(r)) {
|
|
2490
2532
|
const n = r, a = r.getRowCount();
|
|
2491
2533
|
for (let h = 0; h < a; h++) {
|
|
2492
2534
|
const d = r.getRowByIndex(h);
|
|
@@ -2505,14 +2547,36 @@ class re extends Je {
|
|
|
2505
2547
|
}
|
|
2506
2548
|
}
|
|
2507
2549
|
}
|
|
2550
|
+
/**
|
|
2551
|
+
* Scrolls the viewport to the specified pixel coordinates.
|
|
2552
|
+
*
|
|
2553
|
+
* @param {number} px - The horizontal pixel coordinate to scroll to.
|
|
2554
|
+
* @param {number} py - The vertical pixel coordinate to scroll to.
|
|
2555
|
+
*
|
|
2556
|
+
* @return {void}
|
|
2557
|
+
*/
|
|
2558
|
+
scrollToPixel(e, t) {
|
|
2559
|
+
this.scrollViewport.scrollTo(e, t);
|
|
2560
|
+
}
|
|
2561
|
+
/**
|
|
2562
|
+
* Scrolls to the specified index in the table.
|
|
2563
|
+
*
|
|
2564
|
+
* @param {number} _indexX - The horizontal index of the table where scrolling is needed.
|
|
2565
|
+
* @param {number} indexY - The vertical index of the table where scrolling is needed.
|
|
2566
|
+
* @return {void}
|
|
2567
|
+
*/
|
|
2568
|
+
scrollToIndex(e, t) {
|
|
2569
|
+
const i = this.tableModel.getAreaModel("body").getYPosByRowIndex(t);
|
|
2570
|
+
this.scrollToPixel(0, i);
|
|
2571
|
+
}
|
|
2508
2572
|
}
|
|
2509
|
-
const
|
|
2573
|
+
const ct = /* @__PURE__ */ He("<div>"), ft = (l) => {
|
|
2510
2574
|
let e;
|
|
2511
|
-
const t =
|
|
2575
|
+
const t = be({
|
|
2512
2576
|
tableModel: null,
|
|
2513
|
-
tableOptions: new
|
|
2577
|
+
tableOptions: new Ce()
|
|
2514
2578
|
}, l);
|
|
2515
|
-
return
|
|
2579
|
+
return Re(() => {
|
|
2516
2580
|
const s = {
|
|
2517
2581
|
onCheckboxChanged: (r) => {
|
|
2518
2582
|
const n = new CustomEvent("checkboxChanged", {
|
|
@@ -2563,20 +2627,20 @@ const ht = /* @__PURE__ */ We("<div>"), pt = (l) => {
|
|
|
2563
2627
|
});
|
|
2564
2628
|
e && e.dispatchEvent(n);
|
|
2565
2629
|
}
|
|
2566
|
-
}, i = new
|
|
2630
|
+
}, i = new ne(e, t.tableModel, new we(), t.tableOptions, s);
|
|
2567
2631
|
i.firstInit();
|
|
2568
2632
|
const o = new CustomEvent("tableReady", {
|
|
2569
2633
|
detail: i.getApi(),
|
|
2570
2634
|
bubbles: !0
|
|
2571
2635
|
});
|
|
2572
|
-
e && e.dispatchEvent(o);
|
|
2636
|
+
e && e.dispatchEvent(o), t.licenseKey && $.getInstance().setLicenseKey(t.licenseKey);
|
|
2573
2637
|
}), (() => {
|
|
2574
|
-
const s =
|
|
2575
|
-
return typeof i == "function" ?
|
|
2638
|
+
const s = ct(), i = e;
|
|
2639
|
+
return typeof i == "function" ? Ve(i, s) : e = s, s;
|
|
2576
2640
|
})();
|
|
2577
2641
|
};
|
|
2578
2642
|
export {
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2643
|
+
ut as ComponentRendererWrapper,
|
|
2644
|
+
ft as GuiexpertTable,
|
|
2645
|
+
pt as GuiexpertTableProps
|
|
2582
2646
|
};
|