@guiexpert/solid-table 1.1.66 → 1.1.68
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 +284 -242
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
const
|
|
2
|
-
equals:
|
|
1
|
+
const Fe = (l, e) => l === e, oe = Symbol("solid-proxy"), Ie = typeof Proxy == "function", fe = {
|
|
2
|
+
equals: Fe
|
|
3
3
|
};
|
|
4
|
-
let
|
|
5
|
-
const L = 1,
|
|
4
|
+
let we = ve;
|
|
5
|
+
const L = 1, z = 2, xe = {
|
|
6
6
|
owned: null,
|
|
7
7
|
cleanups: null,
|
|
8
8
|
context: null,
|
|
9
9
|
owner: null
|
|
10
10
|
};
|
|
11
11
|
var R = null;
|
|
12
|
-
let
|
|
13
|
-
function
|
|
14
|
-
const t =
|
|
12
|
+
let te = null, Oe = null, x = null, M = null, O = null, Z = 0;
|
|
13
|
+
function Le(l, e) {
|
|
14
|
+
const t = x, s = R, o = l.length === 0, i = e === void 0 ? s : e, r = o ? xe : {
|
|
15
15
|
owned: null,
|
|
16
16
|
cleanups: null,
|
|
17
17
|
context: i ? i.context : null,
|
|
18
18
|
owner: i
|
|
19
|
-
}, a = o ? l : () => l(() =>
|
|
20
|
-
R = r,
|
|
19
|
+
}, a = o ? l : () => l(() => Q(() => $(r)));
|
|
20
|
+
R = r, x = null;
|
|
21
21
|
try {
|
|
22
|
-
return
|
|
22
|
+
return _(a, !0);
|
|
23
23
|
} finally {
|
|
24
|
-
|
|
24
|
+
x = t, R = s;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
const s =
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
function Le(l, e, t) {
|
|
32
|
-
ye = _e;
|
|
33
|
-
const s = le(l, e, !1, L);
|
|
34
|
-
s.user = !0, O ? O.push(s) : $(s);
|
|
27
|
+
function ie(l, e, t) {
|
|
28
|
+
const s = ae(l, e, !1, L);
|
|
29
|
+
V(s);
|
|
35
30
|
}
|
|
36
31
|
function Be(l, e, t) {
|
|
37
|
-
|
|
38
|
-
const s =
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
32
|
+
we = Ne;
|
|
33
|
+
const s = ae(l, e, !1, L);
|
|
34
|
+
s.user = !0, O ? O.push(s) : V(s);
|
|
35
|
+
}
|
|
36
|
+
function Pe(l, e, t) {
|
|
37
|
+
t = t ? Object.assign({}, fe, t) : fe;
|
|
38
|
+
const s = ae(l, e, !0, 0);
|
|
39
|
+
return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, V(s), He.bind(s);
|
|
40
|
+
}
|
|
41
|
+
function Q(l) {
|
|
42
|
+
if (x === null) return l();
|
|
43
|
+
const e = x;
|
|
44
|
+
x = null;
|
|
45
45
|
try {
|
|
46
46
|
return l();
|
|
47
47
|
} finally {
|
|
48
|
-
|
|
48
|
+
x = e;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
|
|
51
|
+
function We(l) {
|
|
52
|
+
Be(() => Q(l));
|
|
53
53
|
}
|
|
54
54
|
function He() {
|
|
55
55
|
if (this.sources && this.state)
|
|
56
|
-
if (this.state === L)
|
|
56
|
+
if (this.state === L) V(this);
|
|
57
57
|
else {
|
|
58
58
|
const l = M;
|
|
59
|
-
M = null,
|
|
59
|
+
M = null, _(() => j(this), !1), M = l;
|
|
60
60
|
}
|
|
61
|
-
if (
|
|
61
|
+
if (x) {
|
|
62
62
|
const l = this.observers ? this.observers.length : 0;
|
|
63
|
-
|
|
63
|
+
x.sources ? (x.sources.push(this), x.sourceSlots.push(l)) : (x.sources = [this], x.sourceSlots = [l]), this.observers ? (this.observers.push(x), this.observerSlots.push(x.sources.length - 1)) : (this.observers = [x], this.observerSlots = [x.sources.length - 1]);
|
|
64
64
|
}
|
|
65
65
|
return this.value;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function $e(l, e, t) {
|
|
68
68
|
let s = l.value;
|
|
69
|
-
return (!l.comparator || !l.comparator(s, e)) && (l.value = e, l.observers && l.observers.length &&
|
|
69
|
+
return (!l.comparator || !l.comparator(s, e)) && (l.value = e, l.observers && l.observers.length && _(() => {
|
|
70
70
|
for (let o = 0; o < l.observers.length; o += 1) {
|
|
71
|
-
const i = l.observers[o], r =
|
|
72
|
-
r &&
|
|
71
|
+
const i = l.observers[o], r = te && te.running;
|
|
72
|
+
r && te.disposed.has(i), (r ? !i.tState : !i.state) && (i.pure ? M.push(i) : O.push(i), i.observers && Ce(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 V(l) {
|
|
79
79
|
if (!l.fn) return;
|
|
80
|
-
|
|
81
|
-
const e =
|
|
82
|
-
|
|
80
|
+
$(l);
|
|
81
|
+
const e = Z;
|
|
82
|
+
Ve(
|
|
83
83
|
l,
|
|
84
84
|
l.value,
|
|
85
85
|
e
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Ve(l, e, t) {
|
|
89
89
|
let s;
|
|
90
|
-
const o = R, i =
|
|
91
|
-
|
|
90
|
+
const o = R, i = x;
|
|
91
|
+
x = R = l;
|
|
92
92
|
try {
|
|
93
93
|
s = l.fn(e);
|
|
94
94
|
} catch (r) {
|
|
95
|
-
return l.pure && (l.state = L, l.owned && l.owned.forEach(
|
|
95
|
+
return l.pure && (l.state = L, l.owned && l.owned.forEach($), l.owned = null), l.updatedAt = t + 1, Ee(r);
|
|
96
96
|
} finally {
|
|
97
|
-
|
|
97
|
+
x = i, R = o;
|
|
98
98
|
}
|
|
99
|
-
(!l.updatedAt || l.updatedAt <= t) && (l.updatedAt != null && "observers" in l ?
|
|
99
|
+
(!l.updatedAt || l.updatedAt <= t) && (l.updatedAt != null && "observers" in l ? $e(l, s) : l.value = s, l.updatedAt = t);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function ae(l, e, t, s = L, o) {
|
|
102
102
|
const i = {
|
|
103
103
|
fn: l,
|
|
104
104
|
state: s,
|
|
@@ -114,65 +114,65 @@ function le(l, e, t, s = L, o) {
|
|
|
114
114
|
};
|
|
115
115
|
return R === null || R !== xe && (R.owned ? R.owned.push(i) : R.owned = [i]), i;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function U(l) {
|
|
118
118
|
if (l.state === 0) return;
|
|
119
|
-
if (l.state ===
|
|
120
|
-
if (l.suspense &&
|
|
119
|
+
if (l.state === z) return j(l);
|
|
120
|
+
if (l.suspense && Q(l.suspense.inFallback)) return l.suspense.effects.push(l);
|
|
121
121
|
const e = [l];
|
|
122
|
-
for (; (l = l.owner) && (!l.updatedAt || l.updatedAt <
|
|
122
|
+
for (; (l = l.owner) && (!l.updatedAt || l.updatedAt < Z); )
|
|
123
123
|
l.state && e.push(l);
|
|
124
124
|
for (let t = e.length - 1; t >= 0; t--)
|
|
125
125
|
if (l = e[t], l.state === L)
|
|
126
|
-
|
|
127
|
-
else if (l.state ===
|
|
126
|
+
V(l);
|
|
127
|
+
else if (l.state === z) {
|
|
128
128
|
const s = M;
|
|
129
|
-
M = null,
|
|
129
|
+
M = null, _(() => j(l, e[0]), !1), M = s;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function _(l, e) {
|
|
133
133
|
if (M) return l();
|
|
134
134
|
let t = !1;
|
|
135
|
-
e || (M = []), O ? t = !0 : O = [],
|
|
135
|
+
e || (M = []), O ? t = !0 : O = [], Z++;
|
|
136
136
|
try {
|
|
137
137
|
const s = l();
|
|
138
|
-
return
|
|
138
|
+
return _e(t), s;
|
|
139
139
|
} catch (s) {
|
|
140
|
-
t || (O = null), M = null,
|
|
140
|
+
t || (O = null), M = null, Ee(s);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
if (M && (
|
|
143
|
+
function _e(l) {
|
|
144
|
+
if (M && (ve(M), M = null), l) return;
|
|
145
145
|
const e = O;
|
|
146
|
-
O = null, e.length &&
|
|
146
|
+
O = null, e.length && _(() => we(e), !1);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
for (let e = 0; e < l.length; e++)
|
|
148
|
+
function ve(l) {
|
|
149
|
+
for (let e = 0; e < l.length; e++) U(l[e]);
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function Ne(l) {
|
|
152
152
|
let e, t = 0;
|
|
153
153
|
for (e = 0; e < l.length; e++) {
|
|
154
154
|
const s = l[e];
|
|
155
|
-
s.user ? l[t++] = s :
|
|
155
|
+
s.user ? l[t++] = s : U(s);
|
|
156
156
|
}
|
|
157
|
-
for (e = 0; e < t; e++)
|
|
157
|
+
for (e = 0; e < t; e++) U(l[e]);
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function j(l, e) {
|
|
160
160
|
l.state = 0;
|
|
161
161
|
for (let t = 0; t < l.sources.length; t += 1) {
|
|
162
162
|
const s = l.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 < Z) && U(s) : o === z && j(s, e);
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
function Ce(l) {
|
|
170
170
|
for (let e = 0; e < l.observers.length; e += 1) {
|
|
171
171
|
const t = l.observers[e];
|
|
172
|
-
t.state || (t.state =
|
|
172
|
+
t.state || (t.state = z, t.pure ? M.push(t) : O.push(t), t.observers && Ce(t));
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function $(l) {
|
|
176
176
|
let e;
|
|
177
177
|
if (l.sources)
|
|
178
178
|
for (; l.sources.length; ) {
|
|
@@ -183,11 +183,11 @@ function W(l) {
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
if (l.tOwned) {
|
|
186
|
-
for (e = l.tOwned.length - 1; e >= 0; e--)
|
|
186
|
+
for (e = l.tOwned.length - 1; e >= 0; e--) $(l.tOwned[e]);
|
|
187
187
|
delete l.tOwned;
|
|
188
188
|
}
|
|
189
189
|
if (l.owned) {
|
|
190
|
-
for (e = l.owned.length - 1; e >= 0; e--)
|
|
190
|
+
for (e = l.owned.length - 1; e >= 0; e--) $(l.owned[e]);
|
|
191
191
|
l.owned = null;
|
|
192
192
|
}
|
|
193
193
|
if (l.cleanups) {
|
|
@@ -196,26 +196,26 @@ function W(l) {
|
|
|
196
196
|
}
|
|
197
197
|
l.state = 0;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Ge(l) {
|
|
200
200
|
return l instanceof Error ? l : new Error(typeof l == "string" ? l : "Unknown error", {
|
|
201
201
|
cause: l
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
throw
|
|
204
|
+
function Ee(l, e = R) {
|
|
205
|
+
throw Ge(l);
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function G() {
|
|
208
208
|
return !0;
|
|
209
209
|
}
|
|
210
|
-
const
|
|
210
|
+
const ze = {
|
|
211
211
|
get(l, e, t) {
|
|
212
|
-
return e ===
|
|
212
|
+
return e === oe ? t : l.get(e);
|
|
213
213
|
},
|
|
214
214
|
has(l, e) {
|
|
215
|
-
return e ===
|
|
215
|
+
return e === oe ? !0 : l.has(e);
|
|
216
216
|
},
|
|
217
|
-
set:
|
|
218
|
-
deleteProperty:
|
|
217
|
+
set: G,
|
|
218
|
+
deleteProperty: G,
|
|
219
219
|
getOwnPropertyDescriptor(l, e) {
|
|
220
220
|
return {
|
|
221
221
|
configurable: !0,
|
|
@@ -223,51 +223,51 @@ const Ge = {
|
|
|
223
223
|
get() {
|
|
224
224
|
return l.get(e);
|
|
225
225
|
},
|
|
226
|
-
set:
|
|
227
|
-
deleteProperty:
|
|
226
|
+
set: G,
|
|
227
|
+
deleteProperty: G
|
|
228
228
|
};
|
|
229
229
|
},
|
|
230
230
|
ownKeys(l) {
|
|
231
231
|
return l.keys();
|
|
232
232
|
}
|
|
233
233
|
};
|
|
234
|
-
function
|
|
234
|
+
function se(l) {
|
|
235
235
|
return (l = typeof l == "function" ? l() : l) ? l : {};
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Ue() {
|
|
238
238
|
for (let l = 0, e = this.length; l < e; ++l) {
|
|
239
239
|
const t = this[l]();
|
|
240
240
|
if (t !== void 0) return t;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function Ae(...l) {
|
|
244
244
|
let e = !1;
|
|
245
245
|
for (let r = 0; r < l.length; r++) {
|
|
246
246
|
const a = l[r];
|
|
247
|
-
e = e || !!a &&
|
|
247
|
+
e = e || !!a && oe in a, l[r] = typeof a == "function" ? (e = !0, Pe(a)) : a;
|
|
248
248
|
}
|
|
249
|
-
if (
|
|
249
|
+
if (Ie && e)
|
|
250
250
|
return new Proxy(
|
|
251
251
|
{
|
|
252
252
|
get(r) {
|
|
253
253
|
for (let a = l.length - 1; a >= 0; a--) {
|
|
254
|
-
const n =
|
|
254
|
+
const n = se(l[a])[r];
|
|
255
255
|
if (n !== void 0) return n;
|
|
256
256
|
}
|
|
257
257
|
},
|
|
258
258
|
has(r) {
|
|
259
259
|
for (let a = l.length - 1; a >= 0; a--)
|
|
260
|
-
if (r in
|
|
260
|
+
if (r in se(l[a])) return !0;
|
|
261
261
|
return !1;
|
|
262
262
|
},
|
|
263
263
|
keys() {
|
|
264
264
|
const r = [];
|
|
265
265
|
for (let a = 0; a < l.length; a++)
|
|
266
|
-
r.push(...Object.keys(
|
|
266
|
+
r.push(...Object.keys(se(l[a])));
|
|
267
267
|
return [...new Set(r)];
|
|
268
268
|
}
|
|
269
269
|
},
|
|
270
|
-
|
|
270
|
+
ze
|
|
271
271
|
);
|
|
272
272
|
const t = {}, s = /* @__PURE__ */ Object.create(null);
|
|
273
273
|
for (let r = l.length - 1; r >= 0; r--) {
|
|
@@ -282,7 +282,7 @@ function Ee(...l) {
|
|
|
282
282
|
s[c] = h.get ? {
|
|
283
283
|
enumerable: !0,
|
|
284
284
|
configurable: !0,
|
|
285
|
-
get:
|
|
285
|
+
get: Ue.bind(t[c] = [h.get.bind(a)])
|
|
286
286
|
} : h.value !== void 0 ? h : void 0;
|
|
287
287
|
else {
|
|
288
288
|
const p = t[c];
|
|
@@ -297,7 +297,7 @@ function Ee(...l) {
|
|
|
297
297
|
}
|
|
298
298
|
return o;
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function je(l, e, t) {
|
|
301
301
|
let s = t.length, o = e.length, i = s, r = 0, a = 0, n = e[o - 1].nextSibling, d = null;
|
|
302
302
|
for (; r < o || a < i; ) {
|
|
303
303
|
if (e[r] === t[a]) {
|
|
@@ -336,15 +336,15 @@ function Ue(l, e, t) {
|
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function Xe(l, e, t, s = {}) {
|
|
340
340
|
let o;
|
|
341
|
-
return
|
|
342
|
-
o = i, e === document ? l() :
|
|
341
|
+
return Le((i) => {
|
|
342
|
+
o = i, e === document ? l() : Je(e, l(), e.firstChild ? null : void 0, t);
|
|
343
343
|
}, s.owner), () => {
|
|
344
344
|
o(), e.textContent = "";
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function Ke(l, e, t) {
|
|
348
348
|
let s;
|
|
349
349
|
const o = () => {
|
|
350
350
|
const r = document.createElement("template");
|
|
@@ -352,14 +352,14 @@ function Xe(l, e, t) {
|
|
|
352
352
|
}, i = () => (s || (s = o())).cloneNode(!0);
|
|
353
353
|
return i.cloneNode = i, i;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
356
|
-
return
|
|
355
|
+
function Ye(l, e, t) {
|
|
356
|
+
return Q(() => l(e, t));
|
|
357
357
|
}
|
|
358
|
-
function
|
|
359
|
-
if (t !== void 0 && !s && (s = []), typeof e != "function") return
|
|
360
|
-
|
|
358
|
+
function Je(l, e, t, s) {
|
|
359
|
+
if (t !== void 0 && !s && (s = []), typeof e != "function") return X(l, e, s, t);
|
|
360
|
+
ie((o) => X(l, e(), o, t), s);
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function X(l, e, t, s, o) {
|
|
363
363
|
for (; typeof t == "function"; ) t = t();
|
|
364
364
|
if (e === t) return t;
|
|
365
365
|
const i = typeof e, r = s !== void 0;
|
|
@@ -375,18 +375,18 @@ function j(l, e, t, s, o) {
|
|
|
375
375
|
t = P(l, t, s);
|
|
376
376
|
else {
|
|
377
377
|
if (i === "function")
|
|
378
|
-
return
|
|
378
|
+
return ie(() => {
|
|
379
379
|
let a = e();
|
|
380
380
|
for (; typeof a == "function"; ) a = a();
|
|
381
|
-
t =
|
|
381
|
+
t = X(l, a, t, s);
|
|
382
382
|
}), () => t;
|
|
383
383
|
if (Array.isArray(e)) {
|
|
384
384
|
const a = [], n = t && Array.isArray(t);
|
|
385
|
-
if (
|
|
386
|
-
return
|
|
385
|
+
if (re(a, e, t, o))
|
|
386
|
+
return ie(() => t = X(l, a, t, s, !0)), () => t;
|
|
387
387
|
if (a.length === 0) {
|
|
388
388
|
if (t = P(l, t, s), r) return t;
|
|
389
|
-
} else n ? t.length === 0 ?
|
|
389
|
+
} else n ? t.length === 0 ? ue(l, a, s) : je(l, t, a) : (t && P(l), ue(l, a));
|
|
390
390
|
t = a;
|
|
391
391
|
} else if (e.nodeType) {
|
|
392
392
|
if (Array.isArray(t)) {
|
|
@@ -398,18 +398,18 @@ function j(l, e, t, s, o) {
|
|
|
398
398
|
}
|
|
399
399
|
return t;
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function re(l, e, t, s) {
|
|
402
402
|
let o = !1;
|
|
403
403
|
for (let i = 0, r = e.length; i < r; i++) {
|
|
404
404
|
let a = e[i], n = t && t[l.length], d;
|
|
405
405
|
if (!(a == null || a === !0 || a === !1)) if ((d = typeof a) == "object" && a.nodeType)
|
|
406
406
|
l.push(a);
|
|
407
407
|
else if (Array.isArray(a))
|
|
408
|
-
o =
|
|
408
|
+
o = re(l, a, n) || o;
|
|
409
409
|
else if (d === "function")
|
|
410
410
|
if (s) {
|
|
411
411
|
for (; typeof a == "function"; ) a = a();
|
|
412
|
-
o =
|
|
412
|
+
o = re(
|
|
413
413
|
l,
|
|
414
414
|
Array.isArray(a) ? a : [a],
|
|
415
415
|
Array.isArray(n) ? n : [n]
|
|
@@ -423,7 +423,7 @@ function ie(l, e, t, s) {
|
|
|
423
423
|
}
|
|
424
424
|
return o;
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function ue(l, e, t = null) {
|
|
427
427
|
for (let s = 0, o = e.length; s < o; s++) l.insertBefore(e[s], t);
|
|
428
428
|
}
|
|
429
429
|
function P(l, e, t, s) {
|
|
@@ -446,14 +446,14 @@ class Tt {
|
|
|
446
446
|
this.code = e;
|
|
447
447
|
}
|
|
448
448
|
render(e, t, s, o, i, r, a) {
|
|
449
|
-
const n =
|
|
449
|
+
const n = Ae({
|
|
450
450
|
rowIndex: t,
|
|
451
451
|
columnIndex: s,
|
|
452
452
|
areaIdent: o,
|
|
453
453
|
areaModel: i,
|
|
454
454
|
cellValue: r
|
|
455
455
|
});
|
|
456
|
-
|
|
456
|
+
Xe(
|
|
457
457
|
() => this.code(n),
|
|
458
458
|
e
|
|
459
459
|
);
|
|
@@ -462,7 +462,7 @@ class Tt {
|
|
|
462
462
|
const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
463
463
|
__proto__: null
|
|
464
464
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
465
|
-
function
|
|
465
|
+
function qe(l, e = 500) {
|
|
466
466
|
let t = null;
|
|
467
467
|
return function(...s) {
|
|
468
468
|
t && window.clearTimeout(t), t = window.setTimeout(() => {
|
|
@@ -495,18 +495,18 @@ class B {
|
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function K(l) {
|
|
499
499
|
return l && l.type === "TreeRow";
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function le(l) {
|
|
502
502
|
return l && l.type === "AreaModelTree";
|
|
503
503
|
}
|
|
504
|
-
class
|
|
504
|
+
class ne {
|
|
505
505
|
constructor(e = -1, t = -1, s = -1, o = -1, i, r, a, n = 0, d = 0, c = 0, h = "") {
|
|
506
506
|
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = o, this.areaIdent = i, this.sideIdent = r, this.originalEvent = a, this.clickCount = n, this.draggingX = d, this.draggingY = c, this.action = h;
|
|
507
507
|
}
|
|
508
508
|
clone() {
|
|
509
|
-
return new
|
|
509
|
+
return new ne(
|
|
510
510
|
this.rowIndex,
|
|
511
511
|
this.rowTop,
|
|
512
512
|
this.columnIndex,
|
|
@@ -526,7 +526,7 @@ class I {
|
|
|
526
526
|
this.content = e, this.style = t, this.classes = s;
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
class
|
|
529
|
+
class Me {
|
|
530
530
|
constructor(e = new I(
|
|
531
531
|
">",
|
|
532
532
|
"transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
|
|
@@ -547,12 +547,12 @@ class Ae {
|
|
|
547
547
|
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = o;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
class
|
|
550
|
+
class Re {
|
|
551
551
|
constructor(e = new I("↑", "", ["ge-header-sorted-asc"]), t = new I("↓", "", ["ge-header-sorted-desc"]), s = new I("↑", "color:transparent;", [])) {
|
|
552
552
|
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
class
|
|
555
|
+
class Ze {
|
|
556
556
|
constructor(e) {
|
|
557
557
|
this.domService = e;
|
|
558
558
|
}
|
|
@@ -672,7 +672,7 @@ class qe {
|
|
|
672
672
|
}
|
|
673
673
|
return this.domService.appendChild(e, a), a;
|
|
674
674
|
}
|
|
675
|
-
addSortedIcon(e, t = "", s = new
|
|
675
|
+
addSortedIcon(e, t = "", s = new Re(), o = -1) {
|
|
676
676
|
const i = this.domService.createElement("div");
|
|
677
677
|
this.domService.addClass(i, "ge-table-sorted-icon-div"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "top", "0"), this.domService.setStyle(i, "right", "0"), this.domService.setStyle(i, "width", "20px"), this.domService.setStyle(i, "background", "transparent"), this.domService.setStyle(i, "cursor", "pointer"), this.domService.setAttribute(i, "data-col-index", `${o}`), this.domService.setAttribute(i, "data-area", "header");
|
|
678
678
|
let r;
|
|
@@ -683,7 +683,7 @@ class qe {
|
|
|
683
683
|
this.domService.addClass(i, d);
|
|
684
684
|
return this.domService.appendChild(e, i), i;
|
|
685
685
|
}
|
|
686
|
-
addArrowDiv(e, t = "none", s = new
|
|
686
|
+
addArrowDiv(e, t = "none", s = new Me(), o = -1, i = -1, r = "body") {
|
|
687
687
|
const a = this.domService.createElement("div");
|
|
688
688
|
this.domService.addClass(a, "ge-table-tree-arrow-div"), this.domService.setStyle(a, "display", "inline-block"), this.domService.setStyle(a, "position", ""), this.domService.setStyle(a, "width", "20px"), this.domService.setStyle(a, "background", "transparent"), this.domService.setStyle(a, "cursor", "pointer"), this.domService.setAttribute(a, "data-row-index", `${o}`), this.domService.setAttribute(a, "data-col-index", `${i}`), this.domService.setAttribute(a, "data-area", `${r}`);
|
|
689
689
|
let n;
|
|
@@ -734,20 +734,20 @@ class qe {
|
|
|
734
734
|
return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
|
-
const
|
|
738
|
-
class
|
|
737
|
+
const ce = (l) => l === "header" ? "header" : l === "footer" ? "footer" : "body";
|
|
738
|
+
class Qe {
|
|
739
739
|
constructor(e, t) {
|
|
740
740
|
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)) {
|
|
741
741
|
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"));
|
|
742
742
|
const s = e.getAttribute("data-area");
|
|
743
|
-
if (s && (this.areaIdent =
|
|
743
|
+
if (s && (this.areaIdent = ce(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
|
|
744
744
|
const o = e;
|
|
745
745
|
this.value = o.value;
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
|
-
class
|
|
750
|
+
class et {
|
|
751
751
|
constructor(e) {
|
|
752
752
|
this.tableScope = e, this.doubleClickDelay = 500, this.expandedAll = !0, this.mouseDown = !1, this.dragging = !1, this.lastClicked = 0, 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(
|
|
753
753
|
(t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
|
|
@@ -774,24 +774,24 @@ class Qe {
|
|
|
774
774
|
*/
|
|
775
775
|
onHostElementClicked(e) {
|
|
776
776
|
const t = Date.now();
|
|
777
|
-
if (
|
|
777
|
+
if (t - this.lastClicked < this.doubleClickDelay) {
|
|
778
778
|
this.lastClicked = t, this.publishGeMouseEvent(e, 2);
|
|
779
779
|
return;
|
|
780
780
|
}
|
|
781
781
|
this.lastClicked = t;
|
|
782
|
-
const s = new
|
|
782
|
+
const s = new Qe(e.target, this.tableScope);
|
|
783
783
|
if (s.action === "toggleExpandCollapseAll")
|
|
784
784
|
this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
|
|
785
785
|
else if (s.action === "toggleHeaderGroup")
|
|
786
786
|
this.tableScope.toggleHeaderGroup(s), e.preventDefault(), e.stopPropagation();
|
|
787
787
|
else if (s.inputType === "checkbox" && s.areaIdent)
|
|
788
788
|
this.tableScope.toggleRowCheckbox(s.rowIdx, s.colIdx, s.areaIdent), e.preventDefault(), e.stopPropagation();
|
|
789
|
-
else if (
|
|
789
|
+
else if (K(s.row) && s.areaModel) {
|
|
790
790
|
const o = s.colIdx === this.getArrowColumnIndex() && e.altKey, i = s.className.includes("ge-table-tree-arrow-div");
|
|
791
791
|
if (o || i) {
|
|
792
792
|
e.preventDefault(), e.stopPropagation();
|
|
793
793
|
const r = s.row;
|
|
794
|
-
r.expanded = !r.expanded, "recalcVisibleTreeRows" in s.areaModel && s.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(r);
|
|
794
|
+
r.expanded = !r.expanded, "recalcVisibleTreeRows" in s.areaModel && s.areaModel.recalcVisibleTreeRows(), console.info("this.tableScope.hostElement", this.tableScope.hostElement), console.info("this.tableScope.hostElement.clientWidth", this.tableScope.hostElement.clientWidth), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(r);
|
|
795
795
|
}
|
|
796
796
|
}
|
|
797
797
|
if (s.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
|
|
@@ -807,13 +807,13 @@ class Qe {
|
|
|
807
807
|
* @param {MouseEvent} event - The double click event.
|
|
808
808
|
*/
|
|
809
809
|
onHostElementDblClicked(e) {
|
|
810
|
-
if (
|
|
811
|
-
const t = e.target, s = t.getAttribute("data-area"), o =
|
|
810
|
+
if (this.lastClicked = Date.now(), e.target instanceof HTMLElement) {
|
|
811
|
+
const t = e.target, s = t.getAttribute("data-area"), o = ce(s), i = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), a = this.tableScope.tableModel.getAreaModel(o);
|
|
812
812
|
if (s && o === "header")
|
|
813
813
|
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, r));
|
|
814
814
|
else if (t.getAttribute("data-row-index")) {
|
|
815
815
|
const n = a.getRowByIndex(i);
|
|
816
|
-
if (s && o === "body" && a.isEditable(i, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, r)),
|
|
816
|
+
if (s && o === "body" && a.isEditable(i, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, r)), K(n) && r === this.getArrowColumnIndex()) {
|
|
817
817
|
e.preventDefault(), e.stopPropagation();
|
|
818
818
|
const d = n;
|
|
819
819
|
d.expanded = !d.expanded, "recalcVisibleTreeRows" in a && a.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(d);
|
|
@@ -881,7 +881,7 @@ class Qe {
|
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
|
-
class
|
|
884
|
+
class tt {
|
|
885
885
|
constructor(e, t = [], s = -1) {
|
|
886
886
|
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = s, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((o) => o.rendererMap[e]);
|
|
887
887
|
}
|
|
@@ -977,7 +977,7 @@ class et {
|
|
|
977
977
|
this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
|
|
978
978
|
}
|
|
979
979
|
}
|
|
980
|
-
class
|
|
980
|
+
class st {
|
|
981
981
|
genericSortComparator(e, t, s) {
|
|
982
982
|
if (typeof e == "number" && typeof t == "number")
|
|
983
983
|
return s * (e - t);
|
|
@@ -995,9 +995,9 @@ class tt {
|
|
|
995
995
|
return s * ("" + e).localeCompare("" + t);
|
|
996
996
|
}
|
|
997
997
|
}
|
|
998
|
-
class
|
|
998
|
+
class W extends tt {
|
|
999
999
|
constructor(e, t, s, o = [], i = "ge-selected-row", r = "ge-focused-row") {
|
|
1000
|
-
super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.selectedRowClass = i, this.focusedRowClass = r, this.focusedRowIndex = 0, this.sorterService = new
|
|
1000
|
+
super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.selectedRowClass = i, this.focusedRowClass = r, this.focusedRowIndex = 0, this.sorterService = new st(), this.filteredRows = [...t], this.properties = o.map((a) => a.property);
|
|
1001
1001
|
}
|
|
1002
1002
|
setRows(e) {
|
|
1003
1003
|
this.rows = e, this.filteredRows = [...e];
|
|
@@ -1015,7 +1015,7 @@ class st extends et {
|
|
|
1015
1015
|
getValueAt(e, t) {
|
|
1016
1016
|
const s = this.properties[t];
|
|
1017
1017
|
let o = this.filteredRows[e];
|
|
1018
|
-
return
|
|
1018
|
+
return K(o) && (o = o.data), o ? this.getValueByT(o, s) : "";
|
|
1019
1019
|
}
|
|
1020
1020
|
/**
|
|
1021
1021
|
* Retrieves the filtered and sorted rows from the dataset.
|
|
@@ -1298,7 +1298,49 @@ class ot {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
setRows(e) {
|
|
1300
1300
|
const t = this.getBodyModel();
|
|
1301
|
-
t instanceof
|
|
1301
|
+
t instanceof W ? t.setRows(e) : console.warn("setRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof t, t);
|
|
1302
|
+
}
|
|
1303
|
+
addRows(e) {
|
|
1304
|
+
const t = this.getBodyModel();
|
|
1305
|
+
if (t instanceof W) {
|
|
1306
|
+
const s = t;
|
|
1307
|
+
let o = s.getAllRows();
|
|
1308
|
+
s.setRows([...o, ...e]);
|
|
1309
|
+
} else
|
|
1310
|
+
console.warn("addRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof t, t);
|
|
1311
|
+
}
|
|
1312
|
+
addRowsAt(e, t) {
|
|
1313
|
+
const s = this.getBodyModel();
|
|
1314
|
+
if (s instanceof W) {
|
|
1315
|
+
const o = s;
|
|
1316
|
+
let i = o.getAllRows();
|
|
1317
|
+
o.setRows([...i.slice(0, t), ...e, ...i.slice(t)]);
|
|
1318
|
+
} else
|
|
1319
|
+
console.warn("addRowsAt<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s);
|
|
1320
|
+
}
|
|
1321
|
+
removeRows(e, t = (s, o) => s === o) {
|
|
1322
|
+
const s = this.getBodyModel();
|
|
1323
|
+
if (s instanceof W) {
|
|
1324
|
+
const o = s, i = o.getAllRows().filter((r) => !e.some((a) => t(r, a)));
|
|
1325
|
+
o.setRows(i);
|
|
1326
|
+
} else
|
|
1327
|
+
console.warn("removeRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s);
|
|
1328
|
+
}
|
|
1329
|
+
findRows(e, t = (s, o) => s === o) {
|
|
1330
|
+
const s = this.getBodyModel();
|
|
1331
|
+
return s instanceof W ? s.getAllRows().filter((i) => !e.some((r) => t(i, r))) : (console.warn("findRows<T>(rows: T[], predicate: (a: T, b: T) => boolean) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s), []);
|
|
1332
|
+
}
|
|
1333
|
+
updateRows(e, t = (s, o) => s === o) {
|
|
1334
|
+
const s = this.getBodyModel();
|
|
1335
|
+
if (s instanceof W) {
|
|
1336
|
+
let i = s.getAllRows();
|
|
1337
|
+
for (const r of i)
|
|
1338
|
+
for (const a of e)
|
|
1339
|
+
if (t(r, a))
|
|
1340
|
+
for (const n of Object.keys(a))
|
|
1341
|
+
r[n] = a[n];
|
|
1342
|
+
} else
|
|
1343
|
+
console.warn("updateRows<T>(rows: T[], predicate: (a: T, b: T) => boolean) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s);
|
|
1302
1344
|
}
|
|
1303
1345
|
reSort() {
|
|
1304
1346
|
this.tableScope.reSort();
|
|
@@ -1307,7 +1349,7 @@ class ot {
|
|
|
1307
1349
|
return this.tableScope.getDisplayedRowCount();
|
|
1308
1350
|
}
|
|
1309
1351
|
}
|
|
1310
|
-
class
|
|
1352
|
+
class de {
|
|
1311
1353
|
constructor(e) {
|
|
1312
1354
|
this.getStorageKeyFn = e;
|
|
1313
1355
|
}
|
|
@@ -1374,7 +1416,7 @@ class ce {
|
|
|
1374
1416
|
// }
|
|
1375
1417
|
// }
|
|
1376
1418
|
}
|
|
1377
|
-
class it extends
|
|
1419
|
+
class it extends de {
|
|
1378
1420
|
constructor(e) {
|
|
1379
1421
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
1380
1422
|
}
|
|
@@ -1401,7 +1443,7 @@ class rt {
|
|
|
1401
1443
|
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = o;
|
|
1402
1444
|
}
|
|
1403
1445
|
}
|
|
1404
|
-
class lt extends
|
|
1446
|
+
class lt extends de {
|
|
1405
1447
|
constructor(e) {
|
|
1406
1448
|
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new rt(), this.load();
|
|
1407
1449
|
}
|
|
@@ -1435,7 +1477,7 @@ class lt extends ce {
|
|
|
1435
1477
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
1436
1478
|
}
|
|
1437
1479
|
}
|
|
1438
|
-
class at extends
|
|
1480
|
+
class at extends de {
|
|
1439
1481
|
constructor(e) {
|
|
1440
1482
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
1441
1483
|
}
|
|
@@ -1712,7 +1754,7 @@ class ht extends nt {
|
|
|
1712
1754
|
header: [],
|
|
1713
1755
|
body: [],
|
|
1714
1756
|
footer: []
|
|
1715
|
-
}, this.tree = !1, this.colAndRowspanModels = new dt(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.displayedRowCount = 0, this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (a = this.tableOptions) != null && a.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel),
|
|
1757
|
+
}, this.tree = !1, this.colAndRowspanModels = new dt(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.displayedRowCount = 0, this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (a = this.tableOptions) != null && a.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), le(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
1716
1758
|
(n) => {
|
|
1717
1759
|
var d;
|
|
1718
1760
|
this.colAndRowspanModels[n] = new ct(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
|
|
@@ -1789,7 +1831,7 @@ class ht extends nt {
|
|
|
1789
1831
|
* @return {undefined}
|
|
1790
1832
|
*/
|
|
1791
1833
|
recalcColumnWidths(e) {
|
|
1792
|
-
let t = e || this.scrollViewport.clientWidth;
|
|
1834
|
+
let t = (!e || e > this.scrollViewport.offsetWidth) && this.scrollViewport.offsetWidth > 100 ? this.scrollViewport.offsetWidth : this.scrollViewport.clientWidth;
|
|
1793
1835
|
this.tableModel.setParentWidth(t), this.tableModel.init(), this.repaintHard();
|
|
1794
1836
|
}
|
|
1795
1837
|
/**
|
|
@@ -1977,10 +2019,10 @@ class ht extends nt {
|
|
|
1977
2019
|
let p = t;
|
|
1978
2020
|
const u = this.tableModel.getColumnCount(), g = this.tableModel.getFixedRightColumnCount(), b = this.tableModel.getFixedLeftColumnCount();
|
|
1979
2021
|
for (let m = 0; m < h; m++) {
|
|
1980
|
-
const
|
|
1981
|
-
if (
|
|
2022
|
+
const w = p, v = m === h - 1, E = this.tableModel.getRowHeight(e, m);
|
|
2023
|
+
if (w + E > 0) {
|
|
1982
2024
|
this.firstVisibleRowIndex = m;
|
|
1983
|
-
let y = { left: a, width: n, height: E, top:
|
|
2025
|
+
let y = { left: a, width: n, height: E, top: w, index: m }, S = this.dom.addRowDiv(o, y, m, e, "center");
|
|
1984
2026
|
const k = b;
|
|
1985
2027
|
if (this.adjustColumnsToRowParent({
|
|
1986
2028
|
areaIdent: e,
|
|
@@ -1992,8 +2034,8 @@ class ht extends nt {
|
|
|
1992
2034
|
columnIndexStart: k,
|
|
1993
2035
|
columnIndexEnd: u - g - 1,
|
|
1994
2036
|
verticalFixed: !1,
|
|
1995
|
-
lastRowOfModel:
|
|
1996
|
-
}), d.left > 0 && (y = { left: a, width: this.areaBodyWestGeo.width, height: E, top:
|
|
2037
|
+
lastRowOfModel: v
|
|
2038
|
+
}), d.left > 0 && (y = { left: a, width: this.areaBodyWestGeo.width, height: E, top: w, index: m }, S = this.dom.addRowDiv(s, y, m, e, "west"), this.adjustColumnsToRowParent({
|
|
1997
2039
|
areaIdent: e,
|
|
1998
2040
|
sideIdent: "west",
|
|
1999
2041
|
areaModel: c,
|
|
@@ -2003,8 +2045,8 @@ class ht extends nt {
|
|
|
2003
2045
|
columnIndexStart: 0,
|
|
2004
2046
|
columnIndexEnd: k - 1,
|
|
2005
2047
|
verticalFixed: !0,
|
|
2006
|
-
lastRowOfModel:
|
|
2007
|
-
})), d.right > 0 && (y = { left: a, width: this.areaBodyEastGeo.width, height: E, top:
|
|
2048
|
+
lastRowOfModel: v
|
|
2049
|
+
})), d.right > 0 && (y = { left: a, width: this.areaBodyEastGeo.width, height: E, top: w, index: m }, S = this.dom.addRowDiv(i, y, m, e, "east"), this.adjustColumnsToRowParent({
|
|
2008
2050
|
areaIdent: e,
|
|
2009
2051
|
sideIdent: "east",
|
|
2010
2052
|
areaModel: c,
|
|
@@ -2014,7 +2056,7 @@ class ht extends nt {
|
|
|
2014
2056
|
columnIndexStart: u - g,
|
|
2015
2057
|
columnIndexEnd: u - 1,
|
|
2016
2058
|
verticalFixed: !0,
|
|
2017
|
-
lastRowOfModel:
|
|
2059
|
+
lastRowOfModel: v
|
|
2018
2060
|
})), e === "header" && this.tree && m === h - 1) {
|
|
2019
2061
|
const T = this.dom.applyStyle(
|
|
2020
2062
|
this.dom.setAttribute(
|
|
@@ -2025,8 +2067,8 @@ class ht extends nt {
|
|
|
2025
2067
|
{ cursor: "pointer" }
|
|
2026
2068
|
), D = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
2027
2069
|
if (D) {
|
|
2028
|
-
const
|
|
2029
|
-
this.dom.domService.appendChild(T,
|
|
2070
|
+
const N = this.dom.domService.createText(D.content);
|
|
2071
|
+
this.dom.domService.appendChild(T, N), D.style && this.dom.applyStyleString(T, D.style);
|
|
2030
2072
|
}
|
|
2031
2073
|
}
|
|
2032
2074
|
}
|
|
@@ -2038,17 +2080,17 @@ class ht extends nt {
|
|
|
2038
2080
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
2039
2081
|
const m = ((f = this.colAndRowspanModels[e]) == null ? void 0 : f.getRanges()) ?? [];
|
|
2040
2082
|
if (m.length)
|
|
2041
|
-
for (const
|
|
2042
|
-
let
|
|
2043
|
-
if (
|
|
2083
|
+
for (const w of m) {
|
|
2084
|
+
let v = 0, E = o.child, y = "center";
|
|
2085
|
+
if (w.c1 < b)
|
|
2044
2086
|
E = s.child, y = "west";
|
|
2045
|
-
else if (g > 0 &&
|
|
2087
|
+
else if (g > 0 && w.c1 >= u - g)
|
|
2046
2088
|
E = i.child, y = "east";
|
|
2047
2089
|
else {
|
|
2048
2090
|
const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
2049
|
-
|
|
2091
|
+
v = this.scrollFactorX * S - this.areaBodyWestGeo.width, y = "center";
|
|
2050
2092
|
}
|
|
2051
|
-
this.drawBigCell(
|
|
2093
|
+
this.drawBigCell(w, v, t, c, E, y);
|
|
2052
2094
|
}
|
|
2053
2095
|
}
|
|
2054
2096
|
}
|
|
@@ -2156,20 +2198,20 @@ class ht extends nt {
|
|
|
2156
2198
|
const p = 0, u = !!(e === "body" && t);
|
|
2157
2199
|
let g = h;
|
|
2158
2200
|
for (let f = a; f <= n; f++) {
|
|
2159
|
-
const m = g,
|
|
2160
|
-
if (
|
|
2161
|
-
let
|
|
2201
|
+
const m = g, w = this.tableModel.getColumnWidth(f);
|
|
2202
|
+
if (w > 0 && m + w > 0) {
|
|
2203
|
+
let v = o.height;
|
|
2162
2204
|
const E = s.getRowspanAt(r, f), y = s.getColspanAt(r, f);
|
|
2163
|
-
E > 1 && (
|
|
2164
|
-
let S =
|
|
2205
|
+
E > 1 && (v = this.getRowHeights(r, r + E - 1, s).reduce((T, D) => T + D, 0));
|
|
2206
|
+
let S = w;
|
|
2165
2207
|
y > 1 && (S = this.getColumnWidths(f, f + y - 1).reduce((T, D) => T + D, 0));
|
|
2166
2208
|
let k = !1;
|
|
2167
2209
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (b = this.colAndRowspanModels[e]) != null && b.isInRange(r, f) && (k = !0), this.draggingTargetColumnIndex === f && e !== "header") {
|
|
2168
|
-
this.renderDragTargetDiv(i, m, p, S,
|
|
2169
|
-
const T = { left: m, top: p, width: S, height:
|
|
2210
|
+
this.renderDragTargetDiv(i, m, p, S, v);
|
|
2211
|
+
const T = { left: m, top: p, width: S, height: v };
|
|
2170
2212
|
this.dom.addColumnBorderDivs(this.tableOptions, i, T, e, t);
|
|
2171
2213
|
} else {
|
|
2172
|
-
const T = this.renderSelectedBackgroundDiv(k, u, t, s, r, f, i, m, p, S,
|
|
2214
|
+
const T = this.renderSelectedBackgroundDiv(k, u, t, s, r, f, i, m, p, S, v);
|
|
2173
2215
|
"gammaCells" in s && s.getValueAt(r, f) && (k = !1), k || this.renderCell({
|
|
2174
2216
|
areaModel: s,
|
|
2175
2217
|
areaIdent: e,
|
|
@@ -2179,7 +2221,7 @@ class ht extends nt {
|
|
|
2179
2221
|
left: m,
|
|
2180
2222
|
top: p,
|
|
2181
2223
|
width: S,
|
|
2182
|
-
height:
|
|
2224
|
+
height: v,
|
|
2183
2225
|
parent: i,
|
|
2184
2226
|
cellSelected: T,
|
|
2185
2227
|
lastRowOfModel: c,
|
|
@@ -2190,12 +2232,12 @@ class ht extends nt {
|
|
|
2190
2232
|
cellLeft: m,
|
|
2191
2233
|
cellTop: p,
|
|
2192
2234
|
cellWidth: S,
|
|
2193
|
-
cellHeight:
|
|
2235
|
+
cellHeight: v,
|
|
2194
2236
|
parent: i
|
|
2195
2237
|
});
|
|
2196
2238
|
}
|
|
2197
2239
|
}
|
|
2198
|
-
if (g = g +
|
|
2240
|
+
if (g = g + w, g > this.areaBodyCenterGeo.width)
|
|
2199
2241
|
break;
|
|
2200
2242
|
}
|
|
2201
2243
|
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new F(g - 1, 1, o.height, 0), i);
|
|
@@ -2225,19 +2267,19 @@ class ht extends nt {
|
|
|
2225
2267
|
parent: c,
|
|
2226
2268
|
lastRowOfModel: h
|
|
2227
2269
|
}) {
|
|
2228
|
-
var
|
|
2270
|
+
var ge;
|
|
2229
2271
|
const u = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), g = { left: r, width: a, height: n, top: d, index: i }, b = e.getRowByIndex(o);
|
|
2230
2272
|
let f = "none";
|
|
2231
|
-
if (i === this.getTreeArrowColumnIndex() &&
|
|
2232
|
-
const
|
|
2233
|
-
(
|
|
2273
|
+
if (i === this.getTreeArrowColumnIndex() && K(b)) {
|
|
2274
|
+
const C = b;
|
|
2275
|
+
(ge = C.children) != null && ge.length ? C.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
|
|
2234
2276
|
}
|
|
2235
|
-
let
|
|
2277
|
+
let w;
|
|
2236
2278
|
if (t === "header") {
|
|
2237
|
-
const
|
|
2238
|
-
(!(
|
|
2279
|
+
const C = this.tableModel.getColumnDef(i);
|
|
2280
|
+
(!(C != null && C.sortIconVisible) || C != null && C.sortIconVisible()) && (w = C == null ? void 0 : C.sortState);
|
|
2239
2281
|
}
|
|
2240
|
-
const
|
|
2282
|
+
const v = e.getValueAt(o, i), E = u ? "" : `${v}`, y = e.isRowChecked(o), S = this.dom.addColumnDiv(
|
|
2241
2283
|
{
|
|
2242
2284
|
parent: c,
|
|
2243
2285
|
geo: g,
|
|
@@ -2249,24 +2291,24 @@ class ht extends nt {
|
|
|
2249
2291
|
treeArrow: f,
|
|
2250
2292
|
tableOptions: this.tableOptions,
|
|
2251
2293
|
checkedType: y,
|
|
2252
|
-
sortState:
|
|
2294
|
+
sortState: w
|
|
2253
2295
|
}
|
|
2254
2296
|
), k = e.getTooltipAt(o, i);
|
|
2255
2297
|
k && this.dom.setAttribute(S, "title", k);
|
|
2256
2298
|
const T = this.tableModel.getColumnDef(i);
|
|
2257
2299
|
T && T.classes[t] && this.dom.addClasses(T.classes[t], S);
|
|
2258
2300
|
let D;
|
|
2259
|
-
u && (D = u.render(S, o, i, t, e,
|
|
2260
|
-
const
|
|
2261
|
-
if (
|
|
2262
|
-
const
|
|
2263
|
-
|
|
2301
|
+
u && (D = u.render(S, o, i, t, e, v, this.dom.domService));
|
|
2302
|
+
const N = e.getCustomClassesAt(o, i);
|
|
2303
|
+
if (N.length && this.dom.addClasses(N, S), this.dom.addColumnBorderDivs(this.tableOptions, c, g, t, s), h && this.dom.addHorizontalBorder({ left: r, width: a, height: n, top: d + n }, c), this.getFocusModel && t === "body") {
|
|
2304
|
+
const C = this.getFocusModel();
|
|
2305
|
+
C != null && C.hasFocus(o, i) && this.dom.addFocusBorderDivs(c, g, {});
|
|
2264
2306
|
}
|
|
2265
2307
|
t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
|
|
2266
|
-
const
|
|
2267
|
-
if (
|
|
2268
|
-
for (const
|
|
2269
|
-
this.dom.setStyle(S,
|
|
2308
|
+
const ee = e.getCustomStyleAt(o, i);
|
|
2309
|
+
if (ee)
|
|
2310
|
+
for (const C in ee)
|
|
2311
|
+
this.dom.setStyle(S, C, ee[C]);
|
|
2270
2312
|
return [S, D];
|
|
2271
2313
|
}
|
|
2272
2314
|
/**
|
|
@@ -2442,10 +2484,10 @@ class ht extends nt {
|
|
|
2442
2484
|
sideIdent: o,
|
|
2443
2485
|
text: b
|
|
2444
2486
|
}, m = this.dom.addColumnDiv(f);
|
|
2445
|
-
let
|
|
2446
|
-
g && (
|
|
2447
|
-
const
|
|
2448
|
-
|
|
2487
|
+
let w;
|
|
2488
|
+
g && (w = g.render(m, d, a, t, i, u, this.dom.domService), w && this.cleanupFunctions[t].push(w));
|
|
2489
|
+
const v = i.getCustomClassesAt(d, a);
|
|
2490
|
+
v.length && this.dom.addClasses(v, m);
|
|
2449
2491
|
const E = this.tableModel.getColumnDef(a);
|
|
2450
2492
|
E && E.classes[t] && this.dom.addClasses(E.classes[t], m), this.dom.addColumnBorderDivs(this.tableOptions, n, p, t, o);
|
|
2451
2493
|
const y = i.getCustomStyleAt(d, a);
|
|
@@ -2607,7 +2649,7 @@ class gt {
|
|
|
2607
2649
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
2608
2650
|
const t = e.target, s = t.getAttribute("data-area"), o = t.getAttribute("data-row-index"), i = t.getAttribute("data-col-index");
|
|
2609
2651
|
if (s && o && i) {
|
|
2610
|
-
const r =
|
|
2652
|
+
const r = ce(s), a = Number(o), n = Number(i);
|
|
2611
2653
|
this.tableScope.updateModelValueAfterEdit(r, a, n, t.value);
|
|
2612
2654
|
}
|
|
2613
2655
|
}
|
|
@@ -2618,12 +2660,12 @@ class ft {
|
|
|
2618
2660
|
this.rowIndex = e, this.columnIndex = t;
|
|
2619
2661
|
}
|
|
2620
2662
|
}
|
|
2621
|
-
class
|
|
2663
|
+
class he {
|
|
2622
2664
|
constructor(e) {
|
|
2623
2665
|
this.cells = e;
|
|
2624
2666
|
}
|
|
2625
2667
|
static createSingle(e, t) {
|
|
2626
|
-
return new
|
|
2668
|
+
return new he([new ft(e, t)]);
|
|
2627
2669
|
}
|
|
2628
2670
|
}
|
|
2629
2671
|
class ut {
|
|
@@ -2710,12 +2752,12 @@ class bt {
|
|
|
2710
2752
|
}
|
|
2711
2753
|
}
|
|
2712
2754
|
function St(l) {
|
|
2713
|
-
return l.trim().replace(/\+/g, " ").replace(/ +/g, " ").replace(/⌫/g, "backspace").replace(/↩/g, "enter").replace(/⇧/g, "shift").replace(/⌥/g, "alt").replace(/option/g, "alt").replace(/opt/g, "alt").replace(/⌃/g, "ctrl").replace(/control/g, "ctrl").replace(/command/g, "cmd").replace(/meta/g, "cmd").replace(/escape/g, "esc").replace(/⌘/g, "cmd").replace(/\*/g, "multiply").split(" ").filter((e) => e).sort((e, t) => {
|
|
2755
|
+
return l.trim().replace(/\+/g, " ").replace(/ +/g, " ").replace(/⌫/g, "backspace").replace(/↩/g, "enter").replace(/⇧/g, "shift").replace(/⌥/g, "alt").replace(/option/g, "alt").replace(/opt/g, "alt").replace(/⌃/g, "ctrl").replace(/control/g, "ctrl").replace(/command/g, "cmd").replace(/meta/g, "cmd").replace(/escape/g, "esc").replace(/⌘/g, "cmd").replace(/\*/g, "multiply").split(" ").filter((e) => e).filter((e, t, s) => s.indexOf(e) === t).sort((e, t) => {
|
|
2714
2756
|
const s = { cmd: 1, ctrl: 2, alt: 3, shift: 4 }, o = s[e] || 5, i = s[t] || 5;
|
|
2715
2757
|
return o !== i ? o - i : e.localeCompare(t);
|
|
2716
2758
|
}).join(" ");
|
|
2717
2759
|
}
|
|
2718
|
-
function
|
|
2760
|
+
function me(l) {
|
|
2719
2761
|
let e = l.key.toLowerCase();
|
|
2720
2762
|
if (e === " " && (e = "space"), e === "arrowleft" && (e = "left"), e === "arrowright" && (e = "right"), e === "arrowup" && (e = "up"), e === "arrowdown" && (e = "down"), e === "delete" && l.code === "Delete" && (e = "delete"), e === "backspace" && (e = "backspace"), e === "escape" && (e = "esc"), e === "return" && (e = "enter"), l.code.startsWith("Numpad")) {
|
|
2721
2763
|
const s = l.code.replace("Numpad", "").toLowerCase();
|
|
@@ -2770,10 +2812,10 @@ class yt {
|
|
|
2770
2812
|
return t;
|
|
2771
2813
|
}
|
|
2772
2814
|
findEntity(e) {
|
|
2773
|
-
const t =
|
|
2815
|
+
const t = me(e);
|
|
2774
2816
|
this.isDebug() && console.debug("ShortcutService shortcut :", t);
|
|
2775
2817
|
for (const s in this.shortcutActionIdMapping)
|
|
2776
|
-
if (
|
|
2818
|
+
if (me(e) === t)
|
|
2777
2819
|
return this.isDebug() && console.debug("ShortcutService action :", this.shortcutActionIdMapping[s]), this.shortcutActionIdMapping[s];
|
|
2778
2820
|
}
|
|
2779
2821
|
// private areTokensEquals(tokens1: string[], tokens2: string[]): boolean {
|
|
@@ -2820,7 +2862,7 @@ class yt {
|
|
|
2820
2862
|
return this.shortcutActionIdMapping;
|
|
2821
2863
|
}
|
|
2822
2864
|
}
|
|
2823
|
-
class
|
|
2865
|
+
class be {
|
|
2824
2866
|
onCheckboxChanged(e) {
|
|
2825
2867
|
}
|
|
2826
2868
|
onContextmenu(e) {
|
|
@@ -2840,7 +2882,7 @@ class me {
|
|
|
2840
2882
|
onFocusChanged(e) {
|
|
2841
2883
|
}
|
|
2842
2884
|
}
|
|
2843
|
-
class
|
|
2885
|
+
class Te {
|
|
2844
2886
|
setStyle(e, t, s) {
|
|
2845
2887
|
return e.style[t] = s, e;
|
|
2846
2888
|
}
|
|
@@ -2867,7 +2909,7 @@ class Re {
|
|
|
2867
2909
|
e.setAttribute(t, s);
|
|
2868
2910
|
}
|
|
2869
2911
|
}
|
|
2870
|
-
class
|
|
2912
|
+
class wt {
|
|
2871
2913
|
render(e, t, s, o, i, r, a) {
|
|
2872
2914
|
if (i.isEditable(t, s)) {
|
|
2873
2915
|
a.addClass(e, "ge-table-row-input-div");
|
|
@@ -2888,7 +2930,7 @@ class xt {
|
|
|
2888
2930
|
}
|
|
2889
2931
|
}
|
|
2890
2932
|
}
|
|
2891
|
-
class
|
|
2933
|
+
class xt {
|
|
2892
2934
|
constructor(e = "none", t = "single") {
|
|
2893
2935
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
|
|
2894
2936
|
}
|
|
@@ -2970,7 +3012,7 @@ class wt {
|
|
|
2970
3012
|
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());
|
|
2971
3013
|
}
|
|
2972
3014
|
}
|
|
2973
|
-
class
|
|
3015
|
+
class vt {
|
|
2974
3016
|
constructor(e = "none") {
|
|
2975
3017
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
2976
3018
|
}
|
|
@@ -3007,7 +3049,7 @@ class Ct {
|
|
|
3007
3049
|
return [this.rowIndex, this.columnIndex];
|
|
3008
3050
|
}
|
|
3009
3051
|
}
|
|
3010
|
-
class
|
|
3052
|
+
class De {
|
|
3011
3053
|
constructor(e = new I(
|
|
3012
3054
|
"❯",
|
|
3013
3055
|
"",
|
|
@@ -3021,14 +3063,14 @@ class Te {
|
|
|
3021
3063
|
}
|
|
3022
3064
|
// `⊖ `, `⊕ `;
|
|
3023
3065
|
}
|
|
3024
|
-
const
|
|
3025
|
-
class
|
|
3066
|
+
const Ct = new xt(), Et = new vt("cell");
|
|
3067
|
+
class ke {
|
|
3026
3068
|
constructor() {
|
|
3027
3069
|
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 = {
|
|
3028
3070
|
header: 34,
|
|
3029
3071
|
body: 34,
|
|
3030
3072
|
footer: 34
|
|
3031
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new
|
|
3073
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Me(), this.headerGroupOptions = new De(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Re(), this.sortOrder = ["asc", "desc"], this.shortcutActionsDisabled = !1, this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new wt(), this.getSelectionModel = () => Ct, this.getFocusModel = () => Et;
|
|
3032
3074
|
}
|
|
3033
3075
|
}
|
|
3034
3076
|
const H = class H {
|
|
@@ -3115,10 +3157,10 @@ const H = class H {
|
|
|
3115
3157
|
};
|
|
3116
3158
|
H.columnSeparatorChar = " ", H.rowSeparatorChar = `
|
|
3117
3159
|
`;
|
|
3118
|
-
let
|
|
3160
|
+
let Y = H;
|
|
3119
3161
|
class At {
|
|
3120
3162
|
constructor(e, t = 500) {
|
|
3121
|
-
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(
|
|
3163
|
+
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(qe(this.handleResize.bind(this), t)).observe(this.tableScope.hostElement);
|
|
3122
3164
|
}
|
|
3123
3165
|
handleResize(e) {
|
|
3124
3166
|
const t = e[0], { width: s } = t.contentRect;
|
|
@@ -3231,18 +3273,18 @@ class Mt {
|
|
|
3231
3273
|
return this.createZip(s);
|
|
3232
3274
|
}
|
|
3233
3275
|
}
|
|
3234
|
-
class
|
|
3235
|
-
constructor(e, t, s, o, i, r = new
|
|
3276
|
+
class pe extends ht {
|
|
3277
|
+
constructor(e, t, s, o, i, r = new Y(), a = new Mt()) {
|
|
3236
3278
|
var c;
|
|
3237
|
-
if (super(e, t, new
|
|
3279
|
+
if (super(e, t, new Ze(s), o), this.eventListener = i, this.copyService = r, this.excelService = a, this.licenseManager = B.getInstance(), this.selectionService = new ut(this), this.api = new ot(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, this.lastContextmenu = Date.now(), t.setTableScope(this), i || (this.eventListener = new be()), (c = this.tableOptions) != null && c.autoRestoreOptions) {
|
|
3238
3280
|
const h = this.tableOptions.autoRestoreOptions, p = h.getStorageKeyFn;
|
|
3239
3281
|
p && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new it(p)), h.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new lt(p)), h.autoRestoreSortingState && (this.storeSortingService = new at(p)));
|
|
3240
3282
|
}
|
|
3241
|
-
this.mouseHandler = new
|
|
3283
|
+
this.mouseHandler = new et(this), this.inputHandler = new gt(this), this.resizeHandler = new At(this, o.resizeEventDebounceDelay), this.shortcutService = new yt(this), this.shortcutService.addListener(this.selectionService);
|
|
3242
3284
|
const n = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
3243
3285
|
n && n.addEventSelectionChangedListener(this);
|
|
3244
3286
|
const d = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
3245
|
-
d && d.addEventFocusChangedListener(this);
|
|
3287
|
+
d && d.addEventFocusChangedListener(this), console.log("TableScope created");
|
|
3246
3288
|
}
|
|
3247
3289
|
/**
|
|
3248
3290
|
* Creates a TableScope instance.
|
|
@@ -3256,8 +3298,8 @@ class he extends ht {
|
|
|
3256
3298
|
*
|
|
3257
3299
|
* @return {TableScope} - The newly created TableScope instance.
|
|
3258
3300
|
*/
|
|
3259
|
-
static create(e, t, s = new
|
|
3260
|
-
return new
|
|
3301
|
+
static create(e, t, s = new ke(), o = new be(), i = new Te(), r = new Y()) {
|
|
3302
|
+
return new pe(e, t, i, s, o, r);
|
|
3261
3303
|
}
|
|
3262
3304
|
/**
|
|
3263
3305
|
* Triggers an action based on the provided actionId.
|
|
@@ -3285,7 +3327,7 @@ class he extends ht {
|
|
|
3285
3327
|
return !1;
|
|
3286
3328
|
}
|
|
3287
3329
|
updateModelValueAfterEdit(e, t, s, o) {
|
|
3288
|
-
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, o) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(
|
|
3330
|
+
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, o) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(he.createSingle(t, s)), this.hostElement.focus());
|
|
3289
3331
|
}
|
|
3290
3332
|
/**
|
|
3291
3333
|
* Retrieves the TableApi object.
|
|
@@ -3314,7 +3356,7 @@ class he extends ht {
|
|
|
3314
3356
|
* @return {GeMouseEvent} - The created GeMouseEvent object.
|
|
3315
3357
|
*/
|
|
3316
3358
|
createGeMouseEvent(e) {
|
|
3317
|
-
const t = new
|
|
3359
|
+
const t = new ne();
|
|
3318
3360
|
if (t.originalEvent = e, e) {
|
|
3319
3361
|
const s = e.target;
|
|
3320
3362
|
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) {
|
|
@@ -3390,7 +3432,7 @@ class he extends ht {
|
|
|
3390
3432
|
toggleExpandCollapseAll(e = !0) {
|
|
3391
3433
|
var s;
|
|
3392
3434
|
const t = this.tableModel.getBodyModel();
|
|
3393
|
-
|
|
3435
|
+
le(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
|
|
3394
3436
|
}
|
|
3395
3437
|
/**
|
|
3396
3438
|
* Toggles the checkbox state of a specific row in a table.
|
|
@@ -3606,7 +3648,7 @@ class he extends ht {
|
|
|
3606
3648
|
const s = this.tableOptions.autoRestoreOptions, o = s.getRowId;
|
|
3607
3649
|
if (s.autoRestoreCollapsedExpandedState && o) {
|
|
3608
3650
|
const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
|
|
3609
|
-
if (
|
|
3651
|
+
if (le(r)) {
|
|
3610
3652
|
const a = r, n = r.getRowCount();
|
|
3611
3653
|
for (let d = 0; d < n; d++) {
|
|
3612
3654
|
const c = r.getRowByIndex(d);
|
|
@@ -3660,9 +3702,9 @@ class he extends ht {
|
|
|
3660
3702
|
return this.displayedRowCount;
|
|
3661
3703
|
}
|
|
3662
3704
|
}
|
|
3663
|
-
const
|
|
3705
|
+
const J = class J {
|
|
3664
3706
|
};
|
|
3665
|
-
|
|
3707
|
+
J.themes = ["light", "combat", "paper", "blackboard"], J.vars = {
|
|
3666
3708
|
light: `html[data-theme="light"] {
|
|
3667
3709
|
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
3668
3710
|
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
@@ -3896,15 +3938,15 @@ Y.themes = ["light", "combat", "paper", "blackboard"], Y.vars = {
|
|
|
3896
3938
|
--ge-table-drop-zone-bg: #758129;
|
|
3897
3939
|
}`
|
|
3898
3940
|
};
|
|
3899
|
-
let
|
|
3900
|
-
const
|
|
3901
|
-
constructor(e = new
|
|
3941
|
+
let Se = J;
|
|
3942
|
+
const q = class q {
|
|
3943
|
+
constructor(e = new De()) {
|
|
3902
3944
|
this.headerGroupOptions = e;
|
|
3903
3945
|
}
|
|
3904
3946
|
render(e, t, s, o, i, r, a) {
|
|
3905
3947
|
const n = r != null && r.data ? r.data : "";
|
|
3906
3948
|
if (r) {
|
|
3907
|
-
const { toggle: d, visibility: c, closed: h } = r, p = d ?
|
|
3949
|
+
const { toggle: d, visibility: c, closed: h } = r, p = d ? q.toggleHeaderGroup : "";
|
|
3908
3950
|
this.addText(e, o, t, s, n, p), d && c !== "always" && this.addArrowDiv(a, e, !h, t, s, o, p);
|
|
3909
3951
|
} else
|
|
3910
3952
|
this.addText(e, o, t, s, n, "");
|
|
@@ -3936,16 +3978,16 @@ const J = class J {
|
|
|
3936
3978
|
}
|
|
3937
3979
|
}
|
|
3938
3980
|
};
|
|
3939
|
-
|
|
3940
|
-
let
|
|
3941
|
-
var Rt = /* @__PURE__ */
|
|
3981
|
+
q.toggleHeaderGroup = "toggleHeaderGroup";
|
|
3982
|
+
let ye = q;
|
|
3983
|
+
var Rt = /* @__PURE__ */ Ke("<div>");
|
|
3942
3984
|
const kt = (l) => {
|
|
3943
3985
|
let e;
|
|
3944
|
-
const t =
|
|
3986
|
+
const t = Ae({
|
|
3945
3987
|
tableModel: null,
|
|
3946
|
-
tableOptions: new
|
|
3988
|
+
tableOptions: new ke()
|
|
3947
3989
|
}, l);
|
|
3948
|
-
return
|
|
3990
|
+
return We(() => {
|
|
3949
3991
|
const s = {
|
|
3950
3992
|
onSelectionChanged(r) {
|
|
3951
3993
|
const a = new CustomEvent("selectionChanged", {
|
|
@@ -4010,7 +4052,7 @@ const kt = (l) => {
|
|
|
4010
4052
|
});
|
|
4011
4053
|
e && e.dispatchEvent(a);
|
|
4012
4054
|
}
|
|
4013
|
-
}, o = new
|
|
4055
|
+
}, o = new pe(e, t.tableModel, new Te(), t.tableOptions, s);
|
|
4014
4056
|
o.firstInit();
|
|
4015
4057
|
const i = new CustomEvent("tableReady", {
|
|
4016
4058
|
detail: o.getApi(),
|
|
@@ -4019,7 +4061,7 @@ const kt = (l) => {
|
|
|
4019
4061
|
e && e.dispatchEvent(i), t.licenseKey && B.getInstance().setLicenseKey(t.licenseKey);
|
|
4020
4062
|
}), (() => {
|
|
4021
4063
|
var s = Rt(), o = e;
|
|
4022
|
-
return typeof o == "function" ?
|
|
4064
|
+
return typeof o == "function" ? Ye(o, s) : e = s, s;
|
|
4023
4065
|
})();
|
|
4024
4066
|
};
|
|
4025
4067
|
export {
|