@guiexpert/solid-table 1.1.57 → 1.1.59
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/index.cjs +7 -7
- package/index.js +370 -182
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
const De = (a, e) => a === e,
|
|
1
|
+
const De = (a, e) => a === e, se = Symbol("solid-proxy"), ke = typeof Proxy == "function", ge = {
|
|
2
2
|
equals: De
|
|
3
3
|
};
|
|
4
4
|
let Se = xe;
|
|
5
|
-
const L = 1,
|
|
5
|
+
const L = 1, G = 2, ye = {
|
|
6
6
|
owned: null,
|
|
7
7
|
cleanups: null,
|
|
8
8
|
context: null,
|
|
9
9
|
owner: null
|
|
10
10
|
};
|
|
11
|
-
var
|
|
12
|
-
let
|
|
11
|
+
var R = null;
|
|
12
|
+
let ee = null, Fe = null, w = null, M = null, O = null, q = 0;
|
|
13
13
|
function Ie(a, e) {
|
|
14
|
-
const t =
|
|
14
|
+
const t = w, s = R, o = a.length === 0, i = e === void 0 ? s : e, r = o ? ye : {
|
|
15
15
|
owned: null,
|
|
16
16
|
cleanups: null,
|
|
17
17
|
context: i ? i.context : null,
|
|
18
18
|
owner: i
|
|
19
|
-
}, l = o ? a : () => a(() =>
|
|
20
|
-
|
|
19
|
+
}, l = o ? a : () => a(() => Z(() => H(r)));
|
|
20
|
+
R = r, w = null;
|
|
21
21
|
try {
|
|
22
22
|
return V(l, !0);
|
|
23
23
|
} finally {
|
|
24
|
-
|
|
24
|
+
w = t, R = s;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function oe(a, e, t) {
|
|
28
28
|
const s = ae(a, e, !1, L);
|
|
29
|
-
|
|
29
|
+
$(s);
|
|
30
30
|
}
|
|
31
31
|
function Oe(a, e, t) {
|
|
32
32
|
Se = Ve;
|
|
33
33
|
const s = ae(a, e, !1, L);
|
|
34
|
-
s.user = !0, O ? O.push(s) :
|
|
34
|
+
s.user = !0, O ? O.push(s) : $(s);
|
|
35
35
|
}
|
|
36
36
|
function Le(a, e, t) {
|
|
37
37
|
t = t ? Object.assign({}, ge, t) : ge;
|
|
38
38
|
const s = ae(a, e, !0, 0);
|
|
39
|
-
return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0,
|
|
39
|
+
return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, $(s), Pe.bind(s);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
if (
|
|
43
|
-
const e =
|
|
44
|
-
|
|
41
|
+
function Z(a) {
|
|
42
|
+
if (w === null) return a();
|
|
43
|
+
const e = w;
|
|
44
|
+
w = null;
|
|
45
45
|
try {
|
|
46
46
|
return a();
|
|
47
47
|
} finally {
|
|
48
|
-
|
|
48
|
+
w = e;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
function Be(a) {
|
|
52
|
-
Oe(() =>
|
|
52
|
+
Oe(() => Z(a));
|
|
53
53
|
}
|
|
54
54
|
function Pe() {
|
|
55
55
|
if (this.sources && this.state)
|
|
56
|
-
if (this.state === L)
|
|
56
|
+
if (this.state === L) $(this);
|
|
57
57
|
else {
|
|
58
58
|
const a = M;
|
|
59
59
|
M = null, V(() => U(this), !1), M = a;
|
|
60
60
|
}
|
|
61
|
-
if (
|
|
61
|
+
if (w) {
|
|
62
62
|
const a = this.observers ? this.observers.length : 0;
|
|
63
|
-
|
|
63
|
+
w.sources ? (w.sources.push(this), w.sourceSlots.push(a)) : (w.sources = [this], w.sourceSlots = [a]), this.observers ? (this.observers.push(w), this.observerSlots.push(w.sources.length - 1)) : (this.observers = [w], this.observerSlots = [w.sources.length - 1]);
|
|
64
64
|
}
|
|
65
65
|
return this.value;
|
|
66
66
|
}
|
|
@@ -68,33 +68,33 @@ function We(a, e, t) {
|
|
|
68
68
|
let s = a.value;
|
|
69
69
|
return (!a.comparator || !a.comparator(s, e)) && (a.value = e, a.observers && a.observers.length && V(() => {
|
|
70
70
|
for (let o = 0; o < a.observers.length; o += 1) {
|
|
71
|
-
const i = a.observers[o], r =
|
|
72
|
-
r &&
|
|
71
|
+
const i = a.observers[o], r = ee && ee.running;
|
|
72
|
+
r && ee.disposed.has(i), (r ? !i.tState : !i.state) && (i.pure ? M.push(i) : O.push(i), i.observers && we(i)), r || (i.state = L);
|
|
73
73
|
}
|
|
74
74
|
if (M.length > 1e6)
|
|
75
75
|
throw M = [], new Error();
|
|
76
76
|
}, !1)), e;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function $(a) {
|
|
79
79
|
if (!a.fn) return;
|
|
80
|
-
|
|
81
|
-
const e =
|
|
82
|
-
|
|
80
|
+
H(a);
|
|
81
|
+
const e = q;
|
|
82
|
+
He(
|
|
83
83
|
a,
|
|
84
84
|
a.value,
|
|
85
85
|
e
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function He(a, e, t) {
|
|
89
89
|
let s;
|
|
90
|
-
const o =
|
|
91
|
-
|
|
90
|
+
const o = R, i = w;
|
|
91
|
+
w = R = a;
|
|
92
92
|
try {
|
|
93
93
|
s = a.fn(e);
|
|
94
94
|
} catch (r) {
|
|
95
|
-
return a.pure && (a.state = L, a.owned && a.owned.forEach(
|
|
95
|
+
return a.pure && (a.state = L, a.owned && a.owned.forEach(H), a.owned = null), a.updatedAt = t + 1, ve(r);
|
|
96
96
|
} finally {
|
|
97
|
-
|
|
97
|
+
w = i, R = o;
|
|
98
98
|
}
|
|
99
99
|
(!a.updatedAt || a.updatedAt <= t) && (a.updatedAt != null && "observers" in a ? We(a, s) : a.value = s, a.updatedAt = t);
|
|
100
100
|
}
|
|
@@ -108,23 +108,23 @@ function ae(a, e, t, s = L, o) {
|
|
|
108
108
|
sourceSlots: null,
|
|
109
109
|
cleanups: null,
|
|
110
110
|
value: e,
|
|
111
|
-
owner:
|
|
112
|
-
context:
|
|
111
|
+
owner: R,
|
|
112
|
+
context: R ? R.context : null,
|
|
113
113
|
pure: t
|
|
114
114
|
};
|
|
115
|
-
return
|
|
115
|
+
return R === null || R !== ye && (R.owned ? R.owned.push(i) : R.owned = [i]), i;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function z(a) {
|
|
118
118
|
if (a.state === 0) return;
|
|
119
|
-
if (a.state ===
|
|
120
|
-
if (a.suspense &&
|
|
119
|
+
if (a.state === G) return U(a);
|
|
120
|
+
if (a.suspense && Z(a.suspense.inFallback)) return a.suspense.effects.push(a);
|
|
121
121
|
const e = [a];
|
|
122
|
-
for (; (a = a.owner) && (!a.updatedAt || a.updatedAt <
|
|
122
|
+
for (; (a = a.owner) && (!a.updatedAt || a.updatedAt < q); )
|
|
123
123
|
a.state && e.push(a);
|
|
124
124
|
for (let t = e.length - 1; t >= 0; t--)
|
|
125
125
|
if (a = e[t], a.state === L)
|
|
126
|
-
|
|
127
|
-
else if (a.state ===
|
|
126
|
+
$(a);
|
|
127
|
+
else if (a.state === G) {
|
|
128
128
|
const s = M;
|
|
129
129
|
M = null, V(() => U(a, e[0]), !1), M = s;
|
|
130
130
|
}
|
|
@@ -132,29 +132,29 @@ function _(a) {
|
|
|
132
132
|
function V(a, e) {
|
|
133
133
|
if (M) return a();
|
|
134
134
|
let t = !1;
|
|
135
|
-
e || (M = []), O ? t = !0 : O = [],
|
|
135
|
+
e || (M = []), O ? t = !0 : O = [], q++;
|
|
136
136
|
try {
|
|
137
137
|
const s = a();
|
|
138
|
-
return
|
|
138
|
+
return $e(t), s;
|
|
139
139
|
} catch (s) {
|
|
140
|
-
t || (O = null), M = null,
|
|
140
|
+
t || (O = null), M = null, ve(s);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function $e(a) {
|
|
144
144
|
if (M && (xe(M), M = null), a) return;
|
|
145
145
|
const e = O;
|
|
146
146
|
O = null, e.length && V(() => Se(e), !1);
|
|
147
147
|
}
|
|
148
148
|
function xe(a) {
|
|
149
|
-
for (let e = 0; e < a.length; e++)
|
|
149
|
+
for (let e = 0; e < a.length; e++) z(a[e]);
|
|
150
150
|
}
|
|
151
151
|
function Ve(a) {
|
|
152
152
|
let e, t = 0;
|
|
153
153
|
for (e = 0; e < a.length; e++) {
|
|
154
154
|
const s = a[e];
|
|
155
|
-
s.user ? a[t++] = s :
|
|
155
|
+
s.user ? a[t++] = s : z(s);
|
|
156
156
|
}
|
|
157
|
-
for (e = 0; e < t; e++)
|
|
157
|
+
for (e = 0; e < t; e++) z(a[e]);
|
|
158
158
|
}
|
|
159
159
|
function U(a, e) {
|
|
160
160
|
a.state = 0;
|
|
@@ -162,17 +162,17 @@ function U(a, e) {
|
|
|
162
162
|
const s = a.sources[t];
|
|
163
163
|
if (s.sources) {
|
|
164
164
|
const o = s.state;
|
|
165
|
-
o === L ? s !== e && (!s.updatedAt || s.updatedAt <
|
|
165
|
+
o === L ? s !== e && (!s.updatedAt || s.updatedAt < q) && z(s) : o === G && U(s, e);
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function we(a) {
|
|
170
170
|
for (let e = 0; e < a.observers.length; e += 1) {
|
|
171
171
|
const t = a.observers[e];
|
|
172
|
-
t.state || (t.state =
|
|
172
|
+
t.state || (t.state = G, t.pure ? M.push(t) : O.push(t), t.observers && we(t));
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function H(a) {
|
|
176
176
|
let e;
|
|
177
177
|
if (a.sources)
|
|
178
178
|
for (; a.sources.length; ) {
|
|
@@ -183,11 +183,11 @@ function $(a) {
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
if (a.tOwned) {
|
|
186
|
-
for (e = a.tOwned.length - 1; e >= 0; e--)
|
|
186
|
+
for (e = a.tOwned.length - 1; e >= 0; e--) H(a.tOwned[e]);
|
|
187
187
|
delete a.tOwned;
|
|
188
188
|
}
|
|
189
189
|
if (a.owned) {
|
|
190
|
-
for (e = a.owned.length - 1; e >= 0; e--)
|
|
190
|
+
for (e = a.owned.length - 1; e >= 0; e--) H(a.owned[e]);
|
|
191
191
|
a.owned = null;
|
|
192
192
|
}
|
|
193
193
|
if (a.cleanups) {
|
|
@@ -196,26 +196,26 @@ function $(a) {
|
|
|
196
196
|
}
|
|
197
197
|
a.state = 0;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function _e(a) {
|
|
200
200
|
return a instanceof Error ? a : new Error(typeof a == "string" ? a : "Unknown error", {
|
|
201
201
|
cause: a
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
throw
|
|
204
|
+
function ve(a, e = R) {
|
|
205
|
+
throw _e(a);
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function N() {
|
|
208
208
|
return !0;
|
|
209
209
|
}
|
|
210
|
-
const
|
|
210
|
+
const Ne = {
|
|
211
211
|
get(a, e, t) {
|
|
212
|
-
return e ===
|
|
212
|
+
return e === se ? t : a.get(e);
|
|
213
213
|
},
|
|
214
214
|
has(a, e) {
|
|
215
|
-
return e ===
|
|
215
|
+
return e === se ? !0 : a.has(e);
|
|
216
216
|
},
|
|
217
|
-
set:
|
|
218
|
-
deleteProperty:
|
|
217
|
+
set: N,
|
|
218
|
+
deleteProperty: N,
|
|
219
219
|
getOwnPropertyDescriptor(a, e) {
|
|
220
220
|
return {
|
|
221
221
|
configurable: !0,
|
|
@@ -223,51 +223,51 @@ const Ge = {
|
|
|
223
223
|
get() {
|
|
224
224
|
return a.get(e);
|
|
225
225
|
},
|
|
226
|
-
set:
|
|
227
|
-
deleteProperty:
|
|
226
|
+
set: N,
|
|
227
|
+
deleteProperty: N
|
|
228
228
|
};
|
|
229
229
|
},
|
|
230
230
|
ownKeys(a) {
|
|
231
231
|
return a.keys();
|
|
232
232
|
}
|
|
233
233
|
};
|
|
234
|
-
function
|
|
234
|
+
function te(a) {
|
|
235
235
|
return (a = typeof a == "function" ? a() : a) ? a : {};
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Ge() {
|
|
238
238
|
for (let a = 0, e = this.length; a < e; ++a) {
|
|
239
239
|
const t = this[a]();
|
|
240
240
|
if (t !== void 0) return t;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function Ce(...a) {
|
|
244
244
|
let e = !1;
|
|
245
245
|
for (let r = 0; r < a.length; r++) {
|
|
246
246
|
const l = a[r];
|
|
247
|
-
e = e || !!l &&
|
|
247
|
+
e = e || !!l && se in l, a[r] = typeof l == "function" ? (e = !0, Le(l)) : l;
|
|
248
248
|
}
|
|
249
249
|
if (ke && e)
|
|
250
250
|
return new Proxy(
|
|
251
251
|
{
|
|
252
252
|
get(r) {
|
|
253
253
|
for (let l = a.length - 1; l >= 0; l--) {
|
|
254
|
-
const n =
|
|
254
|
+
const n = te(a[l])[r];
|
|
255
255
|
if (n !== void 0) return n;
|
|
256
256
|
}
|
|
257
257
|
},
|
|
258
258
|
has(r) {
|
|
259
259
|
for (let l = a.length - 1; l >= 0; l--)
|
|
260
|
-
if (r in
|
|
260
|
+
if (r in te(a[l])) return !0;
|
|
261
261
|
return !1;
|
|
262
262
|
},
|
|
263
263
|
keys() {
|
|
264
264
|
const r = [];
|
|
265
265
|
for (let l = 0; l < a.length; l++)
|
|
266
|
-
r.push(...Object.keys(
|
|
266
|
+
r.push(...Object.keys(te(a[l])));
|
|
267
267
|
return [...new Set(r)];
|
|
268
268
|
}
|
|
269
269
|
},
|
|
270
|
-
|
|
270
|
+
Ne
|
|
271
271
|
);
|
|
272
272
|
const t = {}, s = /* @__PURE__ */ Object.create(null);
|
|
273
273
|
for (let r = a.length - 1; r >= 0; r--) {
|
|
@@ -282,7 +282,7 @@ function we(...a) {
|
|
|
282
282
|
s[c] = h.get ? {
|
|
283
283
|
enumerable: !0,
|
|
284
284
|
configurable: !0,
|
|
285
|
-
get:
|
|
285
|
+
get: Ge.bind(t[c] = [h.get.bind(l)])
|
|
286
286
|
} : h.value !== void 0 ? h : void 0;
|
|
287
287
|
else {
|
|
288
288
|
const p = t[c];
|
|
@@ -297,7 +297,7 @@ function we(...a) {
|
|
|
297
297
|
}
|
|
298
298
|
return o;
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function ze(a, e, t) {
|
|
301
301
|
let s = t.length, o = e.length, i = s, r = 0, l = 0, n = e[o - 1].nextSibling, d = null;
|
|
302
302
|
for (; r < o || l < i; ) {
|
|
303
303
|
if (e[r] === t[l]) {
|
|
@@ -353,11 +353,11 @@ function je(a, e, t) {
|
|
|
353
353
|
return i.cloneNode = i, i;
|
|
354
354
|
}
|
|
355
355
|
function Xe(a, e, t) {
|
|
356
|
-
return
|
|
356
|
+
return Z(() => a(e, t));
|
|
357
357
|
}
|
|
358
358
|
function Ke(a, e, t, s) {
|
|
359
359
|
if (t !== void 0 && !s && (s = []), typeof e != "function") return j(a, e, s, t);
|
|
360
|
-
|
|
360
|
+
oe((o) => j(a, e(), o, t), s);
|
|
361
361
|
}
|
|
362
362
|
function j(a, e, t, s, o) {
|
|
363
363
|
for (; typeof t == "function"; ) t = t();
|
|
@@ -375,18 +375,18 @@ function j(a, e, t, s, o) {
|
|
|
375
375
|
t = P(a, t, s);
|
|
376
376
|
else {
|
|
377
377
|
if (i === "function")
|
|
378
|
-
return
|
|
378
|
+
return oe(() => {
|
|
379
379
|
let l = e();
|
|
380
380
|
for (; typeof l == "function"; ) l = l();
|
|
381
381
|
t = j(a, l, t, s);
|
|
382
382
|
}), () => t;
|
|
383
383
|
if (Array.isArray(e)) {
|
|
384
384
|
const l = [], n = t && Array.isArray(t);
|
|
385
|
-
if (
|
|
386
|
-
return
|
|
385
|
+
if (ie(l, e, t, o))
|
|
386
|
+
return oe(() => t = j(a, l, t, s, !0)), () => t;
|
|
387
387
|
if (l.length === 0) {
|
|
388
388
|
if (t = P(a, t, s), r) return t;
|
|
389
|
-
} else n ? t.length === 0 ? fe(a, l, s) :
|
|
389
|
+
} else n ? t.length === 0 ? fe(a, l, s) : ze(a, t, l) : (t && P(a), fe(a, l));
|
|
390
390
|
t = l;
|
|
391
391
|
} else if (e.nodeType) {
|
|
392
392
|
if (Array.isArray(t)) {
|
|
@@ -398,18 +398,18 @@ function j(a, e, t, s, o) {
|
|
|
398
398
|
}
|
|
399
399
|
return t;
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function ie(a, e, t, s) {
|
|
402
402
|
let o = !1;
|
|
403
403
|
for (let i = 0, r = e.length; i < r; i++) {
|
|
404
404
|
let l = e[i], n = t && t[a.length], d;
|
|
405
405
|
if (!(l == null || l === !0 || l === !1)) if ((d = typeof l) == "object" && l.nodeType)
|
|
406
406
|
a.push(l);
|
|
407
407
|
else if (Array.isArray(l))
|
|
408
|
-
o =
|
|
408
|
+
o = ie(a, l, n) || o;
|
|
409
409
|
else if (d === "function")
|
|
410
410
|
if (s) {
|
|
411
411
|
for (; typeof l == "function"; ) l = l();
|
|
412
|
-
o =
|
|
412
|
+
o = ie(
|
|
413
413
|
a,
|
|
414
414
|
Array.isArray(l) ? l : [l],
|
|
415
415
|
Array.isArray(n) ? n : [n]
|
|
@@ -441,12 +441,12 @@ function P(a, e, t, s) {
|
|
|
441
441
|
} else a.insertBefore(o, t);
|
|
442
442
|
return [o];
|
|
443
443
|
}
|
|
444
|
-
class
|
|
444
|
+
class Mt {
|
|
445
445
|
constructor(e) {
|
|
446
446
|
this.code = e;
|
|
447
447
|
}
|
|
448
448
|
render(e, t, s, o, i, r, l) {
|
|
449
|
-
const n =
|
|
449
|
+
const n = Ce({
|
|
450
450
|
rowIndex: t,
|
|
451
451
|
columnIndex: s,
|
|
452
452
|
areaIdent: o,
|
|
@@ -459,7 +459,7 @@ class wt {
|
|
|
459
459
|
);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
const
|
|
462
|
+
const Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
463
463
|
__proto__: null
|
|
464
464
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
465
465
|
function Ye(a, e = 500) {
|
|
@@ -495,7 +495,7 @@ class B {
|
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function X(a) {
|
|
499
499
|
return a && a.type === "TreeRow";
|
|
500
500
|
}
|
|
501
501
|
function re(a) {
|
|
@@ -784,7 +784,7 @@ class Ze {
|
|
|
784
784
|
this.tableScope.toggleHeaderGroup(s), e.preventDefault(), e.stopPropagation();
|
|
785
785
|
else if (s.inputType === "checkbox" && s.areaIdent)
|
|
786
786
|
this.tableScope.toggleRowCheckbox(s.rowIdx, s.colIdx, s.areaIdent), e.preventDefault(), e.stopPropagation();
|
|
787
|
-
else if (
|
|
787
|
+
else if (X(s.row) && s.areaModel) {
|
|
788
788
|
const o = s.colIdx === this.getArrowColumnIndex() && e.altKey, i = s.className.includes("ge-table-tree-arrow-div");
|
|
789
789
|
if (o || i) {
|
|
790
790
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -811,7 +811,7 @@ class Ze {
|
|
|
811
811
|
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, r));
|
|
812
812
|
else if (t.getAttribute("data-row-index")) {
|
|
813
813
|
const n = l.getRowByIndex(i);
|
|
814
|
-
if (s && o === "body" && l.isEditable(i, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, r)),
|
|
814
|
+
if (s && o === "body" && l.isEditable(i, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, r)), X(n) && r === this.getArrowColumnIndex()) {
|
|
815
815
|
e.preventDefault(), e.stopPropagation();
|
|
816
816
|
const d = n;
|
|
817
817
|
d.expanded = !d.expanded, "recalcVisibleTreeRows" in l && l.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(d);
|
|
@@ -880,6 +880,179 @@ class Ze {
|
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
882
|
class Qe {
|
|
883
|
+
constructor(e, t = [], s = -1) {
|
|
884
|
+
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = s, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((o) => o.rendererMap[e]);
|
|
885
|
+
}
|
|
886
|
+
getTextValueAt(e, t) {
|
|
887
|
+
return "" + this.getValueAt(e, t);
|
|
888
|
+
}
|
|
889
|
+
getTooltipAt(e, t) {
|
|
890
|
+
return "";
|
|
891
|
+
}
|
|
892
|
+
getCellRenderer(e, t) {
|
|
893
|
+
if (t < this.cellRenderers.length)
|
|
894
|
+
return this.cellRenderers[t];
|
|
895
|
+
}
|
|
896
|
+
getColspanAt(e, t) {
|
|
897
|
+
return 0;
|
|
898
|
+
}
|
|
899
|
+
getCustomClassesAt(e, t) {
|
|
900
|
+
return [];
|
|
901
|
+
}
|
|
902
|
+
getCustomStyleAt(e, t) {
|
|
903
|
+
}
|
|
904
|
+
getRowspanAt(e, t) {
|
|
905
|
+
return 0;
|
|
906
|
+
}
|
|
907
|
+
getRowByIndex(e) {
|
|
908
|
+
}
|
|
909
|
+
isRowCheckable(e) {
|
|
910
|
+
return !0;
|
|
911
|
+
}
|
|
912
|
+
isRowChecked(e) {
|
|
913
|
+
var s;
|
|
914
|
+
const t = this.getRowByIndex(e);
|
|
915
|
+
return (s = this.rowSelectionModel) == null ? void 0 : s.isRowChecked(t);
|
|
916
|
+
}
|
|
917
|
+
setRowChecked(e, t) {
|
|
918
|
+
if (this.rowSelectionModel) {
|
|
919
|
+
const s = this.getRowByIndex(e);
|
|
920
|
+
this.rowSelectionModel.checkRow(s, t);
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
getMaxColspan() {
|
|
924
|
+
return 31;
|
|
925
|
+
}
|
|
926
|
+
getMaxRowspan() {
|
|
927
|
+
return 31;
|
|
928
|
+
}
|
|
929
|
+
getYPosByRowIndex(e) {
|
|
930
|
+
return this.defaultRowHeight > 0 ? this.defaultRowHeight * e : this.yPositions[e];
|
|
931
|
+
}
|
|
932
|
+
init() {
|
|
933
|
+
!this.yPositions.length && this.getRowCount() !== void 0 && this.defaultRowHeight === -1 && this.calcYPositions();
|
|
934
|
+
}
|
|
935
|
+
isFilterable() {
|
|
936
|
+
return this.areaIdent === "body";
|
|
937
|
+
}
|
|
938
|
+
doSort(e) {
|
|
939
|
+
return !1;
|
|
940
|
+
}
|
|
941
|
+
isEditable(e, t) {
|
|
942
|
+
var o, i;
|
|
943
|
+
const s = (o = this.columnDefs) == null ? void 0 : o[t];
|
|
944
|
+
return ((i = s == null ? void 0 : s.editable) == null ? void 0 : i.call(s)) ?? !1;
|
|
945
|
+
}
|
|
946
|
+
setValue(e, t, s) {
|
|
947
|
+
var l;
|
|
948
|
+
const o = (l = this.columnDefs[t]) == null ? void 0 : l.editInputPipe;
|
|
949
|
+
o && (s = o(s, e, t));
|
|
950
|
+
const i = this.getRowByIndex(e), r = this.columnDefs[t].property;
|
|
951
|
+
return r.includes(".") ? this.setPropertyValue(i, r.split("."), s) : (i[r] = s, !0);
|
|
952
|
+
}
|
|
953
|
+
isSelectable(e, t) {
|
|
954
|
+
return !0;
|
|
955
|
+
}
|
|
956
|
+
changeColumnOrder(e, t) {
|
|
957
|
+
this.arrayMove(this.cellRenderers, e, t);
|
|
958
|
+
}
|
|
959
|
+
setPropertyValue(e, t, s) {
|
|
960
|
+
const o = t.shift();
|
|
961
|
+
if (o) {
|
|
962
|
+
const i = e[o];
|
|
963
|
+
return i && t.length ? this.setPropertyValue(i, t, s) : (e[o] = s, !0);
|
|
964
|
+
}
|
|
965
|
+
return !1;
|
|
966
|
+
}
|
|
967
|
+
arrayMove(e, t, s) {
|
|
968
|
+
const o = e.splice(t, 1)[0];
|
|
969
|
+
return e.splice(s, 0, o), e;
|
|
970
|
+
}
|
|
971
|
+
calcYPositions() {
|
|
972
|
+
const e = this.getRowCount();
|
|
973
|
+
this.yPositions = new Array(e + 1), this.yPositions[0] = 0;
|
|
974
|
+
for (let t = 0; t < e; t++)
|
|
975
|
+
this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
class et {
|
|
979
|
+
genericSortComparator(e, t, s) {
|
|
980
|
+
if (typeof e == "number" && typeof t == "number")
|
|
981
|
+
return s * (e - t);
|
|
982
|
+
if (typeof e == "string" && typeof t == "string")
|
|
983
|
+
return s * e.localeCompare(t);
|
|
984
|
+
if (typeof e == "boolean" && typeof t == "boolean")
|
|
985
|
+
return s * ((e ? -1 : 1) - (t ? -1 : 1));
|
|
986
|
+
if (e instanceof Date && t instanceof Date)
|
|
987
|
+
return s * (e.getTime() - t.getTime());
|
|
988
|
+
if (e instanceof Array && t instanceof Array) {
|
|
989
|
+
const o = e, i = t;
|
|
990
|
+
if (o.length && i.length)
|
|
991
|
+
return this.genericSortComparator(o[0], i[0], s);
|
|
992
|
+
}
|
|
993
|
+
return s * ("" + e).localeCompare("" + t);
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
class tt extends Qe {
|
|
997
|
+
constructor(e, t, s, o = []) {
|
|
998
|
+
super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.sorterService = new et(), this.filteredRows = [...t], this.properties = o.map((i) => i.property);
|
|
999
|
+
}
|
|
1000
|
+
setRows(e) {
|
|
1001
|
+
this.rows = e, this.filteredRows = [...e];
|
|
1002
|
+
}
|
|
1003
|
+
filterRowsByPredict(e) {
|
|
1004
|
+
this.rows = this.rows.filter(e), this.filteredRows = this.filteredRows.filter(e);
|
|
1005
|
+
}
|
|
1006
|
+
getRowCount() {
|
|
1007
|
+
var e;
|
|
1008
|
+
return ((e = this.filteredRows) == null ? void 0 : e.length) ?? 0;
|
|
1009
|
+
}
|
|
1010
|
+
getValueAt(e, t) {
|
|
1011
|
+
const s = this.properties[t];
|
|
1012
|
+
let o = this.filteredRows[e];
|
|
1013
|
+
return X(o) && (o = o.data), o ? this.getValueByT(o, s) : "";
|
|
1014
|
+
}
|
|
1015
|
+
getFilteredRows() {
|
|
1016
|
+
return this.filteredRows;
|
|
1017
|
+
}
|
|
1018
|
+
getAllRows() {
|
|
1019
|
+
return this.rows;
|
|
1020
|
+
}
|
|
1021
|
+
getRowHeight(e) {
|
|
1022
|
+
return this.defaultRowHeight;
|
|
1023
|
+
}
|
|
1024
|
+
getRowByIndex(e) {
|
|
1025
|
+
return this.filteredRows[e];
|
|
1026
|
+
}
|
|
1027
|
+
externalFilterChanged(e) {
|
|
1028
|
+
this.filteredRows = this.rows ? this.rows.filter(e) : [];
|
|
1029
|
+
}
|
|
1030
|
+
doSort(e) {
|
|
1031
|
+
for (const t of e) {
|
|
1032
|
+
const { columnIndex: s, sortState: o } = t, i = o === "asc" ? 1 : o === "desc" ? -1 : 0, r = this.properties[s];
|
|
1033
|
+
this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(r, i));
|
|
1034
|
+
}
|
|
1035
|
+
return !0;
|
|
1036
|
+
}
|
|
1037
|
+
getValueByT(e, t) {
|
|
1038
|
+
return t.includes(".") ? this.getPropertyValue(e, t.split(".")) : e[t];
|
|
1039
|
+
}
|
|
1040
|
+
changeColumnOrder(e, t) {
|
|
1041
|
+
this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
|
|
1042
|
+
}
|
|
1043
|
+
genericFlatTableSortComparator(e, t) {
|
|
1044
|
+
const s = this.columnDefs.find((o) => o.property === e);
|
|
1045
|
+
return (o, i) => {
|
|
1046
|
+
const r = this.getValueByT(o, e), l = this.getValueByT(i, e);
|
|
1047
|
+
return s != null && s.sortComparator ? t * s.sortComparator(r, l, o, i, t) : this.sorterService.genericSortComparator(r, l, t);
|
|
1048
|
+
};
|
|
1049
|
+
}
|
|
1050
|
+
getPropertyValue(e, t) {
|
|
1051
|
+
const s = t.shift(), o = e[s];
|
|
1052
|
+
return o && t.length ? this.getPropertyValue(o, t) : o;
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
class st {
|
|
883
1056
|
constructor(e) {
|
|
884
1057
|
this.tableScope = e;
|
|
885
1058
|
}
|
|
@@ -1105,6 +1278,16 @@ class Qe {
|
|
|
1105
1278
|
getTableModel() {
|
|
1106
1279
|
return this.tableScope.tableModel;
|
|
1107
1280
|
}
|
|
1281
|
+
getBodyModel() {
|
|
1282
|
+
return this.tableScope.tableModel.getBodyModel();
|
|
1283
|
+
}
|
|
1284
|
+
setRows(e) {
|
|
1285
|
+
const t = this.getBodyModel();
|
|
1286
|
+
t instanceof tt ? t.setRows(e) : console.warn("setRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof t);
|
|
1287
|
+
}
|
|
1288
|
+
reSort() {
|
|
1289
|
+
this.tableScope.reSort();
|
|
1290
|
+
}
|
|
1108
1291
|
}
|
|
1109
1292
|
class ce {
|
|
1110
1293
|
constructor(e) {
|
|
@@ -1173,7 +1356,7 @@ class ce {
|
|
|
1173
1356
|
// }
|
|
1174
1357
|
// }
|
|
1175
1358
|
}
|
|
1176
|
-
class
|
|
1359
|
+
class ot extends ce {
|
|
1177
1360
|
constructor(e) {
|
|
1178
1361
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
1179
1362
|
}
|
|
@@ -1195,14 +1378,14 @@ class et extends ce {
|
|
|
1195
1378
|
}
|
|
1196
1379
|
}
|
|
1197
1380
|
}
|
|
1198
|
-
class
|
|
1381
|
+
class it {
|
|
1199
1382
|
constructor(e = "collapsed", t = [], s = !1, o = !1) {
|
|
1200
1383
|
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = o;
|
|
1201
1384
|
}
|
|
1202
1385
|
}
|
|
1203
|
-
class
|
|
1386
|
+
class rt extends ce {
|
|
1204
1387
|
constructor(e) {
|
|
1205
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
1388
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new it(), this.load();
|
|
1206
1389
|
}
|
|
1207
1390
|
collapsedExpandedStateGet() {
|
|
1208
1391
|
return this.collapsedExpandedState;
|
|
@@ -1234,7 +1417,7 @@ class st extends ce {
|
|
|
1234
1417
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
1235
1418
|
}
|
|
1236
1419
|
}
|
|
1237
|
-
class
|
|
1420
|
+
class at extends ce {
|
|
1238
1421
|
constructor(e) {
|
|
1239
1422
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
1240
1423
|
}
|
|
@@ -1260,7 +1443,7 @@ class F {
|
|
|
1260
1443
|
this.left = e, this.width = t, this.height = s, this.top = o, this.index = i;
|
|
1261
1444
|
}
|
|
1262
1445
|
}
|
|
1263
|
-
class
|
|
1446
|
+
class lt {
|
|
1264
1447
|
constructor(e, t, s, o) {
|
|
1265
1448
|
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new F(), this.areaBodyCenterGeo = new F(), this.areaBodyEastGeo = new F();
|
|
1266
1449
|
const i = this.hostElement;
|
|
@@ -1466,7 +1649,7 @@ class A {
|
|
|
1466
1649
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
1467
1650
|
}
|
|
1468
1651
|
}
|
|
1469
|
-
class
|
|
1652
|
+
class nt {
|
|
1470
1653
|
constructor(e, t) {
|
|
1471
1654
|
this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
|
|
1472
1655
|
}
|
|
@@ -1499,22 +1682,22 @@ class rt {
|
|
|
1499
1682
|
return !1;
|
|
1500
1683
|
}
|
|
1501
1684
|
}
|
|
1502
|
-
class
|
|
1685
|
+
class ct {
|
|
1503
1686
|
constructor(e, t, s) {
|
|
1504
1687
|
this.header = e, this.body = t, this.footer = s;
|
|
1505
1688
|
}
|
|
1506
1689
|
}
|
|
1507
|
-
class
|
|
1690
|
+
class dt extends lt {
|
|
1508
1691
|
constructor(e, t, s, o) {
|
|
1509
1692
|
var r, l;
|
|
1510
1693
|
super(e, t, s, o), this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
1511
1694
|
header: [],
|
|
1512
1695
|
body: [],
|
|
1513
1696
|
footer: []
|
|
1514
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
1697
|
+
}, this.tree = !1, this.colAndRowspanModels = new ct(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (l = this.tableOptions) != null && l.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), re(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
1515
1698
|
(n) => {
|
|
1516
1699
|
var d;
|
|
1517
|
-
this.colAndRowspanModels[n] = new
|
|
1700
|
+
this.colAndRowspanModels[n] = new nt(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
|
|
1518
1701
|
}
|
|
1519
1702
|
);
|
|
1520
1703
|
}
|
|
@@ -1776,7 +1959,7 @@ class lt extends it {
|
|
|
1776
1959
|
let p = t;
|
|
1777
1960
|
const u = this.tableModel.getColumnCount(), g = this.tableModel.getFixedRightColumnCount(), b = this.tableModel.getFixedLeftColumnCount();
|
|
1778
1961
|
for (let m = 0; m < h; m++) {
|
|
1779
|
-
const x = p,
|
|
1962
|
+
const x = p, v = m === h - 1, E = this.tableModel.getRowHeight(e, m);
|
|
1780
1963
|
if (x + E > 0) {
|
|
1781
1964
|
this.firstVisibleRowIndex = m;
|
|
1782
1965
|
let y = { left: l, width: n, height: E, top: x, index: m }, S = this.dom.addRowDiv(o, y, m, e, "center");
|
|
@@ -1791,7 +1974,7 @@ class lt extends it {
|
|
|
1791
1974
|
columnIndexStart: k,
|
|
1792
1975
|
columnIndexEnd: u - g - 1,
|
|
1793
1976
|
verticalFixed: !1,
|
|
1794
|
-
lastRowOfModel:
|
|
1977
|
+
lastRowOfModel: v
|
|
1795
1978
|
}), d.left > 0 && (y = { left: l, width: this.areaBodyWestGeo.width, height: E, top: x, index: m }, S = this.dom.addRowDiv(s, y, m, e, "west"), this.adjustColumnsToRowParent({
|
|
1796
1979
|
areaIdent: e,
|
|
1797
1980
|
sideIdent: "west",
|
|
@@ -1802,7 +1985,7 @@ class lt extends it {
|
|
|
1802
1985
|
columnIndexStart: 0,
|
|
1803
1986
|
columnIndexEnd: k - 1,
|
|
1804
1987
|
verticalFixed: !0,
|
|
1805
|
-
lastRowOfModel:
|
|
1988
|
+
lastRowOfModel: v
|
|
1806
1989
|
})), d.right > 0 && (y = { left: l, width: this.areaBodyEastGeo.width, height: E, top: x, index: m }, S = this.dom.addRowDiv(i, y, m, e, "east"), this.adjustColumnsToRowParent({
|
|
1807
1990
|
areaIdent: e,
|
|
1808
1991
|
sideIdent: "east",
|
|
@@ -1813,9 +1996,9 @@ class lt extends it {
|
|
|
1813
1996
|
columnIndexStart: u - g,
|
|
1814
1997
|
columnIndexEnd: u - 1,
|
|
1815
1998
|
verticalFixed: !0,
|
|
1816
|
-
lastRowOfModel:
|
|
1999
|
+
lastRowOfModel: v
|
|
1817
2000
|
})), e === "header" && this.tree && m === h - 1) {
|
|
1818
|
-
const
|
|
2001
|
+
const T = this.dom.applyStyle(
|
|
1819
2002
|
this.dom.setAttribute(
|
|
1820
2003
|
this.dom.addDiv(S, new F(16, 20, 20, 8)),
|
|
1821
2004
|
"data-ge-action",
|
|
@@ -1824,8 +2007,8 @@ class lt extends it {
|
|
|
1824
2007
|
{ cursor: "pointer" }
|
|
1825
2008
|
), D = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
1826
2009
|
if (D) {
|
|
1827
|
-
const
|
|
1828
|
-
this.dom.domService.appendChild(
|
|
2010
|
+
const _ = this.dom.domService.createText(D.content);
|
|
2011
|
+
this.dom.domService.appendChild(T, _), D.style && this.dom.applyStyleString(T, D.style);
|
|
1829
2012
|
}
|
|
1830
2013
|
}
|
|
1831
2014
|
}
|
|
@@ -1836,16 +2019,16 @@ class lt extends it {
|
|
|
1836
2019
|
const m = ((f = this.colAndRowspanModels[e]) == null ? void 0 : f.getRanges()) ?? [];
|
|
1837
2020
|
if (m.length)
|
|
1838
2021
|
for (const x of m) {
|
|
1839
|
-
let
|
|
2022
|
+
let v = 0, E = o.child, y = "center";
|
|
1840
2023
|
if (x.c1 < b)
|
|
1841
2024
|
E = s.child, y = "west";
|
|
1842
2025
|
else if (g > 0 && x.c1 >= u - g)
|
|
1843
2026
|
E = i.child, y = "east";
|
|
1844
2027
|
else {
|
|
1845
2028
|
const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1846
|
-
|
|
2029
|
+
v = this.scrollFactorX * S - this.areaBodyWestGeo.width, y = "center";
|
|
1847
2030
|
}
|
|
1848
|
-
this.drawBigCell(x,
|
|
2031
|
+
this.drawBigCell(x, v, t, c, E, y);
|
|
1849
2032
|
}
|
|
1850
2033
|
}
|
|
1851
2034
|
}
|
|
@@ -1955,18 +2138,18 @@ class lt extends it {
|
|
|
1955
2138
|
for (let f = l; f <= n; f++) {
|
|
1956
2139
|
const m = g, x = this.tableModel.getColumnWidth(f);
|
|
1957
2140
|
if (x > 0 && m + x > 0) {
|
|
1958
|
-
let
|
|
2141
|
+
let v = o.height;
|
|
1959
2142
|
const E = s.getRowspanAt(r, f), y = s.getColspanAt(r, f);
|
|
1960
|
-
E > 1 && (
|
|
2143
|
+
E > 1 && (v = this.getRowHeights(r, r + E - 1, s).reduce((T, D) => T + D, 0));
|
|
1961
2144
|
let S = x;
|
|
1962
|
-
y > 1 && (S = this.getColumnWidths(f, f + y - 1).reduce((
|
|
2145
|
+
y > 1 && (S = this.getColumnWidths(f, f + y - 1).reduce((T, D) => T + D, 0));
|
|
1963
2146
|
let k = !1;
|
|
1964
2147
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (b = this.colAndRowspanModels[e]) != null && b.isInRange(r, f) && (k = !0), this.draggingTargetColumnIndex === f && e !== "header") {
|
|
1965
|
-
this.renderDragTargetDiv(i, m, p, S,
|
|
1966
|
-
const
|
|
1967
|
-
this.dom.addColumnBorderDivs(this.tableOptions, i,
|
|
2148
|
+
this.renderDragTargetDiv(i, m, p, S, v);
|
|
2149
|
+
const T = { left: m, top: p, width: S, height: v };
|
|
2150
|
+
this.dom.addColumnBorderDivs(this.tableOptions, i, T, e, t);
|
|
1968
2151
|
} else {
|
|
1969
|
-
const
|
|
2152
|
+
const T = this.renderSelectedBackgroundDiv(k, u, t, s, r, f, i, m, p, S, v);
|
|
1970
2153
|
"gammaCells" in s && s.getValueAt(r, f) && (k = !1), k || this.renderCell({
|
|
1971
2154
|
areaModel: s,
|
|
1972
2155
|
areaIdent: e,
|
|
@@ -1976,9 +2159,9 @@ class lt extends it {
|
|
|
1976
2159
|
left: m,
|
|
1977
2160
|
top: p,
|
|
1978
2161
|
width: S,
|
|
1979
|
-
height:
|
|
2162
|
+
height: v,
|
|
1980
2163
|
parent: i,
|
|
1981
|
-
cellSelected:
|
|
2164
|
+
cellSelected: T,
|
|
1982
2165
|
lastRowOfModel: c,
|
|
1983
2166
|
gammaRange: !0
|
|
1984
2167
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
@@ -1987,7 +2170,7 @@ class lt extends it {
|
|
|
1987
2170
|
cellLeft: m,
|
|
1988
2171
|
cellTop: p,
|
|
1989
2172
|
cellWidth: S,
|
|
1990
|
-
cellHeight:
|
|
2173
|
+
cellHeight: v,
|
|
1991
2174
|
parent: i
|
|
1992
2175
|
});
|
|
1993
2176
|
}
|
|
@@ -2025,16 +2208,16 @@ class lt extends it {
|
|
|
2025
2208
|
var pe;
|
|
2026
2209
|
const u = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), g = { left: r, width: l, height: n, top: d, index: i }, b = e.getRowByIndex(o);
|
|
2027
2210
|
let f = "none";
|
|
2028
|
-
if (i === this.getTreeArrowColumnIndex() &&
|
|
2029
|
-
const
|
|
2030
|
-
(pe =
|
|
2211
|
+
if (i === this.getTreeArrowColumnIndex() && X(b)) {
|
|
2212
|
+
const C = b;
|
|
2213
|
+
(pe = C.children) != null && pe.length ? C.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
|
|
2031
2214
|
}
|
|
2032
2215
|
let x;
|
|
2033
2216
|
if (t === "header") {
|
|
2034
|
-
const
|
|
2035
|
-
(!(
|
|
2217
|
+
const C = this.tableModel.getColumnDef(i);
|
|
2218
|
+
(!(C != null && C.sortIconVisible) || C != null && C.sortIconVisible()) && (x = C == null ? void 0 : C.sortState);
|
|
2036
2219
|
}
|
|
2037
|
-
const
|
|
2220
|
+
const v = e.getValueAt(o, i), E = u ? "" : `${v}`, y = e.isRowChecked(o), S = this.dom.addColumnDiv(
|
|
2038
2221
|
{
|
|
2039
2222
|
parent: c,
|
|
2040
2223
|
geo: g,
|
|
@@ -2050,20 +2233,20 @@ class lt extends it {
|
|
|
2050
2233
|
}
|
|
2051
2234
|
), k = e.getTooltipAt(o, i);
|
|
2052
2235
|
k && this.dom.setAttribute(S, "title", k);
|
|
2053
|
-
const
|
|
2054
|
-
|
|
2236
|
+
const T = this.tableModel.getColumnDef(i);
|
|
2237
|
+
T && T.classes[t] && this.dom.addClasses(T.classes[t], S);
|
|
2055
2238
|
let D;
|
|
2056
|
-
u && (D = u.render(S, o, i, t, e,
|
|
2057
|
-
const
|
|
2058
|
-
if (
|
|
2059
|
-
const
|
|
2060
|
-
|
|
2239
|
+
u && (D = u.render(S, o, i, t, e, v, this.dom.domService));
|
|
2240
|
+
const _ = e.getCustomClassesAt(o, i);
|
|
2241
|
+
if (_.length && this.dom.addClasses(_, S), this.dom.addColumnBorderDivs(this.tableOptions, c, g, t, s), h && this.dom.addHorizontalBorder({ left: r, width: l, height: n, top: d + n }, c), this.getFocusModel && t === "body") {
|
|
2242
|
+
const C = this.getFocusModel();
|
|
2243
|
+
C != null && C.hasFocus(o, i) && this.dom.addFocusBorderDivs(c, g, {});
|
|
2061
2244
|
}
|
|
2062
2245
|
t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
|
|
2063
|
-
const
|
|
2064
|
-
if (
|
|
2065
|
-
for (const
|
|
2066
|
-
this.dom.setStyle(S,
|
|
2246
|
+
const Q = e.getCustomStyleAt(o, i);
|
|
2247
|
+
if (Q)
|
|
2248
|
+
for (const C in Q)
|
|
2249
|
+
this.dom.setStyle(S, C, Q[C]);
|
|
2067
2250
|
return [S, D];
|
|
2068
2251
|
}
|
|
2069
2252
|
/**
|
|
@@ -2241,8 +2424,8 @@ class lt extends it {
|
|
|
2241
2424
|
}, m = this.dom.addColumnDiv(f);
|
|
2242
2425
|
let x;
|
|
2243
2426
|
g && (x = g.render(m, d, l, t, i, u, this.dom.domService), x && this.cleanupFunctions[t].push(x));
|
|
2244
|
-
const
|
|
2245
|
-
|
|
2427
|
+
const v = i.getCustomClassesAt(d, l);
|
|
2428
|
+
v.length && this.dom.addClasses(v, m);
|
|
2246
2429
|
const E = this.tableModel.getColumnDef(l);
|
|
2247
2430
|
E && E.classes[t] && this.dom.addClasses(E.classes[t], m), this.dom.addColumnBorderDivs(this.tableOptions, n, p, t, o);
|
|
2248
2431
|
const y = i.getCustomStyleAt(d, l);
|
|
@@ -2383,12 +2566,12 @@ class lt extends it {
|
|
|
2383
2566
|
n.setAttribute(c, "data-col-index", `${t}`), n.setAttribute(c, "data-row-index", `${e}`), n.setAttribute(c, "data-area", "header"), n.setAttribute(c, "data-ge-action", "resize-column"), n.addClass(c, "ge-table-column-resize-handle"), n.setStyle(c, "display", "clip"), n.setStyle(c, "position", "absolute"), n.setStyle(c, "cursor", "col-resize"), n.setStyle(c, "left", `${s + i - d}px`), n.setStyle(c, "top", `${o}px`), n.setStyle(c, "width", `${d}px`), n.setStyle(c, "height", `${r}px`), n.appendChild(l, c);
|
|
2384
2567
|
}
|
|
2385
2568
|
}
|
|
2386
|
-
class
|
|
2569
|
+
class ht {
|
|
2387
2570
|
constructor(e, t) {
|
|
2388
2571
|
this.columnIndex = e, this.sortState = t;
|
|
2389
2572
|
}
|
|
2390
2573
|
}
|
|
2391
|
-
class
|
|
2574
|
+
class pt {
|
|
2392
2575
|
constructor(e) {
|
|
2393
2576
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
2394
2577
|
}
|
|
@@ -2410,7 +2593,7 @@ class ct {
|
|
|
2410
2593
|
}
|
|
2411
2594
|
}
|
|
2412
2595
|
}
|
|
2413
|
-
class
|
|
2596
|
+
class gt {
|
|
2414
2597
|
constructor(e = -1, t = -1) {
|
|
2415
2598
|
this.rowIndex = e, this.columnIndex = t;
|
|
2416
2599
|
}
|
|
@@ -2420,10 +2603,10 @@ class de {
|
|
|
2420
2603
|
this.cells = e;
|
|
2421
2604
|
}
|
|
2422
2605
|
static createSingle(e, t) {
|
|
2423
|
-
return new de([new
|
|
2606
|
+
return new de([new gt(e, t)]);
|
|
2424
2607
|
}
|
|
2425
2608
|
}
|
|
2426
|
-
class
|
|
2609
|
+
class ft {
|
|
2427
2610
|
constructor(e) {
|
|
2428
2611
|
var t, s;
|
|
2429
2612
|
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);
|
|
@@ -2464,7 +2647,7 @@ class ht {
|
|
|
2464
2647
|
});
|
|
2465
2648
|
}
|
|
2466
2649
|
}
|
|
2467
|
-
class
|
|
2650
|
+
class ut {
|
|
2468
2651
|
get() {
|
|
2469
2652
|
return {
|
|
2470
2653
|
f2: "START_EDITING",
|
|
@@ -2484,7 +2667,7 @@ class pt {
|
|
|
2484
2667
|
};
|
|
2485
2668
|
}
|
|
2486
2669
|
}
|
|
2487
|
-
class
|
|
2670
|
+
class mt {
|
|
2488
2671
|
get() {
|
|
2489
2672
|
return {
|
|
2490
2673
|
f2: "START_EDITING",
|
|
@@ -2506,7 +2689,7 @@ class gt {
|
|
|
2506
2689
|
};
|
|
2507
2690
|
}
|
|
2508
2691
|
}
|
|
2509
|
-
class
|
|
2692
|
+
class bt {
|
|
2510
2693
|
constructor(e) {
|
|
2511
2694
|
this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
|
|
2512
2695
|
}
|
|
@@ -2527,7 +2710,7 @@ class ft {
|
|
|
2527
2710
|
this.assignPredefinedSystemShortcutMappings(), Object.assign(this.shortcutActionIdMapping, this.tableScope.tableOptions.shortcutActionIdMapping), this.isDebug() && console.debug("ShortcutService", this.shortcutActionIdMapping), this.tableScope.hostElement.addEventListener("keydown", this.onKeyDown.bind(this));
|
|
2528
2711
|
}
|
|
2529
2712
|
assignPredefinedSystemShortcutMappings() {
|
|
2530
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
2713
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new mt().get()) : Object.assign(this.shortcutActionIdMapping, new ut().get());
|
|
2531
2714
|
}
|
|
2532
2715
|
isMacintosh() {
|
|
2533
2716
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -2626,7 +2809,7 @@ class Me {
|
|
|
2626
2809
|
e.setAttribute(t, s);
|
|
2627
2810
|
}
|
|
2628
2811
|
}
|
|
2629
|
-
class
|
|
2812
|
+
class St {
|
|
2630
2813
|
render(e, t, s, o, i, r, l) {
|
|
2631
2814
|
if (i.isEditable(t, s)) {
|
|
2632
2815
|
l.addClass(e, "ge-table-row-input-div");
|
|
@@ -2647,7 +2830,7 @@ class ut {
|
|
|
2647
2830
|
}
|
|
2648
2831
|
}
|
|
2649
2832
|
}
|
|
2650
|
-
class
|
|
2833
|
+
class yt {
|
|
2651
2834
|
constructor(e = "none", t = "single") {
|
|
2652
2835
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
|
|
2653
2836
|
}
|
|
@@ -2729,7 +2912,7 @@ class mt {
|
|
|
2729
2912
|
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), this.fireChangeEvent());
|
|
2730
2913
|
}
|
|
2731
2914
|
}
|
|
2732
|
-
class
|
|
2915
|
+
class xt {
|
|
2733
2916
|
constructor(e = "none") {
|
|
2734
2917
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
2735
2918
|
}
|
|
@@ -2766,7 +2949,7 @@ class bt {
|
|
|
2766
2949
|
return [this.rowIndex, this.columnIndex];
|
|
2767
2950
|
}
|
|
2768
2951
|
}
|
|
2769
|
-
class
|
|
2952
|
+
class Re {
|
|
2770
2953
|
constructor(e = new I(
|
|
2771
2954
|
"❯",
|
|
2772
2955
|
"",
|
|
@@ -2780,14 +2963,14 @@ class Te {
|
|
|
2780
2963
|
}
|
|
2781
2964
|
// `⊖ `, `⊕ `;
|
|
2782
2965
|
}
|
|
2783
|
-
const
|
|
2784
|
-
class
|
|
2966
|
+
const wt = new yt(), vt = new xt("cell");
|
|
2967
|
+
class Te {
|
|
2785
2968
|
constructor() {
|
|
2786
2969
|
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 = {
|
|
2787
2970
|
header: 34,
|
|
2788
2971
|
body: 34,
|
|
2789
2972
|
footer: 34
|
|
2790
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Ee(), this.headerGroupOptions = new
|
|
2973
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Ee(), this.headerGroupOptions = new Re(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Ae(), this.sortOrder = ["asc", "desc"], this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new St(), this.getSelectionModel = () => wt, this.getFocusModel = () => vt;
|
|
2791
2974
|
}
|
|
2792
2975
|
}
|
|
2793
2976
|
const W = class W {
|
|
@@ -2874,8 +3057,8 @@ const W = class W {
|
|
|
2874
3057
|
};
|
|
2875
3058
|
W.columnSeparatorChar = " ", W.rowSeparatorChar = `
|
|
2876
3059
|
`;
|
|
2877
|
-
let
|
|
2878
|
-
class
|
|
3060
|
+
let K = W;
|
|
3061
|
+
class Ct {
|
|
2879
3062
|
constructor(e, t = 500) {
|
|
2880
3063
|
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(Ye(this.handleResize.bind(this), t)).observe(this.tableScope.hostElement);
|
|
2881
3064
|
}
|
|
@@ -2884,7 +3067,7 @@ class xt {
|
|
|
2884
3067
|
this.tableScope.recalcColumnWidths(s);
|
|
2885
3068
|
}
|
|
2886
3069
|
}
|
|
2887
|
-
class
|
|
3070
|
+
class Et {
|
|
2888
3071
|
/**
|
|
2889
3072
|
* Downloads a matrix data as an Excel file.
|
|
2890
3073
|
*
|
|
@@ -2990,14 +3173,14 @@ class vt {
|
|
|
2990
3173
|
return this.createZip(s);
|
|
2991
3174
|
}
|
|
2992
3175
|
}
|
|
2993
|
-
class he extends
|
|
2994
|
-
constructor(e, t, s, o, i, r = new
|
|
3176
|
+
class he extends dt {
|
|
3177
|
+
constructor(e, t, s, o, i, r = new K(), l = new Et()) {
|
|
2995
3178
|
var c;
|
|
2996
|
-
if (super(e, t, new Je(s), o), this.eventListener = i, this.copyService = r, this.excelService = l, this.licenseManager = B.getInstance(), this.selectionService = new
|
|
3179
|
+
if (super(e, t, new Je(s), o), this.eventListener = i, this.copyService = r, this.excelService = l, this.licenseManager = B.getInstance(), this.selectionService = new ft(this), this.api = new st(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, t.setTableScope(this), i || (this.eventListener = new ue()), (c = this.tableOptions) != null && c.autoRestoreOptions) {
|
|
2997
3180
|
const h = this.tableOptions.autoRestoreOptions, p = h.getStorageKeyFn;
|
|
2998
|
-
p && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new
|
|
3181
|
+
p && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new ot(p)), h.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new rt(p)), h.autoRestoreSortingState && (this.storeSortingService = new at(p)));
|
|
2999
3182
|
}
|
|
3000
|
-
this.mouseHandler = new Ze(this), this.inputHandler = new
|
|
3183
|
+
this.mouseHandler = new Ze(this), this.inputHandler = new pt(this), this.resizeHandler = new Ct(this, o.resizeEventDebounceDelay), this.shortcutService = new bt(this), this.shortcutService.addListener(this.selectionService);
|
|
3001
3184
|
const n = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
3002
3185
|
n && n.addEventSelectionChangedListener(this);
|
|
3003
3186
|
const d = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
@@ -3015,7 +3198,7 @@ class he extends lt {
|
|
|
3015
3198
|
*
|
|
3016
3199
|
* @return {TableScope} - The newly created TableScope instance.
|
|
3017
3200
|
*/
|
|
3018
|
-
static create(e, t, s = new
|
|
3201
|
+
static create(e, t, s = new Te(), o = new ue(), i = new Me(), r = new K()) {
|
|
3019
3202
|
return new he(e, t, i, s, o, r);
|
|
3020
3203
|
}
|
|
3021
3204
|
/**
|
|
@@ -3213,7 +3396,7 @@ class he extends lt {
|
|
|
3213
3396
|
const o = this.tableModel.getColumnDef(s);
|
|
3214
3397
|
if (o != null && o.sortable && o.sortable()) {
|
|
3215
3398
|
e.preventDefault(), e.stopPropagation();
|
|
3216
|
-
const l = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, n = o.sortState ?? "", d = l[(l.indexOf(n) + 1) % l.length], c = new
|
|
3399
|
+
const l = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, n = o.sortState ?? "", d = l[(l.indexOf(n) + 1) % l.length], c = new ht(s, d);
|
|
3217
3400
|
this.tableModel.doSort([c]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((p) => p.sortState = ""), o.sortState = d), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([c]);
|
|
3218
3401
|
}
|
|
3219
3402
|
}
|
|
@@ -3404,10 +3587,15 @@ class he extends lt {
|
|
|
3404
3587
|
recalcWrappers() {
|
|
3405
3588
|
this.tableModel.recalcPadding(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows();
|
|
3406
3589
|
}
|
|
3590
|
+
reSort() {
|
|
3591
|
+
var t;
|
|
3592
|
+
let e = ((t = this.storeSortingService) == null ? void 0 : t.getSortItems()) ?? [];
|
|
3593
|
+
this.tableModel.doSort(e);
|
|
3594
|
+
}
|
|
3407
3595
|
}
|
|
3408
|
-
const
|
|
3596
|
+
const Y = class Y {
|
|
3409
3597
|
};
|
|
3410
|
-
|
|
3598
|
+
Y.themes = ["light", "combat", "paper", "blackboard"], Y.vars = {
|
|
3411
3599
|
light: `html[data-theme="light"] {
|
|
3412
3600
|
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
3413
3601
|
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
@@ -3641,15 +3829,15 @@ K.themes = ["light", "combat", "paper", "blackboard"], K.vars = {
|
|
|
3641
3829
|
--ge-table-drop-zone-bg: #758129;
|
|
3642
3830
|
}`
|
|
3643
3831
|
};
|
|
3644
|
-
let me =
|
|
3645
|
-
const
|
|
3646
|
-
constructor(e = new
|
|
3832
|
+
let me = Y;
|
|
3833
|
+
const J = class J {
|
|
3834
|
+
constructor(e = new Re()) {
|
|
3647
3835
|
this.headerGroupOptions = e;
|
|
3648
3836
|
}
|
|
3649
3837
|
render(e, t, s, o, i, r, l) {
|
|
3650
3838
|
const n = r != null && r.data ? r.data : "";
|
|
3651
3839
|
if (r) {
|
|
3652
|
-
const { toggle: d, visibility: c, closed: h } = r, p = d ?
|
|
3840
|
+
const { toggle: d, visibility: c, closed: h } = r, p = d ? J.toggleHeaderGroup : "";
|
|
3653
3841
|
this.addText(e, o, t, s, n, p), d && c !== "always" && this.addArrowDiv(l, e, !h, t, s, o, p);
|
|
3654
3842
|
} else
|
|
3655
3843
|
this.addText(e, o, t, s, n, "");
|
|
@@ -3681,14 +3869,14 @@ const Y = class Y {
|
|
|
3681
3869
|
}
|
|
3682
3870
|
}
|
|
3683
3871
|
};
|
|
3684
|
-
|
|
3685
|
-
let be =
|
|
3686
|
-
var
|
|
3687
|
-
const
|
|
3872
|
+
J.toggleHeaderGroup = "toggleHeaderGroup";
|
|
3873
|
+
let be = J;
|
|
3874
|
+
var At = /* @__PURE__ */ je("<div>");
|
|
3875
|
+
const Tt = (a) => {
|
|
3688
3876
|
let e;
|
|
3689
|
-
const t =
|
|
3877
|
+
const t = Ce({
|
|
3690
3878
|
tableModel: null,
|
|
3691
|
-
tableOptions: new
|
|
3879
|
+
tableOptions: new Te()
|
|
3692
3880
|
}, a);
|
|
3693
3881
|
return Be(() => {
|
|
3694
3882
|
const s = {
|
|
@@ -3763,12 +3951,12 @@ const At = (a) => {
|
|
|
3763
3951
|
});
|
|
3764
3952
|
e && e.dispatchEvent(i), t.licenseKey && B.getInstance().setLicenseKey(t.licenseKey);
|
|
3765
3953
|
}), (() => {
|
|
3766
|
-
var s =
|
|
3954
|
+
var s = At(), o = e;
|
|
3767
3955
|
return typeof o == "function" ? Xe(o, s) : e = s, s;
|
|
3768
3956
|
})();
|
|
3769
3957
|
};
|
|
3770
3958
|
export {
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3959
|
+
Mt as ComponentRendererWrapper,
|
|
3960
|
+
Tt as GuiexpertTable,
|
|
3961
|
+
Rt as GuiexpertTableProps
|
|
3774
3962
|
};
|