@guiexpert/solid-table 1.0.24 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +23 -7
- package/index.js +737 -604
- 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 c =
|
|
283
|
-
const d =
|
|
281
|
+
const n = Object.getOwnPropertyNames(l);
|
|
282
|
+
for (let c = n.length - 1; c >= 0; c--) {
|
|
283
|
+
const d = n[c];
|
|
284
284
|
if (d === "__proto__" || d === "constructor")
|
|
285
285
|
continue;
|
|
286
|
-
const h = Object.getOwnPropertyDescriptor(
|
|
286
|
+
const h = Object.getOwnPropertyDescriptor(l, d);
|
|
287
287
|
if (!s[d])
|
|
288
288
|
s[d] = h.get ? {
|
|
289
289
|
enumerable: !0,
|
|
290
290
|
configurable: !0,
|
|
291
|
-
get:
|
|
291
|
+
get: Ge.bind(t[d] = [h.get.bind(l)])
|
|
292
292
|
} : h.value !== void 0 ? h : void 0;
|
|
293
293
|
else {
|
|
294
|
-
const
|
|
295
|
-
|
|
294
|
+
const p = t[d];
|
|
295
|
+
p && (h.get ? p.push(h.get.bind(l)) : h.value !== void 0 && p.push(() => h.value));
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
const o = {}, i = Object.keys(s);
|
|
300
300
|
for (let r = i.length - 1; r >= 0; r--) {
|
|
301
|
-
const
|
|
302
|
-
|
|
301
|
+
const l = i[r], n = s[l];
|
|
302
|
+
n && n.get ? Object.defineProperty(o, l, n) : o[l] = n ? n.value : void 0;
|
|
303
303
|
}
|
|
304
304
|
return o;
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
let s = t.length, o = e.length, i = s, r = 0,
|
|
308
|
-
for (; r < o ||
|
|
309
|
-
if (e[r] === t[
|
|
310
|
-
r++,
|
|
306
|
+
function _e(a, e, t) {
|
|
307
|
+
let s = t.length, o = e.length, i = s, r = 0, l = 0, n = e[o - 1].nextSibling, c = null;
|
|
308
|
+
for (; r < o || l < i; ) {
|
|
309
|
+
if (e[r] === t[l]) {
|
|
310
|
+
r++, l++;
|
|
311
311
|
continue;
|
|
312
312
|
}
|
|
313
313
|
for (; e[o - 1] === t[i - 1]; )
|
|
314
314
|
o--, i--;
|
|
315
315
|
if (o === r) {
|
|
316
|
-
const d = i < s ?
|
|
317
|
-
for (;
|
|
318
|
-
|
|
319
|
-
} else if (i ===
|
|
316
|
+
const d = i < s ? l ? t[l - 1].nextSibling : t[i - l] : n;
|
|
317
|
+
for (; l < i; )
|
|
318
|
+
a.insertBefore(t[l++], d);
|
|
319
|
+
} else if (i === l)
|
|
320
320
|
for (; r < o; )
|
|
321
321
|
(!c || !c.has(e[r])) && e[r].remove(), r++;
|
|
322
|
-
else if (e[r] === t[i - 1] && t[
|
|
322
|
+
else if (e[r] === t[i - 1] && t[l] === e[o - 1]) {
|
|
323
323
|
const d = e[--o].nextSibling;
|
|
324
|
-
|
|
324
|
+
a.insertBefore(t[l++], e[r++].nextSibling), a.insertBefore(t[--i], d), e[o] = t[i];
|
|
325
325
|
} else {
|
|
326
326
|
if (!c) {
|
|
327
327
|
c = /* @__PURE__ */ new Map();
|
|
328
|
-
let h =
|
|
328
|
+
let h = l;
|
|
329
329
|
for (; h < i; )
|
|
330
330
|
c.set(t[h], h++);
|
|
331
331
|
}
|
|
332
332
|
const d = c.get(e[r]);
|
|
333
333
|
if (d != null)
|
|
334
|
-
if (
|
|
335
|
-
let h = r,
|
|
336
|
-
for (; ++h < o && h < i && !((
|
|
337
|
-
|
|
338
|
-
if (
|
|
339
|
-
const
|
|
340
|
-
for (;
|
|
341
|
-
|
|
334
|
+
if (l < d && d < i) {
|
|
335
|
+
let h = r, p = 1, u;
|
|
336
|
+
for (; ++h < o && h < i && !((u = c.get(e[h])) == null || u !== d + p); )
|
|
337
|
+
p++;
|
|
338
|
+
if (p > d - l) {
|
|
339
|
+
const g = e[r];
|
|
340
|
+
for (; l < d; )
|
|
341
|
+
a.insertBefore(t[l++], g);
|
|
342
342
|
} else
|
|
343
|
-
|
|
343
|
+
a.replaceChild(t[l++], e[r++]);
|
|
344
344
|
} else
|
|
345
345
|
r++;
|
|
346
346
|
else
|
|
@@ -348,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 ((c = typeof
|
|
425
|
-
|
|
426
|
-
else if (Array.isArray(
|
|
427
|
-
o = oe(l, n
|
|
422
|
+
let l = e[i], n = t && t[i], c;
|
|
423
|
+
if (!(l == null || l === !0 || l === !1))
|
|
424
|
+
if ((c = typeof l) == "object" && l.nodeType)
|
|
425
|
+
a.push(l);
|
|
426
|
+
else if (Array.isArray(l))
|
|
427
|
+
o = oe(a, l, n) || o;
|
|
428
428
|
else if (c === "function")
|
|
429
429
|
if (s) {
|
|
430
|
-
for (; typeof
|
|
431
|
-
|
|
432
|
-
o = oe(
|
|
430
|
+
for (; typeof l == "function"; )
|
|
431
|
+
l = l();
|
|
432
|
+
o = oe(a, Array.isArray(l) ? l : [l], Array.isArray(n) ? n : [n]) || o;
|
|
433
433
|
} else
|
|
434
|
-
|
|
434
|
+
a.push(l), o = !0;
|
|
435
435
|
else {
|
|
436
|
-
const d = String(
|
|
437
|
-
|
|
436
|
+
const d = String(l);
|
|
437
|
+
n && n.nodeType === 3 && n.data === d ? a.push(n) : a.push(document.createTextNode(d));
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
return o;
|
|
441
441
|
}
|
|
442
|
-
function
|
|
442
|
+
function ue(a, e, t = null) {
|
|
443
443
|
for (let s = 0, o = e.length; s < o; s++)
|
|
444
|
-
|
|
444
|
+
a.insertBefore(e[s], t);
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function P(a, e, t, s) {
|
|
447
447
|
if (t === void 0)
|
|
448
|
-
return
|
|
448
|
+
return a.textContent = "";
|
|
449
449
|
const o = s || document.createTextNode("");
|
|
450
450
|
if (e.length) {
|
|
451
451
|
let i = !1;
|
|
452
452
|
for (let r = e.length - 1; r >= 0; r--) {
|
|
453
|
-
const
|
|
454
|
-
if (o !==
|
|
455
|
-
const
|
|
456
|
-
!i && !r ?
|
|
453
|
+
const l = e[r];
|
|
454
|
+
if (o !== l) {
|
|
455
|
+
const n = l.parentNode === a;
|
|
456
|
+
!i && !r ? n ? a.replaceChild(o, l) : a.insertBefore(o, t) : n && l.remove();
|
|
457
457
|
} else
|
|
458
458
|
i = !0;
|
|
459
459
|
}
|
|
460
460
|
} else
|
|
461
|
-
|
|
461
|
+
a.insertBefore(o, t);
|
|
462
462
|
return [o];
|
|
463
463
|
}
|
|
464
|
-
class
|
|
464
|
+
class Ct {
|
|
465
465
|
constructor(e) {
|
|
466
466
|
this.code = e;
|
|
467
467
|
}
|
|
468
|
-
render(e, t, s, o, i, r,
|
|
469
|
-
const
|
|
468
|
+
render(e, t, s, o, i, r, l) {
|
|
469
|
+
const n = Ee({
|
|
470
470
|
rowIndex: t,
|
|
471
471
|
columnIndex: s,
|
|
472
472
|
areaIdent: o,
|
|
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, c = 0, d = 0, h = "") {
|
|
526
|
+
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = o, this.areaIdent = i, this.sideIdent = r, this.originalEvent = l, this.clickCount = n, this.draggingX = c, this.draggingY = d, this.action = h;
|
|
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(
|
|
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
651
|
const c = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
652
|
-
this.domService.addClass(
|
|
652
|
+
this.domService.addClass(n, `ge-table-row-${c}`);
|
|
653
653
|
}
|
|
654
|
-
if (this.domService.setStyle(
|
|
654
|
+
if (this.domService.setStyle(n, "display", "clip"), this.domService.setStyle(n, "position", "absolute"), this.domService.setStyle(n, "left", `${t.left}px`), this.domService.setStyle(n, "top", `${t.top}px`), this.domService.setStyle(n, "width", `${t.width}px`), this.domService.setStyle(n, "height", `${t.height}px`), this.domService.setAttribute(n, "data-row-index", `${s}`), this.domService.setAttribute(n, "data-area", `${o}`), r) {
|
|
655
655
|
const c = this.domService.createText(r);
|
|
656
|
-
this.domService.appendChild(
|
|
656
|
+
this.domService.appendChild(n, c);
|
|
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: c, tableOptions: d, checkedType: h = void 0, sortState: p } = e, u = d == null ? void 0 : d.treeOptions, g = d == null ? void 0 : d.showCheckboxWihoutExtraColumn, b = this.domService.createElement("div");
|
|
662
|
+
this.domService.addClass(b, "ge-table-col-div"), g && this.domService.addClass(b, "ge-with-checkbox"), this.domService.addClass(b, `ge-table-col-div-${s.index}`), this.domService.setAttribute(b, "data-col-index", `${s.index}`), this.domService.setAttribute(b, "data-row-index", `${o}`), this.domService.setAttribute(b, "data-area", `${r}`);
|
|
663
|
+
const f = ((s == null ? void 0 : s.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
664
|
+
if (r === "body" && l === "center" && this.domService.addClass(b, `ge-table-column-${f}`), this.domService.setStyle(b, "display", "clip"), this.domService.setStyle(b, "position", "absolute"), this.domService.setStyle(b, "left", `${s.left}px`), this.domService.setStyle(b, "top", `${s.top}px`), this.domService.setStyle(b, "width", `${s.width}px`), this.domService.setStyle(b, "height", `${s.height}px`), c && c !== "none" && (this.domService.addClass(b, "ge-table-col-tree"), this.addArrowDiv(b, c, u, o, i, r)), g && i === 0 && h && this.addCheckboxToDiv(b, h, r, o), n) {
|
|
665
|
+
const m = c !== "none" && i === 0;
|
|
666
|
+
this.addLabelDiv(b, n, m, o, i, r);
|
|
667
667
|
}
|
|
668
|
-
return
|
|
668
|
+
return p && this.addSortedIcon(b, p, d == null ? void 0 : d.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(
|
|
688
|
+
const n = this.domService.createElement("div");
|
|
689
|
+
this.domService.appendChild(l, n);
|
|
690
690
|
const c = this.domService.createText(t);
|
|
691
|
-
this.domService.addClass(
|
|
691
|
+
this.domService.addClass(n, "ge-table-label"), this.domService.appendChild(n, c), this.domService.setAttribute(n, "data-row-index", `${o}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${r}`);
|
|
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,
|
|
700
|
+
const l = r.content, n = this.domService.createText(l);
|
|
701
|
+
this.domService.appendChild(i, n), r.style && this.applyStyleString(i, r.style);
|
|
702
702
|
for (const c of r.classes)
|
|
703
703
|
this.domService.addClass(i, c);
|
|
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 c =
|
|
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 c = n.content, d = this.domService.createText(c);
|
|
712
|
+
this.domService.appendChild(l, d), n.style && this.applyStyleString(l, n.style);
|
|
713
|
+
for (const h of n.classes)
|
|
714
|
+
this.domService.addClass(l, h);
|
|
715
|
+
return this.domService.appendChild(e, l), l;
|
|
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 c =
|
|
837
|
-
c.expanded = !c.expanded, "recalcVisibleTreeRows" in
|
|
836
|
+
const c = n;
|
|
837
|
+
c.expanded = !c.expanded, "recalcVisibleTreeRows" in l && l.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(c);
|
|
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
|
-
c ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(h) : d && ((
|
|
865
|
+
const n = (i = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : i.collapsedExpandedStateGet().mode, c = n === "collapsed" && !e.expanded || n === "expanded" && e.expanded, d = n === "collapsed" && e.expanded || n === "expanded" && !e.expanded, h = t(e.data);
|
|
866
|
+
c ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(h) : d && ((l = this.tableScope.storeStateCollapsedExpandService) == null || l.collapsedStateIdsRemove(h));
|
|
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,25 @@ class Qe {
|
|
|
1069
1076
|
this.tableScope.focusModel()
|
|
1070
1077
|
);
|
|
1071
1078
|
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Downloads an Excel file containing data from the table's header, body, and footer areas.
|
|
1081
|
+
* Extracts the table data into a 2D matrix and uses the Excel service to generate and download the file.
|
|
1082
|
+
*
|
|
1083
|
+
* @return {void} No return value, downloads the Excel file directly.
|
|
1084
|
+
*/
|
|
1085
|
+
downloadExcel() {
|
|
1086
|
+
const e = [], t = this.tableScope.tableModel.getColumnCount(), s = ["header", "body", "footer"];
|
|
1087
|
+
for (const o of s) {
|
|
1088
|
+
const i = this.tableScope.tableModel.getAreaModel(o), r = (i == null ? void 0 : i.getRowCount()) ?? 0;
|
|
1089
|
+
for (let l = 0; l < r; l++) {
|
|
1090
|
+
const n = [];
|
|
1091
|
+
e.push(n);
|
|
1092
|
+
for (let c = 0; c < t; c++)
|
|
1093
|
+
n.push(i.getValueAt(l, c));
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
return this.tableScope.excelService.downloadExcel(e, "table.xlsx");
|
|
1097
|
+
}
|
|
1072
1098
|
/**
|
|
1073
1099
|
* Retrieves the current scope of the table.
|
|
1074
1100
|
*
|
|
@@ -1087,7 +1113,7 @@ class Qe {
|
|
|
1087
1113
|
return this.tableScope.selectionModel();
|
|
1088
1114
|
}
|
|
1089
1115
|
}
|
|
1090
|
-
class
|
|
1116
|
+
class ce {
|
|
1091
1117
|
constructor(e) {
|
|
1092
1118
|
this.getStorageKeyFn = e;
|
|
1093
1119
|
}
|
|
@@ -1162,7 +1188,7 @@ class de {
|
|
|
1162
1188
|
// }
|
|
1163
1189
|
// }
|
|
1164
1190
|
}
|
|
1165
|
-
class
|
|
1191
|
+
class Qe extends ce {
|
|
1166
1192
|
constructor(e) {
|
|
1167
1193
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
1168
1194
|
}
|
|
@@ -1189,7 +1215,7 @@ class et {
|
|
|
1189
1215
|
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = o;
|
|
1190
1216
|
}
|
|
1191
1217
|
}
|
|
1192
|
-
class tt extends
|
|
1218
|
+
class tt extends ce {
|
|
1193
1219
|
constructor(e) {
|
|
1194
1220
|
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new et(), this.load();
|
|
1195
1221
|
}
|
|
@@ -1223,7 +1249,7 @@ class tt extends de {
|
|
|
1223
1249
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
1224
1250
|
}
|
|
1225
1251
|
}
|
|
1226
|
-
class st extends
|
|
1252
|
+
class st extends ce {
|
|
1227
1253
|
constructor(e) {
|
|
1228
1254
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
1229
1255
|
}
|
|
@@ -1244,14 +1270,14 @@ class st extends de {
|
|
|
1244
1270
|
}
|
|
1245
1271
|
}
|
|
1246
1272
|
}
|
|
1247
|
-
class
|
|
1273
|
+
class F {
|
|
1248
1274
|
constructor(e = 0, t = 0, s = 0, o = 0, i) {
|
|
1249
1275
|
this.left = e, this.width = t, this.height = s, this.top = o, this.index = i;
|
|
1250
1276
|
}
|
|
1251
1277
|
}
|
|
1252
1278
|
class ot {
|
|
1253
1279
|
constructor(e, t, s, o) {
|
|
1254
|
-
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new
|
|
1280
|
+
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new F(), this.areaBodyCenterGeo = new F(), this.areaBodyEastGeo = new F();
|
|
1255
1281
|
const i = this.hostElement;
|
|
1256
1282
|
i.innerText = "", this.dom.setAttribute(i, "tabindex", "0"), this.dom.setStyle(
|
|
1257
1283
|
this.dom.addClass("ge-table", i),
|
|
@@ -1469,9 +1495,9 @@ class it {
|
|
|
1469
1495
|
let i = this.areaModel.getColspanAt(s, o), r = this.areaModel.getRowspanAt(s, o);
|
|
1470
1496
|
if (i > 1 || r > 1) {
|
|
1471
1497
|
i === 0 && (i = 1), r === 0 && (r = 1);
|
|
1472
|
-
const
|
|
1498
|
+
const l = "gammaCells" in this.areaModel;
|
|
1473
1499
|
this.colAndRowspanRanges.push(
|
|
1474
|
-
new A(s, o, s + r - 1, o + i - 1,
|
|
1500
|
+
new A(s, o, s + r - 1, o + i - 1, l)
|
|
1475
1501
|
);
|
|
1476
1502
|
}
|
|
1477
1503
|
}
|
|
@@ -1488,22 +1514,22 @@ class it {
|
|
|
1488
1514
|
return !1;
|
|
1489
1515
|
}
|
|
1490
1516
|
}
|
|
1491
|
-
class
|
|
1517
|
+
class rt {
|
|
1492
1518
|
constructor(e, t, s) {
|
|
1493
1519
|
this.header = e, this.body = t, this.footer = s;
|
|
1494
1520
|
}
|
|
1495
1521
|
}
|
|
1496
|
-
class
|
|
1522
|
+
class at extends ot {
|
|
1497
1523
|
constructor(e, t, s, o) {
|
|
1498
|
-
var r,
|
|
1524
|
+
var r, l;
|
|
1499
1525
|
super(e, t, s, o), this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
1500
1526
|
header: [],
|
|
1501
1527
|
body: [],
|
|
1502
1528
|
footer: []
|
|
1503
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
1504
|
-
(
|
|
1529
|
+
}, this.tree = !1, this.colAndRowspanModels = new rt(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (l = this.tableOptions) != null && l.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), re(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
1530
|
+
(n) => {
|
|
1505
1531
|
var c;
|
|
1506
|
-
this.colAndRowspanModels[
|
|
1532
|
+
this.colAndRowspanModels[n] = new it(t, t.getAreaModel(n)), (c = this.colAndRowspanModels[n]) == null || c.init();
|
|
1507
1533
|
}
|
|
1508
1534
|
);
|
|
1509
1535
|
}
|
|
@@ -1589,19 +1615,19 @@ class rt extends ot {
|
|
|
1589
1615
|
for (const t of this.removables)
|
|
1590
1616
|
t.remove();
|
|
1591
1617
|
this.hideHoverRow(), this.hideHoverColumn(), this.scrollTop = this.scrollViewport.scrollTop, this.scrollLeft = this.scrollViewport.scrollLeft, this.debounce(this.checkForScrollPosSaving.bind(this)), this.scrollFactorY = this.scrollTop / (this.scrollViewport.scrollHeight - this.scrollViewport.clientHeight), this.scrollFactorX = this.scrollLeft / (this.scrollViewport.scrollWidth - this.scrollViewport.clientWidth), isNaN(this.scrollFactorY) && (this.scrollFactorY = 0), isNaN(this.scrollFactorX) && (this.scrollFactorX = 0), this.adjustBody(), this.adjustArea("footer"), this.adjustArea("header"), this.tableOptions.tableTopBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
|
|
1592
|
-
new
|
|
1618
|
+
new F(0, this.hostElement.clientWidth, 1, 0),
|
|
1593
1619
|
this.hostElement,
|
|
1594
1620
|
"ge-table-border"
|
|
1595
1621
|
)), this.tableOptions.tableBottomBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
|
|
1596
|
-
new
|
|
1622
|
+
new F(0, this.hostElement.clientWidth, 1, this.hostElement.clientHeight - 1),
|
|
1597
1623
|
this.hostElement,
|
|
1598
1624
|
"ge-table-border"
|
|
1599
1625
|
)), this.tableModel.getFixedLeftColumnCount() > 0 && this.removables.push(this.dom.addVerticalBorder(
|
|
1600
|
-
new
|
|
1626
|
+
new F(this.areaBodyWest.child.clientWidth, 1, this.hostElement.clientHeight, 0),
|
|
1601
1627
|
this.hostElement,
|
|
1602
1628
|
"ge-table-body-west-vertical-border"
|
|
1603
1629
|
)), ((e = this.tableModel.getAreaModel("header")) == null ? void 0 : e.getRowCount()) > 0 && this.removables.push(this.dom.addHorizontalBorder(
|
|
1604
|
-
new
|
|
1630
|
+
new F(0, this.hostElement.clientWidth, 1, this.areaHeaderCenter.child.clientHeight),
|
|
1605
1631
|
this.hostElement,
|
|
1606
1632
|
"ge-table-body-west-vertical-border"
|
|
1607
1633
|
));
|
|
@@ -1640,22 +1666,23 @@ class rt extends ot {
|
|
|
1640
1666
|
* @param {string[]} cssClasses - An array of CSS classes to be applied to the cell.
|
|
1641
1667
|
*/
|
|
1642
1668
|
rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: o, cssClasses: i }) {
|
|
1643
|
-
const r = this.tableModel.getAreaModel(e),
|
|
1644
|
-
if (
|
|
1669
|
+
const r = this.tableModel.getAreaModel(e), l = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', n = document.querySelector(l);
|
|
1670
|
+
if (n) {
|
|
1645
1671
|
let c;
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1648
|
-
|
|
1672
|
+
const d = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s;
|
|
1673
|
+
let h;
|
|
1674
|
+
if (d ? h = this.editorRenderer : h = r.getCellRenderer(t, s), n.innerText = "", this.applyCssClasses(n, i), h)
|
|
1675
|
+
c = h.render(n, t, s, e, r, o, this.dom.domService), c && this.cleanupFunctions[e].push(c);
|
|
1649
1676
|
else {
|
|
1650
|
-
const
|
|
1651
|
-
this.dom.addLabelDiv(
|
|
1677
|
+
const g = `${o}`;
|
|
1678
|
+
this.dom.addLabelDiv(n, g, !1, t, s, e);
|
|
1652
1679
|
}
|
|
1653
|
-
const
|
|
1654
|
-
|
|
1655
|
-
const
|
|
1656
|
-
if (
|
|
1657
|
-
for (const
|
|
1658
|
-
this.dom.setStyle(
|
|
1680
|
+
const p = r.getCustomClassesAt(t, s);
|
|
1681
|
+
p.length && this.dom.addClasses(p, n);
|
|
1682
|
+
const u = r.getCustomStyleAt(t, s);
|
|
1683
|
+
if (u)
|
|
1684
|
+
for (const g in u)
|
|
1685
|
+
this.dom.setStyle(n, g, u[g]);
|
|
1659
1686
|
}
|
|
1660
1687
|
}
|
|
1661
1688
|
/**
|
|
@@ -1764,87 +1791,87 @@ class rt extends ot {
|
|
|
1764
1791
|
* @protected
|
|
1765
1792
|
*/
|
|
1766
1793
|
adjustArea(e, t = 0) {
|
|
1767
|
-
var
|
|
1794
|
+
var f;
|
|
1768
1795
|
const s = this.getArea(e, "west"), o = this.getArea(e, "center"), i = this.getArea(e, "east"), r = o.child.clientHeight;
|
|
1769
1796
|
s.child.innerText = "", o.child.innerText = "", i.child.innerText = "";
|
|
1770
|
-
const
|
|
1797
|
+
const l = 0, n = this.areaBodyCenterGeo.width, c = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e), h = d.getRowCount();
|
|
1771
1798
|
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
|
|
1799
|
+
const m = this.cleanupFunctions[e].shift();
|
|
1800
|
+
m && m();
|
|
1801
|
+
}
|
|
1802
|
+
let p = t;
|
|
1803
|
+
const u = this.tableModel.getColumnCount(), g = this.tableModel.getFixedRightColumnCount(), b = this.tableModel.getFixedLeftColumnCount();
|
|
1804
|
+
for (let m = 0; m < h; m++) {
|
|
1805
|
+
const x = p, C = m === h - 1, E = this.tableModel.getRowHeight(e, m);
|
|
1806
|
+
if (x + E > 0) {
|
|
1807
|
+
this.firstVisibleRowIndex = m;
|
|
1808
|
+
let y = { left: l, width: n, height: E, top: x, index: m }, S = this.dom.addRowDiv(o, y, m, e, "center");
|
|
1809
|
+
const k = b;
|
|
1783
1810
|
if (this.adjustColumnsToRowParent({
|
|
1784
1811
|
areaIdent: e,
|
|
1785
1812
|
sideIdent: "center",
|
|
1786
1813
|
areaModel: d,
|
|
1787
1814
|
geo: y,
|
|
1788
|
-
parent:
|
|
1789
|
-
rowIndex:
|
|
1790
|
-
columnIndexStart:
|
|
1791
|
-
columnIndexEnd:
|
|
1815
|
+
parent: S,
|
|
1816
|
+
rowIndex: m,
|
|
1817
|
+
columnIndexStart: k,
|
|
1818
|
+
columnIndexEnd: u - g - 1,
|
|
1792
1819
|
verticalFixed: !1,
|
|
1793
1820
|
lastRowOfModel: C
|
|
1794
|
-
}), c.left > 0 && (y = { left:
|
|
1821
|
+
}), c.left > 0 && (y = { left: l, width: this.areaBodyWestGeo.width, height: E, top: x, index: m }, S = this.dom.addRowDiv(s, y, m, e, "west"), this.adjustColumnsToRowParent({
|
|
1795
1822
|
areaIdent: e,
|
|
1796
1823
|
sideIdent: "west",
|
|
1797
1824
|
areaModel: d,
|
|
1798
1825
|
geo: y,
|
|
1799
|
-
parent:
|
|
1800
|
-
rowIndex:
|
|
1826
|
+
parent: S,
|
|
1827
|
+
rowIndex: m,
|
|
1801
1828
|
columnIndexStart: 0,
|
|
1802
|
-
columnIndexEnd:
|
|
1829
|
+
columnIndexEnd: k - 1,
|
|
1803
1830
|
verticalFixed: !0,
|
|
1804
1831
|
lastRowOfModel: C
|
|
1805
|
-
})), c.right > 0 && (y = { left:
|
|
1832
|
+
})), c.right > 0 && (y = { left: l, width: this.areaBodyEastGeo.width, height: E, top: x, index: m }, S = this.dom.addRowDiv(i, y, m, e, "east"), this.adjustColumnsToRowParent({
|
|
1806
1833
|
areaIdent: e,
|
|
1807
1834
|
sideIdent: "east",
|
|
1808
1835
|
areaModel: d,
|
|
1809
1836
|
geo: y,
|
|
1810
|
-
parent:
|
|
1811
|
-
rowIndex:
|
|
1812
|
-
columnIndexStart:
|
|
1813
|
-
columnIndexEnd:
|
|
1837
|
+
parent: S,
|
|
1838
|
+
rowIndex: m,
|
|
1839
|
+
columnIndexStart: u - g,
|
|
1840
|
+
columnIndexEnd: u - 1,
|
|
1814
1841
|
verticalFixed: !0,
|
|
1815
1842
|
lastRowOfModel: C
|
|
1816
|
-
})), e === "header" && this.tree &&
|
|
1817
|
-
const
|
|
1843
|
+
})), e === "header" && this.tree && m === h - 1) {
|
|
1844
|
+
const R = this.dom.applyStyle(
|
|
1818
1845
|
this.dom.setAttribute(
|
|
1819
|
-
this.dom.addDiv(
|
|
1846
|
+
this.dom.addDiv(S, new F(16, 20, 20, 8)),
|
|
1820
1847
|
"data-ge-action",
|
|
1821
1848
|
"toggleExpandCollapseAll"
|
|
1822
1849
|
),
|
|
1823
1850
|
{ cursor: "pointer" }
|
|
1824
1851
|
), D = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
1825
1852
|
if (D) {
|
|
1826
|
-
const
|
|
1827
|
-
this.dom.domService.appendChild(
|
|
1853
|
+
const N = this.dom.domService.createText(D.content);
|
|
1854
|
+
this.dom.domService.appendChild(R, N), D.style && this.dom.applyStyleString(R, D.style);
|
|
1828
1855
|
}
|
|
1829
1856
|
}
|
|
1830
1857
|
}
|
|
1831
|
-
if (
|
|
1858
|
+
if (p = p + E, p > r)
|
|
1832
1859
|
break;
|
|
1833
1860
|
}
|
|
1834
1861
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
1835
|
-
const
|
|
1836
|
-
if (
|
|
1837
|
-
for (const
|
|
1862
|
+
const m = ((f = this.colAndRowspanModels[e]) == null ? void 0 : f.getRanges()) ?? [];
|
|
1863
|
+
if (m.length)
|
|
1864
|
+
for (const x of m) {
|
|
1838
1865
|
let C = 0, E = o.child, y = "center";
|
|
1839
|
-
if (
|
|
1866
|
+
if (x.c1 < b)
|
|
1840
1867
|
E = s.child, y = "west";
|
|
1841
|
-
else if (
|
|
1868
|
+
else if (g > 0 && x.c1 >= u - g)
|
|
1842
1869
|
E = i.child, y = "east";
|
|
1843
1870
|
else {
|
|
1844
|
-
const
|
|
1845
|
-
C = this.scrollFactorX *
|
|
1871
|
+
const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1872
|
+
C = this.scrollFactorX * S - this.areaBodyWestGeo.width, y = "center";
|
|
1846
1873
|
}
|
|
1847
|
-
this.drawBigCell(
|
|
1874
|
+
this.drawBigCell(x, C, t, d, E, y);
|
|
1848
1875
|
}
|
|
1849
1876
|
}
|
|
1850
1877
|
}
|
|
@@ -1859,24 +1886,24 @@ class rt extends ot {
|
|
|
1859
1886
|
* @protected
|
|
1860
1887
|
*/
|
|
1861
1888
|
drawBigCell(e, t, s, o, i, r) {
|
|
1862
|
-
const
|
|
1889
|
+
const l = s + this.getRowHeights(0, e.r1 - 1, o).reduce((f, m) => f + m, 0), n = this.tableModel.getColumnCount(), c = this.tableModel.getFixedRightColumnCount();
|
|
1863
1890
|
let d = 0;
|
|
1864
|
-
c > 0 && e.c1 >=
|
|
1865
|
-
const h = t + this.getColumnWidths(d, e.c1 - 1).reduce((
|
|
1866
|
-
let
|
|
1867
|
-
const
|
|
1868
|
-
|
|
1891
|
+
c > 0 && e.c1 >= n - c && (d = n - c);
|
|
1892
|
+
const h = t + this.getColumnWidths(d, e.c1 - 1).reduce((f, m) => f + m, 0), p = this.getRowHeights(e.r1, e.r2, o).reduce((f, m) => f + m, 0), u = this.getColumnWidths(e.c1, e.c2).reduce((f, m) => f + m, 0);
|
|
1893
|
+
let g = !1;
|
|
1894
|
+
const b = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
1895
|
+
b && (g = b.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
|
|
1869
1896
|
areaModel: o,
|
|
1870
1897
|
areaIdent: o.areaIdent,
|
|
1871
1898
|
sideIdent: r,
|
|
1872
1899
|
rowIndex: e.r1,
|
|
1873
1900
|
columnIndex: e.c1,
|
|
1874
1901
|
left: h,
|
|
1875
|
-
top:
|
|
1876
|
-
width:
|
|
1877
|
-
height:
|
|
1902
|
+
top: l,
|
|
1903
|
+
width: u,
|
|
1904
|
+
height: p,
|
|
1878
1905
|
parent: i,
|
|
1879
|
-
cellSelected:
|
|
1906
|
+
cellSelected: g,
|
|
1880
1907
|
lastRowOfModel: !0,
|
|
1881
1908
|
gammaRange: e.gammaRange
|
|
1882
1909
|
}) : this.renderCell({
|
|
@@ -1886,20 +1913,20 @@ class rt extends ot {
|
|
|
1886
1913
|
rowIndex: e.r1,
|
|
1887
1914
|
columnIndex: e.c1,
|
|
1888
1915
|
left: h,
|
|
1889
|
-
top:
|
|
1890
|
-
width:
|
|
1891
|
-
height:
|
|
1916
|
+
top: l,
|
|
1917
|
+
width: u,
|
|
1918
|
+
height: p,
|
|
1892
1919
|
parent: i,
|
|
1893
|
-
cellSelected:
|
|
1920
|
+
cellSelected: g,
|
|
1894
1921
|
lastRowOfModel: !0,
|
|
1895
1922
|
gammaRange: e.gammaRange
|
|
1896
1923
|
}), o.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1897
1924
|
rowIndex: e.r1,
|
|
1898
1925
|
columnIndex: e.c1,
|
|
1899
1926
|
cellLeft: h,
|
|
1900
|
-
cellTop:
|
|
1901
|
-
cellWidth:
|
|
1902
|
-
cellHeight:
|
|
1927
|
+
cellTop: l,
|
|
1928
|
+
cellWidth: u,
|
|
1929
|
+
cellHeight: p,
|
|
1903
1930
|
parent: i
|
|
1904
1931
|
});
|
|
1905
1932
|
}
|
|
@@ -1937,64 +1964,64 @@ class rt extends ot {
|
|
|
1937
1964
|
geo: o,
|
|
1938
1965
|
parent: i,
|
|
1939
1966
|
rowIndex: r,
|
|
1940
|
-
columnIndexStart:
|
|
1941
|
-
columnIndexEnd:
|
|
1967
|
+
columnIndexStart: l,
|
|
1968
|
+
columnIndexEnd: n,
|
|
1942
1969
|
verticalFixed: c = !1,
|
|
1943
1970
|
lastRowOfModel: d = !1
|
|
1944
1971
|
}) {
|
|
1945
|
-
var
|
|
1972
|
+
var b;
|
|
1946
1973
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
1947
1974
|
let h = 0;
|
|
1948
1975
|
if (!c) {
|
|
1949
|
-
const
|
|
1950
|
-
h = this.scrollFactorX *
|
|
1951
|
-
}
|
|
1952
|
-
const
|
|
1953
|
-
let
|
|
1954
|
-
for (let
|
|
1955
|
-
const
|
|
1956
|
-
if (
|
|
1976
|
+
const f = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1977
|
+
h = this.scrollFactorX * f;
|
|
1978
|
+
}
|
|
1979
|
+
const p = 0, u = !!(e === "body" && t);
|
|
1980
|
+
let g = h;
|
|
1981
|
+
for (let f = l; f <= n; f++) {
|
|
1982
|
+
const m = g, x = this.tableModel.getColumnWidth(f);
|
|
1983
|
+
if (x > 0 && m + x > 0) {
|
|
1957
1984
|
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,
|
|
1985
|
+
const E = s.getRowspanAt(r, f), y = s.getColspanAt(r, f);
|
|
1986
|
+
E > 1 && (C = this.getRowHeights(r, r + E - 1, s).reduce((R, D) => R + D, 0));
|
|
1987
|
+
let S = x;
|
|
1988
|
+
y > 1 && (S = this.getColumnWidths(f, f + y - 1).reduce((R, D) => R + D, 0));
|
|
1989
|
+
let k = !1;
|
|
1990
|
+
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (b = this.colAndRowspanModels[e]) != null && b.isInRange(r, f) && (k = !0), this.draggingTargetColumnIndex === f && e !== "header") {
|
|
1991
|
+
this.renderDragTargetDiv(i, m, p, S, C);
|
|
1992
|
+
const R = { left: m, top: p, width: S, height: C };
|
|
1993
|
+
this.dom.addColumnBorderDivs(this.tableOptions, i, R, e, t);
|
|
1967
1994
|
} else {
|
|
1968
|
-
const
|
|
1969
|
-
"gammaCells" in s && s.getValueAt(r,
|
|
1995
|
+
const R = this.renderSelectedBackgroundDiv(k, u, t, s, r, f, i, m, p, S, C);
|
|
1996
|
+
"gammaCells" in s && s.getValueAt(r, f) && (k = !1), k || this.renderCell({
|
|
1970
1997
|
areaModel: s,
|
|
1971
1998
|
areaIdent: e,
|
|
1972
1999
|
sideIdent: t,
|
|
1973
2000
|
rowIndex: r,
|
|
1974
|
-
columnIndex:
|
|
1975
|
-
left:
|
|
1976
|
-
top:
|
|
1977
|
-
width:
|
|
2001
|
+
columnIndex: f,
|
|
2002
|
+
left: m,
|
|
2003
|
+
top: p,
|
|
2004
|
+
width: S,
|
|
1978
2005
|
height: C,
|
|
1979
2006
|
parent: i,
|
|
1980
|
-
cellSelected:
|
|
2007
|
+
cellSelected: R,
|
|
1981
2008
|
lastRowOfModel: d,
|
|
1982
2009
|
gammaRange: !0
|
|
1983
2010
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1984
2011
|
rowIndex: r,
|
|
1985
|
-
columnIndex:
|
|
1986
|
-
cellLeft:
|
|
1987
|
-
cellTop:
|
|
1988
|
-
cellWidth:
|
|
2012
|
+
columnIndex: f,
|
|
2013
|
+
cellLeft: m,
|
|
2014
|
+
cellTop: p,
|
|
2015
|
+
cellWidth: S,
|
|
1989
2016
|
cellHeight: C,
|
|
1990
2017
|
parent: i
|
|
1991
2018
|
});
|
|
1992
2019
|
}
|
|
1993
2020
|
}
|
|
1994
|
-
if (
|
|
2021
|
+
if (g = g + x, g > this.areaBodyCenterGeo.width)
|
|
1995
2022
|
break;
|
|
1996
2023
|
}
|
|
1997
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new
|
|
2024
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new F(g - 1, 1, o.height, 0), i);
|
|
1998
2025
|
}
|
|
1999
2026
|
/**
|
|
2000
2027
|
* Retrieves the column index of the tree arrow column in the table.
|
|
@@ -2015,55 +2042,55 @@ class rt extends ot {
|
|
|
2015
2042
|
rowIndex: o,
|
|
2016
2043
|
index: i,
|
|
2017
2044
|
left: r,
|
|
2018
|
-
width:
|
|
2019
|
-
height:
|
|
2045
|
+
width: l,
|
|
2046
|
+
height: n,
|
|
2020
2047
|
top: c,
|
|
2021
2048
|
parent: d,
|
|
2022
2049
|
lastRowOfModel: h
|
|
2023
2050
|
}) {
|
|
2024
|
-
var
|
|
2025
|
-
const
|
|
2026
|
-
let
|
|
2027
|
-
if (i === this.getTreeArrowColumnIndex() && ie(
|
|
2028
|
-
const
|
|
2029
|
-
(
|
|
2030
|
-
}
|
|
2031
|
-
let
|
|
2051
|
+
var pe;
|
|
2052
|
+
const u = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), g = { left: r, width: l, height: n, top: c, index: i }, b = e.getRowByIndex(o);
|
|
2053
|
+
let f = "none";
|
|
2054
|
+
if (i === this.getTreeArrowColumnIndex() && ie(b)) {
|
|
2055
|
+
const w = b;
|
|
2056
|
+
(pe = w.children) != null && pe.length ? w.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
|
|
2057
|
+
}
|
|
2058
|
+
let x;
|
|
2032
2059
|
if (t === "header") {
|
|
2033
|
-
const
|
|
2034
|
-
(!(
|
|
2060
|
+
const w = this.tableModel.getColumnDef(i);
|
|
2061
|
+
(!(w != null && w.sortIconVisible) || w != null && w.sortIconVisible()) && (x = w == null ? void 0 : w.sortState);
|
|
2035
2062
|
}
|
|
2036
|
-
const C = e.getValueAt(o, i), E =
|
|
2063
|
+
const C = e.getValueAt(o, i), E = u ? "" : `${C}`, y = e.isRowChecked(o), S = this.dom.addColumnDiv(
|
|
2037
2064
|
{
|
|
2038
2065
|
parent: d,
|
|
2039
|
-
geo:
|
|
2066
|
+
geo: g,
|
|
2040
2067
|
rowIndex: o,
|
|
2041
2068
|
columnIndex: i,
|
|
2042
2069
|
areaIdent: t,
|
|
2043
2070
|
sideIdent: s,
|
|
2044
2071
|
text: E,
|
|
2045
|
-
treeArrow:
|
|
2072
|
+
treeArrow: f,
|
|
2046
2073
|
tableOptions: this.tableOptions,
|
|
2047
2074
|
checkedType: y,
|
|
2048
|
-
sortState:
|
|
2075
|
+
sortState: x
|
|
2049
2076
|
}
|
|
2050
|
-
),
|
|
2051
|
-
|
|
2052
|
-
const
|
|
2053
|
-
|
|
2077
|
+
), k = e.getTooltipAt(o, i);
|
|
2078
|
+
k && this.dom.setAttribute(S, "title", k);
|
|
2079
|
+
const R = this.tableModel.getColumnDef(i);
|
|
2080
|
+
R && R.classes[t] && this.dom.addClasses(R.classes[t], S);
|
|
2054
2081
|
let D;
|
|
2055
|
-
|
|
2056
|
-
const
|
|
2057
|
-
if (
|
|
2058
|
-
const
|
|
2059
|
-
|
|
2082
|
+
u && (D = u.render(S, o, i, t, e, C, this.dom.domService));
|
|
2083
|
+
const N = e.getCustomClassesAt(o, i);
|
|
2084
|
+
if (N.length && this.dom.addClasses(N, S), this.dom.addColumnBorderDivs(this.tableOptions, d, g, t, s), h && this.dom.addHorizontalBorder({ left: r, width: l, height: n, top: c + n }, d), this.getFocusModel && t === "body") {
|
|
2085
|
+
const w = this.getFocusModel();
|
|
2086
|
+
w != null && w.hasFocus(o, i) && this.dom.addFocusBorderDivs(d, g, {});
|
|
2060
2087
|
}
|
|
2061
|
-
t === "header" && this.dom.setAttribute(
|
|
2062
|
-
const
|
|
2063
|
-
if (
|
|
2064
|
-
for (const
|
|
2065
|
-
this.dom.setStyle(
|
|
2066
|
-
return [
|
|
2088
|
+
t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
|
|
2089
|
+
const Z = e.getCustomStyleAt(o, i);
|
|
2090
|
+
if (Z)
|
|
2091
|
+
for (const w in Z)
|
|
2092
|
+
this.dom.setStyle(S, w, Z[w]);
|
|
2093
|
+
return [S, D];
|
|
2067
2094
|
}
|
|
2068
2095
|
/**
|
|
2069
2096
|
* Applies CSS classes to an HTML element.
|
|
@@ -2193,9 +2220,9 @@ class rt extends ot {
|
|
|
2193
2220
|
adjustDraggingColumn(e, t, s) {
|
|
2194
2221
|
var o, i;
|
|
2195
2222
|
if (this.dragging) {
|
|
2196
|
-
const r = this.hostElement.clientHeight,
|
|
2223
|
+
const r = this.hostElement.clientHeight, l = this.storedColumnWidths[t];
|
|
2197
2224
|
if ((o = e.originalEvent) != null && o.clientX) {
|
|
2198
|
-
const d = { left: ((i = e.originalEvent) == null ? void 0 : i.clientX) -
|
|
2225
|
+
const d = { left: ((i = e.originalEvent) == null ? void 0 : i.clientX) - l / 2, width: l, height: r, top: 0, index: t };
|
|
2199
2226
|
this.dom.applyStyle(this.draggingColumn, {
|
|
2200
2227
|
background: "rgba(128,128,128,0.2)",
|
|
2201
2228
|
display: "block",
|
|
@@ -2227,27 +2254,27 @@ class rt extends ot {
|
|
|
2227
2254
|
renderContentOfDraggingColumnForArea(e, t, s = 0) {
|
|
2228
2255
|
const o = "center", i = this.tableModel.getAreaModel(t), r = i == null ? void 0 : i.getRowCount();
|
|
2229
2256
|
if (r) {
|
|
2230
|
-
const
|
|
2257
|
+
const l = e.index ?? 0, n = this.draggingColumn;
|
|
2231
2258
|
for (let c = 0; c < r; c++) {
|
|
2232
|
-
const d = s, h = i.getRowHeight(c),
|
|
2233
|
-
parent:
|
|
2234
|
-
geo:
|
|
2259
|
+
const d = s, h = i.getRowHeight(c), p = { left: 0, width: e.width, height: h, top: d, index: c }, u = i.getValueAt(c, l), g = i.getCellRenderer(c, l), b = g ? "" : `${u}`, f = {
|
|
2260
|
+
parent: n,
|
|
2261
|
+
geo: p,
|
|
2235
2262
|
rowIndex: c,
|
|
2236
|
-
columnIndex:
|
|
2263
|
+
columnIndex: l,
|
|
2237
2264
|
areaIdent: t,
|
|
2238
2265
|
sideIdent: o,
|
|
2239
|
-
text:
|
|
2240
|
-
},
|
|
2241
|
-
let
|
|
2242
|
-
|
|
2243
|
-
const C = i.getCustomClassesAt(c,
|
|
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(c,
|
|
2266
|
+
text: b
|
|
2267
|
+
}, m = this.dom.addColumnDiv(f);
|
|
2268
|
+
let x;
|
|
2269
|
+
g && (x = g.render(m, c, l, t, i, u, this.dom.domService), x && this.cleanupFunctions[t].push(x));
|
|
2270
|
+
const C = i.getCustomClassesAt(c, l);
|
|
2271
|
+
C.length && this.dom.addClasses(C, m);
|
|
2272
|
+
const E = this.tableModel.getColumnDef(l);
|
|
2273
|
+
E && E.classes[t] && this.dom.addClasses(E.classes[t], m), this.dom.addColumnBorderDivs(this.tableOptions, n, p, t, o);
|
|
2274
|
+
const y = i.getCustomStyleAt(c, l);
|
|
2248
2275
|
if (y)
|
|
2249
|
-
for (const
|
|
2250
|
-
this.dom.setStyle(
|
|
2276
|
+
for (const S in y)
|
|
2277
|
+
this.dom.setStyle(m, S, y[S]);
|
|
2251
2278
|
s = s + h;
|
|
2252
2279
|
}
|
|
2253
2280
|
}
|
|
@@ -2297,23 +2324,23 @@ class rt extends ot {
|
|
|
2297
2324
|
* @param {number} height - The height of the div.
|
|
2298
2325
|
* @returns {boolean} - Whether the cell is selected.
|
|
2299
2326
|
*/
|
|
2300
|
-
renderSelectedBackgroundDiv(e, t, s, o, i, r,
|
|
2301
|
-
let
|
|
2327
|
+
renderSelectedBackgroundDiv(e, t, s, o, i, r, l, n, c, d, h) {
|
|
2328
|
+
let p = !1;
|
|
2302
2329
|
if (!e && t && o.isSelectable(i, r) && this.getSelectionModel) {
|
|
2303
|
-
const
|
|
2304
|
-
if (
|
|
2305
|
-
const
|
|
2306
|
-
|
|
2307
|
-
for (let
|
|
2308
|
-
const
|
|
2330
|
+
const u = this.getSelectionModel();
|
|
2331
|
+
if (u) {
|
|
2332
|
+
const g = u.getSelectionCount(i, r);
|
|
2333
|
+
p = g > 0;
|
|
2334
|
+
for (let b = 0; b < g; b++) {
|
|
2335
|
+
const f = this.dom.applyStylePosistionAbsolute(
|
|
2309
2336
|
// ge-table-body-west-selected-range
|
|
2310
|
-
this.dom.createDivWithClass(`ge-table-${o.areaIdent}-${s}-selected-range`,
|
|
2337
|
+
this.dom.createDivWithClass(`ge-table-${o.areaIdent}-${s}-selected-range`, l)
|
|
2311
2338
|
);
|
|
2312
|
-
this.dom.setStyle(
|
|
2339
|
+
this.dom.setStyle(f, "left", `${n}px`), this.dom.setStyle(f, "top", `${c}px`), this.dom.setStyle(f, "width", `${d}px`), this.dom.setStyle(f, "height", `${h}px`);
|
|
2313
2340
|
}
|
|
2314
2341
|
}
|
|
2315
2342
|
}
|
|
2316
|
-
return
|
|
2343
|
+
return p;
|
|
2317
2344
|
}
|
|
2318
2345
|
/**
|
|
2319
2346
|
* Renders a cell in the grid.
|
|
@@ -2341,27 +2368,27 @@ class rt extends ot {
|
|
|
2341
2368
|
rowIndex: o,
|
|
2342
2369
|
columnIndex: i,
|
|
2343
2370
|
left: r,
|
|
2344
|
-
top:
|
|
2345
|
-
width:
|
|
2371
|
+
top: l,
|
|
2372
|
+
width: n,
|
|
2346
2373
|
height: c,
|
|
2347
2374
|
parent: d,
|
|
2348
2375
|
cellSelected: h,
|
|
2349
|
-
lastRowOfModel:
|
|
2376
|
+
lastRowOfModel: p
|
|
2350
2377
|
}) {
|
|
2351
|
-
const [
|
|
2378
|
+
const [u, g] = this.addAndRenderCellDiv({
|
|
2352
2379
|
areaModel: e,
|
|
2353
2380
|
areaIdent: t,
|
|
2354
2381
|
sideIdent: s,
|
|
2355
2382
|
rowIndex: o,
|
|
2356
2383
|
index: i,
|
|
2357
2384
|
left: r,
|
|
2358
|
-
width:
|
|
2385
|
+
width: n,
|
|
2359
2386
|
height: c,
|
|
2360
|
-
top:
|
|
2387
|
+
top: l,
|
|
2361
2388
|
parent: d,
|
|
2362
|
-
lastRowOfModel:
|
|
2389
|
+
lastRowOfModel: p
|
|
2363
2390
|
});
|
|
2364
|
-
h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`,
|
|
2391
|
+
h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, u), g && this.cleanupFunctions[t].push(g);
|
|
2365
2392
|
}
|
|
2366
2393
|
/**
|
|
2367
2394
|
* Render the header cell resize handle.
|
|
@@ -2377,17 +2404,17 @@ class rt extends ot {
|
|
|
2377
2404
|
*
|
|
2378
2405
|
* @return {void}
|
|
2379
2406
|
*/
|
|
2380
|
-
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: o, cellWidth: i, cellHeight: r, parent:
|
|
2381
|
-
const
|
|
2382
|
-
|
|
2407
|
+
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: o, cellWidth: i, cellHeight: r, parent: l }) {
|
|
2408
|
+
const n = this.dom.domService, c = this.tableOptions.columnResizeHandleWidthInPx ?? 2, d = n.createElement("div");
|
|
2409
|
+
n.setAttribute(d, "data-col-index", `${t}`), n.setAttribute(d, "data-row-index", `${e}`), n.setAttribute(d, "data-area", "header"), n.setAttribute(d, "data-ge-action", "resize-column"), n.addClass(d, "ge-table-column-resize-handle"), n.setStyle(d, "display", "clip"), n.setStyle(d, "position", "absolute"), n.setStyle(d, "cursor", "col-resize"), n.setStyle(d, "left", `${s + i - c}px`), n.setStyle(d, "top", `${o}px`), n.setStyle(d, "width", `${c}px`), n.setStyle(d, "height", `${r}px`), n.appendChild(l, d);
|
|
2383
2410
|
}
|
|
2384
2411
|
}
|
|
2385
|
-
class
|
|
2412
|
+
class lt {
|
|
2386
2413
|
constructor(e, t) {
|
|
2387
2414
|
this.columnIndex = e, this.sortState = t;
|
|
2388
2415
|
}
|
|
2389
2416
|
}
|
|
2390
|
-
class
|
|
2417
|
+
class nt {
|
|
2391
2418
|
constructor(e) {
|
|
2392
2419
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
2393
2420
|
}
|
|
@@ -2403,36 +2430,36 @@ class at {
|
|
|
2403
2430
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
2404
2431
|
const t = e.target, s = t.getAttribute("data-area"), o = t.getAttribute("data-row-index"), i = t.getAttribute("data-col-index");
|
|
2405
2432
|
if (s && o && i) {
|
|
2406
|
-
const r =
|
|
2407
|
-
this.tableScope.updateModelValueAfterEdit(r,
|
|
2433
|
+
const r = ne(s), l = Number(o), n = Number(i);
|
|
2434
|
+
this.tableScope.updateModelValueAfterEdit(r, l, n, t.value);
|
|
2408
2435
|
}
|
|
2409
2436
|
}
|
|
2410
2437
|
}
|
|
2411
2438
|
}
|
|
2412
|
-
class
|
|
2439
|
+
class ct {
|
|
2413
2440
|
constructor(e = -1, t = -1) {
|
|
2414
2441
|
this.rowIndex = e, this.columnIndex = t;
|
|
2415
2442
|
}
|
|
2416
2443
|
}
|
|
2417
|
-
class
|
|
2444
|
+
class de {
|
|
2418
2445
|
constructor(e) {
|
|
2419
2446
|
this.cells = e;
|
|
2420
2447
|
}
|
|
2421
2448
|
static createSingle(e, t) {
|
|
2422
|
-
return new
|
|
2449
|
+
return new de([new ct(e, t)]);
|
|
2423
2450
|
}
|
|
2424
2451
|
}
|
|
2425
|
-
class
|
|
2452
|
+
class dt {
|
|
2426
2453
|
constructor(e) {
|
|
2427
2454
|
var t, s;
|
|
2428
2455
|
this.tableScope = e, (t = this.tableScope.tableOptions) != null && t.getSelectionModel && (this.getSelectionModel = this.tableScope.tableOptions.getSelectionModel), (s = this.tableScope.tableOptions) != null && s.getFocusModel && (this.getFocusModel = this.tableScope.tableOptions.getFocusModel);
|
|
2429
2456
|
}
|
|
2430
2457
|
onMouseClicked(e, t) {
|
|
2431
|
-
var i, r,
|
|
2458
|
+
var i, r, l, n, c, d, h;
|
|
2432
2459
|
let s = !1, o = !1;
|
|
2433
2460
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
2434
|
-
const
|
|
2435
|
-
|
|
2461
|
+
const p = this.getSelectionModel(), u = this.getFocusModel();
|
|
2462
|
+
p && u && (u.hasFocus(e.rowIndex, e.columnIndex) || (u.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(u), s = !0), (i = e.originalEvent) != null && i.shiftKey || p.hasSelection() && (p.clear(), s = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (p.addSelection(this.createRangeByEvents(e, this.previousEvt)), o = !0, s = !0) : (l = e.originalEvent) != null && l.altKey && ((n = e.originalEvent) != null && n.ctrlKey || (c = e.originalEvent) != null && c.metaKey) ? (p.removeSelection(A.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (d = e.originalEvent) != null && d.ctrlKey || (h = e.originalEvent) != null && h.metaKey ? (p.addSelection(A.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (p.firstClick(e.rowIndex, e.columnIndex), s = !0), this.tableScope.onSelectionChanged(p));
|
|
2436
2463
|
}
|
|
2437
2464
|
return o ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
|
|
2438
2465
|
}
|
|
@@ -2483,7 +2510,7 @@ class ht {
|
|
|
2483
2510
|
};
|
|
2484
2511
|
}
|
|
2485
2512
|
}
|
|
2486
|
-
class
|
|
2513
|
+
class pt {
|
|
2487
2514
|
get() {
|
|
2488
2515
|
return {
|
|
2489
2516
|
f2: "START_EDITING",
|
|
@@ -2505,7 +2532,7 @@ class gt {
|
|
|
2505
2532
|
};
|
|
2506
2533
|
}
|
|
2507
2534
|
}
|
|
2508
|
-
class
|
|
2535
|
+
class gt {
|
|
2509
2536
|
constructor(e) {
|
|
2510
2537
|
this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
|
|
2511
2538
|
}
|
|
@@ -2526,7 +2553,7 @@ class ut {
|
|
|
2526
2553
|
this.assignPredefinedSystemShortcutMappings(), Object.assign(this.shortcutActionIdMapping, this.tableScope.tableOptions.shortcutActionIdMapping), this.isDebug() && console.debug("ShortcutService", this.shortcutActionIdMapping), this.tableScope.hostElement.addEventListener("keydown", this.onKeyDown.bind(this));
|
|
2527
2554
|
}
|
|
2528
2555
|
assignPredefinedSystemShortcutMappings() {
|
|
2529
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
2556
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new pt().get()) : Object.assign(this.shortcutActionIdMapping, new ht().get());
|
|
2530
2557
|
}
|
|
2531
2558
|
isMacintosh() {
|
|
2532
2559
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -2578,7 +2605,7 @@ class ut {
|
|
|
2578
2605
|
return this.shortcutActionIdMapping;
|
|
2579
2606
|
}
|
|
2580
2607
|
}
|
|
2581
|
-
class
|
|
2608
|
+
class me {
|
|
2582
2609
|
onCheckboxChanged(e) {
|
|
2583
2610
|
}
|
|
2584
2611
|
onContextmenu(e) {
|
|
@@ -2598,7 +2625,7 @@ class fe {
|
|
|
2598
2625
|
onFocusChanged(e) {
|
|
2599
2626
|
}
|
|
2600
2627
|
}
|
|
2601
|
-
class
|
|
2628
|
+
class Te {
|
|
2602
2629
|
setStyle(e, t, s) {
|
|
2603
2630
|
return e.style[t] = s, e;
|
|
2604
2631
|
}
|
|
@@ -2625,15 +2652,15 @@ class Re {
|
|
|
2625
2652
|
e.setAttribute(t, s);
|
|
2626
2653
|
}
|
|
2627
2654
|
}
|
|
2628
|
-
class
|
|
2629
|
-
render(e, t, s, o, i, r,
|
|
2655
|
+
class ft {
|
|
2656
|
+
render(e, t, s, o, i, r, l) {
|
|
2630
2657
|
if (i.isEditable(t, s)) {
|
|
2631
|
-
|
|
2632
|
-
const
|
|
2658
|
+
l.addClass(e, "ge-table-row-input-div");
|
|
2659
|
+
const n = i.getValueAt(t, s);
|
|
2633
2660
|
e.innerHTML = `
|
|
2634
2661
|
<input
|
|
2635
2662
|
type="text"
|
|
2636
|
-
value="${
|
|
2663
|
+
value="${n}"
|
|
2637
2664
|
autofocus
|
|
2638
2665
|
onfocus="this.setSelectionRange(0, this.value.length)"
|
|
2639
2666
|
data-listen="change"
|
|
@@ -2646,7 +2673,7 @@ class pt {
|
|
|
2646
2673
|
}
|
|
2647
2674
|
}
|
|
2648
2675
|
}
|
|
2649
|
-
class
|
|
2676
|
+
class ut {
|
|
2650
2677
|
constructor(e = "none", t = "single") {
|
|
2651
2678
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
|
|
2652
2679
|
}
|
|
@@ -2728,7 +2755,7 @@ class bt {
|
|
|
2728
2755
|
this.selectionType !== "none" && (this.allSelected = !1, this.selectionMode === "single" && (this.ranges = []), this.selectionType === "row" ? (e.c1 = 0, e.c2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "column" ? (e.r1 = 0, e.r2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "cell" ? (e.r2 = e.r1, e.c2 = e.c1) : this.selectionType, this.ranges.push(e), this.fireChangeEvent());
|
|
2729
2756
|
}
|
|
2730
2757
|
}
|
|
2731
|
-
class
|
|
2758
|
+
class mt {
|
|
2732
2759
|
constructor(e = "none") {
|
|
2733
2760
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
2734
2761
|
}
|
|
@@ -2765,7 +2792,7 @@ class ft {
|
|
|
2765
2792
|
return [this.rowIndex, this.columnIndex];
|
|
2766
2793
|
}
|
|
2767
2794
|
}
|
|
2768
|
-
class
|
|
2795
|
+
class Re {
|
|
2769
2796
|
constructor(e = new I(
|
|
2770
2797
|
"❯",
|
|
2771
2798
|
"",
|
|
@@ -2779,17 +2806,17 @@ class Te {
|
|
|
2779
2806
|
}
|
|
2780
2807
|
// `⊖ `, `⊕ `;
|
|
2781
2808
|
}
|
|
2782
|
-
const
|
|
2809
|
+
const bt = new ut(), St = new mt("cell");
|
|
2783
2810
|
class De {
|
|
2784
2811
|
constructor() {
|
|
2785
2812
|
this.overflowX = "auto", this.overflowY = "auto", this.horizontalBorderVisible = !0, this.verticalBorderVisible = !0, this.footerSeparatorBorderVisible = !0, this.headerSeparatorBorderVisible = !0, this.fixedEastSeparatorBorderVisible = !0, this.fixedWestSeparatorBorderVisible = !0, this.tableTopBorderVisible = !0, this.tableBottomBorderVisible = !0, this.hoverRowVisible = !0, this.hoverColumnVisible = !0, this.columnsResizable = !0, this.columnsDraggable = !0, this.columnResizeHandleWidthInPx = 4, this.defaultRowHeights = {
|
|
2786
2813
|
header: 34,
|
|
2787
2814
|
body: 34,
|
|
2788
2815
|
footer: 34
|
|
2789
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Ae(), this.headerGroupOptions = new
|
|
2816
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Ae(), this.headerGroupOptions = new Re(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Me(), this.sortOrder = ["asc", "desc"], this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new ft(), this.getSelectionModel = () => bt, this.getFocusModel = () => St;
|
|
2790
2817
|
}
|
|
2791
2818
|
}
|
|
2792
|
-
const
|
|
2819
|
+
const $ = class $ {
|
|
2793
2820
|
/**
|
|
2794
2821
|
* Returns the content to be copied based on the provided table model, selection model, and focus model.
|
|
2795
2822
|
*
|
|
@@ -2805,21 +2832,21 @@ const P = class P {
|
|
|
2805
2832
|
const r = this.mergeRanges(t.getRanges());
|
|
2806
2833
|
if (r) {
|
|
2807
2834
|
r.c2 = Math.min(r.c2, e.getColumnCount() - 1), r.r2 = Math.min(r.r2, e.getBodyModel().getRowCount() - 1);
|
|
2808
|
-
const
|
|
2809
|
-
for (let
|
|
2835
|
+
const l = [];
|
|
2836
|
+
for (let n = r.r1; n <= r.r2; n++) {
|
|
2810
2837
|
const c = [];
|
|
2811
2838
|
for (let d = r.c1; d <= r.c2; d++) {
|
|
2812
|
-
const h = t.isSelected(
|
|
2839
|
+
const h = t.isSelected(n, d) ? e.getBodyModel().getTextValueAt(n, d) : "";
|
|
2813
2840
|
c.push(h);
|
|
2814
2841
|
}
|
|
2815
|
-
|
|
2842
|
+
l.push(c.join($.columnSeparatorChar));
|
|
2816
2843
|
}
|
|
2817
|
-
return o(
|
|
2844
|
+
return o(l.join($.rowSeparatorChar));
|
|
2818
2845
|
}
|
|
2819
2846
|
}
|
|
2820
2847
|
if (s) {
|
|
2821
|
-
const [r,
|
|
2822
|
-
return o(
|
|
2848
|
+
const [r, l] = s.getFocus(), n = e.getBodyModel().getTextValueAt(r, l);
|
|
2849
|
+
return o(n);
|
|
2823
2850
|
}
|
|
2824
2851
|
i("Cannot copy, neither selection nor focus defined.");
|
|
2825
2852
|
});
|
|
@@ -2848,9 +2875,9 @@ const P = class P {
|
|
|
2848
2875
|
t,
|
|
2849
2876
|
s
|
|
2850
2877
|
).then((r) => {
|
|
2851
|
-
r && this.copyContent(r).then((
|
|
2878
|
+
r && this.copyContent(r).then((l) => {
|
|
2852
2879
|
o(r);
|
|
2853
|
-
}).catch((
|
|
2880
|
+
}).catch((l) => {
|
|
2854
2881
|
i();
|
|
2855
2882
|
});
|
|
2856
2883
|
}).catch((r) => {
|
|
@@ -2871,30 +2898,136 @@ const P = class P {
|
|
|
2871
2898
|
return t;
|
|
2872
2899
|
}
|
|
2873
2900
|
};
|
|
2874
|
-
|
|
2901
|
+
$.columnSeparatorChar = " ", $.rowSeparatorChar = `
|
|
2875
2902
|
`;
|
|
2876
|
-
let
|
|
2903
|
+
let X = $;
|
|
2877
2904
|
class yt {
|
|
2878
|
-
constructor(e) {
|
|
2879
|
-
this.tableScope = e, new ResizeObserver(
|
|
2905
|
+
constructor(e, t = 500) {
|
|
2906
|
+
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(Ke(this.handleResize.bind(this), t)).observe(this.tableScope.hostElement);
|
|
2880
2907
|
}
|
|
2881
2908
|
handleResize(e) {
|
|
2882
2909
|
const t = e[0], { width: s } = t.contentRect;
|
|
2883
2910
|
this.tableScope.recalcColumnWidths(s);
|
|
2884
2911
|
}
|
|
2885
2912
|
}
|
|
2886
|
-
class
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2913
|
+
class xt {
|
|
2914
|
+
/**
|
|
2915
|
+
* Downloads a matrix data as an Excel file.
|
|
2916
|
+
*
|
|
2917
|
+
* @param {Array<Array<any>>} matrix - A 2D array representing the data to be included in the Excel file. Each inner array corresponds to a row in the sheet.
|
|
2918
|
+
* @param {string} [filename='file.xlsx'] - The name of the Excel file to be downloaded. Defaults to 'file.xlsx'.
|
|
2919
|
+
* @param {string} [author=''] - The author's name to include as metadata in the Excel file. Optional parameter.
|
|
2920
|
+
* @return {void} Does not return a value.
|
|
2921
|
+
* @throws {Error} Throws an error if the input matrix is not a valid 2D array or if the filename is an empty string.
|
|
2922
|
+
*/
|
|
2923
|
+
downloadExcel(e, t = "file.xlsx", s = "") {
|
|
2924
|
+
if (!Array.isArray(e) || e.some((o) => !Array.isArray(o)))
|
|
2925
|
+
throw new Error("Invalid matrix format. Expected a 2D array.");
|
|
2926
|
+
if ((t == null ? void 0 : t.trim()) === "")
|
|
2927
|
+
throw new Error("Invalid filename. Filename must be a non-empty string.");
|
|
2928
|
+
try {
|
|
2929
|
+
const o = this.generateBuffer(e, s), i = new Blob([o], {
|
|
2930
|
+
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
2931
|
+
}), r = document.createElement("a");
|
|
2932
|
+
r.href = URL.createObjectURL(i), r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r);
|
|
2933
|
+
} catch (o) {
|
|
2934
|
+
throw console.error("Error generating Excel file:", o), new Error("Failed to download Excel file.");
|
|
2935
|
+
}
|
|
2936
|
+
}
|
|
2937
|
+
generateMap(e, t = "") {
|
|
2938
|
+
const s = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2939
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>`, o = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2940
|
+
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>Microsoft Macintosh Excel</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts><Company></Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion></Properties>`, i = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2941
|
+
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:creator>${t}</dc:creator><cp:lastModifiedBy>${t}</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">2024-12-13T19:45:08Z</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">2024-12-13T19:45:35Z</dcterms:modified></cp:coreProperties>`, r = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2942
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/></Relationships>`, l = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2943
|
+
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="0E2841"/></a:dk2><a:lt2><a:srgbClr val="E8E8E8"/></a:lt2><a:accent1><a:srgbClr val="156082"/></a:accent1><a:accent2><a:srgbClr val="E97132"/></a:accent2><a:accent3><a:srgbClr val="196B24"/></a:accent3><a:accent4><a:srgbClr val="0F9ED5"/></a:accent4><a:accent5><a:srgbClr val="A02B93"/></a:accent5><a:accent6><a:srgbClr val="4EA72E"/></a:accent6><a:hlink><a:srgbClr val="467886"/></a:hlink><a:folHlink><a:srgbClr val="96607D"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Aptos Display" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线 Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:majorFont><a:minorFont><a:latin typeface="Aptos Narrow" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults><a:lnDef><a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style></a:lnDef></a:objectDefaults><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{2E142A2C-CD16-42D6-873A-C26D2A0506FA}" vid="{1BDDFF52-6CD6-40A5-AB3C-68EB2F1E4D0A}"/></a:ext></a:extLst></a:theme>`, n = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2944
|
+
<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="3" uniqueCount="3"><si><t>a</t></si><si><t>b</t></si><si><t>c</t></si></sst>`, c = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2945
|
+
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision"><fonts count="1" x14ac:knownFonts="1"><font><sz val="12"/><color theme="1"/><name val="Aptos Narrow"/><family val="2"/><scheme val="minor"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles><dxfs count="0"/><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/><extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/></ext><ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/></ext></extLst></styleSheet>`, d = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2946
|
+
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x15 xr xr6 xr10 xr2" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr6="http://schemas.microsoft.com/office/spreadsheetml/2016/revision6" xmlns:xr10="http://schemas.microsoft.com/office/spreadsheetml/2016/revision10" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"><fileVersion appName="xl" lastEdited="7" lowestEdited="7" rupBuild="11207"/><workbookPr defaultThemeVersion="202300"/><mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice Requires="x15"><x15ac:absPath url="/" xmlns:x15ac="http://schemas.microsoft.com/office/spreadsheetml/2010/11/ac"/></mc:Choice></mc:AlternateContent><xr:revisionPtr revIDLastSave="0" documentId="8_{292BF245-1F37-B045-B1A5-26C42FB62779}" xr6:coauthVersionLast="47" xr6:coauthVersionMax="47" xr10:uidLastSave="{00000000-0000-0000-0000-000000000000}"/><bookViews><workbookView xWindow="11340" yWindow="5060" windowWidth="28040" windowHeight="17440" xr2:uid="{858B8D3F-6246-774D-8903-6D38687B7BC6}"/></bookViews><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets><calcPr calcId="181029"/><extLst><ext uri="{140A7094-0E35-4892-8432-C4D2E57EDEB5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:workbookPr chartTrackingRefBase="1"/></ext><ext uri="{B58B0392-4F1F-4190-BB64-5DF3571DCE5F}" xmlns:xcalcf="http://schemas.microsoft.com/office/spreadsheetml/2018/calcfeatures"><xcalcf:calcFeatures><xcalcf:feature name="microsoft.com:RD"/><xcalcf:feature name="microsoft.com:Single"/><xcalcf:feature name="microsoft.com:FV"/><xcalcf:feature name="microsoft.com:CNMTM"/><xcalcf:feature name="microsoft.com:LET_WF"/><xcalcf:feature name="microsoft.com:LAMBDA_WF"/><xcalcf:feature name="microsoft.com:ARRAYTEXT_WF"/></xcalcf:calcFeatures></ext></extLst></workbook>`, h = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2947
|
+
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>`, p = /* @__PURE__ */ new Map();
|
|
2948
|
+
return p.set("_rels/.rels", s), p.set("docProps/app.xml", o), p.set("docProps/core.xml", i), p.set("xl/_rels/workbook.xml.rels", r), p.set("xl/theme/theme1.xml", l), p.set("xl/worksheets/sheet1.xml", this.getX1WorksheetsSheet1Xml(e)), p.set("xl/sharedStrings.xml", n), p.set("xl/styles.xml", c), p.set("xl/workbook.xml", d), p.set("[Content_Types].xml", h), p;
|
|
2949
|
+
}
|
|
2950
|
+
getX1WorksheetsSheet1Xml(e) {
|
|
2951
|
+
const t = [];
|
|
2952
|
+
t.push(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2953
|
+
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac xr xr2 xr3" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2" xmlns:xr3="http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" xr:uid="{E15F8FC4-4D40-434C-921A-3D9CFAAA2865}">
|
|
2954
|
+
<dimension ref="A1:B3"/>
|
|
2955
|
+
<sheetViews>
|
|
2956
|
+
<sheetView tabSelected="1" workbookViewId="0"/></sheetViews>
|
|
2957
|
+
<sheetFormatPr baseColWidth="10" defaultRowHeight="16" x14ac:dyDescent="0.2"/>
|
|
2958
|
+
<sheetData>`);
|
|
2959
|
+
for (let s = 0; s < e.length; s++) {
|
|
2960
|
+
const o = e[s];
|
|
2961
|
+
t.push('<row r="${r + 1}" spans="1:2" x14ac:dyDescent="0.2">');
|
|
2962
|
+
for (let i = 0; i < o.length; i++) {
|
|
2963
|
+
const r = o[i], l = this.getCellAddress(s, i);
|
|
2964
|
+
if (typeof r == "number")
|
|
2965
|
+
t.push(`<c r="${l}"><v>${r}</v></c>`);
|
|
2966
|
+
else if (r instanceof Date) {
|
|
2967
|
+
const n = r;
|
|
2968
|
+
t.push(`<c r="${l}" t="inlineStr"><is><t>${n.toISOString()}</t></is></c>`);
|
|
2969
|
+
} else {
|
|
2970
|
+
const n = r != null ? this.escapeXml(String(r)) : "";
|
|
2971
|
+
t.push(`<c r="${l}" t="inlineStr"><is><t>${n}</t></is></c>`);
|
|
2972
|
+
}
|
|
2973
|
+
}
|
|
2974
|
+
t.push("</row>");
|
|
2975
|
+
}
|
|
2976
|
+
return t.push(""), t.push(""), t.push('</sheetData><pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>'), t.push("</worksheet>"), t.join(`
|
|
2977
|
+
`);
|
|
2978
|
+
}
|
|
2979
|
+
escapeXml(e) {
|
|
2980
|
+
return e == null ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2981
|
+
}
|
|
2982
|
+
getCellAddress(e, t) {
|
|
2983
|
+
const s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
2984
|
+
let o = "";
|
|
2985
|
+
for (; t >= 0; )
|
|
2986
|
+
o = s[t % 26] + o, t = Math.floor(t / 26) - 1;
|
|
2987
|
+
return `${o}${e + 1}`;
|
|
2988
|
+
}
|
|
2989
|
+
createZip(e) {
|
|
2990
|
+
const t = [];
|
|
2991
|
+
let s = 0;
|
|
2992
|
+
const o = [];
|
|
2993
|
+
e.forEach((h, p) => {
|
|
2994
|
+
const u = new TextEncoder().encode(p), g = new TextEncoder().encode(h), b = new Uint8Array(30 + u.length), f = new DataView(b.buffer);
|
|
2995
|
+
b.set([80, 75, 3, 4], 0), f.setUint16(4, 20, !0), f.setUint16(6, 0, !0), f.setUint16(8, 0, !0), f.setUint16(10, 0, !0), f.setUint16(12, 0, !0), f.setUint32(14, 0, !0), f.setUint32(18, g.length, !0), f.setUint32(22, g.length, !0), f.setUint16(26, u.length, !0), f.setUint16(28, 0, !0), b.set(u, 30), t.push(b, g), o.push({
|
|
2996
|
+
path: p,
|
|
2997
|
+
offset: s,
|
|
2998
|
+
contentSize: g.length
|
|
2999
|
+
}), s += b.length + g.length;
|
|
3000
|
+
});
|
|
3001
|
+
const i = s;
|
|
3002
|
+
o.forEach((h) => {
|
|
3003
|
+
const p = new TextEncoder().encode(h.path), u = new Uint8Array(46 + p.length), g = new DataView(u.buffer);
|
|
3004
|
+
u.set([80, 75, 1, 2], 0), g.setUint16(4, 20, !0), g.setUint16(6, 20, !0), g.setUint16(8, 0, !0), g.setUint16(10, 0, !0), g.setUint16(12, 0, !0), g.setUint16(14, 0, !0), g.setUint32(16, 0, !0), g.setUint32(20, h.contentSize, !0), g.setUint32(24, h.contentSize, !0), g.setUint16(28, p.length, !0), g.setUint16(30, 0, !0), g.setUint16(32, 0, !0), g.setUint16(34, 0, !0), g.setUint16(36, 0, !0), g.setUint32(38, 0, !0), g.setUint32(42, h.offset, !0), u.set(p, 46), t.push(u), s += u.length;
|
|
3005
|
+
});
|
|
3006
|
+
const r = new Uint8Array(22), l = new DataView(r.buffer);
|
|
3007
|
+
r.set([80, 75, 5, 6], 0), l.setUint16(4, 0, !0), l.setUint16(6, 0, !0), l.setUint16(8, o.length, !0), l.setUint16(10, o.length, !0), l.setUint32(12, s - i, !0), l.setUint32(16, i, !0), l.setUint16(20, 0, !0), t.push(r);
|
|
3008
|
+
const n = t.reduce((h, p) => h + p.length, 0), c = new Uint8Array(n);
|
|
3009
|
+
let d = 0;
|
|
3010
|
+
for (const h of t)
|
|
3011
|
+
c.set(h, d), d += h.length;
|
|
3012
|
+
return c;
|
|
3013
|
+
}
|
|
3014
|
+
generateBuffer(e, t = "") {
|
|
3015
|
+
const s = this.generateMap(e, t);
|
|
3016
|
+
return this.createZip(s);
|
|
3017
|
+
}
|
|
3018
|
+
}
|
|
3019
|
+
class he extends at {
|
|
3020
|
+
constructor(e, t, s, o, i, r = new X(), l = new xt()) {
|
|
3021
|
+
var d;
|
|
3022
|
+
if (super(e, t, new Ye(s), o), this.eventListener = i, this.copyService = r, this.excelService = l, this.licenseManager = B.getInstance(), this.selectionService = new dt(this), this.api = new Ze(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, i || (this.eventListener = new me()), (d = this.tableOptions) != null && d.autoRestoreOptions) {
|
|
3023
|
+
const h = this.tableOptions.autoRestoreOptions, p = h.getStorageKeyFn;
|
|
3024
|
+
p && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Qe(p)), h.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new tt(p)), h.autoRestoreSortingState && (this.storeSortingService = new st(p)));
|
|
2892
3025
|
}
|
|
2893
|
-
this.mouseHandler = new
|
|
3026
|
+
this.mouseHandler = new qe(this), this.inputHandler = new nt(this), this.resizeHandler = new yt(this, o.resizeEventDebounceDelay), this.shortcutService = new gt(this), this.shortcutService.addListener(this.selectionService);
|
|
2894
3027
|
const n = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
2895
3028
|
n && n.addEventSelectionChangedListener(this);
|
|
2896
|
-
const
|
|
2897
|
-
|
|
3029
|
+
const c = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
3030
|
+
c && c.addEventFocusChangedListener(this);
|
|
2898
3031
|
}
|
|
2899
3032
|
/**
|
|
2900
3033
|
* Creates a TableScope instance.
|
|
@@ -2908,7 +3041,7 @@ class he extends rt {
|
|
|
2908
3041
|
*
|
|
2909
3042
|
* @return {TableScope} - The newly created TableScope instance.
|
|
2910
3043
|
*/
|
|
2911
|
-
static create(e, t, s = new De(), o = new
|
|
3044
|
+
static create(e, t, s = new De(), o = new me(), i = new Te(), r = new X()) {
|
|
2912
3045
|
return new he(e, t, i, s, o, r);
|
|
2913
3046
|
}
|
|
2914
3047
|
/**
|
|
@@ -2937,7 +3070,7 @@ class he extends rt {
|
|
|
2937
3070
|
return !1;
|
|
2938
3071
|
}
|
|
2939
3072
|
updateModelValueAfterEdit(e, t, s, o) {
|
|
2940
|
-
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, o) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(
|
|
3073
|
+
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, o) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(de.createSingle(t, s)), this.hostElement.focus());
|
|
2941
3074
|
}
|
|
2942
3075
|
/**
|
|
2943
3076
|
* Retrieves the TableApi object.
|
|
@@ -2966,7 +3099,7 @@ class he extends rt {
|
|
|
2966
3099
|
* @return {GeMouseEvent} - The created GeMouseEvent object.
|
|
2967
3100
|
*/
|
|
2968
3101
|
createGeMouseEvent(e) {
|
|
2969
|
-
const t = new
|
|
3102
|
+
const t = new le();
|
|
2970
3103
|
if (t.originalEvent = e, e) {
|
|
2971
3104
|
const s = e.target;
|
|
2972
3105
|
if ([t.areaIdent, t.sideIdent] = this.getAreaAndSideIdentByAttr(s), t.rowIndex = this.getNumberByAttr(s, "data-row-index"), t.columnIndex = this.getNumberByAttr(s, "data-col-index"), t.action = this.getStringByAttr(s, "data-ge-action"), t.areaIdent) {
|
|
@@ -3036,7 +3169,7 @@ class he extends rt {
|
|
|
3036
3169
|
toggleExpandCollapseAll(e = !0) {
|
|
3037
3170
|
var s;
|
|
3038
3171
|
const t = this.tableModel.getBodyModel();
|
|
3039
|
-
|
|
3172
|
+
re(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
|
|
3040
3173
|
}
|
|
3041
3174
|
/**
|
|
3042
3175
|
* Toggles the checkbox state of a specific row in a table.
|
|
@@ -3048,11 +3181,11 @@ class he extends rt {
|
|
|
3048
3181
|
* @return {void} - This method does not return anything.
|
|
3049
3182
|
*/
|
|
3050
3183
|
toggleRowCheckbox(e, t, s) {
|
|
3051
|
-
var
|
|
3184
|
+
var n;
|
|
3052
3185
|
const o = this.tableModel.getAreaModel(s), i = o.isRowChecked(e), r = i === void 0 || i === "semi" || i === "none";
|
|
3053
3186
|
o.setRowChecked(e, r), this.repaint();
|
|
3054
|
-
const
|
|
3055
|
-
this.eventListener.onCheckboxChanged(
|
|
3187
|
+
const l = (n = o.rowSelectionModel) == null ? void 0 : n.getCheckedRows();
|
|
3188
|
+
this.eventListener.onCheckboxChanged(l || []);
|
|
3056
3189
|
}
|
|
3057
3190
|
/**
|
|
3058
3191
|
* Handle mouse click events.
|
|
@@ -3106,8 +3239,8 @@ class he extends rt {
|
|
|
3106
3239
|
const o = this.tableModel.getColumnDef(s);
|
|
3107
3240
|
if (o != null && o.sortable && o.sortable()) {
|
|
3108
3241
|
e.preventDefault(), e.stopPropagation();
|
|
3109
|
-
const
|
|
3110
|
-
this.tableModel.doSort([d]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((
|
|
3242
|
+
const l = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, n = o.sortState ?? "", c = l[(l.indexOf(n) + 1) % l.length], d = new lt(s, c);
|
|
3243
|
+
this.tableModel.doSort([d]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((p) => p.sortState = ""), o.sortState = c), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([d]);
|
|
3111
3244
|
}
|
|
3112
3245
|
}
|
|
3113
3246
|
/**
|
|
@@ -3252,9 +3385,9 @@ class he extends rt {
|
|
|
3252
3385
|
const s = this.tableOptions.autoRestoreOptions, o = s.getRowId;
|
|
3253
3386
|
if (s.autoRestoreCollapsedExpandedState && o) {
|
|
3254
3387
|
const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
|
|
3255
|
-
if (
|
|
3256
|
-
const
|
|
3257
|
-
for (let c = 0; c <
|
|
3388
|
+
if (re(r)) {
|
|
3389
|
+
const l = r, n = r.getRowCount();
|
|
3390
|
+
for (let c = 0; c < n; c++) {
|
|
3258
3391
|
const d = r.getRowByIndex(c);
|
|
3259
3392
|
if (d)
|
|
3260
3393
|
if (i.allExpanded)
|
|
@@ -3266,15 +3399,15 @@ class he extends rt {
|
|
|
3266
3399
|
i.mode === "expanded" ? d.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h) : i.mode === "collapsed" && (d.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h));
|
|
3267
3400
|
}
|
|
3268
3401
|
}
|
|
3269
|
-
|
|
3402
|
+
l.recalcVisibleTreeRows();
|
|
3270
3403
|
}
|
|
3271
3404
|
}
|
|
3272
3405
|
}
|
|
3273
3406
|
}
|
|
3274
3407
|
}
|
|
3275
|
-
const
|
|
3408
|
+
const K = class K {
|
|
3276
3409
|
};
|
|
3277
|
-
|
|
3410
|
+
K.themes = ["light", "combat", "paper", "blackboard"], K.vars = {
|
|
3278
3411
|
light: `html[data-theme="light"] {
|
|
3279
3412
|
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
3280
3413
|
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
@@ -3508,18 +3641,18 @@ Y.themes = ["light", "combat", "paper", "blackboard"], Y.vars = {
|
|
|
3508
3641
|
--ge-table-drop-zone-bg: #758129;
|
|
3509
3642
|
}`
|
|
3510
3643
|
};
|
|
3511
|
-
let
|
|
3512
|
-
const
|
|
3513
|
-
constructor(e = new
|
|
3644
|
+
let be = K;
|
|
3645
|
+
const Y = class Y {
|
|
3646
|
+
constructor(e = new Re()) {
|
|
3514
3647
|
this.headerGroupOptions = e;
|
|
3515
3648
|
}
|
|
3516
|
-
render(e, t, s, o, i, r,
|
|
3517
|
-
const
|
|
3649
|
+
render(e, t, s, o, i, r, l) {
|
|
3650
|
+
const n = r != null && r.data ? r.data : "";
|
|
3518
3651
|
if (r) {
|
|
3519
|
-
const { toggle: c, visibility: d, closed: h } = r,
|
|
3520
|
-
this.addText(e, o, t, s,
|
|
3652
|
+
const { toggle: c, visibility: d, closed: h } = r, p = c ? Y.toggleHeaderGroup : "";
|
|
3653
|
+
this.addText(e, o, t, s, n, p), c && d !== "always" && this.addArrowDiv(l, e, !h, t, s, o, p);
|
|
3521
3654
|
} else
|
|
3522
|
-
this.addText(e, o, t, s,
|
|
3655
|
+
this.addText(e, o, t, s, n, "");
|
|
3523
3656
|
}
|
|
3524
3657
|
addText(e, t, s, o, i, r) {
|
|
3525
3658
|
e.innerHTML = `<span
|
|
@@ -3529,113 +3662,113 @@ const U = class U {
|
|
|
3529
3662
|
data-col-index="${o}"
|
|
3530
3663
|
>${i}</span>`;
|
|
3531
3664
|
}
|
|
3532
|
-
addArrowDiv(e, t, s = !0, o = -1, i = -1, r = "header",
|
|
3533
|
-
const
|
|
3534
|
-
e.addClass(
|
|
3665
|
+
addArrowDiv(e, t, s = !0, o = -1, i = -1, r = "header", l) {
|
|
3666
|
+
const n = e.createElement("div");
|
|
3667
|
+
e.addClass(n, "ge-table-toggle-icon-div"), e.setStyle(n, "display", "inline-block"), e.setStyle(n, "position", ""), e.setStyle(n, "width", "20px"), e.setStyle(n, "background", "transparent"), e.setStyle(n, "cursor", "pointer"), e.setAttribute(n, "data-row-index", `${o}`), e.setAttribute(n, "data-col-index", `${i}`), e.setAttribute(n, "data-area", `${r}`), e.setAttribute(n, "data-ge-action", `${l}`);
|
|
3535
3668
|
let c;
|
|
3536
3669
|
s ? c = this.headerGroupOptions.iconExpanded : c = this.headerGroupOptions.iconCollapsed;
|
|
3537
3670
|
const d = c.content, h = e.createText(d);
|
|
3538
|
-
e.appendChild(
|
|
3539
|
-
for (const
|
|
3540
|
-
e.addClass(
|
|
3541
|
-
return e.appendChild(t,
|
|
3671
|
+
e.appendChild(n, h), c.style && this.applyStyleString(e, n, c.style);
|
|
3672
|
+
for (const p of c.classes)
|
|
3673
|
+
e.addClass(n, p);
|
|
3674
|
+
return e.appendChild(t, n), n;
|
|
3542
3675
|
}
|
|
3543
3676
|
applyStyleString(e, t, s) {
|
|
3544
3677
|
const o = s.split(";").map((i) => i.trim()).filter((i) => i);
|
|
3545
3678
|
for (const i of o) {
|
|
3546
|
-
const [r,
|
|
3547
|
-
e.setStyle(t, r.trim(),
|
|
3679
|
+
const [r, l] = i.split(":");
|
|
3680
|
+
e.setStyle(t, r.trim(), l.trim());
|
|
3548
3681
|
}
|
|
3549
3682
|
}
|
|
3550
3683
|
};
|
|
3551
|
-
|
|
3552
|
-
let
|
|
3553
|
-
var vt = /* @__PURE__ */
|
|
3554
|
-
const
|
|
3684
|
+
Y.toggleHeaderGroup = "toggleHeaderGroup";
|
|
3685
|
+
let Se = Y;
|
|
3686
|
+
var vt = /* @__PURE__ */ Ue("<div>");
|
|
3687
|
+
const Et = (a) => {
|
|
3555
3688
|
let e;
|
|
3556
3689
|
const t = Ee({
|
|
3557
3690
|
tableModel: null,
|
|
3558
3691
|
tableOptions: new De()
|
|
3559
|
-
},
|
|
3560
|
-
return
|
|
3692
|
+
}, a);
|
|
3693
|
+
return Oe(() => {
|
|
3561
3694
|
const s = {
|
|
3562
3695
|
onSelectionChanged(r) {
|
|
3563
|
-
const
|
|
3696
|
+
const l = new CustomEvent("selectionChanged", {
|
|
3564
3697
|
detail: r,
|
|
3565
3698
|
bubbles: !0
|
|
3566
3699
|
});
|
|
3567
|
-
e && e.dispatchEvent(
|
|
3700
|
+
e && e.dispatchEvent(l);
|
|
3568
3701
|
},
|
|
3569
3702
|
onFocusChanged(r) {
|
|
3570
|
-
const
|
|
3703
|
+
const l = new CustomEvent("focusChanged", {
|
|
3571
3704
|
detail: r,
|
|
3572
3705
|
bubbles: !0
|
|
3573
3706
|
});
|
|
3574
|
-
e && e.dispatchEvent(
|
|
3707
|
+
e && e.dispatchEvent(l);
|
|
3575
3708
|
},
|
|
3576
3709
|
onCheckboxChanged: (r) => {
|
|
3577
|
-
const
|
|
3710
|
+
const l = new CustomEvent("checkboxChanged", {
|
|
3578
3711
|
detail: r,
|
|
3579
3712
|
bubbles: !0
|
|
3580
3713
|
});
|
|
3581
|
-
e && e.dispatchEvent(
|
|
3714
|
+
e && e.dispatchEvent(l);
|
|
3582
3715
|
},
|
|
3583
3716
|
onContextmenu: (r) => {
|
|
3584
|
-
const
|
|
3717
|
+
const l = new CustomEvent("contextmenu", {
|
|
3585
3718
|
detail: r,
|
|
3586
3719
|
bubbles: !0
|
|
3587
3720
|
});
|
|
3588
|
-
e && e.dispatchEvent(
|
|
3721
|
+
e && e.dispatchEvent(l);
|
|
3589
3722
|
},
|
|
3590
3723
|
onModelChanged: (r) => {
|
|
3591
|
-
const
|
|
3724
|
+
const l = new CustomEvent("modelChanged", {
|
|
3592
3725
|
detail: r,
|
|
3593
3726
|
bubbles: !0
|
|
3594
3727
|
});
|
|
3595
|
-
e && e.dispatchEvent(
|
|
3728
|
+
e && e.dispatchEvent(l);
|
|
3596
3729
|
},
|
|
3597
3730
|
onMouseClicked: (r) => {
|
|
3598
|
-
const
|
|
3731
|
+
const l = new CustomEvent("mouseClicked", {
|
|
3599
3732
|
detail: r,
|
|
3600
3733
|
bubbles: !0
|
|
3601
3734
|
});
|
|
3602
|
-
e && e.dispatchEvent(
|
|
3735
|
+
e && e.dispatchEvent(l);
|
|
3603
3736
|
},
|
|
3604
3737
|
onMouseDragging: (r) => {
|
|
3605
|
-
const
|
|
3738
|
+
const l = new CustomEvent("mouseDragging", {
|
|
3606
3739
|
detail: r,
|
|
3607
3740
|
bubbles: !0
|
|
3608
3741
|
});
|
|
3609
|
-
e && e.dispatchEvent(
|
|
3742
|
+
e && e.dispatchEvent(l);
|
|
3610
3743
|
},
|
|
3611
3744
|
onMouseDraggingEnd: (r) => {
|
|
3612
|
-
const
|
|
3745
|
+
const l = new CustomEvent("mouseDraggingEnd", {
|
|
3613
3746
|
detail: r,
|
|
3614
3747
|
bubbles: !0
|
|
3615
3748
|
});
|
|
3616
|
-
e && e.dispatchEvent(
|
|
3749
|
+
e && e.dispatchEvent(l);
|
|
3617
3750
|
},
|
|
3618
3751
|
onMouseMoved: (r) => {
|
|
3619
|
-
const
|
|
3752
|
+
const l = new CustomEvent("mouseMoved", {
|
|
3620
3753
|
detail: r,
|
|
3621
3754
|
bubbles: !0
|
|
3622
3755
|
});
|
|
3623
|
-
e && e.dispatchEvent(
|
|
3756
|
+
e && e.dispatchEvent(l);
|
|
3624
3757
|
}
|
|
3625
|
-
}, o = new he(e, t.tableModel, new
|
|
3758
|
+
}, o = new he(e, t.tableModel, new Te(), t.tableOptions, s);
|
|
3626
3759
|
o.firstInit();
|
|
3627
3760
|
const i = new CustomEvent("tableReady", {
|
|
3628
3761
|
detail: o.getApi(),
|
|
3629
3762
|
bubbles: !0
|
|
3630
3763
|
});
|
|
3631
|
-
e && e.dispatchEvent(i), t.licenseKey &&
|
|
3764
|
+
e && e.dispatchEvent(i), t.licenseKey && B.getInstance().setLicenseKey(t.licenseKey);
|
|
3632
3765
|
}), (() => {
|
|
3633
3766
|
var s = vt(), o = e;
|
|
3634
|
-
return typeof o == "function" ?
|
|
3767
|
+
return typeof o == "function" ? je(o, s) : e = s, s;
|
|
3635
3768
|
})();
|
|
3636
3769
|
};
|
|
3637
3770
|
export {
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3771
|
+
Ct as ComponentRendererWrapper,
|
|
3772
|
+
Et as GuiexpertTable,
|
|
3773
|
+
wt as GuiexpertTableProps
|
|
3641
3774
|
};
|