@guiexpert/solid-table 1.0.24 → 1.0.26
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 +785 -651
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
const
|
|
2
|
-
equals:
|
|
1
|
+
const ke = (a, e) => a === e, te = Symbol("solid-proxy"), ge = {
|
|
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 =
|
|
27
|
+
function se(a, e, t) {
|
|
28
|
+
const s = ae(a, e, !1, O);
|
|
29
29
|
W(s);
|
|
30
30
|
}
|
|
31
|
-
function Ie(
|
|
31
|
+
function Ie(a, e, t) {
|
|
32
32
|
ye = We;
|
|
33
|
-
const s =
|
|
34
|
-
(!t || !t.render) && (s.user = !0),
|
|
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, W(s),
|
|
40
|
-
}
|
|
41
|
-
function H(
|
|
42
|
-
if (!
|
|
43
|
-
return
|
|
44
|
-
const e =
|
|
45
|
-
|
|
33
|
+
const s = ae(a, e, !1, O);
|
|
34
|
+
(!t || !t.render) && (s.user = !0), L ? L.push(s) : W(s);
|
|
35
|
+
}
|
|
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
|
+
}
|
|
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(() => H(
|
|
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 ===
|
|
57
|
+
if (this.state === O)
|
|
58
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 W(
|
|
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
|
|
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
|
-
W(
|
|
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 =
|
|
140
|
+
const s = a();
|
|
141
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 He(
|
|
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
|
-
|
|
152
|
+
function ve(a) {
|
|
153
|
+
for (let e = 0; e < a.length; e++)
|
|
154
|
+
z(a[e]);
|
|
155
155
|
}
|
|
156
|
-
function We(
|
|
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
|
-
|
|
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
|
|
283
|
-
const
|
|
284
|
-
if (
|
|
281
|
+
const n = Object.getOwnPropertyNames(l);
|
|
282
|
+
for (let d = n.length - 1; d >= 0; d--) {
|
|
283
|
+
const c = n[d];
|
|
284
|
+
if (c === "__proto__" || c === "constructor")
|
|
285
285
|
continue;
|
|
286
|
-
const h = Object.getOwnPropertyDescriptor(
|
|
287
|
-
if (!s[
|
|
288
|
-
s[
|
|
286
|
+
const h = Object.getOwnPropertyDescriptor(l, c);
|
|
287
|
+
if (!s[c])
|
|
288
|
+
s[c] = h.get ? {
|
|
289
289
|
enumerable: !0,
|
|
290
290
|
configurable: !0,
|
|
291
|
-
get:
|
|
291
|
+
get: Ge.bind(t[c] = [h.get.bind(l)])
|
|
292
292
|
} : h.value !== void 0 ? h : void 0;
|
|
293
293
|
else {
|
|
294
|
-
const
|
|
295
|
-
|
|
294
|
+
const p = t[c];
|
|
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, d = 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
|
|
317
|
-
for (;
|
|
318
|
-
|
|
319
|
-
} else if (i ===
|
|
316
|
+
const c = i < s ? l ? t[l - 1].nextSibling : t[i - l] : n;
|
|
317
|
+
for (; l < i; )
|
|
318
|
+
a.insertBefore(t[l++], c);
|
|
319
|
+
} else if (i === l)
|
|
320
320
|
for (; r < o; )
|
|
321
|
-
(!
|
|
322
|
-
else if (e[r] === t[i - 1] && t[
|
|
323
|
-
const
|
|
324
|
-
|
|
321
|
+
(!d || !d.has(e[r])) && e[r].remove(), r++;
|
|
322
|
+
else if (e[r] === t[i - 1] && t[l] === e[o - 1]) {
|
|
323
|
+
const c = e[--o].nextSibling;
|
|
324
|
+
a.insertBefore(t[l++], e[r++].nextSibling), a.insertBefore(t[--i], c), e[o] = t[i];
|
|
325
325
|
} else {
|
|
326
|
-
if (!
|
|
327
|
-
|
|
328
|
-
let h =
|
|
326
|
+
if (!d) {
|
|
327
|
+
d = /* @__PURE__ */ new Map();
|
|
328
|
+
let h = l;
|
|
329
329
|
for (; h < i; )
|
|
330
|
-
|
|
330
|
+
d.set(t[h], h++);
|
|
331
331
|
}
|
|
332
|
-
const
|
|
333
|
-
if (
|
|
334
|
-
if (
|
|
335
|
-
let h = r,
|
|
336
|
-
for (; ++h < o && h < i && !((
|
|
337
|
-
|
|
338
|
-
if (
|
|
339
|
-
const
|
|
340
|
-
for (;
|
|
341
|
-
|
|
332
|
+
const c = d.get(e[r]);
|
|
333
|
+
if (c != null)
|
|
334
|
+
if (l < c && c < i) {
|
|
335
|
+
let h = r, p = 1, u;
|
|
336
|
+
for (; ++h < o && h < i && !((u = d.get(e[h])) == null || u !== c + p); )
|
|
337
|
+
p++;
|
|
338
|
+
if (p > c - l) {
|
|
339
|
+
const g = e[r];
|
|
340
|
+
for (; l < c; )
|
|
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,156 +348,156 @@ function ze(l, e, t) {
|
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
-
function
|
|
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 =
|
|
363
|
+
return r.innerHTML = a, t ? r.content.firstChild.firstChild : r.content.firstChild;
|
|
364
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 H(() =>
|
|
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 ((
|
|
425
|
-
|
|
426
|
-
else if (Array.isArray(
|
|
427
|
-
o = oe(l, n
|
|
428
|
-
else if (
|
|
422
|
+
let l = e[i], n = t && t[i], d;
|
|
423
|
+
if (!(l == null || l === !0 || l === !1))
|
|
424
|
+
if ((d = typeof l) == "object" && l.nodeType)
|
|
425
|
+
a.push(l);
|
|
426
|
+
else if (Array.isArray(l))
|
|
427
|
+
o = oe(a, l, n) || o;
|
|
428
|
+
else if (d === "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
|
|
437
|
-
|
|
436
|
+
const c = String(l);
|
|
437
|
+
n && n.nodeType === 3 && n.data === c ? a.push(n) : a.push(document.createTextNode(c));
|
|
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,
|
|
473
473
|
areaModel: i,
|
|
474
474
|
cellValue: r
|
|
475
475
|
});
|
|
476
|
-
|
|
477
|
-
() => this.code(
|
|
476
|
+
ze(
|
|
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
|
-
function
|
|
485
|
+
function Ke(a, e = 500) {
|
|
486
486
|
let t = null;
|
|
487
487
|
return function(...s) {
|
|
488
488
|
t && window.clearTimeout(t), t = window.setTimeout(() => {
|
|
489
|
-
|
|
489
|
+
a.apply(this, s), t = null;
|
|
490
490
|
}, e);
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
|
-
class
|
|
493
|
+
class B {
|
|
494
494
|
// The constructor is private to prevent direct construction calls
|
|
495
495
|
// with the `new` operator
|
|
496
496
|
constructor() {
|
|
497
497
|
this.alreadySet = !1;
|
|
498
498
|
}
|
|
499
499
|
static getInstance() {
|
|
500
|
-
return
|
|
500
|
+
return B.instance || (B.instance = new B()), B.instance;
|
|
501
501
|
}
|
|
502
502
|
/**
|
|
503
503
|
* Method to set the license key for the application.
|
|
@@ -515,18 +515,18 @@ class $ {
|
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
function ie(
|
|
519
|
-
return
|
|
518
|
+
function ie(a) {
|
|
519
|
+
return a && a.type === "TreeRow";
|
|
520
520
|
}
|
|
521
|
-
function
|
|
522
|
-
return
|
|
521
|
+
function re(a) {
|
|
522
|
+
return a && a.type === "AreaModelTree";
|
|
523
523
|
}
|
|
524
|
-
class
|
|
525
|
-
constructor(e = -1, t = -1, s = -1, o = -1, i, r,
|
|
526
|
-
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, d = 0, c = 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 = d, this.draggingY = c, this.action = h;
|
|
527
527
|
}
|
|
528
528
|
clone() {
|
|
529
|
-
return new
|
|
529
|
+
return new le(
|
|
530
530
|
this.rowIndex,
|
|
531
531
|
this.rowTop,
|
|
532
532
|
this.columnIndex,
|
|
@@ -572,7 +572,7 @@ class Me {
|
|
|
572
572
|
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
class
|
|
575
|
+
class Ye {
|
|
576
576
|
constructor(e) {
|
|
577
577
|
this.domService = e;
|
|
578
578
|
}
|
|
@@ -646,26 +646,26 @@ class Ue {
|
|
|
646
646
|
return this.addClass(e, s), this.domService.appendChild(t, s), s;
|
|
647
647
|
}
|
|
648
648
|
addRowDiv(e, t, s = -1, o, i, r = "") {
|
|
649
|
-
const
|
|
650
|
-
if (this.domService.addClass(
|
|
651
|
-
const
|
|
652
|
-
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") {
|
|
651
|
+
const d = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
652
|
+
this.domService.addClass(n, `ge-table-row-${d}`);
|
|
653
653
|
}
|
|
654
|
-
if (this.domService.setStyle(
|
|
655
|
-
const
|
|
656
|
-
this.domService.appendChild(
|
|
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) {
|
|
655
|
+
const d = this.domService.createText(r);
|
|
656
|
+
this.domService.appendChild(n, d);
|
|
657
657
|
}
|
|
658
|
-
return this.domService.appendChild(e.child,
|
|
658
|
+
return this.domService.appendChild(e.child, n), n;
|
|
659
659
|
}
|
|
660
660
|
addColumnDiv(e) {
|
|
661
|
-
const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent: r, sideIdent:
|
|
662
|
-
this.domService.addClass(
|
|
663
|
-
const
|
|
664
|
-
if (r === "body" &&
|
|
665
|
-
const
|
|
666
|
-
this.addLabelDiv(
|
|
661
|
+
const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent: r, sideIdent: l, text: n = "", treeArrow: d, tableOptions: c, checkedType: h = void 0, sortState: p } = e, u = c == null ? void 0 : c.treeOptions, g = c == null ? void 0 : c.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`), d && d !== "none" && (this.domService.addClass(b, "ge-table-col-tree"), this.addArrowDiv(b, d, u, o, i, r)), g && i === 0 && h && this.addCheckboxToDiv(b, h, r, o), n) {
|
|
665
|
+
const m = d !== "none" && i === 0;
|
|
666
|
+
this.addLabelDiv(b, n, m, o, i, r);
|
|
667
667
|
}
|
|
668
|
-
return
|
|
668
|
+
return p && this.addSortedIcon(b, p, c == null ? void 0 : c.sortedOptions, i), this.domService.appendChild(t, b), b;
|
|
669
669
|
}
|
|
670
670
|
addCheckboxToDiv(e, t, s, o) {
|
|
671
671
|
const i = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
|
|
@@ -679,40 +679,40 @@ class Ue {
|
|
|
679
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;
|
|
680
680
|
}
|
|
681
681
|
addLabelDiv(e, t = "", s = !1, o = -1, i = -1, r = "body") {
|
|
682
|
-
const
|
|
683
|
-
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)
|
|
684
684
|
if (s) {
|
|
685
|
-
const
|
|
686
|
-
this.domService.appendChild(
|
|
685
|
+
const n = this.domService.createText(t);
|
|
686
|
+
this.domService.appendChild(l, n);
|
|
687
687
|
} else {
|
|
688
|
-
const
|
|
689
|
-
this.domService.appendChild(
|
|
690
|
-
const
|
|
691
|
-
this.domService.addClass(
|
|
688
|
+
const n = this.domService.createElement("div");
|
|
689
|
+
this.domService.appendChild(l, n);
|
|
690
|
+
const d = this.domService.createText(t);
|
|
691
|
+
this.domService.addClass(n, "ge-table-label"), this.domService.appendChild(n, d), this.domService.setAttribute(n, "data-row-index", `${o}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${r}`);
|
|
692
692
|
}
|
|
693
|
-
return this.domService.appendChild(e,
|
|
693
|
+
return this.domService.appendChild(e, l), l;
|
|
694
694
|
}
|
|
695
695
|
addSortedIcon(e, t = "", s = new Me(), o = -1) {
|
|
696
696
|
const i = this.domService.createElement("div");
|
|
697
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");
|
|
698
698
|
let r;
|
|
699
699
|
t === "asc" ? r = s.iconAsc : t === "desc" ? r = s.iconDesc : r = s.iconPlaceholder;
|
|
700
|
-
const
|
|
701
|
-
this.domService.appendChild(i,
|
|
702
|
-
for (const
|
|
703
|
-
this.domService.addClass(i,
|
|
700
|
+
const l = r.content, n = this.domService.createText(l);
|
|
701
|
+
this.domService.appendChild(i, n), r.style && this.applyStyleString(i, r.style);
|
|
702
|
+
for (const d of r.classes)
|
|
703
|
+
this.domService.addClass(i, d);
|
|
704
704
|
return this.domService.appendChild(e, i), i;
|
|
705
705
|
}
|
|
706
706
|
addArrowDiv(e, t = "none", s = new Ae(), o = -1, i = -1, r = "body") {
|
|
707
|
-
const
|
|
708
|
-
this.domService.addClass(
|
|
709
|
-
let
|
|
710
|
-
t === "expanded" ?
|
|
711
|
-
const
|
|
712
|
-
this.domService.appendChild(
|
|
713
|
-
for (const h of
|
|
714
|
-
this.domService.addClass(
|
|
715
|
-
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 d = n.content, c = this.domService.createText(d);
|
|
712
|
+
this.domService.appendChild(l, c), 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;
|
|
716
716
|
}
|
|
717
717
|
addColumnBorderDivs(e, t, s, o, i) {
|
|
718
718
|
if (e.verticalBorderVisible) {
|
|
@@ -754,20 +754,20 @@ class Ue {
|
|
|
754
754
|
return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
const
|
|
758
|
-
class
|
|
757
|
+
const ne = (a) => a === "header" ? "header" : a === "footer" ? "footer" : "body";
|
|
758
|
+
class Je {
|
|
759
759
|
constructor(e, t) {
|
|
760
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)) {
|
|
761
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"));
|
|
762
762
|
const s = e.getAttribute("data-area");
|
|
763
|
-
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) {
|
|
764
764
|
const o = e;
|
|
765
765
|
this.value = o.value;
|
|
766
766
|
}
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
|
-
class
|
|
770
|
+
class qe {
|
|
771
771
|
constructor(e) {
|
|
772
772
|
this.tableScope = e, this.doubleClickDelay = 500, this.expandedAll = !0, this.mouseDown = !1, this.dragging = !1, this.lastClicked = 0, this.tableScope.hostElement.addEventListener("click", this.onHostElementClicked.bind(this)), this.tableScope.hostElement.addEventListener("dblclick", this.onHostElementDblClicked.bind(this)), this.tableScope.hostElement.addEventListener("mousedown", this.onMouseDown.bind(this)), this.tableScope.hostElement.addEventListener("mousemove", this.onMouseMove.bind(this)), this.tableScope.hostElement.addEventListener("mouseup", this.onMouseUp.bind(this)), this.tableScope.hostElement.addEventListener("contextmenu", this.onContextmenu.bind(this)), this.tableScope.hostElement._MouseHandler = "true", this.tableScope.scrollViewport.addEventListener("scroll", this.tableScope.adjustAfterScrolling.bind(this.tableScope)), [window, this.tableScope.hostElement].forEach(
|
|
773
773
|
(t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
|
|
@@ -797,7 +797,7 @@ class Je {
|
|
|
797
797
|
if (t - this.lastClicked < this.doubleClickDelay)
|
|
798
798
|
return;
|
|
799
799
|
this.lastClicked = t;
|
|
800
|
-
const s = new
|
|
800
|
+
const s = new Je(e.target, this.tableScope);
|
|
801
801
|
if (s.action === "toggleExpandCollapseAll")
|
|
802
802
|
this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
|
|
803
803
|
else if (s.action === "toggleHeaderGroup")
|
|
@@ -826,15 +826,15 @@ class Je {
|
|
|
826
826
|
*/
|
|
827
827
|
onHostElementDblClicked(e) {
|
|
828
828
|
if (this.lastClicked = Date.now(), e.target instanceof HTMLElement) {
|
|
829
|
-
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);
|
|
830
830
|
if (s && o === "header")
|
|
831
831
|
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, r));
|
|
832
832
|
else if (t.getAttribute("data-row-index")) {
|
|
833
|
-
const
|
|
834
|
-
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()) {
|
|
835
835
|
e.preventDefault(), e.stopPropagation();
|
|
836
|
-
const
|
|
837
|
-
|
|
836
|
+
const d = n;
|
|
837
|
+
d.expanded = !d.expanded, "recalcVisibleTreeRows" in l && l.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(d);
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
840
|
}
|
|
@@ -859,11 +859,11 @@ class Je {
|
|
|
859
859
|
* @returns {void}
|
|
860
860
|
*/
|
|
861
861
|
updateCollapsedExpandedState(e) {
|
|
862
|
-
var s, o, i, r,
|
|
862
|
+
var s, o, i, r, l;
|
|
863
863
|
const t = (o = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : o.getRowId;
|
|
864
864
|
if (t) {
|
|
865
|
-
const
|
|
866
|
-
|
|
865
|
+
const n = (i = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : i.collapsedExpandedStateGet().mode, d = n === "collapsed" && !e.expanded || n === "expanded" && e.expanded, c = n === "collapsed" && e.expanded || n === "expanded" && !e.expanded, h = t(e.data);
|
|
866
|
+
d ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(h) : c && ((l = this.tableScope.storeStateCollapsedExpandService) == null || l.collapsedStateIdsRemove(h));
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
869
|
getArrowColumnIndex() {
|
|
@@ -899,7 +899,7 @@ class Je {
|
|
|
899
899
|
}
|
|
900
900
|
}
|
|
901
901
|
}
|
|
902
|
-
class
|
|
902
|
+
class Ze {
|
|
903
903
|
constructor(e) {
|
|
904
904
|
this.tableScope = e;
|
|
905
905
|
}
|
|
@@ -1016,6 +1016,13 @@ class Qe {
|
|
|
1016
1016
|
repaintHard() {
|
|
1017
1017
|
this.tableScope.repaintHard();
|
|
1018
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
|
+
*/
|
|
1019
1026
|
recalcColumnWidths(e) {
|
|
1020
1027
|
this.tableScope.recalcColumnWidths(e);
|
|
1021
1028
|
}
|
|
@@ -1069,6 +1076,26 @@ class Qe {
|
|
|
1069
1076
|
this.tableScope.focusModel()
|
|
1070
1077
|
);
|
|
1071
1078
|
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Generates and downloads an Excel file based on the table data.
|
|
1081
|
+
*
|
|
1082
|
+
* @param {string} fileName - The name of the Excel file to be downloaded. Defaults to 'table.xlsx'.
|
|
1083
|
+
* @param {string} author - The author of the Excel file. If not provided, it will remain empty.
|
|
1084
|
+
* @return {void} No return value. Initiates a file download of the Excel document.
|
|
1085
|
+
*/
|
|
1086
|
+
downloadExcel(e = "table.xlsx", t = "") {
|
|
1087
|
+
const s = [], o = this.tableScope.tableModel.getColumnCount(), i = ["header", "body", "footer"];
|
|
1088
|
+
for (const r of i) {
|
|
1089
|
+
const l = this.tableScope.tableModel.getAreaModel(r), n = (l == null ? void 0 : l.getRowCount()) ?? 0;
|
|
1090
|
+
for (let d = 0; d < n; d++) {
|
|
1091
|
+
const c = [];
|
|
1092
|
+
s.push(c);
|
|
1093
|
+
for (let h = 0; h < o; h++)
|
|
1094
|
+
c.push(l.getValueAt(d, h));
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
return this.tableScope.excelService.downloadExcel(s, e, t);
|
|
1098
|
+
}
|
|
1072
1099
|
/**
|
|
1073
1100
|
* Retrieves the current scope of the table.
|
|
1074
1101
|
*
|
|
@@ -1087,7 +1114,7 @@ class Qe {
|
|
|
1087
1114
|
return this.tableScope.selectionModel();
|
|
1088
1115
|
}
|
|
1089
1116
|
}
|
|
1090
|
-
class
|
|
1117
|
+
class ce {
|
|
1091
1118
|
constructor(e) {
|
|
1092
1119
|
this.getStorageKeyFn = e;
|
|
1093
1120
|
}
|
|
@@ -1162,7 +1189,7 @@ class de {
|
|
|
1162
1189
|
// }
|
|
1163
1190
|
// }
|
|
1164
1191
|
}
|
|
1165
|
-
class
|
|
1192
|
+
class Qe extends ce {
|
|
1166
1193
|
constructor(e) {
|
|
1167
1194
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
1168
1195
|
}
|
|
@@ -1189,7 +1216,7 @@ class et {
|
|
|
1189
1216
|
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = o;
|
|
1190
1217
|
}
|
|
1191
1218
|
}
|
|
1192
|
-
class tt extends
|
|
1219
|
+
class tt extends ce {
|
|
1193
1220
|
constructor(e) {
|
|
1194
1221
|
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new et(), this.load();
|
|
1195
1222
|
}
|
|
@@ -1223,7 +1250,7 @@ class tt extends de {
|
|
|
1223
1250
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
1224
1251
|
}
|
|
1225
1252
|
}
|
|
1226
|
-
class st extends
|
|
1253
|
+
class st extends ce {
|
|
1227
1254
|
constructor(e) {
|
|
1228
1255
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
1229
1256
|
}
|
|
@@ -1244,14 +1271,14 @@ class st extends de {
|
|
|
1244
1271
|
}
|
|
1245
1272
|
}
|
|
1246
1273
|
}
|
|
1247
|
-
class
|
|
1274
|
+
class F {
|
|
1248
1275
|
constructor(e = 0, t = 0, s = 0, o = 0, i) {
|
|
1249
1276
|
this.left = e, this.width = t, this.height = s, this.top = o, this.index = i;
|
|
1250
1277
|
}
|
|
1251
1278
|
}
|
|
1252
1279
|
class ot {
|
|
1253
1280
|
constructor(e, t, s, o) {
|
|
1254
|
-
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new
|
|
1281
|
+
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();
|
|
1255
1282
|
const i = this.hostElement;
|
|
1256
1283
|
i.innerText = "", this.dom.setAttribute(i, "tabindex", "0"), this.dom.setStyle(
|
|
1257
1284
|
this.dom.addClass("ge-table", i),
|
|
@@ -1469,9 +1496,9 @@ class it {
|
|
|
1469
1496
|
let i = this.areaModel.getColspanAt(s, o), r = this.areaModel.getRowspanAt(s, o);
|
|
1470
1497
|
if (i > 1 || r > 1) {
|
|
1471
1498
|
i === 0 && (i = 1), r === 0 && (r = 1);
|
|
1472
|
-
const
|
|
1499
|
+
const l = "gammaCells" in this.areaModel;
|
|
1473
1500
|
this.colAndRowspanRanges.push(
|
|
1474
|
-
new A(s, o, s + r - 1, o + i - 1,
|
|
1501
|
+
new A(s, o, s + r - 1, o + i - 1, l)
|
|
1475
1502
|
);
|
|
1476
1503
|
}
|
|
1477
1504
|
}
|
|
@@ -1488,22 +1515,22 @@ class it {
|
|
|
1488
1515
|
return !1;
|
|
1489
1516
|
}
|
|
1490
1517
|
}
|
|
1491
|
-
class
|
|
1518
|
+
class rt {
|
|
1492
1519
|
constructor(e, t, s) {
|
|
1493
1520
|
this.header = e, this.body = t, this.footer = s;
|
|
1494
1521
|
}
|
|
1495
1522
|
}
|
|
1496
|
-
class
|
|
1523
|
+
class at extends ot {
|
|
1497
1524
|
constructor(e, t, s, o) {
|
|
1498
|
-
var r,
|
|
1525
|
+
var r, l;
|
|
1499
1526
|
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 = {
|
|
1500
1527
|
header: [],
|
|
1501
1528
|
body: [],
|
|
1502
1529
|
footer: []
|
|
1503
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
1504
|
-
(
|
|
1505
|
-
var
|
|
1506
|
-
this.colAndRowspanModels[
|
|
1530
|
+
}, 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(
|
|
1531
|
+
(n) => {
|
|
1532
|
+
var d;
|
|
1533
|
+
this.colAndRowspanModels[n] = new it(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
|
|
1507
1534
|
}
|
|
1508
1535
|
);
|
|
1509
1536
|
}
|
|
@@ -1589,19 +1616,19 @@ class rt extends ot {
|
|
|
1589
1616
|
for (const t of this.removables)
|
|
1590
1617
|
t.remove();
|
|
1591
1618
|
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(
|
|
1592
|
-
new
|
|
1619
|
+
new F(0, this.hostElement.clientWidth, 1, 0),
|
|
1593
1620
|
this.hostElement,
|
|
1594
1621
|
"ge-table-border"
|
|
1595
1622
|
)), this.tableOptions.tableBottomBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
|
|
1596
|
-
new
|
|
1623
|
+
new F(0, this.hostElement.clientWidth, 1, this.hostElement.clientHeight - 1),
|
|
1597
1624
|
this.hostElement,
|
|
1598
1625
|
"ge-table-border"
|
|
1599
1626
|
)), this.tableModel.getFixedLeftColumnCount() > 0 && this.removables.push(this.dom.addVerticalBorder(
|
|
1600
|
-
new
|
|
1627
|
+
new F(this.areaBodyWest.child.clientWidth, 1, this.hostElement.clientHeight, 0),
|
|
1601
1628
|
this.hostElement,
|
|
1602
1629
|
"ge-table-body-west-vertical-border"
|
|
1603
1630
|
)), ((e = this.tableModel.getAreaModel("header")) == null ? void 0 : e.getRowCount()) > 0 && this.removables.push(this.dom.addHorizontalBorder(
|
|
1604
|
-
new
|
|
1631
|
+
new F(0, this.hostElement.clientWidth, 1, this.areaHeaderCenter.child.clientHeight),
|
|
1605
1632
|
this.hostElement,
|
|
1606
1633
|
"ge-table-body-west-vertical-border"
|
|
1607
1634
|
));
|
|
@@ -1640,22 +1667,23 @@ class rt extends ot {
|
|
|
1640
1667
|
* @param {string[]} cssClasses - An array of CSS classes to be applied to the cell.
|
|
1641
1668
|
*/
|
|
1642
1669
|
rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: o, cssClasses: i }) {
|
|
1643
|
-
const r = this.tableModel.getAreaModel(e),
|
|
1644
|
-
if (
|
|
1645
|
-
let
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1648
|
-
|
|
1670
|
+
const r = this.tableModel.getAreaModel(e), l = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', n = document.querySelector(l);
|
|
1671
|
+
if (n) {
|
|
1672
|
+
let d;
|
|
1673
|
+
const c = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s;
|
|
1674
|
+
let h;
|
|
1675
|
+
if (c ? h = this.editorRenderer : h = r.getCellRenderer(t, s), n.innerText = "", this.applyCssClasses(n, i), h)
|
|
1676
|
+
d = h.render(n, t, s, e, r, o, this.dom.domService), d && this.cleanupFunctions[e].push(d);
|
|
1649
1677
|
else {
|
|
1650
|
-
const
|
|
1651
|
-
this.dom.addLabelDiv(
|
|
1678
|
+
const g = `${o}`;
|
|
1679
|
+
this.dom.addLabelDiv(n, g, !1, t, s, e);
|
|
1652
1680
|
}
|
|
1653
|
-
const
|
|
1654
|
-
|
|
1655
|
-
const
|
|
1656
|
-
if (
|
|
1657
|
-
for (const
|
|
1658
|
-
this.dom.setStyle(
|
|
1681
|
+
const p = r.getCustomClassesAt(t, s);
|
|
1682
|
+
p.length && this.dom.addClasses(p, n);
|
|
1683
|
+
const u = r.getCustomStyleAt(t, s);
|
|
1684
|
+
if (u)
|
|
1685
|
+
for (const g in u)
|
|
1686
|
+
this.dom.setStyle(n, g, u[g]);
|
|
1659
1687
|
}
|
|
1660
1688
|
}
|
|
1661
1689
|
/**
|
|
@@ -1764,87 +1792,87 @@ class rt extends ot {
|
|
|
1764
1792
|
* @protected
|
|
1765
1793
|
*/
|
|
1766
1794
|
adjustArea(e, t = 0) {
|
|
1767
|
-
var
|
|
1795
|
+
var f;
|
|
1768
1796
|
const s = this.getArea(e, "west"), o = this.getArea(e, "center"), i = this.getArea(e, "east"), r = o.child.clientHeight;
|
|
1769
1797
|
s.child.innerText = "", o.child.innerText = "", i.child.innerText = "";
|
|
1770
|
-
const
|
|
1798
|
+
const l = 0, n = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), c = this.tableModel.getAreaModel(e), h = c.getRowCount();
|
|
1771
1799
|
for (; this.cleanupFunctions[e].length; ) {
|
|
1772
|
-
const
|
|
1773
|
-
|
|
1774
|
-
}
|
|
1775
|
-
let
|
|
1776
|
-
const
|
|
1777
|
-
for (let
|
|
1778
|
-
const
|
|
1779
|
-
if (
|
|
1780
|
-
this.firstVisibleRowIndex =
|
|
1781
|
-
let y = { left:
|
|
1782
|
-
const
|
|
1800
|
+
const m = this.cleanupFunctions[e].shift();
|
|
1801
|
+
m && m();
|
|
1802
|
+
}
|
|
1803
|
+
let p = t;
|
|
1804
|
+
const u = this.tableModel.getColumnCount(), g = this.tableModel.getFixedRightColumnCount(), b = this.tableModel.getFixedLeftColumnCount();
|
|
1805
|
+
for (let m = 0; m < h; m++) {
|
|
1806
|
+
const x = p, C = m === h - 1, E = this.tableModel.getRowHeight(e, m);
|
|
1807
|
+
if (x + E > 0) {
|
|
1808
|
+
this.firstVisibleRowIndex = m;
|
|
1809
|
+
let y = { left: l, width: n, height: E, top: x, index: m }, S = this.dom.addRowDiv(o, y, m, e, "center");
|
|
1810
|
+
const k = b;
|
|
1783
1811
|
if (this.adjustColumnsToRowParent({
|
|
1784
1812
|
areaIdent: e,
|
|
1785
1813
|
sideIdent: "center",
|
|
1786
|
-
areaModel:
|
|
1814
|
+
areaModel: c,
|
|
1787
1815
|
geo: y,
|
|
1788
|
-
parent:
|
|
1789
|
-
rowIndex:
|
|
1790
|
-
columnIndexStart:
|
|
1791
|
-
columnIndexEnd:
|
|
1816
|
+
parent: S,
|
|
1817
|
+
rowIndex: m,
|
|
1818
|
+
columnIndexStart: k,
|
|
1819
|
+
columnIndexEnd: u - g - 1,
|
|
1792
1820
|
verticalFixed: !1,
|
|
1793
1821
|
lastRowOfModel: C
|
|
1794
|
-
}),
|
|
1822
|
+
}), d.left > 0 && (y = { left: l, width: this.areaBodyWestGeo.width, height: E, top: x, index: m }, S = this.dom.addRowDiv(s, y, m, e, "west"), this.adjustColumnsToRowParent({
|
|
1795
1823
|
areaIdent: e,
|
|
1796
1824
|
sideIdent: "west",
|
|
1797
|
-
areaModel:
|
|
1825
|
+
areaModel: c,
|
|
1798
1826
|
geo: y,
|
|
1799
|
-
parent:
|
|
1800
|
-
rowIndex:
|
|
1827
|
+
parent: S,
|
|
1828
|
+
rowIndex: m,
|
|
1801
1829
|
columnIndexStart: 0,
|
|
1802
|
-
columnIndexEnd:
|
|
1830
|
+
columnIndexEnd: k - 1,
|
|
1803
1831
|
verticalFixed: !0,
|
|
1804
1832
|
lastRowOfModel: C
|
|
1805
|
-
})),
|
|
1833
|
+
})), d.right > 0 && (y = { left: l, width: this.areaBodyEastGeo.width, height: E, top: x, index: m }, S = this.dom.addRowDiv(i, y, m, e, "east"), this.adjustColumnsToRowParent({
|
|
1806
1834
|
areaIdent: e,
|
|
1807
1835
|
sideIdent: "east",
|
|
1808
|
-
areaModel:
|
|
1836
|
+
areaModel: c,
|
|
1809
1837
|
geo: y,
|
|
1810
|
-
parent:
|
|
1811
|
-
rowIndex:
|
|
1812
|
-
columnIndexStart:
|
|
1813
|
-
columnIndexEnd:
|
|
1838
|
+
parent: S,
|
|
1839
|
+
rowIndex: m,
|
|
1840
|
+
columnIndexStart: u - g,
|
|
1841
|
+
columnIndexEnd: u - 1,
|
|
1814
1842
|
verticalFixed: !0,
|
|
1815
1843
|
lastRowOfModel: C
|
|
1816
|
-
})), e === "header" && this.tree &&
|
|
1817
|
-
const
|
|
1844
|
+
})), e === "header" && this.tree && m === h - 1) {
|
|
1845
|
+
const R = this.dom.applyStyle(
|
|
1818
1846
|
this.dom.setAttribute(
|
|
1819
|
-
this.dom.addDiv(
|
|
1847
|
+
this.dom.addDiv(S, new F(16, 20, 20, 8)),
|
|
1820
1848
|
"data-ge-action",
|
|
1821
1849
|
"toggleExpandCollapseAll"
|
|
1822
1850
|
),
|
|
1823
1851
|
{ cursor: "pointer" }
|
|
1824
1852
|
), D = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
1825
1853
|
if (D) {
|
|
1826
|
-
const
|
|
1827
|
-
this.dom.domService.appendChild(
|
|
1854
|
+
const N = this.dom.domService.createText(D.content);
|
|
1855
|
+
this.dom.domService.appendChild(R, N), D.style && this.dom.applyStyleString(R, D.style);
|
|
1828
1856
|
}
|
|
1829
1857
|
}
|
|
1830
1858
|
}
|
|
1831
|
-
if (
|
|
1859
|
+
if (p = p + E, p > r)
|
|
1832
1860
|
break;
|
|
1833
1861
|
}
|
|
1834
1862
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
1835
|
-
const
|
|
1836
|
-
if (
|
|
1837
|
-
for (const
|
|
1863
|
+
const m = ((f = this.colAndRowspanModels[e]) == null ? void 0 : f.getRanges()) ?? [];
|
|
1864
|
+
if (m.length)
|
|
1865
|
+
for (const x of m) {
|
|
1838
1866
|
let C = 0, E = o.child, y = "center";
|
|
1839
|
-
if (
|
|
1867
|
+
if (x.c1 < b)
|
|
1840
1868
|
E = s.child, y = "west";
|
|
1841
|
-
else if (
|
|
1869
|
+
else if (g > 0 && x.c1 >= u - g)
|
|
1842
1870
|
E = i.child, y = "east";
|
|
1843
1871
|
else {
|
|
1844
|
-
const
|
|
1845
|
-
C = this.scrollFactorX *
|
|
1872
|
+
const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1873
|
+
C = this.scrollFactorX * S - this.areaBodyWestGeo.width, y = "center";
|
|
1846
1874
|
}
|
|
1847
|
-
this.drawBigCell(
|
|
1875
|
+
this.drawBigCell(x, C, t, c, E, y);
|
|
1848
1876
|
}
|
|
1849
1877
|
}
|
|
1850
1878
|
}
|
|
@@ -1859,24 +1887,24 @@ class rt extends ot {
|
|
|
1859
1887
|
* @protected
|
|
1860
1888
|
*/
|
|
1861
1889
|
drawBigCell(e, t, s, o, i, r) {
|
|
1862
|
-
const
|
|
1863
|
-
let
|
|
1864
|
-
|
|
1865
|
-
const h = t + this.getColumnWidths(
|
|
1866
|
-
let
|
|
1867
|
-
const
|
|
1868
|
-
|
|
1890
|
+
const l = s + this.getRowHeights(0, e.r1 - 1, o).reduce((f, m) => f + m, 0), n = this.tableModel.getColumnCount(), d = this.tableModel.getFixedRightColumnCount();
|
|
1891
|
+
let c = 0;
|
|
1892
|
+
d > 0 && e.c1 >= n - d && (c = n - d);
|
|
1893
|
+
const h = t + this.getColumnWidths(c, 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);
|
|
1894
|
+
let g = !1;
|
|
1895
|
+
const b = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
1896
|
+
b && (g = b.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
|
|
1869
1897
|
areaModel: o,
|
|
1870
1898
|
areaIdent: o.areaIdent,
|
|
1871
1899
|
sideIdent: r,
|
|
1872
1900
|
rowIndex: e.r1,
|
|
1873
1901
|
columnIndex: e.c1,
|
|
1874
1902
|
left: h,
|
|
1875
|
-
top:
|
|
1876
|
-
width:
|
|
1877
|
-
height:
|
|
1903
|
+
top: l,
|
|
1904
|
+
width: u,
|
|
1905
|
+
height: p,
|
|
1878
1906
|
parent: i,
|
|
1879
|
-
cellSelected:
|
|
1907
|
+
cellSelected: g,
|
|
1880
1908
|
lastRowOfModel: !0,
|
|
1881
1909
|
gammaRange: e.gammaRange
|
|
1882
1910
|
}) : this.renderCell({
|
|
@@ -1886,20 +1914,20 @@ class rt extends ot {
|
|
|
1886
1914
|
rowIndex: e.r1,
|
|
1887
1915
|
columnIndex: e.c1,
|
|
1888
1916
|
left: h,
|
|
1889
|
-
top:
|
|
1890
|
-
width:
|
|
1891
|
-
height:
|
|
1917
|
+
top: l,
|
|
1918
|
+
width: u,
|
|
1919
|
+
height: p,
|
|
1892
1920
|
parent: i,
|
|
1893
|
-
cellSelected:
|
|
1921
|
+
cellSelected: g,
|
|
1894
1922
|
lastRowOfModel: !0,
|
|
1895
1923
|
gammaRange: e.gammaRange
|
|
1896
1924
|
}), o.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1897
1925
|
rowIndex: e.r1,
|
|
1898
1926
|
columnIndex: e.c1,
|
|
1899
1927
|
cellLeft: h,
|
|
1900
|
-
cellTop:
|
|
1901
|
-
cellWidth:
|
|
1902
|
-
cellHeight:
|
|
1928
|
+
cellTop: l,
|
|
1929
|
+
cellWidth: u,
|
|
1930
|
+
cellHeight: p,
|
|
1903
1931
|
parent: i
|
|
1904
1932
|
});
|
|
1905
1933
|
}
|
|
@@ -1937,64 +1965,64 @@ class rt extends ot {
|
|
|
1937
1965
|
geo: o,
|
|
1938
1966
|
parent: i,
|
|
1939
1967
|
rowIndex: r,
|
|
1940
|
-
columnIndexStart:
|
|
1941
|
-
columnIndexEnd:
|
|
1942
|
-
verticalFixed:
|
|
1943
|
-
lastRowOfModel:
|
|
1968
|
+
columnIndexStart: l,
|
|
1969
|
+
columnIndexEnd: n,
|
|
1970
|
+
verticalFixed: d = !1,
|
|
1971
|
+
lastRowOfModel: c = !1
|
|
1944
1972
|
}) {
|
|
1945
|
-
var
|
|
1973
|
+
var b;
|
|
1946
1974
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
1947
1975
|
let h = 0;
|
|
1948
|
-
if (!
|
|
1949
|
-
const
|
|
1950
|
-
h = this.scrollFactorX *
|
|
1951
|
-
}
|
|
1952
|
-
const
|
|
1953
|
-
let
|
|
1954
|
-
for (let
|
|
1955
|
-
const
|
|
1956
|
-
if (
|
|
1976
|
+
if (!d) {
|
|
1977
|
+
const f = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1978
|
+
h = this.scrollFactorX * f;
|
|
1979
|
+
}
|
|
1980
|
+
const p = 0, u = !!(e === "body" && t);
|
|
1981
|
+
let g = h;
|
|
1982
|
+
for (let f = l; f <= n; f++) {
|
|
1983
|
+
const m = g, x = this.tableModel.getColumnWidth(f);
|
|
1984
|
+
if (x > 0 && m + x > 0) {
|
|
1957
1985
|
let C = o.height;
|
|
1958
|
-
const E = s.getRowspanAt(r,
|
|
1959
|
-
E > 1 && (C = this.getRowHeights(r, r + E - 1, s).reduce((
|
|
1960
|
-
let
|
|
1961
|
-
y > 1 && (
|
|
1962
|
-
let
|
|
1963
|
-
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (
|
|
1964
|
-
this.renderDragTargetDiv(i,
|
|
1965
|
-
const
|
|
1966
|
-
this.dom.addColumnBorderDivs(this.tableOptions, i,
|
|
1986
|
+
const E = s.getRowspanAt(r, f), y = s.getColspanAt(r, f);
|
|
1987
|
+
E > 1 && (C = this.getRowHeights(r, r + E - 1, s).reduce((R, D) => R + D, 0));
|
|
1988
|
+
let S = x;
|
|
1989
|
+
y > 1 && (S = this.getColumnWidths(f, f + y - 1).reduce((R, D) => R + D, 0));
|
|
1990
|
+
let k = !1;
|
|
1991
|
+
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (b = this.colAndRowspanModels[e]) != null && b.isInRange(r, f) && (k = !0), this.draggingTargetColumnIndex === f && e !== "header") {
|
|
1992
|
+
this.renderDragTargetDiv(i, m, p, S, C);
|
|
1993
|
+
const R = { left: m, top: p, width: S, height: C };
|
|
1994
|
+
this.dom.addColumnBorderDivs(this.tableOptions, i, R, e, t);
|
|
1967
1995
|
} else {
|
|
1968
|
-
const
|
|
1969
|
-
"gammaCells" in s && s.getValueAt(r,
|
|
1996
|
+
const R = this.renderSelectedBackgroundDiv(k, u, t, s, r, f, i, m, p, S, C);
|
|
1997
|
+
"gammaCells" in s && s.getValueAt(r, f) && (k = !1), k || this.renderCell({
|
|
1970
1998
|
areaModel: s,
|
|
1971
1999
|
areaIdent: e,
|
|
1972
2000
|
sideIdent: t,
|
|
1973
2001
|
rowIndex: r,
|
|
1974
|
-
columnIndex:
|
|
1975
|
-
left:
|
|
1976
|
-
top:
|
|
1977
|
-
width:
|
|
2002
|
+
columnIndex: f,
|
|
2003
|
+
left: m,
|
|
2004
|
+
top: p,
|
|
2005
|
+
width: S,
|
|
1978
2006
|
height: C,
|
|
1979
2007
|
parent: i,
|
|
1980
|
-
cellSelected:
|
|
1981
|
-
lastRowOfModel:
|
|
2008
|
+
cellSelected: R,
|
|
2009
|
+
lastRowOfModel: c,
|
|
1982
2010
|
gammaRange: !0
|
|
1983
2011
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1984
2012
|
rowIndex: r,
|
|
1985
|
-
columnIndex:
|
|
1986
|
-
cellLeft:
|
|
1987
|
-
cellTop:
|
|
1988
|
-
cellWidth:
|
|
2013
|
+
columnIndex: f,
|
|
2014
|
+
cellLeft: m,
|
|
2015
|
+
cellTop: p,
|
|
2016
|
+
cellWidth: S,
|
|
1989
2017
|
cellHeight: C,
|
|
1990
2018
|
parent: i
|
|
1991
2019
|
});
|
|
1992
2020
|
}
|
|
1993
2021
|
}
|
|
1994
|
-
if (
|
|
2022
|
+
if (g = g + x, g > this.areaBodyCenterGeo.width)
|
|
1995
2023
|
break;
|
|
1996
2024
|
}
|
|
1997
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new
|
|
2025
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new F(g - 1, 1, o.height, 0), i);
|
|
1998
2026
|
}
|
|
1999
2027
|
/**
|
|
2000
2028
|
* Retrieves the column index of the tree arrow column in the table.
|
|
@@ -2015,55 +2043,55 @@ class rt extends ot {
|
|
|
2015
2043
|
rowIndex: o,
|
|
2016
2044
|
index: i,
|
|
2017
2045
|
left: r,
|
|
2018
|
-
width:
|
|
2019
|
-
height:
|
|
2020
|
-
top:
|
|
2021
|
-
parent:
|
|
2046
|
+
width: l,
|
|
2047
|
+
height: n,
|
|
2048
|
+
top: d,
|
|
2049
|
+
parent: c,
|
|
2022
2050
|
lastRowOfModel: h
|
|
2023
2051
|
}) {
|
|
2024
|
-
var
|
|
2025
|
-
const
|
|
2026
|
-
let
|
|
2027
|
-
if (i === this.getTreeArrowColumnIndex() && ie(
|
|
2028
|
-
const
|
|
2029
|
-
(
|
|
2030
|
-
}
|
|
2031
|
-
let
|
|
2052
|
+
var pe;
|
|
2053
|
+
const u = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), g = { left: r, width: l, height: n, top: d, index: i }, b = e.getRowByIndex(o);
|
|
2054
|
+
let f = "none";
|
|
2055
|
+
if (i === this.getTreeArrowColumnIndex() && ie(b)) {
|
|
2056
|
+
const w = b;
|
|
2057
|
+
(pe = w.children) != null && pe.length ? w.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
|
|
2058
|
+
}
|
|
2059
|
+
let x;
|
|
2032
2060
|
if (t === "header") {
|
|
2033
|
-
const
|
|
2034
|
-
(!(
|
|
2061
|
+
const w = this.tableModel.getColumnDef(i);
|
|
2062
|
+
(!(w != null && w.sortIconVisible) || w != null && w.sortIconVisible()) && (x = w == null ? void 0 : w.sortState);
|
|
2035
2063
|
}
|
|
2036
|
-
const C = e.getValueAt(o, i), E =
|
|
2064
|
+
const C = e.getValueAt(o, i), E = u ? "" : `${C}`, y = e.isRowChecked(o), S = this.dom.addColumnDiv(
|
|
2037
2065
|
{
|
|
2038
|
-
parent:
|
|
2039
|
-
geo:
|
|
2066
|
+
parent: c,
|
|
2067
|
+
geo: g,
|
|
2040
2068
|
rowIndex: o,
|
|
2041
2069
|
columnIndex: i,
|
|
2042
2070
|
areaIdent: t,
|
|
2043
2071
|
sideIdent: s,
|
|
2044
2072
|
text: E,
|
|
2045
|
-
treeArrow:
|
|
2073
|
+
treeArrow: f,
|
|
2046
2074
|
tableOptions: this.tableOptions,
|
|
2047
2075
|
checkedType: y,
|
|
2048
|
-
sortState:
|
|
2076
|
+
sortState: x
|
|
2049
2077
|
}
|
|
2050
|
-
),
|
|
2051
|
-
|
|
2052
|
-
const
|
|
2053
|
-
|
|
2078
|
+
), k = e.getTooltipAt(o, i);
|
|
2079
|
+
k && this.dom.setAttribute(S, "title", k);
|
|
2080
|
+
const R = this.tableModel.getColumnDef(i);
|
|
2081
|
+
R && R.classes[t] && this.dom.addClasses(R.classes[t], S);
|
|
2054
2082
|
let D;
|
|
2055
|
-
|
|
2056
|
-
const
|
|
2057
|
-
if (
|
|
2058
|
-
const
|
|
2059
|
-
|
|
2083
|
+
u && (D = u.render(S, o, i, t, e, C, this.dom.domService));
|
|
2084
|
+
const N = e.getCustomClassesAt(o, i);
|
|
2085
|
+
if (N.length && this.dom.addClasses(N, S), this.dom.addColumnBorderDivs(this.tableOptions, c, g, t, s), h && this.dom.addHorizontalBorder({ left: r, width: l, height: n, top: d + n }, c), this.getFocusModel && t === "body") {
|
|
2086
|
+
const w = this.getFocusModel();
|
|
2087
|
+
w != null && w.hasFocus(o, i) && this.dom.addFocusBorderDivs(c, g, {});
|
|
2060
2088
|
}
|
|
2061
|
-
t === "header" && this.dom.setAttribute(
|
|
2062
|
-
const
|
|
2063
|
-
if (
|
|
2064
|
-
for (const
|
|
2065
|
-
this.dom.setStyle(
|
|
2066
|
-
return [
|
|
2089
|
+
t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
|
|
2090
|
+
const Z = e.getCustomStyleAt(o, i);
|
|
2091
|
+
if (Z)
|
|
2092
|
+
for (const w in Z)
|
|
2093
|
+
this.dom.setStyle(S, w, Z[w]);
|
|
2094
|
+
return [S, D];
|
|
2067
2095
|
}
|
|
2068
2096
|
/**
|
|
2069
2097
|
* Applies CSS classes to an HTML element.
|
|
@@ -2193,14 +2221,14 @@ class rt extends ot {
|
|
|
2193
2221
|
adjustDraggingColumn(e, t, s) {
|
|
2194
2222
|
var o, i;
|
|
2195
2223
|
if (this.dragging) {
|
|
2196
|
-
const r = this.hostElement.clientHeight,
|
|
2224
|
+
const r = this.hostElement.clientHeight, l = this.storedColumnWidths[t];
|
|
2197
2225
|
if ((o = e.originalEvent) != null && o.clientX) {
|
|
2198
|
-
const
|
|
2226
|
+
const c = { left: ((i = e.originalEvent) == null ? void 0 : i.clientX) - l / 2, width: l, height: r, top: 0, index: t };
|
|
2199
2227
|
this.dom.applyStyle(this.draggingColumn, {
|
|
2200
2228
|
background: "rgba(128,128,128,0.2)",
|
|
2201
2229
|
display: "block",
|
|
2202
2230
|
overfllow: "clip"
|
|
2203
|
-
}), this.dom.applyStyleInPx(this.draggingColumn,
|
|
2231
|
+
}), this.dom.applyStyleInPx(this.draggingColumn, c), s && this.renderContentOfDraggingColumn(c);
|
|
2204
2232
|
}
|
|
2205
2233
|
} else
|
|
2206
2234
|
this.hideDraggingColumn();
|
|
@@ -2227,27 +2255,27 @@ class rt extends ot {
|
|
|
2227
2255
|
renderContentOfDraggingColumnForArea(e, t, s = 0) {
|
|
2228
2256
|
const o = "center", i = this.tableModel.getAreaModel(t), r = i == null ? void 0 : i.getRowCount();
|
|
2229
2257
|
if (r) {
|
|
2230
|
-
const
|
|
2231
|
-
for (let
|
|
2232
|
-
const
|
|
2233
|
-
parent:
|
|
2234
|
-
geo:
|
|
2235
|
-
rowIndex:
|
|
2236
|
-
columnIndex:
|
|
2258
|
+
const l = e.index ?? 0, n = this.draggingColumn;
|
|
2259
|
+
for (let d = 0; d < r; d++) {
|
|
2260
|
+
const c = s, h = i.getRowHeight(d), p = { left: 0, width: e.width, height: h, top: c, index: d }, u = i.getValueAt(d, l), g = i.getCellRenderer(d, l), b = g ? "" : `${u}`, f = {
|
|
2261
|
+
parent: n,
|
|
2262
|
+
geo: p,
|
|
2263
|
+
rowIndex: d,
|
|
2264
|
+
columnIndex: l,
|
|
2237
2265
|
areaIdent: t,
|
|
2238
2266
|
sideIdent: o,
|
|
2239
|
-
text:
|
|
2240
|
-
},
|
|
2241
|
-
let
|
|
2242
|
-
|
|
2243
|
-
const C = i.getCustomClassesAt(
|
|
2244
|
-
C.length && this.dom.addClasses(C,
|
|
2245
|
-
const E = this.tableModel.getColumnDef(
|
|
2246
|
-
E && E.classes[t] && this.dom.addClasses(E.classes[t],
|
|
2247
|
-
const y = i.getCustomStyleAt(
|
|
2267
|
+
text: b
|
|
2268
|
+
}, m = this.dom.addColumnDiv(f);
|
|
2269
|
+
let x;
|
|
2270
|
+
g && (x = g.render(m, d, l, t, i, u, this.dom.domService), x && this.cleanupFunctions[t].push(x));
|
|
2271
|
+
const C = i.getCustomClassesAt(d, l);
|
|
2272
|
+
C.length && this.dom.addClasses(C, m);
|
|
2273
|
+
const E = this.tableModel.getColumnDef(l);
|
|
2274
|
+
E && E.classes[t] && this.dom.addClasses(E.classes[t], m), this.dom.addColumnBorderDivs(this.tableOptions, n, p, t, o);
|
|
2275
|
+
const y = i.getCustomStyleAt(d, l);
|
|
2248
2276
|
if (y)
|
|
2249
|
-
for (const
|
|
2250
|
-
this.dom.setStyle(
|
|
2277
|
+
for (const S in y)
|
|
2278
|
+
this.dom.setStyle(m, S, y[S]);
|
|
2251
2279
|
s = s + h;
|
|
2252
2280
|
}
|
|
2253
2281
|
}
|
|
@@ -2297,23 +2325,23 @@ class rt extends ot {
|
|
|
2297
2325
|
* @param {number} height - The height of the div.
|
|
2298
2326
|
* @returns {boolean} - Whether the cell is selected.
|
|
2299
2327
|
*/
|
|
2300
|
-
renderSelectedBackgroundDiv(e, t, s, o, i, r, n,
|
|
2301
|
-
let
|
|
2328
|
+
renderSelectedBackgroundDiv(e, t, s, o, i, r, l, n, d, c, h) {
|
|
2329
|
+
let p = !1;
|
|
2302
2330
|
if (!e && t && o.isSelectable(i, r) && this.getSelectionModel) {
|
|
2303
|
-
const
|
|
2304
|
-
if (
|
|
2305
|
-
const
|
|
2306
|
-
|
|
2307
|
-
for (let
|
|
2308
|
-
const
|
|
2331
|
+
const u = this.getSelectionModel();
|
|
2332
|
+
if (u) {
|
|
2333
|
+
const g = u.getSelectionCount(i, r);
|
|
2334
|
+
p = g > 0;
|
|
2335
|
+
for (let b = 0; b < g; b++) {
|
|
2336
|
+
const f = this.dom.applyStylePosistionAbsolute(
|
|
2309
2337
|
// ge-table-body-west-selected-range
|
|
2310
|
-
this.dom.createDivWithClass(`ge-table-${o.areaIdent}-${s}-selected-range`,
|
|
2338
|
+
this.dom.createDivWithClass(`ge-table-${o.areaIdent}-${s}-selected-range`, l)
|
|
2311
2339
|
);
|
|
2312
|
-
this.dom.setStyle(
|
|
2340
|
+
this.dom.setStyle(f, "left", `${n}px`), this.dom.setStyle(f, "top", `${d}px`), this.dom.setStyle(f, "width", `${c}px`), this.dom.setStyle(f, "height", `${h}px`);
|
|
2313
2341
|
}
|
|
2314
2342
|
}
|
|
2315
2343
|
}
|
|
2316
|
-
return
|
|
2344
|
+
return p;
|
|
2317
2345
|
}
|
|
2318
2346
|
/**
|
|
2319
2347
|
* Renders a cell in the grid.
|
|
@@ -2341,27 +2369,27 @@ class rt extends ot {
|
|
|
2341
2369
|
rowIndex: o,
|
|
2342
2370
|
columnIndex: i,
|
|
2343
2371
|
left: r,
|
|
2344
|
-
top:
|
|
2345
|
-
width:
|
|
2346
|
-
height:
|
|
2347
|
-
parent:
|
|
2372
|
+
top: l,
|
|
2373
|
+
width: n,
|
|
2374
|
+
height: d,
|
|
2375
|
+
parent: c,
|
|
2348
2376
|
cellSelected: h,
|
|
2349
|
-
lastRowOfModel:
|
|
2377
|
+
lastRowOfModel: p
|
|
2350
2378
|
}) {
|
|
2351
|
-
const [
|
|
2379
|
+
const [u, g] = this.addAndRenderCellDiv({
|
|
2352
2380
|
areaModel: e,
|
|
2353
2381
|
areaIdent: t,
|
|
2354
2382
|
sideIdent: s,
|
|
2355
2383
|
rowIndex: o,
|
|
2356
2384
|
index: i,
|
|
2357
2385
|
left: r,
|
|
2358
|
-
width:
|
|
2359
|
-
height:
|
|
2360
|
-
top:
|
|
2361
|
-
parent:
|
|
2362
|
-
lastRowOfModel:
|
|
2386
|
+
width: n,
|
|
2387
|
+
height: d,
|
|
2388
|
+
top: l,
|
|
2389
|
+
parent: c,
|
|
2390
|
+
lastRowOfModel: p
|
|
2363
2391
|
});
|
|
2364
|
-
h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`,
|
|
2392
|
+
h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, u), g && this.cleanupFunctions[t].push(g);
|
|
2365
2393
|
}
|
|
2366
2394
|
/**
|
|
2367
2395
|
* Render the header cell resize handle.
|
|
@@ -2377,17 +2405,17 @@ class rt extends ot {
|
|
|
2377
2405
|
*
|
|
2378
2406
|
* @return {void}
|
|
2379
2407
|
*/
|
|
2380
|
-
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: o, cellWidth: i, cellHeight: r, parent:
|
|
2381
|
-
const
|
|
2382
|
-
|
|
2408
|
+
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: o, cellWidth: i, cellHeight: r, parent: l }) {
|
|
2409
|
+
const n = this.dom.domService, d = this.tableOptions.columnResizeHandleWidthInPx ?? 2, c = n.createElement("div");
|
|
2410
|
+
n.setAttribute(c, "data-col-index", `${t}`), n.setAttribute(c, "data-row-index", `${e}`), n.setAttribute(c, "data-area", "header"), n.setAttribute(c, "data-ge-action", "resize-column"), n.addClass(c, "ge-table-column-resize-handle"), n.setStyle(c, "display", "clip"), n.setStyle(c, "position", "absolute"), n.setStyle(c, "cursor", "col-resize"), n.setStyle(c, "left", `${s + i - d}px`), n.setStyle(c, "top", `${o}px`), n.setStyle(c, "width", `${d}px`), n.setStyle(c, "height", `${r}px`), n.appendChild(l, c);
|
|
2383
2411
|
}
|
|
2384
2412
|
}
|
|
2385
|
-
class
|
|
2413
|
+
class lt {
|
|
2386
2414
|
constructor(e, t) {
|
|
2387
2415
|
this.columnIndex = e, this.sortState = t;
|
|
2388
2416
|
}
|
|
2389
2417
|
}
|
|
2390
|
-
class
|
|
2418
|
+
class nt {
|
|
2391
2419
|
constructor(e) {
|
|
2392
2420
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
2393
2421
|
}
|
|
@@ -2403,36 +2431,36 @@ class at {
|
|
|
2403
2431
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
2404
2432
|
const t = e.target, s = t.getAttribute("data-area"), o = t.getAttribute("data-row-index"), i = t.getAttribute("data-col-index");
|
|
2405
2433
|
if (s && o && i) {
|
|
2406
|
-
const r =
|
|
2407
|
-
this.tableScope.updateModelValueAfterEdit(r,
|
|
2434
|
+
const r = ne(s), l = Number(o), n = Number(i);
|
|
2435
|
+
this.tableScope.updateModelValueAfterEdit(r, l, n, t.value);
|
|
2408
2436
|
}
|
|
2409
2437
|
}
|
|
2410
2438
|
}
|
|
2411
2439
|
}
|
|
2412
|
-
class
|
|
2440
|
+
class ct {
|
|
2413
2441
|
constructor(e = -1, t = -1) {
|
|
2414
2442
|
this.rowIndex = e, this.columnIndex = t;
|
|
2415
2443
|
}
|
|
2416
2444
|
}
|
|
2417
|
-
class
|
|
2445
|
+
class de {
|
|
2418
2446
|
constructor(e) {
|
|
2419
2447
|
this.cells = e;
|
|
2420
2448
|
}
|
|
2421
2449
|
static createSingle(e, t) {
|
|
2422
|
-
return new
|
|
2450
|
+
return new de([new ct(e, t)]);
|
|
2423
2451
|
}
|
|
2424
2452
|
}
|
|
2425
|
-
class
|
|
2453
|
+
class dt {
|
|
2426
2454
|
constructor(e) {
|
|
2427
2455
|
var t, s;
|
|
2428
2456
|
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);
|
|
2429
2457
|
}
|
|
2430
2458
|
onMouseClicked(e, t) {
|
|
2431
|
-
var i, r, n,
|
|
2459
|
+
var i, r, l, n, d, c, h;
|
|
2432
2460
|
let s = !1, o = !1;
|
|
2433
2461
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
2434
|
-
const
|
|
2435
|
-
|
|
2462
|
+
const p = this.getSelectionModel(), u = this.getFocusModel();
|
|
2463
|
+
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 || (d = e.originalEvent) != null && d.metaKey) ? (p.removeSelection(A.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (c = e.originalEvent) != null && c.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));
|
|
2436
2464
|
}
|
|
2437
2465
|
return o ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
|
|
2438
2466
|
}
|
|
@@ -2483,7 +2511,7 @@ class ht {
|
|
|
2483
2511
|
};
|
|
2484
2512
|
}
|
|
2485
2513
|
}
|
|
2486
|
-
class
|
|
2514
|
+
class pt {
|
|
2487
2515
|
get() {
|
|
2488
2516
|
return {
|
|
2489
2517
|
f2: "START_EDITING",
|
|
@@ -2505,7 +2533,7 @@ class gt {
|
|
|
2505
2533
|
};
|
|
2506
2534
|
}
|
|
2507
2535
|
}
|
|
2508
|
-
class
|
|
2536
|
+
class gt {
|
|
2509
2537
|
constructor(e) {
|
|
2510
2538
|
this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
|
|
2511
2539
|
}
|
|
@@ -2526,7 +2554,7 @@ class ut {
|
|
|
2526
2554
|
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));
|
|
2527
2555
|
}
|
|
2528
2556
|
assignPredefinedSystemShortcutMappings() {
|
|
2529
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
2557
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new pt().get()) : Object.assign(this.shortcutActionIdMapping, new ht().get());
|
|
2530
2558
|
}
|
|
2531
2559
|
isMacintosh() {
|
|
2532
2560
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -2578,7 +2606,7 @@ class ut {
|
|
|
2578
2606
|
return this.shortcutActionIdMapping;
|
|
2579
2607
|
}
|
|
2580
2608
|
}
|
|
2581
|
-
class
|
|
2609
|
+
class me {
|
|
2582
2610
|
onCheckboxChanged(e) {
|
|
2583
2611
|
}
|
|
2584
2612
|
onContextmenu(e) {
|
|
@@ -2598,7 +2626,7 @@ class fe {
|
|
|
2598
2626
|
onFocusChanged(e) {
|
|
2599
2627
|
}
|
|
2600
2628
|
}
|
|
2601
|
-
class
|
|
2629
|
+
class Te {
|
|
2602
2630
|
setStyle(e, t, s) {
|
|
2603
2631
|
return e.style[t] = s, e;
|
|
2604
2632
|
}
|
|
@@ -2625,15 +2653,15 @@ class Re {
|
|
|
2625
2653
|
e.setAttribute(t, s);
|
|
2626
2654
|
}
|
|
2627
2655
|
}
|
|
2628
|
-
class
|
|
2629
|
-
render(e, t, s, o, i, r,
|
|
2656
|
+
class ft {
|
|
2657
|
+
render(e, t, s, o, i, r, l) {
|
|
2630
2658
|
if (i.isEditable(t, s)) {
|
|
2631
|
-
|
|
2632
|
-
const
|
|
2659
|
+
l.addClass(e, "ge-table-row-input-div");
|
|
2660
|
+
const n = i.getValueAt(t, s);
|
|
2633
2661
|
e.innerHTML = `
|
|
2634
2662
|
<input
|
|
2635
2663
|
type="text"
|
|
2636
|
-
value="${
|
|
2664
|
+
value="${n}"
|
|
2637
2665
|
autofocus
|
|
2638
2666
|
onfocus="this.setSelectionRange(0, this.value.length)"
|
|
2639
2667
|
data-listen="change"
|
|
@@ -2646,7 +2674,7 @@ class pt {
|
|
|
2646
2674
|
}
|
|
2647
2675
|
}
|
|
2648
2676
|
}
|
|
2649
|
-
class
|
|
2677
|
+
class ut {
|
|
2650
2678
|
constructor(e = "none", t = "single") {
|
|
2651
2679
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
|
|
2652
2680
|
}
|
|
@@ -2728,7 +2756,7 @@ class bt {
|
|
|
2728
2756
|
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());
|
|
2729
2757
|
}
|
|
2730
2758
|
}
|
|
2731
|
-
class
|
|
2759
|
+
class mt {
|
|
2732
2760
|
constructor(e = "none") {
|
|
2733
2761
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
2734
2762
|
}
|
|
@@ -2765,7 +2793,7 @@ class ft {
|
|
|
2765
2793
|
return [this.rowIndex, this.columnIndex];
|
|
2766
2794
|
}
|
|
2767
2795
|
}
|
|
2768
|
-
class
|
|
2796
|
+
class Re {
|
|
2769
2797
|
constructor(e = new I(
|
|
2770
2798
|
"❯",
|
|
2771
2799
|
"",
|
|
@@ -2779,17 +2807,17 @@ class Te {
|
|
|
2779
2807
|
}
|
|
2780
2808
|
// `⊖ `, `⊕ `;
|
|
2781
2809
|
}
|
|
2782
|
-
const
|
|
2810
|
+
const bt = new ut(), St = new mt("cell");
|
|
2783
2811
|
class De {
|
|
2784
2812
|
constructor() {
|
|
2785
2813
|
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 = {
|
|
2786
2814
|
header: 34,
|
|
2787
2815
|
body: 34,
|
|
2788
2816
|
footer: 34
|
|
2789
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Ae(), this.headerGroupOptions = new
|
|
2817
|
+
}, 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;
|
|
2790
2818
|
}
|
|
2791
2819
|
}
|
|
2792
|
-
const
|
|
2820
|
+
const $ = class $ {
|
|
2793
2821
|
/**
|
|
2794
2822
|
* Returns the content to be copied based on the provided table model, selection model, and focus model.
|
|
2795
2823
|
*
|
|
@@ -2805,21 +2833,21 @@ const P = class P {
|
|
|
2805
2833
|
const r = this.mergeRanges(t.getRanges());
|
|
2806
2834
|
if (r) {
|
|
2807
2835
|
r.c2 = Math.min(r.c2, e.getColumnCount() - 1), r.r2 = Math.min(r.r2, e.getBodyModel().getRowCount() - 1);
|
|
2808
|
-
const
|
|
2809
|
-
for (let
|
|
2810
|
-
const
|
|
2811
|
-
for (let
|
|
2812
|
-
const h = t.isSelected(
|
|
2813
|
-
|
|
2836
|
+
const l = [];
|
|
2837
|
+
for (let n = r.r1; n <= r.r2; n++) {
|
|
2838
|
+
const d = [];
|
|
2839
|
+
for (let c = r.c1; c <= r.c2; c++) {
|
|
2840
|
+
const h = t.isSelected(n, c) ? e.getBodyModel().getTextValueAt(n, c) : "";
|
|
2841
|
+
d.push(h);
|
|
2814
2842
|
}
|
|
2815
|
-
|
|
2843
|
+
l.push(d.join($.columnSeparatorChar));
|
|
2816
2844
|
}
|
|
2817
|
-
return o(
|
|
2845
|
+
return o(l.join($.rowSeparatorChar));
|
|
2818
2846
|
}
|
|
2819
2847
|
}
|
|
2820
2848
|
if (s) {
|
|
2821
|
-
const [r,
|
|
2822
|
-
return o(
|
|
2849
|
+
const [r, l] = s.getFocus(), n = e.getBodyModel().getTextValueAt(r, l);
|
|
2850
|
+
return o(n);
|
|
2823
2851
|
}
|
|
2824
2852
|
i("Cannot copy, neither selection nor focus defined.");
|
|
2825
2853
|
});
|
|
@@ -2848,9 +2876,9 @@ const P = class P {
|
|
|
2848
2876
|
t,
|
|
2849
2877
|
s
|
|
2850
2878
|
).then((r) => {
|
|
2851
|
-
r && this.copyContent(r).then((
|
|
2879
|
+
r && this.copyContent(r).then((l) => {
|
|
2852
2880
|
o(r);
|
|
2853
|
-
}).catch((
|
|
2881
|
+
}).catch((l) => {
|
|
2854
2882
|
i();
|
|
2855
2883
|
});
|
|
2856
2884
|
}).catch((r) => {
|
|
@@ -2871,30 +2899,136 @@ const P = class P {
|
|
|
2871
2899
|
return t;
|
|
2872
2900
|
}
|
|
2873
2901
|
};
|
|
2874
|
-
|
|
2902
|
+
$.columnSeparatorChar = " ", $.rowSeparatorChar = `
|
|
2875
2903
|
`;
|
|
2876
|
-
let
|
|
2904
|
+
let X = $;
|
|
2877
2905
|
class yt {
|
|
2878
|
-
constructor(e) {
|
|
2879
|
-
this.tableScope = e, new ResizeObserver(
|
|
2906
|
+
constructor(e, t = 500) {
|
|
2907
|
+
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(Ke(this.handleResize.bind(this), t)).observe(this.tableScope.hostElement);
|
|
2880
2908
|
}
|
|
2881
2909
|
handleResize(e) {
|
|
2882
2910
|
const t = e[0], { width: s } = t.contentRect;
|
|
2883
2911
|
this.tableScope.recalcColumnWidths(s);
|
|
2884
2912
|
}
|
|
2885
2913
|
}
|
|
2886
|
-
class
|
|
2887
|
-
|
|
2914
|
+
class xt {
|
|
2915
|
+
/**
|
|
2916
|
+
* Downloads a matrix data as an Excel file.
|
|
2917
|
+
*
|
|
2918
|
+
* @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.
|
|
2919
|
+
* @param {string} [filename='file.xlsx'] - The name of the Excel file to be downloaded. Defaults to 'file.xlsx'.
|
|
2920
|
+
* @param {string} [author=''] - The author's name to include as metadata in the Excel file. Optional parameter.
|
|
2921
|
+
* @return {void} Does not return a value.
|
|
2922
|
+
* @throws {Error} Throws an error if the input matrix is not a valid 2D array or if the filename is an empty string.
|
|
2923
|
+
*/
|
|
2924
|
+
downloadExcel(e, t = "file.xlsx", s = "") {
|
|
2925
|
+
if (!Array.isArray(e) || e.some((o) => !Array.isArray(o)))
|
|
2926
|
+
throw new Error("Invalid matrix format. Expected a 2D array.");
|
|
2927
|
+
if ((t == null ? void 0 : t.trim()) === "")
|
|
2928
|
+
throw new Error("Invalid filename. Filename must be a non-empty string.");
|
|
2929
|
+
try {
|
|
2930
|
+
const o = this.generateBuffer(e, s), i = new Blob([o], {
|
|
2931
|
+
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
2932
|
+
}), r = document.createElement("a");
|
|
2933
|
+
r.href = URL.createObjectURL(i), r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r);
|
|
2934
|
+
} catch (o) {
|
|
2935
|
+
throw console.error("Error generating Excel file:", o), new Error("Failed to download Excel file.");
|
|
2936
|
+
}
|
|
2937
|
+
}
|
|
2938
|
+
generateMap(e, t = "") {
|
|
2939
|
+
const s = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2940
|
+
<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"?>
|
|
2941
|
+
<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"?>
|
|
2942
|
+
<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"?>
|
|
2943
|
+
<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"?>
|
|
2944
|
+
<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"?>
|
|
2945
|
+
<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>`, d = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2946
|
+
<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>`, c = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2947
|
+
<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"?>
|
|
2948
|
+
<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();
|
|
2949
|
+
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", d), p.set("xl/workbook.xml", c), p.set("[Content_Types].xml", h), p;
|
|
2950
|
+
}
|
|
2951
|
+
getX1WorksheetsSheet1Xml(e) {
|
|
2952
|
+
const t = [];
|
|
2953
|
+
t.push(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2954
|
+
<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}">
|
|
2955
|
+
<dimension ref="A1:B3"/>
|
|
2956
|
+
<sheetViews>
|
|
2957
|
+
<sheetView tabSelected="1" workbookViewId="0"/></sheetViews>
|
|
2958
|
+
<sheetFormatPr baseColWidth="10" defaultRowHeight="16" x14ac:dyDescent="0.2"/>
|
|
2959
|
+
<sheetData>`);
|
|
2960
|
+
for (let s = 0; s < e.length; s++) {
|
|
2961
|
+
const o = e[s];
|
|
2962
|
+
t.push('<row r="${r + 1}" spans="1:2" x14ac:dyDescent="0.2">');
|
|
2963
|
+
for (let i = 0; i < o.length; i++) {
|
|
2964
|
+
const r = o[i], l = this.getCellAddress(s, i);
|
|
2965
|
+
if (typeof r == "number")
|
|
2966
|
+
t.push(`<c r="${l}"><v>${r}</v></c>`);
|
|
2967
|
+
else if (r instanceof Date) {
|
|
2968
|
+
const n = r;
|
|
2969
|
+
t.push(`<c r="${l}" t="inlineStr"><is><t>${n.toISOString()}</t></is></c>`);
|
|
2970
|
+
} else {
|
|
2971
|
+
const n = r != null ? this.escapeXml(String(r)) : "";
|
|
2972
|
+
t.push(`<c r="${l}" t="inlineStr"><is><t>${n}</t></is></c>`);
|
|
2973
|
+
}
|
|
2974
|
+
}
|
|
2975
|
+
t.push("</row>");
|
|
2976
|
+
}
|
|
2977
|
+
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(`
|
|
2978
|
+
`);
|
|
2979
|
+
}
|
|
2980
|
+
escapeXml(e) {
|
|
2981
|
+
return e == null ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2982
|
+
}
|
|
2983
|
+
getCellAddress(e, t) {
|
|
2984
|
+
const s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
2985
|
+
let o = "";
|
|
2986
|
+
for (; t >= 0; )
|
|
2987
|
+
o = s[t % 26] + o, t = Math.floor(t / 26) - 1;
|
|
2988
|
+
return `${o}${e + 1}`;
|
|
2989
|
+
}
|
|
2990
|
+
createZip(e) {
|
|
2991
|
+
const t = [];
|
|
2992
|
+
let s = 0;
|
|
2993
|
+
const o = [];
|
|
2994
|
+
e.forEach((h, p) => {
|
|
2995
|
+
const u = new TextEncoder().encode(p), g = new TextEncoder().encode(h), b = new Uint8Array(30 + u.length), f = new DataView(b.buffer);
|
|
2996
|
+
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({
|
|
2997
|
+
path: p,
|
|
2998
|
+
offset: s,
|
|
2999
|
+
contentSize: g.length
|
|
3000
|
+
}), s += b.length + g.length;
|
|
3001
|
+
});
|
|
3002
|
+
const i = s;
|
|
3003
|
+
o.forEach((h) => {
|
|
3004
|
+
const p = new TextEncoder().encode(h.path), u = new Uint8Array(46 + p.length), g = new DataView(u.buffer);
|
|
3005
|
+
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;
|
|
3006
|
+
});
|
|
3007
|
+
const r = new Uint8Array(22), l = new DataView(r.buffer);
|
|
3008
|
+
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);
|
|
3009
|
+
const n = t.reduce((h, p) => h + p.length, 0), d = new Uint8Array(n);
|
|
3010
|
+
let c = 0;
|
|
3011
|
+
for (const h of t)
|
|
3012
|
+
d.set(h, c), c += h.length;
|
|
3013
|
+
return d;
|
|
3014
|
+
}
|
|
3015
|
+
generateBuffer(e, t = "") {
|
|
3016
|
+
const s = this.generateMap(e, t);
|
|
3017
|
+
return this.createZip(s);
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
class he extends at {
|
|
3021
|
+
constructor(e, t, s, o, i, r = new X(), l = new xt()) {
|
|
2888
3022
|
var c;
|
|
2889
|
-
if (super(e, t, new
|
|
2890
|
-
const
|
|
2891
|
-
|
|
3023
|
+
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()), (c = this.tableOptions) != null && c.autoRestoreOptions) {
|
|
3024
|
+
const h = this.tableOptions.autoRestoreOptions, p = h.getStorageKeyFn;
|
|
3025
|
+
p && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Qe(p)), h.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new tt(p)), h.autoRestoreSortingState && (this.storeSortingService = new st(p)));
|
|
2892
3026
|
}
|
|
2893
|
-
this.mouseHandler = new
|
|
3027
|
+
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);
|
|
2894
3028
|
const n = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
2895
3029
|
n && n.addEventSelectionChangedListener(this);
|
|
2896
|
-
const
|
|
2897
|
-
|
|
3030
|
+
const d = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
3031
|
+
d && d.addEventFocusChangedListener(this);
|
|
2898
3032
|
}
|
|
2899
3033
|
/**
|
|
2900
3034
|
* Creates a TableScope instance.
|
|
@@ -2908,7 +3042,7 @@ class he extends rt {
|
|
|
2908
3042
|
*
|
|
2909
3043
|
* @return {TableScope} - The newly created TableScope instance.
|
|
2910
3044
|
*/
|
|
2911
|
-
static create(e, t, s = new De(), o = new
|
|
3045
|
+
static create(e, t, s = new De(), o = new me(), i = new Te(), r = new X()) {
|
|
2912
3046
|
return new he(e, t, i, s, o, r);
|
|
2913
3047
|
}
|
|
2914
3048
|
/**
|
|
@@ -2937,7 +3071,7 @@ class he extends rt {
|
|
|
2937
3071
|
return !1;
|
|
2938
3072
|
}
|
|
2939
3073
|
updateModelValueAfterEdit(e, t, s, o) {
|
|
2940
|
-
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, o) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(
|
|
3074
|
+
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, o) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(de.createSingle(t, s)), this.hostElement.focus());
|
|
2941
3075
|
}
|
|
2942
3076
|
/**
|
|
2943
3077
|
* Retrieves the TableApi object.
|
|
@@ -2966,7 +3100,7 @@ class he extends rt {
|
|
|
2966
3100
|
* @return {GeMouseEvent} - The created GeMouseEvent object.
|
|
2967
3101
|
*/
|
|
2968
3102
|
createGeMouseEvent(e) {
|
|
2969
|
-
const t = new
|
|
3103
|
+
const t = new le();
|
|
2970
3104
|
if (t.originalEvent = e, e) {
|
|
2971
3105
|
const s = e.target;
|
|
2972
3106
|
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) {
|
|
@@ -3036,7 +3170,7 @@ class he extends rt {
|
|
|
3036
3170
|
toggleExpandCollapseAll(e = !0) {
|
|
3037
3171
|
var s;
|
|
3038
3172
|
const t = this.tableModel.getBodyModel();
|
|
3039
|
-
|
|
3173
|
+
re(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
|
|
3040
3174
|
}
|
|
3041
3175
|
/**
|
|
3042
3176
|
* Toggles the checkbox state of a specific row in a table.
|
|
@@ -3048,11 +3182,11 @@ class he extends rt {
|
|
|
3048
3182
|
* @return {void} - This method does not return anything.
|
|
3049
3183
|
*/
|
|
3050
3184
|
toggleRowCheckbox(e, t, s) {
|
|
3051
|
-
var
|
|
3185
|
+
var n;
|
|
3052
3186
|
const o = this.tableModel.getAreaModel(s), i = o.isRowChecked(e), r = i === void 0 || i === "semi" || i === "none";
|
|
3053
3187
|
o.setRowChecked(e, r), this.repaint();
|
|
3054
|
-
const
|
|
3055
|
-
this.eventListener.onCheckboxChanged(
|
|
3188
|
+
const l = (n = o.rowSelectionModel) == null ? void 0 : n.getCheckedRows();
|
|
3189
|
+
this.eventListener.onCheckboxChanged(l || []);
|
|
3056
3190
|
}
|
|
3057
3191
|
/**
|
|
3058
3192
|
* Handle mouse click events.
|
|
@@ -3106,8 +3240,8 @@ class he extends rt {
|
|
|
3106
3240
|
const o = this.tableModel.getColumnDef(s);
|
|
3107
3241
|
if (o != null && o.sortable && o.sortable()) {
|
|
3108
3242
|
e.preventDefault(), e.stopPropagation();
|
|
3109
|
-
const
|
|
3110
|
-
this.tableModel.doSort([
|
|
3243
|
+
const l = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, n = o.sortState ?? "", d = l[(l.indexOf(n) + 1) % l.length], c = new lt(s, d);
|
|
3244
|
+
this.tableModel.doSort([c]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((p) => p.sortState = ""), o.sortState = d), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([c]);
|
|
3111
3245
|
}
|
|
3112
3246
|
}
|
|
3113
3247
|
/**
|
|
@@ -3252,29 +3386,29 @@ class he extends rt {
|
|
|
3252
3386
|
const s = this.tableOptions.autoRestoreOptions, o = s.getRowId;
|
|
3253
3387
|
if (s.autoRestoreCollapsedExpandedState && o) {
|
|
3254
3388
|
const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
|
|
3255
|
-
if (
|
|
3256
|
-
const
|
|
3257
|
-
for (let
|
|
3258
|
-
const
|
|
3259
|
-
if (
|
|
3389
|
+
if (re(r)) {
|
|
3390
|
+
const l = r, n = r.getRowCount();
|
|
3391
|
+
for (let d = 0; d < n; d++) {
|
|
3392
|
+
const c = r.getRowByIndex(d);
|
|
3393
|
+
if (c)
|
|
3260
3394
|
if (i.allExpanded)
|
|
3261
|
-
|
|
3395
|
+
c.expanded = !0;
|
|
3262
3396
|
else if (i.allCollapsed)
|
|
3263
|
-
|
|
3397
|
+
c.expanded = !1;
|
|
3264
3398
|
else {
|
|
3265
|
-
const h = o(
|
|
3266
|
-
i.mode === "expanded" ?
|
|
3399
|
+
const h = o(c.data);
|
|
3400
|
+
i.mode === "expanded" ? c.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h) : i.mode === "collapsed" && (c.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h));
|
|
3267
3401
|
}
|
|
3268
3402
|
}
|
|
3269
|
-
|
|
3403
|
+
l.recalcVisibleTreeRows();
|
|
3270
3404
|
}
|
|
3271
3405
|
}
|
|
3272
3406
|
}
|
|
3273
3407
|
}
|
|
3274
3408
|
}
|
|
3275
|
-
const
|
|
3409
|
+
const K = class K {
|
|
3276
3410
|
};
|
|
3277
|
-
|
|
3411
|
+
K.themes = ["light", "combat", "paper", "blackboard"], K.vars = {
|
|
3278
3412
|
light: `html[data-theme="light"] {
|
|
3279
3413
|
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
3280
3414
|
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
@@ -3508,18 +3642,18 @@ Y.themes = ["light", "combat", "paper", "blackboard"], Y.vars = {
|
|
|
3508
3642
|
--ge-table-drop-zone-bg: #758129;
|
|
3509
3643
|
}`
|
|
3510
3644
|
};
|
|
3511
|
-
let
|
|
3512
|
-
const
|
|
3513
|
-
constructor(e = new
|
|
3645
|
+
let be = K;
|
|
3646
|
+
const Y = class Y {
|
|
3647
|
+
constructor(e = new Re()) {
|
|
3514
3648
|
this.headerGroupOptions = e;
|
|
3515
3649
|
}
|
|
3516
|
-
render(e, t, s, o, i, r,
|
|
3517
|
-
const
|
|
3650
|
+
render(e, t, s, o, i, r, l) {
|
|
3651
|
+
const n = r != null && r.data ? r.data : "";
|
|
3518
3652
|
if (r) {
|
|
3519
|
-
const { toggle:
|
|
3520
|
-
this.addText(e, o, t, s,
|
|
3653
|
+
const { toggle: d, visibility: c, closed: h } = r, p = d ? Y.toggleHeaderGroup : "";
|
|
3654
|
+
this.addText(e, o, t, s, n, p), d && c !== "always" && this.addArrowDiv(l, e, !h, t, s, o, p);
|
|
3521
3655
|
} else
|
|
3522
|
-
this.addText(e, o, t, s,
|
|
3656
|
+
this.addText(e, o, t, s, n, "");
|
|
3523
3657
|
}
|
|
3524
3658
|
addText(e, t, s, o, i, r) {
|
|
3525
3659
|
e.innerHTML = `<span
|
|
@@ -3529,113 +3663,113 @@ const U = class U {
|
|
|
3529
3663
|
data-col-index="${o}"
|
|
3530
3664
|
>${i}</span>`;
|
|
3531
3665
|
}
|
|
3532
|
-
addArrowDiv(e, t, s = !0, o = -1, i = -1, r = "header",
|
|
3533
|
-
const
|
|
3534
|
-
e.addClass(
|
|
3535
|
-
let
|
|
3536
|
-
s ?
|
|
3537
|
-
const
|
|
3538
|
-
e.appendChild(
|
|
3539
|
-
for (const
|
|
3540
|
-
e.addClass(
|
|
3541
|
-
return e.appendChild(t,
|
|
3666
|
+
addArrowDiv(e, t, s = !0, o = -1, i = -1, r = "header", l) {
|
|
3667
|
+
const n = e.createElement("div");
|
|
3668
|
+
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}`);
|
|
3669
|
+
let d;
|
|
3670
|
+
s ? d = this.headerGroupOptions.iconExpanded : d = this.headerGroupOptions.iconCollapsed;
|
|
3671
|
+
const c = d.content, h = e.createText(c);
|
|
3672
|
+
e.appendChild(n, h), d.style && this.applyStyleString(e, n, d.style);
|
|
3673
|
+
for (const p of d.classes)
|
|
3674
|
+
e.addClass(n, p);
|
|
3675
|
+
return e.appendChild(t, n), n;
|
|
3542
3676
|
}
|
|
3543
3677
|
applyStyleString(e, t, s) {
|
|
3544
3678
|
const o = s.split(";").map((i) => i.trim()).filter((i) => i);
|
|
3545
3679
|
for (const i of o) {
|
|
3546
|
-
const [r,
|
|
3547
|
-
e.setStyle(t, r.trim(),
|
|
3680
|
+
const [r, l] = i.split(":");
|
|
3681
|
+
e.setStyle(t, r.trim(), l.trim());
|
|
3548
3682
|
}
|
|
3549
3683
|
}
|
|
3550
3684
|
};
|
|
3551
|
-
|
|
3552
|
-
let
|
|
3553
|
-
var vt = /* @__PURE__ */
|
|
3554
|
-
const
|
|
3685
|
+
Y.toggleHeaderGroup = "toggleHeaderGroup";
|
|
3686
|
+
let Se = Y;
|
|
3687
|
+
var vt = /* @__PURE__ */ Ue("<div>");
|
|
3688
|
+
const Et = (a) => {
|
|
3555
3689
|
let e;
|
|
3556
3690
|
const t = Ee({
|
|
3557
3691
|
tableModel: null,
|
|
3558
3692
|
tableOptions: new De()
|
|
3559
|
-
},
|
|
3560
|
-
return
|
|
3693
|
+
}, a);
|
|
3694
|
+
return Oe(() => {
|
|
3561
3695
|
const s = {
|
|
3562
3696
|
onSelectionChanged(r) {
|
|
3563
|
-
const
|
|
3697
|
+
const l = new CustomEvent("selectionChanged", {
|
|
3564
3698
|
detail: r,
|
|
3565
3699
|
bubbles: !0
|
|
3566
3700
|
});
|
|
3567
|
-
e && e.dispatchEvent(
|
|
3701
|
+
e && e.dispatchEvent(l);
|
|
3568
3702
|
},
|
|
3569
3703
|
onFocusChanged(r) {
|
|
3570
|
-
const
|
|
3704
|
+
const l = new CustomEvent("focusChanged", {
|
|
3571
3705
|
detail: r,
|
|
3572
3706
|
bubbles: !0
|
|
3573
3707
|
});
|
|
3574
|
-
e && e.dispatchEvent(
|
|
3708
|
+
e && e.dispatchEvent(l);
|
|
3575
3709
|
},
|
|
3576
3710
|
onCheckboxChanged: (r) => {
|
|
3577
|
-
const
|
|
3711
|
+
const l = new CustomEvent("checkboxChanged", {
|
|
3578
3712
|
detail: r,
|
|
3579
3713
|
bubbles: !0
|
|
3580
3714
|
});
|
|
3581
|
-
e && e.dispatchEvent(
|
|
3715
|
+
e && e.dispatchEvent(l);
|
|
3582
3716
|
},
|
|
3583
3717
|
onContextmenu: (r) => {
|
|
3584
|
-
const
|
|
3718
|
+
const l = new CustomEvent("contextmenu", {
|
|
3585
3719
|
detail: r,
|
|
3586
3720
|
bubbles: !0
|
|
3587
3721
|
});
|
|
3588
|
-
e && e.dispatchEvent(
|
|
3722
|
+
e && e.dispatchEvent(l);
|
|
3589
3723
|
},
|
|
3590
3724
|
onModelChanged: (r) => {
|
|
3591
|
-
const
|
|
3725
|
+
const l = new CustomEvent("modelChanged", {
|
|
3592
3726
|
detail: r,
|
|
3593
3727
|
bubbles: !0
|
|
3594
3728
|
});
|
|
3595
|
-
e && e.dispatchEvent(
|
|
3729
|
+
e && e.dispatchEvent(l);
|
|
3596
3730
|
},
|
|
3597
3731
|
onMouseClicked: (r) => {
|
|
3598
|
-
const
|
|
3732
|
+
const l = new CustomEvent("mouseClicked", {
|
|
3599
3733
|
detail: r,
|
|
3600
3734
|
bubbles: !0
|
|
3601
3735
|
});
|
|
3602
|
-
e && e.dispatchEvent(
|
|
3736
|
+
e && e.dispatchEvent(l);
|
|
3603
3737
|
},
|
|
3604
3738
|
onMouseDragging: (r) => {
|
|
3605
|
-
const
|
|
3739
|
+
const l = new CustomEvent("mouseDragging", {
|
|
3606
3740
|
detail: r,
|
|
3607
3741
|
bubbles: !0
|
|
3608
3742
|
});
|
|
3609
|
-
e && e.dispatchEvent(
|
|
3743
|
+
e && e.dispatchEvent(l);
|
|
3610
3744
|
},
|
|
3611
3745
|
onMouseDraggingEnd: (r) => {
|
|
3612
|
-
const
|
|
3746
|
+
const l = new CustomEvent("mouseDraggingEnd", {
|
|
3613
3747
|
detail: r,
|
|
3614
3748
|
bubbles: !0
|
|
3615
3749
|
});
|
|
3616
|
-
e && e.dispatchEvent(
|
|
3750
|
+
e && e.dispatchEvent(l);
|
|
3617
3751
|
},
|
|
3618
3752
|
onMouseMoved: (r) => {
|
|
3619
|
-
const
|
|
3753
|
+
const l = new CustomEvent("mouseMoved", {
|
|
3620
3754
|
detail: r,
|
|
3621
3755
|
bubbles: !0
|
|
3622
3756
|
});
|
|
3623
|
-
e && e.dispatchEvent(
|
|
3757
|
+
e && e.dispatchEvent(l);
|
|
3624
3758
|
}
|
|
3625
|
-
}, o = new he(e, t.tableModel, new
|
|
3759
|
+
}, o = new he(e, t.tableModel, new Te(), t.tableOptions, s);
|
|
3626
3760
|
o.firstInit();
|
|
3627
3761
|
const i = new CustomEvent("tableReady", {
|
|
3628
3762
|
detail: o.getApi(),
|
|
3629
3763
|
bubbles: !0
|
|
3630
3764
|
});
|
|
3631
|
-
e && e.dispatchEvent(i), t.licenseKey &&
|
|
3765
|
+
e && e.dispatchEvent(i), t.licenseKey && B.getInstance().setLicenseKey(t.licenseKey);
|
|
3632
3766
|
}), (() => {
|
|
3633
3767
|
var s = vt(), o = e;
|
|
3634
|
-
return typeof o == "function" ?
|
|
3768
|
+
return typeof o == "function" ? je(o, s) : e = s, s;
|
|
3635
3769
|
})();
|
|
3636
3770
|
};
|
|
3637
3771
|
export {
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3772
|
+
Ct as ComponentRendererWrapper,
|
|
3773
|
+
Et as GuiexpertTable,
|
|
3774
|
+
wt as GuiexpertTableProps
|
|
3641
3775
|
};
|