@guiexpert/solid-table 1.0.23 → 1.0.25
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 +23 -7
- package/index.js +749 -599
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
const ke = (
|
|
1
|
+
const ke = (a, e) => a === e, te = Symbol("solid-proxy"), ge = {
|
|
2
2
|
equals: ke
|
|
3
3
|
};
|
|
4
|
-
let ye =
|
|
5
|
-
const
|
|
4
|
+
let ye = ve;
|
|
5
|
+
const O = 1, _ = 2, xe = {
|
|
6
6
|
owned: null,
|
|
7
7
|
cleanups: null,
|
|
8
8
|
context: null,
|
|
9
9
|
owner: null
|
|
10
10
|
};
|
|
11
|
-
var
|
|
12
|
-
let
|
|
13
|
-
function
|
|
14
|
-
const t =
|
|
11
|
+
var T = null;
|
|
12
|
+
let Q = null, fe = null, v = null, M = null, L = null, J = 0;
|
|
13
|
+
function Fe(a, e) {
|
|
14
|
+
const t = v, s = T, o = a.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
|
-
},
|
|
20
|
-
|
|
19
|
+
}, l = o ? a : () => a(() => H(() => q(r)));
|
|
20
|
+
T = r, v = null;
|
|
21
21
|
try {
|
|
22
|
-
return
|
|
22
|
+
return V(l, !0);
|
|
23
23
|
} finally {
|
|
24
|
-
|
|
24
|
+
v = t, T = s;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
function se(
|
|
28
|
-
const s =
|
|
29
|
-
|
|
27
|
+
function se(a, e, t) {
|
|
28
|
+
const s = ae(a, e, !1, O);
|
|
29
|
+
W(s);
|
|
30
30
|
}
|
|
31
|
-
function Ie(
|
|
32
|
-
ye =
|
|
33
|
-
const s =
|
|
34
|
-
(!t || !t.render) && (s.user = !0),
|
|
31
|
+
function Ie(a, e, t) {
|
|
32
|
+
ye = We;
|
|
33
|
+
const s = ae(a, e, !1, O);
|
|
34
|
+
(!t || !t.render) && (s.user = !0), L ? L.push(s) : W(s);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
t = t ? Object.assign({},
|
|
38
|
-
const s =
|
|
39
|
-
return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0,
|
|
36
|
+
function Le(a, e, t) {
|
|
37
|
+
t = t ? Object.assign({}, ge, t) : ge;
|
|
38
|
+
const s = ae(a, e, !0, 0);
|
|
39
|
+
return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, W(s), Be.bind(s);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
if (!
|
|
43
|
-
return
|
|
44
|
-
const e =
|
|
45
|
-
|
|
41
|
+
function H(a) {
|
|
42
|
+
if (!fe && v === null)
|
|
43
|
+
return a();
|
|
44
|
+
const e = v;
|
|
45
|
+
v = null;
|
|
46
46
|
try {
|
|
47
|
-
return
|
|
47
|
+
return a();
|
|
48
48
|
} finally {
|
|
49
|
-
|
|
49
|
+
v = e;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
Ie(() =>
|
|
52
|
+
function Oe(a) {
|
|
53
|
+
Ie(() => H(a));
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Be() {
|
|
56
56
|
if (this.sources && this.state)
|
|
57
|
-
if (this.state ===
|
|
58
|
-
|
|
57
|
+
if (this.state === O)
|
|
58
|
+
W(this);
|
|
59
59
|
else {
|
|
60
|
-
const
|
|
61
|
-
M = null,
|
|
60
|
+
const a = M;
|
|
61
|
+
M = null, V(() => U(this), !1), M = a;
|
|
62
62
|
}
|
|
63
|
-
if (
|
|
64
|
-
const
|
|
65
|
-
|
|
63
|
+
if (v) {
|
|
64
|
+
const a = this.observers ? this.observers.length : 0;
|
|
65
|
+
v.sources ? (v.sources.push(this), v.sourceSlots.push(a)) : (v.sources = [this], v.sourceSlots = [a]), this.observers ? (this.observers.push(v), this.observerSlots.push(v.sources.length - 1)) : (this.observers = [v], this.observerSlots = [v.sources.length - 1]);
|
|
66
66
|
}
|
|
67
67
|
return this.value;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
let s =
|
|
71
|
-
return (!
|
|
72
|
-
for (let o = 0; o <
|
|
73
|
-
const i =
|
|
74
|
-
r &&
|
|
69
|
+
function Pe(a, e, t) {
|
|
70
|
+
let s = a.value;
|
|
71
|
+
return (!a.comparator || !a.comparator(s, e)) && (a.value = e, a.observers && a.observers.length && V(() => {
|
|
72
|
+
for (let o = 0; o < a.observers.length; o += 1) {
|
|
73
|
+
const i = a.observers[o], r = Q && Q.running;
|
|
74
|
+
r && Q.disposed.has(i), (r ? !i.tState : !i.state) && (i.pure ? M.push(i) : L.push(i), i.observers && Ce(i)), r || (i.state = O);
|
|
75
75
|
}
|
|
76
76
|
if (M.length > 1e6)
|
|
77
77
|
throw M = [], new Error();
|
|
78
78
|
}, !1)), e;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
if (!
|
|
80
|
+
function W(a) {
|
|
81
|
+
if (!a.fn)
|
|
82
82
|
return;
|
|
83
|
-
|
|
84
|
-
const e =
|
|
85
|
-
|
|
83
|
+
q(a);
|
|
84
|
+
const e = J;
|
|
85
|
+
$e(a, a.value, e);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function $e(a, e, t) {
|
|
88
88
|
let s;
|
|
89
|
-
const o =
|
|
90
|
-
|
|
89
|
+
const o = T, i = v;
|
|
90
|
+
v = T = a;
|
|
91
91
|
try {
|
|
92
|
-
s =
|
|
92
|
+
s = a.fn(e);
|
|
93
93
|
} catch (r) {
|
|
94
|
-
return
|
|
94
|
+
return a.pure && (a.state = O, a.owned && a.owned.forEach(q), a.owned = null), a.updatedAt = t + 1, we(r);
|
|
95
95
|
} finally {
|
|
96
|
-
|
|
96
|
+
v = i, T = o;
|
|
97
97
|
}
|
|
98
|
-
(!
|
|
98
|
+
(!a.updatedAt || a.updatedAt <= t) && (a.updatedAt != null && "observers" in a ? Pe(a, s) : a.value = s, a.updatedAt = t);
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function ae(a, e, t, s = O, o) {
|
|
101
101
|
const i = {
|
|
102
|
-
fn:
|
|
102
|
+
fn: a,
|
|
103
103
|
state: s,
|
|
104
104
|
updatedAt: null,
|
|
105
105
|
owned: null,
|
|
@@ -107,240 +107,240 @@ function re(l, e, t, s = L, o) {
|
|
|
107
107
|
sourceSlots: null,
|
|
108
108
|
cleanups: null,
|
|
109
109
|
value: e,
|
|
110
|
-
owner:
|
|
111
|
-
context:
|
|
110
|
+
owner: T,
|
|
111
|
+
context: T ? T.context : null,
|
|
112
112
|
pure: t
|
|
113
113
|
};
|
|
114
|
-
return
|
|
114
|
+
return T === null || T !== xe && (T.owned ? T.owned.push(i) : T.owned = [i]), i;
|
|
115
115
|
}
|
|
116
|
-
function z(
|
|
117
|
-
if (
|
|
116
|
+
function z(a) {
|
|
117
|
+
if (a.state === 0)
|
|
118
118
|
return;
|
|
119
|
-
if (
|
|
120
|
-
return
|
|
121
|
-
if (
|
|
122
|
-
return
|
|
123
|
-
const e = [
|
|
124
|
-
for (; (
|
|
125
|
-
|
|
119
|
+
if (a.state === _)
|
|
120
|
+
return U(a);
|
|
121
|
+
if (a.suspense && H(a.suspense.inFallback))
|
|
122
|
+
return a.suspense.effects.push(a);
|
|
123
|
+
const e = [a];
|
|
124
|
+
for (; (a = a.owner) && (!a.updatedAt || a.updatedAt < J); )
|
|
125
|
+
a.state && e.push(a);
|
|
126
126
|
for (let t = e.length - 1; t >= 0; t--)
|
|
127
|
-
if (
|
|
128
|
-
|
|
129
|
-
else if (
|
|
127
|
+
if (a = e[t], a.state === O)
|
|
128
|
+
W(a);
|
|
129
|
+
else if (a.state === _) {
|
|
130
130
|
const s = M;
|
|
131
|
-
M = null,
|
|
131
|
+
M = null, V(() => U(a, e[0]), !1), M = s;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function V(a, e) {
|
|
135
135
|
if (M)
|
|
136
|
-
return
|
|
136
|
+
return a();
|
|
137
137
|
let t = !1;
|
|
138
|
-
e || (M = []),
|
|
138
|
+
e || (M = []), L ? t = !0 : L = [], J++;
|
|
139
139
|
try {
|
|
140
|
-
const s =
|
|
141
|
-
return
|
|
140
|
+
const s = a();
|
|
141
|
+
return He(t), s;
|
|
142
142
|
} catch (s) {
|
|
143
|
-
t || (
|
|
143
|
+
t || (L = null), M = null, we(s);
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
if (M && (
|
|
146
|
+
function He(a) {
|
|
147
|
+
if (M && (ve(M), M = null), a)
|
|
148
148
|
return;
|
|
149
|
-
const e =
|
|
150
|
-
|
|
149
|
+
const e = L;
|
|
150
|
+
L = null, e.length && V(() => ye(e), !1);
|
|
151
151
|
}
|
|
152
|
-
function
|
|
153
|
-
for (let e = 0; e <
|
|
154
|
-
z(
|
|
152
|
+
function ve(a) {
|
|
153
|
+
for (let e = 0; e < a.length; e++)
|
|
154
|
+
z(a[e]);
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function We(a) {
|
|
157
157
|
let e, t = 0;
|
|
158
|
-
for (e = 0; e <
|
|
159
|
-
const s =
|
|
160
|
-
s.user ?
|
|
158
|
+
for (e = 0; e < a.length; e++) {
|
|
159
|
+
const s = a[e];
|
|
160
|
+
s.user ? a[t++] = s : z(s);
|
|
161
161
|
}
|
|
162
162
|
for (e = 0; e < t; e++)
|
|
163
|
-
z(
|
|
163
|
+
z(a[e]);
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
|
|
167
|
-
for (let t = 0; t <
|
|
168
|
-
const s =
|
|
165
|
+
function U(a, e) {
|
|
166
|
+
a.state = 0;
|
|
167
|
+
for (let t = 0; t < a.sources.length; t += 1) {
|
|
168
|
+
const s = a.sources[t];
|
|
169
169
|
if (s.sources) {
|
|
170
170
|
const o = s.state;
|
|
171
|
-
o ===
|
|
171
|
+
o === O ? s !== e && (!s.updatedAt || s.updatedAt < J) && z(s) : o === _ && U(s, e);
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
-
function Ce(
|
|
176
|
-
for (let e = 0; e <
|
|
177
|
-
const t =
|
|
178
|
-
t.state || (t.state =
|
|
175
|
+
function Ce(a) {
|
|
176
|
+
for (let e = 0; e < a.observers.length; e += 1) {
|
|
177
|
+
const t = a.observers[e];
|
|
178
|
+
t.state || (t.state = _, t.pure ? M.push(t) : L.push(t), t.observers && Ce(t));
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function q(a) {
|
|
182
182
|
let e;
|
|
183
|
-
if (
|
|
184
|
-
for (;
|
|
185
|
-
const t =
|
|
183
|
+
if (a.sources)
|
|
184
|
+
for (; a.sources.length; ) {
|
|
185
|
+
const t = a.sources.pop(), s = a.sourceSlots.pop(), o = t.observers;
|
|
186
186
|
if (o && o.length) {
|
|
187
187
|
const i = o.pop(), r = t.observerSlots.pop();
|
|
188
188
|
s < o.length && (i.sourceSlots[r] = s, o[s] = i, t.observerSlots[s] = r);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
if (
|
|
192
|
-
for (e =
|
|
193
|
-
|
|
194
|
-
|
|
191
|
+
if (a.owned) {
|
|
192
|
+
for (e = a.owned.length - 1; e >= 0; e--)
|
|
193
|
+
q(a.owned[e]);
|
|
194
|
+
a.owned = null;
|
|
195
195
|
}
|
|
196
|
-
if (
|
|
197
|
-
for (e =
|
|
198
|
-
|
|
199
|
-
|
|
196
|
+
if (a.cleanups) {
|
|
197
|
+
for (e = a.cleanups.length - 1; e >= 0; e--)
|
|
198
|
+
a.cleanups[e]();
|
|
199
|
+
a.cleanups = null;
|
|
200
200
|
}
|
|
201
|
-
|
|
201
|
+
a.state = 0;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
return
|
|
205
|
-
cause:
|
|
203
|
+
function Ve(a) {
|
|
204
|
+
return a instanceof Error ? a : new Error(typeof a == "string" ? a : "Unknown error", {
|
|
205
|
+
cause: a
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
throw
|
|
208
|
+
function we(a, e = T) {
|
|
209
|
+
throw Ve(a);
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function G() {
|
|
212
212
|
return !0;
|
|
213
213
|
}
|
|
214
|
-
const
|
|
215
|
-
get(
|
|
216
|
-
return e === te ? t :
|
|
214
|
+
const Ne = {
|
|
215
|
+
get(a, e, t) {
|
|
216
|
+
return e === te ? t : a.get(e);
|
|
217
217
|
},
|
|
218
|
-
has(
|
|
219
|
-
return e === te ? !0 :
|
|
218
|
+
has(a, e) {
|
|
219
|
+
return e === te ? !0 : a.has(e);
|
|
220
220
|
},
|
|
221
|
-
set:
|
|
222
|
-
deleteProperty:
|
|
223
|
-
getOwnPropertyDescriptor(
|
|
221
|
+
set: G,
|
|
222
|
+
deleteProperty: G,
|
|
223
|
+
getOwnPropertyDescriptor(a, e) {
|
|
224
224
|
return {
|
|
225
225
|
configurable: !0,
|
|
226
226
|
enumerable: !0,
|
|
227
227
|
get() {
|
|
228
|
-
return
|
|
228
|
+
return a.get(e);
|
|
229
229
|
},
|
|
230
|
-
set:
|
|
231
|
-
deleteProperty:
|
|
230
|
+
set: G,
|
|
231
|
+
deleteProperty: G
|
|
232
232
|
};
|
|
233
233
|
},
|
|
234
|
-
ownKeys(
|
|
235
|
-
return
|
|
234
|
+
ownKeys(a) {
|
|
235
|
+
return a.keys();
|
|
236
236
|
}
|
|
237
237
|
};
|
|
238
|
-
function ee(
|
|
239
|
-
return (
|
|
238
|
+
function ee(a) {
|
|
239
|
+
return (a = typeof a == "function" ? a() : a) ? a : {};
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
for (let
|
|
243
|
-
const t = this[
|
|
241
|
+
function Ge() {
|
|
242
|
+
for (let a = 0, e = this.length; a < e; ++a) {
|
|
243
|
+
const t = this[a]();
|
|
244
244
|
if (t !== void 0)
|
|
245
245
|
return t;
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
|
-
function Ee(...
|
|
248
|
+
function Ee(...a) {
|
|
249
249
|
let e = !1;
|
|
250
|
-
for (let r = 0; r <
|
|
251
|
-
const
|
|
252
|
-
e = e || !!
|
|
250
|
+
for (let r = 0; r < a.length; r++) {
|
|
251
|
+
const l = a[r];
|
|
252
|
+
e = e || !!l && te in l, a[r] = typeof l == "function" ? (e = !0, Le(l)) : l;
|
|
253
253
|
}
|
|
254
254
|
if (e)
|
|
255
255
|
return new Proxy({
|
|
256
256
|
get(r) {
|
|
257
|
-
for (let
|
|
258
|
-
const
|
|
259
|
-
if (
|
|
260
|
-
return
|
|
257
|
+
for (let l = a.length - 1; l >= 0; l--) {
|
|
258
|
+
const n = ee(a[l])[r];
|
|
259
|
+
if (n !== void 0)
|
|
260
|
+
return n;
|
|
261
261
|
}
|
|
262
262
|
},
|
|
263
263
|
has(r) {
|
|
264
|
-
for (let
|
|
265
|
-
if (r in ee(l
|
|
264
|
+
for (let l = a.length - 1; l >= 0; l--)
|
|
265
|
+
if (r in ee(a[l]))
|
|
266
266
|
return !0;
|
|
267
267
|
return !1;
|
|
268
268
|
},
|
|
269
269
|
keys() {
|
|
270
270
|
const r = [];
|
|
271
|
-
for (let
|
|
272
|
-
r.push(...Object.keys(ee(l
|
|
271
|
+
for (let l = 0; l < a.length; l++)
|
|
272
|
+
r.push(...Object.keys(ee(a[l])));
|
|
273
273
|
return [...new Set(r)];
|
|
274
274
|
}
|
|
275
|
-
},
|
|
275
|
+
}, Ne);
|
|
276
276
|
const t = {}, s = /* @__PURE__ */ Object.create(null);
|
|
277
|
-
for (let r =
|
|
278
|
-
const
|
|
279
|
-
if (!
|
|
277
|
+
for (let r = a.length - 1; r >= 0; r--) {
|
|
278
|
+
const l = a[r];
|
|
279
|
+
if (!l)
|
|
280
280
|
continue;
|
|
281
|
-
const
|
|
282
|
-
for (let c =
|
|
283
|
-
const d =
|
|
281
|
+
const n = Object.getOwnPropertyNames(l);
|
|
282
|
+
for (let c = n.length - 1; c >= 0; c--) {
|
|
283
|
+
const d = n[c];
|
|
284
284
|
if (d === "__proto__" || d === "constructor")
|
|
285
285
|
continue;
|
|
286
|
-
const h = Object.getOwnPropertyDescriptor(
|
|
286
|
+
const h = Object.getOwnPropertyDescriptor(l, d);
|
|
287
287
|
if (!s[d])
|
|
288
288
|
s[d] = h.get ? {
|
|
289
289
|
enumerable: !0,
|
|
290
290
|
configurable: !0,
|
|
291
|
-
get:
|
|
291
|
+
get: Ge.bind(t[d] = [h.get.bind(l)])
|
|
292
292
|
} : h.value !== void 0 ? h : void 0;
|
|
293
293
|
else {
|
|
294
|
-
const
|
|
295
|
-
|
|
294
|
+
const p = t[d];
|
|
295
|
+
p && (h.get ? p.push(h.get.bind(l)) : h.value !== void 0 && p.push(() => h.value));
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
const o = {}, i = Object.keys(s);
|
|
300
300
|
for (let r = i.length - 1; r >= 0; r--) {
|
|
301
|
-
const
|
|
302
|
-
|
|
301
|
+
const l = i[r], n = s[l];
|
|
302
|
+
n && n.get ? Object.defineProperty(o, l, n) : o[l] = n ? n.value : void 0;
|
|
303
303
|
}
|
|
304
304
|
return o;
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
let s = t.length, o = e.length, i = s, r = 0,
|
|
308
|
-
for (; r < o ||
|
|
309
|
-
if (e[r] === t[
|
|
310
|
-
r++,
|
|
306
|
+
function _e(a, e, t) {
|
|
307
|
+
let s = t.length, o = e.length, i = s, r = 0, l = 0, n = e[o - 1].nextSibling, c = null;
|
|
308
|
+
for (; r < o || l < i; ) {
|
|
309
|
+
if (e[r] === t[l]) {
|
|
310
|
+
r++, l++;
|
|
311
311
|
continue;
|
|
312
312
|
}
|
|
313
313
|
for (; e[o - 1] === t[i - 1]; )
|
|
314
314
|
o--, i--;
|
|
315
315
|
if (o === r) {
|
|
316
|
-
const d = i < s ?
|
|
317
|
-
for (;
|
|
318
|
-
|
|
319
|
-
} else if (i ===
|
|
316
|
+
const d = i < s ? l ? t[l - 1].nextSibling : t[i - l] : n;
|
|
317
|
+
for (; l < i; )
|
|
318
|
+
a.insertBefore(t[l++], d);
|
|
319
|
+
} else if (i === l)
|
|
320
320
|
for (; r < o; )
|
|
321
321
|
(!c || !c.has(e[r])) && e[r].remove(), r++;
|
|
322
|
-
else if (e[r] === t[i - 1] && t[
|
|
322
|
+
else if (e[r] === t[i - 1] && t[l] === e[o - 1]) {
|
|
323
323
|
const d = e[--o].nextSibling;
|
|
324
|
-
|
|
324
|
+
a.insertBefore(t[l++], e[r++].nextSibling), a.insertBefore(t[--i], d), e[o] = t[i];
|
|
325
325
|
} else {
|
|
326
326
|
if (!c) {
|
|
327
327
|
c = /* @__PURE__ */ new Map();
|
|
328
|
-
let h =
|
|
328
|
+
let h = l;
|
|
329
329
|
for (; h < i; )
|
|
330
330
|
c.set(t[h], h++);
|
|
331
331
|
}
|
|
332
332
|
const d = c.get(e[r]);
|
|
333
333
|
if (d != null)
|
|
334
|
-
if (
|
|
335
|
-
let h = r,
|
|
336
|
-
for (; ++h < o && h < i && !((
|
|
337
|
-
|
|
338
|
-
if (
|
|
339
|
-
const
|
|
340
|
-
for (;
|
|
341
|
-
|
|
334
|
+
if (l < d && d < i) {
|
|
335
|
+
let h = r, p = 1, u;
|
|
336
|
+
for (; ++h < o && h < i && !((u = c.get(e[h])) == null || u !== d + p); )
|
|
337
|
+
p++;
|
|
338
|
+
if (p > d - l) {
|
|
339
|
+
const g = e[r];
|
|
340
|
+
for (; l < d; )
|
|
341
|
+
a.insertBefore(t[l++], g);
|
|
342
342
|
} else
|
|
343
|
-
|
|
343
|
+
a.replaceChild(t[l++], e[r++]);
|
|
344
344
|
} else
|
|
345
345
|
r++;
|
|
346
346
|
else
|
|
@@ -348,125 +348,125 @@ function Ne(l, e, t) {
|
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
-
function ze(
|
|
351
|
+
function ze(a, e, t, s = {}) {
|
|
352
352
|
let o;
|
|
353
|
-
return
|
|
354
|
-
o = i, e === document ?
|
|
353
|
+
return Fe((i) => {
|
|
354
|
+
o = i, e === document ? a() : Xe(e, a(), e.firstChild ? null : void 0, t);
|
|
355
355
|
}, s.owner), () => {
|
|
356
356
|
o(), e.textContent = "";
|
|
357
357
|
};
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function Ue(a, e, t) {
|
|
360
360
|
let s;
|
|
361
361
|
const o = () => {
|
|
362
362
|
const r = document.createElement("template");
|
|
363
|
-
return r.innerHTML =
|
|
364
|
-
}, i = e ? () =>
|
|
363
|
+
return r.innerHTML = a, t ? r.content.firstChild.firstChild : r.content.firstChild;
|
|
364
|
+
}, i = e ? () => H(() => document.importNode(s || (s = o()), !0)) : () => (s || (s = o())).cloneNode(!0);
|
|
365
365
|
return i.cloneNode = i, i;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
return
|
|
367
|
+
function je(a, e, t) {
|
|
368
|
+
return H(() => a(e, t));
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function Xe(a, e, t, s) {
|
|
371
371
|
if (t !== void 0 && !s && (s = []), typeof e != "function")
|
|
372
|
-
return
|
|
373
|
-
se((o) =>
|
|
372
|
+
return j(a, e, s, t);
|
|
373
|
+
se((o) => j(a, e(), o, t), s);
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function j(a, e, t, s, o) {
|
|
376
376
|
for (; typeof t == "function"; )
|
|
377
377
|
t = t();
|
|
378
378
|
if (e === t)
|
|
379
379
|
return t;
|
|
380
380
|
const i = typeof e, r = s !== void 0;
|
|
381
|
-
if (
|
|
381
|
+
if (a = r && t[0] && t[0].parentNode || a, i === "string" || i === "number")
|
|
382
382
|
if (i === "number" && (e = e.toString()), r) {
|
|
383
|
-
let
|
|
384
|
-
|
|
383
|
+
let l = t[0];
|
|
384
|
+
l && l.nodeType === 3 ? l.data !== e && (l.data = e) : l = document.createTextNode(e), t = P(a, t, s, l);
|
|
385
385
|
} else
|
|
386
|
-
t !== "" && typeof t == "string" ? t =
|
|
386
|
+
t !== "" && typeof t == "string" ? t = a.firstChild.data = e : t = a.textContent = e;
|
|
387
387
|
else if (e == null || i === "boolean")
|
|
388
|
-
t =
|
|
388
|
+
t = P(a, t, s);
|
|
389
389
|
else {
|
|
390
390
|
if (i === "function")
|
|
391
391
|
return se(() => {
|
|
392
|
-
let
|
|
393
|
-
for (; typeof
|
|
394
|
-
|
|
395
|
-
t =
|
|
392
|
+
let l = e();
|
|
393
|
+
for (; typeof l == "function"; )
|
|
394
|
+
l = l();
|
|
395
|
+
t = j(a, l, t, s);
|
|
396
396
|
}), () => t;
|
|
397
397
|
if (Array.isArray(e)) {
|
|
398
|
-
const
|
|
399
|
-
if (oe(
|
|
400
|
-
return se(() => t =
|
|
401
|
-
if (
|
|
402
|
-
if (t =
|
|
398
|
+
const l = [], n = t && Array.isArray(t);
|
|
399
|
+
if (oe(l, e, t, o))
|
|
400
|
+
return se(() => t = j(a, l, t, s, !0)), () => t;
|
|
401
|
+
if (l.length === 0) {
|
|
402
|
+
if (t = P(a, t, s), r)
|
|
403
403
|
return t;
|
|
404
404
|
} else
|
|
405
|
-
|
|
406
|
-
t =
|
|
405
|
+
n ? t.length === 0 ? ue(a, l, s) : _e(a, t, l) : (t && P(a), ue(a, l));
|
|
406
|
+
t = l;
|
|
407
407
|
} else if (e.nodeType) {
|
|
408
408
|
if (Array.isArray(t)) {
|
|
409
409
|
if (r)
|
|
410
|
-
return t =
|
|
411
|
-
|
|
410
|
+
return t = P(a, t, s, e);
|
|
411
|
+
P(a, t, null, e);
|
|
412
412
|
} else
|
|
413
|
-
t == null || t === "" || !
|
|
413
|
+
t == null || t === "" || !a.firstChild ? a.appendChild(e) : a.replaceChild(e, a.firstChild);
|
|
414
414
|
t = e;
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
return t;
|
|
418
418
|
}
|
|
419
|
-
function oe(
|
|
419
|
+
function oe(a, e, t, s) {
|
|
420
420
|
let o = !1;
|
|
421
421
|
for (let i = 0, r = e.length; i < r; i++) {
|
|
422
|
-
let
|
|
423
|
-
if (!(
|
|
424
|
-
if ((c = typeof
|
|
425
|
-
|
|
426
|
-
else if (Array.isArray(
|
|
427
|
-
o = oe(l, n
|
|
422
|
+
let l = e[i], n = t && t[i], c;
|
|
423
|
+
if (!(l == null || l === !0 || l === !1))
|
|
424
|
+
if ((c = typeof l) == "object" && l.nodeType)
|
|
425
|
+
a.push(l);
|
|
426
|
+
else if (Array.isArray(l))
|
|
427
|
+
o = oe(a, l, n) || o;
|
|
428
428
|
else if (c === "function")
|
|
429
429
|
if (s) {
|
|
430
|
-
for (; typeof
|
|
431
|
-
|
|
432
|
-
o = oe(
|
|
430
|
+
for (; typeof l == "function"; )
|
|
431
|
+
l = l();
|
|
432
|
+
o = oe(a, Array.isArray(l) ? l : [l], Array.isArray(n) ? n : [n]) || o;
|
|
433
433
|
} else
|
|
434
|
-
|
|
434
|
+
a.push(l), o = !0;
|
|
435
435
|
else {
|
|
436
|
-
const d = String(
|
|
437
|
-
|
|
436
|
+
const d = String(l);
|
|
437
|
+
n && n.nodeType === 3 && n.data === d ? a.push(n) : a.push(document.createTextNode(d));
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
return o;
|
|
441
441
|
}
|
|
442
|
-
function
|
|
442
|
+
function ue(a, e, t = null) {
|
|
443
443
|
for (let s = 0, o = e.length; s < o; s++)
|
|
444
|
-
|
|
444
|
+
a.insertBefore(e[s], t);
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function P(a, e, t, s) {
|
|
447
447
|
if (t === void 0)
|
|
448
|
-
return
|
|
448
|
+
return a.textContent = "";
|
|
449
449
|
const o = s || document.createTextNode("");
|
|
450
450
|
if (e.length) {
|
|
451
451
|
let i = !1;
|
|
452
452
|
for (let r = e.length - 1; r >= 0; r--) {
|
|
453
|
-
const
|
|
454
|
-
if (o !==
|
|
455
|
-
const
|
|
456
|
-
!i && !r ?
|
|
453
|
+
const l = e[r];
|
|
454
|
+
if (o !== l) {
|
|
455
|
+
const n = l.parentNode === a;
|
|
456
|
+
!i && !r ? n ? a.replaceChild(o, l) : a.insertBefore(o, t) : n && l.remove();
|
|
457
457
|
} else
|
|
458
458
|
i = !0;
|
|
459
459
|
}
|
|
460
460
|
} else
|
|
461
|
-
|
|
461
|
+
a.insertBefore(o, t);
|
|
462
462
|
return [o];
|
|
463
463
|
}
|
|
464
|
-
class
|
|
464
|
+
class Ct {
|
|
465
465
|
constructor(e) {
|
|
466
466
|
this.code = e;
|
|
467
467
|
}
|
|
468
|
-
render(e, t, s, o, i, r,
|
|
469
|
-
const
|
|
468
|
+
render(e, t, s, o, i, r, l) {
|
|
469
|
+
const n = Ee({
|
|
470
470
|
rowIndex: t,
|
|
471
471
|
columnIndex: s,
|
|
472
472
|
areaIdent: o,
|
|
@@ -474,22 +474,30 @@ class yt {
|
|
|
474
474
|
cellValue: r
|
|
475
475
|
});
|
|
476
476
|
ze(
|
|
477
|
-
() => this.code(
|
|
477
|
+
() => this.code(n),
|
|
478
478
|
e
|
|
479
479
|
);
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
const
|
|
482
|
+
const wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
483
483
|
__proto__: null
|
|
484
484
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
485
|
-
|
|
485
|
+
function Ke(a, e = 500) {
|
|
486
|
+
let t = null;
|
|
487
|
+
return function(...s) {
|
|
488
|
+
t && window.clearTimeout(t), t = window.setTimeout(() => {
|
|
489
|
+
a.apply(this, s), t = null;
|
|
490
|
+
}, e);
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
class B {
|
|
486
494
|
// The constructor is private to prevent direct construction calls
|
|
487
495
|
// with the `new` operator
|
|
488
496
|
constructor() {
|
|
489
497
|
this.alreadySet = !1;
|
|
490
498
|
}
|
|
491
499
|
static getInstance() {
|
|
492
|
-
return
|
|
500
|
+
return B.instance || (B.instance = new B()), B.instance;
|
|
493
501
|
}
|
|
494
502
|
/**
|
|
495
503
|
* Method to set the license key for the application.
|
|
@@ -507,18 +515,18 @@ class $ {
|
|
|
507
515
|
}
|
|
508
516
|
}
|
|
509
517
|
}
|
|
510
|
-
function ie(
|
|
511
|
-
return
|
|
518
|
+
function ie(a) {
|
|
519
|
+
return a && a.type === "TreeRow";
|
|
512
520
|
}
|
|
513
|
-
function
|
|
514
|
-
return
|
|
521
|
+
function re(a) {
|
|
522
|
+
return a && a.type === "AreaModelTree";
|
|
515
523
|
}
|
|
516
|
-
class
|
|
517
|
-
constructor(e = -1, t = -1, s = -1, o = -1, i, r,
|
|
518
|
-
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = o, this.areaIdent = i, this.sideIdent = r, this.originalEvent =
|
|
524
|
+
class le {
|
|
525
|
+
constructor(e = -1, t = -1, s = -1, o = -1, i, r, l, n = 0, c = 0, d = 0, h = "") {
|
|
526
|
+
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = o, this.areaIdent = i, this.sideIdent = r, this.originalEvent = l, this.clickCount = n, this.draggingX = c, this.draggingY = d, this.action = h;
|
|
519
527
|
}
|
|
520
528
|
clone() {
|
|
521
|
-
return new
|
|
529
|
+
return new le(
|
|
522
530
|
this.rowIndex,
|
|
523
531
|
this.rowTop,
|
|
524
532
|
this.columnIndex,
|
|
@@ -638,26 +646,26 @@ class Ye {
|
|
|
638
646
|
return this.addClass(e, s), this.domService.appendChild(t, s), s;
|
|
639
647
|
}
|
|
640
648
|
addRowDiv(e, t, s = -1, o, i, r = "") {
|
|
641
|
-
const
|
|
642
|
-
if (this.domService.addClass(
|
|
649
|
+
const l = t.index ?? -1, n = this.getDivOrCreateDiv(l, e);
|
|
650
|
+
if (this.domService.addClass(n, "ge-table-row-div"), this.domService.addClass(n, `ge-table-row-div-${t.index}`), o === "body" && i === "center") {
|
|
643
651
|
const c = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
644
|
-
this.domService.addClass(
|
|
652
|
+
this.domService.addClass(n, `ge-table-row-${c}`);
|
|
645
653
|
}
|
|
646
|
-
if (this.domService.setStyle(
|
|
654
|
+
if (this.domService.setStyle(n, "display", "clip"), this.domService.setStyle(n, "position", "absolute"), this.domService.setStyle(n, "left", `${t.left}px`), this.domService.setStyle(n, "top", `${t.top}px`), this.domService.setStyle(n, "width", `${t.width}px`), this.domService.setStyle(n, "height", `${t.height}px`), this.domService.setAttribute(n, "data-row-index", `${s}`), this.domService.setAttribute(n, "data-area", `${o}`), r) {
|
|
647
655
|
const c = this.domService.createText(r);
|
|
648
|
-
this.domService.appendChild(
|
|
656
|
+
this.domService.appendChild(n, c);
|
|
649
657
|
}
|
|
650
|
-
return this.domService.appendChild(e.child,
|
|
658
|
+
return this.domService.appendChild(e.child, n), n;
|
|
651
659
|
}
|
|
652
660
|
addColumnDiv(e) {
|
|
653
|
-
const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent: r, sideIdent:
|
|
654
|
-
this.domService.addClass(
|
|
655
|
-
const
|
|
656
|
-
if (r === "body" &&
|
|
657
|
-
const
|
|
658
|
-
this.addLabelDiv(
|
|
661
|
+
const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent: r, sideIdent: l, text: n = "", treeArrow: c, tableOptions: d, checkedType: h = void 0, sortState: p } = e, u = d == null ? void 0 : d.treeOptions, g = d == null ? void 0 : d.showCheckboxWihoutExtraColumn, b = this.domService.createElement("div");
|
|
662
|
+
this.domService.addClass(b, "ge-table-col-div"), g && this.domService.addClass(b, "ge-with-checkbox"), this.domService.addClass(b, `ge-table-col-div-${s.index}`), this.domService.setAttribute(b, "data-col-index", `${s.index}`), this.domService.setAttribute(b, "data-row-index", `${o}`), this.domService.setAttribute(b, "data-area", `${r}`);
|
|
663
|
+
const f = ((s == null ? void 0 : s.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
664
|
+
if (r === "body" && l === "center" && this.domService.addClass(b, `ge-table-column-${f}`), this.domService.setStyle(b, "display", "clip"), this.domService.setStyle(b, "position", "absolute"), this.domService.setStyle(b, "left", `${s.left}px`), this.domService.setStyle(b, "top", `${s.top}px`), this.domService.setStyle(b, "width", `${s.width}px`), this.domService.setStyle(b, "height", `${s.height}px`), c && c !== "none" && (this.domService.addClass(b, "ge-table-col-tree"), this.addArrowDiv(b, c, u, o, i, r)), g && i === 0 && h && this.addCheckboxToDiv(b, h, r, o), n) {
|
|
665
|
+
const m = c !== "none" && i === 0;
|
|
666
|
+
this.addLabelDiv(b, n, m, o, i, r);
|
|
659
667
|
}
|
|
660
|
-
return
|
|
668
|
+
return p && this.addSortedIcon(b, p, d == null ? void 0 : d.sortedOptions, i), this.domService.appendChild(t, b), b;
|
|
661
669
|
}
|
|
662
670
|
addCheckboxToDiv(e, t, s, o) {
|
|
663
671
|
const i = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
|
|
@@ -671,40 +679,40 @@ class Ye {
|
|
|
671
679
|
class="ge-table-row-checkbox"> `, this.domService.setStyle(i, "display", "inline"), this.domService.setStyle(i, "width", "inherit"), this.domService.setAttribute(i, "data-row-index", `${o}`), this.domService.appendChild(e, i), i;
|
|
672
680
|
}
|
|
673
681
|
addLabelDiv(e, t = "", s = !1, o = -1, i = -1, r = "body") {
|
|
674
|
-
const
|
|
675
|
-
if (this.domService.addClass(
|
|
682
|
+
const l = this.domService.createElement("div");
|
|
683
|
+
if (this.domService.addClass(l, "ge-table-label-div"), this.domService.setStyle(l, "position", "relative"), this.domService.setStyle(l, "background", "transparent"), this.domService.setStyle(l, "width", "100%"), this.domService.setStyle(l, "height", "100%"), this.domService.setAttribute(l, "data-row-index", `${o}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`), t)
|
|
676
684
|
if (s) {
|
|
677
|
-
const
|
|
678
|
-
this.domService.appendChild(
|
|
685
|
+
const n = this.domService.createText(t);
|
|
686
|
+
this.domService.appendChild(l, n);
|
|
679
687
|
} else {
|
|
680
|
-
const
|
|
681
|
-
this.domService.appendChild(
|
|
688
|
+
const n = this.domService.createElement("div");
|
|
689
|
+
this.domService.appendChild(l, n);
|
|
682
690
|
const c = this.domService.createText(t);
|
|
683
|
-
this.domService.addClass(
|
|
691
|
+
this.domService.addClass(n, "ge-table-label"), this.domService.appendChild(n, c), this.domService.setAttribute(n, "data-row-index", `${o}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${r}`);
|
|
684
692
|
}
|
|
685
|
-
return this.domService.appendChild(e,
|
|
693
|
+
return this.domService.appendChild(e, l), l;
|
|
686
694
|
}
|
|
687
695
|
addSortedIcon(e, t = "", s = new Me(), o = -1) {
|
|
688
696
|
const i = this.domService.createElement("div");
|
|
689
697
|
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");
|
|
690
698
|
let r;
|
|
691
699
|
t === "asc" ? r = s.iconAsc : t === "desc" ? r = s.iconDesc : r = s.iconPlaceholder;
|
|
692
|
-
const
|
|
693
|
-
this.domService.appendChild(i,
|
|
700
|
+
const l = r.content, n = this.domService.createText(l);
|
|
701
|
+
this.domService.appendChild(i, n), r.style && this.applyStyleString(i, r.style);
|
|
694
702
|
for (const c of r.classes)
|
|
695
703
|
this.domService.addClass(i, c);
|
|
696
704
|
return this.domService.appendChild(e, i), i;
|
|
697
705
|
}
|
|
698
706
|
addArrowDiv(e, t = "none", s = new Ae(), o = -1, i = -1, r = "body") {
|
|
699
|
-
const
|
|
700
|
-
this.domService.addClass(
|
|
701
|
-
let
|
|
702
|
-
t === "expanded" ?
|
|
703
|
-
const c =
|
|
704
|
-
this.domService.appendChild(
|
|
705
|
-
for (const h of
|
|
706
|
-
this.domService.addClass(
|
|
707
|
-
return this.domService.appendChild(e,
|
|
707
|
+
const l = this.domService.createElement("div");
|
|
708
|
+
this.domService.addClass(l, "ge-table-tree-arrow-div"), this.domService.setStyle(l, "display", "inline-block"), this.domService.setStyle(l, "position", ""), this.domService.setStyle(l, "width", "20px"), this.domService.setStyle(l, "background", "transparent"), this.domService.setStyle(l, "cursor", "pointer"), this.domService.setAttribute(l, "data-row-index", `${o}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`);
|
|
709
|
+
let n;
|
|
710
|
+
t === "expanded" ? n = s.arrowExpanded : t === "collapsed" ? n = s.arrowCollapsed : n = s.arrowPlaceholder;
|
|
711
|
+
const c = n.content, d = this.domService.createText(c);
|
|
712
|
+
this.domService.appendChild(l, d), n.style && this.applyStyleString(l, n.style);
|
|
713
|
+
for (const h of n.classes)
|
|
714
|
+
this.domService.addClass(l, h);
|
|
715
|
+
return this.domService.appendChild(e, l), l;
|
|
708
716
|
}
|
|
709
717
|
addColumnBorderDivs(e, t, s, o, i) {
|
|
710
718
|
if (e.verticalBorderVisible) {
|
|
@@ -746,13 +754,13 @@ class Ye {
|
|
|
746
754
|
return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
|
|
747
755
|
}
|
|
748
756
|
}
|
|
749
|
-
const
|
|
750
|
-
class
|
|
757
|
+
const ne = (a) => a === "header" ? "header" : a === "footer" ? "footer" : "body";
|
|
758
|
+
class Je {
|
|
751
759
|
constructor(e, t) {
|
|
752
760
|
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)) {
|
|
753
761
|
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"));
|
|
754
762
|
const s = e.getAttribute("data-area");
|
|
755
|
-
if (s && (this.areaIdent =
|
|
763
|
+
if (s && (this.areaIdent = ne(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
|
|
756
764
|
const o = e;
|
|
757
765
|
this.value = o.value;
|
|
758
766
|
}
|
|
@@ -789,7 +797,7 @@ class qe {
|
|
|
789
797
|
if (t - this.lastClicked < this.doubleClickDelay)
|
|
790
798
|
return;
|
|
791
799
|
this.lastClicked = t;
|
|
792
|
-
const s = new
|
|
800
|
+
const s = new Je(e.target, this.tableScope);
|
|
793
801
|
if (s.action === "toggleExpandCollapseAll")
|
|
794
802
|
this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
|
|
795
803
|
else if (s.action === "toggleHeaderGroup")
|
|
@@ -818,15 +826,15 @@ class qe {
|
|
|
818
826
|
*/
|
|
819
827
|
onHostElementDblClicked(e) {
|
|
820
828
|
if (this.lastClicked = Date.now(), e.target instanceof HTMLElement) {
|
|
821
|
-
const t = e.target, s = t.getAttribute("data-area"), o =
|
|
829
|
+
const t = e.target, s = t.getAttribute("data-area"), o = ne(s), i = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), l = this.tableScope.tableModel.getAreaModel(o);
|
|
822
830
|
if (s && o === "header")
|
|
823
831
|
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, r));
|
|
824
832
|
else if (t.getAttribute("data-row-index")) {
|
|
825
|
-
const
|
|
826
|
-
if (s && o === "body" &&
|
|
833
|
+
const n = l.getRowByIndex(i);
|
|
834
|
+
if (s && o === "body" && l.isEditable(i, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, r)), ie(n) && r === this.getArrowColumnIndex()) {
|
|
827
835
|
e.preventDefault(), e.stopPropagation();
|
|
828
|
-
const c =
|
|
829
|
-
c.expanded = !c.expanded, "recalcVisibleTreeRows" in
|
|
836
|
+
const c = n;
|
|
837
|
+
c.expanded = !c.expanded, "recalcVisibleTreeRows" in l && l.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(c);
|
|
830
838
|
}
|
|
831
839
|
}
|
|
832
840
|
}
|
|
@@ -851,11 +859,11 @@ class qe {
|
|
|
851
859
|
* @returns {void}
|
|
852
860
|
*/
|
|
853
861
|
updateCollapsedExpandedState(e) {
|
|
854
|
-
var s, o, i, r,
|
|
862
|
+
var s, o, i, r, l;
|
|
855
863
|
const t = (o = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : o.getRowId;
|
|
856
864
|
if (t) {
|
|
857
|
-
const
|
|
858
|
-
c ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(h) : d && ((
|
|
865
|
+
const n = (i = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : i.collapsedExpandedStateGet().mode, c = n === "collapsed" && !e.expanded || n === "expanded" && e.expanded, d = n === "collapsed" && e.expanded || n === "expanded" && !e.expanded, h = t(e.data);
|
|
866
|
+
c ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(h) : d && ((l = this.tableScope.storeStateCollapsedExpandService) == null || l.collapsedStateIdsRemove(h));
|
|
859
867
|
}
|
|
860
868
|
}
|
|
861
869
|
getArrowColumnIndex() {
|
|
@@ -891,7 +899,7 @@ class qe {
|
|
|
891
899
|
}
|
|
892
900
|
}
|
|
893
901
|
}
|
|
894
|
-
class
|
|
902
|
+
class Ze {
|
|
895
903
|
constructor(e) {
|
|
896
904
|
this.tableScope = e;
|
|
897
905
|
}
|
|
@@ -1008,6 +1016,13 @@ class Je {
|
|
|
1008
1016
|
repaintHard() {
|
|
1009
1017
|
this.tableScope.repaintHard();
|
|
1010
1018
|
}
|
|
1019
|
+
/**
|
|
1020
|
+
* Recalculates the column widths of the table.
|
|
1021
|
+
*
|
|
1022
|
+
* @param {number} clientWidth - The width of the client area.
|
|
1023
|
+
*
|
|
1024
|
+
* @return {void}
|
|
1025
|
+
*/
|
|
1011
1026
|
recalcColumnWidths(e) {
|
|
1012
1027
|
this.tableScope.recalcColumnWidths(e);
|
|
1013
1028
|
}
|
|
@@ -1061,6 +1076,25 @@ class Je {
|
|
|
1061
1076
|
this.tableScope.focusModel()
|
|
1062
1077
|
);
|
|
1063
1078
|
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Downloads an Excel file containing data from the table's header, body, and footer areas.
|
|
1081
|
+
* Extracts the table data into a 2D matrix and uses the Excel service to generate and download the file.
|
|
1082
|
+
*
|
|
1083
|
+
* @return {void} No return value, downloads the Excel file directly.
|
|
1084
|
+
*/
|
|
1085
|
+
downloadExcel() {
|
|
1086
|
+
const e = [], t = this.tableScope.tableModel.getColumnCount(), s = ["header", "body", "footer"];
|
|
1087
|
+
for (const o of s) {
|
|
1088
|
+
const i = this.tableScope.tableModel.getAreaModel(o), r = (i == null ? void 0 : i.getRowCount()) ?? 0;
|
|
1089
|
+
for (let l = 0; l < r; l++) {
|
|
1090
|
+
const n = [];
|
|
1091
|
+
e.push(n);
|
|
1092
|
+
for (let c = 0; c < t; c++)
|
|
1093
|
+
n.push(i.getValueAt(l, c));
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
return this.tableScope.excelService.downloadExcel(e, "table.xlsx");
|
|
1097
|
+
}
|
|
1064
1098
|
/**
|
|
1065
1099
|
* Retrieves the current scope of the table.
|
|
1066
1100
|
*
|
|
@@ -1079,7 +1113,7 @@ class Je {
|
|
|
1079
1113
|
return this.tableScope.selectionModel();
|
|
1080
1114
|
}
|
|
1081
1115
|
}
|
|
1082
|
-
class
|
|
1116
|
+
class ce {
|
|
1083
1117
|
constructor(e) {
|
|
1084
1118
|
this.getStorageKeyFn = e;
|
|
1085
1119
|
}
|
|
@@ -1154,7 +1188,7 @@ class de {
|
|
|
1154
1188
|
// }
|
|
1155
1189
|
// }
|
|
1156
1190
|
}
|
|
1157
|
-
class Qe extends
|
|
1191
|
+
class Qe extends ce {
|
|
1158
1192
|
constructor(e) {
|
|
1159
1193
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
1160
1194
|
}
|
|
@@ -1176,14 +1210,14 @@ class Qe extends de {
|
|
|
1176
1210
|
}
|
|
1177
1211
|
}
|
|
1178
1212
|
}
|
|
1179
|
-
class
|
|
1213
|
+
class et {
|
|
1180
1214
|
constructor(e = "collapsed", t = [], s = !1, o = !1) {
|
|
1181
1215
|
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = o;
|
|
1182
1216
|
}
|
|
1183
1217
|
}
|
|
1184
|
-
class
|
|
1218
|
+
class tt extends ce {
|
|
1185
1219
|
constructor(e) {
|
|
1186
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
1220
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new et(), this.load();
|
|
1187
1221
|
}
|
|
1188
1222
|
collapsedExpandedStateGet() {
|
|
1189
1223
|
return this.collapsedExpandedState;
|
|
@@ -1215,7 +1249,7 @@ class et extends de {
|
|
|
1215
1249
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
1216
1250
|
}
|
|
1217
1251
|
}
|
|
1218
|
-
class
|
|
1252
|
+
class st extends ce {
|
|
1219
1253
|
constructor(e) {
|
|
1220
1254
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
1221
1255
|
}
|
|
@@ -1236,14 +1270,14 @@ class tt extends de {
|
|
|
1236
1270
|
}
|
|
1237
1271
|
}
|
|
1238
1272
|
}
|
|
1239
|
-
class
|
|
1273
|
+
class F {
|
|
1240
1274
|
constructor(e = 0, t = 0, s = 0, o = 0, i) {
|
|
1241
1275
|
this.left = e, this.width = t, this.height = s, this.top = o, this.index = i;
|
|
1242
1276
|
}
|
|
1243
1277
|
}
|
|
1244
|
-
class
|
|
1278
|
+
class ot {
|
|
1245
1279
|
constructor(e, t, s, o) {
|
|
1246
|
-
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new
|
|
1280
|
+
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();
|
|
1247
1281
|
const i = this.hostElement;
|
|
1248
1282
|
i.innerText = "", this.dom.setAttribute(i, "tabindex", "0"), this.dom.setStyle(
|
|
1249
1283
|
this.dom.addClass("ge-table", i),
|
|
@@ -1447,7 +1481,7 @@ class A {
|
|
|
1447
1481
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
1448
1482
|
}
|
|
1449
1483
|
}
|
|
1450
|
-
class
|
|
1484
|
+
class it {
|
|
1451
1485
|
constructor(e, t) {
|
|
1452
1486
|
this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
|
|
1453
1487
|
}
|
|
@@ -1461,9 +1495,9 @@ class ot {
|
|
|
1461
1495
|
let i = this.areaModel.getColspanAt(s, o), r = this.areaModel.getRowspanAt(s, o);
|
|
1462
1496
|
if (i > 1 || r > 1) {
|
|
1463
1497
|
i === 0 && (i = 1), r === 0 && (r = 1);
|
|
1464
|
-
const
|
|
1498
|
+
const l = "gammaCells" in this.areaModel;
|
|
1465
1499
|
this.colAndRowspanRanges.push(
|
|
1466
|
-
new A(s, o, s + r - 1, o + i - 1,
|
|
1500
|
+
new A(s, o, s + r - 1, o + i - 1, l)
|
|
1467
1501
|
);
|
|
1468
1502
|
}
|
|
1469
1503
|
}
|
|
@@ -1480,22 +1514,22 @@ class ot {
|
|
|
1480
1514
|
return !1;
|
|
1481
1515
|
}
|
|
1482
1516
|
}
|
|
1483
|
-
class
|
|
1517
|
+
class rt {
|
|
1484
1518
|
constructor(e, t, s) {
|
|
1485
1519
|
this.header = e, this.body = t, this.footer = s;
|
|
1486
1520
|
}
|
|
1487
1521
|
}
|
|
1488
|
-
class
|
|
1522
|
+
class at extends ot {
|
|
1489
1523
|
constructor(e, t, s, o) {
|
|
1490
|
-
var r,
|
|
1524
|
+
var r, l;
|
|
1491
1525
|
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 = {
|
|
1492
1526
|
header: [],
|
|
1493
1527
|
body: [],
|
|
1494
1528
|
footer: []
|
|
1495
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
1496
|
-
(
|
|
1529
|
+
}, this.tree = !1, this.colAndRowspanModels = new rt(), 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(
|
|
1530
|
+
(n) => {
|
|
1497
1531
|
var c;
|
|
1498
|
-
this.colAndRowspanModels[
|
|
1532
|
+
this.colAndRowspanModels[n] = new it(t, t.getAreaModel(n)), (c = this.colAndRowspanModels[n]) == null || c.init();
|
|
1499
1533
|
}
|
|
1500
1534
|
);
|
|
1501
1535
|
}
|
|
@@ -1581,19 +1615,19 @@ class lt extends st {
|
|
|
1581
1615
|
for (const t of this.removables)
|
|
1582
1616
|
t.remove();
|
|
1583
1617
|
this.hideHoverRow(), this.hideHoverColumn(), this.scrollTop = this.scrollViewport.scrollTop, this.scrollLeft = this.scrollViewport.scrollLeft, this.debounce(this.checkForScrollPosSaving.bind(this)), this.scrollFactorY = this.scrollTop / (this.scrollViewport.scrollHeight - this.scrollViewport.clientHeight), this.scrollFactorX = this.scrollLeft / (this.scrollViewport.scrollWidth - this.scrollViewport.clientWidth), isNaN(this.scrollFactorY) && (this.scrollFactorY = 0), isNaN(this.scrollFactorX) && (this.scrollFactorX = 0), this.adjustBody(), this.adjustArea("footer"), this.adjustArea("header"), this.tableOptions.tableTopBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
|
|
1584
|
-
new
|
|
1618
|
+
new F(0, this.hostElement.clientWidth, 1, 0),
|
|
1585
1619
|
this.hostElement,
|
|
1586
1620
|
"ge-table-border"
|
|
1587
1621
|
)), this.tableOptions.tableBottomBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
|
|
1588
|
-
new
|
|
1622
|
+
new F(0, this.hostElement.clientWidth, 1, this.hostElement.clientHeight - 1),
|
|
1589
1623
|
this.hostElement,
|
|
1590
1624
|
"ge-table-border"
|
|
1591
1625
|
)), this.tableModel.getFixedLeftColumnCount() > 0 && this.removables.push(this.dom.addVerticalBorder(
|
|
1592
|
-
new
|
|
1626
|
+
new F(this.areaBodyWest.child.clientWidth, 1, this.hostElement.clientHeight, 0),
|
|
1593
1627
|
this.hostElement,
|
|
1594
1628
|
"ge-table-body-west-vertical-border"
|
|
1595
1629
|
)), ((e = this.tableModel.getAreaModel("header")) == null ? void 0 : e.getRowCount()) > 0 && this.removables.push(this.dom.addHorizontalBorder(
|
|
1596
|
-
new
|
|
1630
|
+
new F(0, this.hostElement.clientWidth, 1, this.areaHeaderCenter.child.clientHeight),
|
|
1597
1631
|
this.hostElement,
|
|
1598
1632
|
"ge-table-body-west-vertical-border"
|
|
1599
1633
|
));
|
|
@@ -1632,22 +1666,23 @@ class lt extends st {
|
|
|
1632
1666
|
* @param {string[]} cssClasses - An array of CSS classes to be applied to the cell.
|
|
1633
1667
|
*/
|
|
1634
1668
|
rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: o, cssClasses: i }) {
|
|
1635
|
-
const r = this.tableModel.getAreaModel(e),
|
|
1636
|
-
if (
|
|
1669
|
+
const r = this.tableModel.getAreaModel(e), l = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', n = document.querySelector(l);
|
|
1670
|
+
if (n) {
|
|
1637
1671
|
let c;
|
|
1638
|
-
const
|
|
1639
|
-
|
|
1640
|
-
|
|
1672
|
+
const d = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s;
|
|
1673
|
+
let h;
|
|
1674
|
+
if (d ? h = this.editorRenderer : h = r.getCellRenderer(t, s), n.innerText = "", this.applyCssClasses(n, i), h)
|
|
1675
|
+
c = h.render(n, t, s, e, r, o, this.dom.domService), c && this.cleanupFunctions[e].push(c);
|
|
1641
1676
|
else {
|
|
1642
|
-
const
|
|
1643
|
-
this.dom.addLabelDiv(
|
|
1677
|
+
const g = `${o}`;
|
|
1678
|
+
this.dom.addLabelDiv(n, g, !1, t, s, e);
|
|
1644
1679
|
}
|
|
1645
|
-
const
|
|
1646
|
-
|
|
1647
|
-
const
|
|
1648
|
-
if (
|
|
1649
|
-
for (const
|
|
1650
|
-
this.dom.setStyle(
|
|
1680
|
+
const p = r.getCustomClassesAt(t, s);
|
|
1681
|
+
p.length && this.dom.addClasses(p, n);
|
|
1682
|
+
const u = r.getCustomStyleAt(t, s);
|
|
1683
|
+
if (u)
|
|
1684
|
+
for (const g in u)
|
|
1685
|
+
this.dom.setStyle(n, g, u[g]);
|
|
1651
1686
|
}
|
|
1652
1687
|
}
|
|
1653
1688
|
/**
|
|
@@ -1756,87 +1791,87 @@ class lt extends st {
|
|
|
1756
1791
|
* @protected
|
|
1757
1792
|
*/
|
|
1758
1793
|
adjustArea(e, t = 0) {
|
|
1759
|
-
var
|
|
1794
|
+
var f;
|
|
1760
1795
|
const s = this.getArea(e, "west"), o = this.getArea(e, "center"), i = this.getArea(e, "east"), r = o.child.clientHeight;
|
|
1761
1796
|
s.child.innerText = "", o.child.innerText = "", i.child.innerText = "";
|
|
1762
|
-
const
|
|
1797
|
+
const l = 0, n = this.areaBodyCenterGeo.width, c = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e), h = d.getRowCount();
|
|
1763
1798
|
for (; this.cleanupFunctions[e].length; ) {
|
|
1764
|
-
const
|
|
1765
|
-
|
|
1766
|
-
}
|
|
1767
|
-
let
|
|
1768
|
-
const
|
|
1769
|
-
for (let
|
|
1770
|
-
const
|
|
1771
|
-
if (
|
|
1772
|
-
this.firstVisibleRowIndex =
|
|
1773
|
-
let y = { left:
|
|
1774
|
-
const k =
|
|
1799
|
+
const m = this.cleanupFunctions[e].shift();
|
|
1800
|
+
m && m();
|
|
1801
|
+
}
|
|
1802
|
+
let p = t;
|
|
1803
|
+
const u = this.tableModel.getColumnCount(), g = this.tableModel.getFixedRightColumnCount(), b = this.tableModel.getFixedLeftColumnCount();
|
|
1804
|
+
for (let m = 0; m < h; m++) {
|
|
1805
|
+
const x = p, C = m === h - 1, E = this.tableModel.getRowHeight(e, m);
|
|
1806
|
+
if (x + E > 0) {
|
|
1807
|
+
this.firstVisibleRowIndex = m;
|
|
1808
|
+
let y = { left: l, width: n, height: E, top: x, index: m }, S = this.dom.addRowDiv(o, y, m, e, "center");
|
|
1809
|
+
const k = b;
|
|
1775
1810
|
if (this.adjustColumnsToRowParent({
|
|
1776
1811
|
areaIdent: e,
|
|
1777
1812
|
sideIdent: "center",
|
|
1778
1813
|
areaModel: d,
|
|
1779
1814
|
geo: y,
|
|
1780
|
-
parent:
|
|
1781
|
-
rowIndex:
|
|
1815
|
+
parent: S,
|
|
1816
|
+
rowIndex: m,
|
|
1782
1817
|
columnIndexStart: k,
|
|
1783
|
-
columnIndexEnd:
|
|
1818
|
+
columnIndexEnd: u - g - 1,
|
|
1784
1819
|
verticalFixed: !1,
|
|
1785
1820
|
lastRowOfModel: C
|
|
1786
|
-
}), c.left > 0 && (y = { left:
|
|
1821
|
+
}), c.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({
|
|
1787
1822
|
areaIdent: e,
|
|
1788
1823
|
sideIdent: "west",
|
|
1789
1824
|
areaModel: d,
|
|
1790
1825
|
geo: y,
|
|
1791
|
-
parent:
|
|
1792
|
-
rowIndex:
|
|
1826
|
+
parent: S,
|
|
1827
|
+
rowIndex: m,
|
|
1793
1828
|
columnIndexStart: 0,
|
|
1794
1829
|
columnIndexEnd: k - 1,
|
|
1795
1830
|
verticalFixed: !0,
|
|
1796
1831
|
lastRowOfModel: C
|
|
1797
|
-
})), c.right > 0 && (y = { left:
|
|
1832
|
+
})), c.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({
|
|
1798
1833
|
areaIdent: e,
|
|
1799
1834
|
sideIdent: "east",
|
|
1800
1835
|
areaModel: d,
|
|
1801
1836
|
geo: y,
|
|
1802
|
-
parent:
|
|
1803
|
-
rowIndex:
|
|
1804
|
-
columnIndexStart:
|
|
1805
|
-
columnIndexEnd:
|
|
1837
|
+
parent: S,
|
|
1838
|
+
rowIndex: m,
|
|
1839
|
+
columnIndexStart: u - g,
|
|
1840
|
+
columnIndexEnd: u - 1,
|
|
1806
1841
|
verticalFixed: !0,
|
|
1807
1842
|
lastRowOfModel: C
|
|
1808
|
-
})), e === "header" && this.tree &&
|
|
1809
|
-
const
|
|
1843
|
+
})), e === "header" && this.tree && m === h - 1) {
|
|
1844
|
+
const R = this.dom.applyStyle(
|
|
1810
1845
|
this.dom.setAttribute(
|
|
1811
|
-
this.dom.addDiv(
|
|
1846
|
+
this.dom.addDiv(S, new F(16, 20, 20, 8)),
|
|
1812
1847
|
"data-ge-action",
|
|
1813
1848
|
"toggleExpandCollapseAll"
|
|
1814
1849
|
),
|
|
1815
1850
|
{ cursor: "pointer" }
|
|
1816
1851
|
), D = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
1817
1852
|
if (D) {
|
|
1818
|
-
const
|
|
1819
|
-
this.dom.domService.appendChild(
|
|
1853
|
+
const N = this.dom.domService.createText(D.content);
|
|
1854
|
+
this.dom.domService.appendChild(R, N), D.style && this.dom.applyStyleString(R, D.style);
|
|
1820
1855
|
}
|
|
1821
1856
|
}
|
|
1822
1857
|
}
|
|
1823
|
-
if (
|
|
1858
|
+
if (p = p + E, p > r)
|
|
1824
1859
|
break;
|
|
1825
1860
|
}
|
|
1826
1861
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
1827
|
-
const
|
|
1828
|
-
if (
|
|
1829
|
-
for (const
|
|
1862
|
+
const m = ((f = this.colAndRowspanModels[e]) == null ? void 0 : f.getRanges()) ?? [];
|
|
1863
|
+
if (m.length)
|
|
1864
|
+
for (const x of m) {
|
|
1830
1865
|
let C = 0, E = o.child, y = "center";
|
|
1831
|
-
if (
|
|
1866
|
+
if (x.c1 < b)
|
|
1832
1867
|
E = s.child, y = "west";
|
|
1833
|
-
else if (
|
|
1868
|
+
else if (g > 0 && x.c1 >= u - g)
|
|
1834
1869
|
E = i.child, y = "east";
|
|
1835
1870
|
else {
|
|
1836
|
-
const
|
|
1837
|
-
C = this.scrollFactorX *
|
|
1871
|
+
const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1872
|
+
C = this.scrollFactorX * S - this.areaBodyWestGeo.width, y = "center";
|
|
1838
1873
|
}
|
|
1839
|
-
this.drawBigCell(
|
|
1874
|
+
this.drawBigCell(x, C, t, d, E, y);
|
|
1840
1875
|
}
|
|
1841
1876
|
}
|
|
1842
1877
|
}
|
|
@@ -1851,24 +1886,24 @@ class lt extends st {
|
|
|
1851
1886
|
* @protected
|
|
1852
1887
|
*/
|
|
1853
1888
|
drawBigCell(e, t, s, o, i, r) {
|
|
1854
|
-
const
|
|
1889
|
+
const l = s + this.getRowHeights(0, e.r1 - 1, o).reduce((f, m) => f + m, 0), n = this.tableModel.getColumnCount(), c = this.tableModel.getFixedRightColumnCount();
|
|
1855
1890
|
let d = 0;
|
|
1856
|
-
c > 0 && e.c1 >=
|
|
1857
|
-
const h = t + this.getColumnWidths(d, e.c1 - 1).reduce((
|
|
1858
|
-
let
|
|
1859
|
-
const
|
|
1860
|
-
|
|
1891
|
+
c > 0 && e.c1 >= n - c && (d = n - c);
|
|
1892
|
+
const h = t + this.getColumnWidths(d, e.c1 - 1).reduce((f, m) => f + m, 0), p = this.getRowHeights(e.r1, e.r2, o).reduce((f, m) => f + m, 0), u = this.getColumnWidths(e.c1, e.c2).reduce((f, m) => f + m, 0);
|
|
1893
|
+
let g = !1;
|
|
1894
|
+
const b = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
1895
|
+
b && (g = b.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
|
|
1861
1896
|
areaModel: o,
|
|
1862
1897
|
areaIdent: o.areaIdent,
|
|
1863
1898
|
sideIdent: r,
|
|
1864
1899
|
rowIndex: e.r1,
|
|
1865
1900
|
columnIndex: e.c1,
|
|
1866
1901
|
left: h,
|
|
1867
|
-
top:
|
|
1868
|
-
width:
|
|
1869
|
-
height:
|
|
1902
|
+
top: l,
|
|
1903
|
+
width: u,
|
|
1904
|
+
height: p,
|
|
1870
1905
|
parent: i,
|
|
1871
|
-
cellSelected:
|
|
1906
|
+
cellSelected: g,
|
|
1872
1907
|
lastRowOfModel: !0,
|
|
1873
1908
|
gammaRange: e.gammaRange
|
|
1874
1909
|
}) : this.renderCell({
|
|
@@ -1878,20 +1913,20 @@ class lt extends st {
|
|
|
1878
1913
|
rowIndex: e.r1,
|
|
1879
1914
|
columnIndex: e.c1,
|
|
1880
1915
|
left: h,
|
|
1881
|
-
top:
|
|
1882
|
-
width:
|
|
1883
|
-
height:
|
|
1916
|
+
top: l,
|
|
1917
|
+
width: u,
|
|
1918
|
+
height: p,
|
|
1884
1919
|
parent: i,
|
|
1885
|
-
cellSelected:
|
|
1920
|
+
cellSelected: g,
|
|
1886
1921
|
lastRowOfModel: !0,
|
|
1887
1922
|
gammaRange: e.gammaRange
|
|
1888
1923
|
}), o.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1889
1924
|
rowIndex: e.r1,
|
|
1890
1925
|
columnIndex: e.c1,
|
|
1891
1926
|
cellLeft: h,
|
|
1892
|
-
cellTop:
|
|
1893
|
-
cellWidth:
|
|
1894
|
-
cellHeight:
|
|
1927
|
+
cellTop: l,
|
|
1928
|
+
cellWidth: u,
|
|
1929
|
+
cellHeight: p,
|
|
1895
1930
|
parent: i
|
|
1896
1931
|
});
|
|
1897
1932
|
}
|
|
@@ -1929,64 +1964,64 @@ class lt extends st {
|
|
|
1929
1964
|
geo: o,
|
|
1930
1965
|
parent: i,
|
|
1931
1966
|
rowIndex: r,
|
|
1932
|
-
columnIndexStart:
|
|
1933
|
-
columnIndexEnd:
|
|
1967
|
+
columnIndexStart: l,
|
|
1968
|
+
columnIndexEnd: n,
|
|
1934
1969
|
verticalFixed: c = !1,
|
|
1935
1970
|
lastRowOfModel: d = !1
|
|
1936
1971
|
}) {
|
|
1937
|
-
var
|
|
1972
|
+
var b;
|
|
1938
1973
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
1939
1974
|
let h = 0;
|
|
1940
1975
|
if (!c) {
|
|
1941
|
-
const
|
|
1942
|
-
h = this.scrollFactorX *
|
|
1943
|
-
}
|
|
1944
|
-
const
|
|
1945
|
-
let
|
|
1946
|
-
for (let
|
|
1947
|
-
const
|
|
1948
|
-
if (
|
|
1976
|
+
const f = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1977
|
+
h = this.scrollFactorX * f;
|
|
1978
|
+
}
|
|
1979
|
+
const p = 0, u = !!(e === "body" && t);
|
|
1980
|
+
let g = h;
|
|
1981
|
+
for (let f = l; f <= n; f++) {
|
|
1982
|
+
const m = g, x = this.tableModel.getColumnWidth(f);
|
|
1983
|
+
if (x > 0 && m + x > 0) {
|
|
1949
1984
|
let C = o.height;
|
|
1950
|
-
const E = s.getRowspanAt(r,
|
|
1951
|
-
E > 1 && (C = this.getRowHeights(r, r + E - 1, s).reduce((
|
|
1952
|
-
let
|
|
1953
|
-
y > 1 && (
|
|
1985
|
+
const E = s.getRowspanAt(r, f), y = s.getColspanAt(r, f);
|
|
1986
|
+
E > 1 && (C = this.getRowHeights(r, r + E - 1, s).reduce((R, D) => R + D, 0));
|
|
1987
|
+
let S = x;
|
|
1988
|
+
y > 1 && (S = this.getColumnWidths(f, f + y - 1).reduce((R, D) => R + D, 0));
|
|
1954
1989
|
let k = !1;
|
|
1955
|
-
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (
|
|
1956
|
-
this.renderDragTargetDiv(i,
|
|
1957
|
-
const
|
|
1958
|
-
this.dom.addColumnBorderDivs(this.tableOptions, i,
|
|
1990
|
+
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (b = this.colAndRowspanModels[e]) != null && b.isInRange(r, f) && (k = !0), this.draggingTargetColumnIndex === f && e !== "header") {
|
|
1991
|
+
this.renderDragTargetDiv(i, m, p, S, C);
|
|
1992
|
+
const R = { left: m, top: p, width: S, height: C };
|
|
1993
|
+
this.dom.addColumnBorderDivs(this.tableOptions, i, R, e, t);
|
|
1959
1994
|
} else {
|
|
1960
|
-
const
|
|
1961
|
-
"gammaCells" in s && s.getValueAt(r,
|
|
1995
|
+
const R = this.renderSelectedBackgroundDiv(k, u, t, s, r, f, i, m, p, S, C);
|
|
1996
|
+
"gammaCells" in s && s.getValueAt(r, f) && (k = !1), k || this.renderCell({
|
|
1962
1997
|
areaModel: s,
|
|
1963
1998
|
areaIdent: e,
|
|
1964
1999
|
sideIdent: t,
|
|
1965
2000
|
rowIndex: r,
|
|
1966
|
-
columnIndex:
|
|
1967
|
-
left:
|
|
1968
|
-
top:
|
|
1969
|
-
width:
|
|
2001
|
+
columnIndex: f,
|
|
2002
|
+
left: m,
|
|
2003
|
+
top: p,
|
|
2004
|
+
width: S,
|
|
1970
2005
|
height: C,
|
|
1971
2006
|
parent: i,
|
|
1972
|
-
cellSelected:
|
|
2007
|
+
cellSelected: R,
|
|
1973
2008
|
lastRowOfModel: d,
|
|
1974
2009
|
gammaRange: !0
|
|
1975
2010
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1976
2011
|
rowIndex: r,
|
|
1977
|
-
columnIndex:
|
|
1978
|
-
cellLeft:
|
|
1979
|
-
cellTop:
|
|
1980
|
-
cellWidth:
|
|
2012
|
+
columnIndex: f,
|
|
2013
|
+
cellLeft: m,
|
|
2014
|
+
cellTop: p,
|
|
2015
|
+
cellWidth: S,
|
|
1981
2016
|
cellHeight: C,
|
|
1982
2017
|
parent: i
|
|
1983
2018
|
});
|
|
1984
2019
|
}
|
|
1985
2020
|
}
|
|
1986
|
-
if (
|
|
2021
|
+
if (g = g + x, g > this.areaBodyCenterGeo.width)
|
|
1987
2022
|
break;
|
|
1988
2023
|
}
|
|
1989
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new
|
|
2024
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new F(g - 1, 1, o.height, 0), i);
|
|
1990
2025
|
}
|
|
1991
2026
|
/**
|
|
1992
2027
|
* Retrieves the column index of the tree arrow column in the table.
|
|
@@ -2007,55 +2042,55 @@ class lt extends st {
|
|
|
2007
2042
|
rowIndex: o,
|
|
2008
2043
|
index: i,
|
|
2009
2044
|
left: r,
|
|
2010
|
-
width:
|
|
2011
|
-
height:
|
|
2045
|
+
width: l,
|
|
2046
|
+
height: n,
|
|
2012
2047
|
top: c,
|
|
2013
2048
|
parent: d,
|
|
2014
2049
|
lastRowOfModel: h
|
|
2015
2050
|
}) {
|
|
2016
|
-
var
|
|
2017
|
-
const
|
|
2018
|
-
let
|
|
2019
|
-
if (i === this.getTreeArrowColumnIndex() && ie(
|
|
2020
|
-
const
|
|
2021
|
-
(
|
|
2022
|
-
}
|
|
2023
|
-
let
|
|
2051
|
+
var pe;
|
|
2052
|
+
const u = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), g = { left: r, width: l, height: n, top: c, index: i }, b = e.getRowByIndex(o);
|
|
2053
|
+
let f = "none";
|
|
2054
|
+
if (i === this.getTreeArrowColumnIndex() && ie(b)) {
|
|
2055
|
+
const w = b;
|
|
2056
|
+
(pe = w.children) != null && pe.length ? w.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
|
|
2057
|
+
}
|
|
2058
|
+
let x;
|
|
2024
2059
|
if (t === "header") {
|
|
2025
|
-
const
|
|
2026
|
-
(!(
|
|
2060
|
+
const w = this.tableModel.getColumnDef(i);
|
|
2061
|
+
(!(w != null && w.sortIconVisible) || w != null && w.sortIconVisible()) && (x = w == null ? void 0 : w.sortState);
|
|
2027
2062
|
}
|
|
2028
|
-
const C = e.getValueAt(o, i), E =
|
|
2063
|
+
const C = e.getValueAt(o, i), E = u ? "" : `${C}`, y = e.isRowChecked(o), S = this.dom.addColumnDiv(
|
|
2029
2064
|
{
|
|
2030
2065
|
parent: d,
|
|
2031
|
-
geo:
|
|
2066
|
+
geo: g,
|
|
2032
2067
|
rowIndex: o,
|
|
2033
2068
|
columnIndex: i,
|
|
2034
2069
|
areaIdent: t,
|
|
2035
2070
|
sideIdent: s,
|
|
2036
2071
|
text: E,
|
|
2037
|
-
treeArrow:
|
|
2072
|
+
treeArrow: f,
|
|
2038
2073
|
tableOptions: this.tableOptions,
|
|
2039
2074
|
checkedType: y,
|
|
2040
|
-
sortState:
|
|
2075
|
+
sortState: x
|
|
2041
2076
|
}
|
|
2042
2077
|
), k = e.getTooltipAt(o, i);
|
|
2043
|
-
k && this.dom.setAttribute(
|
|
2044
|
-
const
|
|
2045
|
-
|
|
2078
|
+
k && this.dom.setAttribute(S, "title", k);
|
|
2079
|
+
const R = this.tableModel.getColumnDef(i);
|
|
2080
|
+
R && R.classes[t] && this.dom.addClasses(R.classes[t], S);
|
|
2046
2081
|
let D;
|
|
2047
|
-
|
|
2048
|
-
const
|
|
2049
|
-
if (
|
|
2050
|
-
const
|
|
2051
|
-
|
|
2082
|
+
u && (D = u.render(S, o, i, t, e, C, this.dom.domService));
|
|
2083
|
+
const N = e.getCustomClassesAt(o, i);
|
|
2084
|
+
if (N.length && this.dom.addClasses(N, S), this.dom.addColumnBorderDivs(this.tableOptions, d, g, t, s), h && this.dom.addHorizontalBorder({ left: r, width: l, height: n, top: c + n }, d), this.getFocusModel && t === "body") {
|
|
2085
|
+
const w = this.getFocusModel();
|
|
2086
|
+
w != null && w.hasFocus(o, i) && this.dom.addFocusBorderDivs(d, g, {});
|
|
2052
2087
|
}
|
|
2053
|
-
t === "header" && this.dom.setAttribute(
|
|
2054
|
-
const
|
|
2055
|
-
if (
|
|
2056
|
-
for (const
|
|
2057
|
-
this.dom.setStyle(
|
|
2058
|
-
return [
|
|
2088
|
+
t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
|
|
2089
|
+
const Z = e.getCustomStyleAt(o, i);
|
|
2090
|
+
if (Z)
|
|
2091
|
+
for (const w in Z)
|
|
2092
|
+
this.dom.setStyle(S, w, Z[w]);
|
|
2093
|
+
return [S, D];
|
|
2059
2094
|
}
|
|
2060
2095
|
/**
|
|
2061
2096
|
* Applies CSS classes to an HTML element.
|
|
@@ -2185,9 +2220,9 @@ class lt extends st {
|
|
|
2185
2220
|
adjustDraggingColumn(e, t, s) {
|
|
2186
2221
|
var o, i;
|
|
2187
2222
|
if (this.dragging) {
|
|
2188
|
-
const r = this.hostElement.clientHeight,
|
|
2223
|
+
const r = this.hostElement.clientHeight, l = this.storedColumnWidths[t];
|
|
2189
2224
|
if ((o = e.originalEvent) != null && o.clientX) {
|
|
2190
|
-
const d = { left: ((i = e.originalEvent) == null ? void 0 : i.clientX) -
|
|
2225
|
+
const d = { left: ((i = e.originalEvent) == null ? void 0 : i.clientX) - l / 2, width: l, height: r, top: 0, index: t };
|
|
2191
2226
|
this.dom.applyStyle(this.draggingColumn, {
|
|
2192
2227
|
background: "rgba(128,128,128,0.2)",
|
|
2193
2228
|
display: "block",
|
|
@@ -2219,27 +2254,27 @@ class lt extends st {
|
|
|
2219
2254
|
renderContentOfDraggingColumnForArea(e, t, s = 0) {
|
|
2220
2255
|
const o = "center", i = this.tableModel.getAreaModel(t), r = i == null ? void 0 : i.getRowCount();
|
|
2221
2256
|
if (r) {
|
|
2222
|
-
const
|
|
2257
|
+
const l = e.index ?? 0, n = this.draggingColumn;
|
|
2223
2258
|
for (let c = 0; c < r; c++) {
|
|
2224
|
-
const d = s, h = i.getRowHeight(c),
|
|
2225
|
-
parent:
|
|
2226
|
-
geo:
|
|
2259
|
+
const d = s, h = i.getRowHeight(c), p = { left: 0, width: e.width, height: h, top: d, index: c }, u = i.getValueAt(c, l), g = i.getCellRenderer(c, l), b = g ? "" : `${u}`, f = {
|
|
2260
|
+
parent: n,
|
|
2261
|
+
geo: p,
|
|
2227
2262
|
rowIndex: c,
|
|
2228
|
-
columnIndex:
|
|
2263
|
+
columnIndex: l,
|
|
2229
2264
|
areaIdent: t,
|
|
2230
2265
|
sideIdent: o,
|
|
2231
|
-
text:
|
|
2232
|
-
},
|
|
2233
|
-
let
|
|
2234
|
-
|
|
2235
|
-
const C = i.getCustomClassesAt(c,
|
|
2236
|
-
C.length && this.dom.addClasses(C,
|
|
2237
|
-
const E = this.tableModel.getColumnDef(
|
|
2238
|
-
E && E.classes[t] && this.dom.addClasses(E.classes[t],
|
|
2239
|
-
const y = i.getCustomStyleAt(c,
|
|
2266
|
+
text: b
|
|
2267
|
+
}, m = this.dom.addColumnDiv(f);
|
|
2268
|
+
let x;
|
|
2269
|
+
g && (x = g.render(m, c, l, t, i, u, this.dom.domService), x && this.cleanupFunctions[t].push(x));
|
|
2270
|
+
const C = i.getCustomClassesAt(c, l);
|
|
2271
|
+
C.length && this.dom.addClasses(C, m);
|
|
2272
|
+
const E = this.tableModel.getColumnDef(l);
|
|
2273
|
+
E && E.classes[t] && this.dom.addClasses(E.classes[t], m), this.dom.addColumnBorderDivs(this.tableOptions, n, p, t, o);
|
|
2274
|
+
const y = i.getCustomStyleAt(c, l);
|
|
2240
2275
|
if (y)
|
|
2241
|
-
for (const
|
|
2242
|
-
this.dom.setStyle(
|
|
2276
|
+
for (const S in y)
|
|
2277
|
+
this.dom.setStyle(m, S, y[S]);
|
|
2243
2278
|
s = s + h;
|
|
2244
2279
|
}
|
|
2245
2280
|
}
|
|
@@ -2289,23 +2324,23 @@ class lt extends st {
|
|
|
2289
2324
|
* @param {number} height - The height of the div.
|
|
2290
2325
|
* @returns {boolean} - Whether the cell is selected.
|
|
2291
2326
|
*/
|
|
2292
|
-
renderSelectedBackgroundDiv(e, t, s, o, i, r,
|
|
2293
|
-
let
|
|
2327
|
+
renderSelectedBackgroundDiv(e, t, s, o, i, r, l, n, c, d, h) {
|
|
2328
|
+
let p = !1;
|
|
2294
2329
|
if (!e && t && o.isSelectable(i, r) && this.getSelectionModel) {
|
|
2295
|
-
const
|
|
2296
|
-
if (
|
|
2297
|
-
const
|
|
2298
|
-
|
|
2299
|
-
for (let
|
|
2300
|
-
const
|
|
2330
|
+
const u = this.getSelectionModel();
|
|
2331
|
+
if (u) {
|
|
2332
|
+
const g = u.getSelectionCount(i, r);
|
|
2333
|
+
p = g > 0;
|
|
2334
|
+
for (let b = 0; b < g; b++) {
|
|
2335
|
+
const f = this.dom.applyStylePosistionAbsolute(
|
|
2301
2336
|
// ge-table-body-west-selected-range
|
|
2302
|
-
this.dom.createDivWithClass(`ge-table-${o.areaIdent}-${s}-selected-range`,
|
|
2337
|
+
this.dom.createDivWithClass(`ge-table-${o.areaIdent}-${s}-selected-range`, l)
|
|
2303
2338
|
);
|
|
2304
|
-
this.dom.setStyle(
|
|
2339
|
+
this.dom.setStyle(f, "left", `${n}px`), this.dom.setStyle(f, "top", `${c}px`), this.dom.setStyle(f, "width", `${d}px`), this.dom.setStyle(f, "height", `${h}px`);
|
|
2305
2340
|
}
|
|
2306
2341
|
}
|
|
2307
2342
|
}
|
|
2308
|
-
return
|
|
2343
|
+
return p;
|
|
2309
2344
|
}
|
|
2310
2345
|
/**
|
|
2311
2346
|
* Renders a cell in the grid.
|
|
@@ -2333,27 +2368,27 @@ class lt extends st {
|
|
|
2333
2368
|
rowIndex: o,
|
|
2334
2369
|
columnIndex: i,
|
|
2335
2370
|
left: r,
|
|
2336
|
-
top:
|
|
2337
|
-
width:
|
|
2371
|
+
top: l,
|
|
2372
|
+
width: n,
|
|
2338
2373
|
height: c,
|
|
2339
2374
|
parent: d,
|
|
2340
2375
|
cellSelected: h,
|
|
2341
|
-
lastRowOfModel:
|
|
2376
|
+
lastRowOfModel: p
|
|
2342
2377
|
}) {
|
|
2343
|
-
const [
|
|
2378
|
+
const [u, g] = this.addAndRenderCellDiv({
|
|
2344
2379
|
areaModel: e,
|
|
2345
2380
|
areaIdent: t,
|
|
2346
2381
|
sideIdent: s,
|
|
2347
2382
|
rowIndex: o,
|
|
2348
2383
|
index: i,
|
|
2349
2384
|
left: r,
|
|
2350
|
-
width:
|
|
2385
|
+
width: n,
|
|
2351
2386
|
height: c,
|
|
2352
|
-
top:
|
|
2387
|
+
top: l,
|
|
2353
2388
|
parent: d,
|
|
2354
|
-
lastRowOfModel:
|
|
2389
|
+
lastRowOfModel: p
|
|
2355
2390
|
});
|
|
2356
|
-
h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`,
|
|
2391
|
+
h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, u), g && this.cleanupFunctions[t].push(g);
|
|
2357
2392
|
}
|
|
2358
2393
|
/**
|
|
2359
2394
|
* Render the header cell resize handle.
|
|
@@ -2369,12 +2404,12 @@ class lt extends st {
|
|
|
2369
2404
|
*
|
|
2370
2405
|
* @return {void}
|
|
2371
2406
|
*/
|
|
2372
|
-
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: o, cellWidth: i, cellHeight: r, parent:
|
|
2373
|
-
const
|
|
2374
|
-
|
|
2407
|
+
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: o, cellWidth: i, cellHeight: r, parent: l }) {
|
|
2408
|
+
const n = this.dom.domService, c = this.tableOptions.columnResizeHandleWidthInPx ?? 2, d = n.createElement("div");
|
|
2409
|
+
n.setAttribute(d, "data-col-index", `${t}`), n.setAttribute(d, "data-row-index", `${e}`), n.setAttribute(d, "data-area", "header"), n.setAttribute(d, "data-ge-action", "resize-column"), n.addClass(d, "ge-table-column-resize-handle"), n.setStyle(d, "display", "clip"), n.setStyle(d, "position", "absolute"), n.setStyle(d, "cursor", "col-resize"), n.setStyle(d, "left", `${s + i - c}px`), n.setStyle(d, "top", `${o}px`), n.setStyle(d, "width", `${c}px`), n.setStyle(d, "height", `${r}px`), n.appendChild(l, d);
|
|
2375
2410
|
}
|
|
2376
2411
|
}
|
|
2377
|
-
class
|
|
2412
|
+
class lt {
|
|
2378
2413
|
constructor(e, t) {
|
|
2379
2414
|
this.columnIndex = e, this.sortState = t;
|
|
2380
2415
|
}
|
|
@@ -2395,23 +2430,23 @@ class nt {
|
|
|
2395
2430
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
2396
2431
|
const t = e.target, s = t.getAttribute("data-area"), o = t.getAttribute("data-row-index"), i = t.getAttribute("data-col-index");
|
|
2397
2432
|
if (s && o && i) {
|
|
2398
|
-
const r =
|
|
2399
|
-
this.tableScope.updateModelValueAfterEdit(r,
|
|
2433
|
+
const r = ne(s), l = Number(o), n = Number(i);
|
|
2434
|
+
this.tableScope.updateModelValueAfterEdit(r, l, n, t.value);
|
|
2400
2435
|
}
|
|
2401
2436
|
}
|
|
2402
2437
|
}
|
|
2403
2438
|
}
|
|
2404
|
-
class
|
|
2439
|
+
class ct {
|
|
2405
2440
|
constructor(e = -1, t = -1) {
|
|
2406
2441
|
this.rowIndex = e, this.columnIndex = t;
|
|
2407
2442
|
}
|
|
2408
2443
|
}
|
|
2409
|
-
class
|
|
2444
|
+
class de {
|
|
2410
2445
|
constructor(e) {
|
|
2411
2446
|
this.cells = e;
|
|
2412
2447
|
}
|
|
2413
2448
|
static createSingle(e, t) {
|
|
2414
|
-
return new
|
|
2449
|
+
return new de([new ct(e, t)]);
|
|
2415
2450
|
}
|
|
2416
2451
|
}
|
|
2417
2452
|
class dt {
|
|
@@ -2420,11 +2455,11 @@ class dt {
|
|
|
2420
2455
|
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);
|
|
2421
2456
|
}
|
|
2422
2457
|
onMouseClicked(e, t) {
|
|
2423
|
-
var i, r,
|
|
2458
|
+
var i, r, l, n, c, d, h;
|
|
2424
2459
|
let s = !1, o = !1;
|
|
2425
2460
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
2426
|
-
const
|
|
2427
|
-
|
|
2461
|
+
const p = this.getSelectionModel(), u = this.getFocusModel();
|
|
2462
|
+
p && u && (u.hasFocus(e.rowIndex, e.columnIndex) || (u.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(u), s = !0), (i = e.originalEvent) != null && i.shiftKey || p.hasSelection() && (p.clear(), s = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (p.addSelection(this.createRangeByEvents(e, this.previousEvt)), o = !0, s = !0) : (l = e.originalEvent) != null && l.altKey && ((n = e.originalEvent) != null && n.ctrlKey || (c = e.originalEvent) != null && c.metaKey) ? (p.removeSelection(A.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (d = e.originalEvent) != null && d.ctrlKey || (h = e.originalEvent) != null && h.metaKey ? (p.addSelection(A.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (p.firstClick(e.rowIndex, e.columnIndex), s = !0), this.tableScope.onSelectionChanged(p));
|
|
2428
2463
|
}
|
|
2429
2464
|
return o ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
|
|
2430
2465
|
}
|
|
@@ -2455,7 +2490,7 @@ class dt {
|
|
|
2455
2490
|
});
|
|
2456
2491
|
}
|
|
2457
2492
|
}
|
|
2458
|
-
class
|
|
2493
|
+
class ht {
|
|
2459
2494
|
get() {
|
|
2460
2495
|
return {
|
|
2461
2496
|
f2: "START_EDITING",
|
|
@@ -2475,7 +2510,7 @@ class ct {
|
|
|
2475
2510
|
};
|
|
2476
2511
|
}
|
|
2477
2512
|
}
|
|
2478
|
-
class
|
|
2513
|
+
class pt {
|
|
2479
2514
|
get() {
|
|
2480
2515
|
return {
|
|
2481
2516
|
f2: "START_EDITING",
|
|
@@ -2518,7 +2553,7 @@ class gt {
|
|
|
2518
2553
|
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));
|
|
2519
2554
|
}
|
|
2520
2555
|
assignPredefinedSystemShortcutMappings() {
|
|
2521
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
2556
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new pt().get()) : Object.assign(this.shortcutActionIdMapping, new ht().get());
|
|
2522
2557
|
}
|
|
2523
2558
|
isMacintosh() {
|
|
2524
2559
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -2570,7 +2605,7 @@ class gt {
|
|
|
2570
2605
|
return this.shortcutActionIdMapping;
|
|
2571
2606
|
}
|
|
2572
2607
|
}
|
|
2573
|
-
class
|
|
2608
|
+
class me {
|
|
2574
2609
|
onCheckboxChanged(e) {
|
|
2575
2610
|
}
|
|
2576
2611
|
onContextmenu(e) {
|
|
@@ -2590,7 +2625,7 @@ class fe {
|
|
|
2590
2625
|
onFocusChanged(e) {
|
|
2591
2626
|
}
|
|
2592
2627
|
}
|
|
2593
|
-
class
|
|
2628
|
+
class Te {
|
|
2594
2629
|
setStyle(e, t, s) {
|
|
2595
2630
|
return e.style[t] = s, e;
|
|
2596
2631
|
}
|
|
@@ -2617,15 +2652,15 @@ class Re {
|
|
|
2617
2652
|
e.setAttribute(t, s);
|
|
2618
2653
|
}
|
|
2619
2654
|
}
|
|
2620
|
-
class
|
|
2621
|
-
render(e, t, s, o, i, r,
|
|
2655
|
+
class ft {
|
|
2656
|
+
render(e, t, s, o, i, r, l) {
|
|
2622
2657
|
if (i.isEditable(t, s)) {
|
|
2623
|
-
|
|
2624
|
-
const
|
|
2658
|
+
l.addClass(e, "ge-table-row-input-div");
|
|
2659
|
+
const n = i.getValueAt(t, s);
|
|
2625
2660
|
e.innerHTML = `
|
|
2626
2661
|
<input
|
|
2627
2662
|
type="text"
|
|
2628
|
-
value="${
|
|
2663
|
+
value="${n}"
|
|
2629
2664
|
autofocus
|
|
2630
2665
|
onfocus="this.setSelectionRange(0, this.value.length)"
|
|
2631
2666
|
data-listen="change"
|
|
@@ -2638,7 +2673,7 @@ class ut {
|
|
|
2638
2673
|
}
|
|
2639
2674
|
}
|
|
2640
2675
|
}
|
|
2641
|
-
class
|
|
2676
|
+
class ut {
|
|
2642
2677
|
constructor(e = "none", t = "single") {
|
|
2643
2678
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
|
|
2644
2679
|
}
|
|
@@ -2720,7 +2755,7 @@ class pt {
|
|
|
2720
2755
|
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());
|
|
2721
2756
|
}
|
|
2722
2757
|
}
|
|
2723
|
-
class
|
|
2758
|
+
class mt {
|
|
2724
2759
|
constructor(e = "none") {
|
|
2725
2760
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
2726
2761
|
}
|
|
@@ -2757,7 +2792,7 @@ class bt {
|
|
|
2757
2792
|
return [this.rowIndex, this.columnIndex];
|
|
2758
2793
|
}
|
|
2759
2794
|
}
|
|
2760
|
-
class
|
|
2795
|
+
class Re {
|
|
2761
2796
|
constructor(e = new I(
|
|
2762
2797
|
"❯",
|
|
2763
2798
|
"",
|
|
@@ -2771,17 +2806,17 @@ class Te {
|
|
|
2771
2806
|
}
|
|
2772
2807
|
// `⊖ `, `⊕ `;
|
|
2773
2808
|
}
|
|
2774
|
-
const
|
|
2809
|
+
const bt = new ut(), St = new mt("cell");
|
|
2775
2810
|
class De {
|
|
2776
2811
|
constructor() {
|
|
2777
2812
|
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 = {
|
|
2778
2813
|
header: 34,
|
|
2779
2814
|
body: 34,
|
|
2780
2815
|
footer: 34
|
|
2781
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Ae(), this.headerGroupOptions = new
|
|
2816
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Ae(), this.headerGroupOptions = new Re(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Me(), this.sortOrder = ["asc", "desc"], this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new ft(), this.getSelectionModel = () => bt, this.getFocusModel = () => St;
|
|
2782
2817
|
}
|
|
2783
2818
|
}
|
|
2784
|
-
const
|
|
2819
|
+
const $ = class $ {
|
|
2785
2820
|
/**
|
|
2786
2821
|
* Returns the content to be copied based on the provided table model, selection model, and focus model.
|
|
2787
2822
|
*
|
|
@@ -2797,21 +2832,21 @@ const P = class P {
|
|
|
2797
2832
|
const r = this.mergeRanges(t.getRanges());
|
|
2798
2833
|
if (r) {
|
|
2799
2834
|
r.c2 = Math.min(r.c2, e.getColumnCount() - 1), r.r2 = Math.min(r.r2, e.getBodyModel().getRowCount() - 1);
|
|
2800
|
-
const
|
|
2801
|
-
for (let
|
|
2835
|
+
const l = [];
|
|
2836
|
+
for (let n = r.r1; n <= r.r2; n++) {
|
|
2802
2837
|
const c = [];
|
|
2803
2838
|
for (let d = r.c1; d <= r.c2; d++) {
|
|
2804
|
-
const h = t.isSelected(
|
|
2839
|
+
const h = t.isSelected(n, d) ? e.getBodyModel().getTextValueAt(n, d) : "";
|
|
2805
2840
|
c.push(h);
|
|
2806
2841
|
}
|
|
2807
|
-
|
|
2842
|
+
l.push(c.join($.columnSeparatorChar));
|
|
2808
2843
|
}
|
|
2809
|
-
return o(
|
|
2844
|
+
return o(l.join($.rowSeparatorChar));
|
|
2810
2845
|
}
|
|
2811
2846
|
}
|
|
2812
2847
|
if (s) {
|
|
2813
|
-
const [r,
|
|
2814
|
-
return o(
|
|
2848
|
+
const [r, l] = s.getFocus(), n = e.getBodyModel().getTextValueAt(r, l);
|
|
2849
|
+
return o(n);
|
|
2815
2850
|
}
|
|
2816
2851
|
i("Cannot copy, neither selection nor focus defined.");
|
|
2817
2852
|
});
|
|
@@ -2840,9 +2875,9 @@ const P = class P {
|
|
|
2840
2875
|
t,
|
|
2841
2876
|
s
|
|
2842
2877
|
).then((r) => {
|
|
2843
|
-
r && this.copyContent(r).then((
|
|
2878
|
+
r && this.copyContent(r).then((l) => {
|
|
2844
2879
|
o(r);
|
|
2845
|
-
}).catch((
|
|
2880
|
+
}).catch((l) => {
|
|
2846
2881
|
i();
|
|
2847
2882
|
});
|
|
2848
2883
|
}).catch((r) => {
|
|
@@ -2863,21 +2898,136 @@ const P = class P {
|
|
|
2863
2898
|
return t;
|
|
2864
2899
|
}
|
|
2865
2900
|
};
|
|
2866
|
-
|
|
2901
|
+
$.columnSeparatorChar = " ", $.rowSeparatorChar = `
|
|
2867
2902
|
`;
|
|
2868
|
-
let
|
|
2869
|
-
class
|
|
2870
|
-
constructor(e, t
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2903
|
+
let X = $;
|
|
2904
|
+
class yt {
|
|
2905
|
+
constructor(e, t = 500) {
|
|
2906
|
+
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(Ke(this.handleResize.bind(this), t)).observe(this.tableScope.hostElement);
|
|
2907
|
+
}
|
|
2908
|
+
handleResize(e) {
|
|
2909
|
+
const t = e[0], { width: s } = t.contentRect;
|
|
2910
|
+
this.tableScope.recalcColumnWidths(s);
|
|
2911
|
+
}
|
|
2912
|
+
}
|
|
2913
|
+
class xt {
|
|
2914
|
+
/**
|
|
2915
|
+
* Downloads a matrix data as an Excel file.
|
|
2916
|
+
*
|
|
2917
|
+
* @param {Array<Array<any>>} matrix - A 2D array representing the data to be included in the Excel file. Each inner array corresponds to a row in the sheet.
|
|
2918
|
+
* @param {string} [filename='file.xlsx'] - The name of the Excel file to be downloaded. Defaults to 'file.xlsx'.
|
|
2919
|
+
* @param {string} [author=''] - The author's name to include as metadata in the Excel file. Optional parameter.
|
|
2920
|
+
* @return {void} Does not return a value.
|
|
2921
|
+
* @throws {Error} Throws an error if the input matrix is not a valid 2D array or if the filename is an empty string.
|
|
2922
|
+
*/
|
|
2923
|
+
downloadExcel(e, t = "file.xlsx", s = "") {
|
|
2924
|
+
if (!Array.isArray(e) || e.some((o) => !Array.isArray(o)))
|
|
2925
|
+
throw new Error("Invalid matrix format. Expected a 2D array.");
|
|
2926
|
+
if ((t == null ? void 0 : t.trim()) === "")
|
|
2927
|
+
throw new Error("Invalid filename. Filename must be a non-empty string.");
|
|
2928
|
+
try {
|
|
2929
|
+
const o = this.generateBuffer(e, s), i = new Blob([o], {
|
|
2930
|
+
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
2931
|
+
}), r = document.createElement("a");
|
|
2932
|
+
r.href = URL.createObjectURL(i), r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r);
|
|
2933
|
+
} catch (o) {
|
|
2934
|
+
throw console.error("Error generating Excel file:", o), new Error("Failed to download Excel file.");
|
|
2935
|
+
}
|
|
2936
|
+
}
|
|
2937
|
+
generateMap(e, t = "") {
|
|
2938
|
+
const s = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2939
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>`, o = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2940
|
+
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>Microsoft Macintosh Excel</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts><Company></Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion></Properties>`, i = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2941
|
+
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:creator>${t}</dc:creator><cp:lastModifiedBy>${t}</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">2024-12-13T19:45:08Z</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">2024-12-13T19:45:35Z</dcterms:modified></cp:coreProperties>`, r = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2942
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/></Relationships>`, l = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2943
|
+
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="0E2841"/></a:dk2><a:lt2><a:srgbClr val="E8E8E8"/></a:lt2><a:accent1><a:srgbClr val="156082"/></a:accent1><a:accent2><a:srgbClr val="E97132"/></a:accent2><a:accent3><a:srgbClr val="196B24"/></a:accent3><a:accent4><a:srgbClr val="0F9ED5"/></a:accent4><a:accent5><a:srgbClr val="A02B93"/></a:accent5><a:accent6><a:srgbClr val="4EA72E"/></a:accent6><a:hlink><a:srgbClr val="467886"/></a:hlink><a:folHlink><a:srgbClr val="96607D"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Aptos Display" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线 Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:majorFont><a:minorFont><a:latin typeface="Aptos Narrow" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults><a:lnDef><a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style></a:lnDef></a:objectDefaults><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{2E142A2C-CD16-42D6-873A-C26D2A0506FA}" vid="{1BDDFF52-6CD6-40A5-AB3C-68EB2F1E4D0A}"/></a:ext></a:extLst></a:theme>`, n = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2944
|
+
<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="3" uniqueCount="3"><si><t>a</t></si><si><t>b</t></si><si><t>c</t></si></sst>`, c = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2945
|
+
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision"><fonts count="1" x14ac:knownFonts="1"><font><sz val="12"/><color theme="1"/><name val="Aptos Narrow"/><family val="2"/><scheme val="minor"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles><dxfs count="0"/><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/><extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/></ext><ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/></ext></extLst></styleSheet>`, d = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2946
|
+
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x15 xr xr6 xr10 xr2" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr6="http://schemas.microsoft.com/office/spreadsheetml/2016/revision6" xmlns:xr10="http://schemas.microsoft.com/office/spreadsheetml/2016/revision10" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"><fileVersion appName="xl" lastEdited="7" lowestEdited="7" rupBuild="11207"/><workbookPr defaultThemeVersion="202300"/><mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice Requires="x15"><x15ac:absPath url="/" xmlns:x15ac="http://schemas.microsoft.com/office/spreadsheetml/2010/11/ac"/></mc:Choice></mc:AlternateContent><xr:revisionPtr revIDLastSave="0" documentId="8_{292BF245-1F37-B045-B1A5-26C42FB62779}" xr6:coauthVersionLast="47" xr6:coauthVersionMax="47" xr10:uidLastSave="{00000000-0000-0000-0000-000000000000}"/><bookViews><workbookView xWindow="11340" yWindow="5060" windowWidth="28040" windowHeight="17440" xr2:uid="{858B8D3F-6246-774D-8903-6D38687B7BC6}"/></bookViews><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets><calcPr calcId="181029"/><extLst><ext uri="{140A7094-0E35-4892-8432-C4D2E57EDEB5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:workbookPr chartTrackingRefBase="1"/></ext><ext uri="{B58B0392-4F1F-4190-BB64-5DF3571DCE5F}" xmlns:xcalcf="http://schemas.microsoft.com/office/spreadsheetml/2018/calcfeatures"><xcalcf:calcFeatures><xcalcf:feature name="microsoft.com:RD"/><xcalcf:feature name="microsoft.com:Single"/><xcalcf:feature name="microsoft.com:FV"/><xcalcf:feature name="microsoft.com:CNMTM"/><xcalcf:feature name="microsoft.com:LET_WF"/><xcalcf:feature name="microsoft.com:LAMBDA_WF"/><xcalcf:feature name="microsoft.com:ARRAYTEXT_WF"/></xcalcf:calcFeatures></ext></extLst></workbook>`, h = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2947
|
+
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>`, p = /* @__PURE__ */ new Map();
|
|
2948
|
+
return p.set("_rels/.rels", s), p.set("docProps/app.xml", o), p.set("docProps/core.xml", i), p.set("xl/_rels/workbook.xml.rels", r), p.set("xl/theme/theme1.xml", l), p.set("xl/worksheets/sheet1.xml", this.getX1WorksheetsSheet1Xml(e)), p.set("xl/sharedStrings.xml", n), p.set("xl/styles.xml", c), p.set("xl/workbook.xml", d), p.set("[Content_Types].xml", h), p;
|
|
2949
|
+
}
|
|
2950
|
+
getX1WorksheetsSheet1Xml(e) {
|
|
2951
|
+
const t = [];
|
|
2952
|
+
t.push(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2953
|
+
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac xr xr2 xr3" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2" xmlns:xr3="http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" xr:uid="{E15F8FC4-4D40-434C-921A-3D9CFAAA2865}">
|
|
2954
|
+
<dimension ref="A1:B3"/>
|
|
2955
|
+
<sheetViews>
|
|
2956
|
+
<sheetView tabSelected="1" workbookViewId="0"/></sheetViews>
|
|
2957
|
+
<sheetFormatPr baseColWidth="10" defaultRowHeight="16" x14ac:dyDescent="0.2"/>
|
|
2958
|
+
<sheetData>`);
|
|
2959
|
+
for (let s = 0; s < e.length; s++) {
|
|
2960
|
+
const o = e[s];
|
|
2961
|
+
t.push('<row r="${r + 1}" spans="1:2" x14ac:dyDescent="0.2">');
|
|
2962
|
+
for (let i = 0; i < o.length; i++) {
|
|
2963
|
+
const r = o[i], l = this.getCellAddress(s, i);
|
|
2964
|
+
if (typeof r == "number")
|
|
2965
|
+
t.push(`<c r="${l}"><v>${r}</v></c>`);
|
|
2966
|
+
else if (r instanceof Date) {
|
|
2967
|
+
const n = r;
|
|
2968
|
+
t.push(`<c r="${l}" t="inlineStr"><is><t>${n.toISOString()}</t></is></c>`);
|
|
2969
|
+
} else {
|
|
2970
|
+
const n = r != null ? this.escapeXml(String(r)) : "";
|
|
2971
|
+
t.push(`<c r="${l}" t="inlineStr"><is><t>${n}</t></is></c>`);
|
|
2972
|
+
}
|
|
2973
|
+
}
|
|
2974
|
+
t.push("</row>");
|
|
2975
|
+
}
|
|
2976
|
+
return t.push(""), t.push(""), t.push('</sheetData><pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>'), t.push("</worksheet>"), t.join(`
|
|
2977
|
+
`);
|
|
2978
|
+
}
|
|
2979
|
+
escapeXml(e) {
|
|
2980
|
+
return e == null ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2981
|
+
}
|
|
2982
|
+
getCellAddress(e, t) {
|
|
2983
|
+
const s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
2984
|
+
let o = "";
|
|
2985
|
+
for (; t >= 0; )
|
|
2986
|
+
o = s[t % 26] + o, t = Math.floor(t / 26) - 1;
|
|
2987
|
+
return `${o}${e + 1}`;
|
|
2988
|
+
}
|
|
2989
|
+
createZip(e) {
|
|
2990
|
+
const t = [];
|
|
2991
|
+
let s = 0;
|
|
2992
|
+
const o = [];
|
|
2993
|
+
e.forEach((h, p) => {
|
|
2994
|
+
const u = new TextEncoder().encode(p), g = new TextEncoder().encode(h), b = new Uint8Array(30 + u.length), f = new DataView(b.buffer);
|
|
2995
|
+
b.set([80, 75, 3, 4], 0), f.setUint16(4, 20, !0), f.setUint16(6, 0, !0), f.setUint16(8, 0, !0), f.setUint16(10, 0, !0), f.setUint16(12, 0, !0), f.setUint32(14, 0, !0), f.setUint32(18, g.length, !0), f.setUint32(22, g.length, !0), f.setUint16(26, u.length, !0), f.setUint16(28, 0, !0), b.set(u, 30), t.push(b, g), o.push({
|
|
2996
|
+
path: p,
|
|
2997
|
+
offset: s,
|
|
2998
|
+
contentSize: g.length
|
|
2999
|
+
}), s += b.length + g.length;
|
|
3000
|
+
});
|
|
3001
|
+
const i = s;
|
|
3002
|
+
o.forEach((h) => {
|
|
3003
|
+
const p = new TextEncoder().encode(h.path), u = new Uint8Array(46 + p.length), g = new DataView(u.buffer);
|
|
3004
|
+
u.set([80, 75, 1, 2], 0), g.setUint16(4, 20, !0), g.setUint16(6, 20, !0), g.setUint16(8, 0, !0), g.setUint16(10, 0, !0), g.setUint16(12, 0, !0), g.setUint16(14, 0, !0), g.setUint32(16, 0, !0), g.setUint32(20, h.contentSize, !0), g.setUint32(24, h.contentSize, !0), g.setUint16(28, p.length, !0), g.setUint16(30, 0, !0), g.setUint16(32, 0, !0), g.setUint16(34, 0, !0), g.setUint16(36, 0, !0), g.setUint32(38, 0, !0), g.setUint32(42, h.offset, !0), u.set(p, 46), t.push(u), s += u.length;
|
|
3005
|
+
});
|
|
3006
|
+
const r = new Uint8Array(22), l = new DataView(r.buffer);
|
|
3007
|
+
r.set([80, 75, 5, 6], 0), l.setUint16(4, 0, !0), l.setUint16(6, 0, !0), l.setUint16(8, o.length, !0), l.setUint16(10, o.length, !0), l.setUint32(12, s - i, !0), l.setUint32(16, i, !0), l.setUint16(20, 0, !0), t.push(r);
|
|
3008
|
+
const n = t.reduce((h, p) => h + p.length, 0), c = new Uint8Array(n);
|
|
3009
|
+
let d = 0;
|
|
3010
|
+
for (const h of t)
|
|
3011
|
+
c.set(h, d), d += h.length;
|
|
3012
|
+
return c;
|
|
3013
|
+
}
|
|
3014
|
+
generateBuffer(e, t = "") {
|
|
3015
|
+
const s = this.generateMap(e, t);
|
|
3016
|
+
return this.createZip(s);
|
|
3017
|
+
}
|
|
3018
|
+
}
|
|
3019
|
+
class he extends at {
|
|
3020
|
+
constructor(e, t, s, o, i, r = new X(), l = new xt()) {
|
|
3021
|
+
var d;
|
|
3022
|
+
if (super(e, t, new Ye(s), o), this.eventListener = i, this.copyService = r, this.excelService = l, this.licenseManager = B.getInstance(), this.selectionService = new dt(this), this.api = new Ze(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, i || (this.eventListener = new me()), (d = this.tableOptions) != null && d.autoRestoreOptions) {
|
|
3023
|
+
const h = this.tableOptions.autoRestoreOptions, p = h.getStorageKeyFn;
|
|
3024
|
+
p && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Qe(p)), h.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new tt(p)), h.autoRestoreSortingState && (this.storeSortingService = new st(p)));
|
|
3025
|
+
}
|
|
3026
|
+
this.mouseHandler = new qe(this), this.inputHandler = new nt(this), this.resizeHandler = new yt(this, o.resizeEventDebounceDelay), this.shortcutService = new gt(this), this.shortcutService.addListener(this.selectionService);
|
|
2877
3027
|
const n = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
2878
3028
|
n && n.addEventSelectionChangedListener(this);
|
|
2879
|
-
const
|
|
2880
|
-
|
|
3029
|
+
const c = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
3030
|
+
c && c.addEventFocusChangedListener(this);
|
|
2881
3031
|
}
|
|
2882
3032
|
/**
|
|
2883
3033
|
* Creates a TableScope instance.
|
|
@@ -2891,7 +3041,7 @@ class he extends lt {
|
|
|
2891
3041
|
*
|
|
2892
3042
|
* @return {TableScope} - The newly created TableScope instance.
|
|
2893
3043
|
*/
|
|
2894
|
-
static create(e, t, s = new De(), o = new
|
|
3044
|
+
static create(e, t, s = new De(), o = new me(), i = new Te(), r = new X()) {
|
|
2895
3045
|
return new he(e, t, i, s, o, r);
|
|
2896
3046
|
}
|
|
2897
3047
|
/**
|
|
@@ -2920,7 +3070,7 @@ class he extends lt {
|
|
|
2920
3070
|
return !1;
|
|
2921
3071
|
}
|
|
2922
3072
|
updateModelValueAfterEdit(e, t, s, o) {
|
|
2923
|
-
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, o) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(
|
|
3073
|
+
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, o) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(de.createSingle(t, s)), this.hostElement.focus());
|
|
2924
3074
|
}
|
|
2925
3075
|
/**
|
|
2926
3076
|
* Retrieves the TableApi object.
|
|
@@ -2949,7 +3099,7 @@ class he extends lt {
|
|
|
2949
3099
|
* @return {GeMouseEvent} - The created GeMouseEvent object.
|
|
2950
3100
|
*/
|
|
2951
3101
|
createGeMouseEvent(e) {
|
|
2952
|
-
const t = new
|
|
3102
|
+
const t = new le();
|
|
2953
3103
|
if (t.originalEvent = e, e) {
|
|
2954
3104
|
const s = e.target;
|
|
2955
3105
|
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) {
|
|
@@ -3019,7 +3169,7 @@ class he extends lt {
|
|
|
3019
3169
|
toggleExpandCollapseAll(e = !0) {
|
|
3020
3170
|
var s;
|
|
3021
3171
|
const t = this.tableModel.getBodyModel();
|
|
3022
|
-
|
|
3172
|
+
re(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
|
|
3023
3173
|
}
|
|
3024
3174
|
/**
|
|
3025
3175
|
* Toggles the checkbox state of a specific row in a table.
|
|
@@ -3031,11 +3181,11 @@ class he extends lt {
|
|
|
3031
3181
|
* @return {void} - This method does not return anything.
|
|
3032
3182
|
*/
|
|
3033
3183
|
toggleRowCheckbox(e, t, s) {
|
|
3034
|
-
var
|
|
3184
|
+
var n;
|
|
3035
3185
|
const o = this.tableModel.getAreaModel(s), i = o.isRowChecked(e), r = i === void 0 || i === "semi" || i === "none";
|
|
3036
3186
|
o.setRowChecked(e, r), this.repaint();
|
|
3037
|
-
const
|
|
3038
|
-
this.eventListener.onCheckboxChanged(
|
|
3187
|
+
const l = (n = o.rowSelectionModel) == null ? void 0 : n.getCheckedRows();
|
|
3188
|
+
this.eventListener.onCheckboxChanged(l || []);
|
|
3039
3189
|
}
|
|
3040
3190
|
/**
|
|
3041
3191
|
* Handle mouse click events.
|
|
@@ -3089,8 +3239,8 @@ class he extends lt {
|
|
|
3089
3239
|
const o = this.tableModel.getColumnDef(s);
|
|
3090
3240
|
if (o != null && o.sortable && o.sortable()) {
|
|
3091
3241
|
e.preventDefault(), e.stopPropagation();
|
|
3092
|
-
const
|
|
3093
|
-
this.tableModel.doSort([d]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((
|
|
3242
|
+
const l = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, n = o.sortState ?? "", c = l[(l.indexOf(n) + 1) % l.length], d = new lt(s, c);
|
|
3243
|
+
this.tableModel.doSort([d]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((p) => p.sortState = ""), o.sortState = c), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([d]);
|
|
3094
3244
|
}
|
|
3095
3245
|
}
|
|
3096
3246
|
/**
|
|
@@ -3235,9 +3385,9 @@ class he extends lt {
|
|
|
3235
3385
|
const s = this.tableOptions.autoRestoreOptions, o = s.getRowId;
|
|
3236
3386
|
if (s.autoRestoreCollapsedExpandedState && o) {
|
|
3237
3387
|
const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
|
|
3238
|
-
if (
|
|
3239
|
-
const
|
|
3240
|
-
for (let c = 0; c <
|
|
3388
|
+
if (re(r)) {
|
|
3389
|
+
const l = r, n = r.getRowCount();
|
|
3390
|
+
for (let c = 0; c < n; c++) {
|
|
3241
3391
|
const d = r.getRowByIndex(c);
|
|
3242
3392
|
if (d)
|
|
3243
3393
|
if (i.allExpanded)
|
|
@@ -3249,15 +3399,15 @@ class he extends lt {
|
|
|
3249
3399
|
i.mode === "expanded" ? d.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h) : i.mode === "collapsed" && (d.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h));
|
|
3250
3400
|
}
|
|
3251
3401
|
}
|
|
3252
|
-
|
|
3402
|
+
l.recalcVisibleTreeRows();
|
|
3253
3403
|
}
|
|
3254
3404
|
}
|
|
3255
3405
|
}
|
|
3256
3406
|
}
|
|
3257
3407
|
}
|
|
3258
|
-
const
|
|
3408
|
+
const K = class K {
|
|
3259
3409
|
};
|
|
3260
|
-
|
|
3410
|
+
K.themes = ["light", "combat", "paper", "blackboard"], K.vars = {
|
|
3261
3411
|
light: `html[data-theme="light"] {
|
|
3262
3412
|
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
3263
3413
|
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
@@ -3491,18 +3641,18 @@ Y.themes = ["light", "combat", "paper", "blackboard"], Y.vars = {
|
|
|
3491
3641
|
--ge-table-drop-zone-bg: #758129;
|
|
3492
3642
|
}`
|
|
3493
3643
|
};
|
|
3494
|
-
let
|
|
3495
|
-
const
|
|
3496
|
-
constructor(e = new
|
|
3644
|
+
let be = K;
|
|
3645
|
+
const Y = class Y {
|
|
3646
|
+
constructor(e = new Re()) {
|
|
3497
3647
|
this.headerGroupOptions = e;
|
|
3498
3648
|
}
|
|
3499
|
-
render(e, t, s, o, i, r,
|
|
3500
|
-
const
|
|
3649
|
+
render(e, t, s, o, i, r, l) {
|
|
3650
|
+
const n = r != null && r.data ? r.data : "";
|
|
3501
3651
|
if (r) {
|
|
3502
|
-
const { toggle: c, visibility: d, closed: h } = r,
|
|
3503
|
-
this.addText(e, o, t, s,
|
|
3652
|
+
const { toggle: c, visibility: d, closed: h } = r, p = c ? Y.toggleHeaderGroup : "";
|
|
3653
|
+
this.addText(e, o, t, s, n, p), c && d !== "always" && this.addArrowDiv(l, e, !h, t, s, o, p);
|
|
3504
3654
|
} else
|
|
3505
|
-
this.addText(e, o, t, s,
|
|
3655
|
+
this.addText(e, o, t, s, n, "");
|
|
3506
3656
|
}
|
|
3507
3657
|
addText(e, t, s, o, i, r) {
|
|
3508
3658
|
e.innerHTML = `<span
|
|
@@ -3512,113 +3662,113 @@ const U = class U {
|
|
|
3512
3662
|
data-col-index="${o}"
|
|
3513
3663
|
>${i}</span>`;
|
|
3514
3664
|
}
|
|
3515
|
-
addArrowDiv(e, t, s = !0, o = -1, i = -1, r = "header",
|
|
3516
|
-
const
|
|
3517
|
-
e.addClass(
|
|
3665
|
+
addArrowDiv(e, t, s = !0, o = -1, i = -1, r = "header", l) {
|
|
3666
|
+
const n = e.createElement("div");
|
|
3667
|
+
e.addClass(n, "ge-table-toggle-icon-div"), e.setStyle(n, "display", "inline-block"), e.setStyle(n, "position", ""), e.setStyle(n, "width", "20px"), e.setStyle(n, "background", "transparent"), e.setStyle(n, "cursor", "pointer"), e.setAttribute(n, "data-row-index", `${o}`), e.setAttribute(n, "data-col-index", `${i}`), e.setAttribute(n, "data-area", `${r}`), e.setAttribute(n, "data-ge-action", `${l}`);
|
|
3518
3668
|
let c;
|
|
3519
3669
|
s ? c = this.headerGroupOptions.iconExpanded : c = this.headerGroupOptions.iconCollapsed;
|
|
3520
3670
|
const d = c.content, h = e.createText(d);
|
|
3521
|
-
e.appendChild(
|
|
3522
|
-
for (const
|
|
3523
|
-
e.addClass(
|
|
3524
|
-
return e.appendChild(t,
|
|
3671
|
+
e.appendChild(n, h), c.style && this.applyStyleString(e, n, c.style);
|
|
3672
|
+
for (const p of c.classes)
|
|
3673
|
+
e.addClass(n, p);
|
|
3674
|
+
return e.appendChild(t, n), n;
|
|
3525
3675
|
}
|
|
3526
3676
|
applyStyleString(e, t, s) {
|
|
3527
3677
|
const o = s.split(";").map((i) => i.trim()).filter((i) => i);
|
|
3528
3678
|
for (const i of o) {
|
|
3529
|
-
const [r,
|
|
3530
|
-
e.setStyle(t, r.trim(),
|
|
3679
|
+
const [r, l] = i.split(":");
|
|
3680
|
+
e.setStyle(t, r.trim(), l.trim());
|
|
3531
3681
|
}
|
|
3532
3682
|
}
|
|
3533
3683
|
};
|
|
3534
|
-
|
|
3535
|
-
let
|
|
3536
|
-
var
|
|
3537
|
-
const
|
|
3684
|
+
Y.toggleHeaderGroup = "toggleHeaderGroup";
|
|
3685
|
+
let Se = Y;
|
|
3686
|
+
var vt = /* @__PURE__ */ Ue("<div>");
|
|
3687
|
+
const Et = (a) => {
|
|
3538
3688
|
let e;
|
|
3539
3689
|
const t = Ee({
|
|
3540
3690
|
tableModel: null,
|
|
3541
3691
|
tableOptions: new De()
|
|
3542
|
-
},
|
|
3543
|
-
return
|
|
3692
|
+
}, a);
|
|
3693
|
+
return Oe(() => {
|
|
3544
3694
|
const s = {
|
|
3545
3695
|
onSelectionChanged(r) {
|
|
3546
|
-
const
|
|
3696
|
+
const l = new CustomEvent("selectionChanged", {
|
|
3547
3697
|
detail: r,
|
|
3548
3698
|
bubbles: !0
|
|
3549
3699
|
});
|
|
3550
|
-
e && e.dispatchEvent(
|
|
3700
|
+
e && e.dispatchEvent(l);
|
|
3551
3701
|
},
|
|
3552
3702
|
onFocusChanged(r) {
|
|
3553
|
-
const
|
|
3703
|
+
const l = new CustomEvent("focusChanged", {
|
|
3554
3704
|
detail: r,
|
|
3555
3705
|
bubbles: !0
|
|
3556
3706
|
});
|
|
3557
|
-
e && e.dispatchEvent(
|
|
3707
|
+
e && e.dispatchEvent(l);
|
|
3558
3708
|
},
|
|
3559
3709
|
onCheckboxChanged: (r) => {
|
|
3560
|
-
const
|
|
3710
|
+
const l = new CustomEvent("checkboxChanged", {
|
|
3561
3711
|
detail: r,
|
|
3562
3712
|
bubbles: !0
|
|
3563
3713
|
});
|
|
3564
|
-
e && e.dispatchEvent(
|
|
3714
|
+
e && e.dispatchEvent(l);
|
|
3565
3715
|
},
|
|
3566
3716
|
onContextmenu: (r) => {
|
|
3567
|
-
const
|
|
3717
|
+
const l = new CustomEvent("contextmenu", {
|
|
3568
3718
|
detail: r,
|
|
3569
3719
|
bubbles: !0
|
|
3570
3720
|
});
|
|
3571
|
-
e && e.dispatchEvent(
|
|
3721
|
+
e && e.dispatchEvent(l);
|
|
3572
3722
|
},
|
|
3573
3723
|
onModelChanged: (r) => {
|
|
3574
|
-
const
|
|
3724
|
+
const l = new CustomEvent("modelChanged", {
|
|
3575
3725
|
detail: r,
|
|
3576
3726
|
bubbles: !0
|
|
3577
3727
|
});
|
|
3578
|
-
e && e.dispatchEvent(
|
|
3728
|
+
e && e.dispatchEvent(l);
|
|
3579
3729
|
},
|
|
3580
3730
|
onMouseClicked: (r) => {
|
|
3581
|
-
const
|
|
3731
|
+
const l = new CustomEvent("mouseClicked", {
|
|
3582
3732
|
detail: r,
|
|
3583
3733
|
bubbles: !0
|
|
3584
3734
|
});
|
|
3585
|
-
e && e.dispatchEvent(
|
|
3735
|
+
e && e.dispatchEvent(l);
|
|
3586
3736
|
},
|
|
3587
3737
|
onMouseDragging: (r) => {
|
|
3588
|
-
const
|
|
3738
|
+
const l = new CustomEvent("mouseDragging", {
|
|
3589
3739
|
detail: r,
|
|
3590
3740
|
bubbles: !0
|
|
3591
3741
|
});
|
|
3592
|
-
e && e.dispatchEvent(
|
|
3742
|
+
e && e.dispatchEvent(l);
|
|
3593
3743
|
},
|
|
3594
3744
|
onMouseDraggingEnd: (r) => {
|
|
3595
|
-
const
|
|
3745
|
+
const l = new CustomEvent("mouseDraggingEnd", {
|
|
3596
3746
|
detail: r,
|
|
3597
3747
|
bubbles: !0
|
|
3598
3748
|
});
|
|
3599
|
-
e && e.dispatchEvent(
|
|
3749
|
+
e && e.dispatchEvent(l);
|
|
3600
3750
|
},
|
|
3601
3751
|
onMouseMoved: (r) => {
|
|
3602
|
-
const
|
|
3752
|
+
const l = new CustomEvent("mouseMoved", {
|
|
3603
3753
|
detail: r,
|
|
3604
3754
|
bubbles: !0
|
|
3605
3755
|
});
|
|
3606
|
-
e && e.dispatchEvent(
|
|
3756
|
+
e && e.dispatchEvent(l);
|
|
3607
3757
|
}
|
|
3608
|
-
}, o = new he(e, t.tableModel, new
|
|
3758
|
+
}, o = new he(e, t.tableModel, new Te(), t.tableOptions, s);
|
|
3609
3759
|
o.firstInit();
|
|
3610
3760
|
const i = new CustomEvent("tableReady", {
|
|
3611
3761
|
detail: o.getApi(),
|
|
3612
3762
|
bubbles: !0
|
|
3613
3763
|
});
|
|
3614
|
-
e && e.dispatchEvent(i), t.licenseKey &&
|
|
3764
|
+
e && e.dispatchEvent(i), t.licenseKey && B.getInstance().setLicenseKey(t.licenseKey);
|
|
3615
3765
|
}), (() => {
|
|
3616
|
-
var s =
|
|
3617
|
-
return typeof o == "function" ?
|
|
3766
|
+
var s = vt(), o = e;
|
|
3767
|
+
return typeof o == "function" ? je(o, s) : e = s, s;
|
|
3618
3768
|
})();
|
|
3619
3769
|
};
|
|
3620
3770
|
export {
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3771
|
+
Ct as ComponentRendererWrapper,
|
|
3772
|
+
Et as GuiexpertTable,
|
|
3773
|
+
wt as GuiexpertTableProps
|
|
3624
3774
|
};
|