@guiexpert/solid-table 1.1.83 → 1.1.84
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/ComponentRendererWrapper.d.ts +2 -1
- package/GuiexpertTable.d.ts +2 -1
- package/GuiexpertTableProps.d.ts +4 -1
- package/RendererPropsIf.d.ts +1 -0
- package/index.cjs +17 -250
- package/index.d.ts +3 -2
- package/index.js +981 -1252
- package/package.json +8 -5
package/index.js
CHANGED
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
const
|
|
2
|
-
equals:
|
|
1
|
+
const Re = (r, e) => r === e, te = Symbol("solid-proxy"), Me = typeof Proxy == "function", pe = {
|
|
2
|
+
equals: Re
|
|
3
3
|
};
|
|
4
|
-
let
|
|
5
|
-
const
|
|
4
|
+
let ge = ye;
|
|
5
|
+
const P = 1, U = 2, Se = {
|
|
6
6
|
owned: null,
|
|
7
7
|
cleanups: null,
|
|
8
8
|
context: null,
|
|
9
9
|
owner: null
|
|
10
10
|
};
|
|
11
11
|
var M = null;
|
|
12
|
-
let
|
|
13
|
-
function
|
|
14
|
-
const t = x, s = M,
|
|
12
|
+
let Q = null, Te = null, x = null, R = null, O = null, J = 0;
|
|
13
|
+
function Fe(r, e) {
|
|
14
|
+
const t = x, s = M, i = r.length === 0, o = e === void 0 ? s : e, l = i ? Se : {
|
|
15
15
|
owned: null,
|
|
16
16
|
cleanups: null,
|
|
17
|
-
context:
|
|
18
|
-
owner:
|
|
19
|
-
},
|
|
20
|
-
M =
|
|
17
|
+
context: o ? o.context : null,
|
|
18
|
+
owner: o
|
|
19
|
+
}, n = i ? r : () => r(() => q(() => H(l)));
|
|
20
|
+
M = l, x = null;
|
|
21
21
|
try {
|
|
22
|
-
return _(
|
|
22
|
+
return _(n, !0);
|
|
23
23
|
} finally {
|
|
24
24
|
x = t, M = s;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
const s =
|
|
27
|
+
function se(r, e, t) {
|
|
28
|
+
const s = le(r, e, !1, P);
|
|
29
29
|
$(s);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
|
|
33
|
-
const s =
|
|
31
|
+
function De(r, e, t) {
|
|
32
|
+
ge = ke;
|
|
33
|
+
const s = le(r, e, !1, P);
|
|
34
34
|
s.user = !0, O ? O.push(s) : $(s);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
t = t ? Object.assign({},
|
|
38
|
-
const s =
|
|
39
|
-
return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, $(s),
|
|
36
|
+
function Ie(r, e, t) {
|
|
37
|
+
t = t ? Object.assign({}, pe, t) : pe;
|
|
38
|
+
const s = le(r, e, !0, 0);
|
|
39
|
+
return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, $(s), Oe.bind(s);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
if (x === null) return
|
|
41
|
+
function q(r) {
|
|
42
|
+
if (x === null) return r();
|
|
43
43
|
const e = x;
|
|
44
44
|
x = null;
|
|
45
45
|
try {
|
|
46
|
-
return
|
|
46
|
+
return r();
|
|
47
47
|
} finally {
|
|
48
48
|
x = e;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
|
|
51
|
+
function Le(r) {
|
|
52
|
+
De(() => q(r));
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Oe() {
|
|
55
55
|
if (this.sources && this.state)
|
|
56
|
-
if (this.state ===
|
|
56
|
+
if (this.state === P) $(this);
|
|
57
57
|
else {
|
|
58
|
-
const
|
|
59
|
-
R = null, _(() =>
|
|
58
|
+
const r = R;
|
|
59
|
+
R = null, _(() => X(this), !1), R = r;
|
|
60
60
|
}
|
|
61
61
|
if (x) {
|
|
62
|
-
const
|
|
63
|
-
x.sources ? (x.sources.push(this), x.sourceSlots.push(
|
|
62
|
+
const r = this.observers ? this.observers.length : 0;
|
|
63
|
+
x.sources ? (x.sources.push(this), x.sourceSlots.push(r)) : (x.sources = [this], x.sourceSlots = [r]), this.observers ? (this.observers.push(x), this.observerSlots.push(x.sources.length - 1)) : (this.observers = [x], this.observerSlots = [x.sources.length - 1]);
|
|
64
64
|
}
|
|
65
65
|
return this.value;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
let s =
|
|
69
|
-
return (!
|
|
70
|
-
for (let
|
|
71
|
-
const
|
|
72
|
-
|
|
67
|
+
function Be(r, e, t) {
|
|
68
|
+
let s = r.value;
|
|
69
|
+
return (!r.comparator || !r.comparator(s, e)) && (r.value = e, r.observers && r.observers.length && _(() => {
|
|
70
|
+
for (let i = 0; i < r.observers.length; i += 1) {
|
|
71
|
+
const o = r.observers[i], l = Q && Q.running;
|
|
72
|
+
l && Q.disposed.has(o), (l ? !o.tState : !o.state) && (o.pure ? R.push(o) : O.push(o), o.observers && be(o)), l || (o.state = P);
|
|
73
73
|
}
|
|
74
74
|
if (R.length > 1e6)
|
|
75
75
|
throw R = [], new Error();
|
|
76
76
|
}, !1)), e;
|
|
77
77
|
}
|
|
78
|
-
function $(
|
|
79
|
-
if (!
|
|
80
|
-
H(
|
|
81
|
-
const e =
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
function $(r) {
|
|
79
|
+
if (!r.fn) return;
|
|
80
|
+
H(r);
|
|
81
|
+
const e = J;
|
|
82
|
+
Pe(
|
|
83
|
+
r,
|
|
84
|
+
r.value,
|
|
85
85
|
e
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Pe(r, e, t) {
|
|
89
89
|
let s;
|
|
90
|
-
const
|
|
91
|
-
x = M =
|
|
90
|
+
const i = M, o = x;
|
|
91
|
+
x = M = r;
|
|
92
92
|
try {
|
|
93
|
-
s =
|
|
94
|
-
} catch (
|
|
95
|
-
return
|
|
93
|
+
s = r.fn(e);
|
|
94
|
+
} catch (l) {
|
|
95
|
+
return r.pure && (r.state = P, r.owned && r.owned.forEach(H), r.owned = null), r.updatedAt = t + 1, we(l);
|
|
96
96
|
} finally {
|
|
97
|
-
x =
|
|
97
|
+
x = o, M = i;
|
|
98
98
|
}
|
|
99
|
-
(!
|
|
99
|
+
(!r.updatedAt || r.updatedAt <= t) && (r.updatedAt != null && "observers" in r ? Be(r, s) : r.value = s, r.updatedAt = t);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
const
|
|
103
|
-
fn:
|
|
101
|
+
function le(r, e, t, s = P, i) {
|
|
102
|
+
const o = {
|
|
103
|
+
fn: r,
|
|
104
104
|
state: s,
|
|
105
105
|
updatedAt: null,
|
|
106
106
|
owned: null,
|
|
@@ -112,372 +112,372 @@ function ae(l, e, t, s = B, o) {
|
|
|
112
112
|
context: M ? M.context : null,
|
|
113
113
|
pure: t
|
|
114
114
|
};
|
|
115
|
-
return M === null || M !==
|
|
115
|
+
return M === null || M !== Se && (M.owned ? M.owned.push(o) : M.owned = [o]), o;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
if (
|
|
119
|
-
if (
|
|
120
|
-
if (
|
|
121
|
-
const e = [
|
|
122
|
-
for (; (
|
|
123
|
-
|
|
117
|
+
function j(r) {
|
|
118
|
+
if (r.state === 0) return;
|
|
119
|
+
if (r.state === U) return X(r);
|
|
120
|
+
if (r.suspense && q(r.suspense.inFallback)) return r.suspense.effects.push(r);
|
|
121
|
+
const e = [r];
|
|
122
|
+
for (; (r = r.owner) && (!r.updatedAt || r.updatedAt < J); )
|
|
123
|
+
r.state && e.push(r);
|
|
124
124
|
for (let t = e.length - 1; t >= 0; t--)
|
|
125
|
-
if (
|
|
126
|
-
$(
|
|
127
|
-
else if (
|
|
125
|
+
if (r = e[t], r.state === P)
|
|
126
|
+
$(r);
|
|
127
|
+
else if (r.state === U) {
|
|
128
128
|
const s = R;
|
|
129
|
-
R = null, _(() =>
|
|
129
|
+
R = null, _(() => X(r, e[0]), !1), R = s;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
function _(
|
|
133
|
-
if (R) return
|
|
132
|
+
function _(r, e) {
|
|
133
|
+
if (R) return r();
|
|
134
134
|
let t = !1;
|
|
135
|
-
e || (R = []), O ? t = !0 : O = [],
|
|
135
|
+
e || (R = []), O ? t = !0 : O = [], J++;
|
|
136
136
|
try {
|
|
137
|
-
const s =
|
|
138
|
-
return
|
|
137
|
+
const s = r();
|
|
138
|
+
return Ve(t), s;
|
|
139
139
|
} catch (s) {
|
|
140
|
-
t || (O = null), R = null,
|
|
140
|
+
t || (O = null), R = null, we(s);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
if (R && (
|
|
143
|
+
function Ve(r) {
|
|
144
|
+
if (R && (ye(R), R = null), r) return;
|
|
145
145
|
const e = O;
|
|
146
|
-
O = null, e.length && _(() =>
|
|
146
|
+
O = null, e.length && _(() => ge(e), !1);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
for (let e = 0; e <
|
|
148
|
+
function ye(r) {
|
|
149
|
+
for (let e = 0; e < r.length; e++) j(r[e]);
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function ke(r) {
|
|
152
152
|
let e, t = 0;
|
|
153
|
-
for (e = 0; e <
|
|
154
|
-
const s =
|
|
155
|
-
s.user ?
|
|
153
|
+
for (e = 0; e < r.length; e++) {
|
|
154
|
+
const s = r[e];
|
|
155
|
+
s.user ? r[t++] = s : j(s);
|
|
156
156
|
}
|
|
157
|
-
for (e = 0; e < t; e++)
|
|
157
|
+
for (e = 0; e < t; e++) j(r[e]);
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
|
|
161
|
-
for (let t = 0; t <
|
|
162
|
-
const s =
|
|
159
|
+
function X(r, e) {
|
|
160
|
+
r.state = 0;
|
|
161
|
+
for (let t = 0; t < r.sources.length; t += 1) {
|
|
162
|
+
const s = r.sources[t];
|
|
163
163
|
if (s.sources) {
|
|
164
|
-
const
|
|
165
|
-
|
|
164
|
+
const i = s.state;
|
|
165
|
+
i === P ? s !== e && (!s.updatedAt || s.updatedAt < J) && j(s) : i === U && X(s, e);
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
for (let e = 0; e <
|
|
171
|
-
const t =
|
|
172
|
-
t.state || (t.state =
|
|
169
|
+
function be(r) {
|
|
170
|
+
for (let e = 0; e < r.observers.length; e += 1) {
|
|
171
|
+
const t = r.observers[e];
|
|
172
|
+
t.state || (t.state = U, t.pure ? R.push(t) : O.push(t), t.observers && be(t));
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
-
function H(
|
|
175
|
+
function H(r) {
|
|
176
176
|
let e;
|
|
177
|
-
if (
|
|
178
|
-
for (;
|
|
179
|
-
const t =
|
|
180
|
-
if (
|
|
181
|
-
const
|
|
182
|
-
s <
|
|
177
|
+
if (r.sources)
|
|
178
|
+
for (; r.sources.length; ) {
|
|
179
|
+
const t = r.sources.pop(), s = r.sourceSlots.pop(), i = t.observers;
|
|
180
|
+
if (i && i.length) {
|
|
181
|
+
const o = i.pop(), l = t.observerSlots.pop();
|
|
182
|
+
s < i.length && (o.sourceSlots[l] = s, i[s] = o, t.observerSlots[s] = l);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
if (
|
|
186
|
-
for (e =
|
|
187
|
-
delete
|
|
185
|
+
if (r.tOwned) {
|
|
186
|
+
for (e = r.tOwned.length - 1; e >= 0; e--) H(r.tOwned[e]);
|
|
187
|
+
delete r.tOwned;
|
|
188
188
|
}
|
|
189
|
-
if (
|
|
190
|
-
for (e =
|
|
191
|
-
|
|
189
|
+
if (r.owned) {
|
|
190
|
+
for (e = r.owned.length - 1; e >= 0; e--) H(r.owned[e]);
|
|
191
|
+
r.owned = null;
|
|
192
192
|
}
|
|
193
|
-
if (
|
|
194
|
-
for (e =
|
|
195
|
-
|
|
193
|
+
if (r.cleanups) {
|
|
194
|
+
for (e = r.cleanups.length - 1; e >= 0; e--) r.cleanups[e]();
|
|
195
|
+
r.cleanups = null;
|
|
196
196
|
}
|
|
197
|
-
|
|
197
|
+
r.state = 0;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
return
|
|
201
|
-
cause:
|
|
199
|
+
function We(r) {
|
|
200
|
+
return r instanceof Error ? r : new Error(typeof r == "string" ? r : "Unknown error", {
|
|
201
|
+
cause: r
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
throw
|
|
204
|
+
function we(r, e = M) {
|
|
205
|
+
throw We(r);
|
|
206
206
|
}
|
|
207
207
|
function G() {
|
|
208
208
|
return !0;
|
|
209
209
|
}
|
|
210
|
-
const
|
|
211
|
-
get(
|
|
212
|
-
return e ===
|
|
210
|
+
const He = {
|
|
211
|
+
get(r, e, t) {
|
|
212
|
+
return e === te ? t : r.get(e);
|
|
213
213
|
},
|
|
214
|
-
has(
|
|
215
|
-
return e ===
|
|
214
|
+
has(r, e) {
|
|
215
|
+
return e === te ? !0 : r.has(e);
|
|
216
216
|
},
|
|
217
217
|
set: G,
|
|
218
218
|
deleteProperty: G,
|
|
219
|
-
getOwnPropertyDescriptor(
|
|
219
|
+
getOwnPropertyDescriptor(r, e) {
|
|
220
220
|
return {
|
|
221
221
|
configurable: !0,
|
|
222
222
|
enumerable: !0,
|
|
223
223
|
get() {
|
|
224
|
-
return
|
|
224
|
+
return r.get(e);
|
|
225
225
|
},
|
|
226
226
|
set: G,
|
|
227
227
|
deleteProperty: G
|
|
228
228
|
};
|
|
229
229
|
},
|
|
230
|
-
ownKeys(
|
|
231
|
-
return
|
|
230
|
+
ownKeys(r) {
|
|
231
|
+
return r.keys();
|
|
232
232
|
}
|
|
233
233
|
};
|
|
234
|
-
function
|
|
235
|
-
return (
|
|
234
|
+
function ee(r) {
|
|
235
|
+
return (r = typeof r == "function" ? r() : r) ? r : {};
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
for (let
|
|
239
|
-
const t = this[
|
|
237
|
+
function $e() {
|
|
238
|
+
for (let r = 0, e = this.length; r < e; ++r) {
|
|
239
|
+
const t = this[r]();
|
|
240
240
|
if (t !== void 0) return t;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function xe(...r) {
|
|
244
244
|
let e = !1;
|
|
245
|
-
for (let
|
|
246
|
-
const
|
|
247
|
-
e = e || !!
|
|
245
|
+
for (let l = 0; l < r.length; l++) {
|
|
246
|
+
const n = r[l];
|
|
247
|
+
e = e || !!n && te in n, r[l] = typeof n == "function" ? (e = !0, Ie(n)) : n;
|
|
248
248
|
}
|
|
249
|
-
if (
|
|
249
|
+
if (Me && e)
|
|
250
250
|
return new Proxy(
|
|
251
251
|
{
|
|
252
|
-
get(
|
|
253
|
-
for (let
|
|
254
|
-
const
|
|
255
|
-
if (
|
|
252
|
+
get(l) {
|
|
253
|
+
for (let n = r.length - 1; n >= 0; n--) {
|
|
254
|
+
const a = ee(r[n])[l];
|
|
255
|
+
if (a !== void 0) return a;
|
|
256
256
|
}
|
|
257
257
|
},
|
|
258
|
-
has(
|
|
259
|
-
for (let
|
|
260
|
-
if (
|
|
258
|
+
has(l) {
|
|
259
|
+
for (let n = r.length - 1; n >= 0; n--)
|
|
260
|
+
if (l in ee(r[n])) return !0;
|
|
261
261
|
return !1;
|
|
262
262
|
},
|
|
263
263
|
keys() {
|
|
264
|
-
const
|
|
265
|
-
for (let
|
|
266
|
-
|
|
267
|
-
return [...new Set(
|
|
264
|
+
const l = [];
|
|
265
|
+
for (let n = 0; n < r.length; n++)
|
|
266
|
+
l.push(...Object.keys(ee(r[n])));
|
|
267
|
+
return [...new Set(l)];
|
|
268
268
|
}
|
|
269
269
|
},
|
|
270
|
-
|
|
270
|
+
He
|
|
271
271
|
);
|
|
272
272
|
const t = {}, s = /* @__PURE__ */ Object.create(null);
|
|
273
|
-
for (let
|
|
274
|
-
const
|
|
275
|
-
if (!
|
|
276
|
-
const
|
|
277
|
-
for (let d =
|
|
278
|
-
const c =
|
|
273
|
+
for (let l = r.length - 1; l >= 0; l--) {
|
|
274
|
+
const n = r[l];
|
|
275
|
+
if (!n) continue;
|
|
276
|
+
const a = Object.getOwnPropertyNames(n);
|
|
277
|
+
for (let d = a.length - 1; d >= 0; d--) {
|
|
278
|
+
const c = a[d];
|
|
279
279
|
if (c === "__proto__" || c === "constructor") continue;
|
|
280
|
-
const h = Object.getOwnPropertyDescriptor(
|
|
280
|
+
const h = Object.getOwnPropertyDescriptor(n, c);
|
|
281
281
|
if (!s[c])
|
|
282
282
|
s[c] = h.get ? {
|
|
283
283
|
enumerable: !0,
|
|
284
284
|
configurable: !0,
|
|
285
|
-
get:
|
|
285
|
+
get: $e.bind(t[c] = [h.get.bind(n)])
|
|
286
286
|
} : h.value !== void 0 ? h : void 0;
|
|
287
287
|
else {
|
|
288
288
|
const p = t[c];
|
|
289
|
-
p && (h.get ? p.push(h.get.bind(
|
|
289
|
+
p && (h.get ? p.push(h.get.bind(n)) : h.value !== void 0 && p.push(() => h.value));
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
const
|
|
294
|
-
for (let
|
|
295
|
-
const
|
|
296
|
-
|
|
293
|
+
const i = {}, o = Object.keys(s);
|
|
294
|
+
for (let l = o.length - 1; l >= 0; l--) {
|
|
295
|
+
const n = o[l], a = s[n];
|
|
296
|
+
a && a.get ? Object.defineProperty(i, n, a) : i[n] = a ? a.value : void 0;
|
|
297
297
|
}
|
|
298
|
-
return
|
|
298
|
+
return i;
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
let s = t.length,
|
|
302
|
-
for (;
|
|
303
|
-
if (e[
|
|
304
|
-
|
|
300
|
+
function _e(r, e, t) {
|
|
301
|
+
let s = t.length, i = e.length, o = s, l = 0, n = 0, a = e[i - 1].nextSibling, d = null;
|
|
302
|
+
for (; l < i || n < o; ) {
|
|
303
|
+
if (e[l] === t[n]) {
|
|
304
|
+
l++, n++;
|
|
305
305
|
continue;
|
|
306
306
|
}
|
|
307
|
-
for (; e[
|
|
308
|
-
|
|
309
|
-
if (
|
|
310
|
-
const c =
|
|
311
|
-
for (;
|
|
312
|
-
} else if (
|
|
313
|
-
for (;
|
|
314
|
-
(!d || !d.has(e[
|
|
315
|
-
else if (e[
|
|
316
|
-
const c = e[--
|
|
317
|
-
|
|
307
|
+
for (; e[i - 1] === t[o - 1]; )
|
|
308
|
+
i--, o--;
|
|
309
|
+
if (i === l) {
|
|
310
|
+
const c = o < s ? n ? t[n - 1].nextSibling : t[o - n] : a;
|
|
311
|
+
for (; n < o; ) r.insertBefore(t[n++], c);
|
|
312
|
+
} else if (o === n)
|
|
313
|
+
for (; l < i; )
|
|
314
|
+
(!d || !d.has(e[l])) && e[l].remove(), l++;
|
|
315
|
+
else if (e[l] === t[o - 1] && t[n] === e[i - 1]) {
|
|
316
|
+
const c = e[--i].nextSibling;
|
|
317
|
+
r.insertBefore(t[n++], e[l++].nextSibling), r.insertBefore(t[--o], c), e[i] = t[o];
|
|
318
318
|
} else {
|
|
319
319
|
if (!d) {
|
|
320
320
|
d = /* @__PURE__ */ new Map();
|
|
321
|
-
let h =
|
|
322
|
-
for (; h <
|
|
321
|
+
let h = n;
|
|
322
|
+
for (; h < o; ) d.set(t[h], h++);
|
|
323
323
|
}
|
|
324
|
-
const c = d.get(e[
|
|
324
|
+
const c = d.get(e[l]);
|
|
325
325
|
if (c != null)
|
|
326
|
-
if (
|
|
327
|
-
let h =
|
|
328
|
-
for (; ++h <
|
|
326
|
+
if (n < c && c < o) {
|
|
327
|
+
let h = l, p = 1, g;
|
|
328
|
+
for (; ++h < i && h < o && !((g = d.get(e[h])) == null || g !== c + p); )
|
|
329
329
|
p++;
|
|
330
|
-
if (p > c -
|
|
331
|
-
const
|
|
332
|
-
for (;
|
|
333
|
-
} else
|
|
334
|
-
} else
|
|
335
|
-
else e[
|
|
330
|
+
if (p > c - n) {
|
|
331
|
+
const u = e[l];
|
|
332
|
+
for (; n < c; ) r.insertBefore(t[n++], u);
|
|
333
|
+
} else r.replaceChild(t[n++], e[l++]);
|
|
334
|
+
} else l++;
|
|
335
|
+
else e[l++].remove();
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
function
|
|
340
|
-
let
|
|
341
|
-
return
|
|
342
|
-
|
|
339
|
+
function Ne(r, e, t, s = {}) {
|
|
340
|
+
let i;
|
|
341
|
+
return Fe((o) => {
|
|
342
|
+
i = o, e === document ? r() : je(e, r(), e.firstChild ? null : void 0, t);
|
|
343
343
|
}, s.owner), () => {
|
|
344
|
-
|
|
344
|
+
i(), e.textContent = "";
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function Ge(r, e, t) {
|
|
348
348
|
let s;
|
|
349
|
-
const
|
|
350
|
-
const
|
|
351
|
-
return
|
|
352
|
-
},
|
|
353
|
-
return
|
|
349
|
+
const i = () => {
|
|
350
|
+
const l = document.createElement("template");
|
|
351
|
+
return l.innerHTML = r, l.content.firstChild;
|
|
352
|
+
}, o = () => (s || (s = i())).cloneNode(!0);
|
|
353
|
+
return o.cloneNode = o, o;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
356
|
-
return
|
|
355
|
+
function Ue(r, e, t) {
|
|
356
|
+
return q(() => r(e, t));
|
|
357
357
|
}
|
|
358
|
-
function
|
|
359
|
-
if (t !== void 0 && !s && (s = []), typeof e != "function") return
|
|
360
|
-
|
|
358
|
+
function je(r, e, t, s) {
|
|
359
|
+
if (t !== void 0 && !s && (s = []), typeof e != "function") return z(r, e, s, t);
|
|
360
|
+
se((i) => z(r, e(), i, t), s);
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function z(r, e, t, s, i) {
|
|
363
363
|
for (; typeof t == "function"; ) t = t();
|
|
364
364
|
if (e === t) return t;
|
|
365
|
-
const
|
|
366
|
-
if (
|
|
367
|
-
if (
|
|
365
|
+
const o = typeof e, l = s !== void 0;
|
|
366
|
+
if (r = l && t[0] && t[0].parentNode || r, o === "string" || o === "number") {
|
|
367
|
+
if (o === "number" && (e = e.toString(), e === t))
|
|
368
368
|
return t;
|
|
369
|
-
if (
|
|
370
|
-
let
|
|
371
|
-
|
|
369
|
+
if (l) {
|
|
370
|
+
let n = t[0];
|
|
371
|
+
n && n.nodeType === 3 ? n.data !== e && (n.data = e) : n = document.createTextNode(e), t = k(r, t, s, n);
|
|
372
372
|
} else
|
|
373
|
-
t !== "" && typeof t == "string" ? t =
|
|
374
|
-
} else if (e == null ||
|
|
375
|
-
t =
|
|
373
|
+
t !== "" && typeof t == "string" ? t = r.firstChild.data = e : t = r.textContent = e;
|
|
374
|
+
} else if (e == null || o === "boolean")
|
|
375
|
+
t = k(r, t, s);
|
|
376
376
|
else {
|
|
377
|
-
if (
|
|
378
|
-
return
|
|
379
|
-
let
|
|
380
|
-
for (; typeof
|
|
381
|
-
t =
|
|
377
|
+
if (o === "function")
|
|
378
|
+
return se(() => {
|
|
379
|
+
let n = e();
|
|
380
|
+
for (; typeof n == "function"; ) n = n();
|
|
381
|
+
t = z(r, n, t, s);
|
|
382
382
|
}), () => t;
|
|
383
383
|
if (Array.isArray(e)) {
|
|
384
|
-
const
|
|
385
|
-
if (
|
|
386
|
-
return
|
|
387
|
-
if (
|
|
388
|
-
if (t =
|
|
389
|
-
} else
|
|
390
|
-
t =
|
|
384
|
+
const n = [], a = t && Array.isArray(t);
|
|
385
|
+
if (ie(n, e, t, i))
|
|
386
|
+
return se(() => t = z(r, n, t, s, !0)), () => t;
|
|
387
|
+
if (n.length === 0) {
|
|
388
|
+
if (t = k(r, t, s), l) return t;
|
|
389
|
+
} else a ? t.length === 0 ? ue(r, n, s) : _e(r, t, n) : (t && k(r), ue(r, n));
|
|
390
|
+
t = n;
|
|
391
391
|
} else if (e.nodeType) {
|
|
392
392
|
if (Array.isArray(t)) {
|
|
393
|
-
if (
|
|
394
|
-
|
|
395
|
-
} else t == null || t === "" || !
|
|
393
|
+
if (l) return t = k(r, t, s, e);
|
|
394
|
+
k(r, t, null, e);
|
|
395
|
+
} else t == null || t === "" || !r.firstChild ? r.appendChild(e) : r.replaceChild(e, r.firstChild);
|
|
396
396
|
t = e;
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
return t;
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
let
|
|
403
|
-
for (let
|
|
404
|
-
let
|
|
405
|
-
if (!(
|
|
406
|
-
|
|
407
|
-
else if (Array.isArray(
|
|
408
|
-
|
|
401
|
+
function ie(r, e, t, s) {
|
|
402
|
+
let i = !1;
|
|
403
|
+
for (let o = 0, l = e.length; o < l; o++) {
|
|
404
|
+
let n = e[o], a = t && t[r.length], d;
|
|
405
|
+
if (!(n == null || n === !0 || n === !1)) if ((d = typeof n) == "object" && n.nodeType)
|
|
406
|
+
r.push(n);
|
|
407
|
+
else if (Array.isArray(n))
|
|
408
|
+
i = ie(r, n, a) || i;
|
|
409
409
|
else if (d === "function")
|
|
410
410
|
if (s) {
|
|
411
|
-
for (; typeof
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
Array.isArray(
|
|
415
|
-
Array.isArray(
|
|
416
|
-
) ||
|
|
411
|
+
for (; typeof n == "function"; ) n = n();
|
|
412
|
+
i = ie(
|
|
413
|
+
r,
|
|
414
|
+
Array.isArray(n) ? n : [n],
|
|
415
|
+
Array.isArray(a) ? a : [a]
|
|
416
|
+
) || i;
|
|
417
417
|
} else
|
|
418
|
-
|
|
418
|
+
r.push(n), i = !0;
|
|
419
419
|
else {
|
|
420
|
-
const c = String(
|
|
421
|
-
|
|
420
|
+
const c = String(n);
|
|
421
|
+
a && a.nodeType === 3 && a.data === c ? r.push(a) : r.push(document.createTextNode(c));
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
return
|
|
424
|
+
return i;
|
|
425
425
|
}
|
|
426
|
-
function ue(
|
|
427
|
-
for (let s = 0,
|
|
426
|
+
function ue(r, e, t = null) {
|
|
427
|
+
for (let s = 0, i = e.length; s < i; s++) r.insertBefore(e[s], t);
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
if (t === void 0) return
|
|
431
|
-
const
|
|
429
|
+
function k(r, e, t, s) {
|
|
430
|
+
if (t === void 0) return r.textContent = "";
|
|
431
|
+
const i = s || document.createTextNode("");
|
|
432
432
|
if (e.length) {
|
|
433
|
-
let
|
|
434
|
-
for (let
|
|
435
|
-
const
|
|
436
|
-
if (
|
|
437
|
-
const
|
|
438
|
-
!
|
|
439
|
-
} else
|
|
433
|
+
let o = !1;
|
|
434
|
+
for (let l = e.length - 1; l >= 0; l--) {
|
|
435
|
+
const n = e[l];
|
|
436
|
+
if (i !== n) {
|
|
437
|
+
const a = n.parentNode === r;
|
|
438
|
+
!o && !l ? a ? r.replaceChild(i, n) : r.insertBefore(i, t) : a && n.remove();
|
|
439
|
+
} else o = !0;
|
|
440
440
|
}
|
|
441
|
-
} else
|
|
442
|
-
return [
|
|
441
|
+
} else r.insertBefore(i, t);
|
|
442
|
+
return [i];
|
|
443
443
|
}
|
|
444
|
-
class
|
|
444
|
+
class Et {
|
|
445
445
|
constructor(e) {
|
|
446
446
|
this.code = e;
|
|
447
447
|
}
|
|
448
|
-
render(e, t, s,
|
|
449
|
-
const
|
|
448
|
+
render(e, t, s, i, o, l, n) {
|
|
449
|
+
const a = xe({
|
|
450
450
|
rowIndex: t,
|
|
451
451
|
columnIndex: s,
|
|
452
|
-
areaIdent:
|
|
453
|
-
areaModel:
|
|
454
|
-
cellValue:
|
|
452
|
+
areaIdent: i,
|
|
453
|
+
areaModel: o,
|
|
454
|
+
cellValue: l
|
|
455
455
|
});
|
|
456
|
-
|
|
457
|
-
() => this.code(
|
|
456
|
+
Ne(
|
|
457
|
+
() => this.code(a),
|
|
458
458
|
e
|
|
459
459
|
);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
const
|
|
462
|
+
const Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
463
463
|
__proto__: null
|
|
464
464
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
465
|
-
function
|
|
465
|
+
function Xe(r, e = 500) {
|
|
466
466
|
let t = null;
|
|
467
467
|
return function(...s) {
|
|
468
468
|
t && window.clearTimeout(t), t = window.setTimeout(() => {
|
|
469
|
-
|
|
469
|
+
r.apply(this, s), t = null;
|
|
470
470
|
}, e);
|
|
471
471
|
};
|
|
472
472
|
}
|
|
473
|
-
class
|
|
473
|
+
class V {
|
|
474
474
|
// The constructor is private to prevent direct construction calls
|
|
475
475
|
// with the `new` operator
|
|
476
476
|
constructor() {
|
|
477
477
|
this.alreadySet = !1;
|
|
478
478
|
}
|
|
479
479
|
static getInstance() {
|
|
480
|
-
return
|
|
480
|
+
return V.instance || (V.instance = new V()), V.instance;
|
|
481
481
|
}
|
|
482
482
|
/**
|
|
483
483
|
* Method to set the license key for the application.
|
|
@@ -495,18 +495,18 @@ class P {
|
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
function K(
|
|
499
|
-
return
|
|
498
|
+
function K(r) {
|
|
499
|
+
return r && r.type === "TreeRow";
|
|
500
500
|
}
|
|
501
|
-
function
|
|
502
|
-
return
|
|
501
|
+
function oe(r) {
|
|
502
|
+
return r && r.type === "AreaModelTree";
|
|
503
503
|
}
|
|
504
|
-
class
|
|
505
|
-
constructor(e = -1, t = -1, s = -1,
|
|
506
|
-
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft =
|
|
504
|
+
class re {
|
|
505
|
+
constructor(e = -1, t = -1, s = -1, i = -1, o, l, n, a = 0, d = 0, c = 0, h = "") {
|
|
506
|
+
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = i, this.areaIdent = o, this.sideIdent = l, this.originalEvent = n, this.clickCount = a, this.draggingX = d, this.draggingY = c, this.action = h;
|
|
507
507
|
}
|
|
508
508
|
clone() {
|
|
509
|
-
return new
|
|
509
|
+
return new re(
|
|
510
510
|
this.rowIndex,
|
|
511
511
|
this.rowTop,
|
|
512
512
|
this.columnIndex,
|
|
@@ -521,38 +521,38 @@ class ne {
|
|
|
521
521
|
);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
class
|
|
524
|
+
class L {
|
|
525
525
|
constructor(e = ">", t = "", s = []) {
|
|
526
526
|
this.content = e, this.style = t, this.classes = s;
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
class
|
|
530
|
-
constructor(e = new
|
|
529
|
+
class Ce {
|
|
530
|
+
constructor(e = new L(
|
|
531
531
|
">",
|
|
532
532
|
"transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
|
|
533
533
|
["gt-table-tree-arrow-expanded"]
|
|
534
|
-
), t = new
|
|
534
|
+
), t = new L(
|
|
535
535
|
">",
|
|
536
536
|
"",
|
|
537
537
|
["ge-table-tree-arrow-collapsed"]
|
|
538
|
-
), s = new
|
|
538
|
+
), s = new L(
|
|
539
539
|
">",
|
|
540
540
|
"color:transparent;",
|
|
541
541
|
["gt-table-tree-arrow-hidden"]
|
|
542
|
-
),
|
|
542
|
+
), i = new L(
|
|
543
543
|
"↕",
|
|
544
544
|
"",
|
|
545
545
|
["gt-table-tree-arrow-expanded-all"]
|
|
546
546
|
)) {
|
|
547
|
-
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll =
|
|
547
|
+
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = i;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
class
|
|
551
|
-
constructor(e = new
|
|
550
|
+
class ve {
|
|
551
|
+
constructor(e = new L("↑", "", ["ge-header-sorted-asc"]), t = new L("↓", "", ["ge-header-sorted-desc"]), s = new L("↑", "color:transparent;", [])) {
|
|
552
552
|
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
class
|
|
555
|
+
class ze {
|
|
556
556
|
constructor(e) {
|
|
557
557
|
this.domService = e;
|
|
558
558
|
}
|
|
@@ -571,7 +571,7 @@ class Ze {
|
|
|
571
571
|
return this.domService.setStyle(e, "display", "block"), e;
|
|
572
572
|
}
|
|
573
573
|
applyStyleInPx(e, t) {
|
|
574
|
-
return Object.entries(t).forEach(([s,
|
|
574
|
+
return Object.entries(t).forEach(([s, i]) => this.domService.setStyle(e, s, i + "px")), e;
|
|
575
575
|
}
|
|
576
576
|
applyStylePosistionRelative(e) {
|
|
577
577
|
return this.domService.setStyle(e, "position", "relative"), this.domService.setStyle(e, "overflow", "clip"), e;
|
|
@@ -617,116 +617,116 @@ class Ze {
|
|
|
617
617
|
setAttribute(e, t, s) {
|
|
618
618
|
return t && s && this.domService.setAttribute(e, t, s), e;
|
|
619
619
|
}
|
|
620
|
-
createAreaDivWithClass(e, t, s,
|
|
621
|
-
const
|
|
622
|
-
return this.addClass(e,
|
|
620
|
+
createAreaDivWithClass(e, t, s, i) {
|
|
621
|
+
const o = this.domService.createElement("div");
|
|
622
|
+
return this.addClass(e, o), this.domService.setAttribute(o, "data-area", s), this.domService.setAttribute(o, "data-side", i), this.domService.appendChild(t, o), o;
|
|
623
623
|
}
|
|
624
624
|
createDivWithClass(e, t) {
|
|
625
625
|
const s = this.domService.createElement("div");
|
|
626
626
|
return this.addClass(e, s), this.domService.appendChild(t, s), s;
|
|
627
627
|
}
|
|
628
|
-
addRowDiv(e, t, s = -1,
|
|
629
|
-
const
|
|
630
|
-
if (this.domService.addClass(
|
|
628
|
+
addRowDiv(e, t, s = -1, i, o, l = "") {
|
|
629
|
+
const n = t.index ?? -1, a = this.getDivOrCreateDiv(n, e);
|
|
630
|
+
if (this.domService.addClass(a, "ge-table-row-div"), this.domService.addClass(a, `ge-table-row-div-${t.index}`), i === "body" && o === "center") {
|
|
631
631
|
const d = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
632
|
-
this.domService.addClass(
|
|
632
|
+
this.domService.addClass(a, `ge-table-row-${d}`);
|
|
633
633
|
}
|
|
634
|
-
if (this.domService.setStyle(
|
|
635
|
-
const d = this.domService.createText(
|
|
636
|
-
this.domService.appendChild(
|
|
634
|
+
if (this.domService.setStyle(a, "display", "clip"), this.domService.setStyle(a, "position", "absolute"), this.domService.setStyle(a, "left", `${t.left}px`), this.domService.setStyle(a, "top", `${t.top}px`), this.domService.setStyle(a, "width", `${t.width}px`), this.domService.setStyle(a, "height", `${t.height}px`), this.domService.setAttribute(a, "data-row-index", `${s}`), this.domService.setAttribute(a, "data-area", `${i}`), l) {
|
|
635
|
+
const d = this.domService.createText(l);
|
|
636
|
+
this.domService.appendChild(a, d);
|
|
637
637
|
}
|
|
638
|
-
return this.domService.appendChild(e.child,
|
|
638
|
+
return this.domService.appendChild(e.child, a), a;
|
|
639
639
|
}
|
|
640
640
|
addColumnDiv(e) {
|
|
641
|
-
const { parent: t, geo: s, rowIndex:
|
|
642
|
-
this.domService.addClass(
|
|
641
|
+
const { parent: t, geo: s, rowIndex: i = -1, columnIndex: o = -1, areaIdent: l, sideIdent: n, text: a = "", treeArrow: d, tableOptions: c, checkedType: h = void 0, sortState: p } = e, g = c == null ? void 0 : c.treeOptions, u = c == null ? void 0 : c.showCheckboxWihoutExtraColumn, S = this.domService.createElement("div");
|
|
642
|
+
this.domService.addClass(S, "ge-table-col-div"), u && this.domService.addClass(S, "ge-with-checkbox"), this.domService.addClass(S, `ge-table-col-div-${s.index}`), this.domService.setAttribute(S, "data-col-index", `${s.index}`), this.domService.setAttribute(S, "data-row-index", `${i}`), this.domService.setAttribute(S, "data-area", `${l}`);
|
|
643
643
|
const f = ((s == null ? void 0 : s.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
644
|
-
if (
|
|
645
|
-
const
|
|
646
|
-
this.addLabelDiv(
|
|
644
|
+
if (l === "body" && n === "center" && this.domService.addClass(S, `ge-table-column-${f}`), this.domService.setStyle(S, "display", "clip"), this.domService.setStyle(S, "position", "absolute"), this.domService.setStyle(S, "left", `${s.left}px`), this.domService.setStyle(S, "top", `${s.top}px`), this.domService.setStyle(S, "width", `${s.width}px`), this.domService.setStyle(S, "height", `${s.height}px`), d && d !== "none" && (this.domService.addClass(S, "ge-table-col-tree"), this.addArrowDiv(S, d, g, i, o, l)), u && o === 0 && h && this.addCheckboxToDiv(S, h, l, i), a) {
|
|
645
|
+
const m = d !== "none" && o === 0;
|
|
646
|
+
this.addLabelDiv(S, a, m, i, o, l);
|
|
647
647
|
}
|
|
648
|
-
return p && this.addSortedIcon(
|
|
648
|
+
return p && this.addSortedIcon(S, p, c == null ? void 0 : c.sortedOptions, o), this.domService.appendChild(t, S), S;
|
|
649
649
|
}
|
|
650
|
-
addCheckboxToDiv(e, t, s,
|
|
651
|
-
const
|
|
652
|
-
return
|
|
650
|
+
addCheckboxToDiv(e, t, s, i) {
|
|
651
|
+
const o = this.domService.createElement("div"), l = t === "full" ? "checked" : "";
|
|
652
|
+
return o.innerHTML = `
|
|
653
653
|
<input
|
|
654
654
|
type="checkbox"
|
|
655
655
|
data-area="${s}"
|
|
656
|
-
data-row-index="${
|
|
656
|
+
data-row-index="${i}"
|
|
657
657
|
data-input-type="checkbox"
|
|
658
|
-
${
|
|
659
|
-
class="ge-table-row-checkbox"> `, this.domService.setStyle(
|
|
658
|
+
${l}
|
|
659
|
+
class="ge-table-row-checkbox"> `, this.domService.setStyle(o, "display", "inline"), this.domService.setStyle(o, "width", "inherit"), this.domService.setAttribute(o, "data-row-index", `${i}`), this.domService.appendChild(e, o), o;
|
|
660
660
|
}
|
|
661
|
-
addLabelDiv(e, t = "", s = !1,
|
|
662
|
-
const
|
|
663
|
-
if (this.domService.addClass(
|
|
661
|
+
addLabelDiv(e, t = "", s = !1, i = -1, o = -1, l = "body") {
|
|
662
|
+
const n = this.domService.createElement("div");
|
|
663
|
+
if (this.domService.addClass(n, "ge-table-label-div"), this.domService.setStyle(n, "position", "relative"), this.domService.setStyle(n, "background", "transparent"), this.domService.setStyle(n, "width", "100%"), this.domService.setStyle(n, "height", "100%"), this.domService.setAttribute(n, "data-row-index", `${i}`), this.domService.setAttribute(n, "data-col-index", `${o}`), this.domService.setAttribute(n, "data-area", `${l}`), t)
|
|
664
664
|
if (s) {
|
|
665
|
-
const
|
|
666
|
-
this.domService.appendChild(
|
|
665
|
+
const a = this.domService.createText(t);
|
|
666
|
+
this.domService.appendChild(n, a);
|
|
667
667
|
} else {
|
|
668
|
-
const
|
|
669
|
-
this.domService.appendChild(
|
|
668
|
+
const a = this.domService.createElement("div");
|
|
669
|
+
this.domService.appendChild(n, a);
|
|
670
670
|
const d = this.domService.createText(t);
|
|
671
|
-
this.domService.addClass(
|
|
671
|
+
this.domService.addClass(a, "ge-table-label"), this.domService.appendChild(a, d), this.domService.setAttribute(a, "data-row-index", `${i}`), this.domService.setAttribute(a, "data-col-index", `${o}`), this.domService.setAttribute(a, "data-area", `${l}`);
|
|
672
672
|
}
|
|
673
|
-
return this.domService.appendChild(e,
|
|
673
|
+
return this.domService.appendChild(e, n), n;
|
|
674
674
|
}
|
|
675
|
-
addSortedIcon(e, t = "", s = new
|
|
676
|
-
const
|
|
677
|
-
this.domService.addClass(
|
|
678
|
-
let
|
|
679
|
-
t === "asc" ?
|
|
680
|
-
const
|
|
681
|
-
this.domService.appendChild(
|
|
682
|
-
for (const d of
|
|
683
|
-
this.domService.addClass(
|
|
684
|
-
return this.domService.appendChild(e,
|
|
685
|
-
}
|
|
686
|
-
addArrowDiv(e, t = "none", s = new
|
|
687
|
-
const
|
|
688
|
-
this.domService.addClass(
|
|
689
|
-
let
|
|
690
|
-
t === "expanded" ?
|
|
691
|
-
const d =
|
|
692
|
-
this.domService.appendChild(
|
|
693
|
-
for (const h of
|
|
694
|
-
this.domService.addClass(
|
|
695
|
-
return this.domService.appendChild(e,
|
|
696
|
-
}
|
|
697
|
-
addColumnBorderDivs(e, t, s,
|
|
675
|
+
addSortedIcon(e, t = "", s = new ve(), i = -1) {
|
|
676
|
+
const o = this.domService.createElement("div");
|
|
677
|
+
this.domService.addClass(o, "ge-table-sorted-icon-div"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "top", "0"), this.domService.setStyle(o, "right", "0"), this.domService.setStyle(o, "width", "20px"), this.domService.setStyle(o, "background", "transparent"), this.domService.setStyle(o, "cursor", "pointer"), this.domService.setAttribute(o, "data-col-index", `${i}`), this.domService.setAttribute(o, "data-area", "header");
|
|
678
|
+
let l;
|
|
679
|
+
t === "asc" ? l = s.iconAsc : t === "desc" ? l = s.iconDesc : l = s.iconPlaceholder;
|
|
680
|
+
const n = l.content, a = this.domService.createText(n);
|
|
681
|
+
this.domService.appendChild(o, a), l.style && this.applyStyleString(o, l.style);
|
|
682
|
+
for (const d of l.classes)
|
|
683
|
+
this.domService.addClass(o, d);
|
|
684
|
+
return this.domService.appendChild(e, o), o;
|
|
685
|
+
}
|
|
686
|
+
addArrowDiv(e, t = "none", s = new Ce(), i = -1, o = -1, l = "body") {
|
|
687
|
+
const n = this.domService.createElement("div");
|
|
688
|
+
this.domService.addClass(n, "ge-table-tree-arrow-div"), this.domService.setStyle(n, "display", "inline-block"), this.domService.setStyle(n, "position", ""), this.domService.setStyle(n, "width", "20px"), this.domService.setStyle(n, "background", "transparent"), this.domService.setStyle(n, "cursor", "pointer"), this.domService.setAttribute(n, "data-row-index", `${i}`), this.domService.setAttribute(n, "data-col-index", `${o}`), this.domService.setAttribute(n, "data-area", `${l}`);
|
|
689
|
+
let a;
|
|
690
|
+
t === "expanded" ? a = s.arrowExpanded : t === "collapsed" ? a = s.arrowCollapsed : a = s.arrowPlaceholder;
|
|
691
|
+
const d = a.content, c = this.domService.createText(d);
|
|
692
|
+
this.domService.appendChild(n, c), a.style && this.applyStyleString(n, a.style);
|
|
693
|
+
for (const h of a.classes)
|
|
694
|
+
this.domService.addClass(n, h);
|
|
695
|
+
return this.domService.appendChild(e, n), n;
|
|
696
|
+
}
|
|
697
|
+
addColumnBorderDivs(e, t, s, i, o) {
|
|
698
698
|
if (e.verticalBorderVisible) {
|
|
699
|
-
const
|
|
700
|
-
this.addVerticalBorder(s, t,
|
|
699
|
+
const l = `ge-table-${i}-${o}-vertical-border`;
|
|
700
|
+
this.addVerticalBorder(s, t, l);
|
|
701
701
|
}
|
|
702
702
|
if (e.horizontalBorderVisible) {
|
|
703
|
-
const
|
|
704
|
-
this.addHorizontalBorder(s, t,
|
|
703
|
+
const l = `ge-table-${i}-${o}-horizontal-border`;
|
|
704
|
+
this.addHorizontalBorder(s, t, l);
|
|
705
705
|
}
|
|
706
706
|
return t;
|
|
707
707
|
}
|
|
708
708
|
addHorizontalBorder(e, t, s = "ge-table-body-center-horizontal-border") {
|
|
709
|
-
const
|
|
710
|
-
return this.domService.addClass(
|
|
709
|
+
const i = this.domService.createElement("div");
|
|
710
|
+
return this.domService.addClass(i, s), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${e.left}px`), this.domService.setStyle(i, "top", `${e.top}px`), this.domService.setStyle(i, "width", `${e.width}px`), this.domService.setStyle(i, "height", "1px"), this.domService.appendChild(t, i), i;
|
|
711
711
|
}
|
|
712
712
|
addFocusBorderDivs(e, t, s) {
|
|
713
713
|
t = { ...t, width: t.width + 1, height: t.height + 1 };
|
|
714
|
-
let
|
|
715
|
-
return this.domService.addClass(
|
|
714
|
+
let i = this.domService.createElement("div");
|
|
715
|
+
return this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", "1px"), this.domService.setStyle(i, "height", `${t.height}px`), this.domService.setStyle(i, "z-index", "9999"), this.applyStyle(i, s), this.domService.appendChild(e, i), i = this.domService.createElement("div"), this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left + t.width - 1}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", "1px"), this.domService.setStyle(i, "height", `${t.height}px`), this.domService.setStyle(i, "z-index", "9999"), this.applyStyle(i, s), this.domService.appendChild(e, i), i = this.domService.createElement("div"), this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", `${t.width}px`), this.domService.setStyle(i, "height", "1px"), this.domService.setStyle(i, "z-index", "9999"), this.applyStyle(i, s), this.domService.appendChild(e, i), i = this.domService.createElement("div"), this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top + t.height - 1}px`), this.domService.setStyle(i, "width", `${t.width}px`), this.domService.setStyle(i, "height", "1px"), this.domService.setStyle(i, "z-index", "9999"), this.applyStyle(i, s), this.domService.appendChild(e, i), e;
|
|
716
716
|
}
|
|
717
717
|
addVerticalBorder(e, t, s = "ge-table-body-center-vertical-border") {
|
|
718
|
-
const
|
|
719
|
-
return this.domService.addClass(
|
|
718
|
+
const i = this.domService.createElement("div");
|
|
719
|
+
return this.domService.addClass(i, s), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${e.left}px`), this.domService.setStyle(i, "top", `${e.top}px`), this.domService.setStyle(i, "width", "1px"), this.domService.setStyle(i, "height", `${e.height}px`), this.domService.appendChild(t, i), i;
|
|
720
720
|
}
|
|
721
721
|
addDiv(e, t, s = "") {
|
|
722
|
-
const
|
|
723
|
-
return s && this.domService.addClass(
|
|
722
|
+
const i = this.domService.createElement("div");
|
|
723
|
+
return s && this.domService.addClass(i, s), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", `${t.width}px`), this.domService.setStyle(i, "height", `${t.height}px`), this.domService.appendChild(e, i), i;
|
|
724
724
|
}
|
|
725
725
|
applyStyleString(e, t) {
|
|
726
|
-
const s = t.split(";").map((
|
|
727
|
-
for (const
|
|
728
|
-
const [
|
|
729
|
-
this.domService.setStyle(e,
|
|
726
|
+
const s = t.split(";").map((i) => i.trim()).filter((i) => i);
|
|
727
|
+
for (const i of s) {
|
|
728
|
+
const [o, l] = i.split(":");
|
|
729
|
+
this.domService.setStyle(e, o.trim(), l.trim());
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
732
|
getDivOrCreateDiv(e, t) {
|
|
@@ -734,20 +734,20 @@ class Ze {
|
|
|
734
734
|
return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
|
-
const
|
|
738
|
-
class
|
|
737
|
+
const ne = (r) => r === "header" ? "header" : r === "footer" ? "footer" : "body";
|
|
738
|
+
class Ke {
|
|
739
739
|
constructor(e, t) {
|
|
740
740
|
if (this.rowIdx = -1, this.colIdx = -1, this.action = null, this.inputType = null, this.className = "", e !== null && (e instanceof HTMLDivElement || e instanceof HTMLSpanElement || e instanceof HTMLInputElement)) {
|
|
741
741
|
this.className = e.className, this.action = e.getAttribute("data-ge-action"), this.inputType = e.getAttribute("data-input-type"), this.rowIdx = Number(e.getAttribute("data-row-index")), this.colIdx = Number(e.getAttribute("data-col-index"));
|
|
742
742
|
const s = e.getAttribute("data-area");
|
|
743
|
-
if (s && (this.areaIdent =
|
|
744
|
-
const
|
|
745
|
-
this.value =
|
|
743
|
+
if (s && (this.areaIdent = ne(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
|
|
744
|
+
const i = e;
|
|
745
|
+
this.value = i.value;
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
|
-
class
|
|
750
|
+
class Ye {
|
|
751
751
|
constructor(e) {
|
|
752
752
|
this.tableScope = e, this.doubleClickDelay = 500, this.expandedAll = !0, this.mouseDown = !1, this.dragging = !1, this.lastClicked = 0, this.tableScope.hostElement.addEventListener("click", this.onHostElementClicked.bind(this)), this.tableScope.hostElement.addEventListener("dblclick", this.onHostElementDblClicked.bind(this)), this.tableScope.hostElement.addEventListener("mousedown", this.onMouseDown.bind(this)), this.tableScope.hostElement.addEventListener("mousemove", this.onMouseMove.bind(this)), this.tableScope.hostElement.addEventListener("mouseup", this.onMouseUp.bind(this)), this.tableScope.hostElement.addEventListener("contextmenu", this.onContextmenu.bind(this)), this.tableScope.hostElement._MouseHandler = "true", this.tableScope.scrollViewport.addEventListener("scroll", this.tableScope.adjustAfterScrolling.bind(this.tableScope)), [window, this.tableScope.hostElement].forEach(
|
|
753
753
|
(t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
|
|
@@ -779,7 +779,7 @@ class et {
|
|
|
779
779
|
return;
|
|
780
780
|
}
|
|
781
781
|
this.lastClicked = t;
|
|
782
|
-
const s = new
|
|
782
|
+
const s = new Ke(e.target, this.tableScope);
|
|
783
783
|
if (s.action === "toggleExpandCollapseAll")
|
|
784
784
|
this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
|
|
785
785
|
else if (s.action === "toggleHeaderGroup")
|
|
@@ -787,16 +787,16 @@ class et {
|
|
|
787
787
|
else if (s.inputType === "checkbox" && s.areaIdent)
|
|
788
788
|
this.tableScope.toggleRowCheckbox(s.rowIdx, s.colIdx, s.areaIdent), e.preventDefault(), e.stopPropagation();
|
|
789
789
|
else if (K(s.row) && s.areaModel) {
|
|
790
|
-
const
|
|
791
|
-
if (
|
|
790
|
+
const i = s.colIdx === this.getArrowColumnIndex() && e.altKey, o = s.className.includes("ge-table-tree-arrow-div");
|
|
791
|
+
if (i || o) {
|
|
792
792
|
e.preventDefault(), e.stopPropagation();
|
|
793
|
-
const
|
|
794
|
-
|
|
793
|
+
const l = s.row;
|
|
794
|
+
l.expanded = !l.expanded, "recalcVisibleTreeRows" in s.areaModel && s.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(l);
|
|
795
795
|
}
|
|
796
796
|
}
|
|
797
797
|
if (s.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
|
|
798
|
-
const
|
|
799
|
-
|
|
798
|
+
const i = this.tableScope.tableOptions.getFocusModel();
|
|
799
|
+
i == null || i.clear(), i == null || i.setFocus(s.rowIdx, s.colIdx);
|
|
800
800
|
}
|
|
801
801
|
this.publishGeMouseEvent(e, 1);
|
|
802
802
|
}
|
|
@@ -808,15 +808,15 @@ class et {
|
|
|
808
808
|
*/
|
|
809
809
|
onHostElementDblClicked(e) {
|
|
810
810
|
if (this.lastClicked = Date.now(), e.target instanceof HTMLElement) {
|
|
811
|
-
const t = e.target, s = t.getAttribute("data-area"),
|
|
812
|
-
if (s &&
|
|
813
|
-
this.tableScope.tableModel.isSortable(
|
|
811
|
+
const t = e.target, s = t.getAttribute("data-area"), i = ne(s), o = Number(t.getAttribute("data-row-index")), l = Number(t.getAttribute("data-col-index")), n = this.tableScope.tableModel.getAreaModel(i);
|
|
812
|
+
if (s && i === "header")
|
|
813
|
+
this.tableScope.tableModel.isSortable(l) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, o, l));
|
|
814
814
|
else if (t.getAttribute("data-row-index")) {
|
|
815
|
-
const
|
|
816
|
-
if (s &&
|
|
815
|
+
const a = n.getRowByIndex(o);
|
|
816
|
+
if (s && i === "body" && n.isEditable(o, l) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, l)), K(a) && l === this.getArrowColumnIndex()) {
|
|
817
817
|
e.preventDefault(), e.stopPropagation();
|
|
818
|
-
const d =
|
|
819
|
-
d.expanded = !d.expanded, "recalcVisibleTreeRows" in
|
|
818
|
+
const d = a;
|
|
819
|
+
d.expanded = !d.expanded, "recalcVisibleTreeRows" in n && n.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(d);
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
}
|
|
@@ -841,11 +841,11 @@ class et {
|
|
|
841
841
|
* @returns {void}
|
|
842
842
|
*/
|
|
843
843
|
updateCollapsedExpandedState(e) {
|
|
844
|
-
var s,
|
|
845
|
-
const t = (
|
|
844
|
+
var s, i, o, l, n;
|
|
845
|
+
const t = (i = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : i.getRowId;
|
|
846
846
|
if (t) {
|
|
847
|
-
const
|
|
848
|
-
d ? (
|
|
847
|
+
const a = (o = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : o.collapsedExpandedStateGet().mode, d = a === "collapsed" && !e.expanded || a === "expanded" && e.expanded, c = a === "collapsed" && e.expanded || a === "expanded" && !e.expanded, h = t(e.data);
|
|
848
|
+
d ? (l = this.tableScope.storeStateCollapsedExpandService) == null || l.collapsedStateIdsPush(h) : c && ((n = this.tableScope.storeStateCollapsedExpandService) == null || n.collapsedStateIdsRemove(h));
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
851
|
getArrowColumnIndex() {
|
|
@@ -881,9 +881,9 @@ class et {
|
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
|
-
class
|
|
884
|
+
class Je {
|
|
885
885
|
constructor(e, t = [], s = -1) {
|
|
886
|
-
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = s, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((
|
|
886
|
+
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = s, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((i) => i.rendererMap[e]);
|
|
887
887
|
}
|
|
888
888
|
getTextValueAt(e, t) {
|
|
889
889
|
return "" + this.getValueAt(e, t);
|
|
@@ -943,16 +943,16 @@ class tt {
|
|
|
943
943
|
sort(e) {
|
|
944
944
|
}
|
|
945
945
|
isEditable(e, t) {
|
|
946
|
-
var
|
|
947
|
-
const s = (
|
|
948
|
-
return ((
|
|
946
|
+
var i, o;
|
|
947
|
+
const s = (i = this.columnDefs) == null ? void 0 : i[t];
|
|
948
|
+
return ((o = s == null ? void 0 : s.editable) == null ? void 0 : o.call(s)) ?? !1;
|
|
949
949
|
}
|
|
950
950
|
setValue(e, t, s) {
|
|
951
|
-
var
|
|
952
|
-
const
|
|
953
|
-
|
|
954
|
-
const
|
|
955
|
-
return
|
|
951
|
+
var n;
|
|
952
|
+
const i = (n = this.columnDefs[t]) == null ? void 0 : n.editInputPipe;
|
|
953
|
+
i && (s = i(s, e, t));
|
|
954
|
+
const o = this.getRowByIndex(e), l = this.columnDefs[t].property;
|
|
955
|
+
return l.includes(".") ? this.setPropertyValue(o, l.split("."), s) : (o[l] = s, !0);
|
|
956
956
|
}
|
|
957
957
|
isSelectable(e, t) {
|
|
958
958
|
return !0;
|
|
@@ -961,16 +961,16 @@ class tt {
|
|
|
961
961
|
this.arrayMove(this.cellRenderers, e, t);
|
|
962
962
|
}
|
|
963
963
|
setPropertyValue(e, t, s) {
|
|
964
|
-
const
|
|
965
|
-
if (
|
|
966
|
-
const
|
|
967
|
-
return
|
|
964
|
+
const i = t.shift();
|
|
965
|
+
if (i) {
|
|
966
|
+
const o = e[i];
|
|
967
|
+
return o && t.length ? this.setPropertyValue(o, t, s) : (e[i] = s, !0);
|
|
968
968
|
}
|
|
969
969
|
return !1;
|
|
970
970
|
}
|
|
971
971
|
arrayMove(e, t, s) {
|
|
972
|
-
const
|
|
973
|
-
return e.splice(s, 0,
|
|
972
|
+
const i = e.splice(t, 1)[0];
|
|
973
|
+
return e.splice(s, 0, i), e;
|
|
974
974
|
}
|
|
975
975
|
calcYPositions() {
|
|
976
976
|
const e = this.getRowCount();
|
|
@@ -979,7 +979,7 @@ class tt {
|
|
|
979
979
|
this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
|
|
980
980
|
}
|
|
981
981
|
}
|
|
982
|
-
class
|
|
982
|
+
class qe {
|
|
983
983
|
genericSortComparator(e, t, s) {
|
|
984
984
|
if (typeof e == "number" && typeof t == "number")
|
|
985
985
|
return s * (e - t);
|
|
@@ -990,14 +990,14 @@ class st {
|
|
|
990
990
|
if (e instanceof Date && t instanceof Date)
|
|
991
991
|
return s * (e.getTime() - t.getTime());
|
|
992
992
|
if (e instanceof Array && t instanceof Array) {
|
|
993
|
-
const
|
|
994
|
-
if (
|
|
995
|
-
return this.genericSortComparator(
|
|
993
|
+
const i = e, o = t;
|
|
994
|
+
if (i.length && o.length)
|
|
995
|
+
return this.genericSortComparator(i[0], o[0], s);
|
|
996
996
|
}
|
|
997
997
|
return s * ("" + e).localeCompare("" + t);
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
|
-
class
|
|
1000
|
+
class B extends Je {
|
|
1001
1001
|
/**
|
|
1002
1002
|
* Creates an instance of AreaModelObjectArray.
|
|
1003
1003
|
*
|
|
@@ -1027,8 +1027,8 @@ class L extends tt {
|
|
|
1027
1027
|
* columnDefs
|
|
1028
1028
|
* );
|
|
1029
1029
|
*/
|
|
1030
|
-
constructor(e, t, s,
|
|
1031
|
-
super(e,
|
|
1030
|
+
constructor(e, t, s, i = [], o = "ge-selected-row", l = "ge-focused-row") {
|
|
1031
|
+
super(e, i, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = i, this.selectedRowClass = o, this.focusedRowClass = l, this.sorterService = new qe(), this._focusedRowIndex = 0, this.filteredRows = [...t], this.properties = i.map((n) => n.property);
|
|
1032
1032
|
}
|
|
1033
1033
|
/**
|
|
1034
1034
|
* Gets the index of the currently focused row.
|
|
@@ -1122,8 +1122,8 @@ class L extends tt {
|
|
|
1122
1122
|
*/
|
|
1123
1123
|
getValueAt(e, t) {
|
|
1124
1124
|
const s = this.properties[t];
|
|
1125
|
-
let
|
|
1126
|
-
return K(
|
|
1125
|
+
let i = this.filteredRows[e];
|
|
1126
|
+
return K(i) && (i = i.data), i ? this.getValueByT(i, s) : "";
|
|
1127
1127
|
}
|
|
1128
1128
|
/**
|
|
1129
1129
|
* Retrieves the filtered and sorted rows from the dataset.
|
|
@@ -1300,8 +1300,8 @@ class L extends tt {
|
|
|
1300
1300
|
*/
|
|
1301
1301
|
doSort(e) {
|
|
1302
1302
|
for (const t of e) {
|
|
1303
|
-
const { columnIndex: s, sortState:
|
|
1304
|
-
this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(
|
|
1303
|
+
const { columnIndex: s, sortState: i } = t, o = i === "asc" ? 1 : i === "desc" ? -1 : 0, l = this.properties[s];
|
|
1304
|
+
this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(l, o));
|
|
1305
1305
|
}
|
|
1306
1306
|
return !0;
|
|
1307
1307
|
}
|
|
@@ -1410,10 +1410,10 @@ class L extends tt {
|
|
|
1410
1410
|
* const sortedRows = [...bodyAreaModel.getFilteredRows()].sort(comparator);
|
|
1411
1411
|
*/
|
|
1412
1412
|
genericFlatTableSortComparator(e, t) {
|
|
1413
|
-
const s = this.columnDefs.find((
|
|
1414
|
-
return (
|
|
1415
|
-
const
|
|
1416
|
-
return s != null && s.sortComparator ? t * s.sortComparator(
|
|
1413
|
+
const s = this.columnDefs.find((i) => i.property === e);
|
|
1414
|
+
return (i, o) => {
|
|
1415
|
+
const l = this.getValueByT(i, e), n = this.getValueByT(o, e);
|
|
1416
|
+
return s != null && s.sortComparator ? t * s.sortComparator(l, n, i, o, t) : this.sorterService.genericSortComparator(l, n, t);
|
|
1417
1417
|
};
|
|
1418
1418
|
}
|
|
1419
1419
|
/**
|
|
@@ -1427,11 +1427,11 @@ class L extends tt {
|
|
|
1427
1427
|
* @private
|
|
1428
1428
|
*/
|
|
1429
1429
|
getPropertyValue(e, t) {
|
|
1430
|
-
const s = t.shift(),
|
|
1431
|
-
return
|
|
1430
|
+
const s = t.shift(), i = e[s];
|
|
1431
|
+
return i && t.length ? this.getPropertyValue(i, t) : i;
|
|
1432
1432
|
}
|
|
1433
1433
|
}
|
|
1434
|
-
class
|
|
1434
|
+
class Ze {
|
|
1435
1435
|
constructor(e) {
|
|
1436
1436
|
this.tableScope = e;
|
|
1437
1437
|
}
|
|
@@ -2047,14 +2047,14 @@ class ot {
|
|
|
2047
2047
|
* tableApi.downloadExcel('quarterly-data.xlsx');
|
|
2048
2048
|
*/
|
|
2049
2049
|
downloadExcel(e = "table.xlsx", t = "") {
|
|
2050
|
-
const s = [],
|
|
2051
|
-
for (const
|
|
2052
|
-
const
|
|
2053
|
-
for (let d = 0; d <
|
|
2050
|
+
const s = [], i = this.tableScope.tableModel.getColumnCount(), o = ["header", "body", "footer"];
|
|
2051
|
+
for (const l of o) {
|
|
2052
|
+
const n = this.tableScope.tableModel.getAreaModel(l), a = (n == null ? void 0 : n.getRowCount()) ?? 0;
|
|
2053
|
+
for (let d = 0; d < a; d++) {
|
|
2054
2054
|
const c = [];
|
|
2055
2055
|
s.push(c);
|
|
2056
|
-
for (let h = 0; h <
|
|
2057
|
-
c.push(
|
|
2056
|
+
for (let h = 0; h < i; h++)
|
|
2057
|
+
c.push(n.getValueAt(d, h));
|
|
2058
2058
|
}
|
|
2059
2059
|
}
|
|
2060
2060
|
return this.tableScope.excelService.downloadExcel(s, e, t);
|
|
@@ -2192,7 +2192,7 @@ class ot {
|
|
|
2192
2192
|
*/
|
|
2193
2193
|
setRows(e) {
|
|
2194
2194
|
const t = this.getBodyModel();
|
|
2195
|
-
t instanceof
|
|
2195
|
+
t instanceof B ? t.setRows(e) : console.warn("setRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof t, t);
|
|
2196
2196
|
}
|
|
2197
2197
|
/**
|
|
2198
2198
|
* Adds new rows to the end of the table body.
|
|
@@ -2210,10 +2210,10 @@ class ot {
|
|
|
2210
2210
|
*/
|
|
2211
2211
|
addRows(e) {
|
|
2212
2212
|
const t = this.getBodyModel();
|
|
2213
|
-
if (t instanceof
|
|
2213
|
+
if (t instanceof B) {
|
|
2214
2214
|
const s = t;
|
|
2215
|
-
let
|
|
2216
|
-
s.setRows([...
|
|
2215
|
+
let i = s.getAllRows();
|
|
2216
|
+
s.setRows([...i, ...e]);
|
|
2217
2217
|
} else
|
|
2218
2218
|
console.warn("addRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof t, t);
|
|
2219
2219
|
}
|
|
@@ -2235,10 +2235,10 @@ class ot {
|
|
|
2235
2235
|
*/
|
|
2236
2236
|
addRowsAt(e, t) {
|
|
2237
2237
|
const s = this.getBodyModel();
|
|
2238
|
-
if (s instanceof
|
|
2239
|
-
const
|
|
2240
|
-
let
|
|
2241
|
-
|
|
2238
|
+
if (s instanceof B) {
|
|
2239
|
+
const i = s;
|
|
2240
|
+
let o = i.getAllRows();
|
|
2241
|
+
i.setRows([...o.slice(0, t), ...e, ...o.slice(t)]);
|
|
2242
2242
|
} else
|
|
2243
2243
|
console.warn("addRowsAt<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s);
|
|
2244
2244
|
}
|
|
@@ -2259,11 +2259,11 @@ class ot {
|
|
|
2259
2259
|
*
|
|
2260
2260
|
* @throws {Warning} Logs a console warning if the table's body model is not an AreaModelObjectArray
|
|
2261
2261
|
*/
|
|
2262
|
-
removeRows(e, t = (s,
|
|
2262
|
+
removeRows(e, t = (s, i) => s === i) {
|
|
2263
2263
|
const s = this.getBodyModel();
|
|
2264
|
-
if (s instanceof
|
|
2265
|
-
const
|
|
2266
|
-
|
|
2264
|
+
if (s instanceof B) {
|
|
2265
|
+
const i = s, o = i.getAllRows().filter((l) => !e.some((n) => t(l, n)));
|
|
2266
|
+
i.setRows(o);
|
|
2267
2267
|
} else
|
|
2268
2268
|
console.warn("removeRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s);
|
|
2269
2269
|
}
|
|
@@ -2300,9 +2300,9 @@ class ot {
|
|
|
2300
2300
|
*
|
|
2301
2301
|
* @throws {Warning} Logs a console warning if the table's body model is not an AreaModelObjectArray
|
|
2302
2302
|
*/
|
|
2303
|
-
findRows(e, t = (s,
|
|
2303
|
+
findRows(e, t = (s, i) => s === i) {
|
|
2304
2304
|
const s = this.getBodyModel();
|
|
2305
|
-
return s instanceof
|
|
2305
|
+
return s instanceof B ? s.getAllRows().filter((o) => e.some((l) => t(o, l))) : (console.warn("findRows<T>(rows: T[], predicate: (a: T, b: T) => boolean) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s), []);
|
|
2306
2306
|
}
|
|
2307
2307
|
/**
|
|
2308
2308
|
* Searches through the filtered rows of the table to find a row that matches specific criteria.
|
|
@@ -2359,8 +2359,8 @@ class ot {
|
|
|
2359
2359
|
*/
|
|
2360
2360
|
findRowFromFilteredRowsByAllCriteria(e, t) {
|
|
2361
2361
|
const s = this.getBodyModel();
|
|
2362
|
-
if (s instanceof
|
|
2363
|
-
return s.getFilteredRows().find((
|
|
2362
|
+
if (s instanceof B)
|
|
2363
|
+
return s.getFilteredRows().find((o) => t(e, o));
|
|
2364
2364
|
console.warn("findRowFromFilteredRowsByAllCriteria(...) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s);
|
|
2365
2365
|
}
|
|
2366
2366
|
/**
|
|
@@ -2406,8 +2406,8 @@ class ot {
|
|
|
2406
2406
|
*/
|
|
2407
2407
|
findRowFromAllRowsByAllCriteria(e, t) {
|
|
2408
2408
|
const s = this.getBodyModel();
|
|
2409
|
-
if (s instanceof
|
|
2410
|
-
return s.getAllRows().find((
|
|
2409
|
+
if (s instanceof B)
|
|
2410
|
+
return s.getAllRows().find((o) => t(e, o));
|
|
2411
2411
|
console.warn("findRowFromAllRowsByAllCriteria(...) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s);
|
|
2412
2412
|
}
|
|
2413
2413
|
/**
|
|
@@ -2429,15 +2429,15 @@ class ot {
|
|
|
2429
2429
|
*
|
|
2430
2430
|
* @throws {Warning} Logs a console warning if the table's body model is not an AreaModelObjectArray
|
|
2431
2431
|
*/
|
|
2432
|
-
updateRows(e, t = (s,
|
|
2432
|
+
updateRows(e, t = (s, i) => s === i) {
|
|
2433
2433
|
const s = this.getBodyModel();
|
|
2434
|
-
if (s instanceof
|
|
2435
|
-
let
|
|
2436
|
-
for (const
|
|
2437
|
-
for (const
|
|
2438
|
-
if (t(
|
|
2439
|
-
for (const
|
|
2440
|
-
|
|
2434
|
+
if (s instanceof B) {
|
|
2435
|
+
let o = s.getAllRows();
|
|
2436
|
+
for (const l of o)
|
|
2437
|
+
for (const n of e)
|
|
2438
|
+
if (t(l, n))
|
|
2439
|
+
for (const a of Object.keys(n))
|
|
2440
|
+
l[a] = n[a];
|
|
2441
2441
|
} else
|
|
2442
2442
|
console.warn("updateRows<T>(rows: T[], predicate: (a: T, b: T) => boolean) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s);
|
|
2443
2443
|
}
|
|
@@ -2779,27 +2779,27 @@ class ot {
|
|
|
2779
2779
|
return this.tableScope.loggingActive;
|
|
2780
2780
|
}
|
|
2781
2781
|
}
|
|
2782
|
-
class
|
|
2782
|
+
class ae {
|
|
2783
2783
|
constructor(e) {
|
|
2784
2784
|
this.getStorageKeyFn = e;
|
|
2785
2785
|
}
|
|
2786
2786
|
autoConvertMapToObject(e) {
|
|
2787
2787
|
const t = {};
|
|
2788
|
-
return e instanceof Map && e.forEach((
|
|
2789
|
-
t[
|
|
2788
|
+
return e instanceof Map && e.forEach((i, o) => {
|
|
2789
|
+
t[i] = o;
|
|
2790
2790
|
}), t;
|
|
2791
2791
|
}
|
|
2792
2792
|
checkAndPersistItem(e, t) {
|
|
2793
2793
|
const s = this.getStorageKeyFn;
|
|
2794
2794
|
if (s) {
|
|
2795
|
-
const
|
|
2796
|
-
if (
|
|
2797
|
-
const
|
|
2795
|
+
const i = s();
|
|
2796
|
+
if (i) {
|
|
2797
|
+
const o = i + e;
|
|
2798
2798
|
if ((t + "").includes("Map")) {
|
|
2799
|
-
const
|
|
2800
|
-
this.persistItem(
|
|
2799
|
+
const l = this.autoConvertMapToObject(t);
|
|
2800
|
+
this.persistItem(o, l);
|
|
2801
2801
|
} else
|
|
2802
|
-
this.persistItem(
|
|
2802
|
+
this.persistItem(o, t);
|
|
2803
2803
|
}
|
|
2804
2804
|
}
|
|
2805
2805
|
}
|
|
@@ -2846,7 +2846,7 @@ class de {
|
|
|
2846
2846
|
// }
|
|
2847
2847
|
// }
|
|
2848
2848
|
}
|
|
2849
|
-
class
|
|
2849
|
+
class Qe extends ae {
|
|
2850
2850
|
constructor(e) {
|
|
2851
2851
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
2852
2852
|
}
|
|
@@ -2862,20 +2862,20 @@ class it extends de {
|
|
|
2862
2862
|
const t = e();
|
|
2863
2863
|
if (t) {
|
|
2864
2864
|
const s = t + this.SCROLL_STATE;
|
|
2865
|
-
let
|
|
2866
|
-
this.scrollOffset =
|
|
2865
|
+
let i = this.loadFromLocalStorage(s);
|
|
2866
|
+
this.scrollOffset = i || [0, 0];
|
|
2867
2867
|
}
|
|
2868
2868
|
}
|
|
2869
2869
|
}
|
|
2870
2870
|
}
|
|
2871
|
-
class
|
|
2872
|
-
constructor(e = "collapsed", t = [], s = !1,
|
|
2873
|
-
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded =
|
|
2871
|
+
class et {
|
|
2872
|
+
constructor(e = "collapsed", t = [], s = !1, i = !1) {
|
|
2873
|
+
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = i;
|
|
2874
2874
|
}
|
|
2875
2875
|
}
|
|
2876
|
-
class
|
|
2876
|
+
class tt extends ae {
|
|
2877
2877
|
constructor(e) {
|
|
2878
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
2878
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new et(), this.load();
|
|
2879
2879
|
}
|
|
2880
2880
|
collapsedExpandedStateGet() {
|
|
2881
2881
|
return this.collapsedExpandedState;
|
|
@@ -2898,8 +2898,8 @@ class lt extends de {
|
|
|
2898
2898
|
if (e) {
|
|
2899
2899
|
const t = e();
|
|
2900
2900
|
if (t) {
|
|
2901
|
-
const s = t + this.COLLAPSED_EXPANDED_STATE,
|
|
2902
|
-
|
|
2901
|
+
const s = t + this.COLLAPSED_EXPANDED_STATE, i = this.loadFromLocalStorage(s);
|
|
2902
|
+
i && (this.collapsedExpandedState = i);
|
|
2903
2903
|
}
|
|
2904
2904
|
}
|
|
2905
2905
|
}
|
|
@@ -2907,7 +2907,7 @@ class lt extends de {
|
|
|
2907
2907
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
2908
2908
|
}
|
|
2909
2909
|
}
|
|
2910
|
-
class
|
|
2910
|
+
class st extends ae {
|
|
2911
2911
|
constructor(e) {
|
|
2912
2912
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
2913
2913
|
}
|
|
@@ -2922,69 +2922,69 @@ class at extends de {
|
|
|
2922
2922
|
if (e) {
|
|
2923
2923
|
const t = e();
|
|
2924
2924
|
if (t) {
|
|
2925
|
-
const s = t + this.SORTING_STATE,
|
|
2926
|
-
this.sortItems =
|
|
2925
|
+
const s = t + this.SORTING_STATE, i = this.loadFromLocalStorage(s);
|
|
2926
|
+
this.sortItems = i || [];
|
|
2927
2927
|
}
|
|
2928
2928
|
}
|
|
2929
2929
|
}
|
|
2930
2930
|
}
|
|
2931
2931
|
class I {
|
|
2932
|
-
constructor(e = 0, t = 0, s = 0,
|
|
2933
|
-
this.left = e, this.width = t, this.height = s, this.top =
|
|
2932
|
+
constructor(e = 0, t = 0, s = 0, i = 0, o) {
|
|
2933
|
+
this.left = e, this.width = t, this.height = s, this.top = i, this.index = o;
|
|
2934
2934
|
}
|
|
2935
2935
|
}
|
|
2936
|
-
class
|
|
2937
|
-
constructor(e, t, s,
|
|
2938
|
-
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions =
|
|
2939
|
-
const
|
|
2940
|
-
|
|
2941
|
-
this.dom.addClass("ge-table",
|
|
2936
|
+
class it {
|
|
2937
|
+
constructor(e, t, s, i) {
|
|
2938
|
+
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = i, this.scrollTop = 0, this.areaBodyWestGeo = new I(), this.areaBodyCenterGeo = new I(), this.areaBodyEastGeo = new I();
|
|
2939
|
+
const o = this.hostElement;
|
|
2940
|
+
o.innerText = "", this.dom.setAttribute(o, "tabindex", "0"), this.dom.setStyle(
|
|
2941
|
+
this.dom.addClass("ge-table", o),
|
|
2942
2942
|
"position",
|
|
2943
2943
|
"relative"
|
|
2944
2944
|
), this.hoverRow = s.applyStylePosistionAbsolute(
|
|
2945
|
-
s.createDivWithClass("ge-table-hover-row",
|
|
2945
|
+
s.createDivWithClass("ge-table-hover-row", o)
|
|
2946
2946
|
), this.hoverColumn = s.applyStylePosistionAbsolute(
|
|
2947
|
-
s.createDivWithClass("ge-table-hover-column",
|
|
2947
|
+
s.createDivWithClass("ge-table-hover-column", o)
|
|
2948
2948
|
), this.draggingColumn = s.applyStylePosistionAbsolute(
|
|
2949
|
-
s.createDivWithClass("ge-table-dragging-column",
|
|
2949
|
+
s.createDivWithClass("ge-table-dragging-column", o)
|
|
2950
2950
|
), this.areaHeaderWest = s.appendRelativeChildDiv(
|
|
2951
2951
|
s.applyStylePosistionAbsolute(
|
|
2952
|
-
s.createAreaDivWithClass("ge-table-header ge-table-header-west",
|
|
2952
|
+
s.createAreaDivWithClass("ge-table-header ge-table-header-west", o, "header", "west")
|
|
2953
2953
|
)
|
|
2954
2954
|
), this.areaHeaderCenter = s.appendRelativeChildDiv(
|
|
2955
2955
|
s.applyStylePosistionAbsolute(
|
|
2956
|
-
s.createAreaDivWithClass("ge-table-header ge-table-header-center",
|
|
2956
|
+
s.createAreaDivWithClass("ge-table-header ge-table-header-center", o, "header", "center")
|
|
2957
2957
|
)
|
|
2958
2958
|
), this.areaHeaderEast = s.appendRelativeChildDiv(
|
|
2959
2959
|
s.applyStylePosistionAbsolute(
|
|
2960
|
-
s.createAreaDivWithClass("ge-table-header ge-table-header-east",
|
|
2960
|
+
s.createAreaDivWithClass("ge-table-header ge-table-header-east", o, "body", "east")
|
|
2961
2961
|
)
|
|
2962
2962
|
), this.areaBodyWest = s.appendRelativeChildDiv(
|
|
2963
2963
|
s.applyStylePosistionAbsolute(
|
|
2964
|
-
s.createAreaDivWithClass("ge-table-body ge-table-body-west",
|
|
2964
|
+
s.createAreaDivWithClass("ge-table-body ge-table-body-west", o, "body", "west")
|
|
2965
2965
|
)
|
|
2966
2966
|
), this.areaBodyEast = s.appendRelativeChildDiv(
|
|
2967
2967
|
s.applyStylePosistionAbsolute(
|
|
2968
|
-
s.createAreaDivWithClass("ge-table-body ge-table-body-east",
|
|
2968
|
+
s.createAreaDivWithClass("ge-table-body ge-table-body-east", o, "body", "east")
|
|
2969
2969
|
)
|
|
2970
2970
|
), this.areaFooterWest = s.appendRelativeChildDiv(
|
|
2971
2971
|
s.applyStylePosistionAbsolute(
|
|
2972
|
-
s.createAreaDivWithClass("ge-table-footer ge-table-footer-west",
|
|
2972
|
+
s.createAreaDivWithClass("ge-table-footer ge-table-footer-west", o, "footer", "west")
|
|
2973
2973
|
)
|
|
2974
2974
|
), this.areaFooterCenter = s.appendRelativeChildDiv(
|
|
2975
2975
|
s.applyStylePosistionAbsolute(
|
|
2976
|
-
s.createAreaDivWithClass("ge-table-footer ge-table-footer-center",
|
|
2976
|
+
s.createAreaDivWithClass("ge-table-footer ge-table-footer-center", o, "footer", "center")
|
|
2977
2977
|
)
|
|
2978
2978
|
), this.areaFooterEast = s.appendRelativeChildDiv(
|
|
2979
2979
|
s.applyStylePosistionAbsolute(
|
|
2980
|
-
s.createAreaDivWithClass("ge-table-footer ge-table-footer-east",
|
|
2980
|
+
s.createAreaDivWithClass("ge-table-footer ge-table-footer-east", o, "footer", "east")
|
|
2981
2981
|
)
|
|
2982
2982
|
), this.scrollViewport = s.applyStyleOverflowAuto(
|
|
2983
2983
|
this.tableOptions.overflowX ?? "auto",
|
|
2984
2984
|
this.tableOptions.overflowY ?? "auto",
|
|
2985
2985
|
s.applyStyleNoPadding(
|
|
2986
2986
|
s.applyStylePosistionAbsolute(
|
|
2987
|
-
s.createAreaDivWithClass("ge-table-scroll-viewport",
|
|
2987
|
+
s.createAreaDivWithClass("ge-table-scroll-viewport", o, "body", "center")
|
|
2988
2988
|
)
|
|
2989
2989
|
)
|
|
2990
2990
|
), this.contentWrapperDiv = s.applyStyleNoPadding(
|
|
@@ -2998,13 +2998,13 @@ class nt {
|
|
|
2998
2998
|
), this.areaBodyCenter = s.appendRelativeChildDiv(
|
|
2999
2999
|
s.createDivWithClass("ge-table-body-center", this.contentDiv)
|
|
3000
3000
|
), this.borderHeaderBottom = s.applyStylePosistionAbsolute(
|
|
3001
|
-
s.createDivWithClass("ge-table-header-border",
|
|
3001
|
+
s.createDivWithClass("ge-table-header-border", o)
|
|
3002
3002
|
), this.borderFixedWest = s.applyStylePosistionAbsolute(
|
|
3003
|
-
s.createDivWithClass("ge-table-west-fixed-column-border",
|
|
3003
|
+
s.createDivWithClass("ge-table-west-fixed-column-border", o)
|
|
3004
3004
|
), this.borderFixedEast = s.applyStylePosistionAbsolute(
|
|
3005
|
-
s.createDivWithClass("ge-table-east-fixed-column-border",
|
|
3005
|
+
s.createDivWithClass("ge-table-east-fixed-column-border", o)
|
|
3006
3006
|
), this.borderFooterTop = s.applyStylePosistionAbsolute(
|
|
3007
|
-
s.createDivWithClass("ge-table-footer-border",
|
|
3007
|
+
s.createDivWithClass("ge-table-footer-border", o)
|
|
3008
3008
|
);
|
|
3009
3009
|
}
|
|
3010
3010
|
/**
|
|
@@ -3114,8 +3114,8 @@ class E {
|
|
|
3114
3114
|
* @param {number} c2 - The value for c2.
|
|
3115
3115
|
* @param {boolean} [gammaRange=false] - The value for gammaRange. Defaults to false. gammaRange will be used for AreaModelCellGroups, but it's not implemented yet!
|
|
3116
3116
|
*/
|
|
3117
|
-
constructor(e, t, s,
|
|
3118
|
-
this.r1 = e, this.c1 = t, this.r2 = s, this.c2 =
|
|
3117
|
+
constructor(e, t, s, i, o = !1) {
|
|
3118
|
+
this.r1 = e, this.c1 = t, this.r2 = s, this.c2 = i, this.gammaRange = o;
|
|
3119
3119
|
}
|
|
3120
3120
|
static create(e) {
|
|
3121
3121
|
return e.gammaRange === void 0 && (e.gammaRange = !1), new E(
|
|
@@ -3139,7 +3139,7 @@ class E {
|
|
|
3139
3139
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
3140
3140
|
}
|
|
3141
3141
|
}
|
|
3142
|
-
class
|
|
3142
|
+
class ot {
|
|
3143
3143
|
constructor(e, t) {
|
|
3144
3144
|
this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
|
|
3145
3145
|
}
|
|
@@ -3149,13 +3149,13 @@ class ct {
|
|
|
3149
3149
|
this.colAndRowspanRanges = [];
|
|
3150
3150
|
const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
|
|
3151
3151
|
for (let s = 0; s < e; s++)
|
|
3152
|
-
for (let
|
|
3153
|
-
let
|
|
3154
|
-
if (
|
|
3155
|
-
|
|
3156
|
-
const
|
|
3152
|
+
for (let i = 0; i < t; i++) {
|
|
3153
|
+
let o = this.areaModel.getColspanAt(s, i), l = this.areaModel.getRowspanAt(s, i);
|
|
3154
|
+
if (o > 1 || l > 1) {
|
|
3155
|
+
o === 0 && (o = 1), l === 0 && (l = 1);
|
|
3156
|
+
const n = "gammaCells" in this.areaModel;
|
|
3157
3157
|
this.colAndRowspanRanges.push(
|
|
3158
|
-
new E(s,
|
|
3158
|
+
new E(s, i, s + l - 1, i + o - 1, n)
|
|
3159
3159
|
);
|
|
3160
3160
|
}
|
|
3161
3161
|
}
|
|
@@ -3172,22 +3172,22 @@ class ct {
|
|
|
3172
3172
|
return !1;
|
|
3173
3173
|
}
|
|
3174
3174
|
}
|
|
3175
|
-
class
|
|
3175
|
+
class lt {
|
|
3176
3176
|
constructor(e, t, s) {
|
|
3177
3177
|
this.header = e, this.body = t, this.footer = s;
|
|
3178
3178
|
}
|
|
3179
3179
|
}
|
|
3180
|
-
class
|
|
3181
|
-
constructor(e, t, s,
|
|
3182
|
-
var
|
|
3183
|
-
super(e, t, s,
|
|
3180
|
+
class rt extends it {
|
|
3181
|
+
constructor(e, t, s, i) {
|
|
3182
|
+
var l, n;
|
|
3183
|
+
super(e, t, s, i), this.firstVisibleRowIndex = -1, this.lastVisibleRowIndex = -1, this.firstFullVisibleRowIndex = -1, this.lastFullVisibleRowIndex = -1, this.displayedRowCount = 0, this.pixelLimitForFullVisible = 5, this.loggingActive = !1, this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
3184
3184
|
header: [],
|
|
3185
3185
|
body: [],
|
|
3186
3186
|
footer: []
|
|
3187
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
3188
|
-
(
|
|
3187
|
+
}, this.tree = !1, this.colAndRowspanModels = new lt(), this.draggingTargetColumnIndex = -1, this.removables = [], this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (l = this.tableOptions) != null && l.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (n = this.tableOptions) != null && n.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), oe(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
3188
|
+
(a) => {
|
|
3189
3189
|
var d;
|
|
3190
|
-
this.colAndRowspanModels[
|
|
3190
|
+
this.colAndRowspanModels[a] = new ot(t, t.getAreaModel(a)), (d = this.colAndRowspanModels[a]) == null || d.init();
|
|
3191
3191
|
}
|
|
3192
3192
|
);
|
|
3193
3193
|
}
|
|
@@ -3225,13 +3225,13 @@ class ht extends nt {
|
|
|
3225
3225
|
* @param {number} colIdx - The index of the column.
|
|
3226
3226
|
*/
|
|
3227
3227
|
initRenderEditor(e, t) {
|
|
3228
|
-
var
|
|
3229
|
-
let s = (
|
|
3228
|
+
var i;
|
|
3229
|
+
let s = (i = this.tableModel.getColumnDef(t)) == null ? void 0 : i.getEditRenderer;
|
|
3230
3230
|
if (s || (s = this.tableOptions.getEditRenderer), s)
|
|
3231
3231
|
if (this.editorRenderer = s(e, t), this.editorRenderer) {
|
|
3232
3232
|
this.editorRendererRow = e, this.editorRendererColumn = t, this.editing = !0, this.repaint();
|
|
3233
|
-
const
|
|
3234
|
-
|
|
3233
|
+
const o = document.querySelector("input.ge-table-cell-editor-input");
|
|
3234
|
+
o && o.focus();
|
|
3235
3235
|
} else
|
|
3236
3236
|
this.resetEditorRenderer();
|
|
3237
3237
|
}
|
|
@@ -3323,24 +3323,24 @@ class ht extends nt {
|
|
|
3323
3323
|
* @param {any} value - The new value to be displayed in the cell.
|
|
3324
3324
|
* @param {string[]} cssClasses - An array of CSS classes to be applied to the cell.
|
|
3325
3325
|
*/
|
|
3326
|
-
rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value:
|
|
3327
|
-
const
|
|
3328
|
-
if (
|
|
3326
|
+
rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: i, cssClasses: o }) {
|
|
3327
|
+
const l = this.tableModel.getAreaModel(e), n = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', a = document.querySelector(n);
|
|
3328
|
+
if (a) {
|
|
3329
3329
|
let d;
|
|
3330
3330
|
const c = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s;
|
|
3331
3331
|
let h;
|
|
3332
|
-
if (c ? h = this.editorRenderer : h =
|
|
3333
|
-
d = h.render(
|
|
3332
|
+
if (c ? h = this.editorRenderer : h = l.getCellRenderer(t, s), a.innerText = "", this.applyCssClasses(a, o), h)
|
|
3333
|
+
d = h.render(a, t, s, e, l, i, this.dom.domService), d && this.cleanupFunctions[e].push(d);
|
|
3334
3334
|
else {
|
|
3335
|
-
const
|
|
3336
|
-
this.dom.addLabelDiv(
|
|
3335
|
+
const u = `${i}`;
|
|
3336
|
+
this.dom.addLabelDiv(a, u, !1, t, s, e);
|
|
3337
3337
|
}
|
|
3338
|
-
const p =
|
|
3339
|
-
p.length && this.dom.addClasses(p,
|
|
3340
|
-
const
|
|
3341
|
-
if (
|
|
3342
|
-
for (const
|
|
3343
|
-
this.dom.setStyle(
|
|
3338
|
+
const p = l.getCustomClassesAt(t, s);
|
|
3339
|
+
p.length && this.dom.addClasses(p, a);
|
|
3340
|
+
const g = l.getCustomStyleAt(t, s);
|
|
3341
|
+
if (g)
|
|
3342
|
+
for (const u in g)
|
|
3343
|
+
this.dom.setStyle(a, u, g[u]);
|
|
3344
3344
|
}
|
|
3345
3345
|
}
|
|
3346
3346
|
getFirstVisibleRowIndex() {
|
|
@@ -3423,8 +3423,8 @@ class ht extends nt {
|
|
|
3423
3423
|
getNumberByAttr(e, t) {
|
|
3424
3424
|
var s;
|
|
3425
3425
|
if (e) {
|
|
3426
|
-
const
|
|
3427
|
-
if (
|
|
3426
|
+
const i = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
|
|
3427
|
+
if (i) return Number(i);
|
|
3428
3428
|
}
|
|
3429
3429
|
return -1;
|
|
3430
3430
|
}
|
|
@@ -3439,8 +3439,8 @@ class ht extends nt {
|
|
|
3439
3439
|
getStringByAttr(e, t) {
|
|
3440
3440
|
var s;
|
|
3441
3441
|
if (e) {
|
|
3442
|
-
const
|
|
3443
|
-
if (
|
|
3442
|
+
const i = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
|
|
3443
|
+
if (i) return i;
|
|
3444
3444
|
}
|
|
3445
3445
|
return "";
|
|
3446
3446
|
}
|
|
@@ -3454,59 +3454,59 @@ class ht extends nt {
|
|
|
3454
3454
|
*/
|
|
3455
3455
|
adjustArea(e, t = 0) {
|
|
3456
3456
|
var f;
|
|
3457
|
-
const s = this.getArea(e, "west"),
|
|
3458
|
-
s.child.innerText = "",
|
|
3459
|
-
const
|
|
3457
|
+
const s = this.getArea(e, "west"), i = this.getArea(e, "center"), o = this.getArea(e, "east"), l = i.child.clientHeight;
|
|
3458
|
+
s.child.innerText = "", i.child.innerText = "", o.child.innerText = "";
|
|
3459
|
+
const n = 0, a = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), c = this.tableModel.getAreaModel(e), h = c.getRowCount();
|
|
3460
3460
|
for (; this.cleanupFunctions[e].length; ) {
|
|
3461
|
-
const
|
|
3462
|
-
|
|
3461
|
+
const m = this.cleanupFunctions[e].shift();
|
|
3462
|
+
m && m();
|
|
3463
3463
|
}
|
|
3464
3464
|
let p = t;
|
|
3465
|
-
const
|
|
3465
|
+
const g = this.tableModel.getColumnCount(), u = this.tableModel.getFixedRightColumnCount(), S = this.tableModel.getFixedLeftColumnCount();
|
|
3466
3466
|
e === "body" && (this.firstVisibleRowIndex = -1, this.firstFullVisibleRowIndex = -1, this.lastVisibleRowIndex = -1, this.lastFullVisibleRowIndex = -1);
|
|
3467
|
-
for (let
|
|
3468
|
-
const w = p,
|
|
3467
|
+
for (let m = 0; m < h; m++) {
|
|
3468
|
+
const w = p, C = m === h - 1, A = this.tableModel.getRowHeight(e, m);
|
|
3469
3469
|
if (w + A > 0) {
|
|
3470
|
-
e === "body" && this.firstVisibleRowIndex === -1 && (this.firstVisibleRowIndex =
|
|
3471
|
-
let
|
|
3472
|
-
const D =
|
|
3470
|
+
e === "body" && this.firstVisibleRowIndex === -1 && (this.firstVisibleRowIndex = m, this.firstFullVisibleRowIndex = w < -this.pixelLimitForFullVisible ? this.firstVisibleRowIndex + 1 : this.firstVisibleRowIndex);
|
|
3471
|
+
let b = { left: n, width: a, height: A, top: w, index: m }, y = this.dom.addRowDiv(i, b, m, e, "center");
|
|
3472
|
+
const D = S;
|
|
3473
3473
|
if (this.adjustColumnsToRowParent({
|
|
3474
3474
|
areaIdent: e,
|
|
3475
3475
|
sideIdent: "center",
|
|
3476
3476
|
areaModel: c,
|
|
3477
|
-
geo:
|
|
3478
|
-
parent:
|
|
3479
|
-
rowIndex:
|
|
3477
|
+
geo: b,
|
|
3478
|
+
parent: y,
|
|
3479
|
+
rowIndex: m,
|
|
3480
3480
|
columnIndexStart: D,
|
|
3481
|
-
columnIndexEnd:
|
|
3481
|
+
columnIndexEnd: g - u - 1,
|
|
3482
3482
|
verticalFixed: !1,
|
|
3483
|
-
lastRowOfModel:
|
|
3484
|
-
}), d.left > 0 && (
|
|
3483
|
+
lastRowOfModel: C
|
|
3484
|
+
}), d.left > 0 && (b = { left: n, width: this.areaBodyWestGeo.width, height: A, top: w, index: m }, y = this.dom.addRowDiv(s, b, m, e, "west"), this.adjustColumnsToRowParent({
|
|
3485
3485
|
areaIdent: e,
|
|
3486
3486
|
sideIdent: "west",
|
|
3487
3487
|
areaModel: c,
|
|
3488
|
-
geo:
|
|
3489
|
-
parent:
|
|
3490
|
-
rowIndex:
|
|
3488
|
+
geo: b,
|
|
3489
|
+
parent: y,
|
|
3490
|
+
rowIndex: m,
|
|
3491
3491
|
columnIndexStart: 0,
|
|
3492
3492
|
columnIndexEnd: D - 1,
|
|
3493
3493
|
verticalFixed: !0,
|
|
3494
|
-
lastRowOfModel:
|
|
3495
|
-
})), d.right > 0 && (
|
|
3494
|
+
lastRowOfModel: C
|
|
3495
|
+
})), d.right > 0 && (b = { left: n, width: this.areaBodyEastGeo.width, height: A, top: w, index: m }, y = this.dom.addRowDiv(o, b, m, e, "east"), this.adjustColumnsToRowParent({
|
|
3496
3496
|
areaIdent: e,
|
|
3497
3497
|
sideIdent: "east",
|
|
3498
3498
|
areaModel: c,
|
|
3499
|
-
geo:
|
|
3500
|
-
parent:
|
|
3501
|
-
rowIndex:
|
|
3502
|
-
columnIndexStart:
|
|
3503
|
-
columnIndexEnd:
|
|
3499
|
+
geo: b,
|
|
3500
|
+
parent: y,
|
|
3501
|
+
rowIndex: m,
|
|
3502
|
+
columnIndexStart: g - u,
|
|
3503
|
+
columnIndexEnd: g - 1,
|
|
3504
3504
|
verticalFixed: !0,
|
|
3505
|
-
lastRowOfModel:
|
|
3506
|
-
})), e === "header" && this.tree &&
|
|
3505
|
+
lastRowOfModel: C
|
|
3506
|
+
})), e === "header" && this.tree && m === h - 1) {
|
|
3507
3507
|
const T = this.dom.applyStyle(
|
|
3508
3508
|
this.dom.setAttribute(
|
|
3509
|
-
this.dom.addDiv(
|
|
3509
|
+
this.dom.addDiv(y, new I(16, 20, 20, 8)),
|
|
3510
3510
|
"data-ge-action",
|
|
3511
3511
|
"toggleExpandCollapseAll"
|
|
3512
3512
|
),
|
|
@@ -3518,8 +3518,8 @@ class ht extends nt {
|
|
|
3518
3518
|
}
|
|
3519
3519
|
}
|
|
3520
3520
|
}
|
|
3521
|
-
if (p = p + A, p >
|
|
3522
|
-
e === "body" && (this.lastVisibleRowIndex =
|
|
3521
|
+
if (p = p + A, p > l) {
|
|
3522
|
+
e === "body" && (this.lastVisibleRowIndex = m, this.lastFullVisibleRowIndex = l - p < -this.pixelLimitForFullVisible ? m - 1 : m, this.displayedRowCount = this.lastFullVisibleRowIndex - this.firstFullVisibleRowIndex + 1);
|
|
3523
3523
|
break;
|
|
3524
3524
|
}
|
|
3525
3525
|
}
|
|
@@ -3527,19 +3527,19 @@ class ht extends nt {
|
|
|
3527
3527
|
render scope: this.firstFullVisibleRowIndex <- ` + this.firstFullVisibleRowIndex + `
|
|
3528
3528
|
render scope: this.lastVisibleRowIndex <- ` + this.lastVisibleRowIndex + `
|
|
3529
3529
|
render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex), this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
3530
|
-
const
|
|
3531
|
-
if (
|
|
3532
|
-
for (const w of
|
|
3533
|
-
let
|
|
3534
|
-
if (w.c1 <
|
|
3535
|
-
A = s.child,
|
|
3536
|
-
else if (
|
|
3537
|
-
A =
|
|
3530
|
+
const m = ((f = this.colAndRowspanModels[e]) == null ? void 0 : f.getRanges()) ?? [];
|
|
3531
|
+
if (m.length)
|
|
3532
|
+
for (const w of m) {
|
|
3533
|
+
let C = 0, A = i.child, b = "center";
|
|
3534
|
+
if (w.c1 < S)
|
|
3535
|
+
A = s.child, b = "west";
|
|
3536
|
+
else if (u > 0 && w.c1 >= g - u)
|
|
3537
|
+
A = o.child, b = "east";
|
|
3538
3538
|
else {
|
|
3539
|
-
const
|
|
3540
|
-
|
|
3539
|
+
const y = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
3540
|
+
C = this.scrollFactorX * y - this.areaBodyWestGeo.width, b = "center";
|
|
3541
3541
|
}
|
|
3542
|
-
this.drawBigCell(w,
|
|
3542
|
+
this.drawBigCell(w, C, t, c, A, b);
|
|
3543
3543
|
}
|
|
3544
3544
|
}
|
|
3545
3545
|
}
|
|
@@ -3553,49 +3553,49 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3553
3553
|
* @param sideIdent SideIdent (west,center,east)
|
|
3554
3554
|
* @protected
|
|
3555
3555
|
*/
|
|
3556
|
-
drawBigCell(e, t, s,
|
|
3557
|
-
const
|
|
3556
|
+
drawBigCell(e, t, s, i, o, l) {
|
|
3557
|
+
const n = s + this.getRowHeights(0, e.r1 - 1, i).reduce((f, m) => f + m, 0), a = this.tableModel.getColumnCount(), d = this.tableModel.getFixedRightColumnCount();
|
|
3558
3558
|
let c = 0;
|
|
3559
|
-
d > 0 && e.c1 >=
|
|
3560
|
-
const h = t + this.getColumnWidths(c, e.c1 - 1).reduce((f,
|
|
3561
|
-
let
|
|
3562
|
-
const
|
|
3563
|
-
|
|
3564
|
-
areaModel:
|
|
3565
|
-
areaIdent:
|
|
3566
|
-
sideIdent:
|
|
3559
|
+
d > 0 && e.c1 >= a - d && (c = a - d);
|
|
3560
|
+
const h = t + this.getColumnWidths(c, e.c1 - 1).reduce((f, m) => f + m, 0), p = this.getRowHeights(e.r1, e.r2, i).reduce((f, m) => f + m, 0), g = this.getColumnWidths(e.c1, e.c2).reduce((f, m) => f + m, 0);
|
|
3561
|
+
let u = !1;
|
|
3562
|
+
const S = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
3563
|
+
S && (u = S.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
|
|
3564
|
+
areaModel: i,
|
|
3565
|
+
areaIdent: i.areaIdent,
|
|
3566
|
+
sideIdent: l,
|
|
3567
3567
|
rowIndex: e.r1,
|
|
3568
3568
|
columnIndex: e.c1,
|
|
3569
3569
|
left: h,
|
|
3570
|
-
top:
|
|
3571
|
-
width:
|
|
3570
|
+
top: n,
|
|
3571
|
+
width: g,
|
|
3572
3572
|
height: p,
|
|
3573
|
-
parent:
|
|
3574
|
-
cellSelected:
|
|
3573
|
+
parent: o,
|
|
3574
|
+
cellSelected: u,
|
|
3575
3575
|
lastRowOfModel: !0,
|
|
3576
3576
|
gammaRange: e.gammaRange
|
|
3577
3577
|
}) : this.renderCell({
|
|
3578
|
-
areaModel:
|
|
3579
|
-
areaIdent:
|
|
3580
|
-
sideIdent:
|
|
3578
|
+
areaModel: i,
|
|
3579
|
+
areaIdent: i.areaIdent,
|
|
3580
|
+
sideIdent: l,
|
|
3581
3581
|
rowIndex: e.r1,
|
|
3582
3582
|
columnIndex: e.c1,
|
|
3583
3583
|
left: h,
|
|
3584
|
-
top:
|
|
3585
|
-
width:
|
|
3584
|
+
top: n,
|
|
3585
|
+
width: g,
|
|
3586
3586
|
height: p,
|
|
3587
|
-
parent:
|
|
3588
|
-
cellSelected:
|
|
3587
|
+
parent: o,
|
|
3588
|
+
cellSelected: u,
|
|
3589
3589
|
lastRowOfModel: !0,
|
|
3590
3590
|
gammaRange: e.gammaRange
|
|
3591
|
-
}),
|
|
3591
|
+
}), i.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
3592
3592
|
rowIndex: e.r1,
|
|
3593
3593
|
columnIndex: e.c1,
|
|
3594
3594
|
cellLeft: h,
|
|
3595
|
-
cellTop:
|
|
3596
|
-
cellWidth:
|
|
3595
|
+
cellTop: n,
|
|
3596
|
+
cellWidth: g,
|
|
3597
3597
|
cellHeight: p,
|
|
3598
|
-
parent:
|
|
3598
|
+
parent: o
|
|
3599
3599
|
});
|
|
3600
3600
|
}
|
|
3601
3601
|
/**
|
|
@@ -3608,12 +3608,12 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3608
3608
|
* @protected
|
|
3609
3609
|
*/
|
|
3610
3610
|
findRowOfImportantRowspanCell(e, t, s) {
|
|
3611
|
-
const
|
|
3612
|
-
for (let
|
|
3613
|
-
const
|
|
3614
|
-
if (
|
|
3615
|
-
return
|
|
3616
|
-
if (t -
|
|
3611
|
+
const i = e.getMaxRowspan();
|
|
3612
|
+
for (let o = t - 1; o > -1; o--) {
|
|
3613
|
+
const l = e.getRowspanAt(o, s);
|
|
3614
|
+
if (l > 1 && o + l + 1 >= t)
|
|
3615
|
+
return o;
|
|
3616
|
+
if (t - o > i)
|
|
3617
3617
|
return -1;
|
|
3618
3618
|
}
|
|
3619
3619
|
return -1;
|
|
@@ -3629,67 +3629,67 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3629
3629
|
areaIdent: e,
|
|
3630
3630
|
sideIdent: t,
|
|
3631
3631
|
areaModel: s,
|
|
3632
|
-
geo:
|
|
3633
|
-
parent:
|
|
3634
|
-
rowIndex:
|
|
3635
|
-
columnIndexStart:
|
|
3636
|
-
columnIndexEnd:
|
|
3632
|
+
geo: i,
|
|
3633
|
+
parent: o,
|
|
3634
|
+
rowIndex: l,
|
|
3635
|
+
columnIndexStart: n,
|
|
3636
|
+
columnIndexEnd: a,
|
|
3637
3637
|
verticalFixed: d = !1,
|
|
3638
3638
|
lastRowOfModel: c = !1
|
|
3639
3639
|
}) {
|
|
3640
|
-
var
|
|
3640
|
+
var S;
|
|
3641
3641
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
3642
3642
|
let h = 0;
|
|
3643
3643
|
if (!d) {
|
|
3644
3644
|
const f = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
3645
3645
|
h = this.scrollFactorX * f;
|
|
3646
3646
|
}
|
|
3647
|
-
const p = 0,
|
|
3648
|
-
let
|
|
3649
|
-
for (let f =
|
|
3650
|
-
const
|
|
3651
|
-
if (w > 0 &&
|
|
3652
|
-
let
|
|
3653
|
-
const A = s.getRowspanAt(
|
|
3654
|
-
A > 1 && (
|
|
3655
|
-
let
|
|
3656
|
-
|
|
3647
|
+
const p = 0, g = !!(e === "body" && t);
|
|
3648
|
+
let u = h;
|
|
3649
|
+
for (let f = n; f <= a; f++) {
|
|
3650
|
+
const m = u, w = this.tableModel.getColumnWidth(f);
|
|
3651
|
+
if (w > 0 && m + w > 0) {
|
|
3652
|
+
let C = i.height;
|
|
3653
|
+
const A = s.getRowspanAt(l, f), b = s.getColspanAt(l, f);
|
|
3654
|
+
A > 1 && (C = this.getRowHeights(l, l + A - 1, s).reduce((T, F) => T + F, 0));
|
|
3655
|
+
let y = w;
|
|
3656
|
+
b > 1 && (y = this.getColumnWidths(f, f + b - 1).reduce((T, F) => T + F, 0));
|
|
3657
3657
|
let D = !1;
|
|
3658
|
-
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (
|
|
3659
|
-
this.renderDragTargetDiv(
|
|
3660
|
-
const T = { left:
|
|
3661
|
-
this.dom.addColumnBorderDivs(this.tableOptions,
|
|
3658
|
+
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (S = this.colAndRowspanModels[e]) != null && S.isInRange(l, f) && (D = !0), this.draggingTargetColumnIndex === f && e !== "header") {
|
|
3659
|
+
this.renderDragTargetDiv(o, m, p, y, C);
|
|
3660
|
+
const T = { left: m, top: p, width: y, height: C };
|
|
3661
|
+
this.dom.addColumnBorderDivs(this.tableOptions, o, T, e, t);
|
|
3662
3662
|
} else {
|
|
3663
|
-
const T = this.renderSelectedBackgroundDiv(D,
|
|
3664
|
-
"gammaCells" in s && s.getValueAt(
|
|
3663
|
+
const T = this.renderSelectedBackgroundDiv(D, g, t, s, l, f, o, m, p, y, C);
|
|
3664
|
+
"gammaCells" in s && s.getValueAt(l, f) && (D = !1), D || this.renderCell({
|
|
3665
3665
|
areaModel: s,
|
|
3666
3666
|
areaIdent: e,
|
|
3667
3667
|
sideIdent: t,
|
|
3668
|
-
rowIndex:
|
|
3668
|
+
rowIndex: l,
|
|
3669
3669
|
columnIndex: f,
|
|
3670
|
-
left:
|
|
3670
|
+
left: m,
|
|
3671
3671
|
top: p,
|
|
3672
|
-
width:
|
|
3673
|
-
height:
|
|
3674
|
-
parent:
|
|
3672
|
+
width: y,
|
|
3673
|
+
height: C,
|
|
3674
|
+
parent: o,
|
|
3675
3675
|
cellSelected: T,
|
|
3676
3676
|
lastRowOfModel: c,
|
|
3677
3677
|
gammaRange: !0
|
|
3678
3678
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
3679
|
-
rowIndex:
|
|
3679
|
+
rowIndex: l,
|
|
3680
3680
|
columnIndex: f,
|
|
3681
|
-
cellLeft:
|
|
3681
|
+
cellLeft: m,
|
|
3682
3682
|
cellTop: p,
|
|
3683
|
-
cellWidth:
|
|
3684
|
-
cellHeight:
|
|
3685
|
-
parent:
|
|
3683
|
+
cellWidth: y,
|
|
3684
|
+
cellHeight: C,
|
|
3685
|
+
parent: o
|
|
3686
3686
|
});
|
|
3687
3687
|
}
|
|
3688
3688
|
}
|
|
3689
|
-
if (
|
|
3689
|
+
if (u = u + w, u > this.areaBodyCenterGeo.width)
|
|
3690
3690
|
break;
|
|
3691
3691
|
}
|
|
3692
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new I(
|
|
3692
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new I(u - 1, 1, i.height, 0), o);
|
|
3693
3693
|
}
|
|
3694
3694
|
/**
|
|
3695
3695
|
* Retrieves the column index of the tree arrow column in the table.
|
|
@@ -3707,58 +3707,58 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3707
3707
|
areaModel: e,
|
|
3708
3708
|
areaIdent: t,
|
|
3709
3709
|
sideIdent: s,
|
|
3710
|
-
rowIndex:
|
|
3711
|
-
index:
|
|
3712
|
-
left:
|
|
3713
|
-
width:
|
|
3714
|
-
height:
|
|
3710
|
+
rowIndex: i,
|
|
3711
|
+
index: o,
|
|
3712
|
+
left: l,
|
|
3713
|
+
width: n,
|
|
3714
|
+
height: a,
|
|
3715
3715
|
top: d,
|
|
3716
3716
|
parent: c,
|
|
3717
3717
|
lastRowOfModel: h
|
|
3718
3718
|
}) {
|
|
3719
|
-
var
|
|
3720
|
-
const
|
|
3719
|
+
var he;
|
|
3720
|
+
const g = this.editorRenderer && this.editorRendererRow === i && this.editorRendererColumn === o ? this.editorRenderer : e.getCellRenderer(i, o), u = { left: l, width: n, height: a, top: d, index: o }, S = e.getRowByIndex(i);
|
|
3721
3721
|
let f = "none";
|
|
3722
|
-
if (
|
|
3723
|
-
const
|
|
3724
|
-
(
|
|
3722
|
+
if (o === this.getTreeArrowColumnIndex() && K(S)) {
|
|
3723
|
+
const v = S;
|
|
3724
|
+
(he = v.children) != null && he.length ? v.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
|
|
3725
3725
|
}
|
|
3726
3726
|
let w;
|
|
3727
3727
|
if (t === "header") {
|
|
3728
|
-
const
|
|
3729
|
-
(!(
|
|
3728
|
+
const v = this.tableModel.getColumnDef(o);
|
|
3729
|
+
(!(v != null && v.sortIconVisible) || v != null && v.sortIconVisible()) && (w = v == null ? void 0 : v.sortState);
|
|
3730
3730
|
}
|
|
3731
|
-
const
|
|
3731
|
+
const C = e.getValueAt(i, o), A = g ? "" : `${C}`, b = e.isRowChecked(i), y = this.dom.addColumnDiv(
|
|
3732
3732
|
{
|
|
3733
3733
|
parent: c,
|
|
3734
|
-
geo:
|
|
3735
|
-
rowIndex:
|
|
3736
|
-
columnIndex:
|
|
3734
|
+
geo: u,
|
|
3735
|
+
rowIndex: i,
|
|
3736
|
+
columnIndex: o,
|
|
3737
3737
|
areaIdent: t,
|
|
3738
3738
|
sideIdent: s,
|
|
3739
3739
|
text: A,
|
|
3740
3740
|
treeArrow: f,
|
|
3741
3741
|
tableOptions: this.tableOptions,
|
|
3742
|
-
checkedType:
|
|
3742
|
+
checkedType: b,
|
|
3743
3743
|
sortState: w
|
|
3744
3744
|
}
|
|
3745
|
-
), D = e.getTooltipAt(
|
|
3746
|
-
D && this.dom.setAttribute(
|
|
3747
|
-
const T = this.tableModel.getColumnDef(
|
|
3748
|
-
T && T.classes[t] && this.dom.addClasses(T.classes[t],
|
|
3745
|
+
), D = e.getTooltipAt(i, o);
|
|
3746
|
+
D && this.dom.setAttribute(y, "title", D);
|
|
3747
|
+
const T = this.tableModel.getColumnDef(o);
|
|
3748
|
+
T && T.classes[t] && this.dom.addClasses(T.classes[t], y);
|
|
3749
3749
|
let F;
|
|
3750
|
-
|
|
3751
|
-
const N = e.getCustomClassesAt(
|
|
3752
|
-
if (N.length && this.dom.addClasses(N,
|
|
3753
|
-
const
|
|
3754
|
-
|
|
3750
|
+
g && (F = g.render(y, i, o, t, e, C, this.dom.domService));
|
|
3751
|
+
const N = e.getCustomClassesAt(i, o);
|
|
3752
|
+
if (N.length && this.dom.addClasses(N, y), this.dom.addColumnBorderDivs(this.tableOptions, c, u, t, s), h && this.dom.addHorizontalBorder({ left: l, width: n, height: a, top: d + a }, c), this.getFocusModel && t === "body") {
|
|
3753
|
+
const v = this.getFocusModel();
|
|
3754
|
+
v != null && v.hasFocus(i, o) && this.dom.addFocusBorderDivs(c, u, {});
|
|
3755
3755
|
}
|
|
3756
|
-
t === "header" && this.dom.setAttribute(
|
|
3757
|
-
const
|
|
3758
|
-
if (
|
|
3759
|
-
for (const
|
|
3760
|
-
this.dom.setStyle(
|
|
3761
|
-
return [
|
|
3756
|
+
t === "header" && this.dom.setAttribute(y, "data-ge-action", "drag-column");
|
|
3757
|
+
const Z = e.getCustomStyleAt(i, o);
|
|
3758
|
+
if (Z)
|
|
3759
|
+
for (const v in Z)
|
|
3760
|
+
this.dom.setStyle(y, v, Z[v]);
|
|
3761
|
+
return [y, F];
|
|
3762
3762
|
}
|
|
3763
3763
|
/**
|
|
3764
3764
|
* Applies CSS classes to an HTML element.
|
|
@@ -3768,8 +3768,8 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3768
3768
|
* @protected
|
|
3769
3769
|
*/
|
|
3770
3770
|
applyCssClasses(e, t = {}) {
|
|
3771
|
-
e && Object.entries(t).forEach(([s,
|
|
3772
|
-
|
|
3771
|
+
e && Object.entries(t).forEach(([s, i]) => {
|
|
3772
|
+
i ? this.dom.addClass(s, e) : this.dom.removeClass(s, e);
|
|
3773
3773
|
});
|
|
3774
3774
|
}
|
|
3775
3775
|
/**
|
|
@@ -3782,8 +3782,8 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3782
3782
|
*/
|
|
3783
3783
|
getColumnWidths(e, t) {
|
|
3784
3784
|
const s = [];
|
|
3785
|
-
for (let
|
|
3786
|
-
s.push(this.tableModel.getColumnWidth(
|
|
3785
|
+
for (let i = e; i <= t; i++)
|
|
3786
|
+
s.push(this.tableModel.getColumnWidth(i));
|
|
3787
3787
|
return s;
|
|
3788
3788
|
}
|
|
3789
3789
|
/**
|
|
@@ -3795,10 +3795,10 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3795
3795
|
* @return {number[]} - An array containing the heights of the rows within the specified range.
|
|
3796
3796
|
*/
|
|
3797
3797
|
getRowHeights(e, t, s) {
|
|
3798
|
-
const
|
|
3799
|
-
for (let
|
|
3800
|
-
|
|
3801
|
-
return
|
|
3798
|
+
const i = [];
|
|
3799
|
+
for (let o = e; o <= t; o++)
|
|
3800
|
+
i.push(s.getRowHeight(o));
|
|
3801
|
+
return i;
|
|
3802
3802
|
}
|
|
3803
3803
|
/**
|
|
3804
3804
|
* Adjusts the position and size of the hover row based on the mouse move event.
|
|
@@ -3809,10 +3809,10 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3809
3809
|
*/
|
|
3810
3810
|
adjustHoverRows(e) {
|
|
3811
3811
|
if (this.tableOptions.hoverRowVisible && e.rowIndex > -1) {
|
|
3812
|
-
const t = this.hostElement.clientWidth, s = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex),
|
|
3812
|
+
const t = this.hostElement.clientWidth, s = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex), i = e.rowTop + this.areaHeaderCenter.parent.clientHeight - this.scrollTop;
|
|
3813
3813
|
this.dom.applyStyle(this.hoverRow, {
|
|
3814
3814
|
left: "0",
|
|
3815
|
-
top:
|
|
3815
|
+
top: i + "px",
|
|
3816
3816
|
width: t + "px",
|
|
3817
3817
|
height: s + "px",
|
|
3818
3818
|
display: "block"
|
|
@@ -3842,9 +3842,9 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3842
3842
|
*/
|
|
3843
3843
|
adjustHoverColumns(e) {
|
|
3844
3844
|
if (this.tableOptions.hoverColumnVisible && e.rowIndex > -1) {
|
|
3845
|
-
const t = this.hostElement.clientHeight, s = this.tableModel.getColumnWidth(e.columnIndex),
|
|
3845
|
+
const t = this.hostElement.clientHeight, s = this.tableModel.getColumnWidth(e.columnIndex), i = this.areaBodyWestGeo.width, o = e.columnLeft + this.tableModel.getPadding().left - this.scrollLeft - i;
|
|
3846
3846
|
this.dom.applyStyle(this.hoverColumn, {
|
|
3847
|
-
left:
|
|
3847
|
+
left: o + "px",
|
|
3848
3848
|
top: "0px",
|
|
3849
3849
|
width: s + "px",
|
|
3850
3850
|
height: t + "px",
|
|
@@ -3886,11 +3886,11 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3886
3886
|
* @param {boolean} firstDraggingRendering - Indicates if it's the first rendering of the dragging column.
|
|
3887
3887
|
*/
|
|
3888
3888
|
adjustDraggingColumn(e, t, s) {
|
|
3889
|
-
var
|
|
3889
|
+
var i, o;
|
|
3890
3890
|
if (this.dragging) {
|
|
3891
|
-
const
|
|
3892
|
-
if ((
|
|
3893
|
-
const c = { left: ((
|
|
3891
|
+
const l = this.hostElement.clientHeight, n = this.storedColumnWidths[t];
|
|
3892
|
+
if ((i = e.originalEvent) != null && i.clientX) {
|
|
3893
|
+
const c = { left: ((o = e.originalEvent) == null ? void 0 : o.clientX) - n / 2, width: n, height: l, top: 0, index: t };
|
|
3894
3894
|
this.dom.applyStyle(this.draggingColumn, {
|
|
3895
3895
|
background: "rgba(128,128,128,0.2)",
|
|
3896
3896
|
display: "block",
|
|
@@ -3920,29 +3920,29 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3920
3920
|
* @return {number} The final y-position after rendering all the content.
|
|
3921
3921
|
*/
|
|
3922
3922
|
renderContentOfDraggingColumnForArea(e, t, s = 0) {
|
|
3923
|
-
const
|
|
3924
|
-
if (
|
|
3925
|
-
const
|
|
3926
|
-
for (let d = 0; d <
|
|
3927
|
-
const c = s, h =
|
|
3928
|
-
parent:
|
|
3923
|
+
const i = "center", o = this.tableModel.getAreaModel(t), l = o == null ? void 0 : o.getRowCount();
|
|
3924
|
+
if (l) {
|
|
3925
|
+
const n = e.index ?? 0, a = this.draggingColumn;
|
|
3926
|
+
for (let d = 0; d < l; d++) {
|
|
3927
|
+
const c = s, h = o.getRowHeight(d), p = { left: 0, width: e.width, height: h, top: c, index: d }, g = o.getValueAt(d, n), u = o.getCellRenderer(d, n), S = u ? "" : `${g}`, f = {
|
|
3928
|
+
parent: a,
|
|
3929
3929
|
geo: p,
|
|
3930
3930
|
rowIndex: d,
|
|
3931
|
-
columnIndex:
|
|
3931
|
+
columnIndex: n,
|
|
3932
3932
|
areaIdent: t,
|
|
3933
|
-
sideIdent:
|
|
3934
|
-
text:
|
|
3935
|
-
},
|
|
3933
|
+
sideIdent: i,
|
|
3934
|
+
text: S
|
|
3935
|
+
}, m = this.dom.addColumnDiv(f);
|
|
3936
3936
|
let w;
|
|
3937
|
-
|
|
3938
|
-
const
|
|
3939
|
-
|
|
3940
|
-
const A = this.tableModel.getColumnDef(
|
|
3941
|
-
A && A.classes[t] && this.dom.addClasses(A.classes[t],
|
|
3942
|
-
const
|
|
3943
|
-
if (
|
|
3944
|
-
for (const
|
|
3945
|
-
this.dom.setStyle(
|
|
3937
|
+
u && (w = u.render(m, d, n, t, o, g, this.dom.domService), w && this.cleanupFunctions[t].push(w));
|
|
3938
|
+
const C = o.getCustomClassesAt(d, n);
|
|
3939
|
+
C.length && this.dom.addClasses(C, m);
|
|
3940
|
+
const A = this.tableModel.getColumnDef(n);
|
|
3941
|
+
A && A.classes[t] && this.dom.addClasses(A.classes[t], m), this.dom.addColumnBorderDivs(this.tableOptions, a, p, t, i);
|
|
3942
|
+
const b = o.getCustomStyleAt(d, n);
|
|
3943
|
+
if (b)
|
|
3944
|
+
for (const y in b)
|
|
3945
|
+
this.dom.setStyle(m, y, b[y]);
|
|
3946
3946
|
s = s + h;
|
|
3947
3947
|
}
|
|
3948
3948
|
}
|
|
@@ -3969,11 +3969,11 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3969
3969
|
* @param {number} height - The height of the target div in pixels.
|
|
3970
3970
|
* @return {HTMLDivElement} - The rendered draggable target div element.
|
|
3971
3971
|
*/
|
|
3972
|
-
renderDragTargetDiv(e, t, s,
|
|
3973
|
-
const
|
|
3972
|
+
renderDragTargetDiv(e, t, s, i, o) {
|
|
3973
|
+
const l = this.dom.applyStylePosistionAbsolute(
|
|
3974
3974
|
this.dom.createDivWithClass("ge-table-drop-zone", e)
|
|
3975
3975
|
);
|
|
3976
|
-
return this.dom.setStyle(
|
|
3976
|
+
return this.dom.setStyle(l, "left", `${t}px`), this.dom.setStyle(l, "top", `${s}px`), this.dom.setStyle(l, "width", `${i}px`), this.dom.setStyle(l, "height", `${o}px`), l;
|
|
3977
3977
|
}
|
|
3978
3978
|
/**
|
|
3979
3979
|
* Render selected background div.
|
|
@@ -3992,19 +3992,19 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3992
3992
|
* @param {number} height - The height of the div.
|
|
3993
3993
|
* @returns {boolean} - Whether the cell is selected.
|
|
3994
3994
|
*/
|
|
3995
|
-
renderSelectedBackgroundDiv(e, t, s, o,
|
|
3995
|
+
renderSelectedBackgroundDiv(e, t, s, i, o, l, n, a, d, c, h) {
|
|
3996
3996
|
let p = !1;
|
|
3997
|
-
if (!e && t &&
|
|
3998
|
-
const
|
|
3999
|
-
if (
|
|
4000
|
-
const
|
|
4001
|
-
p =
|
|
4002
|
-
for (let
|
|
3997
|
+
if (!e && t && i.isSelectable(o, l) && this.getSelectionModel) {
|
|
3998
|
+
const g = this.getSelectionModel();
|
|
3999
|
+
if (g) {
|
|
4000
|
+
const u = g.getSelectionCount(o, l);
|
|
4001
|
+
p = u > 0;
|
|
4002
|
+
for (let S = 0; S < u; S++) {
|
|
4003
4003
|
const f = this.dom.applyStylePosistionAbsolute(
|
|
4004
4004
|
// ge-table-body-west-selected-range
|
|
4005
|
-
this.dom.createDivWithClass(`ge-table-${
|
|
4005
|
+
this.dom.createDivWithClass(`ge-table-${i.areaIdent}-${s}-selected-range`, n)
|
|
4006
4006
|
);
|
|
4007
|
-
this.dom.setStyle(f, "left", `${
|
|
4007
|
+
this.dom.setStyle(f, "left", `${a}px`), this.dom.setStyle(f, "top", `${d}px`), this.dom.setStyle(f, "width", `${c}px`), this.dom.setStyle(f, "height", `${h}px`);
|
|
4008
4008
|
}
|
|
4009
4009
|
}
|
|
4010
4010
|
}
|
|
@@ -4033,30 +4033,30 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
4033
4033
|
areaModel: e,
|
|
4034
4034
|
areaIdent: t,
|
|
4035
4035
|
sideIdent: s,
|
|
4036
|
-
rowIndex:
|
|
4037
|
-
columnIndex:
|
|
4038
|
-
left:
|
|
4039
|
-
top:
|
|
4040
|
-
width:
|
|
4036
|
+
rowIndex: i,
|
|
4037
|
+
columnIndex: o,
|
|
4038
|
+
left: l,
|
|
4039
|
+
top: n,
|
|
4040
|
+
width: a,
|
|
4041
4041
|
height: d,
|
|
4042
4042
|
parent: c,
|
|
4043
4043
|
cellSelected: h,
|
|
4044
4044
|
lastRowOfModel: p
|
|
4045
4045
|
}) {
|
|
4046
|
-
const [
|
|
4046
|
+
const [g, u] = this.addAndRenderCellDiv({
|
|
4047
4047
|
areaModel: e,
|
|
4048
4048
|
areaIdent: t,
|
|
4049
4049
|
sideIdent: s,
|
|
4050
|
-
rowIndex:
|
|
4051
|
-
index:
|
|
4052
|
-
left:
|
|
4053
|
-
width:
|
|
4050
|
+
rowIndex: i,
|
|
4051
|
+
index: o,
|
|
4052
|
+
left: l,
|
|
4053
|
+
width: a,
|
|
4054
4054
|
height: d,
|
|
4055
|
-
top:
|
|
4055
|
+
top: n,
|
|
4056
4056
|
parent: c,
|
|
4057
4057
|
lastRowOfModel: p
|
|
4058
4058
|
});
|
|
4059
|
-
h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`,
|
|
4059
|
+
h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, g), u && this.cleanupFunctions[t].push(u);
|
|
4060
4060
|
}
|
|
4061
4061
|
/**
|
|
4062
4062
|
* Render the header cell resize handle.
|
|
@@ -4072,17 +4072,17 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
4072
4072
|
*
|
|
4073
4073
|
* @return {void}
|
|
4074
4074
|
*/
|
|
4075
|
-
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop:
|
|
4076
|
-
const
|
|
4077
|
-
|
|
4075
|
+
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: i, cellWidth: o, cellHeight: l, parent: n }) {
|
|
4076
|
+
const a = this.dom.domService, d = this.tableOptions.columnResizeHandleWidthInPx ?? 2, c = a.createElement("div");
|
|
4077
|
+
a.setAttribute(c, "data-col-index", `${t}`), a.setAttribute(c, "data-row-index", `${e}`), a.setAttribute(c, "data-area", "header"), a.setAttribute(c, "data-ge-action", "resize-column"), a.addClass(c, "ge-table-column-resize-handle"), a.setStyle(c, "display", "clip"), a.setStyle(c, "position", "absolute"), a.setStyle(c, "cursor", "col-resize"), a.setStyle(c, "left", `${s + o - d}px`), a.setStyle(c, "top", `${i}px`), a.setStyle(c, "width", `${d}px`), a.setStyle(c, "height", `${l}px`), a.appendChild(n, c);
|
|
4078
4078
|
}
|
|
4079
4079
|
}
|
|
4080
|
-
class
|
|
4080
|
+
class nt {
|
|
4081
4081
|
constructor(e, t) {
|
|
4082
4082
|
this.columnIndex = e, this.sortState = t;
|
|
4083
4083
|
}
|
|
4084
4084
|
}
|
|
4085
|
-
class
|
|
4085
|
+
class at {
|
|
4086
4086
|
constructor(e) {
|
|
4087
4087
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
4088
4088
|
}
|
|
@@ -4096,45 +4096,45 @@ class gt {
|
|
|
4096
4096
|
*/
|
|
4097
4097
|
onHostElementChanged(e) {
|
|
4098
4098
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
4099
|
-
const t = e.target, s = t.getAttribute("data-area"),
|
|
4100
|
-
if (s &&
|
|
4101
|
-
const
|
|
4102
|
-
this.tableScope.updateModelValueAfterEdit(
|
|
4099
|
+
const t = e.target, s = t.getAttribute("data-area"), i = t.getAttribute("data-row-index"), o = t.getAttribute("data-col-index");
|
|
4100
|
+
if (s && i && o) {
|
|
4101
|
+
const l = ne(s), n = Number(i), a = Number(o);
|
|
4102
|
+
this.tableScope.updateModelValueAfterEdit(l, n, a, t.value);
|
|
4103
4103
|
}
|
|
4104
4104
|
}
|
|
4105
4105
|
}
|
|
4106
4106
|
}
|
|
4107
|
-
class
|
|
4107
|
+
class ct {
|
|
4108
4108
|
constructor(e = -1, t = -1) {
|
|
4109
4109
|
this.rowIndex = e, this.columnIndex = t;
|
|
4110
4110
|
}
|
|
4111
4111
|
}
|
|
4112
|
-
class
|
|
4112
|
+
class ce {
|
|
4113
4113
|
constructor(e) {
|
|
4114
4114
|
this.cells = e;
|
|
4115
4115
|
}
|
|
4116
4116
|
static createSingle(e, t) {
|
|
4117
|
-
return new
|
|
4117
|
+
return new ce([new ct(e, t)]);
|
|
4118
4118
|
}
|
|
4119
4119
|
}
|
|
4120
|
-
class
|
|
4121
|
-
constructor(e, t, s, o,
|
|
4122
|
-
this.scrollTop = e, this.scrollLeft = t, this.scrollHeight = s, this.scrollWidth =
|
|
4120
|
+
class dt {
|
|
4121
|
+
constructor(e, t, s, i, o, l, n, a) {
|
|
4122
|
+
this.scrollTop = e, this.scrollLeft = t, this.scrollHeight = s, this.scrollWidth = i, this.clientHeight = o, this.clientWidth = l, this.scrollFactorY = n, this.scrollFactorX = a;
|
|
4123
4123
|
}
|
|
4124
4124
|
}
|
|
4125
|
-
class
|
|
4125
|
+
class ht {
|
|
4126
4126
|
constructor(e) {
|
|
4127
4127
|
var t, s;
|
|
4128
4128
|
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);
|
|
4129
4129
|
}
|
|
4130
4130
|
onMouseClicked(e, t) {
|
|
4131
|
-
var
|
|
4132
|
-
let s = !1,
|
|
4131
|
+
var o, l, n, a, d, c, h;
|
|
4132
|
+
let s = !1, i = !1;
|
|
4133
4133
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
4134
|
-
const p = this.getSelectionModel(),
|
|
4135
|
-
p &&
|
|
4134
|
+
const p = this.getSelectionModel(), g = this.getFocusModel();
|
|
4135
|
+
p && g && (g.hasFocus(e.rowIndex, e.columnIndex) || (g.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(g), s = !0), (o = e.originalEvent) != null && o.shiftKey || p.hasSelection() && (p.clear(), s = !0), (l = e.originalEvent) != null && l.shiftKey && this.previousEvt ? (p.addSelection(this.createRangeByEvents(e, this.previousEvt)), i = !0, s = !0) : (n = e.originalEvent) != null && n.altKey && ((a = e.originalEvent) != null && a.ctrlKey || (d = e.originalEvent) != null && d.metaKey) ? (p.removeSelection(E.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0) : (c = e.originalEvent) != null && c.ctrlKey || (h = e.originalEvent) != null && h.metaKey ? (p.addSelection(E.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0) : (p.firstClick(e.rowIndex, e.columnIndex), s = !0), this.tableScope.onSelectionChanged(p));
|
|
4136
4136
|
}
|
|
4137
|
-
return
|
|
4137
|
+
return i ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
|
|
4138
4138
|
}
|
|
4139
4139
|
onActionTriggered(e) {
|
|
4140
4140
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
@@ -4145,8 +4145,8 @@ class mt {
|
|
|
4145
4145
|
if (e === "DESELECT_ALL")
|
|
4146
4146
|
return t.clear(), this.tableScope.repaint(), !0;
|
|
4147
4147
|
if (e === "TOGGLE_SELECTION") {
|
|
4148
|
-
const [
|
|
4149
|
-
return t.togglePoint(
|
|
4148
|
+
const [i, o] = s.getFocus();
|
|
4149
|
+
return t.togglePoint(i, o), this.tableScope.repaint(), !0;
|
|
4150
4150
|
}
|
|
4151
4151
|
}
|
|
4152
4152
|
}
|
|
@@ -4154,16 +4154,16 @@ class mt {
|
|
|
4154
4154
|
}
|
|
4155
4155
|
createRangeByEvents(e, t) {
|
|
4156
4156
|
t || (t = e);
|
|
4157
|
-
const s = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex),
|
|
4157
|
+
const s = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex), i = Math.max(e.rowIndex, t == null ? void 0 : t.rowIndex), o = Math.min(e.columnIndex, t == null ? void 0 : t.columnIndex), l = Math.max(e.columnIndex, t == null ? void 0 : t.columnIndex);
|
|
4158
4158
|
return E.create({
|
|
4159
4159
|
rowIndex1: s,
|
|
4160
|
-
columnIndex1:
|
|
4161
|
-
rowIndex2:
|
|
4162
|
-
columnIndex2:
|
|
4160
|
+
columnIndex1: o,
|
|
4161
|
+
rowIndex2: i,
|
|
4162
|
+
columnIndex2: l
|
|
4163
4163
|
});
|
|
4164
4164
|
}
|
|
4165
4165
|
}
|
|
4166
|
-
class
|
|
4166
|
+
class pt {
|
|
4167
4167
|
get() {
|
|
4168
4168
|
return {
|
|
4169
4169
|
f2: "START_EDITING",
|
|
@@ -4183,7 +4183,7 @@ class bt {
|
|
|
4183
4183
|
};
|
|
4184
4184
|
}
|
|
4185
4185
|
}
|
|
4186
|
-
class
|
|
4186
|
+
class ut {
|
|
4187
4187
|
get() {
|
|
4188
4188
|
return {
|
|
4189
4189
|
f2: "START_EDITING",
|
|
@@ -4205,23 +4205,23 @@ class St {
|
|
|
4205
4205
|
};
|
|
4206
4206
|
}
|
|
4207
4207
|
}
|
|
4208
|
-
function
|
|
4209
|
-
return
|
|
4210
|
-
const s = { cmd: 1, ctrl: 2, alt: 3, shift: 4 },
|
|
4211
|
-
return
|
|
4208
|
+
function ft(r) {
|
|
4209
|
+
return r.trim().replace(/\+/g, " ").replace(/ +/g, " ").replace(/⌫/g, "backspace").replace(/↩/g, "enter").replace(/⇧/g, "shift").replace(/⌥/g, "alt").replace(/option/g, "alt").replace(/opt/g, "alt").replace(/⌃/g, "ctrl").replace(/control/g, "ctrl").replace(/command/g, "cmd").replace(/meta/g, "cmd").replace(/escape/g, "esc").replace(/⌘/g, "cmd").replace(/\*/g, "multiply").split(" ").filter((e) => e).filter((e, t, s) => s.indexOf(e) === t).sort((e, t) => {
|
|
4210
|
+
const s = { cmd: 1, ctrl: 2, alt: 3, shift: 4 }, i = s[e] || 5, o = s[t] || 5;
|
|
4211
|
+
return i !== o ? i - o : e.localeCompare(t);
|
|
4212
4212
|
}).join(" ");
|
|
4213
4213
|
}
|
|
4214
|
-
function
|
|
4215
|
-
let e =
|
|
4216
|
-
if (e === " " && (e = "space"), e === "arrowleft" && (e = "left"), e === "arrowright" && (e = "right"), e === "arrowup" && (e = "up"), e === "arrowdown" && (e = "down"), e === "delete" &&
|
|
4217
|
-
const s =
|
|
4214
|
+
function fe(r) {
|
|
4215
|
+
let e = r.key.toLowerCase();
|
|
4216
|
+
if (e === " " && (e = "space"), e === "arrowleft" && (e = "left"), e === "arrowright" && (e = "right"), e === "arrowup" && (e = "up"), e === "arrowdown" && (e = "down"), e === "delete" && r.code === "Delete" && (e = "delete"), e === "backspace" && (e = "backspace"), e === "escape" && (e = "esc"), e === "return" && (e = "enter"), r.code.startsWith("Numpad")) {
|
|
4217
|
+
const s = r.code.replace("Numpad", "").toLowerCase();
|
|
4218
4218
|
s === "add" ? e = "num_add" : s === "subtract" ? e = "num_subtract" : s === "multiply" ? e = "num_multiply" : s === "divide" ? e = "num_divide" : s === "decimal" ? e = "num_decimal" : s === "enter" ? e = "num_enter" : e = "num_" + s;
|
|
4219
4219
|
}
|
|
4220
|
-
|
|
4220
|
+
r.code.match(/^F\d+$/) && (e = r.code.toLowerCase()), r.code.match(/^Digit\d+$/) && (e = r.code.replace(/Digit/g, ""));
|
|
4221
4221
|
let t = "";
|
|
4222
|
-
return
|
|
4222
|
+
return r.ctrlKey && (t += " ctrl"), r.altKey && (t += t + " alt"), r.shiftKey && (t += t + " shift"), r.metaKey && (t += t + " cmd"), ft(t + " " + e);
|
|
4223
4223
|
}
|
|
4224
|
-
class
|
|
4224
|
+
class mt {
|
|
4225
4225
|
constructor(e) {
|
|
4226
4226
|
this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
|
|
4227
4227
|
}
|
|
@@ -4243,7 +4243,7 @@ class wt {
|
|
|
4243
4243
|
(t = (e = this.tableScope) == null ? void 0 : e.tableOptions) != null && t.shortcutActionsDisabled ? this.isDebug() && console.debug("ShortcutService skipped.") : (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)));
|
|
4244
4244
|
}
|
|
4245
4245
|
assignPredefinedSystemShortcutMappings() {
|
|
4246
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
4246
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new ut().get()) : Object.assign(this.shortcutActionIdMapping, new pt().get());
|
|
4247
4247
|
}
|
|
4248
4248
|
isMacintosh() {
|
|
4249
4249
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -4266,10 +4266,10 @@ class wt {
|
|
|
4266
4266
|
return t;
|
|
4267
4267
|
}
|
|
4268
4268
|
findEntity(e) {
|
|
4269
|
-
const t =
|
|
4269
|
+
const t = fe(e);
|
|
4270
4270
|
this.isDebug() && console.debug("ShortcutService shortcut :", t);
|
|
4271
4271
|
for (const s in this.shortcutActionIdMapping)
|
|
4272
|
-
if (
|
|
4272
|
+
if (fe(e) === t)
|
|
4273
4273
|
return this.isDebug() && console.debug("ShortcutService action :", this.shortcutActionIdMapping[s]), this.shortcutActionIdMapping[s];
|
|
4274
4274
|
}
|
|
4275
4275
|
// private areTokensEquals(tokens1: string[], tokens2: string[]): boolean {
|
|
@@ -4316,7 +4316,7 @@ class wt {
|
|
|
4316
4316
|
return this.shortcutActionIdMapping;
|
|
4317
4317
|
}
|
|
4318
4318
|
}
|
|
4319
|
-
class
|
|
4319
|
+
class me {
|
|
4320
4320
|
onCheckboxChanged(e) {
|
|
4321
4321
|
}
|
|
4322
4322
|
onContextmenu(e) {
|
|
@@ -4338,7 +4338,7 @@ class be {
|
|
|
4338
4338
|
onFocusChanged(e) {
|
|
4339
4339
|
}
|
|
4340
4340
|
}
|
|
4341
|
-
class
|
|
4341
|
+
class Ae {
|
|
4342
4342
|
setStyle(e, t, s) {
|
|
4343
4343
|
return e.style[t] = s, e;
|
|
4344
4344
|
}
|
|
@@ -4365,19 +4365,19 @@ class Te {
|
|
|
4365
4365
|
e.setAttribute(t, s);
|
|
4366
4366
|
}
|
|
4367
4367
|
}
|
|
4368
|
-
class
|
|
4369
|
-
render(e, t, s,
|
|
4370
|
-
if (
|
|
4371
|
-
|
|
4372
|
-
const
|
|
4368
|
+
class gt {
|
|
4369
|
+
render(e, t, s, i, o, l, n) {
|
|
4370
|
+
if (o.isEditable(t, s)) {
|
|
4371
|
+
n.addClass(e, "ge-table-row-input-div");
|
|
4372
|
+
const a = o.getValueAt(t, s);
|
|
4373
4373
|
e.innerHTML = `
|
|
4374
4374
|
<input
|
|
4375
4375
|
type="text"
|
|
4376
|
-
value="${
|
|
4376
|
+
value="${a}"
|
|
4377
4377
|
autofocus
|
|
4378
4378
|
onfocus="this.setSelectionRange(0, this.value.length)"
|
|
4379
4379
|
data-listen="change"
|
|
4380
|
-
data-area="${
|
|
4380
|
+
data-area="${i}"
|
|
4381
4381
|
data-row-index="${t}"
|
|
4382
4382
|
data-col-index="${s}"
|
|
4383
4383
|
data-input-type="text"
|
|
@@ -4386,7 +4386,7 @@ class xt {
|
|
|
4386
4386
|
}
|
|
4387
4387
|
}
|
|
4388
4388
|
}
|
|
4389
|
-
class
|
|
4389
|
+
class St {
|
|
4390
4390
|
constructor(e = "none", t = "single") {
|
|
4391
4391
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
|
|
4392
4392
|
}
|
|
@@ -4409,8 +4409,8 @@ class vt {
|
|
|
4409
4409
|
}
|
|
4410
4410
|
getSelectionCount(e, t) {
|
|
4411
4411
|
let s = 0;
|
|
4412
|
-
for (const
|
|
4413
|
-
|
|
4412
|
+
for (const i of this.ranges)
|
|
4413
|
+
i.isInRange(e, t) && s++;
|
|
4414
4414
|
return this.allSelected && s++, this.isInNegativeRange(e, t) && (s = 0), s;
|
|
4415
4415
|
}
|
|
4416
4416
|
isInNegativeRange(e, t) {
|
|
@@ -4468,7 +4468,7 @@ class vt {
|
|
|
4468
4468
|
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());
|
|
4469
4469
|
}
|
|
4470
4470
|
}
|
|
4471
|
-
class
|
|
4471
|
+
class yt {
|
|
4472
4472
|
constructor(e = "none") {
|
|
4473
4473
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
4474
4474
|
}
|
|
@@ -4505,12 +4505,12 @@ class Ct {
|
|
|
4505
4505
|
return [this.rowIndex, this.columnIndex];
|
|
4506
4506
|
}
|
|
4507
4507
|
}
|
|
4508
|
-
class
|
|
4509
|
-
constructor(e = new
|
|
4508
|
+
class bt {
|
|
4509
|
+
constructor(e = new L(
|
|
4510
4510
|
"❯",
|
|
4511
4511
|
"",
|
|
4512
4512
|
["gt-table-icon-expanded"]
|
|
4513
|
-
), t = new
|
|
4513
|
+
), t = new L(
|
|
4514
4514
|
"❯",
|
|
4515
4515
|
"transform: rotate(180deg) translate(-100%, -100%); transform-origin: 0 0;",
|
|
4516
4516
|
["ge-table-icon-collapsed"]
|
|
@@ -4519,14 +4519,14 @@ class Fe {
|
|
|
4519
4519
|
}
|
|
4520
4520
|
// `⊖ `, `⊕ `;
|
|
4521
4521
|
}
|
|
4522
|
-
const
|
|
4523
|
-
class
|
|
4522
|
+
const wt = new St(), xt = new yt("cell");
|
|
4523
|
+
class Ee {
|
|
4524
4524
|
constructor() {
|
|
4525
4525
|
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 = {
|
|
4526
4526
|
header: 34,
|
|
4527
4527
|
body: 34,
|
|
4528
4528
|
footer: 34
|
|
4529
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new
|
|
4529
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Ce(), this.headerGroupOptions = new bt(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new ve(), this.sortOrder = ["asc", "desc"], this.shortcutActionsDisabled = !1, this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new gt(), this.getSelectionModel = () => wt, this.getFocusModel = () => xt;
|
|
4530
4530
|
}
|
|
4531
4531
|
}
|
|
4532
4532
|
const W = class W {
|
|
@@ -4540,28 +4540,28 @@ const W = class W {
|
|
|
4540
4540
|
* @throws {string} Throws an error if neither selection nor focus is defined.
|
|
4541
4541
|
*/
|
|
4542
4542
|
createContent(e, t, s) {
|
|
4543
|
-
return new Promise((
|
|
4543
|
+
return new Promise((i, o) => {
|
|
4544
4544
|
if (t != null && t.hasSelection()) {
|
|
4545
|
-
const
|
|
4546
|
-
if (
|
|
4547
|
-
|
|
4548
|
-
const
|
|
4549
|
-
for (let
|
|
4545
|
+
const l = this.mergeRanges(t.getRanges());
|
|
4546
|
+
if (l) {
|
|
4547
|
+
l.c2 = Math.min(l.c2, e.getColumnCount() - 1), l.r2 = Math.min(l.r2, e.getBodyModel().getRowCount() - 1);
|
|
4548
|
+
const n = [];
|
|
4549
|
+
for (let a = l.r1; a <= l.r2; a++) {
|
|
4550
4550
|
const d = [];
|
|
4551
|
-
for (let c =
|
|
4552
|
-
const h = t.isSelected(
|
|
4551
|
+
for (let c = l.c1; c <= l.c2; c++) {
|
|
4552
|
+
const h = t.isSelected(a, c) ? e.getBodyModel().getTextValueAt(a, c) : "";
|
|
4553
4553
|
d.push(h);
|
|
4554
4554
|
}
|
|
4555
|
-
|
|
4555
|
+
n.push(d.join(W.columnSeparatorChar));
|
|
4556
4556
|
}
|
|
4557
|
-
return
|
|
4557
|
+
return i(n.join(W.rowSeparatorChar));
|
|
4558
4558
|
}
|
|
4559
4559
|
}
|
|
4560
4560
|
if (s) {
|
|
4561
|
-
const [
|
|
4562
|
-
return
|
|
4561
|
+
const [l, n] = s.getFocus(), a = e.getBodyModel().getTextValueAt(l, n);
|
|
4562
|
+
return i(a);
|
|
4563
4563
|
}
|
|
4564
|
-
|
|
4564
|
+
o("Cannot copy, neither selection nor focus defined.");
|
|
4565
4565
|
});
|
|
4566
4566
|
}
|
|
4567
4567
|
/**
|
|
@@ -4582,19 +4582,19 @@ const W = class W {
|
|
|
4582
4582
|
* @returns {Promise<string>} A promise that resolves with the copied text if successful, or rejects if an error occurs.
|
|
4583
4583
|
*/
|
|
4584
4584
|
copyToClipboard(e, t, s) {
|
|
4585
|
-
return new Promise((
|
|
4585
|
+
return new Promise((i, o) => {
|
|
4586
4586
|
this.createContent(
|
|
4587
4587
|
e,
|
|
4588
4588
|
t,
|
|
4589
4589
|
s
|
|
4590
|
-
).then((
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
}).catch((
|
|
4594
|
-
|
|
4590
|
+
).then((l) => {
|
|
4591
|
+
l && this.copyContent(l).then((n) => {
|
|
4592
|
+
i(l);
|
|
4593
|
+
}).catch((n) => {
|
|
4594
|
+
o();
|
|
4595
4595
|
});
|
|
4596
|
-
}).catch((
|
|
4597
|
-
|
|
4596
|
+
}).catch((l) => {
|
|
4597
|
+
o();
|
|
4598
4598
|
});
|
|
4599
4599
|
});
|
|
4600
4600
|
}
|
|
@@ -4614,16 +4614,16 @@ const W = class W {
|
|
|
4614
4614
|
W.columnSeparatorChar = " ", W.rowSeparatorChar = `
|
|
4615
4615
|
`;
|
|
4616
4616
|
let Y = W;
|
|
4617
|
-
class
|
|
4617
|
+
class Ct {
|
|
4618
4618
|
constructor(e, t = 500) {
|
|
4619
|
-
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(
|
|
4619
|
+
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(Xe(this.handleResize.bind(this), t)).observe(this.tableScope.hostElement);
|
|
4620
4620
|
}
|
|
4621
4621
|
handleResize(e) {
|
|
4622
4622
|
const t = e[0], { width: s } = t.contentRect;
|
|
4623
4623
|
this.tableScope.recalcColumnWidths(s);
|
|
4624
4624
|
}
|
|
4625
4625
|
}
|
|
4626
|
-
class
|
|
4626
|
+
class vt {
|
|
4627
4627
|
/**
|
|
4628
4628
|
* Downloads a matrix data as an Excel file.
|
|
4629
4629
|
*
|
|
@@ -4634,31 +4634,31 @@ class Mt {
|
|
|
4634
4634
|
* @throws {Error} Throws an error if the input matrix is not a valid 2D array or if the filename is an empty string.
|
|
4635
4635
|
*/
|
|
4636
4636
|
downloadExcel(e, t = "file.xlsx", s = "") {
|
|
4637
|
-
if (!Array.isArray(e) || e.some((
|
|
4637
|
+
if (!Array.isArray(e) || e.some((i) => !Array.isArray(i)))
|
|
4638
4638
|
throw new Error("Invalid matrix format. Expected a 2D array.");
|
|
4639
4639
|
if ((t == null ? void 0 : t.trim()) === "")
|
|
4640
4640
|
throw new Error("Invalid filename. Filename must be a non-empty string.");
|
|
4641
4641
|
try {
|
|
4642
|
-
const
|
|
4642
|
+
const i = this.generateBuffer(e, s), o = new Blob([i], {
|
|
4643
4643
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
4644
|
-
}),
|
|
4645
|
-
|
|
4646
|
-
} catch (
|
|
4647
|
-
throw console.error("Error generating Excel file:",
|
|
4644
|
+
}), l = document.createElement("a");
|
|
4645
|
+
l.href = URL.createObjectURL(o), l.download = t, document.body.appendChild(l), l.click(), document.body.removeChild(l);
|
|
4646
|
+
} catch (i) {
|
|
4647
|
+
throw console.error("Error generating Excel file:", i), new Error("Failed to download Excel file.");
|
|
4648
4648
|
}
|
|
4649
4649
|
}
|
|
4650
4650
|
generateMap(e, t = "") {
|
|
4651
4651
|
const s = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4652
|
-
<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>`,
|
|
4653
|
-
<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>`,
|
|
4654
|
-
<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>`,
|
|
4655
|
-
<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>`,
|
|
4656
|
-
<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>`,
|
|
4652
|
+
<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>`, i = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4653
|
+
<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>`, o = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4654
|
+
<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>`, l = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4655
|
+
<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>`, n = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4656
|
+
<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>`, a = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4657
4657
|
<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="3" uniqueCount="3"><si><t>a</t></si><si><t>b</t></si><si><t>c</t></si></sst>`, d = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4658
4658
|
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision"><fonts count="1" x14ac:knownFonts="1"><font><sz val="12"/><color theme="1"/><name val="Aptos Narrow"/><family val="2"/><scheme val="minor"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles><dxfs count="0"/><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/><extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/></ext><ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/></ext></extLst></styleSheet>`, c = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4659
4659
|
<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"?>
|
|
4660
4660
|
<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();
|
|
4661
|
-
return p.set("_rels/.rels", s), p.set("docProps/app.xml",
|
|
4661
|
+
return p.set("_rels/.rels", s), p.set("docProps/app.xml", i), p.set("docProps/core.xml", o), p.set("xl/_rels/workbook.xml.rels", l), p.set("xl/theme/theme1.xml", n), p.set("xl/worksheets/sheet1.xml", this.getX1WorksheetsSheet1Xml(e)), p.set("xl/sharedStrings.xml", a), p.set("xl/styles.xml", d), p.set("xl/workbook.xml", c), p.set("[Content_Types].xml", h), p;
|
|
4662
4662
|
}
|
|
4663
4663
|
getX1WorksheetsSheet1Xml(e) {
|
|
4664
4664
|
const t = [];
|
|
@@ -4670,18 +4670,18 @@ class Mt {
|
|
|
4670
4670
|
<sheetFormatPr baseColWidth="10" defaultRowHeight="16" x14ac:dyDescent="0.2"/>
|
|
4671
4671
|
<sheetData>`);
|
|
4672
4672
|
for (let s = 0; s < e.length; s++) {
|
|
4673
|
-
const
|
|
4673
|
+
const i = e[s];
|
|
4674
4674
|
t.push('<row r="${r + 1}" spans="1:2" x14ac:dyDescent="0.2">');
|
|
4675
|
-
for (let
|
|
4676
|
-
const
|
|
4677
|
-
if (typeof
|
|
4678
|
-
t.push(`<c r="${
|
|
4679
|
-
else if (
|
|
4680
|
-
const
|
|
4681
|
-
t.push(`<c r="${
|
|
4675
|
+
for (let o = 0; o < i.length; o++) {
|
|
4676
|
+
const l = i[o], n = this.getCellAddress(s, o);
|
|
4677
|
+
if (typeof l == "number")
|
|
4678
|
+
t.push(`<c r="${n}"><v>${l}</v></c>`);
|
|
4679
|
+
else if (l instanceof Date) {
|
|
4680
|
+
const a = l;
|
|
4681
|
+
t.push(`<c r="${n}" t="inlineStr"><is><t>${a.toISOString()}</t></is></c>`);
|
|
4682
4682
|
} else {
|
|
4683
|
-
const
|
|
4684
|
-
t.push(`<c r="${
|
|
4683
|
+
const a = l != null ? this.escapeXml(String(l)) : "";
|
|
4684
|
+
t.push(`<c r="${n}" t="inlineStr"><is><t>${a}</t></is></c>`);
|
|
4685
4685
|
}
|
|
4686
4686
|
}
|
|
4687
4687
|
t.push("</row>");
|
|
@@ -4694,31 +4694,31 @@ class Mt {
|
|
|
4694
4694
|
}
|
|
4695
4695
|
getCellAddress(e, t) {
|
|
4696
4696
|
const s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
4697
|
-
let
|
|
4697
|
+
let i = "";
|
|
4698
4698
|
for (; t >= 0; )
|
|
4699
|
-
|
|
4700
|
-
return `${
|
|
4699
|
+
i = s[t % 26] + i, t = Math.floor(t / 26) - 1;
|
|
4700
|
+
return `${i}${e + 1}`;
|
|
4701
4701
|
}
|
|
4702
4702
|
createZip(e) {
|
|
4703
4703
|
const t = [];
|
|
4704
4704
|
let s = 0;
|
|
4705
|
-
const
|
|
4705
|
+
const i = [];
|
|
4706
4706
|
e.forEach((h, p) => {
|
|
4707
|
-
const
|
|
4708
|
-
|
|
4707
|
+
const g = new TextEncoder().encode(p), u = new TextEncoder().encode(h), S = new Uint8Array(30 + g.length), f = new DataView(S.buffer);
|
|
4708
|
+
S.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, u.length, !0), f.setUint32(22, u.length, !0), f.setUint16(26, g.length, !0), f.setUint16(28, 0, !0), S.set(g, 30), t.push(S, u), i.push({
|
|
4709
4709
|
path: p,
|
|
4710
4710
|
offset: s,
|
|
4711
|
-
contentSize:
|
|
4712
|
-
}), s +=
|
|
4711
|
+
contentSize: u.length
|
|
4712
|
+
}), s += S.length + u.length;
|
|
4713
4713
|
});
|
|
4714
|
-
const
|
|
4715
|
-
|
|
4716
|
-
const p = new TextEncoder().encode(h.path),
|
|
4717
|
-
|
|
4714
|
+
const o = s;
|
|
4715
|
+
i.forEach((h) => {
|
|
4716
|
+
const p = new TextEncoder().encode(h.path), g = new Uint8Array(46 + p.length), u = new DataView(g.buffer);
|
|
4717
|
+
g.set([80, 75, 1, 2], 0), u.setUint16(4, 20, !0), u.setUint16(6, 20, !0), u.setUint16(8, 0, !0), u.setUint16(10, 0, !0), u.setUint16(12, 0, !0), u.setUint16(14, 0, !0), u.setUint32(16, 0, !0), u.setUint32(20, h.contentSize, !0), u.setUint32(24, h.contentSize, !0), u.setUint16(28, p.length, !0), u.setUint16(30, 0, !0), u.setUint16(32, 0, !0), u.setUint16(34, 0, !0), u.setUint16(36, 0, !0), u.setUint32(38, 0, !0), u.setUint32(42, h.offset, !0), g.set(p, 46), t.push(g), s += g.length;
|
|
4718
4718
|
});
|
|
4719
|
-
const
|
|
4720
|
-
|
|
4721
|
-
const
|
|
4719
|
+
const l = new Uint8Array(22), n = new DataView(l.buffer);
|
|
4720
|
+
l.set([80, 75, 5, 6], 0), n.setUint16(4, 0, !0), n.setUint16(6, 0, !0), n.setUint16(8, i.length, !0), n.setUint16(10, i.length, !0), n.setUint32(12, s - o, !0), n.setUint32(16, o, !0), n.setUint16(20, 0, !0), t.push(l);
|
|
4721
|
+
const a = t.reduce((h, p) => h + p.length, 0), d = new Uint8Array(a);
|
|
4722
4722
|
let c = 0;
|
|
4723
4723
|
for (const h of t)
|
|
4724
4724
|
d.set(h, c), c += h.length;
|
|
@@ -4729,16 +4729,16 @@ class Mt {
|
|
|
4729
4729
|
return this.createZip(s);
|
|
4730
4730
|
}
|
|
4731
4731
|
}
|
|
4732
|
-
class
|
|
4733
|
-
constructor(e, t, s,
|
|
4732
|
+
class de extends rt {
|
|
4733
|
+
constructor(e, t, s, i, o, l = new Y(), n = new vt()) {
|
|
4734
4734
|
var c;
|
|
4735
|
-
if (super(e, t, new
|
|
4735
|
+
if (super(e, t, new ze(s), i), this.eventListener = o, this.copyService = l, this.excelService = n, this.licenseManager = V.getInstance(), this.selectionService = new ht(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, this.lastContextmenu = Date.now(), t.setTableScope(this), o || (this.eventListener = new me()), (c = this.tableOptions) != null && c.autoRestoreOptions) {
|
|
4736
4736
|
const h = this.tableOptions.autoRestoreOptions, p = h.getStorageKeyFn;
|
|
4737
|
-
p && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new
|
|
4737
|
+
p && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Qe(p)), h.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new tt(p)), h.autoRestoreSortingState && (this.storeSortingService = new st(p)));
|
|
4738
4738
|
}
|
|
4739
|
-
this.mouseHandler = new
|
|
4740
|
-
const
|
|
4741
|
-
|
|
4739
|
+
this.mouseHandler = new Ye(this), this.inputHandler = new at(this), this.resizeHandler = new Ct(this, i.resizeEventDebounceDelay), this.shortcutService = new mt(this), this.shortcutService.addListener(this.selectionService);
|
|
4740
|
+
const a = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
4741
|
+
a && a.addEventSelectionChangedListener(this);
|
|
4742
4742
|
const d = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
4743
4743
|
d && d.addEventFocusChangedListener(this);
|
|
4744
4744
|
}
|
|
@@ -4754,8 +4754,8 @@ class pe extends ht {
|
|
|
4754
4754
|
*
|
|
4755
4755
|
* @return {TableScope} - The newly created TableScope instance.
|
|
4756
4756
|
*/
|
|
4757
|
-
static create(e, t, s = new
|
|
4758
|
-
return new
|
|
4757
|
+
static create(e, t, s = new Ee(), i = new me(), o = new Ae(), l = new Y()) {
|
|
4758
|
+
return new de(e, t, o, s, i, l);
|
|
4759
4759
|
}
|
|
4760
4760
|
/**
|
|
4761
4761
|
* Triggers an action based on the provided actionId.
|
|
@@ -4771,19 +4771,19 @@ class pe extends ht {
|
|
|
4771
4771
|
if (e === "START_EDITING" && this.getFocusModel) {
|
|
4772
4772
|
const t = this.getFocusModel();
|
|
4773
4773
|
if (t) {
|
|
4774
|
-
const [s,
|
|
4775
|
-
this.tableModel.getBodyModel().isEditable(s,
|
|
4774
|
+
const [s, i] = t.getFocus();
|
|
4775
|
+
this.tableModel.getBodyModel().isEditable(s, i) && (this.clearSelection(), this.initRenderEditor(s, i));
|
|
4776
4776
|
}
|
|
4777
4777
|
return !0;
|
|
4778
4778
|
}
|
|
4779
4779
|
if (e === "COPY_2_CLIPBOARD") {
|
|
4780
4780
|
const t = this.getSelectionModel ? this.getSelectionModel() : void 0, s = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
4781
|
-
this.copyService.createContent(this.tableModel, t, s).then((
|
|
4781
|
+
this.copyService.createContent(this.tableModel, t, s).then((i) => this.copyService.copyContent(i));
|
|
4782
4782
|
}
|
|
4783
4783
|
return !1;
|
|
4784
4784
|
}
|
|
4785
|
-
updateModelValueAfterEdit(e, t, s,
|
|
4786
|
-
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s,
|
|
4785
|
+
updateModelValueAfterEdit(e, t, s, i) {
|
|
4786
|
+
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, i) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(ce.createSingle(t, s)), this.hostElement.focus());
|
|
4787
4787
|
}
|
|
4788
4788
|
/**
|
|
4789
4789
|
* Retrieves the TableApi object.
|
|
@@ -4812,16 +4812,16 @@ class pe extends ht {
|
|
|
4812
4812
|
* @return {GeMouseEvent} - The created GeMouseEvent object.
|
|
4813
4813
|
*/
|
|
4814
4814
|
createGeMouseEvent(e) {
|
|
4815
|
-
const t = new
|
|
4815
|
+
const t = new re();
|
|
4816
4816
|
if (t.originalEvent = e, e) {
|
|
4817
4817
|
const s = e.target;
|
|
4818
4818
|
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) {
|
|
4819
|
-
const
|
|
4820
|
-
t.rowTop =
|
|
4819
|
+
const i = this.tableModel.getAreaModel(t.areaIdent);
|
|
4820
|
+
t.rowTop = i.getYPosByRowIndex(t.rowIndex);
|
|
4821
4821
|
}
|
|
4822
4822
|
if (t.columnLeft = this.tableModel.getXPosByColumnIndex(t.columnIndex), e.ctrlKey && e.altKey) {
|
|
4823
|
-
const
|
|
4824
|
-
this.debugOnce(
|
|
4823
|
+
const i = e.clientY - this.hostElement.offsetTop - this.areaHeaderCenter.parent.clientHeight, o = e.clientX - this.hostElement.offsetLeft - this.areaBodyWestGeo.width;
|
|
4824
|
+
this.debugOnce(o, i);
|
|
4825
4825
|
}
|
|
4826
4826
|
}
|
|
4827
4827
|
return t;
|
|
@@ -4870,10 +4870,10 @@ class pe extends ht {
|
|
|
4870
4870
|
* @return {void}
|
|
4871
4871
|
*/
|
|
4872
4872
|
contextmenu(e) {
|
|
4873
|
-
var s,
|
|
4873
|
+
var s, i;
|
|
4874
4874
|
const t = Date.now();
|
|
4875
4875
|
if (t - this.lastContextmenu < 50) {
|
|
4876
|
-
this.lastContextmenu = t, (s = e.originalEvent) == null || s.preventDefault(), (
|
|
4876
|
+
this.lastContextmenu = t, (s = e.originalEvent) == null || s.preventDefault(), (i = e.originalEvent) == null || i.stopImmediatePropagation();
|
|
4877
4877
|
return;
|
|
4878
4878
|
}
|
|
4879
4879
|
this.lastContextmenu = t, this.eventListener.onContextmenu(e);
|
|
@@ -4888,7 +4888,7 @@ class pe extends ht {
|
|
|
4888
4888
|
toggleExpandCollapseAll(e = !0) {
|
|
4889
4889
|
var s;
|
|
4890
4890
|
const t = this.tableModel.getBodyModel();
|
|
4891
|
-
|
|
4891
|
+
oe(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
|
|
4892
4892
|
}
|
|
4893
4893
|
/**
|
|
4894
4894
|
* Toggles the checkbox state of a specific row in a table.
|
|
@@ -4900,11 +4900,11 @@ class pe extends ht {
|
|
|
4900
4900
|
* @return {void} - This method does not return anything.
|
|
4901
4901
|
*/
|
|
4902
4902
|
toggleRowCheckbox(e, t, s) {
|
|
4903
|
-
var
|
|
4904
|
-
const
|
|
4905
|
-
|
|
4906
|
-
const
|
|
4907
|
-
this.eventListener.onCheckboxChanged(
|
|
4903
|
+
var a;
|
|
4904
|
+
const i = this.tableModel.getAreaModel(s), o = i.isRowChecked(e), l = o === void 0 || o === "semi" || o === "none";
|
|
4905
|
+
i.setRowChecked(e, l), this.repaint();
|
|
4906
|
+
const n = (a = i.rowSelectionModel) == null ? void 0 : a.getCheckedRows();
|
|
4907
|
+
this.eventListener.onCheckboxChanged(n || []);
|
|
4908
4908
|
}
|
|
4909
4909
|
/**
|
|
4910
4910
|
* Handle mouse click events.
|
|
@@ -4917,8 +4917,8 @@ class pe extends ht {
|
|
|
4917
4917
|
let s = this.selectionService.onMouseClicked(e, t);
|
|
4918
4918
|
if (!s && this.getFocusModel) {
|
|
4919
4919
|
this.resetEditorRenderer();
|
|
4920
|
-
const
|
|
4921
|
-
|
|
4920
|
+
const i = this.getFocusModel();
|
|
4921
|
+
i && (s = i.hasChanged(), i.clearChanged());
|
|
4922
4922
|
}
|
|
4923
4923
|
return s;
|
|
4924
4924
|
}
|
|
@@ -4954,12 +4954,12 @@ class pe extends ht {
|
|
|
4954
4954
|
* @return {void}
|
|
4955
4955
|
*/
|
|
4956
4956
|
onHeaderDblClicked(e, t, s) {
|
|
4957
|
-
var
|
|
4958
|
-
const
|
|
4959
|
-
if (
|
|
4957
|
+
var o, l;
|
|
4958
|
+
const i = this.tableModel.getColumnDef(s);
|
|
4959
|
+
if (i != null && i.sortable && i.sortable()) {
|
|
4960
4960
|
e.preventDefault(), e.stopPropagation();
|
|
4961
|
-
const
|
|
4962
|
-
this.tableModel.doSort([c]) && ((
|
|
4961
|
+
const n = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, a = i.sortState ?? "", d = n[(n.indexOf(a) + 1) % n.length], c = new nt(s, d);
|
|
4962
|
+
this.tableModel.doSort([c]) && ((o = this.tableModel.getColumnDefs()) == null || o.forEach((p) => p.sortState = ""), i.sortState = d), this.repaint(), (l = this.storeSortingService) == null || l.setSortItems([c]);
|
|
4963
4963
|
}
|
|
4964
4964
|
}
|
|
4965
4965
|
/**
|
|
@@ -4981,13 +4981,13 @@ class pe extends ht {
|
|
|
4981
4981
|
* @return {void}
|
|
4982
4982
|
*/
|
|
4983
4983
|
scrollToIndex(e, t) {
|
|
4984
|
-
const
|
|
4985
|
-
this.scrollToPixel(0,
|
|
4984
|
+
const i = this.tableModel.getAreaModel("body").getYPosByRowIndex(t);
|
|
4985
|
+
this.scrollToPixel(0, i);
|
|
4986
4986
|
}
|
|
4987
4987
|
adjustAfterScrolling() {
|
|
4988
4988
|
super.adjustAfterScrolling();
|
|
4989
4989
|
const e = this.scrollViewport;
|
|
4990
|
-
this.eventListener.onScroll(new
|
|
4990
|
+
this.eventListener.onScroll(new dt(
|
|
4991
4991
|
this.scrollTop,
|
|
4992
4992
|
this.scrollLeft,
|
|
4993
4993
|
e.scrollHeight,
|
|
@@ -5045,8 +5045,8 @@ class pe extends ht {
|
|
|
5045
5045
|
if (!this.isEditing() && this.getFocusModel) {
|
|
5046
5046
|
const s = this.getFocusModel();
|
|
5047
5047
|
if (s) {
|
|
5048
|
-
const [
|
|
5049
|
-
return s.setFocus(
|
|
5048
|
+
const [i, o] = s.getFocus();
|
|
5049
|
+
return s.setFocus(i + t, o + e), this.repaint(), !0;
|
|
5050
5050
|
}
|
|
5051
5051
|
}
|
|
5052
5052
|
return !1;
|
|
@@ -5115,24 +5115,24 @@ class pe extends ht {
|
|
|
5115
5115
|
autoRestoreCollapsedExpandedState() {
|
|
5116
5116
|
var e, t;
|
|
5117
5117
|
if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
|
|
5118
|
-
const s = this.tableOptions.autoRestoreOptions,
|
|
5119
|
-
if (s.autoRestoreCollapsedExpandedState &&
|
|
5120
|
-
const
|
|
5121
|
-
if (
|
|
5122
|
-
const
|
|
5123
|
-
for (let d = 0; d <
|
|
5124
|
-
const c =
|
|
5118
|
+
const s = this.tableOptions.autoRestoreOptions, i = s.getRowId;
|
|
5119
|
+
if (s.autoRestoreCollapsedExpandedState && i) {
|
|
5120
|
+
const o = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), l = this.tableModel.getAreaModel("body");
|
|
5121
|
+
if (oe(l)) {
|
|
5122
|
+
const n = l, a = l.getRowCount();
|
|
5123
|
+
for (let d = 0; d < a; d++) {
|
|
5124
|
+
const c = l.getRowByIndex(d);
|
|
5125
5125
|
if (c)
|
|
5126
|
-
if (
|
|
5126
|
+
if (o.allExpanded)
|
|
5127
5127
|
c.expanded = !0;
|
|
5128
|
-
else if (
|
|
5128
|
+
else if (o.allCollapsed)
|
|
5129
5129
|
c.expanded = !1;
|
|
5130
5130
|
else {
|
|
5131
|
-
const h =
|
|
5132
|
-
|
|
5131
|
+
const h = i(c.data);
|
|
5132
|
+
o.mode === "expanded" ? c.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h) : o.mode === "collapsed" && (c.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h));
|
|
5133
5133
|
}
|
|
5134
5134
|
}
|
|
5135
|
-
|
|
5135
|
+
n.recalcVisibleTreeRows();
|
|
5136
5136
|
}
|
|
5137
5137
|
}
|
|
5138
5138
|
}
|
|
@@ -5141,13 +5141,13 @@ class pe extends ht {
|
|
|
5141
5141
|
const e = this.tableModel.getBodyModel(), t = this.tableModel.getColumnCount(), s = (e == null ? void 0 : e.getRowCount()) ?? 0;
|
|
5142
5142
|
if (!e)
|
|
5143
5143
|
return console.warn("Body model is not available."), [];
|
|
5144
|
-
const
|
|
5145
|
-
for (let
|
|
5146
|
-
for (let
|
|
5147
|
-
const
|
|
5148
|
-
|
|
5144
|
+
const i = new Array(t).fill(0);
|
|
5145
|
+
for (let o = 0; o < s; o++)
|
|
5146
|
+
for (let l = 0; l < t; l++) {
|
|
5147
|
+
const n = e.getValueAt(o, l), a = (n == null ? void 0 : n.toString().length) || 0;
|
|
5148
|
+
a > i[l] && (i[l] = a);
|
|
5149
5149
|
}
|
|
5150
|
-
return
|
|
5150
|
+
return i.map((o) => Math.max(o * 10, 50));
|
|
5151
5151
|
}
|
|
5152
5152
|
setColumnWidth(e, t) {
|
|
5153
5153
|
this.tableModel.setColumnWidth(e, t);
|
|
@@ -5155,8 +5155,8 @@ class pe extends ht {
|
|
|
5155
5155
|
autoResizeColumns(e = !0) {
|
|
5156
5156
|
const t = this.calcAutoColumnWidths();
|
|
5157
5157
|
for (let s = 0; s < t.length; s++) {
|
|
5158
|
-
const
|
|
5159
|
-
this.tableModel.setColumnWidth(s,
|
|
5158
|
+
const i = t[s];
|
|
5159
|
+
this.tableModel.setColumnWidth(s, i);
|
|
5160
5160
|
}
|
|
5161
5161
|
e && this.recalcWrappers();
|
|
5162
5162
|
}
|
|
@@ -5223,374 +5223,103 @@ class pe extends ht {
|
|
|
5223
5223
|
* @see {@link getDisplayedRowCount} - Related method for getting visible row count
|
|
5224
5224
|
*/
|
|
5225
5225
|
ensureRowIsVisible(e) {
|
|
5226
|
-
const t = this.getFirstFullVisibleRowIndex(), s = this.getLastFullVisibleRowIndex(),
|
|
5227
|
-
return e < t ? (this.scrollToIndex(0, e), !0) : e > s ? (this.scrollToIndex(0, e -
|
|
5226
|
+
const t = this.getFirstFullVisibleRowIndex(), s = this.getLastFullVisibleRowIndex(), i = this.getDisplayedRowCount();
|
|
5227
|
+
return e < t ? (this.scrollToIndex(0, e), !0) : e > s ? (this.scrollToIndex(0, e - i + 1), !0) : !1;
|
|
5228
5228
|
}
|
|
5229
5229
|
}
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
J.themes = ["light", "combat", "paper", "blackboard"], J.vars = {
|
|
5233
|
-
light: `html[data-theme="light"] {
|
|
5234
|
-
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
5235
|
-
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
5236
|
-
--ge-table-header-center-bg: rgba(233, 233, 233, 0.5);
|
|
5237
|
-
--ge-table-header-east-bg: rgba(233, 233, 233, 0.5);
|
|
5238
|
-
--ge-table-header-west-text: #000;
|
|
5239
|
-
--ge-table-header-center-text: #000;
|
|
5240
|
-
--ge-table-header-east-text: #000;
|
|
5241
|
-
--ge-table-header-west-horizontal-border: #ddd;
|
|
5242
|
-
--ge-table-header-west-vertical-border: #ccc;
|
|
5243
|
-
--ge-table-header-center-horizontal-border: #ddd;
|
|
5244
|
-
--ge-table-header-center-vertical-border: #ccc;
|
|
5245
|
-
--ge-table-header-east-horizontal-border: #ddd;
|
|
5246
|
-
--ge-table-header-east-vertical-border: #ccc;
|
|
5247
|
-
--ge-table-body-west-bg: rgba(233, 233, 233, 0.5);
|
|
5248
|
-
--ge-table-body-center-bg: rgba(255,255,255, 0.5);
|
|
5249
|
-
--ge-table-body-east-bg: rgba(233, 233, 233, 0.5);
|
|
5250
|
-
--ge-table-body-west-text: #000;
|
|
5251
|
-
--ge-table-body-center-text: #000;
|
|
5252
|
-
--ge-table-body-east-text: #000;
|
|
5253
|
-
--ge-table-body-west-horizontal-border: #ddd;
|
|
5254
|
-
--ge-table-body-west-vertical-border: #ccc;
|
|
5255
|
-
--ge-table-body-center-horizontal-border: #bbb;
|
|
5256
|
-
--ge-table-body-center-vertical-border: #ddd;
|
|
5257
|
-
--ge-table-body-east-horizontal-border: #ddd;
|
|
5258
|
-
--ge-table-body-east-vertical-border: #ccc;
|
|
5259
|
-
--ge-table-body-west-selected-range-bg: rgba(0, 152, 219, 0.4);
|
|
5260
|
-
--ge-table-body-center-selected-range-bg: rgba(0, 152, 219, 0.4);
|
|
5261
|
-
--ge-table-body-east-selected-range-bg: rgba(0, 152, 219, 0.4);
|
|
5262
|
-
--ge-table-body-west-selected-range-text: #000;
|
|
5263
|
-
--ge-table-body-center-selected-range-text: #000;
|
|
5264
|
-
--ge-table-body-east-selected-range-text: #000;
|
|
5265
|
-
--ge-table-footer-west-bg: rgba(233, 233, 233, 0.5);
|
|
5266
|
-
--ge-table-footer-center-bg: rgba(233, 233, 233, 0.5);
|
|
5267
|
-
--ge-table-footer-east-bg: rgba(233, 233, 233, 0.5);
|
|
5268
|
-
--ge-table-footer-west-text: #000;
|
|
5269
|
-
--ge-table-footer-center-text: #000;
|
|
5270
|
-
--ge-table-footer-east-text: #000;
|
|
5271
|
-
--ge-table-footer-west-horizontal-border: #ddd;
|
|
5272
|
-
--ge-table-footer-west-vertical-border: #ccc;
|
|
5273
|
-
--ge-table-footer-center-horizontal-border: #ddd;
|
|
5274
|
-
--ge-table-footer-center-vertical-border: #ccc;
|
|
5275
|
-
--ge-table-footer-east-horizontal-border: #ddd;
|
|
5276
|
-
--ge-table-footer-east-vertical-border: #ccc;
|
|
5277
|
-
--ge-table-border: #ccc;
|
|
5278
|
-
--ge-table-row-odd-bg: transparent;
|
|
5279
|
-
--ge-table-row-even-bg: transparent;
|
|
5280
|
-
--ge-table-column-odd-bg: transparent;
|
|
5281
|
-
--ge-table-column-even-bg: transparent;
|
|
5282
|
-
--ge-table-hover-column-bg: rgba(0, 224, 255, 0.27);
|
|
5283
|
-
--ge-table-hover-row-bg: rgba(0, 224, 255, 0.27);
|
|
5284
|
-
--ge-table-focus-border: rgb(0, 255, 255);
|
|
5285
|
-
--ge-table-color-error-text: #e00034;
|
|
5286
|
-
--ge-table-tree-arrow-collapsed-color: #e00034;
|
|
5287
|
-
--ge-table-column-resize-handle-border: rgb(0, 255, 255);
|
|
5288
|
-
--ge-table-dragged-col-div-bg: lightcyan;
|
|
5289
|
-
--ge-table-drop-zone-bg: rgba(244, 255, 242, 0.6);
|
|
5290
|
-
}`,
|
|
5291
|
-
combat: `html[data-theme="combat"] {
|
|
5292
|
-
--ge-table-bg: #101010;
|
|
5293
|
-
--ge-table-header-west-bg: #101010;
|
|
5294
|
-
--ge-table-header-center-bg: #101010;
|
|
5295
|
-
--ge-table-header-east-bg: #101010;
|
|
5296
|
-
--ge-table-header-west-text: oklch(100% 0 0);
|
|
5297
|
-
--ge-table-header-center-text: oklch(100% 0 0);
|
|
5298
|
-
--ge-table-header-east-text: oklch(100% 0 0);
|
|
5299
|
-
--ge-table-header-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5300
|
-
--ge-table-header-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
5301
|
-
--ge-table-header-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5302
|
-
--ge-table-header-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
5303
|
-
--ge-table-header-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5304
|
-
--ge-table-header-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
5305
|
-
--ge-table-body-west-bg: #101010;
|
|
5306
|
-
--ge-table-body-center-bg: #101010;
|
|
5307
|
-
--ge-table-body-east-bg: #101010;
|
|
5308
|
-
--ge-table-body-west-text: #b6b4b4;
|
|
5309
|
-
--ge-table-body-center-text: #b6b4b4;
|
|
5310
|
-
--ge-table-body-east-text: #b6b4b4;
|
|
5311
|
-
--ge-table-body-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5312
|
-
--ge-table-body-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
5313
|
-
--ge-table-body-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5314
|
-
--ge-table-body-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
5315
|
-
--ge-table-body-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5316
|
-
--ge-table-body-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
5317
|
-
--ge-table-body-west-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
|
|
5318
|
-
--ge-table-body-center-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
|
|
5319
|
-
--ge-table-body-east-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
|
|
5320
|
-
--ge-table-body-west-selected-range-text: #f00032;
|
|
5321
|
-
--ge-table-body-center-selected-range-text: #f00032;
|
|
5322
|
-
--ge-table-body-east-selected-range-text: #f00032;
|
|
5323
|
-
--ge-table-footer-west-bg: #101010;
|
|
5324
|
-
--ge-table-footer-center-bg: #101010;
|
|
5325
|
-
--ge-table-footer-east-bg: #101010;
|
|
5326
|
-
--ge-table-footer-west-text: oklch(100% 0 0);
|
|
5327
|
-
--ge-table-footer-center-text: oklch(100% 0 0);
|
|
5328
|
-
--ge-table-footer-east-text: oklch(100% 0 0);
|
|
5329
|
-
--ge-table-footer-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5330
|
-
--ge-table-footer-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
5331
|
-
--ge-table-footer-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5332
|
-
--ge-table-footer-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
5333
|
-
--ge-table-footer-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5334
|
-
--ge-table-footer-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
5335
|
-
--ge-table-border: oklch(100% 0 0 / 0%);
|
|
5336
|
-
--ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
|
|
5337
|
-
--ge-table-row-even-bg: oklch(100% 0 0 / 0%);
|
|
5338
|
-
--ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
|
|
5339
|
-
--ge-table-column-even-bg: oklch(100% 0 0 / 0%);
|
|
5340
|
-
--ge-table-hover-column-bg: oklch(34% 0.25 3.6 / 27%);
|
|
5341
|
-
--ge-table-hover-row-bg: oklch(34% 0.25 3.6 / 27%);
|
|
5342
|
-
--ge-table-focus-border: oklch(40% 0.25 3.6);
|
|
5343
|
-
--ge-table-color-error-text: oklch(65% 0.31 43.2);
|
|
5344
|
-
--ge-table-tree-arrow-collapsed-color: #e00034;
|
|
5345
|
-
--ge-table-column-resize-handle-border: oklch(63% 0.31 43.2);
|
|
5346
|
-
--ge-table-dragged-col-div-bg: #2c2e33;
|
|
5347
|
-
--ge-table-drop-zone-bg: #101010;
|
|
5348
|
-
}`,
|
|
5349
|
-
paper: `html[data-theme="paper"] {
|
|
5350
|
-
--ge-table-bg: #e7e5df;
|
|
5351
|
-
--ge-table-header-west-bg: oklch(80% 0.02 99 / 48%);
|
|
5352
|
-
--ge-table-header-center-bg: oklch(80% 0.02 99 / 48%);
|
|
5353
|
-
--ge-table-header-east-bg: oklch(80% 0.02 99 / 48%);
|
|
5354
|
-
--ge-table-header-west-text: #111;
|
|
5355
|
-
--ge-table-header-center-text: #111;
|
|
5356
|
-
--ge-table-header-east-text: #111;
|
|
5357
|
-
--ge-table-header-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5358
|
-
--ge-table-header-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
5359
|
-
--ge-table-header-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5360
|
-
--ge-table-header-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
5361
|
-
--ge-table-header-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5362
|
-
--ge-table-header-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
5363
|
-
--ge-table-body-west-bg: oklch(80% 0.02 99 / 48%);
|
|
5364
|
-
--ge-table-body-center-bg: #e7e5df;
|
|
5365
|
-
--ge-table-body-east-bg: oklch(80% 0.02 99 / 48%);
|
|
5366
|
-
--ge-table-body-west-text: #000;
|
|
5367
|
-
--ge-table-body-center-text: #000;
|
|
5368
|
-
--ge-table-body-east-text: #000;
|
|
5369
|
-
--ge-table-body-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5370
|
-
--ge-table-body-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
5371
|
-
--ge-table-body-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5372
|
-
--ge-table-body-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
5373
|
-
--ge-table-body-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5374
|
-
--ge-table-body-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
5375
|
-
--ge-table-body-west-selected-range-bg: #cfcdc2;
|
|
5376
|
-
--ge-table-body-center-selected-range-bg: #cfcdc2;
|
|
5377
|
-
--ge-table-body-east-selected-range-bg: #cfcdc2;
|
|
5378
|
-
--ge-table-body-west-selected-range-text: #000;
|
|
5379
|
-
--ge-table-body-center-selected-range-text: #000;
|
|
5380
|
-
--ge-table-body-east-selected-range-text: #000;
|
|
5381
|
-
--ge-table-footer-west-bg: oklch(80% 0.02 99 / 48%);
|
|
5382
|
-
--ge-table-footer-center-bg: oklch(80% 0.02 99 / 48%);
|
|
5383
|
-
--ge-table-footer-east-bg: oklch(80% 0.02 99 / 48%);
|
|
5384
|
-
--ge-table-footer-west-text: #111;
|
|
5385
|
-
--ge-table-footer-center-text: #111;
|
|
5386
|
-
--ge-table-footer-east-text: #111;
|
|
5387
|
-
--ge-table-footer-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5388
|
-
--ge-table-footer-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
5389
|
-
--ge-table-footer-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5390
|
-
--ge-table-footer-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
5391
|
-
--ge-table-footer-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5392
|
-
--ge-table-footer-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
5393
|
-
--ge-table-border: oklch(100% 0 0 / 0%);
|
|
5394
|
-
--ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
|
|
5395
|
-
--ge-table-row-even-bg: oklch(100% 0 0 / 0%);
|
|
5396
|
-
--ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
|
|
5397
|
-
--ge-table-column-even-bg: oklch(100% 0 0 / 0%);
|
|
5398
|
-
--ge-table-hover-column-bg: oklch(5% 0.2 266.40000000000003 / 9%);
|
|
5399
|
-
--ge-table-hover-row-bg: oklch(5% 0.2 266.40000000000003 / 9%);
|
|
5400
|
-
--ge-table-focus-border: oklch(100% 0.19 205.20000000000002);
|
|
5401
|
-
--ge-table-color-error-text: oklch(45% 0.25 43.2);
|
|
5402
|
-
--ge-table-tree-arrow-collapsed-color: #e00034;
|
|
5403
|
-
--ge-table-column-resize-handle-border: oklch(100% 0.19 205.20000000000002 / 71%);
|
|
5404
|
-
--ge-table-dragged-col-div-bg: #2c2e33;
|
|
5405
|
-
--ge-table-drop-zone-bg: #e7e5df;
|
|
5406
|
-
}`,
|
|
5407
|
-
blackboard: `html[data-theme="dark"] {
|
|
5408
|
-
--ge-table-bg: #0c1021;
|
|
5409
|
-
--ge-table-header-west-bg: #0c1021;
|
|
5410
|
-
--ge-table-header-center-bg: #0c1021;
|
|
5411
|
-
--ge-table-header-east-bg: #0c1021;
|
|
5412
|
-
--ge-table-header-west-text: #e0df85;
|
|
5413
|
-
--ge-table-header-center-text: #e0df85;
|
|
5414
|
-
--ge-table-header-east-text: #e0df85;
|
|
5415
|
-
--ge-table-header-west-horizontal-border: transparent;
|
|
5416
|
-
--ge-table-header-west-vertical-border: transparent;
|
|
5417
|
-
--ge-table-header-center-horizontal-border: transparent;
|
|
5418
|
-
--ge-table-header-center-vertical-border: transparent;
|
|
5419
|
-
--ge-table-header-east-horizontal-border: transparent;
|
|
5420
|
-
--ge-table-header-east-vertical-border: transparent;
|
|
5421
|
-
--ge-table-body-west-bg: #0c1021;
|
|
5422
|
-
--ge-table-body-center-bg: #0c1021;
|
|
5423
|
-
--ge-table-body-east-bg: #0c1021;
|
|
5424
|
-
--ge-table-body-west-text: #a7a7a7;
|
|
5425
|
-
--ge-table-body-center-text: #a7a7a7;
|
|
5426
|
-
--ge-table-body-east-text: #a7a7a7;
|
|
5427
|
-
--ge-table-body-west-horizontal-border: transparent;
|
|
5428
|
-
--ge-table-body-west-vertical-border: transparent;
|
|
5429
|
-
--ge-table-body-center-horizontal-border: transparent;
|
|
5430
|
-
--ge-table-body-center-vertical-border: transparent;
|
|
5431
|
-
--ge-table-body-east-horizontal-border: transparent;
|
|
5432
|
-
--ge-table-body-east-vertical-border: transparent;
|
|
5433
|
-
--ge-table-body-west-selected-range-bg: #758129;
|
|
5434
|
-
--ge-table-body-center-selected-range-bg: #758129;
|
|
5435
|
-
--ge-table-body-east-selected-range-bg: #758129;
|
|
5436
|
-
--ge-table-body-west-selected-range-text: oklch(100% 0 0);
|
|
5437
|
-
--ge-table-body-center-selected-range-text: oklch(100% 0 0);
|
|
5438
|
-
--ge-table-body-east-selected-range-text: oklch(100% 0 0);
|
|
5439
|
-
--ge-table-footer-west-bg: #0c1021;
|
|
5440
|
-
--ge-table-footer-center-bg: #0c1021;
|
|
5441
|
-
--ge-table-footer-east-bg: #0c1021;
|
|
5442
|
-
--ge-table-footer-west-text: #e0df85;
|
|
5443
|
-
--ge-table-footer-center-text: #e0df85;
|
|
5444
|
-
--ge-table-footer-east-text: #e0df85;
|
|
5445
|
-
--ge-table-footer-west-horizontal-border: transparent;
|
|
5446
|
-
--ge-table-footer-west-vertical-border: transparent;
|
|
5447
|
-
--ge-table-footer-center-horizontal-border: transparent;
|
|
5448
|
-
--ge-table-footer-center-vertical-border: otransparent;
|
|
5449
|
-
--ge-table-footer-east-horizontal-border: transparent;
|
|
5450
|
-
--ge-table-footer-east-vertical-border: transparent;
|
|
5451
|
-
--ge-table-border: oklch(0% 0 0);
|
|
5452
|
-
--ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
|
|
5453
|
-
--ge-table-row-even-bg: oklch(100% 0 0 / 0%);
|
|
5454
|
-
--ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
|
|
5455
|
-
--ge-table-column-even-bg: oklch(100% 0 0 / 0%);
|
|
5456
|
-
--ge-table-hover-column-bg: #a9a9a9;
|
|
5457
|
-
--ge-table-hover-row-bg: #a9a9a9;
|
|
5458
|
-
--ge-table-focus-border: #e1ff00;
|
|
5459
|
-
--ge-table-color-error-text: #ff0040;
|
|
5460
|
-
--ge-table-tree-arrow-collapsed-color: #e00034;
|
|
5461
|
-
--ge-table-column-resize-handle-border: oklch(0% 0 0);
|
|
5462
|
-
--ge-table-dragged-col-div-bg: #2c2e33;
|
|
5463
|
-
--ge-table-drop-zone-bg: #758129;
|
|
5464
|
-
}`
|
|
5465
|
-
};
|
|
5466
|
-
let Se = J;
|
|
5467
|
-
const q = class q {
|
|
5468
|
-
constructor(e = new Fe()) {
|
|
5469
|
-
this.headerGroupOptions = e;
|
|
5470
|
-
}
|
|
5471
|
-
render(e, t, s, o, i, r, a) {
|
|
5472
|
-
const n = r != null && r.data ? r.data : "";
|
|
5473
|
-
if (r) {
|
|
5474
|
-
const { toggle: d, visibility: c, closed: h } = r, p = d ? q.toggleHeaderGroup : "";
|
|
5475
|
-
this.addText(e, o, t, s, n, p), d && c !== "always" && this.addArrowDiv(a, e, !h, t, s, o, p);
|
|
5476
|
-
} else
|
|
5477
|
-
this.addText(e, o, t, s, n, "");
|
|
5478
|
-
}
|
|
5479
|
-
addText(e, t, s, o, i, r) {
|
|
5480
|
-
e.innerHTML = `<span
|
|
5481
|
-
data-ge-action="${r}"
|
|
5482
|
-
data-area="${t}"
|
|
5483
|
-
data-row-index="${s}"
|
|
5484
|
-
data-col-index="${o}"
|
|
5485
|
-
>${i}</span>`;
|
|
5486
|
-
}
|
|
5487
|
-
addArrowDiv(e, t, s = !0, o = -1, i = -1, r = "header", a) {
|
|
5488
|
-
const n = e.createElement("div");
|
|
5489
|
-
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", `${a}`);
|
|
5490
|
-
let d;
|
|
5491
|
-
s ? d = this.headerGroupOptions.iconExpanded : d = this.headerGroupOptions.iconCollapsed;
|
|
5492
|
-
const c = d.content, h = e.createText(c);
|
|
5493
|
-
e.appendChild(n, h), d.style && this.applyStyleString(e, n, d.style);
|
|
5494
|
-
for (const p of d.classes)
|
|
5495
|
-
e.addClass(n, p);
|
|
5496
|
-
return e.appendChild(t, n), n;
|
|
5497
|
-
}
|
|
5498
|
-
applyStyleString(e, t, s) {
|
|
5499
|
-
const o = s.split(";").map((i) => i.trim()).filter((i) => i);
|
|
5500
|
-
for (const i of o) {
|
|
5501
|
-
const [r, a] = i.split(":");
|
|
5502
|
-
e.setStyle(t, r.trim(), a.trim());
|
|
5503
|
-
}
|
|
5504
|
-
}
|
|
5505
|
-
};
|
|
5506
|
-
q.toggleHeaderGroup = "toggleHeaderGroup";
|
|
5507
|
-
let ye = q;
|
|
5508
|
-
var Tt = /* @__PURE__ */ Ke("<div>");
|
|
5509
|
-
const It = (l) => {
|
|
5230
|
+
var At = /* @__PURE__ */ Ge("<div>");
|
|
5231
|
+
const Mt = (r) => {
|
|
5510
5232
|
let e;
|
|
5511
|
-
const t =
|
|
5233
|
+
const t = xe({
|
|
5512
5234
|
tableModel: null,
|
|
5513
|
-
tableOptions: new
|
|
5514
|
-
},
|
|
5515
|
-
return
|
|
5235
|
+
tableOptions: new Ee()
|
|
5236
|
+
}, r);
|
|
5237
|
+
return Le(() => {
|
|
5516
5238
|
const s = {
|
|
5517
|
-
onSelectionChanged(
|
|
5518
|
-
const
|
|
5519
|
-
detail:
|
|
5239
|
+
onSelectionChanged(l) {
|
|
5240
|
+
const n = new CustomEvent("selectionChanged", {
|
|
5241
|
+
detail: l,
|
|
5242
|
+
bubbles: !0
|
|
5243
|
+
});
|
|
5244
|
+
e && e.dispatchEvent(n);
|
|
5245
|
+
},
|
|
5246
|
+
onScroll(l) {
|
|
5247
|
+
const n = new CustomEvent("scroll", {
|
|
5248
|
+
detail: l,
|
|
5520
5249
|
bubbles: !0
|
|
5521
5250
|
});
|
|
5522
|
-
e && e.dispatchEvent(
|
|
5251
|
+
e && e.dispatchEvent(n);
|
|
5523
5252
|
},
|
|
5524
|
-
onFocusChanged(
|
|
5525
|
-
const
|
|
5526
|
-
detail:
|
|
5253
|
+
onFocusChanged(l) {
|
|
5254
|
+
const n = new CustomEvent("focusChanged", {
|
|
5255
|
+
detail: l,
|
|
5527
5256
|
bubbles: !0
|
|
5528
5257
|
});
|
|
5529
|
-
e && e.dispatchEvent(
|
|
5258
|
+
e && e.dispatchEvent(n);
|
|
5530
5259
|
},
|
|
5531
|
-
onCheckboxChanged: (
|
|
5532
|
-
const
|
|
5533
|
-
detail:
|
|
5260
|
+
onCheckboxChanged: (l) => {
|
|
5261
|
+
const n = new CustomEvent("checkboxChanged", {
|
|
5262
|
+
detail: l,
|
|
5534
5263
|
bubbles: !0
|
|
5535
5264
|
});
|
|
5536
|
-
e && e.dispatchEvent(
|
|
5265
|
+
e && e.dispatchEvent(n);
|
|
5537
5266
|
},
|
|
5538
|
-
onContextmenu: (
|
|
5539
|
-
const
|
|
5540
|
-
detail:
|
|
5267
|
+
onContextmenu: (l) => {
|
|
5268
|
+
const n = new CustomEvent("contextmenu", {
|
|
5269
|
+
detail: l,
|
|
5541
5270
|
bubbles: !0
|
|
5542
5271
|
});
|
|
5543
|
-
e && e.dispatchEvent(
|
|
5272
|
+
e && e.dispatchEvent(n);
|
|
5544
5273
|
},
|
|
5545
|
-
onModelChanged: (
|
|
5546
|
-
const
|
|
5547
|
-
detail:
|
|
5274
|
+
onModelChanged: (l) => {
|
|
5275
|
+
const n = new CustomEvent("modelChanged", {
|
|
5276
|
+
detail: l,
|
|
5548
5277
|
bubbles: !0
|
|
5549
5278
|
});
|
|
5550
|
-
e && e.dispatchEvent(
|
|
5279
|
+
e && e.dispatchEvent(n);
|
|
5551
5280
|
},
|
|
5552
|
-
onMouseClicked: (
|
|
5553
|
-
const
|
|
5554
|
-
detail:
|
|
5281
|
+
onMouseClicked: (l) => {
|
|
5282
|
+
const n = new CustomEvent("mouseClicked", {
|
|
5283
|
+
detail: l,
|
|
5555
5284
|
bubbles: !0
|
|
5556
5285
|
});
|
|
5557
|
-
e && e.dispatchEvent(
|
|
5286
|
+
e && e.dispatchEvent(n);
|
|
5558
5287
|
},
|
|
5559
|
-
onMouseDragging: (
|
|
5560
|
-
const
|
|
5561
|
-
detail:
|
|
5288
|
+
onMouseDragging: (l) => {
|
|
5289
|
+
const n = new CustomEvent("mouseDragging", {
|
|
5290
|
+
detail: l,
|
|
5562
5291
|
bubbles: !0
|
|
5563
5292
|
});
|
|
5564
|
-
e && e.dispatchEvent(
|
|
5293
|
+
e && e.dispatchEvent(n);
|
|
5565
5294
|
},
|
|
5566
|
-
onMouseDraggingEnd: (
|
|
5567
|
-
const
|
|
5568
|
-
detail:
|
|
5295
|
+
onMouseDraggingEnd: (l) => {
|
|
5296
|
+
const n = new CustomEvent("mouseDraggingEnd", {
|
|
5297
|
+
detail: l,
|
|
5569
5298
|
bubbles: !0
|
|
5570
5299
|
});
|
|
5571
|
-
e && e.dispatchEvent(
|
|
5300
|
+
e && e.dispatchEvent(n);
|
|
5572
5301
|
},
|
|
5573
|
-
onMouseMoved: (
|
|
5574
|
-
const
|
|
5575
|
-
detail:
|
|
5302
|
+
onMouseMoved: (l) => {
|
|
5303
|
+
const n = new CustomEvent("mouseMoved", {
|
|
5304
|
+
detail: l,
|
|
5576
5305
|
bubbles: !0
|
|
5577
5306
|
});
|
|
5578
|
-
e && e.dispatchEvent(
|
|
5307
|
+
e && e.dispatchEvent(n);
|
|
5579
5308
|
}
|
|
5580
|
-
},
|
|
5581
|
-
|
|
5582
|
-
const
|
|
5583
|
-
detail:
|
|
5309
|
+
}, i = new de(e, t.tableModel, new Ae(), t.tableOptions, s);
|
|
5310
|
+
i.firstInit();
|
|
5311
|
+
const o = new CustomEvent("tableReady", {
|
|
5312
|
+
detail: i.getApi(),
|
|
5584
5313
|
bubbles: !0
|
|
5585
5314
|
});
|
|
5586
|
-
e && e.dispatchEvent(
|
|
5315
|
+
e && e.dispatchEvent(o), t.licenseKey && V.getInstance().setLicenseKey(t.licenseKey);
|
|
5587
5316
|
}), (() => {
|
|
5588
|
-
var s =
|
|
5589
|
-
return typeof
|
|
5317
|
+
var s = At(), i = e;
|
|
5318
|
+
return typeof i == "function" ? Ue(i, s) : e = s, s;
|
|
5590
5319
|
})();
|
|
5591
5320
|
};
|
|
5592
5321
|
export {
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5322
|
+
Et as ComponentRendererWrapper,
|
|
5323
|
+
Mt as GuiexpertTable,
|
|
5324
|
+
Rt as GuiexpertTableProps
|
|
5596
5325
|
};
|