@guiexpert/solid-table 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,109 +1,109 @@
1
- const xe = (l, e) => l === e, J = Symbol("solid-proxy"), he = {
2
- equals: xe
1
+ const De = (r, e) => r === e, te = Symbol("solid-proxy"), ue = {
2
+ equals: De
3
3
  };
4
- let pe = Se;
5
- const L = 1, N = 2, fe = {
4
+ let me = ve;
5
+ const L = 1, N = 2, ye = {
6
6
  owned: null,
7
7
  cleanups: null,
8
8
  context: null,
9
9
  owner: null
10
10
  };
11
- var A = null;
12
- let U = null, b = null, x = null, F = null, K = 0;
13
- function Ee(l, e) {
14
- const t = b, s = A, i = l.length === 0, o = e === void 0 ? s : e, r = i ? fe : {
11
+ var R = null;
12
+ let Z = null, w = null, M = null, F = null, q = 0;
13
+ function ke(r, e) {
14
+ const t = w, s = R, o = r.length === 0, i = e === void 0 ? s : e, l = o ? ye : {
15
15
  owned: null,
16
16
  cleanups: null,
17
- context: o ? o.context : null,
18
- owner: o
19
- }, n = i ? l : () => l(() => W(() => z(r)));
20
- A = r, b = null;
17
+ context: i ? i.context : null,
18
+ owner: i
19
+ }, n = o ? r : () => r(() => H(() => J(l)));
20
+ R = l, w = null;
21
21
  try {
22
- return V(n, !0);
22
+ return G(n, !0);
23
23
  } finally {
24
- b = t, A = s;
24
+ w = t, R = s;
25
25
  }
26
26
  }
27
- function Q(l, e, t) {
28
- const s = se(l, e, !1, L);
29
- H(s);
27
+ function se(r, e, t) {
28
+ const s = re(r, e, !1, L);
29
+ W(s);
30
30
  }
31
- function Ae(l, e, t) {
32
- pe = Fe;
33
- const s = se(l, e, !1, L);
34
- (!t || !t.render) && (s.user = !0), F ? F.push(s) : H(s);
31
+ function Oe(r, e, t) {
32
+ me = He;
33
+ const s = re(r, e, !1, L);
34
+ (!t || !t.render) && (s.user = !0), F ? F.push(s) : W(s);
35
35
  }
36
- function Me(l, e, t) {
37
- t = t ? Object.assign({}, he, t) : he;
38
- const s = se(l, e, !0, 0);
39
- return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, H(s), Te.bind(s);
36
+ function Ie(r, e, t) {
37
+ t = t ? Object.assign({}, ue, t) : ue;
38
+ const s = re(r, e, !0, 0);
39
+ return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, W(s), Le.bind(s);
40
40
  }
41
- function W(l) {
42
- if (b === null)
43
- return l();
44
- const e = b;
45
- b = null;
41
+ function H(r) {
42
+ if (w === null)
43
+ return r();
44
+ const e = w;
45
+ w = null;
46
46
  try {
47
- return l();
47
+ return r();
48
48
  } finally {
49
- b = e;
49
+ w = e;
50
50
  }
51
51
  }
52
- function Re(l) {
53
- Ae(() => W(l));
52
+ function Fe(r) {
53
+ Oe(() => H(r));
54
54
  }
55
- function Te() {
55
+ function Le() {
56
56
  if (this.sources && this.state)
57
57
  if (this.state === L)
58
- H(this);
58
+ W(this);
59
59
  else {
60
- const l = x;
61
- x = null, V(() => j(this), !1), x = l;
60
+ const r = M;
61
+ M = null, G(() => j(this), !1), M = r;
62
62
  }
63
- if (b) {
64
- const l = this.observers ? this.observers.length : 0;
65
- b.sources ? (b.sources.push(this), b.sourceSlots.push(l)) : (b.sources = [this], b.sourceSlots = [l]), this.observers ? (this.observers.push(b), this.observerSlots.push(b.sources.length - 1)) : (this.observers = [b], this.observerSlots = [b.sources.length - 1]);
63
+ if (w) {
64
+ const r = this.observers ? this.observers.length : 0;
65
+ w.sources ? (w.sources.push(this), w.sourceSlots.push(r)) : (w.sources = [this], w.sourceSlots = [r]), this.observers ? (this.observers.push(w), this.observerSlots.push(w.sources.length - 1)) : (this.observers = [w], this.observerSlots = [w.sources.length - 1]);
66
66
  }
67
67
  return this.value;
68
68
  }
69
- function De(l, e, t) {
70
- let s = l.value;
71
- return (!l.comparator || !l.comparator(s, e)) && (l.value = e, l.observers && l.observers.length && V(() => {
72
- for (let i = 0; i < l.observers.length; i += 1) {
73
- const o = l.observers[i], r = U && U.running;
74
- r && U.disposed.has(o), (r ? !o.tState : !o.state) && (o.pure ? x.push(o) : F.push(o), o.observers && ge(o)), r || (o.state = L);
69
+ function $e(r, e, t) {
70
+ let s = r.value;
71
+ return (!r.comparator || !r.comparator(s, e)) && (r.value = e, r.observers && r.observers.length && G(() => {
72
+ for (let o = 0; o < r.observers.length; o += 1) {
73
+ const i = r.observers[o], l = Z && Z.running;
74
+ l && Z.disposed.has(i), (l ? !i.tState : !i.state) && (i.pure ? M.push(i) : F.push(i), i.observers && we(i)), l || (i.state = L);
75
75
  }
76
- if (x.length > 1e6)
77
- throw x = [], new Error();
76
+ if (M.length > 1e6)
77
+ throw M = [], new Error();
78
78
  }, !1)), e;
79
79
  }
80
- function H(l) {
81
- if (!l.fn)
80
+ function W(r) {
81
+ if (!r.fn)
82
82
  return;
83
- z(l);
84
- const e = K;
85
- Ie(
86
- l,
87
- l.value,
83
+ J(r);
84
+ const e = q;
85
+ Be(
86
+ r,
87
+ r.value,
88
88
  e
89
89
  );
90
90
  }
91
- function Ie(l, e, t) {
91
+ function Be(r, e, t) {
92
92
  let s;
93
- const i = A, o = b;
94
- b = A = l;
93
+ const o = R, i = w;
94
+ w = R = r;
95
95
  try {
96
- s = l.fn(e);
97
- } catch (r) {
98
- return l.pure && (l.state = L, l.owned && l.owned.forEach(z), l.owned = null), l.updatedAt = t + 1, me(r);
96
+ s = r.fn(e);
97
+ } catch (l) {
98
+ return r.pure && (r.state = L, r.owned && r.owned.forEach(J), r.owned = null), r.updatedAt = t + 1, Ce(l);
99
99
  } finally {
100
- b = o, A = i;
100
+ w = i, R = o;
101
101
  }
102
- (!l.updatedAt || l.updatedAt <= t) && (l.updatedAt != null && "observers" in l ? De(l, s) : l.value = s, l.updatedAt = t);
102
+ (!r.updatedAt || r.updatedAt <= t) && (r.updatedAt != null && "observers" in r ? $e(r, s) : r.value = s, r.updatedAt = t);
103
103
  }
104
- function se(l, e, t, s = L, i) {
105
- const o = {
106
- fn: l,
104
+ function re(r, e, t, s = L, o) {
105
+ const i = {
106
+ fn: r,
107
107
  state: s,
108
108
  updatedAt: null,
109
109
  owned: null,
@@ -111,381 +111,381 @@ function se(l, e, t, s = L, i) {
111
111
  sourceSlots: null,
112
112
  cleanups: null,
113
113
  value: e,
114
- owner: A,
115
- context: A ? A.context : null,
114
+ owner: R,
115
+ context: R ? R.context : null,
116
116
  pure: t
117
117
  };
118
- return A === null || A !== fe && (A.owned ? A.owned.push(o) : A.owned = [o]), o;
118
+ return R === null || R !== ye && (R.owned ? R.owned.push(i) : R.owned = [i]), i;
119
119
  }
120
- function _(l) {
121
- if (l.state === 0)
120
+ function z(r) {
121
+ if (r.state === 0)
122
122
  return;
123
- if (l.state === N)
124
- return j(l);
125
- if (l.suspense && W(l.suspense.inFallback))
126
- return l.suspense.effects.push(l);
127
- const e = [l];
128
- for (; (l = l.owner) && (!l.updatedAt || l.updatedAt < K); )
129
- l.state && e.push(l);
123
+ if (r.state === N)
124
+ return j(r);
125
+ if (r.suspense && H(r.suspense.inFallback))
126
+ return r.suspense.effects.push(r);
127
+ const e = [r];
128
+ for (; (r = r.owner) && (!r.updatedAt || r.updatedAt < q); )
129
+ r.state && e.push(r);
130
130
  for (let t = e.length - 1; t >= 0; t--)
131
- if (l = e[t], l.state === L)
132
- H(l);
133
- else if (l.state === N) {
134
- const s = x;
135
- x = null, V(() => j(l, e[0]), !1), x = s;
131
+ if (r = e[t], r.state === L)
132
+ W(r);
133
+ else if (r.state === N) {
134
+ const s = M;
135
+ M = null, G(() => j(r, e[0]), !1), M = s;
136
136
  }
137
137
  }
138
- function V(l, e) {
139
- if (x)
140
- return l();
138
+ function G(r, e) {
139
+ if (M)
140
+ return r();
141
141
  let t = !1;
142
- e || (x = []), F ? t = !0 : F = [], K++;
142
+ e || (M = []), F ? t = !0 : F = [], q++;
143
143
  try {
144
- const s = l();
145
- return Oe(t), s;
144
+ const s = r();
145
+ return Pe(t), s;
146
146
  } catch (s) {
147
- t || (F = null), x = null, me(s);
147
+ t || (F = null), M = null, Ce(s);
148
148
  }
149
149
  }
150
- function Oe(l) {
151
- if (x && (Se(x), x = null), l)
150
+ function Pe(r) {
151
+ if (M && (ve(M), M = null), r)
152
152
  return;
153
153
  const e = F;
154
- F = null, e.length && V(() => pe(e), !1);
154
+ F = null, e.length && G(() => me(e), !1);
155
155
  }
156
- function Se(l) {
157
- for (let e = 0; e < l.length; e++)
158
- _(l[e]);
156
+ function ve(r) {
157
+ for (let e = 0; e < r.length; e++)
158
+ z(r[e]);
159
159
  }
160
- function Fe(l) {
160
+ function He(r) {
161
161
  let e, t = 0;
162
- for (e = 0; e < l.length; e++) {
163
- const s = l[e];
164
- s.user ? l[t++] = s : _(s);
162
+ for (e = 0; e < r.length; e++) {
163
+ const s = r[e];
164
+ s.user ? r[t++] = s : z(s);
165
165
  }
166
166
  for (e = 0; e < t; e++)
167
- _(l[e]);
167
+ z(r[e]);
168
168
  }
169
- function j(l, e) {
170
- l.state = 0;
171
- for (let t = 0; t < l.sources.length; t += 1) {
172
- const s = l.sources[t];
169
+ function j(r, e) {
170
+ r.state = 0;
171
+ for (let t = 0; t < r.sources.length; t += 1) {
172
+ const s = r.sources[t];
173
173
  if (s.sources) {
174
- const i = s.state;
175
- i === L ? s !== e && (!s.updatedAt || s.updatedAt < K) && _(s) : i === N && j(s, e);
174
+ const o = s.state;
175
+ o === L ? s !== e && (!s.updatedAt || s.updatedAt < q) && z(s) : o === N && j(s, e);
176
176
  }
177
177
  }
178
178
  }
179
- function ge(l) {
180
- for (let e = 0; e < l.observers.length; e += 1) {
181
- const t = l.observers[e];
182
- t.state || (t.state = N, t.pure ? x.push(t) : F.push(t), t.observers && ge(t));
179
+ function we(r) {
180
+ for (let e = 0; e < r.observers.length; e += 1) {
181
+ const t = r.observers[e];
182
+ t.state || (t.state = N, t.pure ? M.push(t) : F.push(t), t.observers && we(t));
183
183
  }
184
184
  }
185
- function z(l) {
185
+ function J(r) {
186
186
  let e;
187
- if (l.sources)
188
- for (; l.sources.length; ) {
189
- const t = l.sources.pop(), s = l.sourceSlots.pop(), i = t.observers;
190
- if (i && i.length) {
191
- const o = i.pop(), r = t.observerSlots.pop();
192
- s < i.length && (o.sourceSlots[r] = s, i[s] = o, t.observerSlots[s] = r);
187
+ if (r.sources)
188
+ for (; r.sources.length; ) {
189
+ const t = r.sources.pop(), s = r.sourceSlots.pop(), o = t.observers;
190
+ if (o && o.length) {
191
+ const i = o.pop(), l = t.observerSlots.pop();
192
+ s < o.length && (i.sourceSlots[l] = s, o[s] = i, t.observerSlots[s] = l);
193
193
  }
194
194
  }
195
- if (l.owned) {
196
- for (e = l.owned.length - 1; e >= 0; e--)
197
- z(l.owned[e]);
198
- l.owned = null;
195
+ if (r.owned) {
196
+ for (e = r.owned.length - 1; e >= 0; e--)
197
+ J(r.owned[e]);
198
+ r.owned = null;
199
199
  }
200
- if (l.cleanups) {
201
- for (e = l.cleanups.length - 1; e >= 0; e--)
202
- l.cleanups[e]();
203
- l.cleanups = null;
200
+ if (r.cleanups) {
201
+ for (e = r.cleanups.length - 1; e >= 0; e--)
202
+ r.cleanups[e]();
203
+ r.cleanups = null;
204
204
  }
205
- l.state = 0;
205
+ r.state = 0;
206
206
  }
207
- function Le(l) {
208
- return l instanceof Error ? l : new Error(typeof l == "string" ? l : "Unknown error", {
209
- cause: l
207
+ function We(r) {
208
+ return r instanceof Error ? r : new Error(typeof r == "string" ? r : "Unknown error", {
209
+ cause: r
210
210
  });
211
211
  }
212
- function me(l, e = A) {
213
- throw Le(l);
212
+ function Ce(r, e = R) {
213
+ throw We(r);
214
214
  }
215
- function k() {
215
+ function V() {
216
216
  return !0;
217
217
  }
218
- const $e = {
219
- get(l, e, t) {
220
- return e === J ? t : l.get(e);
218
+ const Ge = {
219
+ get(r, e, t) {
220
+ return e === te ? t : r.get(e);
221
221
  },
222
- has(l, e) {
223
- return e === J ? !0 : l.has(e);
222
+ has(r, e) {
223
+ return e === te ? !0 : r.has(e);
224
224
  },
225
- set: k,
226
- deleteProperty: k,
227
- getOwnPropertyDescriptor(l, e) {
225
+ set: V,
226
+ deleteProperty: V,
227
+ getOwnPropertyDescriptor(r, e) {
228
228
  return {
229
229
  configurable: !0,
230
230
  enumerable: !0,
231
231
  get() {
232
- return l.get(e);
232
+ return r.get(e);
233
233
  },
234
- set: k,
235
- deleteProperty: k
234
+ set: V,
235
+ deleteProperty: V
236
236
  };
237
237
  },
238
- ownKeys(l) {
239
- return l.keys();
238
+ ownKeys(r) {
239
+ return r.keys();
240
240
  }
241
241
  };
242
- function q(l) {
243
- return (l = typeof l == "function" ? l() : l) ? l : {};
242
+ function ee(r) {
243
+ return (r = typeof r == "function" ? r() : r) ? r : {};
244
244
  }
245
- function Be() {
246
- for (let l = 0, e = this.length; l < e; ++l) {
247
- const t = this[l]();
245
+ function _e() {
246
+ for (let r = 0, e = this.length; r < e; ++r) {
247
+ const t = this[r]();
248
248
  if (t !== void 0)
249
249
  return t;
250
250
  }
251
251
  }
252
- function be(...l) {
252
+ function xe(...r) {
253
253
  let e = !1;
254
- for (let o = 0; o < l.length; o++) {
255
- const r = l[o];
256
- e = e || !!r && J in r, l[o] = typeof r == "function" ? (e = !0, Me(r)) : r;
254
+ for (let i = 0; i < r.length; i++) {
255
+ const l = r[i];
256
+ e = e || !!l && te in l, r[i] = typeof l == "function" ? (e = !0, Ie(l)) : l;
257
257
  }
258
258
  if (e)
259
259
  return new Proxy(
260
260
  {
261
- get(o) {
262
- for (let r = l.length - 1; r >= 0; r--) {
263
- const n = q(l[r])[o];
261
+ get(i) {
262
+ for (let l = r.length - 1; l >= 0; l--) {
263
+ const n = ee(r[l])[i];
264
264
  if (n !== void 0)
265
265
  return n;
266
266
  }
267
267
  },
268
- has(o) {
269
- for (let r = l.length - 1; r >= 0; r--)
270
- if (o in q(l[r]))
268
+ has(i) {
269
+ for (let l = r.length - 1; l >= 0; l--)
270
+ if (i in ee(r[l]))
271
271
  return !0;
272
272
  return !1;
273
273
  },
274
274
  keys() {
275
- const o = [];
276
- for (let r = 0; r < l.length; r++)
277
- o.push(...Object.keys(q(l[r])));
278
- return [...new Set(o)];
275
+ const i = [];
276
+ for (let l = 0; l < r.length; l++)
277
+ i.push(...Object.keys(ee(r[l])));
278
+ return [...new Set(i)];
279
279
  }
280
280
  },
281
- $e
281
+ Ge
282
282
  );
283
- const t = {}, s = {}, i = /* @__PURE__ */ new Set();
284
- for (let o = l.length - 1; o >= 0; o--) {
285
- const r = l[o];
286
- if (!r)
283
+ const t = {}, s = {}, o = /* @__PURE__ */ new Set();
284
+ for (let i = r.length - 1; i >= 0; i--) {
285
+ const l = r[i];
286
+ if (!l)
287
287
  continue;
288
- const n = Object.getOwnPropertyNames(r);
289
- for (let a = 0, h = n.length; a < h; a++) {
288
+ const n = Object.getOwnPropertyNames(l);
289
+ for (let a = 0, c = n.length; a < c; a++) {
290
290
  const d = n[a];
291
291
  if (d === "__proto__" || d === "constructor")
292
292
  continue;
293
- const c = Object.getOwnPropertyDescriptor(r, d);
294
- if (!i.has(d))
295
- c.get ? (i.add(d), Object.defineProperty(t, d, {
293
+ const h = Object.getOwnPropertyDescriptor(l, d);
294
+ if (!o.has(d))
295
+ h.get ? (o.add(d), Object.defineProperty(t, d, {
296
296
  enumerable: !0,
297
297
  configurable: !0,
298
- get: Be.bind(s[d] = [c.get.bind(r)])
299
- })) : (c.value !== void 0 && i.add(d), t[d] = c.value);
298
+ get: _e.bind(s[d] = [h.get.bind(l)])
299
+ })) : (h.value !== void 0 && o.add(d), t[d] = h.value);
300
300
  else {
301
- const p = s[d];
302
- p ? c.get ? p.push(c.get.bind(r)) : c.value !== void 0 && p.push(() => c.value) : t[d] === void 0 && (t[d] = c.value);
301
+ const g = s[d];
302
+ g ? h.get ? g.push(h.get.bind(l)) : h.value !== void 0 && g.push(() => h.value) : t[d] === void 0 && (t[d] = h.value);
303
303
  }
304
304
  }
305
305
  }
306
306
  return t;
307
307
  }
308
- function Pe(l, e, t) {
309
- let s = t.length, i = e.length, o = s, r = 0, n = 0, a = e[i - 1].nextSibling, h = null;
310
- for (; r < i || n < o; ) {
311
- if (e[r] === t[n]) {
312
- r++, n++;
308
+ function Ve(r, e, t) {
309
+ let s = t.length, o = e.length, i = s, l = 0, n = 0, a = e[o - 1].nextSibling, c = null;
310
+ for (; l < o || n < i; ) {
311
+ if (e[l] === t[n]) {
312
+ l++, n++;
313
313
  continue;
314
314
  }
315
- for (; e[i - 1] === t[o - 1]; )
316
- i--, o--;
317
- if (i === r) {
318
- const d = o < s ? n ? t[n - 1].nextSibling : t[o - n] : a;
319
- for (; n < o; )
320
- l.insertBefore(t[n++], d);
321
- } else if (o === n)
322
- for (; r < i; )
323
- (!h || !h.has(e[r])) && e[r].remove(), r++;
324
- else if (e[r] === t[o - 1] && t[n] === e[i - 1]) {
325
- const d = e[--i].nextSibling;
326
- l.insertBefore(t[n++], e[r++].nextSibling), l.insertBefore(t[--o], d), e[i] = t[o];
315
+ for (; e[o - 1] === t[i - 1]; )
316
+ o--, i--;
317
+ if (o === l) {
318
+ const d = i < s ? n ? t[n - 1].nextSibling : t[i - n] : a;
319
+ for (; n < i; )
320
+ r.insertBefore(t[n++], d);
321
+ } else if (i === n)
322
+ for (; l < o; )
323
+ (!c || !c.has(e[l])) && e[l].remove(), l++;
324
+ else if (e[l] === t[i - 1] && t[n] === e[o - 1]) {
325
+ const d = e[--o].nextSibling;
326
+ r.insertBefore(t[n++], e[l++].nextSibling), r.insertBefore(t[--i], d), e[o] = t[i];
327
327
  } else {
328
- if (!h) {
329
- h = /* @__PURE__ */ new Map();
330
- let c = n;
331
- for (; c < o; )
332
- h.set(t[c], c++);
328
+ if (!c) {
329
+ c = /* @__PURE__ */ new Map();
330
+ let h = n;
331
+ for (; h < i; )
332
+ c.set(t[h], h++);
333
333
  }
334
- const d = h.get(e[r]);
334
+ const d = c.get(e[l]);
335
335
  if (d != null)
336
- if (n < d && d < o) {
337
- let c = r, p = 1, g;
338
- for (; ++c < i && c < o && !((g = h.get(e[c])) == null || g !== d + p); )
339
- p++;
340
- if (p > d - n) {
341
- const u = e[r];
336
+ if (n < d && d < i) {
337
+ let h = l, g = 1, f;
338
+ for (; ++h < o && h < i && !((f = c.get(e[h])) == null || f !== d + g); )
339
+ g++;
340
+ if (g > d - n) {
341
+ const b = e[l];
342
342
  for (; n < d; )
343
- l.insertBefore(t[n++], u);
343
+ r.insertBefore(t[n++], b);
344
344
  } else
345
- l.replaceChild(t[n++], e[r++]);
345
+ r.replaceChild(t[n++], e[l++]);
346
346
  } else
347
- r++;
347
+ l++;
348
348
  else
349
- e[r++].remove();
349
+ e[l++].remove();
350
350
  }
351
351
  }
352
352
  }
353
- function We(l, e, t, s = {}) {
354
- let i;
355
- return Ee((o) => {
356
- i = o, e === document ? l() : Ge(e, l(), e.firstChild ? null : void 0, t);
353
+ function Ne(r, e, t, s = {}) {
354
+ let o;
355
+ return ke((i) => {
356
+ o = i, e === document ? r() : Xe(e, r(), e.firstChild ? null : void 0, t);
357
357
  }, s.owner), () => {
358
- i(), e.textContent = "";
358
+ o(), e.textContent = "";
359
359
  };
360
360
  }
361
- function He(l, e, t) {
361
+ function ze(r, e, t) {
362
362
  let s;
363
- const i = () => {
364
- const r = document.createElement("template");
365
- return r.innerHTML = l, t ? r.content.firstChild.firstChild : r.content.firstChild;
366
- }, o = e ? () => W(() => document.importNode(s || (s = i()), !0)) : () => (s || (s = i())).cloneNode(!0);
367
- return o.cloneNode = o, o;
363
+ const o = () => {
364
+ const l = document.createElement("template");
365
+ return l.innerHTML = r, t ? l.content.firstChild.firstChild : l.content.firstChild;
366
+ }, i = e ? () => H(() => document.importNode(s || (s = o()), !0)) : () => (s || (s = o())).cloneNode(!0);
367
+ return i.cloneNode = i, i;
368
368
  }
369
- function Ve(l, e, t) {
370
- return W(() => l(e, t));
369
+ function je(r, e, t) {
370
+ return H(() => r(e, t));
371
371
  }
372
- function Ge(l, e, t, s) {
372
+ function Xe(r, e, t, s) {
373
373
  if (t !== void 0 && !s && (s = []), typeof e != "function")
374
- return X(l, e, s, t);
375
- Q((i) => X(l, e(), i, t), s);
374
+ return X(r, e, s, t);
375
+ se((o) => X(r, e(), o, t), s);
376
376
  }
377
- function X(l, e, t, s, i) {
377
+ function X(r, e, t, s, o) {
378
378
  for (; typeof t == "function"; )
379
379
  t = t();
380
380
  if (e === t)
381
381
  return t;
382
- const o = typeof e, r = s !== void 0;
383
- if (l = r && t[0] && t[0].parentNode || l, o === "string" || o === "number")
384
- if (o === "number" && (e = e.toString()), r) {
382
+ const i = typeof e, l = s !== void 0;
383
+ if (r = l && t[0] && t[0].parentNode || r, i === "string" || i === "number")
384
+ if (i === "number" && (e = e.toString()), l) {
385
385
  let n = t[0];
386
- n && n.nodeType === 3 ? n.data = e : n = document.createTextNode(e), t = P(l, t, s, n);
386
+ n && n.nodeType === 3 ? n.data = e : n = document.createTextNode(e), t = B(r, t, s, n);
387
387
  } else
388
- t !== "" && typeof t == "string" ? t = l.firstChild.data = e : t = l.textContent = e;
389
- else if (e == null || o === "boolean")
390
- t = P(l, t, s);
388
+ t !== "" && typeof t == "string" ? t = r.firstChild.data = e : t = r.textContent = e;
389
+ else if (e == null || i === "boolean")
390
+ t = B(r, t, s);
391
391
  else {
392
- if (o === "function")
393
- return Q(() => {
392
+ if (i === "function")
393
+ return se(() => {
394
394
  let n = e();
395
395
  for (; typeof n == "function"; )
396
396
  n = n();
397
- t = X(l, n, t, s);
397
+ t = X(r, n, t, s);
398
398
  }), () => t;
399
399
  if (Array.isArray(e)) {
400
400
  const n = [], a = t && Array.isArray(t);
401
- if (Z(n, e, t, i))
402
- return Q(() => t = X(l, n, t, s, !0)), () => t;
401
+ if (oe(n, e, t, o))
402
+ return se(() => t = X(r, n, t, s, !0)), () => t;
403
403
  if (n.length === 0) {
404
- if (t = P(l, t, s), r)
404
+ if (t = B(r, t, s), l)
405
405
  return t;
406
406
  } else
407
- a ? t.length === 0 ? ce(l, n, s) : Pe(l, t, n) : (t && P(l), ce(l, n));
407
+ a ? t.length === 0 ? pe(r, n, s) : Ve(r, t, n) : (t && B(r), pe(r, n));
408
408
  t = n;
409
409
  } else if (e.nodeType) {
410
410
  if (Array.isArray(t)) {
411
- if (r)
412
- return t = P(l, t, s, e);
413
- P(l, t, null, e);
411
+ if (l)
412
+ return t = B(r, t, s, e);
413
+ B(r, t, null, e);
414
414
  } else
415
- t == null || t === "" || !l.firstChild ? l.appendChild(e) : l.replaceChild(e, l.firstChild);
415
+ t == null || t === "" || !r.firstChild ? r.appendChild(e) : r.replaceChild(e, r.firstChild);
416
416
  t = e;
417
417
  }
418
418
  }
419
419
  return t;
420
420
  }
421
- function Z(l, e, t, s) {
422
- let i = !1;
423
- for (let o = 0, r = e.length; o < r; o++) {
424
- let n = e[o], a = t && t[o], h;
421
+ function oe(r, e, t, s) {
422
+ let o = !1;
423
+ for (let i = 0, l = e.length; i < l; i++) {
424
+ let n = e[i], a = t && t[i], c;
425
425
  if (!(n == null || n === !0 || n === !1))
426
- if ((h = typeof n) == "object" && n.nodeType)
427
- l.push(n);
426
+ if ((c = typeof n) == "object" && n.nodeType)
427
+ r.push(n);
428
428
  else if (Array.isArray(n))
429
- i = Z(l, n, a) || i;
430
- else if (h === "function")
429
+ o = oe(r, n, a) || o;
430
+ else if (c === "function")
431
431
  if (s) {
432
432
  for (; typeof n == "function"; )
433
433
  n = n();
434
- i = Z(
435
- l,
434
+ o = oe(
435
+ r,
436
436
  Array.isArray(n) ? n : [n],
437
437
  Array.isArray(a) ? a : [a]
438
- ) || i;
438
+ ) || o;
439
439
  } else
440
- l.push(n), i = !0;
440
+ r.push(n), o = !0;
441
441
  else {
442
442
  const d = String(n);
443
- a && a.nodeType === 3 && a.data === d ? l.push(a) : l.push(document.createTextNode(d));
443
+ a && a.nodeType === 3 && a.data === d ? r.push(a) : r.push(document.createTextNode(d));
444
444
  }
445
445
  }
446
- return i;
446
+ return o;
447
447
  }
448
- function ce(l, e, t = null) {
449
- for (let s = 0, i = e.length; s < i; s++)
450
- l.insertBefore(e[s], t);
448
+ function pe(r, e, t = null) {
449
+ for (let s = 0, o = e.length; s < o; s++)
450
+ r.insertBefore(e[s], t);
451
451
  }
452
- function P(l, e, t, s) {
452
+ function B(r, e, t, s) {
453
453
  if (t === void 0)
454
- return l.textContent = "";
455
- const i = s || document.createTextNode("");
454
+ return r.textContent = "";
455
+ const o = s || document.createTextNode("");
456
456
  if (e.length) {
457
- let o = !1;
458
- for (let r = e.length - 1; r >= 0; r--) {
459
- const n = e[r];
460
- if (i !== n) {
461
- const a = n.parentNode === l;
462
- !o && !r ? a ? l.replaceChild(i, n) : l.insertBefore(i, t) : a && n.remove();
457
+ let i = !1;
458
+ for (let l = e.length - 1; l >= 0; l--) {
459
+ const n = e[l];
460
+ if (o !== n) {
461
+ const a = n.parentNode === r;
462
+ !i && !l ? a ? r.replaceChild(o, n) : r.insertBefore(o, t) : a && n.remove();
463
463
  } else
464
- o = !0;
464
+ i = !0;
465
465
  }
466
466
  } else
467
- l.insertBefore(i, t);
468
- return [i];
467
+ r.insertBefore(o, t);
468
+ return [o];
469
469
  }
470
- class ut {
470
+ class mt {
471
471
  constructor(e) {
472
472
  this.code = e;
473
473
  }
474
- render(e, t, s, i, o, r, n) {
475
- const a = be({
474
+ render(e, t, s, o, i, l, n) {
475
+ const a = xe({
476
476
  rowIndex: t,
477
477
  columnIndex: s,
478
- areaIdent: i,
479
- areaModel: o,
480
- cellValue: r
478
+ areaIdent: o,
479
+ areaModel: i,
480
+ cellValue: l
481
481
  });
482
- We(
482
+ Ne(
483
483
  () => this.code(a),
484
484
  e
485
485
  );
486
486
  }
487
487
  }
488
- const pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
488
+ const yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
489
489
  __proto__: null
490
490
  }, Symbol.toStringTag, { value: "Module" }));
491
491
  class $ {
@@ -513,18 +513,18 @@ class $ {
513
513
  }
514
514
  }
515
515
  }
516
- function ee(l) {
517
- return l && l.type === "TreeRow";
516
+ function ie(r) {
517
+ return r && r.type === "TreeRow";
518
518
  }
519
- function te(l) {
520
- return l && l.type === "AreaModelTree";
519
+ function le(r) {
520
+ return r && r.type === "AreaModelTree";
521
521
  }
522
- class ie {
523
- constructor(e = -1, t = -1, s = -1, i = -1, o, r, n, a = 0, h = 0, d = 0, c = "") {
524
- this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = i, this.areaIdent = o, this.sideIdent = r, this.originalEvent = n, this.clickCount = a, this.draggingX = h, this.draggingY = d, this.action = c;
522
+ class ne {
523
+ constructor(e = -1, t = -1, s = -1, o = -1, i, l, n, a = 0, c = 0, d = 0, h = "") {
524
+ this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = o, this.areaIdent = i, this.sideIdent = l, this.originalEvent = n, this.clickCount = a, this.draggingX = c, this.draggingY = d, this.action = h;
525
525
  }
526
526
  clone() {
527
- return new ie(
527
+ return new ne(
528
528
  this.rowIndex,
529
529
  this.rowTop,
530
530
  this.columnIndex,
@@ -539,38 +539,38 @@ class ie {
539
539
  );
540
540
  }
541
541
  }
542
- class B {
542
+ class I {
543
543
  constructor(e = ">", t = "", s = []) {
544
544
  this.content = e, this.style = t, this.classes = s;
545
545
  }
546
546
  }
547
- class ye {
548
- constructor(e = new B(
547
+ class Ee {
548
+ constructor(e = new I(
549
549
  ">",
550
550
  "transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
551
551
  ["gt-table-tree-arrow-expanded"]
552
- ), t = new B(
552
+ ), t = new I(
553
553
  ">",
554
554
  "",
555
555
  ["ge-table-tree-arrow-collapsed"]
556
- ), s = new B(
556
+ ), s = new I(
557
557
  ">",
558
558
  "color:transparent;",
559
559
  ["gt-table-tree-arrow-hidden"]
560
- ), i = new B(
560
+ ), o = new I(
561
561
  "↕",
562
562
  "",
563
563
  ["gt-table-tree-arrow-expanded-all"]
564
564
  )) {
565
- this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = i;
565
+ this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = o;
566
566
  }
567
567
  }
568
- class ve {
569
- constructor(e = new B("↑", "", ["ge-header-sorted-asc"]), t = new B("↓", "", ["ge-header-sorted-desc"]), s = new B("↑", "color:transparent;", [])) {
568
+ class Ae {
569
+ constructor(e = new I("↑", "", ["ge-header-sorted-asc"]), t = new I("↓", "", ["ge-header-sorted-desc"]), s = new I("↑", "color:transparent;", [])) {
570
570
  this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
571
571
  }
572
572
  }
573
- class ke {
573
+ class Ke {
574
574
  constructor(e) {
575
575
  this.domService = e;
576
576
  }
@@ -589,7 +589,7 @@ class ke {
589
589
  return this.domService.setStyle(e, "display", "block"), e;
590
590
  }
591
591
  applyStyleInPx(e, t) {
592
- return Object.entries(t).forEach(([s, i]) => this.domService.setStyle(e, s, i + "px")), e;
592
+ return Object.entries(t).forEach(([s, o]) => this.domService.setStyle(e, s, o + "px")), e;
593
593
  }
594
594
  applyStylePosistionRelative(e) {
595
595
  return this.domService.setStyle(e, "position", "relative"), this.domService.setStyle(e, "overflow", "clip"), e;
@@ -635,115 +635,116 @@ class ke {
635
635
  setAttribute(e, t, s) {
636
636
  return t && s && this.domService.setAttribute(e, t, s), e;
637
637
  }
638
- createAreaDivWithClass(e, t, s, i) {
639
- const o = this.domService.createElement("div");
640
- 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;
638
+ createAreaDivWithClass(e, t, s, o) {
639
+ const i = this.domService.createElement("div");
640
+ return this.addClass(e, i), this.domService.setAttribute(i, "data-area", s), this.domService.setAttribute(i, "data-side", o), this.domService.appendChild(t, i), i;
641
641
  }
642
642
  createDivWithClass(e, t) {
643
643
  const s = this.domService.createElement("div");
644
644
  return this.addClass(e, s), this.domService.appendChild(t, s), s;
645
645
  }
646
- addRowDiv(e, t, s = -1, i, o, r = "") {
646
+ addRowDiv(e, t, s = -1, o, i, l = "") {
647
647
  const n = t.index ?? -1, a = this.getDivOrCreateDiv(n, e);
648
- if (this.domService.addClass(a, "ge-table-row-div"), this.domService.addClass(a, `ge-table-row-div-${t.index}`), i === "body" && o === "center") {
649
- const h = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
650
- this.domService.addClass(a, `ge-table-row-${h}`);
648
+ if (this.domService.addClass(a, "ge-table-row-div"), this.domService.addClass(a, `ge-table-row-div-${t.index}`), o === "body" && i === "center") {
649
+ const c = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
650
+ this.domService.addClass(a, `ge-table-row-${c}`);
651
651
  }
652
- 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}`), r) {
653
- const h = this.domService.createText(r);
654
- this.domService.appendChild(a, h);
652
+ 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", `${o}`), l) {
653
+ const c = this.domService.createText(l);
654
+ this.domService.appendChild(a, c);
655
655
  }
656
656
  return this.domService.appendChild(e.child, a), a;
657
657
  }
658
- addColumnDiv(e, t, s = -1, i = -1, o, r, n = "", a, h, d = void 0, c) {
659
- const p = h == null ? void 0 : h.treeOptions, g = h == null ? void 0 : h.showCheckboxWihoutExtraColumn, u = this.domService.createElement("div");
660
- this.domService.addClass(u, "ge-table-col-div"), this.domService.addClass(u, `ge-table-col-div-${t.index}`), this.domService.setAttribute(u, "data-col-index", `${t.index}`), this.domService.setAttribute(u, "data-row-index", `${s}`), this.domService.setAttribute(u, "data-area", `${o}`);
661
- const m = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
662
- if (o === "body" && r === "center" && this.domService.addClass(u, `ge-table-column-${m}`), this.domService.setStyle(u, "display", "clip"), this.domService.setStyle(u, "position", "absolute"), this.domService.setStyle(u, "left", `${t.left}px`), this.domService.setStyle(u, "top", `${t.top}px`), this.domService.setStyle(u, "width", `${t.width}px`), this.domService.setStyle(u, "height", `${t.height}px`), a && a !== "none" && (this.domService.addClass(u, "ge-table-col-tree"), this.addArrowDiv(u, a, p, s, i, o)), g && i === 0 && d && this.addCheckboxToDiv(u, d, o, s), n) {
663
- const S = a !== "none" && i === 0;
664
- this.addLabelDiv(u, n, S, s, i, o);
658
+ addColumnDiv(e) {
659
+ const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent: l, sideIdent: n, text: a = "", treeArrow: c, tableOptions: d, checkedType: h = void 0, sortState: g } = e, f = d == null ? void 0 : d.treeOptions, b = d == null ? void 0 : d.showCheckboxWihoutExtraColumn, S = this.domService.createElement("div");
660
+ this.domService.addClass(S, "ge-table-col-div"), 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", `${o}`), this.domService.setAttribute(S, "data-area", `${l}`);
661
+ const p = ((s == null ? void 0 : s.index) ?? 0) % 2 === 0 ? "even" : "odd";
662
+ if (l === "body" && n === "center" && this.domService.addClass(S, `ge-table-column-${p}`), 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`), c && c !== "none" && (this.domService.addClass(S, "ge-table-col-tree"), this.addArrowDiv(S, c, f, o, i, l)), b && i === 0 && h && this.addCheckboxToDiv(S, h, l, o), a) {
663
+ const u = c !== "none" && i === 0;
664
+ this.addLabelDiv(S, a, u, o, i, l);
665
665
  }
666
- return c && this.addSortedIcon(u, c, h == null ? void 0 : h.sortedOptions, i), this.domService.appendChild(e, u), u;
666
+ return g && this.addSortedIcon(S, g, d == null ? void 0 : d.sortedOptions, i), this.domService.appendChild(t, S), S;
667
667
  }
668
- addCheckboxToDiv(e, t, s, i) {
669
- const o = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
670
- return o.innerHTML = `
668
+ addCheckboxToDiv(e, t, s, o) {
669
+ const i = this.domService.createElement("div"), l = t === "full" ? "checked" : "";
670
+ return i.innerHTML = `
671
671
  <input
672
672
  type="checkbox"
673
673
  data-area="${s}"
674
- data-row-index="${i}"
674
+ data-row-index="${o}"
675
675
  data-input-type="checkbox"
676
- ${r}
677
- 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;
676
+ ${l}
677
+ class="ge-table-row-checkbox"> `, this.domService.setStyle(i, "display", "inline"), this.domService.setStyle(i, "width", "inherit"), this.domService.setAttribute(i, "data-row-index", `${o}`), this.domService.appendChild(e, i), i;
678
678
  }
679
- addLabelDiv(e, t = "", s = !1, i = -1, o = -1, r = "body") {
679
+ addLabelDiv(e, t = "", s = !1, o = -1, i = -1, l = "body") {
680
680
  const n = this.domService.createElement("div");
681
- 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", `${r}`), t)
681
+ 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", `${o}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${l}`), t)
682
682
  if (s) {
683
683
  const a = this.domService.createText(t);
684
684
  this.domService.appendChild(n, a);
685
685
  } else {
686
686
  const a = this.domService.createElement("div");
687
687
  this.domService.appendChild(n, a);
688
- const h = this.domService.createText(t);
689
- this.domService.addClass(a, "ge-table-label"), this.domService.appendChild(a, h), this.domService.setAttribute(a, "data-row-index", `${i}`), this.domService.setAttribute(a, "data-col-index", `${o}`), this.domService.setAttribute(a, "data-area", `${r}`);
688
+ const c = this.domService.createText(t);
689
+ this.domService.addClass(a, "ge-table-label"), this.domService.appendChild(a, c), this.domService.setAttribute(a, "data-row-index", `${o}`), this.domService.setAttribute(a, "data-col-index", `${i}`), this.domService.setAttribute(a, "data-area", `${l}`);
690
690
  }
691
691
  return this.domService.appendChild(e, n), n;
692
692
  }
693
- addSortedIcon(e, t = "", s = new ve(), i = -1) {
694
- const o = this.domService.createElement("div");
695
- 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");
696
- let r;
697
- t === "asc" ? r = s.iconAsc : t === "desc" ? r = s.iconDesc : r = s.iconPlaceholder;
698
- const n = r.content, a = this.domService.createText(n);
699
- this.domService.appendChild(o, a), r.style && this.applyStyleString(o, r.style);
700
- for (const h of r.classes)
701
- this.domService.addClass(o, h);
702
- return this.domService.appendChild(e, o), o;
703
- }
704
- addArrowDiv(e, t = "none", s = new ye(), i = -1, o = -1, r = "body") {
693
+ addSortedIcon(e, t = "", s = new Ae(), o = -1) {
694
+ const i = this.domService.createElement("div");
695
+ this.domService.addClass(i, "ge-table-sorted-icon-div"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "top", "0"), this.domService.setStyle(i, "right", "0"), this.domService.setStyle(i, "width", "20px"), this.domService.setStyle(i, "background", "transparent"), this.domService.setStyle(i, "cursor", "pointer"), this.domService.setAttribute(i, "data-col-index", `${o}`), this.domService.setAttribute(i, "data-area", "header");
696
+ let l;
697
+ t === "asc" ? l = s.iconAsc : t === "desc" ? l = s.iconDesc : l = s.iconPlaceholder;
698
+ const n = l.content, a = this.domService.createText(n);
699
+ this.domService.appendChild(i, a), l.style && this.applyStyleString(i, l.style);
700
+ for (const c of l.classes)
701
+ this.domService.addClass(i, c);
702
+ return this.domService.appendChild(e, i), i;
703
+ }
704
+ addArrowDiv(e, t = "none", s = new Ee(), o = -1, i = -1, l = "body") {
705
705
  const n = this.domService.createElement("div");
706
- 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", `${r}`);
706
+ 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", `${o}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${l}`);
707
707
  let a;
708
708
  t === "expanded" ? a = s.arrowExpanded : t === "collapsed" ? a = s.arrowCollapsed : a = s.arrowPlaceholder;
709
- const h = a.content, d = this.domService.createText(h);
709
+ const c = a.content, d = this.domService.createText(c);
710
710
  this.domService.appendChild(n, d), a.style && this.applyStyleString(n, a.style);
711
- for (const c of a.classes)
712
- this.domService.addClass(n, c);
711
+ for (const h of a.classes)
712
+ this.domService.addClass(n, h);
713
713
  return this.domService.appendChild(e, n), n;
714
714
  }
715
- addColumnBorderDivs(e, t, s, i, o) {
715
+ addColumnBorderDivs(e, t, s, o, i) {
716
716
  if (e.verticalBorderVisible) {
717
- const r = `ge-table-${i}-${o}-vertical-border`;
718
- this.addVerticalBorder(s, t, r);
717
+ const l = `ge-table-${o}-${i}-vertical-border`;
718
+ this.addVerticalBorder(s, t, l);
719
719
  }
720
720
  if (e.horizontalBorderVisible) {
721
- const r = `ge-table-${i}-${o}-horizontal-border`;
722
- this.addHorizontalBorder(s, t, r);
721
+ const l = `ge-table-${o}-${i}-horizontal-border`;
722
+ this.addHorizontalBorder(s, t, l);
723
723
  }
724
724
  return t;
725
725
  }
726
726
  addHorizontalBorder(e, t, s = "ge-table-body-center-horizontal-border") {
727
- const i = this.domService.createElement("div");
728
- 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;
727
+ const o = this.domService.createElement("div");
728
+ return this.domService.addClass(o, s), this.domService.setStyle(o, "display", "clip"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "left", `${e.left}px`), this.domService.setStyle(o, "top", `${e.top}px`), this.domService.setStyle(o, "width", `${e.width}px`), this.domService.setStyle(o, "height", "1px"), this.domService.appendChild(t, o), o;
729
729
  }
730
730
  addFocusBorderDivs(e, t, s) {
731
- let i = this.domService.createElement("div");
732
- 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.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.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.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.applyStyle(i, s), this.domService.appendChild(e, i), e;
731
+ t = { ...t, width: t.width + 1, height: t.height + 1 };
732
+ let o = this.domService.createElement("div");
733
+ return this.domService.addClass(o, "ge-table-focus-border"), this.domService.setStyle(o, "display", "clip"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "left", `${t.left}px`), this.domService.setStyle(o, "top", `${t.top}px`), this.domService.setStyle(o, "width", "1px"), this.domService.setStyle(o, "height", `${t.height}px`), this.domService.setStyle(o, "z-index", "9999"), this.applyStyle(o, s), this.domService.appendChild(e, o), o = this.domService.createElement("div"), this.domService.addClass(o, "ge-table-focus-border"), this.domService.setStyle(o, "display", "clip"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "left", `${t.left + t.width - 1}px`), this.domService.setStyle(o, "top", `${t.top}px`), this.domService.setStyle(o, "width", "1px"), this.domService.setStyle(o, "height", `${t.height}px`), this.domService.setStyle(o, "z-index", "9999"), this.applyStyle(o, s), this.domService.appendChild(e, o), o = this.domService.createElement("div"), this.domService.addClass(o, "ge-table-focus-border"), this.domService.setStyle(o, "display", "clip"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "left", `${t.left}px`), this.domService.setStyle(o, "top", `${t.top}px`), this.domService.setStyle(o, "width", `${t.width}px`), this.domService.setStyle(o, "height", "1px"), this.domService.setStyle(o, "z-index", "9999"), this.applyStyle(o, s), this.domService.appendChild(e, o), o = this.domService.createElement("div"), this.domService.addClass(o, "ge-table-focus-border"), this.domService.setStyle(o, "display", "clip"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "left", `${t.left}px`), this.domService.setStyle(o, "top", `${t.top + t.height - 1}px`), this.domService.setStyle(o, "width", `${t.width}px`), this.domService.setStyle(o, "height", "1px"), this.domService.setStyle(o, "z-index", "9999"), this.applyStyle(o, s), this.domService.appendChild(e, o), e;
733
734
  }
734
735
  addVerticalBorder(e, t, s = "ge-table-body-center-vertical-border") {
735
- const i = this.domService.createElement("div");
736
- 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;
736
+ const o = this.domService.createElement("div");
737
+ return this.domService.addClass(o, s), this.domService.setStyle(o, "display", "clip"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "left", `${e.left}px`), this.domService.setStyle(o, "top", `${e.top}px`), this.domService.setStyle(o, "width", "1px"), this.domService.setStyle(o, "height", `${e.height}px`), this.domService.appendChild(t, o), o;
737
738
  }
738
739
  addDiv(e, t, s = "") {
739
- const i = this.domService.createElement("div");
740
- 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;
740
+ const o = this.domService.createElement("div");
741
+ return s && this.domService.addClass(o, s), this.domService.setStyle(o, "display", "clip"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "left", `${t.left}px`), this.domService.setStyle(o, "top", `${t.top}px`), this.domService.setStyle(o, "width", `${t.width}px`), this.domService.setStyle(o, "height", `${t.height}px`), this.domService.appendChild(e, o), o;
741
742
  }
742
743
  applyStyleString(e, t) {
743
- const s = t.split(";").map((i) => i.trim()).filter((i) => i);
744
- for (const i of s) {
745
- const [o, r] = i.split(":");
746
- this.domService.setStyle(e, o.trim(), r.trim());
744
+ const s = t.split(";").map((o) => o.trim()).filter((o) => o);
745
+ for (const o of s) {
746
+ const [i, l] = o.split(":");
747
+ this.domService.setStyle(e, i.trim(), l.trim());
747
748
  }
748
749
  }
749
750
  getDivOrCreateDiv(e, t) {
@@ -751,22 +752,22 @@ class ke {
751
752
  return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
752
753
  }
753
754
  }
754
- const oe = (l) => l === "header" ? "header" : l === "footer" ? "footer" : "body";
755
- class Ne {
755
+ const ae = (r) => r === "header" ? "header" : r === "footer" ? "footer" : "body";
756
+ class Ye {
756
757
  constructor(e, t) {
757
758
  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)) {
758
759
  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"));
759
760
  const s = e.getAttribute("data-area");
760
- if (s && (this.areaIdent = oe(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
761
- const i = e;
762
- this.value = i.value;
761
+ if (s && (this.areaIdent = ae(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
762
+ const o = e;
763
+ this.value = o.value;
763
764
  }
764
765
  }
765
766
  }
766
767
  }
767
- class _e {
768
+ class Ue {
768
769
  constructor(e) {
769
- this.tableScope = e, this.expandedAll = !0, this.mouseDown = !1, this.dragging = !1, 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(
770
+ 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(
770
771
  (t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
771
772
  );
772
773
  }
@@ -790,22 +791,28 @@ class _e {
790
791
  * @return {void}
791
792
  */
792
793
  onHostElementClicked(e) {
793
- const t = new Ne(e.target, this.tableScope);
794
- if (t.action === "toggleExpandCollapseAll")
794
+ const t = Date.now();
795
+ if (t - this.lastClicked < this.doubleClickDelay)
796
+ return;
797
+ this.lastClicked = t;
798
+ const s = new Ye(e.target, this.tableScope);
799
+ if (s.action === "toggleExpandCollapseAll")
795
800
  this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
796
- else if (t.inputType === "checkbox" && t.areaIdent)
797
- this.tableScope.toggleRowCheckbox(t.rowIdx, t.colIdx, t.areaIdent), e.preventDefault(), e.stopPropagation();
798
- else if (ee(t.row) && t.areaModel) {
799
- const s = t.colIdx === this.getArrowColumnIndex() && e.altKey, i = t.className.includes("ge-table-tree-arrow-div");
800
- if (console.info(i, s), s || i) {
801
+ else if (s.action === "toggleHeaderGroup")
802
+ this.tableScope.toggleHeaderGroup(s), e.preventDefault(), e.stopPropagation();
803
+ else if (s.inputType === "checkbox" && s.areaIdent)
804
+ this.tableScope.toggleRowCheckbox(s.rowIdx, s.colIdx, s.areaIdent), e.preventDefault(), e.stopPropagation();
805
+ else if (ie(s.row) && s.areaModel) {
806
+ const o = s.colIdx === this.getArrowColumnIndex() && e.altKey, i = s.className.includes("ge-table-tree-arrow-div");
807
+ if (console.info(i, o), o || i) {
801
808
  e.preventDefault(), e.stopPropagation();
802
- const o = t.row;
803
- o.expanded = !o.expanded, "recalcVisibleTreeRows" in t.areaModel && t.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(o);
809
+ const l = s.row;
810
+ 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);
804
811
  }
805
812
  }
806
- if (t.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
807
- const s = this.tableScope.tableOptions.getFocusModel();
808
- s == null || s.clear(), s == null || s.setFocus(t.rowIdx, t.colIdx);
813
+ if (s.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
814
+ const o = this.tableScope.tableOptions.getFocusModel();
815
+ o == null || o.clear(), o == null || o.setFocus(s.rowIdx, s.colIdx);
809
816
  }
810
817
  this.publishGeMouseEvent(e, 1);
811
818
  }
@@ -816,16 +823,16 @@ class _e {
816
823
  * @param {MouseEvent} event - The double click event.
817
824
  */
818
825
  onHostElementDblClicked(e) {
819
- if (e.target instanceof HTMLElement) {
820
- const t = e.target, s = t.getAttribute("data-area"), i = oe(s), o = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), n = this.tableScope.tableModel.getAreaModel(i);
821
- if (s && i === "header")
822
- this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, o, r));
826
+ if (this.lastClicked = Date.now(), e.target instanceof HTMLElement) {
827
+ const t = e.target, s = t.getAttribute("data-area"), o = ae(s), i = Number(t.getAttribute("data-row-index")), l = Number(t.getAttribute("data-col-index")), n = this.tableScope.tableModel.getAreaModel(o);
828
+ if (s && o === "header")
829
+ this.tableScope.tableModel.isSortable(l) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, l));
823
830
  else if (t.getAttribute("data-row-index")) {
824
- const a = n.getRowByIndex(o);
825
- if (s && i === "body" && n.isEditable(o, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, r)), ee(a) && r === this.getArrowColumnIndex()) {
831
+ const a = n.getRowByIndex(i);
832
+ if (s && o === "body" && n.isEditable(i, l) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, l)), ie(a) && l === this.getArrowColumnIndex()) {
826
833
  e.preventDefault(), e.stopPropagation();
827
- const h = a;
828
- h.expanded = !h.expanded, "recalcVisibleTreeRows" in n && n.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(h);
834
+ const c = a;
835
+ c.expanded = !c.expanded, "recalcVisibleTreeRows" in n && n.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(c);
829
836
  }
830
837
  }
831
838
  }
@@ -841,7 +848,7 @@ class _e {
841
848
  */
842
849
  publishGeMouseEvent(e, t) {
843
850
  var s;
844
- this.mouseEvent = e, this.geMouseEventOld = (s = this.geMouseEvent) == null ? void 0 : s.clone(), this.geMouseEvent = this.tableScope.createGeMouseEvent(e), this.geMouseEvent && (this.geMouseEvent.clickCount = t), this.tableScope.onMouseClicked(this.geMouseEvent, this.geMouseEventOld);
851
+ this.mouseEvent = e, this.geMouseEventOld = (s = this.geMouseEvent) == null ? void 0 : s.clone(), this.geMouseEvent = this.tableScope.createGeMouseEvent(e), this.geMouseEvent && (this.geMouseEvent.clickCount = t), this.tableScope.onMouseClicked(this.geMouseEvent, this.geMouseEventOld), this.tableScope.publishGeMouseEvent(this.geMouseEvent), t === 1 && this.tableScope.debounceRepaint();
845
852
  }
846
853
  /**
847
854
  * Update the collapsed/expanded state of a tree row.
@@ -850,30 +857,30 @@ class _e {
850
857
  * @returns {void}
851
858
  */
852
859
  updateCollapsedExpandedState(e) {
853
- var s, i, o, r, n;
854
- const t = (i = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : i.getRowId;
860
+ var s, o, i, l, n;
861
+ const t = (o = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : o.getRowId;
855
862
  if (t) {
856
- const a = (o = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : o.collapsedExpandedStateGet().mode, h = a === "collapsed" && !e.expanded || a === "expanded" && e.expanded, d = a === "collapsed" && e.expanded || a === "expanded" && !e.expanded, c = t(e.data);
857
- h ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(c) : d && ((n = this.tableScope.storeStateCollapsedExpandService) == null || n.collapsedStateIdsRemove(c));
863
+ const a = (i = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : i.collapsedExpandedStateGet().mode, c = a === "collapsed" && !e.expanded || a === "expanded" && e.expanded, d = a === "collapsed" && e.expanded || a === "expanded" && !e.expanded, h = t(e.data);
864
+ c ? (l = this.tableScope.storeStateCollapsedExpandService) == null || l.collapsedStateIdsPush(h) : d && ((n = this.tableScope.storeStateCollapsedExpandService) == null || n.collapsedStateIdsRemove(h));
858
865
  }
859
866
  }
860
867
  getArrowColumnIndex() {
861
868
  return this.tableScope.tableModel.isRowCheckboxVisible() ? 1 : 0;
862
869
  }
863
870
  onMouseDown(e) {
864
- this.mouseEvent = e, this.startMouseEvent = this.tableScope.createGeMouseEvent(this.mouseEvent), this.tableScope.onMouseDown(this.startMouseEvent), this.mouseDown = !0;
871
+ this.dragging || (this.mouseEvent = e, this.startMouseEvent = this.tableScope.createGeMouseEvent(this.mouseEvent), this.tableScope.onMouseDown(this.startMouseEvent), this.mouseDown = !0);
865
872
  }
866
873
  onMouseMove(e) {
867
- this.mouseEvent = e, this.mouseDown ? (this.dragging = !0, requestAnimationFrame(this.mouseDraggingOnFrame.bind(this))) : requestAnimationFrame(this.mouseMoveOnFrame.bind(this));
874
+ this.mouseEvent = e, this.mouseDown ? (this.dragging || (this.dragging = !0, this.tableScope.setDragging(!0)), requestAnimationFrame(this.mouseDraggingOnFrame.bind(this))) : requestAnimationFrame(this.mouseMoveOnFrame.bind(this));
868
875
  }
869
876
  onMouseUp(e) {
870
- this.mouseEvent = e, this.dragging && requestAnimationFrame(this.mouseDraggingEndOnFrame.bind(this)), this.mouseDown = !1, this.dragging = !1;
877
+ this.mouseEvent = e, this.dragging && requestAnimationFrame(this.mouseDraggingEndOnFrame.bind(this)), this.mouseDown = !1, this.dragging = !1, this.tableScope.setDragging(!1);
871
878
  }
872
879
  mouseDraggingOnFrame() {
873
880
  var e;
874
881
  if (this.mouseEvent) {
875
882
  const t = this.tableScope.createGeMouseEvent(this.mouseEvent);
876
- (e = this.startMouseEvent) != null && e.originalEvent && (t.draggingX = this.mouseEvent.clientX - this.startMouseEvent.originalEvent.clientX, t.draggingY = this.mouseEvent.clientY - this.startMouseEvent.originalEvent.clientY), this.tableScope.mouseDraggingOnFrame(t);
883
+ (e = this.startMouseEvent) != null && e.originalEvent && (t.draggingX = this.mouseEvent.clientX - this.startMouseEvent.originalEvent.clientX, t.draggingY = this.mouseEvent.clientY - this.startMouseEvent.originalEvent.clientY), this.tableScope.mouseDraggingOnFrame(t, this.startMouseEvent);
877
884
  }
878
885
  }
879
886
  mouseDraggingEndOnFrame() {
@@ -890,7 +897,7 @@ class _e {
890
897
  }
891
898
  }
892
899
  }
893
- class je {
900
+ class qe {
894
901
  constructor(e) {
895
902
  this.tableScope = e;
896
903
  }
@@ -996,8 +1003,86 @@ class je {
996
1003
  repaint() {
997
1004
  this.tableScope.repaint();
998
1005
  }
1006
+ /**
1007
+ * Repaints the table scope with hard repaint.
1008
+ * Repaints the UI by resetting the size of the wrapper div,
1009
+ * adjusting the containers and rows, and performing additional adjustments
1010
+ * after scrolling.
1011
+ *
1012
+ * @return {void}
1013
+ */
1014
+ repaintHard() {
1015
+ this.tableScope.repaintHard();
1016
+ }
1017
+ /**
1018
+ * Clears the current selection of the table.
1019
+ * The table will be rendered automatically.
1020
+ *
1021
+ * @returns {void}
1022
+ */
1023
+ clearSelection() {
1024
+ this.tableScope.clearSelection(!0);
1025
+ }
1026
+ /**
1027
+ * Sets the selection model for the table scope.
1028
+ *
1029
+ * @param {SelectionModel} sm - The selection model to be set.
1030
+ * @param {boolean} [repaint=true] - Indicates whether the table should be repainted after setting the selection model. Default value is true.
1031
+ *
1032
+ * @return {void}
1033
+ */
1034
+ setSelectionModel(e, t = !0) {
1035
+ this.tableScope.setSelectionModel(e, t);
1036
+ }
1037
+ /**
1038
+ * Triggers the action with the given action ID.
1039
+ * This function can be invoked programmatically.
1040
+ *
1041
+ * @param {ActionId} actionId - The ID of the action to trigger.
1042
+ * @return {void}
1043
+ */
1044
+ triggerAction(e) {
1045
+ this.tableScope.onActionTriggered(e);
1046
+ }
1047
+ /**
1048
+ * Retrieves the mapping of shortcuts to corresponding action in the current table scope.
1049
+ *
1050
+ * @return {ShortcutActionIdMapping} The mapping of shortcuts to corresponding action.
1051
+ */
1052
+ getShortcutActionMapping() {
1053
+ return this.tableScope.shortcutService.getShortcutActionMapping();
1054
+ }
1055
+ /**
1056
+ * Copies the selected data from the table to the clipboard.
1057
+ *
1058
+ * @return {Promise<string>} - A promise that resolves with the copied data as a string.
1059
+ */
1060
+ copyToClipboard() {
1061
+ return this.tableScope.copyService.copyToClipboard(
1062
+ this.tableScope.tableModel,
1063
+ this.tableScope.selectionModel(),
1064
+ this.tableScope.focusModel()
1065
+ );
1066
+ }
1067
+ /**
1068
+ * Retrieves the current scope of the table.
1069
+ *
1070
+ * @returns {TableScope} The current scope of the table.
1071
+ */
1072
+ getTableScope() {
1073
+ return this.tableScope;
1074
+ }
1075
+ /**
1076
+ * Retrieves the selection model of the table.
1077
+ *
1078
+ * @return {SelectionModelIf | undefined} The selection model of the table,
1079
+ * or undefined if no selection model is available.
1080
+ */
1081
+ getSelectionModel() {
1082
+ return this.tableScope.selectionModel();
1083
+ }
999
1084
  }
1000
- class le {
1085
+ class de {
1001
1086
  constructor(e) {
1002
1087
  this.getStorageKeyFn = e;
1003
1088
  }
@@ -1005,12 +1090,12 @@ class le {
1005
1090
  const t = {};
1006
1091
  if (e instanceof Map) {
1007
1092
  const s = e;
1008
- for (const i of [...s]) {
1093
+ for (const o of [...s]) {
1009
1094
  const [
1010
- o,
1011
- r
1012
- ] = i;
1013
- t[o] = r;
1095
+ i,
1096
+ l
1097
+ ] = o;
1098
+ t[i] = l;
1014
1099
  }
1015
1100
  }
1016
1101
  return t;
@@ -1018,14 +1103,14 @@ class le {
1018
1103
  checkAndPersistItem(e, t) {
1019
1104
  const s = this.getStorageKeyFn;
1020
1105
  if (s) {
1021
- const i = s();
1022
- if (i) {
1023
- const o = i + e;
1106
+ const o = s();
1107
+ if (o) {
1108
+ const i = o + e;
1024
1109
  if ((t + "").includes("Map")) {
1025
- const r = this.autoConvertMapToObject(t);
1026
- this.persistItem(o, r);
1110
+ const l = this.autoConvertMapToObject(t);
1111
+ this.persistItem(i, l);
1027
1112
  } else
1028
- this.persistItem(o, t);
1113
+ this.persistItem(i, t);
1029
1114
  }
1030
1115
  }
1031
1116
  }
@@ -1072,7 +1157,7 @@ class le {
1072
1157
  // }
1073
1158
  // }
1074
1159
  }
1075
- class Xe extends le {
1160
+ class Je extends de {
1076
1161
  constructor(e) {
1077
1162
  super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
1078
1163
  }
@@ -1088,20 +1173,20 @@ class Xe extends le {
1088
1173
  const t = e();
1089
1174
  if (t) {
1090
1175
  const s = t + this.SCROLL_STATE;
1091
- let i = this.loadFromLocalStorage(s);
1092
- this.scrollOffset = i || [0, 0];
1176
+ let o = this.loadFromLocalStorage(s);
1177
+ this.scrollOffset = o || [0, 0];
1093
1178
  }
1094
1179
  }
1095
1180
  }
1096
1181
  }
1097
- class Ke {
1098
- constructor(e = "collapsed", t = [], s = !1, i = !1) {
1099
- this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = i;
1182
+ class Qe {
1183
+ constructor(e = "collapsed", t = [], s = !1, o = !1) {
1184
+ this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = o;
1100
1185
  }
1101
1186
  }
1102
- class ze extends le {
1187
+ class Ze extends de {
1103
1188
  constructor(e) {
1104
- super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Ke(), this.load();
1189
+ super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Qe(), this.load();
1105
1190
  }
1106
1191
  collapsedExpandedStateGet() {
1107
1192
  return this.collapsedExpandedState;
@@ -1124,8 +1209,8 @@ class ze extends le {
1124
1209
  if (e) {
1125
1210
  const t = e();
1126
1211
  if (t) {
1127
- const s = t + this.COLLAPSED_EXPANDED_STATE, i = this.loadFromLocalStorage(s);
1128
- i && (this.collapsedExpandedState = i);
1212
+ const s = t + this.COLLAPSED_EXPANDED_STATE, o = this.loadFromLocalStorage(s);
1213
+ o && (this.collapsedExpandedState = o);
1129
1214
  }
1130
1215
  }
1131
1216
  }
@@ -1133,7 +1218,7 @@ class ze extends le {
1133
1218
  this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
1134
1219
  }
1135
1220
  }
1136
- class Ye extends le {
1221
+ class et extends de {
1137
1222
  constructor(e) {
1138
1223
  super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
1139
1224
  }
@@ -1148,68 +1233,69 @@ class Ye extends le {
1148
1233
  if (e) {
1149
1234
  const t = e();
1150
1235
  if (t) {
1151
- const s = t + this.SORTING_STATE;
1152
- let i = this.loadFromLocalStorage(s);
1153
- this.sortItems = i || [];
1236
+ const s = t + this.SORTING_STATE, o = this.loadFromLocalStorage(s);
1237
+ this.sortItems = o || [];
1154
1238
  }
1155
1239
  }
1156
1240
  }
1157
1241
  }
1158
1242
  class O {
1159
- constructor(e = 0, t = 0, s = 0, i = 0, o) {
1160
- this.left = e, this.width = t, this.height = s, this.top = i, this.index = o;
1243
+ constructor(e = 0, t = 0, s = 0, o = 0, i) {
1244
+ this.left = e, this.width = t, this.height = s, this.top = o, this.index = i;
1161
1245
  }
1162
1246
  }
1163
- class Ue {
1164
- constructor(e, t, s, i) {
1165
- this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = i, this.scrollTop = 0, this.areaBodyWestGeo = new O(), this.areaBodyCenterGeo = new O(), this.areaBodyEastGeo = new O();
1166
- const o = this.hostElement;
1167
- o.innerText = "", this.dom.setAttribute(o, "tabindex", "0"), this.dom.setStyle(
1168
- this.dom.addClass("ge-table", o),
1247
+ class tt {
1248
+ constructor(e, t, s, o) {
1249
+ this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new O(), this.areaBodyCenterGeo = new O(), this.areaBodyEastGeo = new O();
1250
+ const i = this.hostElement;
1251
+ i.innerText = "", this.dom.setAttribute(i, "tabindex", "0"), this.dom.setStyle(
1252
+ this.dom.addClass("ge-table", i),
1169
1253
  "position",
1170
1254
  "relative"
1171
1255
  ), this.hoverRow = s.applyStylePosistionAbsolute(
1172
- s.createDivWithClass("ge-table-hover-row", o)
1256
+ s.createDivWithClass("ge-table-hover-row", i)
1173
1257
  ), this.hoverColumn = s.applyStylePosistionAbsolute(
1174
- s.createDivWithClass("ge-table-hover-column", o)
1258
+ s.createDivWithClass("ge-table-hover-column", i)
1259
+ ), this.draggingColumn = s.applyStylePosistionAbsolute(
1260
+ s.createDivWithClass("ge-table-dragging-column", i)
1175
1261
  ), this.areaHeaderWest = s.appendRelativeChildDiv(
1176
1262
  s.applyStylePosistionAbsolute(
1177
- s.createAreaDivWithClass("ge-table-header ge-table-header-west", o, "header", "west")
1263
+ s.createAreaDivWithClass("ge-table-header ge-table-header-west", i, "header", "west")
1178
1264
  )
1179
1265
  ), this.areaHeaderCenter = s.appendRelativeChildDiv(
1180
1266
  s.applyStylePosistionAbsolute(
1181
- s.createAreaDivWithClass("ge-table-header ge-table-header-center", o, "header", "center")
1267
+ s.createAreaDivWithClass("ge-table-header ge-table-header-center", i, "header", "center")
1182
1268
  )
1183
1269
  ), this.areaHeaderEast = s.appendRelativeChildDiv(
1184
1270
  s.applyStylePosistionAbsolute(
1185
- s.createAreaDivWithClass("ge-table-header ge-table-header-east", o, "body", "east")
1271
+ s.createAreaDivWithClass("ge-table-header ge-table-header-east", i, "body", "east")
1186
1272
  )
1187
1273
  ), this.areaBodyWest = s.appendRelativeChildDiv(
1188
1274
  s.applyStylePosistionAbsolute(
1189
- s.createAreaDivWithClass("ge-table-body ge-table-body-west", o, "body", "west")
1275
+ s.createAreaDivWithClass("ge-table-body ge-table-body-west", i, "body", "west")
1190
1276
  )
1191
1277
  ), this.areaBodyEast = s.appendRelativeChildDiv(
1192
1278
  s.applyStylePosistionAbsolute(
1193
- s.createAreaDivWithClass("ge-table-body ge-table-body-east", o, "body", "east")
1279
+ s.createAreaDivWithClass("ge-table-body ge-table-body-east", i, "body", "east")
1194
1280
  )
1195
1281
  ), this.areaFooterWest = s.appendRelativeChildDiv(
1196
1282
  s.applyStylePosistionAbsolute(
1197
- s.createAreaDivWithClass("ge-table-footer ge-table-footer-west", o, "footer", "west")
1283
+ s.createAreaDivWithClass("ge-table-footer ge-table-footer-west", i, "footer", "west")
1198
1284
  )
1199
1285
  ), this.areaFooterCenter = s.appendRelativeChildDiv(
1200
1286
  s.applyStylePosistionAbsolute(
1201
- s.createAreaDivWithClass("ge-table-footer ge-table-footer-center", o, "footer", "center")
1287
+ s.createAreaDivWithClass("ge-table-footer ge-table-footer-center", i, "footer", "center")
1202
1288
  )
1203
1289
  ), this.areaFooterEast = s.appendRelativeChildDiv(
1204
1290
  s.applyStylePosistionAbsolute(
1205
- s.createAreaDivWithClass("ge-table-footer ge-table-footer-east", o, "footer", "east")
1291
+ s.createAreaDivWithClass("ge-table-footer ge-table-footer-east", i, "footer", "east")
1206
1292
  )
1207
1293
  ), this.scrollViewport = s.applyStyleOverflowAuto(
1208
1294
  this.tableOptions.overflowX ?? "auto",
1209
1295
  this.tableOptions.overflowY ?? "auto",
1210
1296
  s.applyStyleNoPadding(
1211
1297
  s.applyStylePosistionAbsolute(
1212
- s.createAreaDivWithClass("ge-table-scroll-viewport", o, "body", "center")
1298
+ s.createAreaDivWithClass("ge-table-scroll-viewport", i, "body", "center")
1213
1299
  )
1214
1300
  )
1215
1301
  ), this.contentWrapperDiv = s.applyStyleNoPadding(
@@ -1223,15 +1309,20 @@ class Ue {
1223
1309
  ), this.areaBodyCenter = s.appendRelativeChildDiv(
1224
1310
  s.createDivWithClass("ge-table-body-center", this.contentDiv)
1225
1311
  ), this.borderHeaderBottom = s.applyStylePosistionAbsolute(
1226
- s.createDivWithClass("ge-table-header-border", o)
1312
+ s.createDivWithClass("ge-table-header-border", i)
1227
1313
  ), this.borderFixedWest = s.applyStylePosistionAbsolute(
1228
- s.createDivWithClass("ge-table-west-fixed-column-border", o)
1314
+ s.createDivWithClass("ge-table-west-fixed-column-border", i)
1229
1315
  ), this.borderFixedEast = s.applyStylePosistionAbsolute(
1230
- s.createDivWithClass("ge-table-east-fixed-column-border", o)
1316
+ s.createDivWithClass("ge-table-east-fixed-column-border", i)
1231
1317
  ), this.borderFooterTop = s.applyStylePosistionAbsolute(
1232
- s.createDivWithClass("ge-table-footer-border", o)
1318
+ s.createDivWithClass("ge-table-footer-border", i)
1233
1319
  );
1234
1320
  }
1321
+ /**
1322
+ * Adjusts the containers and rows of the table based on the current state.
1323
+ *
1324
+ * @return {void}
1325
+ */
1235
1326
  adjustContainersAndRows() {
1236
1327
  const e = this.tableModel.getPadding(), t = this.hostElement.clientWidth, s = this.hostElement.clientHeight;
1237
1328
  this.dom.applyStyle(this.scrollViewport, {
@@ -1304,14 +1395,27 @@ class Ue {
1304
1395
  })
1305
1396
  ) : this.dom.applyDisplayNoneStyle(this.borderFooterTop), this.adjustAfterScrolling();
1306
1397
  }
1398
+ /**
1399
+ * Adjusts the position or appearance of elements after scrolling.
1400
+ * This method must be overwritten in child classes.
1401
+ *
1402
+ * @return {void}
1403
+ */
1307
1404
  adjustAfterScrolling() {
1308
1405
  }
1406
+ /**
1407
+ * Resets the size of the wrapper div based on the content dimensions.
1408
+ *
1409
+ * @protected
1410
+ *
1411
+ * @returns {void} Returns nothing.
1412
+ */
1309
1413
  resetSizeOfWrapperDiv() {
1310
1414
  const e = `${this.tableModel.getContentWidthInPixel()}px`, t = `${this.tableModel.getContentHeightInPixel() + 1}px`;
1311
1415
  this.dom.setStyle(this.contentWrapperDiv, "width", e), this.dom.setStyle(this.contentWrapperDiv, "height", t);
1312
1416
  }
1313
1417
  }
1314
- class D {
1418
+ class A {
1315
1419
  /**
1316
1420
  * Represents a constructor for a class.
1317
1421
  * @constructor
@@ -1321,11 +1425,11 @@ class D {
1321
1425
  * @param {number} c2 - The value for c2.
1322
1426
  * @param {boolean} [gammaRange=false] - The value for gammaRange. Defaults to false. gammaRange will be used for AreaModelCellGroups, but it's not implemented yet!
1323
1427
  */
1324
- constructor(e, t, s, i, o = !1) {
1325
- this.r1 = e, this.c1 = t, this.r2 = s, this.c2 = i, this.gammaRange = o;
1428
+ constructor(e, t, s, o, i = !1) {
1429
+ this.r1 = e, this.c1 = t, this.r2 = s, this.c2 = o, this.gammaRange = i;
1326
1430
  }
1327
1431
  static create(e) {
1328
- return e.gammaRange === void 0 && (e.gammaRange = !1), new D(
1432
+ return e.gammaRange === void 0 && (e.gammaRange = !1), new A(
1329
1433
  e.rowIndex1,
1330
1434
  e.columnIndex1,
1331
1435
  e.rowIndex2,
@@ -1334,19 +1438,19 @@ class D {
1334
1438
  );
1335
1439
  }
1336
1440
  static singleCell(e, t) {
1337
- return new D(e, t, e, t);
1441
+ return new A(e, t, e, t);
1338
1442
  }
1339
1443
  static singleRow(e) {
1340
- return new D(e, 0, e, Number.MAX_SAFE_INTEGER);
1444
+ return new A(e, 0, e, Number.MAX_SAFE_INTEGER);
1341
1445
  }
1342
1446
  static singleColumn(e) {
1343
- return new D(0, e, Number.MAX_SAFE_INTEGER, e);
1447
+ return new A(0, e, Number.MAX_SAFE_INTEGER, e);
1344
1448
  }
1345
1449
  isInRange(e, t) {
1346
1450
  return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
1347
1451
  }
1348
1452
  }
1349
- class qe {
1453
+ class st {
1350
1454
  constructor(e, t) {
1351
1455
  this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
1352
1456
  }
@@ -1356,13 +1460,13 @@ class qe {
1356
1460
  this.colAndRowspanRanges = [];
1357
1461
  const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
1358
1462
  for (let s = 0; s < e; s++)
1359
- for (let i = 0; i < t; i++) {
1360
- let o = this.areaModel.getColspanAt(s, i), r = this.areaModel.getRowspanAt(s, i);
1361
- if (o > 1 || r > 1) {
1362
- o === 0 && (o = 1), r === 0 && (r = 1);
1363
- const n = this.areaModel.hasOwnProperty("gammaCells");
1463
+ for (let o = 0; o < t; o++) {
1464
+ let i = this.areaModel.getColspanAt(s, o), l = this.areaModel.getRowspanAt(s, o);
1465
+ if (i > 1 || l > 1) {
1466
+ i === 0 && (i = 1), l === 0 && (l = 1);
1467
+ const n = "gammaCells" in this.areaModel;
1364
1468
  this.colAndRowspanRanges.push(
1365
- new D(s, i, s + r - 1, i + o - 1, n)
1469
+ new A(s, o, s + l - 1, o + i - 1, n)
1366
1470
  );
1367
1471
  }
1368
1472
  }
@@ -1379,51 +1483,91 @@ class qe {
1379
1483
  return !1;
1380
1484
  }
1381
1485
  }
1382
- class Je {
1486
+ class ot {
1383
1487
  constructor(e, t, s) {
1384
1488
  this.header = e, this.body = t, this.footer = s;
1385
1489
  }
1386
1490
  }
1387
- class Qe extends Ue {
1388
- constructor(e, t, s, i) {
1389
- var r, n;
1390
- super(e, t, s, i), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
1491
+ class it extends tt {
1492
+ constructor(e, t, s, o) {
1493
+ var l, n;
1494
+ super(e, t, s, o), this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
1391
1495
  header: [],
1392
1496
  body: [],
1393
1497
  footer: []
1394
- }, this.tree = !1, this.colAndRowspanModels = new Je(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.editing = !1, this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (n = this.tableOptions) != null && n.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), te(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
1498
+ }, this.tree = !1, this.colAndRowspanModels = new ot(), this.firstVisibleRowIndex = -1, 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), le(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
1395
1499
  (a) => {
1396
- var h;
1397
- this.colAndRowspanModels[a] = new qe(t, t.getAreaModel(a)), (h = this.colAndRowspanModels[a]) == null || h.init();
1500
+ var c;
1501
+ this.colAndRowspanModels[a] = new st(t, t.getAreaModel(a)), (c = this.colAndRowspanModels[a]) == null || c.init();
1398
1502
  }
1399
1503
  );
1400
1504
  }
1401
1505
  isEditing() {
1402
1506
  return this.editing;
1403
1507
  }
1508
+ /**
1509
+ * Resets the editor renderer by clearing its values and state.
1510
+ *
1511
+ * @function resetEditorRenderer
1512
+ * @memberof ClassName
1513
+ *
1514
+ * @returns {void}
1515
+ */
1404
1516
  resetEditorRenderer() {
1405
1517
  this.editorRenderer = void 0, this.editorRendererRow = -1, this.editorRendererColumn = -1, this.editing = !1;
1406
1518
  }
1407
- clearSelection() {
1519
+ /**
1520
+ * Clears the selection in the component.
1521
+ *
1522
+ * @param {boolean} rerender - Indicates whether to rerender the component after clearing the selection. Default value is false.
1523
+ *
1524
+ * @return {void}
1525
+ */
1526
+ clearSelection(e = !1) {
1408
1527
  if (this.getSelectionModel) {
1409
- const e = this.getSelectionModel();
1410
- e == null || e.clear();
1528
+ const t = this.getSelectionModel();
1529
+ t == null || t.clear(), e && this.repaint();
1411
1530
  }
1412
1531
  }
1532
+ /**
1533
+ * Initializes and renders the editor for a specified row and column index.
1534
+ *
1535
+ * @param {number} rowIdx - The index of the row.
1536
+ * @param {number} colIdx - The index of the column.
1537
+ */
1413
1538
  initRenderEditor(e, t) {
1414
- var i;
1415
- let s = (i = this.tableModel.getColumnDef(t)) == null ? void 0 : i.getEditRenderer;
1539
+ var o;
1540
+ let s = (o = this.tableModel.getColumnDef(t)) == null ? void 0 : o.getEditRenderer;
1416
1541
  if (s || (s = this.tableOptions.getEditRenderer), s)
1417
1542
  if (this.editorRenderer = s(e, t), this.editorRenderer) {
1418
1543
  this.editorRendererRow = e, this.editorRendererColumn = t, this.editing = !0, this.repaint();
1419
- const o = document.querySelector("input.ge-table-cell-editor-input");
1420
- o && o.focus();
1544
+ const i = document.querySelector("input.ge-table-cell-editor-input");
1545
+ i && i.focus();
1421
1546
  } else
1422
1547
  this.resetEditorRenderer();
1423
1548
  }
1549
+ /**
1550
+ * Adjusts the content after scrolling and initiates a repaint of the component.
1551
+ *
1552
+ * @return {void}
1553
+ */
1424
1554
  repaint() {
1425
1555
  this.adjustAfterScrolling();
1426
1556
  }
1557
+ /**
1558
+ * Repaints the UI by resetting the size of the wrapper div,
1559
+ * adjusting the containers and rows, and performing additional adjustments
1560
+ * after scrolling.
1561
+ *
1562
+ * @return {void} This method does not return any value.
1563
+ */
1564
+ repaintHard() {
1565
+ this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows(), this.adjustAfterScrolling();
1566
+ }
1567
+ /**
1568
+ * Adjusts the table after scrolling. This method performs various adjustments
1569
+ * to the table's appearance and behavior after a scroll event occurs.
1570
+ */
1427
1571
  adjustAfterScrolling() {
1428
1572
  var e;
1429
1573
  for (const t of this.removables)
@@ -1446,10 +1590,23 @@ class Qe extends Ue {
1446
1590
  "ge-table-body-west-vertical-border"
1447
1591
  ));
1448
1592
  }
1593
+ /**
1594
+ * Checks if the scroll position should be saved and saves it.
1595
+ *
1596
+ * @return {void}
1597
+ */
1449
1598
  checkForScrollPosSaving() {
1450
1599
  var e, t;
1451
1600
  this.storeScrollPosStateService && ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.autoRestoreScrollPosition) && this.storeScrollPosStateService.updateScrollOffset([this.scrollLeft, this.scrollTop]);
1452
1601
  }
1602
+ /**
1603
+ * Updates the cells in the table with the provided values and optionally repaints all cells.
1604
+ *
1605
+ * @param {TableCellUpdateEventIf[]} events - The array of events containing information about the cells to update.
1606
+ * @param {boolean} repaintAll - Optional. If true, repaints all cells after updating. Defaults to false.
1607
+ *
1608
+ * @returns {void}
1609
+ */
1453
1610
  updateCells(e, t = !1) {
1454
1611
  e.forEach(
1455
1612
  (s) => {
@@ -1457,6 +1614,45 @@ class Qe extends Ue {
1457
1614
  }
1458
1615
  ), t && this.repaint();
1459
1616
  }
1617
+ /**
1618
+ * Rerenders the content of a table cell based on the given parameters.
1619
+ *
1620
+ * @param {TableCellUpdateEventIf} area - The area of the table.
1621
+ * @param {number} rowIndex - The index of the row.
1622
+ * @param {number} columnIndex - The index of the column.
1623
+ * @param {any} value - The new value to be displayed in the cell.
1624
+ * @param {string[]} cssClasses - An array of CSS classes to be applied to the cell.
1625
+ */
1626
+ rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: o, cssClasses: i }) {
1627
+ const l = this.tableModel.getAreaModel(e), n = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', a = document.querySelector(n);
1628
+ if (a) {
1629
+ let c;
1630
+ const h = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s ? this.editorRenderer : l.getCellRenderer(t, s);
1631
+ if (a.innerText = "", this.applyCssClasses(a, i), h)
1632
+ c = h.render(a, t, s, e, l, o, this.dom.domService), c && this.cleanupFunctions[e].push(c);
1633
+ else {
1634
+ const b = `${o}`;
1635
+ this.dom.addLabelDiv(a, b, !1, t, s, e);
1636
+ }
1637
+ const g = l.getCustomClassesAt(t, s);
1638
+ g.length && this.dom.addClasses(g, a);
1639
+ const f = l.getCustomStyleAt(t, s);
1640
+ if (f)
1641
+ for (const b in f)
1642
+ this.dom.setStyle(a, b, f[b]);
1643
+ }
1644
+ }
1645
+ /**
1646
+ * Stores the widths of all columns in the table.
1647
+ *
1648
+ * @protected
1649
+ * @function storeColumnWidths
1650
+ * @returns {void}
1651
+ */
1652
+ storeColumnWidths() {
1653
+ const e = this.tableModel.getColumnDefs();
1654
+ e != null && e.length && (this.storedColumnWidths = e.map((t, s) => this.tableModel.getColumnWidth(s)));
1655
+ }
1460
1656
  getAreaAndSideIdentByAttr(e) {
1461
1657
  if (e) {
1462
1658
  const t = this.getStringByAttr(e, "data-area"), s = this.getStringByAttr(e, "data-side");
@@ -1465,6 +1661,15 @@ class Qe extends Ue {
1465
1661
  }
1466
1662
  return [void 0, void 0];
1467
1663
  }
1664
+ /**
1665
+ * Retrieves the specified area from the grid layout.
1666
+ *
1667
+ * @param {string} areaIdent - The identifier for the area ('header', 'body', or 'footer').
1668
+ * @param {string} sideIdent - The identifier for the side of the area ('west', 'center', or 'east').
1669
+ * @protected
1670
+ * @returns {HTMLElement} - The requested area element.
1671
+ * @throws {Error} - If the area identifier or side identifier is incorrect.
1672
+ */
1468
1673
  getArea(e, t) {
1469
1674
  if (e === "header") {
1470
1675
  if (t === "west")
@@ -1490,110 +1695,140 @@ class Qe extends Ue {
1490
1695
  }
1491
1696
  throw Error(`Wrong area identifier: row:${e}, col:${t}`);
1492
1697
  }
1698
+ /**
1699
+ * Adjusts the body of the table.
1700
+ *
1701
+ * @protected
1702
+ * @return {void}
1703
+ */
1493
1704
  adjustBody() {
1494
1705
  const e = this.areaBodyCenterGeo.height - this.tableModel.getContentHeightInPixel(), t = this.scrollFactorY * e;
1495
1706
  this.dom.setStyle(this.contentDiv, "top", `${this.scrollTop}px`), this.dom.setStyle(this.contentDiv, "left", `${this.scrollViewport.scrollLeft}px`), this.adjustArea("body", t);
1496
1707
  }
1708
+ /**
1709
+ * Returns a number value extracted from the specified attribute of the source element.
1710
+ *
1711
+ * @param {HTMLElement} srcElement - The source element from which to extract the attribute value.
1712
+ * @param {string} key - The attribute key to extract the value from.
1713
+ * @returns {number} - The extracted number value, or -1 if the attribute was not found or not a valid number.
1714
+ * @protected
1715
+ */
1497
1716
  getNumberByAttr(e, t) {
1498
1717
  var s;
1499
1718
  if (e) {
1500
- const i = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
1501
- if (i)
1502
- return Number(i);
1719
+ const o = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
1720
+ if (o)
1721
+ return Number(o);
1503
1722
  }
1504
1723
  return -1;
1505
1724
  }
1725
+ /**
1726
+ * Retrieves the value of the specified attribute from the nearest ancestor element that has the attribute.
1727
+ *
1728
+ * @param {HTMLElement} srcElement - The source element from which to start searching for the nearest ancestor element.
1729
+ * @param {string} key - The name of the attribute to retrieve.
1730
+ * @returns {string} The value of the specified attribute, or an empty string if the attribute is not found.
1731
+ * @protected
1732
+ */
1506
1733
  getStringByAttr(e, t) {
1507
1734
  var s;
1508
1735
  if (e) {
1509
- const i = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
1510
- if (i)
1511
- return i;
1736
+ const o = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
1737
+ if (o)
1738
+ return o;
1512
1739
  }
1513
1740
  return "";
1514
1741
  }
1742
+ /**
1743
+ * Adjusts the layout and positioning of the specified area in the table.
1744
+ * This method is used internally and should not be called directly.
1745
+ *
1746
+ * @param {AreaIdent} areaIdent - The identifier of the area to adjust (e.g. header, body, footer).
1747
+ * @param {number} [yStart=0] - The starting y-position for the layout adjustments.
1748
+ * @protected
1749
+ */
1515
1750
  adjustArea(e, t = 0) {
1516
- var S;
1517
- const s = this.getArea(e, "west"), i = this.getArea(e, "center"), o = this.getArea(e, "east"), r = i.child.clientHeight;
1518
- s.child.innerText = "", i.child.innerText = "", o.child.innerText = "";
1519
- const n = 0, a = this.areaBodyCenterGeo.width, h = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e), c = d.getRowCount();
1751
+ var p;
1752
+ const s = this.getArea(e, "west"), o = this.getArea(e, "center"), i = this.getArea(e, "east"), l = o.child.clientHeight;
1753
+ s.child.innerText = "", o.child.innerText = "", i.child.innerText = "";
1754
+ const n = 0, a = this.areaBodyCenterGeo.width, c = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e), h = d.getRowCount();
1520
1755
  for (; this.cleanupFunctions[e].length; ) {
1521
- const f = this.cleanupFunctions[e].shift();
1522
- f && f();
1523
- }
1524
- let p = t;
1525
- const g = this.tableModel.getColumnCount(), u = this.tableModel.getFixedRightColumnCount(), m = this.tableModel.getFixedLeftColumnCount();
1526
- for (let f = 0; f < c; f++) {
1527
- const M = p, C = f === c - 1, E = this.tableModel.getRowHeight(e, f);
1528
- if (M + E > 0) {
1529
- this.firstVisibleRowIndex = f;
1530
- let v = { left: n, width: a, height: E, top: M, index: f }, w = this.dom.addRowDiv(i, v, f, e, "center");
1531
- const R = m;
1756
+ const u = this.cleanupFunctions[e].shift();
1757
+ u && u();
1758
+ }
1759
+ let g = t;
1760
+ const f = this.tableModel.getColumnCount(), b = this.tableModel.getFixedRightColumnCount(), S = this.tableModel.getFixedLeftColumnCount();
1761
+ for (let u = 0; u < h; u++) {
1762
+ const v = g, C = u === h - 1, E = this.tableModel.getRowHeight(e, u);
1763
+ if (v + E > 0) {
1764
+ this.firstVisibleRowIndex = u;
1765
+ let y = { left: n, width: a, height: E, top: v, index: u }, m = this.dom.addRowDiv(o, y, u, e, "center");
1766
+ const k = S;
1532
1767
  if (this.adjustColumnsToRowParent({
1533
1768
  areaIdent: e,
1534
1769
  sideIdent: "center",
1535
1770
  areaModel: d,
1536
- geo: v,
1537
- parent: w,
1538
- rowIndex: f,
1539
- columnIndexStart: R,
1540
- columnIndexEnd: g - u - 1,
1771
+ geo: y,
1772
+ parent: m,
1773
+ rowIndex: u,
1774
+ columnIndexStart: k,
1775
+ columnIndexEnd: f - b - 1,
1541
1776
  verticalFixed: !1,
1542
1777
  lastRowOfModel: C
1543
- }), h.left > 0 && (v = { left: n, width: this.areaBodyWestGeo.width, height: E, top: M, index: f }, w = this.dom.addRowDiv(s, v, f, e, "west"), this.adjustColumnsToRowParent({
1778
+ }), c.left > 0 && (y = { left: n, width: this.areaBodyWestGeo.width, height: E, top: v, index: u }, m = this.dom.addRowDiv(s, y, u, e, "west"), this.adjustColumnsToRowParent({
1544
1779
  areaIdent: e,
1545
1780
  sideIdent: "west",
1546
1781
  areaModel: d,
1547
- geo: v,
1548
- parent: w,
1549
- rowIndex: f,
1782
+ geo: y,
1783
+ parent: m,
1784
+ rowIndex: u,
1550
1785
  columnIndexStart: 0,
1551
- columnIndexEnd: R - 1,
1786
+ columnIndexEnd: k - 1,
1552
1787
  verticalFixed: !0,
1553
1788
  lastRowOfModel: C
1554
- })), h.right > 0 && (v = { left: n, width: this.areaBodyEastGeo.width, height: E, top: M, index: f }, w = this.dom.addRowDiv(o, v, f, e, "east"), this.adjustColumnsToRowParent({
1789
+ })), c.right > 0 && (y = { left: n, width: this.areaBodyEastGeo.width, height: E, top: v, index: u }, m = this.dom.addRowDiv(i, y, u, e, "east"), this.adjustColumnsToRowParent({
1555
1790
  areaIdent: e,
1556
1791
  sideIdent: "east",
1557
1792
  areaModel: d,
1558
- geo: v,
1559
- parent: w,
1560
- rowIndex: f,
1561
- columnIndexStart: g - u,
1562
- columnIndexEnd: g - 1,
1793
+ geo: y,
1794
+ parent: m,
1795
+ rowIndex: u,
1796
+ columnIndexStart: f - b,
1797
+ columnIndexEnd: f - 1,
1563
1798
  verticalFixed: !0,
1564
1799
  lastRowOfModel: C
1565
- })), e === "header" && this.tree && f === c - 1) {
1800
+ })), e === "header" && this.tree && u === h - 1) {
1566
1801
  const T = this.dom.applyStyle(
1567
1802
  this.dom.setAttribute(
1568
- this.dom.addDiv(w, new O(16, 20, 20, 8)),
1803
+ this.dom.addDiv(m, new O(16, 20, 20, 8)),
1569
1804
  "data-ge-action",
1570
1805
  "toggleExpandCollapseAll"
1571
1806
  ),
1572
1807
  { cursor: "pointer" }
1573
- ), I = this.tableOptions.treeOptions.arrowExpandCollapseAll;
1574
- if (I) {
1575
- const G = this.dom.domService.createText(I.content);
1576
- this.dom.domService.appendChild(T, G), I.style && this.dom.applyStyleString(T, I.style);
1808
+ ), D = this.tableOptions.treeOptions.arrowExpandCollapseAll;
1809
+ if (D) {
1810
+ const _ = this.dom.domService.createText(D.content);
1811
+ this.dom.domService.appendChild(T, _), D.style && this.dom.applyStyleString(T, D.style);
1577
1812
  }
1578
1813
  }
1579
1814
  }
1580
- if (p = p + E, p > r)
1815
+ if (g = g + E, g > l)
1581
1816
  break;
1582
1817
  }
1583
1818
  if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
1584
- const f = ((S = this.colAndRowspanModels[e]) == null ? void 0 : S.getRanges()) ?? [];
1585
- if (f.length)
1586
- for (const M of f) {
1587
- let C = 0, E = i.child, v = "center";
1588
- if (M.c1 < m)
1589
- E = s.child, v = "west";
1590
- else if (u > 0 && M.c1 >= g - u)
1591
- E = o.child, v = "east";
1819
+ const u = ((p = this.colAndRowspanModels[e]) == null ? void 0 : p.getRanges()) ?? [];
1820
+ if (u.length)
1821
+ for (const v of u) {
1822
+ let C = 0, E = o.child, y = "center";
1823
+ if (v.c1 < S)
1824
+ E = s.child, y = "west";
1825
+ else if (b > 0 && v.c1 >= f - b)
1826
+ E = i.child, y = "east";
1592
1827
  else {
1593
- const w = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1594
- C = this.scrollFactorX * w - this.areaBodyWestGeo.width, v = "center";
1828
+ const m = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1829
+ C = this.scrollFactorX * m - this.areaBodyWestGeo.width, y = "center";
1595
1830
  }
1596
- this.drawBigCell(M, C, t, d, E, v);
1831
+ this.drawBigCell(v, C, t, d, E, y);
1597
1832
  }
1598
1833
  }
1599
1834
  }
@@ -1607,128 +1842,153 @@ class Qe extends Ue {
1607
1842
  * @param sideIdent SideIdent (west,center,east)
1608
1843
  * @protected
1609
1844
  */
1610
- drawBigCell(e, t, s, i, o, r) {
1611
- const n = s + this.getRowHeights(0, e.r1 - 1, i).reduce((S, f) => S + f, 0), a = this.tableModel.getColumnCount(), h = this.tableModel.getFixedRightColumnCount();
1845
+ drawBigCell(e, t, s, o, i, l) {
1846
+ const n = s + this.getRowHeights(0, e.r1 - 1, o).reduce((p, u) => p + u, 0), a = this.tableModel.getColumnCount(), c = this.tableModel.getFixedRightColumnCount();
1612
1847
  let d = 0;
1613
- h > 0 && e.c1 >= a - h && (d = a - h);
1614
- const c = t + this.getColumnWidths(d, e.c1 - 1).reduce((S, f) => S + f, 0), p = this.getRowHeights(e.r1, e.r2, i).reduce((S, f) => S + f, 0), g = this.getColumnWidths(e.c1, e.c2).reduce((S, f) => S + f, 0);
1615
- let u = !1;
1616
- const m = this.getSelectionModel ? this.getSelectionModel() : void 0;
1617
- m && (u = m.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? (console.info("TODO here", e), this.renderCell({
1618
- areaModel: i,
1619
- areaIdent: i.areaIdent,
1620
- sideIdent: r,
1848
+ c > 0 && e.c1 >= a - c && (d = a - c);
1849
+ const h = t + this.getColumnWidths(d, e.c1 - 1).reduce((p, u) => p + u, 0), g = this.getRowHeights(e.r1, e.r2, o).reduce((p, u) => p + u, 0), f = this.getColumnWidths(e.c1, e.c2).reduce((p, u) => p + u, 0);
1850
+ let b = !1;
1851
+ const S = this.getSelectionModel ? this.getSelectionModel() : void 0;
1852
+ S && (b = S.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
1853
+ areaModel: o,
1854
+ areaIdent: o.areaIdent,
1855
+ sideIdent: l,
1621
1856
  rowIndex: e.r1,
1622
1857
  columnIndex: e.c1,
1623
- left: c,
1858
+ left: h,
1624
1859
  top: n,
1625
- width: g,
1626
- height: p,
1627
- parent: o,
1628
- cellSelected: u,
1860
+ width: f,
1861
+ height: g,
1862
+ parent: i,
1863
+ cellSelected: b,
1629
1864
  lastRowOfModel: !0,
1630
1865
  gammaRange: e.gammaRange
1631
- })) : this.renderCell({
1632
- areaModel: i,
1633
- areaIdent: i.areaIdent,
1634
- sideIdent: r,
1866
+ }) : this.renderCell({
1867
+ areaModel: o,
1868
+ areaIdent: o.areaIdent,
1869
+ sideIdent: l,
1635
1870
  rowIndex: e.r1,
1636
1871
  columnIndex: e.c1,
1637
- left: c,
1872
+ left: h,
1638
1873
  top: n,
1639
- width: g,
1640
- height: p,
1641
- parent: o,
1642
- cellSelected: u,
1874
+ width: f,
1875
+ height: g,
1876
+ parent: i,
1877
+ cellSelected: b,
1643
1878
  lastRowOfModel: !0,
1644
1879
  gammaRange: e.gammaRange
1645
- }), i.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1880
+ }), o.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1646
1881
  rowIndex: e.r1,
1647
1882
  columnIndex: e.c1,
1648
- cellLeft: c,
1883
+ cellLeft: h,
1649
1884
  cellTop: n,
1650
- cellWidth: g,
1651
- cellHeight: p,
1652
- parent: o
1885
+ cellWidth: f,
1886
+ cellHeight: g,
1887
+ parent: i
1653
1888
  });
1654
1889
  }
1890
+ /**
1891
+ * Finds the row index of an important rowspan cell in a given area model.
1892
+ *
1893
+ * @param {AreaModelIf} areaModel - The area model to search in.
1894
+ * @param {number} rowIndex - The current row index.
1895
+ * @param {number} colIndex - The current column index.
1896
+ * @returns {number} - The row index of the important rowspan cell, or -1 if not found.
1897
+ * @protected
1898
+ */
1655
1899
  findRowOfImportantRowspanCell(e, t, s) {
1656
- const i = e.getMaxRowspan();
1657
- for (let o = t - 1; o > -1; o--) {
1658
- const r = e.getRowspanAt(o, s);
1659
- if (r > 1 && o + r + 1 >= t)
1660
- return o;
1661
- if (t - o > i)
1900
+ const o = e.getMaxRowspan();
1901
+ for (let i = t - 1; i > -1; i--) {
1902
+ const l = e.getRowspanAt(i, s);
1903
+ if (l > 1 && i + l + 1 >= t)
1904
+ return i;
1905
+ if (t - i > o)
1662
1906
  return -1;
1663
1907
  }
1664
1908
  return -1;
1665
1909
  }
1910
+ /**
1911
+ * Adjusts the columns to fit the width of the row's parent element.
1912
+ *
1913
+ * @param {ArgsAdjustColumnsToRowParentParams} params - The parameters for adjusting the columns.
1914
+ * @protected
1915
+ * @return {void}
1916
+ */
1666
1917
  adjustColumnsToRowParent({
1667
1918
  areaIdent: e,
1668
1919
  sideIdent: t,
1669
1920
  areaModel: s,
1670
- geo: i,
1671
- parent: o,
1672
- rowIndex: r,
1921
+ geo: o,
1922
+ parent: i,
1923
+ rowIndex: l,
1673
1924
  columnIndexStart: n,
1674
1925
  columnIndexEnd: a,
1675
- verticalFixed: h = !1,
1926
+ verticalFixed: c = !1,
1676
1927
  lastRowOfModel: d = !1
1677
1928
  }) {
1678
- var m;
1929
+ var S;
1679
1930
  this.scrollViewportLeft = this.scrollViewport.scrollLeft;
1680
- let c = 0;
1681
- if (!h) {
1682
- const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1683
- c = this.scrollFactorX * S;
1684
- }
1685
- const p = 0, g = !!(e === "body" && t);
1686
- let u = c;
1687
- for (let S = n; S <= a; S++) {
1688
- const f = u, M = this.tableModel.getColumnWidth(S);
1689
- if (M > 0 && f + M > 0) {
1690
- let C = i.height;
1691
- const E = s.getRowspanAt(r, S), v = s.getColspanAt(r, S);
1692
- E > 1 && (C = this.getRowHeights(r, r + E - 1, s).reduce((T, I) => T + I, 0));
1693
- let w = M;
1694
- v > 1 && (w = this.getColumnWidths(S, S + v - 1).reduce((T, I) => T + I, 0));
1695
- let R = !1;
1696
- if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (m = this.colAndRowspanModels[e]) != null && m.isInRange(r, S) && (R = !0), this.draggingTargetColumnIndex === S && e !== "header") {
1697
- this.renderDragTargetDiv(o, f, p, w, C);
1698
- const T = { left: f, top: p, width: w, height: C };
1699
- this.dom.addColumnBorderDivs(this.tableOptions, o, T, e, t);
1931
+ let h = 0;
1932
+ if (!c) {
1933
+ const p = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1934
+ h = this.scrollFactorX * p;
1935
+ }
1936
+ const g = 0, f = !!(e === "body" && t);
1937
+ let b = h;
1938
+ for (let p = n; p <= a; p++) {
1939
+ const u = b, v = this.tableModel.getColumnWidth(p);
1940
+ if (v > 0 && u + v > 0) {
1941
+ let C = o.height;
1942
+ const E = s.getRowspanAt(l, p), y = s.getColspanAt(l, p);
1943
+ E > 1 && (C = this.getRowHeights(l, l + E - 1, s).reduce((T, D) => T + D, 0));
1944
+ let m = v;
1945
+ y > 1 && (m = this.getColumnWidths(p, p + y - 1).reduce((T, D) => T + D, 0));
1946
+ let k = !1;
1947
+ if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (S = this.colAndRowspanModels[e]) != null && S.isInRange(l, p) && (k = !0), this.draggingTargetColumnIndex === p && e !== "header") {
1948
+ this.renderDragTargetDiv(i, u, g, m, C);
1949
+ const T = { left: u, top: g, width: m, height: C };
1950
+ this.dom.addColumnBorderDivs(this.tableOptions, i, T, e, t);
1700
1951
  } else {
1701
- const T = this.renderSelectedBackgroundDiv(R, g, t, s, r, S, o, f, p, w, C);
1702
- R || this.renderCell({
1952
+ const T = this.renderSelectedBackgroundDiv(k, f, t, s, l, p, i, u, g, m, C);
1953
+ "gammaCells" in s && s.getValueAt(l, p) && (k = !1), k || this.renderCell({
1703
1954
  areaModel: s,
1704
1955
  areaIdent: e,
1705
1956
  sideIdent: t,
1706
- rowIndex: r,
1707
- columnIndex: S,
1708
- left: f,
1709
- top: p,
1710
- width: w,
1957
+ rowIndex: l,
1958
+ columnIndex: p,
1959
+ left: u,
1960
+ top: g,
1961
+ width: m,
1711
1962
  height: C,
1712
- parent: o,
1963
+ parent: i,
1713
1964
  cellSelected: T,
1714
1965
  lastRowOfModel: d,
1715
1966
  gammaRange: !0
1716
1967
  }), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1717
- rowIndex: r,
1718
- columnIndex: S,
1719
- cellLeft: f,
1720
- cellTop: p,
1721
- cellWidth: w,
1968
+ rowIndex: l,
1969
+ columnIndex: p,
1970
+ cellLeft: u,
1971
+ cellTop: g,
1972
+ cellWidth: m,
1722
1973
  cellHeight: C,
1723
- parent: o
1974
+ parent: i
1724
1975
  });
1725
1976
  }
1726
1977
  }
1727
- if (u = u + M, u > this.areaBodyCenterGeo.width)
1978
+ if (b = b + v, b > this.areaBodyCenterGeo.width)
1728
1979
  break;
1729
1980
  }
1730
- this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new O(u - 1, 1, i.height, 0), o);
1981
+ this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new O(b - 1, 1, o.height, 0), i);
1731
1982
  }
1983
+ /**
1984
+ * Retrieves the column index of the tree arrow column in the table.
1985
+ *
1986
+ * @protected
1987
+ *
1988
+ * @returns {0 | 1} The column index of the tree arrow column.
1989
+ * Returns 0 if the checkbox is not visible,
1990
+ * otherwise returns 1.
1991
+ */
1732
1992
  getTreeArrowColumnIndex() {
1733
1993
  return this.tableOptions.showCheckboxWihoutExtraColumn ? 0 : this.tableModel.isRowCheckboxVisible() ? 1 : 0;
1734
1994
  }
@@ -1736,100 +1996,112 @@ class Qe extends Ue {
1736
1996
  areaModel: e,
1737
1997
  areaIdent: t,
1738
1998
  sideIdent: s,
1739
- rowIndex: i,
1740
- index: o,
1741
- left: r,
1999
+ rowIndex: o,
2000
+ index: i,
2001
+ left: l,
1742
2002
  width: n,
1743
2003
  height: a,
1744
- top: h,
2004
+ top: c,
1745
2005
  parent: d,
1746
- lastRowOfModel: c,
1747
- gammaRange: p
2006
+ lastRowOfModel: h
1748
2007
  }) {
1749
- var de;
1750
- const u = this.editorRenderer && this.editorRendererRow === i && this.editorRendererColumn === o ? this.editorRenderer : e.getCellRenderer(i, o), m = { left: r, width: n, height: a, top: h, index: o }, S = e.getRowByIndex(i);
1751
- let f = "none";
1752
- if (o === this.getTreeArrowColumnIndex() && ee(S)) {
1753
- const y = S;
1754
- (de = y.children) != null && de.length ? y.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
1755
- }
1756
- let C;
2008
+ var ge;
2009
+ const f = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), b = { left: l, width: n, height: a, top: c, index: i }, S = e.getRowByIndex(o);
2010
+ let p = "none";
2011
+ if (i === this.getTreeArrowColumnIndex() && ie(S)) {
2012
+ const x = S;
2013
+ (ge = x.children) != null && ge.length ? x.expanded ? p = "expanded" : p = "collapsed" : p = "hidden";
2014
+ }
2015
+ let v;
1757
2016
  if (t === "header") {
1758
- const y = this.tableModel.getColumnDef(o);
1759
- (!(y != null && y.sortIconVisible) || y != null && y.sortIconVisible()) && (C = y == null ? void 0 : y.sortState);
2017
+ const x = this.tableModel.getColumnDef(i);
2018
+ (!(x != null && x.sortIconVisible) || x != null && x.sortIconVisible()) && (v = x == null ? void 0 : x.sortState);
1760
2019
  }
1761
- const E = e.getValueAt(i, o), v = u ? "" : `${E}`, w = e.isRowChecked(i), R = this.dom.addColumnDiv(
1762
- d,
1763
- m,
1764
- i,
1765
- o,
1766
- t,
1767
- s,
1768
- v,
1769
- f,
1770
- this.tableOptions,
1771
- w,
1772
- C
1773
- ), T = e.getTooltipAt(i, o);
1774
- T && this.dom.setAttribute(R, "title", T);
1775
- const I = this.tableModel.getColumnDef(o);
1776
- I && I.classes[t] && this.dom.addClasses(I.classes[t], R);
1777
- let G;
1778
- u && (G = u.render(R, i, o, t, e, E, this.dom.domService));
1779
- const ae = e.getCustomClassesAt(i, o);
1780
- if (ae.length && this.dom.addClasses(ae, R), this.dom.addColumnBorderDivs(this.tableOptions, d, m, t, s), c && this.dom.addHorizontalBorder({ left: r, width: n, height: a, top: h + a }, d), this.getFocusModel && t === "body") {
1781
- const y = this.getFocusModel();
1782
- y != null && y.hasFocus(i, o) && this.dom.addFocusBorderDivs(d, m, {});
1783
- }
1784
- t === "header" && this.dom.setAttribute(R, "data-ge-action", "drag-column");
1785
- const Y = e.getCustomStyleAt(i, o);
1786
- if (Y)
1787
- for (const y in Y)
1788
- this.dom.setStyle(R, y, Y[y]);
1789
- return [R, G];
2020
+ const C = e.getValueAt(o, i), E = f ? "" : `${C}`, y = e.isRowChecked(o), m = this.dom.addColumnDiv(
2021
+ {
2022
+ parent: d,
2023
+ geo: b,
2024
+ rowIndex: o,
2025
+ columnIndex: i,
2026
+ areaIdent: t,
2027
+ sideIdent: s,
2028
+ text: E,
2029
+ treeArrow: p,
2030
+ tableOptions: this.tableOptions,
2031
+ checkedType: y,
2032
+ sortState: v
2033
+ }
2034
+ ), k = e.getTooltipAt(o, i);
2035
+ k && this.dom.setAttribute(m, "title", k);
2036
+ const T = this.tableModel.getColumnDef(i);
2037
+ T && T.classes[t] && this.dom.addClasses(T.classes[t], m);
2038
+ let D;
2039
+ f && (D = f.render(m, o, i, t, e, C, this.dom.domService));
2040
+ const _ = e.getCustomClassesAt(o, i);
2041
+ if (_.length && this.dom.addClasses(_, m), this.dom.addColumnBorderDivs(this.tableOptions, d, b, t, s), h && this.dom.addHorizontalBorder({ left: l, width: n, height: a, top: c + a }, d), this.getFocusModel && t === "body") {
2042
+ const x = this.getFocusModel();
2043
+ x != null && x.hasFocus(o, i) && this.dom.addFocusBorderDivs(d, b, {});
2044
+ }
2045
+ t === "header" && this.dom.setAttribute(m, "data-ge-action", "drag-column");
2046
+ const Q = e.getCustomStyleAt(o, i);
2047
+ if (Q)
2048
+ for (const x in Q)
2049
+ this.dom.setStyle(m, x, Q[x]);
2050
+ return [m, D];
1790
2051
  }
2052
+ /**
2053
+ * Applies CSS classes to an HTML element.
2054
+ *
2055
+ * @param {HTMLDivElement} ele - The HTML element to which CSS classes will be applied.
2056
+ * @param {Object.<string, boolean>} cssClasses - An object containing CSS class names as keys and boolean values indicating whether to apply or remove the class.
2057
+ * @protected
2058
+ */
1791
2059
  applyCssClasses(e, t = {}) {
1792
- e && Object.entries(t).forEach(([s, i]) => {
1793
- i ? this.dom.addClass(s, e) : this.dom.removeClass(s, e);
2060
+ e && Object.entries(t).forEach(([s, o]) => {
2061
+ o ? this.dom.addClass(s, e) : this.dom.removeClass(s, e);
1794
2062
  });
1795
2063
  }
1796
- rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: i, cssClasses: o }) {
1797
- const r = this.tableModel.getAreaModel(e), n = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', a = document.querySelector(n);
1798
- if (a) {
1799
- let h;
1800
- const c = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s ? this.editorRenderer : r.getCellRenderer(t, s);
1801
- if (a.innerText = "", this.applyCssClasses(a, o), c)
1802
- h = c.render(a, t, s, e, r, i, this.dom.domService), h && this.cleanupFunctions[e].push(h);
1803
- else {
1804
- const u = `${i}`;
1805
- this.dom.addLabelDiv(a, u, !1, t, s, e);
1806
- }
1807
- const p = r.getCustomClassesAt(t, s);
1808
- p.length && this.dom.addClasses(p, a);
1809
- const g = r.getCustomStyleAt(t, s);
1810
- if (g)
1811
- for (const u in g)
1812
- this.dom.setStyle(a, u, g[u]);
1813
- }
1814
- }
2064
+ /**
2065
+ * Retrieves the column widths of a table within a specified range.
2066
+ *
2067
+ * @param {number} startIndex - The index of the first column to retrieve the width of.
2068
+ * @param {number} endIndex - The index of the last column to retrieve the width of.
2069
+ *
2070
+ * @return {number[]} An array containing the widths of the columns within the specified range.
2071
+ */
1815
2072
  getColumnWidths(e, t) {
1816
2073
  const s = [];
1817
- for (let i = e; i <= t; i++)
1818
- s.push(this.tableModel.getColumnWidth(i));
2074
+ for (let o = e; o <= t; o++)
2075
+ s.push(this.tableModel.getColumnWidth(o));
1819
2076
  return s;
1820
2077
  }
2078
+ /**
2079
+ * Retrieves the heights of rows within a specified range.
2080
+ *
2081
+ * @param {number} startIndex - The index of the first row in the range.
2082
+ * @param {number} endIndex - The index of the last row in the range.
2083
+ * @param {AreaModelIf} areaModel - The area model.
2084
+ * @return {number[]} - An array containing the heights of the rows within the specified range.
2085
+ */
1821
2086
  getRowHeights(e, t, s) {
1822
- const i = [];
1823
- for (let o = e; o <= t; o++)
1824
- i.push(s.getRowHeight(o));
1825
- return i;
2087
+ const o = [];
2088
+ for (let i = e; i <= t; i++)
2089
+ o.push(s.getRowHeight(i));
2090
+ return o;
1826
2091
  }
2092
+ /**
2093
+ * Adjusts the position and size of the hover row based on the mouse move event.
2094
+ *
2095
+ * @param {GeMouseEvent} mouseMoveEvent - The mouse move event.
2096
+ *
2097
+ * @return {void}
2098
+ */
1827
2099
  adjustHoverRows(e) {
1828
2100
  if (this.tableOptions.hoverRowVisible && e.rowIndex > -1) {
1829
- const t = this.hostElement.clientWidth, s = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex), i = e.rowTop + this.areaHeaderCenter.parent.clientHeight - this.scrollTop;
2101
+ const t = this.hostElement.clientWidth, s = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex), o = e.rowTop + this.areaHeaderCenter.parent.clientHeight - this.scrollTop;
1830
2102
  this.dom.applyStyle(this.hoverRow, {
1831
2103
  left: "0",
1832
- top: i + "px",
2104
+ top: o + "px",
1833
2105
  width: t + "px",
1834
2106
  height: s + "px",
1835
2107
  display: "block"
@@ -1837,16 +2109,31 @@ class Qe extends Ue {
1837
2109
  } else
1838
2110
  this.hideHoverRow();
1839
2111
  }
2112
+ /**
2113
+ * Hides the hover row by applying 'display: none' style to it.
2114
+ *
2115
+ * @protected
2116
+ * @function
2117
+ * @name hideHoverRow
2118
+ * @memberof ClassName
2119
+ *
2120
+ * @returns {void}
2121
+ */
1840
2122
  hideHoverRow() {
1841
2123
  this.dom.applyStyle(this.hoverRow, {
1842
2124
  display: "none"
1843
2125
  });
1844
2126
  }
2127
+ /**
2128
+ * Adjusts the position and size of the hover column based on the mouse move event.
2129
+ *
2130
+ * @param {GeMouseEvent} mouseMoveEvent - The mouse move event object.
2131
+ */
1845
2132
  adjustHoverColumns(e) {
1846
2133
  if (this.tableOptions.hoverColumnVisible && e.rowIndex > -1) {
1847
- 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;
2134
+ const t = this.hostElement.clientHeight, s = this.tableModel.getColumnWidth(e.columnIndex), o = this.areaBodyWestGeo.width, i = e.columnLeft + this.tableModel.getPadding().left - this.scrollLeft - o;
1848
2135
  this.dom.applyStyle(this.hoverColumn, {
1849
- left: o + "px",
2136
+ left: i + "px",
1850
2137
  top: "0px",
1851
2138
  width: s + "px",
1852
2139
  height: t + "px",
@@ -1855,80 +2142,236 @@ class Qe extends Ue {
1855
2142
  } else
1856
2143
  this.hideHoverColumn();
1857
2144
  }
2145
+ /**
2146
+ * Hide hover column.
2147
+ *
2148
+ * This method hides the hover column by applying a style of 'display: none'
2149
+ * to the element representing the hover column.
2150
+ *
2151
+ * @protected
2152
+ * @memberof ClassName
2153
+ */
1858
2154
  hideHoverColumn() {
1859
2155
  this.dom.applyStyle(this.hoverColumn, {
1860
2156
  display: "none"
1861
2157
  });
1862
2158
  }
2159
+ /**
2160
+ * Executes a function after a specified delay, ensuring that the function is called only once within that delay period.
2161
+ *
2162
+ * @param {() => void} fn - The function to be executed.
2163
+ * @param {number} [delay=1000] - The delay in milliseconds before executing the function.
2164
+ *
2165
+ * @return {undefined}
2166
+ */
1863
2167
  debounce(e, t = 1e3) {
1864
2168
  this.debounceTimeout && clearTimeout(this.debounceTimeout), this.debounceTimeout = setTimeout(e.bind(this), t);
1865
2169
  }
1866
- renderDragTargetDiv(e, t, s, i, o) {
1867
- const r = this.dom.applyStylePosistionAbsolute(
2170
+ /**
2171
+ * Adjusts the dragging column during a mouse move event.
2172
+ *
2173
+ * @param {GeMouseEvent} mouseMoveEvent - The mouse move event.
2174
+ * @param {number} sourceColumnIndex - The index of the source column.
2175
+ * @param {boolean} firstDraggingRendering - Indicates if it's the first rendering of the dragging column.
2176
+ */
2177
+ adjustDraggingColumn(e, t, s) {
2178
+ var o, i;
2179
+ if (this.dragging) {
2180
+ const l = this.hostElement.clientHeight, n = this.storedColumnWidths[t];
2181
+ if ((o = e.originalEvent) != null && o.clientX) {
2182
+ const d = { left: ((i = e.originalEvent) == null ? void 0 : i.clientX) - n / 2, width: n, height: l, top: 0, index: t };
2183
+ this.dom.applyStyle(this.draggingColumn, {
2184
+ background: "rgba(128,128,128,0.2)",
2185
+ display: "block",
2186
+ overfllow: "clip"
2187
+ }), this.dom.applyStyleInPx(this.draggingColumn, d), s && this.renderContentOfDraggingColumn(d);
2188
+ }
2189
+ } else
2190
+ this.hideDraggingColumn();
2191
+ }
2192
+ /**
2193
+ * Renders the content of a dragging column.
2194
+ *
2195
+ * @param {GeoData} columnGeo - The geographic data of the column.
2196
+ *
2197
+ * @returns {number} The y-coordinate of the rendered content.
2198
+ */
2199
+ renderContentOfDraggingColumn(e) {
2200
+ const t = this.renderContentOfDraggingColumnForArea(e, "header", 0);
2201
+ this.renderContentOfDraggingColumnForArea(e, "body", t);
2202
+ }
2203
+ /**
2204
+ * Renders the content of the dragging column for a specific area.
2205
+ *
2206
+ * @param {GeoData} columnGeo - The geometry data of the dragging column.
2207
+ * @param {AreaIdent} areaIdent - The identifier of the area.
2208
+ * @param {number} [y=0] - The starting y-position.
2209
+ * @return {number} The final y-position after rendering all the content.
2210
+ */
2211
+ renderContentOfDraggingColumnForArea(e, t, s = 0) {
2212
+ const o = "center", i = this.tableModel.getAreaModel(t), l = i == null ? void 0 : i.getRowCount();
2213
+ if (l) {
2214
+ const n = e.index ?? 0, a = this.draggingColumn;
2215
+ for (let c = 0; c < l; c++) {
2216
+ const d = s, h = i.getRowHeight(c), g = { left: 0, width: e.width, height: h, top: d, index: c }, f = i.getValueAt(c, n), b = i.getCellRenderer(c, n), S = b ? "" : `${f}`, p = {
2217
+ parent: a,
2218
+ geo: g,
2219
+ rowIndex: c,
2220
+ columnIndex: n,
2221
+ areaIdent: t,
2222
+ sideIdent: o,
2223
+ text: S
2224
+ }, u = this.dom.addColumnDiv(p);
2225
+ let v;
2226
+ b && (v = b.render(u, c, n, t, i, f, this.dom.domService), v && this.cleanupFunctions[t].push(v));
2227
+ const C = i.getCustomClassesAt(c, n);
2228
+ C.length && this.dom.addClasses(C, u);
2229
+ const E = this.tableModel.getColumnDef(n);
2230
+ E && E.classes[t] && this.dom.addClasses(E.classes[t], u), this.dom.addColumnBorderDivs(this.tableOptions, a, g, t, o);
2231
+ const y = i.getCustomStyleAt(c, n);
2232
+ if (y)
2233
+ for (const m in y)
2234
+ this.dom.setStyle(u, m, y[m]);
2235
+ s = s + h;
2236
+ }
2237
+ }
2238
+ return s;
2239
+ }
2240
+ /**
2241
+ * Hides the dragging column by applying a 'display: none' style to it.
2242
+ * This method is protected and can only be accessed within the class.
2243
+ *
2244
+ * @return {void}
2245
+ */
2246
+ hideDraggingColumn() {
2247
+ this.dom.applyStyle(this.draggingColumn, {
2248
+ display: "none"
2249
+ });
2250
+ }
2251
+ /**
2252
+ * Renders a draggable target div element.
2253
+ *
2254
+ * @param {HTMLDivElement} parent - The parent element where the target div will be appended to.
2255
+ * @param {number} left - The left position of the target div in pixels.
2256
+ * @param {number} top - The top position of the target div in pixels.
2257
+ * @param {number} width - The width of the target div in pixels.
2258
+ * @param {number} height - The height of the target div in pixels.
2259
+ * @return {HTMLDivElement} - The rendered draggable target div element.
2260
+ */
2261
+ renderDragTargetDiv(e, t, s, o, i) {
2262
+ const l = this.dom.applyStylePosistionAbsolute(
1868
2263
  this.dom.createDivWithClass("ge-table-drop-zone", e)
1869
2264
  );
1870
- return this.dom.setStyle(r, "left", `${t}px`), this.dom.setStyle(r, "top", `${s}px`), this.dom.setStyle(r, "width", `${i}px`), this.dom.setStyle(r, "height", `${o}px`), r;
1871
- }
1872
- renderSelectedBackgroundDiv(e, t, s, i, o, r, n, a, h, d, c) {
1873
- let p = !1;
1874
- if (!e && t && i.isSelectable(o, r) && this.getSelectionModel) {
1875
- const g = this.getSelectionModel();
1876
- if (g) {
1877
- const u = g.getSelectionCount(o, r);
1878
- p = u > 0;
1879
- for (let m = 0; m < u; m++) {
1880
- const S = this.dom.applyStylePosistionAbsolute(
2265
+ return this.dom.setStyle(l, "left", `${t}px`), this.dom.setStyle(l, "top", `${s}px`), this.dom.setStyle(l, "width", `${o}px`), this.dom.setStyle(l, "height", `${i}px`), l;
2266
+ }
2267
+ /**
2268
+ * Render selected background div.
2269
+ *
2270
+ * @private
2271
+ * @param {boolean} skip - Whether to skip rendering.
2272
+ * @param {boolean} renderSelection - Whether to render the selection.
2273
+ * @param {SideIdent} sideIdent - The side identifier.
2274
+ * @param {AreaModelIf} areaModel - The area model.
2275
+ * @param {number} rowIndex - The row index.
2276
+ * @param {number} index - The index.
2277
+ * @param {HTMLDivElement} parent - The parent div element.
2278
+ * @param {number} left - The left position.
2279
+ * @param {number} top - The top position.
2280
+ * @param {number} width - The width of the div.
2281
+ * @param {number} height - The height of the div.
2282
+ * @returns {boolean} - Whether the cell is selected.
2283
+ */
2284
+ renderSelectedBackgroundDiv(e, t, s, o, i, l, n, a, c, d, h) {
2285
+ let g = !1;
2286
+ if (!e && t && o.isSelectable(i, l) && this.getSelectionModel) {
2287
+ const f = this.getSelectionModel();
2288
+ if (f) {
2289
+ const b = f.getSelectionCount(i, l);
2290
+ g = b > 0;
2291
+ for (let S = 0; S < b; S++) {
2292
+ const p = this.dom.applyStylePosistionAbsolute(
1881
2293
  // ge-table-body-west-selected-range
1882
- this.dom.createDivWithClass(`ge-table-${i.areaIdent}-${s}-selected-range`, n)
2294
+ this.dom.createDivWithClass(`ge-table-${o.areaIdent}-${s}-selected-range`, n)
1883
2295
  );
1884
- this.dom.setStyle(S, "left", `${a}px`), this.dom.setStyle(S, "top", `${h}px`), this.dom.setStyle(S, "width", `${d}px`), this.dom.setStyle(S, "height", `${c}px`);
2296
+ this.dom.setStyle(p, "left", `${a}px`), this.dom.setStyle(p, "top", `${c}px`), this.dom.setStyle(p, "width", `${d}px`), this.dom.setStyle(p, "height", `${h}px`);
1885
2297
  }
1886
2298
  }
1887
2299
  }
1888
- return p;
2300
+ return g;
1889
2301
  }
2302
+ /**
2303
+ * Renders a cell in the grid.
2304
+ *
2305
+ * @param {ArgsRenderCell} args - The arguments for rendering the cell.
2306
+ * @param {AreaModel} args.areaModel - The area model of the grid.
2307
+ * @param {string} args.areaIdent - The identifier of the area.
2308
+ * @param {string} args.sideIdent - The identifier of the side.
2309
+ * @param {number} args.rowIndex - The index of the row.
2310
+ * @param {number} args.columnIndex - The index of the column.
2311
+ * @param {number} args.left - The left position of the cell.
2312
+ * @param {number} args.top - The top position of the cell.
2313
+ * @param {number} args.width - The width of the cell.
2314
+ * @param {number} args.height - The height of the cell.
2315
+ * @param {HTMLElement} args.parent - The parent element of the cell.
2316
+ * @param {boolean} args.cellSelected - Indicates if the cell is selected.
2317
+ * @param {boolean} args.lastRowOfModel - Indicates if the cell is in the last row of the model.
2318
+ *
2319
+ * @returns {void}
2320
+ */
1890
2321
  renderCell({
1891
2322
  areaModel: e,
1892
2323
  areaIdent: t,
1893
2324
  sideIdent: s,
1894
- rowIndex: i,
1895
- columnIndex: o,
1896
- left: r,
2325
+ rowIndex: o,
2326
+ columnIndex: i,
2327
+ left: l,
1897
2328
  top: n,
1898
2329
  width: a,
1899
- height: h,
2330
+ height: c,
1900
2331
  parent: d,
1901
- cellSelected: c,
1902
- lastRowOfModel: p,
1903
- gammaRange: g
2332
+ cellSelected: h,
2333
+ lastRowOfModel: g
1904
2334
  }) {
1905
- const [u, m] = this.addAndRenderCellDiv({
2335
+ const [f, b] = this.addAndRenderCellDiv({
1906
2336
  areaModel: e,
1907
2337
  areaIdent: t,
1908
2338
  sideIdent: s,
1909
- rowIndex: i,
1910
- index: o,
1911
- left: r,
2339
+ rowIndex: o,
2340
+ index: i,
2341
+ left: l,
1912
2342
  width: a,
1913
- height: h,
2343
+ height: c,
1914
2344
  top: n,
1915
2345
  parent: d,
1916
- lastRowOfModel: p,
1917
- gammaRange: g
2346
+ lastRowOfModel: g
1918
2347
  });
1919
- c && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, u), m && this.cleanupFunctions[t].push(m);
2348
+ h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, f), b && this.cleanupFunctions[t].push(b);
1920
2349
  }
1921
- renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: i, cellWidth: o, cellHeight: r, parent: n }) {
1922
- const a = this.dom.domService, h = this.tableOptions.columnResizeHandleWidthInPx ?? 2, d = a.createElement("div");
1923
- a.setAttribute(d, "data-col-index", `${t}`), a.setAttribute(d, "data-row-index", `${e}`), a.setAttribute(d, "data-area", "header"), a.setAttribute(d, "data-ge-action", "resize-column"), a.addClass(d, "ge-table-column-resize-handle"), a.setStyle(d, "display", "clip"), a.setStyle(d, "position", "absolute"), a.setStyle(d, "cursor", "col-resize"), a.setStyle(d, "left", `${s + o - h}px`), a.setStyle(d, "top", `${i}px`), a.setStyle(d, "width", `${h}px`), a.setStyle(d, "height", `${r}px`), a.appendChild(n, d);
2350
+ /**
2351
+ * Render the header cell resize handle.
2352
+ *
2353
+ * @param {ArgsRenderHeaderCellResizeHandle} args - The arguments for rendering the handle.
2354
+ * @param {number} args.rowIndex - The index of the row.
2355
+ * @param {number} args.columnIndex - The index of the column.
2356
+ * @param {number} args.cellLeft - The left position of the cell.
2357
+ * @param {number} args.cellTop - The top position of the cell.
2358
+ * @param {number} args.cellWidth - The width of the cell.
2359
+ * @param {number} args.cellHeight - The height of the cell.
2360
+ * @param {HTMLElement} args.parent - The parent element to append the handle to.
2361
+ *
2362
+ * @return {void}
2363
+ */
2364
+ renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: o, cellWidth: i, cellHeight: l, parent: n }) {
2365
+ const a = this.dom.domService, c = this.tableOptions.columnResizeHandleWidthInPx ?? 2, d = a.createElement("div");
2366
+ a.setAttribute(d, "data-col-index", `${t}`), a.setAttribute(d, "data-row-index", `${e}`), a.setAttribute(d, "data-area", "header"), a.setAttribute(d, "data-ge-action", "resize-column"), a.addClass(d, "ge-table-column-resize-handle"), a.setStyle(d, "display", "clip"), a.setStyle(d, "position", "absolute"), a.setStyle(d, "cursor", "col-resize"), a.setStyle(d, "left", `${s + i - c}px`), a.setStyle(d, "top", `${o}px`), a.setStyle(d, "width", `${c}px`), a.setStyle(d, "height", `${l}px`), a.appendChild(n, d);
1924
2367
  }
1925
2368
  }
1926
- class Ze {
2369
+ class lt {
1927
2370
  constructor(e, t) {
1928
2371
  this.columnIndex = e, this.sortState = t;
1929
2372
  }
1930
2373
  }
1931
- class et {
2374
+ class rt {
1932
2375
  constructor(e) {
1933
2376
  this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
1934
2377
  }
@@ -1942,40 +2385,40 @@ class et {
1942
2385
  */
1943
2386
  onHostElementChanged(e) {
1944
2387
  if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
1945
- const t = e.target, s = t.getAttribute("data-area"), i = t.getAttribute("data-row-index"), o = t.getAttribute("data-col-index");
1946
- if (s && i && o) {
1947
- const r = oe(s), n = Number(i), a = Number(o);
1948
- this.tableScope.updateModelValueAfterEdit(r, n, a, t.value);
2388
+ const t = e.target, s = t.getAttribute("data-area"), o = t.getAttribute("data-row-index"), i = t.getAttribute("data-col-index");
2389
+ if (s && o && i) {
2390
+ const l = ae(s), n = Number(o), a = Number(i);
2391
+ this.tableScope.updateModelValueAfterEdit(l, n, a, t.value);
1949
2392
  }
1950
2393
  }
1951
2394
  }
1952
2395
  }
1953
- class tt {
2396
+ class nt {
1954
2397
  constructor(e = -1, t = -1) {
1955
2398
  this.rowIndex = e, this.columnIndex = t;
1956
2399
  }
1957
2400
  }
1958
- class re {
2401
+ class ce {
1959
2402
  constructor(e) {
1960
2403
  this.cells = e;
1961
2404
  }
1962
2405
  static createSingle(e, t) {
1963
- return new re([new tt(e, t)]);
2406
+ return new ce([new nt(e, t)]);
1964
2407
  }
1965
2408
  }
1966
- class st {
2409
+ class at {
1967
2410
  constructor(e) {
1968
2411
  var t, s;
1969
2412
  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);
1970
2413
  }
1971
2414
  onMouseClicked(e, t) {
1972
- var o, r, n, a, h, d, c;
1973
- let s = !1, i = !1;
2415
+ var i, l, n, a, c, d, h;
2416
+ let s = !1, o = !1;
1974
2417
  if (this.getSelectionModel && this.getFocusModel) {
1975
- const p = this.getSelectionModel(), g = this.getFocusModel();
1976
- p && g && (g.hasFocus(e.rowIndex, e.columnIndex) || (g.setFocus(e.rowIndex, e.columnIndex), s = !0), (o = e.originalEvent) != null && o.shiftKey || p.hasSelection() && (p.clear(), s = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (p.addSelection(this.createRangeByEvents(e, this.previousEvt)), i = !0, s = !0) : (n = e.originalEvent) != null && n.ctrlKey || (a = e.originalEvent) != null && a.metaKey ? (p.addSelection(D.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0) : (h = e.originalEvent) != null && h.altKey && ((d = e.originalEvent) != null && d.ctrlKey || (c = e.originalEvent) != null && c.metaKey) && (p.removeSelection(D.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0));
2418
+ const g = this.getSelectionModel(), f = this.getFocusModel();
2419
+ g && f && (f.hasFocus(e.rowIndex, e.columnIndex) || (f.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(f), s = !0), (i = e.originalEvent) != null && i.shiftKey || g.hasSelection() && (g.clear(), s = !0), (l = e.originalEvent) != null && l.shiftKey && this.previousEvt ? (g.addSelection(this.createRangeByEvents(e, this.previousEvt)), o = !0, s = !0) : (n = e.originalEvent) != null && n.altKey && ((a = e.originalEvent) != null && a.ctrlKey || (c = e.originalEvent) != null && c.metaKey) ? (g.removeSelection(A.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (d = e.originalEvent) != null && d.ctrlKey || (h = e.originalEvent) != null && h.metaKey ? (g.addSelection(A.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (g.firstClick(e.rowIndex, e.columnIndex), s = !0), this.tableScope.onSelectionChanged(g));
1977
2420
  }
1978
- return i ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
2421
+ return o ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
1979
2422
  }
1980
2423
  onActionTriggered(e) {
1981
2424
  if (this.getSelectionModel && this.getFocusModel) {
@@ -1986,8 +2429,8 @@ class st {
1986
2429
  if (e === "DESELECT_ALL")
1987
2430
  return t.clear(), this.tableScope.repaint(), !0;
1988
2431
  if (e === "TOGGLE_SELECTION") {
1989
- const [i, o] = s.getFocus();
1990
- return t.togglePoint(i, o), this.tableScope.repaint(), !0;
2432
+ const [o, i] = s.getFocus();
2433
+ return t.togglePoint(o, i), this.tableScope.repaint(), !0;
1991
2434
  }
1992
2435
  }
1993
2436
  }
@@ -1995,16 +2438,16 @@ class st {
1995
2438
  }
1996
2439
  createRangeByEvents(e, t) {
1997
2440
  t || (t = e);
1998
- 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), r = Math.max(e.columnIndex, t == null ? void 0 : t.columnIndex);
1999
- return D.create({
2441
+ const s = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex), o = Math.max(e.rowIndex, t == null ? void 0 : t.rowIndex), i = Math.min(e.columnIndex, t == null ? void 0 : t.columnIndex), l = Math.max(e.columnIndex, t == null ? void 0 : t.columnIndex);
2442
+ return A.create({
2000
2443
  rowIndex1: s,
2001
- columnIndex1: o,
2002
- rowIndex2: i,
2003
- columnIndex2: r
2444
+ columnIndex1: i,
2445
+ rowIndex2: o,
2446
+ columnIndex2: l
2004
2447
  });
2005
2448
  }
2006
2449
  }
2007
- class it {
2450
+ class dt {
2008
2451
  get() {
2009
2452
  return {
2010
2453
  f2: "START_EDITING",
@@ -2014,43 +2457,60 @@ class it {
2014
2457
  "ctrl+shift+a": "DESELECT_ALL",
2015
2458
  "ctrl+x": "DESELECT_ALL",
2016
2459
  "ctrl+num_subtract": "DESELECT_ALL",
2017
- "cmd -": "DESELECT_ALL",
2460
+ "meta -": "DESELECT_ALL",
2018
2461
  arrowup: "NAVIGATE_UP",
2019
2462
  arrowdown: "NAVIGATE_DOWN",
2020
2463
  arrowleft: "NAVIGATE_LEFT",
2021
- arrowright: "NAVIGATE_RIGHT"
2464
+ arrowright: "NAVIGATE_RIGHT",
2465
+ "meta+c": "COPY_2_CLIPBOARD",
2466
+ "ctrl+c": "COPY_2_CLIPBOARD"
2022
2467
  };
2023
2468
  }
2024
2469
  }
2025
- class ot {
2470
+ class ct {
2026
2471
  get() {
2027
2472
  return {
2028
2473
  f2: "START_EDITING",
2029
2474
  space: "TOGGLE_SELECTION",
2030
2475
  "ctrl+num_add": "SELECT_ALL",
2031
- "cmd+a": "SELECT_ALL",
2476
+ "meta+a": "SELECT_ALL",
2032
2477
  "ctrl+a": "SELECT_ALL",
2033
- "cmd+x": "DESELECT_ALL",
2034
- "cmd+shift+a": "DESELECT_ALL",
2478
+ "meta+x": "DESELECT_ALL",
2479
+ "meta+shift+a": "DESELECT_ALL",
2035
2480
  "ctrl+shift+a": "DESELECT_ALL",
2036
2481
  "ctrl+num_subtract": "DESELECT_ALL",
2037
2482
  "ctrl -": "DESELECT_ALL",
2038
2483
  arrowup: "NAVIGATE_UP",
2039
2484
  arrowdown: "NAVIGATE_DOWN",
2040
2485
  arrowleft: "NAVIGATE_LEFT",
2041
- arrowright: "NAVIGATE_RIGHT"
2486
+ arrowright: "NAVIGATE_RIGHT",
2487
+ "meta+c": "COPY_2_CLIPBOARD",
2488
+ "ctrl+c": "COPY_2_CLIPBOARD"
2042
2489
  };
2043
2490
  }
2044
2491
  }
2045
- class lt {
2492
+ class ht {
2046
2493
  constructor(e) {
2047
2494
  this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
2048
2495
  }
2496
+ /**
2497
+ * Adds a listener to the list of listeners.
2498
+ *
2499
+ * @param {OnActionTriggeredIf} listener - The listener to be added.
2500
+ * @returns {void}
2501
+ */
2049
2502
  addListener(e) {
2050
2503
  this.listener.includes(e) || this.listener.push(e);
2051
2504
  }
2505
+ /**
2506
+ * Initializes the ShortcutService by assigning shortcut action id mappings based on the current operating system.
2507
+ * Also adds key down event listener to the table host element.
2508
+ */
2052
2509
  init() {
2053
- this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new ot().get()) : Object.assign(this.shortcutActionIdMapping, new it().get()), Object.assign(this.shortcutActionIdMapping, this.tableScope.tableOptions.shortcutActionIdMapping), this.isDebug() && console.debug("ShortcutService", this.shortcutActionIdMapping), this.tableScope.hostElement.addEventListener("keydown", this.onKeyDown.bind(this));
2510
+ 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));
2511
+ }
2512
+ assignPredefinedSystemShortcutMappings() {
2513
+ this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new ct().get()) : Object.assign(this.shortcutActionIdMapping, new dt().get());
2054
2514
  }
2055
2515
  isMacintosh() {
2056
2516
  return navigator.platform.indexOf("Mac") > -1;
@@ -2062,22 +2522,22 @@ class lt {
2062
2522
  return location.hostname === "localhost" || location.hostname === "127.0.0.1";
2063
2523
  }
2064
2524
  onKeyDown(e) {
2065
- const t = this.findEnty(e);
2525
+ const t = this.findEntity(e);
2066
2526
  t && this.emit(t) && (e.preventDefault(), e.stopPropagation());
2067
2527
  }
2068
2528
  emit(e) {
2069
- this.isDebug() && console.debug("ShortcutService emit:", e);
2529
+ this.isDebug() && console.debug("ShortcutService emit :", e);
2070
2530
  let t = !1;
2071
2531
  for (const s of this.listener)
2072
2532
  s.onActionTriggered(e) && (t = !0);
2073
2533
  return t;
2074
2534
  }
2075
- findEnty(e) {
2535
+ findEntity(e) {
2076
2536
  const t = this.getTokenByEvent(e);
2077
- this.isDebug() && console.debug("ShortcutService tokens:", t);
2537
+ this.isDebug() && console.debug("ShortcutService tokens :", t);
2078
2538
  for (const s in this.shortcutActionIdMapping) {
2079
- const i = s.replace(/opt/g, "alt").replace(/cmd/g, "meta").split(/[\+ ]/g).sort();
2080
- if (this.areTokensEquals(t, i))
2539
+ const o = s.replace(/opt/g, "alt").replace(/cmd/g, "meta").split(/[+ ]/g).sort();
2540
+ if (this.areTokensEquals(t, o))
2081
2541
  return this.shortcutActionIdMapping[s];
2082
2542
  }
2083
2543
  }
@@ -2093,8 +2553,16 @@ class lt {
2093
2553
  const t = [];
2094
2554
  return e.altKey && t.push("alt"), e.shiftKey && t.push("shift"), e.ctrlKey && t.push("ctrl"), e.metaKey && t.push("meta"), e.code && t.push(e.code.toLowerCase().replace(/key/g, "")), t.sort();
2095
2555
  }
2556
+ /**
2557
+ * Retrieves the shortcut action mapping object.
2558
+ *
2559
+ * @returns {ShortcutActionIdMapping} - The shortcut action mapping object.
2560
+ */
2561
+ getShortcutActionMapping() {
2562
+ return this.shortcutActionIdMapping;
2563
+ }
2096
2564
  }
2097
- class ue {
2565
+ class be {
2098
2566
  onCheckboxChanged(e) {
2099
2567
  }
2100
2568
  onContextmenu(e) {
@@ -2109,8 +2577,12 @@ class ue {
2109
2577
  }
2110
2578
  onMouseMoved(e) {
2111
2579
  }
2580
+ onSelectionChanged(e) {
2581
+ }
2582
+ onFocusChanged(e) {
2583
+ }
2112
2584
  }
2113
- class we {
2585
+ class Me {
2114
2586
  setStyle(e, t, s) {
2115
2587
  return e.style[t] = s, e;
2116
2588
  }
@@ -2137,11 +2609,11 @@ class we {
2137
2609
  e.setAttribute(t, s);
2138
2610
  }
2139
2611
  }
2140
- class rt {
2141
- render(e, t, s, i, o, r, n) {
2142
- if (o.isEditable(t, s)) {
2612
+ class gt {
2613
+ render(e, t, s, o, i, l, n) {
2614
+ if (i.isEditable(t, s)) {
2143
2615
  n.addClass(e, "ge-table-row-input-div");
2144
- const a = o.getValueAt(t, s);
2616
+ const a = i.getValueAt(t, s);
2145
2617
  e.innerHTML = `
2146
2618
  <input
2147
2619
  type="text"
@@ -2149,7 +2621,7 @@ class rt {
2149
2621
  autofocus
2150
2622
  onfocus="this.setSelectionRange(0, this.value.length)"
2151
2623
  data-listen="change"
2152
- data-area="${i}"
2624
+ data-area="${o}"
2153
2625
  data-row-index="${t}"
2154
2626
  data-col-index="${s}"
2155
2627
  data-input-type="text"
@@ -2158,14 +2630,17 @@ class rt {
2158
2630
  }
2159
2631
  }
2160
2632
  }
2161
- class nt {
2633
+ class ut {
2162
2634
  constructor(e = "none", t = "single") {
2163
2635
  this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
2164
2636
  }
2637
+ firstClick(e, t) {
2638
+ this.selectionType === "row" ? this.addRange(A.singleRow(e)) : this.selectionType === "column" && this.addRange(A.singleColumn(t));
2639
+ }
2165
2640
  getSelectionCount(e, t) {
2166
2641
  let s = 0;
2167
- for (const i of this.ranges)
2168
- i.isInRange(e, t) && s++;
2642
+ for (const o of this.ranges)
2643
+ o.isInRange(e, t) && s++;
2169
2644
  return this.allSelected && s++, this.isInNegativeRange(e, t) && (s = 0), s;
2170
2645
  }
2171
2646
  isInNegativeRange(e, t) {
@@ -2181,11 +2656,29 @@ class nt {
2181
2656
  this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
2182
2657
  }
2183
2658
  hasSelection() {
2184
- return !!this.ranges.length;
2659
+ return this.allSelected || !!this.ranges.length;
2660
+ }
2661
+ hasNoSelection() {
2662
+ return !this.hasSelection();
2663
+ }
2664
+ /**
2665
+ * Retrieves the merged row indices from the given range selection.
2666
+ *
2667
+ * @returns {number[]} Array of merged row indices
2668
+ */
2669
+ getMergedRowIndices() {
2670
+ const e = /* @__PURE__ */ new Set();
2671
+ for (const t of this.ranges)
2672
+ for (let s = t.r1; s <= t.r2; s++)
2673
+ !e.has(s) && !this.isInNegativeRange(s, 0) && e.add(s);
2674
+ return Array.from(e);
2185
2675
  }
2186
2676
  selectAll() {
2187
2677
  this.allSelected = !0;
2188
2678
  }
2679
+ isAllSelected() {
2680
+ return this.allSelected;
2681
+ }
2189
2682
  addSelection(e) {
2190
2683
  this.addRange(e);
2191
2684
  }
@@ -2193,16 +2686,19 @@ class nt {
2193
2686
  if (this.selectionType === "none")
2194
2687
  return;
2195
2688
  let t = e;
2196
- this.selectionType === "row" ? t = D.singleRow(e.r1) : this.selectionType === "column" && (t = D.singleColumn(e.c1)), this.negativeRanges.push(t);
2689
+ this.selectionType === "row" ? t = A.singleRow(e.r1) : this.selectionType === "column" && (t = A.singleColumn(e.c1)), this.negativeRanges.push(t);
2197
2690
  }
2198
2691
  togglePoint(e, t) {
2199
- this.getSelectionCount(e, t) > 0 ? this.removeSelection(D.singleCell(e, t)) : this.addSelection(D.singleCell(e, t));
2692
+ this.getSelectionCount(e, t) > 0 ? this.removeSelection(A.singleCell(e, t)) : this.addSelection(A.singleCell(e, t));
2693
+ }
2694
+ isSelected(e, t) {
2695
+ return this.getSelectionCount(e, t) > 0;
2200
2696
  }
2201
2697
  addRange(e) {
2202
2698
  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));
2203
2699
  }
2204
2700
  }
2205
- class at {
2701
+ class pt {
2206
2702
  constructor(e = "none") {
2207
2703
  this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
2208
2704
  }
@@ -2225,29 +2721,128 @@ class at {
2225
2721
  return [this.rowIndex, this.columnIndex];
2226
2722
  }
2227
2723
  }
2228
- const dt = new nt(), ht = new at("cell");
2229
- class Ce {
2724
+ class Re {
2725
+ constructor(e = new I(
2726
+ "❯",
2727
+ "",
2728
+ ["gt-table-icon-expanded"]
2729
+ ), t = new I(
2730
+ "❯",
2731
+ "transform: rotate(180deg) translate(-100%, -100%); transform-origin: 0 0;",
2732
+ ["ge-table-icon-collapsed"]
2733
+ )) {
2734
+ this.iconExpanded = e, this.iconCollapsed = t;
2735
+ }
2736
+ // `⊖ `, `⊕ `;
2737
+ }
2738
+ const bt = new ut(), ft = new pt("cell");
2739
+ class Te {
2230
2740
  constructor() {
2231
2741
  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 = {
2232
2742
  header: 34,
2233
2743
  body: 34,
2234
2744
  footer: 34
2235
- }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ye(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new ve(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new rt(), this.getSelectionModel = () => dt, this.getFocusModel = () => ht;
2745
+ }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Ee(), this.headerGroupOptions = new Re(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Ae(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new gt(), this.getSelectionModel = () => bt, this.getFocusModel = () => ft;
2236
2746
  }
2237
2747
  }
2238
- class ne extends Qe {
2239
- constructor(e, t, s, i, o) {
2240
- var r;
2748
+ const P = class P {
2749
+ /**
2750
+ * Returns the content to be copied based on the provided table model, selection model, and focus model.
2751
+ *
2752
+ * @param {TableModelIf} tableModel - The table model for data retrieval.
2753
+ * @param {SelectionModelIf} selectionModel - The selection model to determine the selected range.
2754
+ * @param {FocusModelIf} focusModel - The focus model to determine the focused cell.
2755
+ * @return {Promise<string>} A promise that resolves to the copied content as a string.
2756
+ * @throws {string} Throws an error if neither selection nor focus is defined.
2757
+ */
2758
+ createContent(e, t, s) {
2759
+ return new Promise((o, i) => {
2760
+ if (t != null && t.hasSelection()) {
2761
+ const l = this.mergeRanges(t.getRanges());
2762
+ if (l) {
2763
+ l.c2 = Math.min(l.c2, e.getColumnCount() - 1), l.r2 = Math.min(l.r2, e.getBodyModel().getRowCount() - 1);
2764
+ const n = [];
2765
+ for (let a = l.r1; a <= l.r2; a++) {
2766
+ const c = [];
2767
+ for (let d = l.c1; d <= l.c2; d++) {
2768
+ const h = t.isSelected(a, d) ? e.getBodyModel().getTextValueAt(a, d) : "";
2769
+ c.push(h);
2770
+ }
2771
+ n.push(c.join(P.columnSeparatorChar));
2772
+ }
2773
+ return o(n.join(P.rowSeparatorChar));
2774
+ }
2775
+ }
2776
+ if (s) {
2777
+ const [l, n] = s.getFocus(), a = e.getBodyModel().getTextValueAt(l, n);
2778
+ return o(a);
2779
+ }
2780
+ i("Cannot copy, neither selection nor focus defined.");
2781
+ });
2782
+ }
2783
+ /**
2784
+ * Copy the provided content to the clipboard.
2785
+ *
2786
+ * @param {string} content - The content to be copied.
2787
+ * @return {Promise<void>} A promise that resolves when the content has been successfully copied to the clipboard.
2788
+ */
2789
+ copyContent(e) {
2790
+ return navigator.clipboard.writeText(e);
2791
+ }
2792
+ /**
2793
+ * Asynchronously copies the content of a table to the clipboard.
2794
+ *
2795
+ * @param {TableModelIf} tableModel - The table model to copy from.
2796
+ * @param {SelectionModelIf} selectionModel - The selection model of the table.
2797
+ * @param {FocusModelIf} focusModel - The focus model of the table.
2798
+ * @returns {Promise<string>} A promise that resolves with the copied text if successful, or rejects if an error occurs.
2799
+ */
2800
+ copyToClipboard(e, t, s) {
2801
+ return new Promise((o, i) => {
2802
+ this.createContent(
2803
+ e,
2804
+ t,
2805
+ s
2806
+ ).then((l) => {
2807
+ l && this.copyContent(l).then((n) => {
2808
+ o(l);
2809
+ }).catch((n) => {
2810
+ i();
2811
+ });
2812
+ }).catch((l) => {
2813
+ i();
2814
+ });
2815
+ });
2816
+ }
2817
+ /**
2818
+ * Merges an array of CellRanges into a single merged CellRange.
2819
+ *
2820
+ * @param {CellRange[]} ranges - The array of CellRanges to be merged.
2821
+ * @return {CellRange | undefined} - The merged CellRange, or undefined if the ranges array is empty.
2822
+ */
2823
+ mergeRanges(e) {
2824
+ let t;
2825
+ for (const s of e)
2826
+ t ? (t.r1 = Math.min(t.r1, s.r1), t.c1 = Math.min(t.c1, s.c1), t.r2 = Math.max(t.r2, s.r2), t.c2 = Math.max(t.c2, s.c2)) : t = new A(s.r1, s.c1, s.r2, s.c2);
2827
+ return t;
2828
+ }
2829
+ };
2830
+ P.columnSeparatorChar = " ", P.rowSeparatorChar = `
2831
+ `;
2832
+ let K = P;
2833
+ class he extends it {
2834
+ constructor(e, t, s, o, i, l = new K()) {
2835
+ var n;
2241
2836
  if (super(
2242
2837
  e,
2243
2838
  t,
2244
- new ke(s),
2245
- i
2246
- ), this.eventListener = o, this.licenseManager = $.getInstance(), this.selectionService = new st(this), this.api = new je(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, o || (this.eventListener = new ue()), (r = this.tableOptions) != null && r.autoRestoreOptions) {
2247
- const n = this.tableOptions.autoRestoreOptions, a = n.getStorageKeyFn;
2248
- a && (n.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Xe(a)), n.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ze(a)), n.autoRestoreSortingState && (this.storeSortingService = new Ye(a)));
2839
+ new Ke(s),
2840
+ o
2841
+ ), this.eventListener = i, this.copyService = l, this.licenseManager = $.getInstance(), this.selectionService = new at(this), this.api = new qe(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, i || (this.eventListener = new be()), (n = this.tableOptions) != null && n.autoRestoreOptions) {
2842
+ const a = this.tableOptions.autoRestoreOptions, c = a.getStorageKeyFn;
2843
+ c && (a.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Je(c)), a.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new Ze(c)), a.autoRestoreSortingState && (this.storeSortingService = new et(c)));
2249
2844
  }
2250
- this.mouseHandler = new _e(this), this.inputHandler = new et(this), this.shortcutService = new lt(this), this.shortcutService.addListener(this.selectionService);
2845
+ this.mouseHandler = new Ue(this), this.inputHandler = new rt(this), this.shortcutService = new ht(this), this.shortcutService.addListener(this.selectionService);
2251
2846
  }
2252
2847
  /**
2253
2848
  * Creates a TableScope instance.
@@ -2257,33 +2852,47 @@ class ne extends Qe {
2257
2852
  * @param {TableOptionsIf} [tableOptions=new TableOptions()] - The optional table options object.
2258
2853
  * @param {EventListenerIf} [eventListener=new EventAdapter()] - The optional event listener object.
2259
2854
  * @param {DomServiceIf} [domService=new SimpleDomService()] - The optional DOM service object.
2855
+ * @param {CopyServiceIf} [copyService=new CopyService()] - The optional copy service object.
2260
2856
  *
2261
2857
  * @return {TableScope} - The newly created TableScope instance.
2262
2858
  */
2263
- static create(e, t, s = new Ce(), i = new ue(), o = new we()) {
2264
- return new ne(
2859
+ static create(e, t, s = new Te(), o = new be(), i = new Me(), l = new K()) {
2860
+ return new he(
2265
2861
  e,
2266
2862
  t,
2267
- o,
2863
+ i,
2268
2864
  s,
2269
- i
2865
+ o,
2866
+ l
2270
2867
  );
2271
2868
  }
2869
+ /**
2870
+ * Triggers an action based on the provided actionId.
2871
+ *
2872
+ * This function can be invoked manually via the table API or by keyboard shortcuts.
2873
+ *
2874
+ * @param {ActionId} actionId - The identifier of the action to be triggered.
2875
+ * @return {boolean} - Returns true if the action was triggered successfully, false otherwise.
2876
+ */
2272
2877
  onActionTriggered(e) {
2273
2878
  if (e === "NAVIGATE_DOWN" && this.changeFocusCell(0, 1) || e === "NAVIGATE_UP" && this.changeFocusCell(0, -1) || e === "NAVIGATE_LEFT" && this.changeFocusCell(-1, 0) || e === "NAVIGATE_RIGHT" && this.changeFocusCell(1, 0))
2274
2879
  return !0;
2275
2880
  if (e === "START_EDITING" && this.getFocusModel) {
2276
2881
  const t = this.getFocusModel();
2277
2882
  if (t) {
2278
- const [s, i] = t.getFocus();
2279
- this.tableModel.getBodyModel().isEditable(s, i) && (this.clearSelection(), this.initRenderEditor(s, i));
2883
+ const [s, o] = t.getFocus();
2884
+ this.tableModel.getBodyModel().isEditable(s, o) && (this.clearSelection(), this.initRenderEditor(s, o));
2280
2885
  }
2281
2886
  return !0;
2282
2887
  }
2888
+ if (e === "COPY_2_CLIPBOARD") {
2889
+ const t = this.getSelectionModel ? this.getSelectionModel() : void 0, s = this.getFocusModel ? this.getFocusModel() : void 0;
2890
+ this.copyService.createContent(this.tableModel, t, s).then((o) => this.copyService.copyContent(o));
2891
+ }
2283
2892
  return !1;
2284
2893
  }
2285
- updateModelValueAfterEdit(e, t, s, i) {
2286
- e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, i) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(re.createSingle(t, s)), this.hostElement.focus());
2894
+ updateModelValueAfterEdit(e, t, s, o) {
2895
+ e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, o) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(ce.createSingle(t, s)), this.hostElement.focus());
2287
2896
  }
2288
2897
  /**
2289
2898
  * Retrieves the TableApi object.
@@ -2312,16 +2921,16 @@ class ne extends Qe {
2312
2921
  * @return {GeMouseEvent} - The created GeMouseEvent object.
2313
2922
  */
2314
2923
  createGeMouseEvent(e) {
2315
- const t = new ie();
2924
+ const t = new ne();
2316
2925
  if (t.originalEvent = e, e) {
2317
2926
  const s = e.target;
2318
2927
  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) {
2319
- const i = this.tableModel.getAreaModel(t.areaIdent);
2320
- t.rowTop = i.getYPosByRowIndex(t.rowIndex);
2928
+ const o = this.tableModel.getAreaModel(t.areaIdent);
2929
+ t.rowTop = o.getYPosByRowIndex(t.rowIndex);
2321
2930
  }
2322
2931
  if (t.columnLeft = this.tableModel.getXPosByColumnIndex(t.columnIndex), e.ctrlKey && e.altKey) {
2323
- const i = e.clientY - this.hostElement.offsetTop - this.areaHeaderCenter.parent.clientHeight, o = e.clientX - this.hostElement.offsetLeft - this.areaBodyWestGeo.width;
2324
- this.debugOnce(o, i);
2932
+ const o = e.clientY - this.hostElement.offsetTop - this.areaHeaderCenter.parent.clientHeight, i = e.clientX - this.hostElement.offsetLeft - this.areaBodyWestGeo.width;
2933
+ this.debugOnce(i, o);
2325
2934
  }
2326
2935
  }
2327
2936
  return t;
@@ -2333,15 +2942,16 @@ class ne extends Qe {
2333
2942
  * @return {void}
2334
2943
  */
2335
2944
  onMouseDown(e) {
2336
- e.columnIndex > -1 && e.action && ["resize-column", "drag-column"].includes(e.action) && (this.mouseStartWidth = this.tableModel.getColumnWidth(e.columnIndex), this.mouseStartAction = e.action, this.mouseStartColumnIndex = e.columnIndex, this.mouseStartAction === "drag-column" && (this.dragFrom = this.mouseStartColumnIndex));
2945
+ e.columnIndex > -1 && e.action && ["resize-column", "drag-column"].includes(e.action) && (this.mouseStartWidth = this.tableModel.getColumnWidth(e.columnIndex), this.mouseStartAction = e.action, this.mouseStartColumnIndex = e.columnIndex, this.mouseStartAction === "drag-column" && (this.firstDraggingRendering = !0, this.dragFrom = this.mouseStartColumnIndex));
2337
2946
  }
2338
2947
  /**
2339
2948
  * Handles mouse dragging on the frame.
2340
2949
  *
2341
2950
  * @param {GeMouseEvent} mouseEvent - The mouse event object.
2951
+ * @param startMouseEvent
2342
2952
  */
2343
- mouseDraggingOnFrame(e) {
2344
- this.eventListener.onMouseDragging(e), this.mouseEvent = e, this.mouseStartColumnIndex > -1 && this.mouseStartAction === "resize-column" && this.tableOptions.columnsResizable ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && e.columnIndex > -1 && this.tableOptions.columnsDraggable && (this.draggingTargetColumnIndex = e.columnIndex, this.dragTo = this.draggingTargetColumnIndex, this.dragFrom > -1 && this.dragTo > -1 && this.dragFrom !== this.dragTo && (this.tableModel.changeColumnOrder(this.dragFrom, this.dragTo), this.dragFrom = this.dragTo, this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows()), this.repaint());
2953
+ mouseDraggingOnFrame(e, t) {
2954
+ this.eventListener.onMouseDragging(e), this.mouseEvent = e, this.mouseStartColumnIndex > -1 && this.mouseStartAction === "resize-column" && this.tableOptions.columnsResizable ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && e.columnIndex > -1 && this.tableOptions.columnsDraggable && (this.draggingTargetColumnIndex = e.columnIndex, this.dragTo = this.draggingTargetColumnIndex, this.dragFrom > -1 && this.dragTo > -1 && this.dragFrom !== this.dragTo && (this.lastDragFrom === this.dragTo && this.lastDragTo === this.dragFrom || (this.tableModel.changeColumnOrder(this.dragFrom, this.dragTo), this.lastDragFrom = this.dragFrom, this.lastDragTo = this.dragTo, this.dragFrom = this.dragTo, this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows())), t && (this.adjustDraggingColumn(e, t.columnIndex, this.firstDraggingRendering), this.firstDraggingRendering = !1), this.repaint());
2345
2955
  }
2346
2956
  /**
2347
2957
  * Handles the end of mouse dragging event on a frame.
@@ -2351,7 +2961,7 @@ class ne extends Qe {
2351
2961
  * @returns {void}
2352
2962
  */
2353
2963
  mouseDraggingEndOnFrame(e) {
2354
- this.eventListener.onMouseDraggingEnd(e), this.draggingTargetColumnIndex = -1, this.mouseStartAction === "resize-column" ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && this.repaint(), this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.mouseStartAction = "";
2964
+ this.eventListener.onMouseDraggingEnd(e), this.draggingTargetColumnIndex = -1, this.mouseStartAction === "resize-column" ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && (this.hideDraggingColumn(), this.repaint()), this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.firstDraggingRendering = !0, this.mouseStartAction = "";
2355
2965
  }
2356
2966
  /**
2357
2967
  * Handles the mouse move event.
@@ -2381,7 +2991,7 @@ class ne extends Qe {
2381
2991
  toggleExpandCollapseAll(e = !0) {
2382
2992
  var s;
2383
2993
  const t = this.tableModel.getBodyModel();
2384
- te(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
2994
+ le(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
2385
2995
  }
2386
2996
  /**
2387
2997
  * Toggles the checkbox state of a specific row in a table.
@@ -2394,9 +3004,9 @@ class ne extends Qe {
2394
3004
  */
2395
3005
  toggleRowCheckbox(e, t, s) {
2396
3006
  var a;
2397
- const i = this.tableModel.getAreaModel(s), o = i.isRowChecked(e), r = o === void 0 || o === "semi" || o === "none";
2398
- i.setRowChecked(e, r), this.repaint();
2399
- const n = (a = i.rowSelectionModel) == null ? void 0 : a.getCheckedRows();
3007
+ const o = this.tableModel.getAreaModel(s), i = o.isRowChecked(e), l = i === void 0 || i === "semi" || i === "none";
3008
+ o.setRowChecked(e, l), this.repaint();
3009
+ const n = (a = o.rowSelectionModel) == null ? void 0 : a.getCheckedRows();
2400
3010
  this.eventListener.onCheckboxChanged(n || []);
2401
3011
  }
2402
3012
  /**
@@ -2409,10 +3019,23 @@ class ne extends Qe {
2409
3019
  onMouseClicked(e, t) {
2410
3020
  let s = this.selectionService.onMouseClicked(e, t);
2411
3021
  if (!s && this.getFocusModel) {
2412
- const i = this.getFocusModel();
2413
- i && (s = i.hasChanged(), i.clearChanged(), s && this.resetEditorRenderer());
3022
+ this.resetEditorRenderer();
3023
+ const o = this.getFocusModel();
3024
+ o && (s = o.hasChanged(), o.clearChanged());
2414
3025
  }
2415
- this.eventListener.onMouseClicked(e), s && this.debounce(this.repaint.bind(this), 10);
3026
+ return s;
3027
+ }
3028
+ debounceRepaint() {
3029
+ this.debounce(this.repaint.bind(this), 1);
3030
+ }
3031
+ publishGeMouseEvent(e) {
3032
+ this.eventListener.onMouseClicked(e);
3033
+ }
3034
+ onFocusChanged(e) {
3035
+ this.eventListener.onFocusChanged(e);
3036
+ }
3037
+ onSelectionChanged(e) {
3038
+ this.eventListener.onSelectionChanged(e);
2416
3039
  }
2417
3040
  /**
2418
3041
  * Updates the table (repaint) when an external filter is changed.
@@ -2434,14 +3057,72 @@ class ne extends Qe {
2434
3057
  * @return {void}
2435
3058
  */
2436
3059
  onHeaderDblClicked(e, t, s) {
2437
- var o, r;
2438
- const i = this.tableModel.getColumnDef(s);
2439
- if (i != null && i.sortable && i.sortable()) {
3060
+ var i, l;
3061
+ const o = this.tableModel.getColumnDef(s);
3062
+ if (o != null && o.sortable && o.sortable()) {
2440
3063
  e.preventDefault(), e.stopPropagation();
2441
- const n = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, a = i.sortState ?? "", h = n[(n.indexOf(a) + 1) % n.length], d = new Ze(s, h);
2442
- this.tableModel.doSort([d]) && ((o = this.tableModel.getColumnDefs()) == null || o.forEach((p) => p.sortState = ""), i.sortState = h), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([d]);
3064
+ const n = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, a = o.sortState ?? "", c = n[(n.indexOf(a) + 1) % n.length], d = new lt(s, c);
3065
+ this.tableModel.doSort([d]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((g) => g.sortState = ""), o.sortState = c), this.repaint(), (l = this.storeSortingService) == null || l.setSortItems([d]);
2443
3066
  }
2444
3067
  }
3068
+ /**
3069
+ * Scrolls the viewport to the specified pixel coordinates.
3070
+ *
3071
+ * @param {number} px - The horizontal pixel coordinate to scroll to.
3072
+ * @param {number} py - The vertical pixel coordinate to scroll to.
3073
+ *
3074
+ * @return {void}
3075
+ */
3076
+ scrollToPixel(e, t) {
3077
+ this.scrollViewport.scrollTo(e, t);
3078
+ }
3079
+ /**
3080
+ * Scrolls to the specified index in the table.
3081
+ *
3082
+ * @param {number} _indexX - The horizontal index of the table where scrolling is needed.
3083
+ * @param {number} indexY - The vertical index of the table where scrolling is needed.
3084
+ * @return {void}
3085
+ */
3086
+ scrollToIndex(e, t) {
3087
+ const o = this.tableModel.getAreaModel("body").getYPosByRowIndex(t);
3088
+ this.scrollToPixel(0, o);
3089
+ }
3090
+ /**
3091
+ * Sets the selection model for the table.
3092
+ *
3093
+ * @param {SelectionModel} sm - The selection model to be set.
3094
+ * @param {boolean} rerender - Optional parameter indicating whether to rerender the table after setting the selection model. Default value is false.
3095
+ *
3096
+ * @return {void} - This method does not return any value.
3097
+ */
3098
+ setSelectionModel(e, t = !1) {
3099
+ const s = () => e;
3100
+ this.tableOptions.getSelectionModel = s, this.getSelectionModel = s, this.selectionService.getSelectionModel = s, t && this.repaint();
3101
+ }
3102
+ toggleHeaderGroup(e) {
3103
+ const t = this.tableModel.getAreaModel("header");
3104
+ "columnDefs" in this.tableModel && (this.tableModel.columnDefs = t.toggleHeaderGroup(e), console.info("####### !!!!!! *******, this.tableModel.columnDefs")), this.firstInit();
3105
+ }
3106
+ /**
3107
+ * Retrieves the selection model.
3108
+ * @returns {SelectionModelIf | undefined} The selection model if available, otherwise undefined.
3109
+ */
3110
+ selectionModel() {
3111
+ if (this != null && this.getSelectionModel)
3112
+ return this.getSelectionModel();
3113
+ }
3114
+ /**
3115
+ * Retrieves the focus model.
3116
+ *
3117
+ * @returns {FocusModelIf | undefined} The focus model if it exists, or undefined otherwise.
3118
+ */
3119
+ focusModel() {
3120
+ if (this != null && this.getFocusModel)
3121
+ return this.getFocusModel();
3122
+ }
3123
+ setDragging(e) {
3124
+ this.dragging = e, this.dragging ? (this.storeColumnWidths(), this.lastDragFrom = -1, this.lastDragTo = -1) : this.storedColumnWidths = [];
3125
+ }
2445
3126
  /**
2446
3127
  * Changes the focus cell using the specified deltas.
2447
3128
  *
@@ -2453,8 +3134,8 @@ class ne extends Qe {
2453
3134
  if (!this.isEditing() && this.getFocusModel) {
2454
3135
  const s = this.getFocusModel();
2455
3136
  if (s) {
2456
- const [i, o] = s.getFocus();
2457
- return s.setFocus(i + t, o + e), this.repaint(), !0;
3137
+ const [o, i] = s.getFocus();
3138
+ return s.setFocus(o + t, i + e), this.repaint(), !0;
2458
3139
  }
2459
3140
  }
2460
3141
  return !1;
@@ -2483,8 +3164,6 @@ class ne extends Qe {
2483
3164
  /**
2484
3165
  * Restores the scroll position of the table if auto restore options are enabled.
2485
3166
  *
2486
- * @private
2487
- * @memberof ClassName
2488
3167
  *
2489
3168
  * @returns {void}
2490
3169
  */
@@ -2525,21 +3204,21 @@ class ne extends Qe {
2525
3204
  autoRestoreCollapsedExpandedState() {
2526
3205
  var e, t;
2527
3206
  if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
2528
- const s = this.tableOptions.autoRestoreOptions, i = s.getRowId;
2529
- if (s.autoRestoreCollapsedExpandedState && i) {
2530
- const o = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
2531
- if (te(r)) {
2532
- const n = r, a = r.getRowCount();
2533
- for (let h = 0; h < a; h++) {
2534
- const d = r.getRowByIndex(h);
3207
+ const s = this.tableOptions.autoRestoreOptions, o = s.getRowId;
3208
+ if (s.autoRestoreCollapsedExpandedState && o) {
3209
+ const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), l = this.tableModel.getAreaModel("body");
3210
+ if (le(l)) {
3211
+ const n = l, a = l.getRowCount();
3212
+ for (let c = 0; c < a; c++) {
3213
+ const d = l.getRowByIndex(c);
2535
3214
  if (d)
2536
- if (o.allExpanded)
3215
+ if (i.allExpanded)
2537
3216
  d.expanded = !0;
2538
- else if (o.allCollapsed)
3217
+ else if (i.allCollapsed)
2539
3218
  d.expanded = !1;
2540
3219
  else {
2541
- const c = i(d.data);
2542
- o.mode === "expanded" ? d.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(c) : o.mode === "collapsed" && (d.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(c));
3220
+ const h = o(d.data);
3221
+ i.mode === "expanded" ? d.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h) : i.mode === "collapsed" && (d.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h));
2543
3222
  }
2544
3223
  }
2545
3224
  n.recalcVisibleTreeRows();
@@ -2547,100 +3226,370 @@ class ne extends Qe {
2547
3226
  }
2548
3227
  }
2549
3228
  }
2550
- /**
2551
- * Scrolls the viewport to the specified pixel coordinates.
2552
- *
2553
- * @param {number} px - The horizontal pixel coordinate to scroll to.
2554
- * @param {number} py - The vertical pixel coordinate to scroll to.
2555
- *
2556
- * @return {void}
2557
- */
2558
- scrollToPixel(e, t) {
2559
- this.scrollViewport.scrollTo(e, t);
2560
- }
2561
- /**
2562
- * Scrolls to the specified index in the table.
2563
- *
2564
- * @param {number} _indexX - The horizontal index of the table where scrolling is needed.
2565
- * @param {number} indexY - The vertical index of the table where scrolling is needed.
2566
- * @return {void}
2567
- */
2568
- scrollToIndex(e, t) {
2569
- const i = this.tableModel.getAreaModel("body").getYPosByRowIndex(t);
2570
- this.scrollToPixel(0, i);
2571
- }
2572
3229
  }
2573
- const ct = /* @__PURE__ */ He("<div>"), ft = (l) => {
3230
+ const Y = class Y {
3231
+ };
3232
+ Y.themes = ["light", "combat", "paper", "blackboard"], Y.vars = {
3233
+ light: `html[data-theme="light"] {
3234
+ --ge-table-bg: rgba(255,255,255, 0.5);
3235
+ --ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
3236
+ --ge-table-header-center-bg: rgba(233, 233, 233, 0.5);
3237
+ --ge-table-header-east-bg: rgba(233, 233, 233, 0.5);
3238
+ --ge-table-header-west-text: #000;
3239
+ --ge-table-header-center-text: #000;
3240
+ --ge-table-header-east-text: #000;
3241
+ --ge-table-header-west-horizontal-border: #ddd;
3242
+ --ge-table-header-west-vertical-border: #ccc;
3243
+ --ge-table-header-center-horizontal-border: #ddd;
3244
+ --ge-table-header-center-vertical-border: #ccc;
3245
+ --ge-table-header-east-horizontal-border: #ddd;
3246
+ --ge-table-header-east-vertical-border: #ccc;
3247
+ --ge-table-body-west-bg: rgba(233, 233, 233, 0.5);
3248
+ --ge-table-body-center-bg: rgba(255,255,255, 0.5);
3249
+ --ge-table-body-east-bg: rgba(233, 233, 233, 0.5);
3250
+ --ge-table-body-west-text: #000;
3251
+ --ge-table-body-center-text: #000;
3252
+ --ge-table-body-east-text: #000;
3253
+ --ge-table-body-west-horizontal-border: #ddd;
3254
+ --ge-table-body-west-vertical-border: #ccc;
3255
+ --ge-table-body-center-horizontal-border: #bbb;
3256
+ --ge-table-body-center-vertical-border: #ddd;
3257
+ --ge-table-body-east-horizontal-border: #ddd;
3258
+ --ge-table-body-east-vertical-border: #ccc;
3259
+ --ge-table-body-west-selected-range-bg: rgba(0, 152, 219, 0.4);
3260
+ --ge-table-body-center-selected-range-bg: rgba(0, 152, 219, 0.4);
3261
+ --ge-table-body-east-selected-range-bg: rgba(0, 152, 219, 0.4);
3262
+ --ge-table-body-west-selected-range-text: #000;
3263
+ --ge-table-body-center-selected-range-text: #000;
3264
+ --ge-table-body-east-selected-range-text: #000;
3265
+ --ge-table-footer-west-bg: rgba(233, 233, 233, 0.5);
3266
+ --ge-table-footer-center-bg: rgba(233, 233, 233, 0.5);
3267
+ --ge-table-footer-east-bg: rgba(233, 233, 233, 0.5);
3268
+ --ge-table-footer-west-text: #000;
3269
+ --ge-table-footer-center-text: #000;
3270
+ --ge-table-footer-east-text: #000;
3271
+ --ge-table-footer-west-horizontal-border: #ddd;
3272
+ --ge-table-footer-west-vertical-border: #ccc;
3273
+ --ge-table-footer-center-horizontal-border: #ddd;
3274
+ --ge-table-footer-center-vertical-border: #ccc;
3275
+ --ge-table-footer-east-horizontal-border: #ddd;
3276
+ --ge-table-footer-east-vertical-border: #ccc;
3277
+ --ge-table-border: #ccc;
3278
+ --ge-table-row-odd-bg: transparent;
3279
+ --ge-table-row-even-bg: transparent;
3280
+ --ge-table-column-odd-bg: transparent;
3281
+ --ge-table-column-even-bg: transparent;
3282
+ --ge-table-hover-column-bg: rgba(0, 224, 255, 0.27);
3283
+ --ge-table-hover-row-bg: rgba(0, 224, 255, 0.27);
3284
+ --ge-table-focus-border: rgb(0, 255, 255);
3285
+ --ge-table-color-error-text: #e00034;
3286
+ --ge-table-tree-arrow-collapsed-color: #e00034;
3287
+ --ge-table-column-resize-handle-border: rgb(0, 255, 255);
3288
+ --ge-table-dragged-col-div-bg: lightcyan;
3289
+ --ge-table-drop-zone-bg: rgba(244, 255, 242, 0.6);
3290
+ }`,
3291
+ combat: `html[data-theme="combat"] {
3292
+ --ge-table-bg: #101010;
3293
+ --ge-table-header-west-bg: #101010;
3294
+ --ge-table-header-center-bg: #101010;
3295
+ --ge-table-header-east-bg: #101010;
3296
+ --ge-table-header-west-text: oklch(100% 0 0);
3297
+ --ge-table-header-center-text: oklch(100% 0 0);
3298
+ --ge-table-header-east-text: oklch(100% 0 0);
3299
+ --ge-table-header-west-horizontal-border: oklch(100% 0 0 / 0%);
3300
+ --ge-table-header-west-vertical-border: oklch(100% 0 0 / 0%);
3301
+ --ge-table-header-center-horizontal-border: oklch(100% 0 0 / 0%);
3302
+ --ge-table-header-center-vertical-border: oklch(100% 0 0 / 0%);
3303
+ --ge-table-header-east-horizontal-border: oklch(100% 0 0 / 0%);
3304
+ --ge-table-header-east-vertical-border: oklch(100% 0 0 / 0%);
3305
+ --ge-table-body-west-bg: #101010;
3306
+ --ge-table-body-center-bg: #101010;
3307
+ --ge-table-body-east-bg: #101010;
3308
+ --ge-table-body-west-text: #b6b4b4;
3309
+ --ge-table-body-center-text: #b6b4b4;
3310
+ --ge-table-body-east-text: #b6b4b4;
3311
+ --ge-table-body-west-horizontal-border: oklch(100% 0 0 / 0%);
3312
+ --ge-table-body-west-vertical-border: oklch(100% 0 0 / 0%);
3313
+ --ge-table-body-center-horizontal-border: oklch(100% 0 0 / 0%);
3314
+ --ge-table-body-center-vertical-border: oklch(100% 0 0 / 0%);
3315
+ --ge-table-body-east-horizontal-border: oklch(100% 0 0 / 0%);
3316
+ --ge-table-body-east-vertical-border: oklch(100% 0 0 / 0%);
3317
+ --ge-table-body-west-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
3318
+ --ge-table-body-center-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
3319
+ --ge-table-body-east-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
3320
+ --ge-table-body-west-selected-range-text: #f00032;
3321
+ --ge-table-body-center-selected-range-text: #f00032;
3322
+ --ge-table-body-east-selected-range-text: #f00032;
3323
+ --ge-table-footer-west-bg: #101010;
3324
+ --ge-table-footer-center-bg: #101010;
3325
+ --ge-table-footer-east-bg: #101010;
3326
+ --ge-table-footer-west-text: oklch(100% 0 0);
3327
+ --ge-table-footer-center-text: oklch(100% 0 0);
3328
+ --ge-table-footer-east-text: oklch(100% 0 0);
3329
+ --ge-table-footer-west-horizontal-border: oklch(100% 0 0 / 0%);
3330
+ --ge-table-footer-west-vertical-border: oklch(100% 0 0 / 0%);
3331
+ --ge-table-footer-center-horizontal-border: oklch(100% 0 0 / 0%);
3332
+ --ge-table-footer-center-vertical-border: oklch(100% 0 0 / 0%);
3333
+ --ge-table-footer-east-horizontal-border: oklch(100% 0 0 / 0%);
3334
+ --ge-table-footer-east-vertical-border: oklch(100% 0 0 / 0%);
3335
+ --ge-table-border: oklch(100% 0 0 / 0%);
3336
+ --ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
3337
+ --ge-table-row-even-bg: oklch(100% 0 0 / 0%);
3338
+ --ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
3339
+ --ge-table-column-even-bg: oklch(100% 0 0 / 0%);
3340
+ --ge-table-hover-column-bg: oklch(34% 0.25 3.6 / 27%);
3341
+ --ge-table-hover-row-bg: oklch(34% 0.25 3.6 / 27%);
3342
+ --ge-table-focus-border: oklch(40% 0.25 3.6);
3343
+ --ge-table-color-error-text: oklch(65% 0.31 43.2);
3344
+ --ge-table-tree-arrow-collapsed-color: #e00034;
3345
+ --ge-table-column-resize-handle-border: oklch(63% 0.31 43.2);
3346
+ --ge-table-dragged-col-div-bg: #2c2e33;
3347
+ --ge-table-drop-zone-bg: #101010;
3348
+ }`,
3349
+ paper: `html[data-theme="paper"] {
3350
+ --ge-table-bg: #e7e5df;
3351
+ --ge-table-header-west-bg: oklch(80% 0.02 99 / 48%);
3352
+ --ge-table-header-center-bg: oklch(80% 0.02 99 / 48%);
3353
+ --ge-table-header-east-bg: oklch(80% 0.02 99 / 48%);
3354
+ --ge-table-header-west-text: #111;
3355
+ --ge-table-header-center-text: #111;
3356
+ --ge-table-header-east-text: #111;
3357
+ --ge-table-header-west-horizontal-border: oklch(100% 0 0 / 0%);
3358
+ --ge-table-header-west-vertical-border: oklch(100% 0 0 / 0%);
3359
+ --ge-table-header-center-horizontal-border: oklch(100% 0 0 / 0%);
3360
+ --ge-table-header-center-vertical-border: oklch(100% 0 0 / 0%);
3361
+ --ge-table-header-east-horizontal-border: oklch(100% 0 0 / 0%);
3362
+ --ge-table-header-east-vertical-border: oklch(100% 0 0 / 0%);
3363
+ --ge-table-body-west-bg: oklch(80% 0.02 99 / 48%);
3364
+ --ge-table-body-center-bg: #e7e5df;
3365
+ --ge-table-body-east-bg: oklch(80% 0.02 99 / 48%);
3366
+ --ge-table-body-west-text: #000;
3367
+ --ge-table-body-center-text: #000;
3368
+ --ge-table-body-east-text: #000;
3369
+ --ge-table-body-west-horizontal-border: oklch(100% 0 0 / 0%);
3370
+ --ge-table-body-west-vertical-border: oklch(100% 0 0 / 0%);
3371
+ --ge-table-body-center-horizontal-border: oklch(100% 0 0 / 0%);
3372
+ --ge-table-body-center-vertical-border: oklch(100% 0 0 / 0%);
3373
+ --ge-table-body-east-horizontal-border: oklch(100% 0 0 / 0%);
3374
+ --ge-table-body-east-vertical-border: oklch(100% 0 0 / 0%);
3375
+ --ge-table-body-west-selected-range-bg: #cfcdc2;
3376
+ --ge-table-body-center-selected-range-bg: #cfcdc2;
3377
+ --ge-table-body-east-selected-range-bg: #cfcdc2;
3378
+ --ge-table-body-west-selected-range-text: #000;
3379
+ --ge-table-body-center-selected-range-text: #000;
3380
+ --ge-table-body-east-selected-range-text: #000;
3381
+ --ge-table-footer-west-bg: oklch(80% 0.02 99 / 48%);
3382
+ --ge-table-footer-center-bg: oklch(80% 0.02 99 / 48%);
3383
+ --ge-table-footer-east-bg: oklch(80% 0.02 99 / 48%);
3384
+ --ge-table-footer-west-text: #111;
3385
+ --ge-table-footer-center-text: #111;
3386
+ --ge-table-footer-east-text: #111;
3387
+ --ge-table-footer-west-horizontal-border: oklch(100% 0 0 / 0%);
3388
+ --ge-table-footer-west-vertical-border: oklch(100% 0 0 / 0%);
3389
+ --ge-table-footer-center-horizontal-border: oklch(100% 0 0 / 0%);
3390
+ --ge-table-footer-center-vertical-border: oklch(100% 0 0 / 0%);
3391
+ --ge-table-footer-east-horizontal-border: oklch(100% 0 0 / 0%);
3392
+ --ge-table-footer-east-vertical-border: oklch(100% 0 0 / 0%);
3393
+ --ge-table-border: oklch(100% 0 0 / 0%);
3394
+ --ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
3395
+ --ge-table-row-even-bg: oklch(100% 0 0 / 0%);
3396
+ --ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
3397
+ --ge-table-column-even-bg: oklch(100% 0 0 / 0%);
3398
+ --ge-table-hover-column-bg: oklch(5% 0.2 266.40000000000003 / 9%);
3399
+ --ge-table-hover-row-bg: oklch(5% 0.2 266.40000000000003 / 9%);
3400
+ --ge-table-focus-border: oklch(100% 0.19 205.20000000000002);
3401
+ --ge-table-color-error-text: oklch(45% 0.25 43.2);
3402
+ --ge-table-tree-arrow-collapsed-color: #e00034;
3403
+ --ge-table-column-resize-handle-border: oklch(100% 0.19 205.20000000000002 / 71%);
3404
+ --ge-table-dragged-col-div-bg: #2c2e33;
3405
+ --ge-table-drop-zone-bg: #e7e5df;
3406
+ }`,
3407
+ blackboard: `html[data-theme="dark"] {
3408
+ --ge-table-bg: #0c1021;
3409
+ --ge-table-header-west-bg: #0c1021;
3410
+ --ge-table-header-center-bg: #0c1021;
3411
+ --ge-table-header-east-bg: #0c1021;
3412
+ --ge-table-header-west-text: #e0df85;
3413
+ --ge-table-header-center-text: #e0df85;
3414
+ --ge-table-header-east-text: #e0df85;
3415
+ --ge-table-header-west-horizontal-border: transparent;
3416
+ --ge-table-header-west-vertical-border: transparent;
3417
+ --ge-table-header-center-horizontal-border: transparent;
3418
+ --ge-table-header-center-vertical-border: transparent;
3419
+ --ge-table-header-east-horizontal-border: transparent;
3420
+ --ge-table-header-east-vertical-border: transparent;
3421
+ --ge-table-body-west-bg: #0c1021;
3422
+ --ge-table-body-center-bg: #0c1021;
3423
+ --ge-table-body-east-bg: #0c1021;
3424
+ --ge-table-body-west-text: #a7a7a7;
3425
+ --ge-table-body-center-text: #a7a7a7;
3426
+ --ge-table-body-east-text: #a7a7a7;
3427
+ --ge-table-body-west-horizontal-border: transparent;
3428
+ --ge-table-body-west-vertical-border: transparent;
3429
+ --ge-table-body-center-horizontal-border: transparent;
3430
+ --ge-table-body-center-vertical-border: transparent;
3431
+ --ge-table-body-east-horizontal-border: transparent;
3432
+ --ge-table-body-east-vertical-border: transparent;
3433
+ --ge-table-body-west-selected-range-bg: #758129;
3434
+ --ge-table-body-center-selected-range-bg: #758129;
3435
+ --ge-table-body-east-selected-range-bg: #758129;
3436
+ --ge-table-body-west-selected-range-text: oklch(100% 0 0);
3437
+ --ge-table-body-center-selected-range-text: oklch(100% 0 0);
3438
+ --ge-table-body-east-selected-range-text: oklch(100% 0 0);
3439
+ --ge-table-footer-west-bg: #0c1021;
3440
+ --ge-table-footer-center-bg: #0c1021;
3441
+ --ge-table-footer-east-bg: #0c1021;
3442
+ --ge-table-footer-west-text: #e0df85;
3443
+ --ge-table-footer-center-text: #e0df85;
3444
+ --ge-table-footer-east-text: #e0df85;
3445
+ --ge-table-footer-west-horizontal-border: transparent;
3446
+ --ge-table-footer-west-vertical-border: transparent;
3447
+ --ge-table-footer-center-horizontal-border: transparent;
3448
+ --ge-table-footer-center-vertical-border: otransparent;
3449
+ --ge-table-footer-east-horizontal-border: transparent;
3450
+ --ge-table-footer-east-vertical-border: transparent;
3451
+ --ge-table-border: oklch(0% 0 0);
3452
+ --ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
3453
+ --ge-table-row-even-bg: oklch(100% 0 0 / 0%);
3454
+ --ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
3455
+ --ge-table-column-even-bg: oklch(100% 0 0 / 0%);
3456
+ --ge-table-hover-column-bg: #a9a9a9;
3457
+ --ge-table-hover-row-bg: #a9a9a9;
3458
+ --ge-table-focus-border: #e1ff00;
3459
+ --ge-table-color-error-text: #ff0040;
3460
+ --ge-table-tree-arrow-collapsed-color: #e00034;
3461
+ --ge-table-column-resize-handle-border: oklch(0% 0 0);
3462
+ --ge-table-dragged-col-div-bg: #2c2e33;
3463
+ --ge-table-drop-zone-bg: #758129;
3464
+ }`
3465
+ };
3466
+ let fe = Y;
3467
+ const U = class U {
3468
+ constructor(e = new Re()) {
3469
+ this.headerGroupOptions = e;
3470
+ }
3471
+ render(e, t, s, o, i, l, n) {
3472
+ const a = l != null && l.data ? l.data : "";
3473
+ if (l) {
3474
+ const { toggle: c, visibility: d, closed: h } = l, g = c ? U.toggleHeaderGroup : "";
3475
+ this.addText(e, o, t, s, a, g), c && d !== "always" && this.addArrowDiv(n, e, !h, t, s, o, g);
3476
+ } else
3477
+ this.addText(e, o, t, s, a, "");
3478
+ }
3479
+ addText(e, t, s, o, i, l) {
3480
+ e.innerHTML = `<span
3481
+ data-ge-action="${l}"
3482
+ data-area="${t}"
3483
+ data-row-index="${s}"
3484
+ data-col-index="${o}"
3485
+ >${i}</span>`;
3486
+ }
3487
+ addArrowDiv(e, t, s = !0, o = -1, i = -1, l = "header", n) {
3488
+ const a = e.createElement("div");
3489
+ e.addClass(a, "ge-table-toggle-icon-div"), e.setStyle(a, "display", "inline-block"), e.setStyle(a, "position", ""), e.setStyle(a, "width", "20px"), e.setStyle(a, "background", "transparent"), e.setStyle(a, "cursor", "pointer"), e.setAttribute(a, "data-row-index", `${o}`), e.setAttribute(a, "data-col-index", `${i}`), e.setAttribute(a, "data-area", `${l}`), e.setAttribute(a, "data-ge-action", `${n}`);
3490
+ let c;
3491
+ s ? c = this.headerGroupOptions.iconExpanded : c = this.headerGroupOptions.iconCollapsed;
3492
+ const d = c.content, h = e.createText(d);
3493
+ e.appendChild(a, h), c.style && this.applyStyleString(e, a, c.style);
3494
+ for (const g of c.classes)
3495
+ e.addClass(a, g);
3496
+ return e.appendChild(t, a), a;
3497
+ }
3498
+ applyStyleString(e, t, s) {
3499
+ const o = s.split(";").map((i) => i.trim()).filter((i) => i);
3500
+ for (const i of o) {
3501
+ const [l, n] = i.split(":");
3502
+ e.setStyle(t, l.trim(), n.trim());
3503
+ }
3504
+ }
3505
+ };
3506
+ U.toggleHeaderGroup = "toggleHeaderGroup";
3507
+ let Se = U;
3508
+ const St = /* @__PURE__ */ ze("<div>"), vt = (r) => {
2574
3509
  let e;
2575
- const t = be({
3510
+ const t = xe({
2576
3511
  tableModel: null,
2577
- tableOptions: new Ce()
2578
- }, l);
2579
- return Re(() => {
3512
+ tableOptions: new Te()
3513
+ }, r);
3514
+ return Fe(() => {
2580
3515
  const s = {
2581
- onCheckboxChanged: (r) => {
3516
+ onSelectionChanged(l) {
3517
+ const n = new CustomEvent("selectionChanged", {
3518
+ detail: l,
3519
+ bubbles: !0
3520
+ });
3521
+ e && e.dispatchEvent(n);
3522
+ },
3523
+ onFocusChanged(l) {
3524
+ const n = new CustomEvent("focusChanged", {
3525
+ detail: l,
3526
+ bubbles: !0
3527
+ });
3528
+ e && e.dispatchEvent(n);
3529
+ },
3530
+ onCheckboxChanged: (l) => {
2582
3531
  const n = new CustomEvent("checkboxChanged", {
2583
- detail: r,
3532
+ detail: l,
2584
3533
  bubbles: !0
2585
3534
  });
2586
3535
  e && e.dispatchEvent(n);
2587
3536
  },
2588
- onContextmenu: (r) => {
3537
+ onContextmenu: (l) => {
2589
3538
  const n = new CustomEvent("contextmenu", {
2590
- detail: r,
3539
+ detail: l,
2591
3540
  bubbles: !0
2592
3541
  });
2593
3542
  e && e.dispatchEvent(n);
2594
3543
  },
2595
- onModelChanged: (r) => {
3544
+ onModelChanged: (l) => {
2596
3545
  const n = new CustomEvent("modelChanged", {
2597
- detail: r,
3546
+ detail: l,
2598
3547
  bubbles: !0
2599
3548
  });
2600
3549
  e && e.dispatchEvent(n);
2601
3550
  },
2602
- onMouseClicked: (r) => {
3551
+ onMouseClicked: (l) => {
2603
3552
  const n = new CustomEvent("mouseClicked", {
2604
- detail: r,
3553
+ detail: l,
2605
3554
  bubbles: !0
2606
3555
  });
2607
3556
  e && e.dispatchEvent(n);
2608
3557
  },
2609
- onMouseDragging: (r) => {
3558
+ onMouseDragging: (l) => {
2610
3559
  const n = new CustomEvent("mouseDragging", {
2611
- detail: r,
3560
+ detail: l,
2612
3561
  bubbles: !0
2613
3562
  });
2614
3563
  e && e.dispatchEvent(n);
2615
3564
  },
2616
- onMouseDraggingEnd: (r) => {
3565
+ onMouseDraggingEnd: (l) => {
2617
3566
  const n = new CustomEvent("mouseDraggingEnd", {
2618
- detail: r,
3567
+ detail: l,
2619
3568
  bubbles: !0
2620
3569
  });
2621
3570
  e && e.dispatchEvent(n);
2622
3571
  },
2623
- onMouseMoved: (r) => {
3572
+ onMouseMoved: (l) => {
2624
3573
  const n = new CustomEvent("mouseMoved", {
2625
- detail: r,
3574
+ detail: l,
2626
3575
  bubbles: !0
2627
3576
  });
2628
3577
  e && e.dispatchEvent(n);
2629
3578
  }
2630
- }, i = new ne(e, t.tableModel, new we(), t.tableOptions, s);
2631
- i.firstInit();
2632
- const o = new CustomEvent("tableReady", {
2633
- detail: i.getApi(),
3579
+ }, o = new he(e, t.tableModel, new Me(), t.tableOptions, s);
3580
+ o.firstInit();
3581
+ const i = new CustomEvent("tableReady", {
3582
+ detail: o.getApi(),
2634
3583
  bubbles: !0
2635
3584
  });
2636
- e && e.dispatchEvent(o), t.licenseKey && $.getInstance().setLicenseKey(t.licenseKey);
3585
+ e && e.dispatchEvent(i), t.licenseKey && $.getInstance().setLicenseKey(t.licenseKey);
2637
3586
  }), (() => {
2638
- const s = ct(), i = e;
2639
- return typeof i == "function" ? Ve(i, s) : e = s, s;
3587
+ const s = St(), o = e;
3588
+ return typeof o == "function" ? je(o, s) : e = s, s;
2640
3589
  })();
2641
3590
  };
2642
3591
  export {
2643
- ut as ComponentRendererWrapper,
2644
- ft as GuiexpertTable,
2645
- pt as GuiexpertTableProps
3592
+ mt as ComponentRendererWrapper,
3593
+ vt as GuiexpertTable,
3594
+ yt as GuiexpertTableProps
2646
3595
  };