@guiexpert/solid-table 1.0.10 → 1.0.11

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.
Files changed (3) hide show
  1. package/index.cjs +3 -3
  2. package/index.js +337 -305
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -2,24 +2,24 @@ const we = (l, e) => l === e, q = Symbol("solid-proxy"), ae = {
2
2
  equals: we
3
3
  };
4
4
  let ce = pe;
5
- const L = 1, _ = 2, ue = {
5
+ const L = 1, k = 2, ue = {
6
6
  owned: null,
7
7
  cleanups: null,
8
8
  context: null,
9
9
  owner: null
10
10
  };
11
11
  var A = null;
12
- let Y = null, b = null, E = null, F = null, z = 0;
13
- function xe(l, e) {
14
- const t = b, s = A, i = l.length === 0, o = e === void 0 ? s : e, n = i ? ue : {
12
+ let Y = null, b = null, E = null, F = null, X = 0;
13
+ function Ce(l, e) {
14
+ const t = b, s = A, i = l.length === 0, o = e === void 0 ? s : e, r = i ? ue : {
15
15
  owned: null,
16
16
  cleanups: null,
17
17
  context: o ? o.context : null,
18
18
  owner: o
19
- }, r = i ? l : () => l(() => P(() => X(n)));
20
- A = n, b = null;
19
+ }, n = i ? l : () => l(() => P(() => K(r)));
20
+ A = r, b = null;
21
21
  try {
22
- return H(r, !0);
22
+ return H(n, !0);
23
23
  } finally {
24
24
  b = t, A = s;
25
25
  }
@@ -28,7 +28,7 @@ function J(l, e, t) {
28
28
  const s = te(l, e, !1, L);
29
29
  W(s);
30
30
  }
31
- function Ce(l, e, t) {
31
+ function xe(l, e, t) {
32
32
  ce = Ie;
33
33
  const s = te(l, e, !1, L);
34
34
  (!t || !t.render) && (s.user = !0), F ? F.push(s) : W(s);
@@ -50,7 +50,7 @@ function P(l) {
50
50
  }
51
51
  }
52
52
  function Ae(l) {
53
- Ce(() => P(l));
53
+ xe(() => P(l));
54
54
  }
55
55
  function Me() {
56
56
  if (this.sources && this.state)
@@ -70,8 +70,8 @@ function Re(l, e, t) {
70
70
  let s = l.value;
71
71
  return (!l.comparator || !l.comparator(s, e)) && (l.value = e, l.observers && l.observers.length && H(() => {
72
72
  for (let i = 0; i < l.observers.length; i += 1) {
73
- const o = l.observers[i], n = Y && Y.running;
74
- n && Y.disposed.has(o), (n ? !o.tState : !o.state) && (o.pure ? E.push(o) : F.push(o), o.observers && fe(o)), n || (o.state = L);
73
+ const o = l.observers[i], r = Y && Y.running;
74
+ r && Y.disposed.has(o), (r ? !o.tState : !o.state) && (o.pure ? E.push(o) : F.push(o), o.observers && fe(o)), r || (o.state = L);
75
75
  }
76
76
  if (E.length > 1e6)
77
77
  throw E = [], new Error();
@@ -80,8 +80,8 @@ function Re(l, e, t) {
80
80
  function W(l) {
81
81
  if (!l.fn)
82
82
  return;
83
- X(l);
84
- const e = A, t = b, s = z;
83
+ K(l);
84
+ const e = A, t = b, s = X;
85
85
  b = A = l, Te(l, l.value, s), b = t, A = e;
86
86
  }
87
87
  function Te(l, e, t) {
@@ -89,7 +89,7 @@ function Te(l, e, t) {
89
89
  try {
90
90
  s = l.fn(e);
91
91
  } catch (i) {
92
- return l.pure && (l.state = L, l.owned && l.owned.forEach(X), l.owned = null), l.updatedAt = t + 1, Se(i);
92
+ return l.pure && (l.state = L, l.owned && l.owned.forEach(K), l.owned = null), l.updatedAt = t + 1, Se(i);
93
93
  }
94
94
  (!l.updatedAt || l.updatedAt <= t) && (l.updatedAt != null && "observers" in l ? Re(l, s) : l.value = s, l.updatedAt = t);
95
95
  }
@@ -112,17 +112,17 @@ function te(l, e, t, s = L, i) {
112
112
  function G(l) {
113
113
  if (l.state === 0)
114
114
  return;
115
- if (l.state === _)
115
+ if (l.state === k)
116
116
  return N(l);
117
117
  if (l.suspense && P(l.suspense.inFallback))
118
118
  return l.suspense.effects.push(l);
119
119
  const e = [l];
120
- for (; (l = l.owner) && (!l.updatedAt || l.updatedAt < z); )
120
+ for (; (l = l.owner) && (!l.updatedAt || l.updatedAt < X); )
121
121
  l.state && e.push(l);
122
122
  for (let t = e.length - 1; t >= 0; t--)
123
123
  if (l = e[t], l.state === L)
124
124
  W(l);
125
- else if (l.state === _) {
125
+ else if (l.state === k) {
126
126
  const s = E;
127
127
  E = null, H(() => N(l, e[0]), !1), E = s;
128
128
  }
@@ -131,7 +131,7 @@ function H(l, e) {
131
131
  if (E)
132
132
  return l();
133
133
  let t = !1;
134
- e || (E = []), F ? t = !0 : F = [], z++;
134
+ e || (E = []), F ? t = !0 : F = [], X++;
135
135
  try {
136
136
  const s = l();
137
137
  return De(t), s;
@@ -164,29 +164,29 @@ function N(l, e) {
164
164
  const s = l.sources[t];
165
165
  if (s.sources) {
166
166
  const i = s.state;
167
- i === L ? s !== e && (!s.updatedAt || s.updatedAt < z) && G(s) : i === _ && N(s, e);
167
+ i === L ? s !== e && (!s.updatedAt || s.updatedAt < X) && G(s) : i === k && N(s, e);
168
168
  }
169
169
  }
170
170
  }
171
171
  function fe(l) {
172
172
  for (let e = 0; e < l.observers.length; e += 1) {
173
173
  const t = l.observers[e];
174
- t.state || (t.state = _, t.pure ? E.push(t) : F.push(t), t.observers && fe(t));
174
+ t.state || (t.state = k, t.pure ? E.push(t) : F.push(t), t.observers && fe(t));
175
175
  }
176
176
  }
177
- function X(l) {
177
+ function K(l) {
178
178
  let e;
179
179
  if (l.sources)
180
180
  for (; l.sources.length; ) {
181
181
  const t = l.sources.pop(), s = l.sourceSlots.pop(), i = t.observers;
182
182
  if (i && i.length) {
183
- const o = i.pop(), n = t.observerSlots.pop();
184
- s < i.length && (o.sourceSlots[n] = s, i[s] = o, t.observerSlots[s] = n);
183
+ const o = i.pop(), r = t.observerSlots.pop();
184
+ s < i.length && (o.sourceSlots[r] = s, i[s] = o, t.observerSlots[s] = r);
185
185
  }
186
186
  }
187
187
  if (l.owned) {
188
188
  for (e = l.owned.length - 1; e >= 0; e--)
189
- X(l.owned[e]);
189
+ K(l.owned[e]);
190
190
  l.owned = null;
191
191
  }
192
192
  if (l.cleanups) {
@@ -204,7 +204,7 @@ function Oe(l) {
204
204
  function Se(l, e = A) {
205
205
  throw Oe(l);
206
206
  }
207
- function k() {
207
+ function _() {
208
208
  return !0;
209
209
  }
210
210
  const Fe = {
@@ -214,8 +214,8 @@ const Fe = {
214
214
  has(l, e) {
215
215
  return e === q ? !0 : l.has(e);
216
216
  },
217
- set: k,
218
- deleteProperty: k,
217
+ set: _,
218
+ deleteProperty: _,
219
219
  getOwnPropertyDescriptor(l, e) {
220
220
  return {
221
221
  configurable: !0,
@@ -223,8 +223,8 @@ const Fe = {
223
223
  get() {
224
224
  return l.get(e);
225
225
  },
226
- set: k,
227
- deleteProperty: k
226
+ set: _,
227
+ deleteProperty: _
228
228
  };
229
229
  },
230
230
  ownKeys(l) {
@@ -244,104 +244,104 @@ function Le() {
244
244
  function ge(...l) {
245
245
  let e = !1;
246
246
  for (let o = 0; o < l.length; o++) {
247
- const n = l[o];
248
- e = e || !!n && q in n, l[o] = typeof n == "function" ? (e = !0, Ee(n)) : n;
247
+ const r = l[o];
248
+ e = e || !!r && q in r, l[o] = typeof r == "function" ? (e = !0, Ee(r)) : r;
249
249
  }
250
250
  if (e)
251
251
  return new Proxy({
252
252
  get(o) {
253
- for (let n = l.length - 1; n >= 0; n--) {
254
- const r = U(l[n])[o];
255
- if (r !== void 0)
256
- return r;
253
+ for (let r = l.length - 1; r >= 0; r--) {
254
+ const n = U(l[r])[o];
255
+ if (n !== void 0)
256
+ return n;
257
257
  }
258
258
  },
259
259
  has(o) {
260
- for (let n = l.length - 1; n >= 0; n--)
261
- if (o in U(l[n]))
260
+ for (let r = l.length - 1; r >= 0; r--)
261
+ if (o in U(l[r]))
262
262
  return !0;
263
263
  return !1;
264
264
  },
265
265
  keys() {
266
266
  const o = [];
267
- for (let n = 0; n < l.length; n++)
268
- o.push(...Object.keys(U(l[n])));
267
+ for (let r = 0; r < l.length; r++)
268
+ o.push(...Object.keys(U(l[r])));
269
269
  return [...new Set(o)];
270
270
  }
271
271
  }, Fe);
272
272
  const t = {}, s = {}, i = /* @__PURE__ */ new Set();
273
273
  for (let o = l.length - 1; o >= 0; o--) {
274
- const n = l[o];
275
- if (!n)
274
+ const r = l[o];
275
+ if (!r)
276
276
  continue;
277
- const r = Object.getOwnPropertyNames(n);
278
- for (let a = 0, h = r.length; a < h; a++) {
279
- const d = r[a];
277
+ const n = Object.getOwnPropertyNames(r);
278
+ for (let a = 0, h = n.length; a < h; a++) {
279
+ const d = n[a];
280
280
  if (d === "__proto__" || d === "constructor")
281
281
  continue;
282
- const c = Object.getOwnPropertyDescriptor(n, d);
282
+ const c = Object.getOwnPropertyDescriptor(r, d);
283
283
  if (!i.has(d))
284
284
  c.get ? (i.add(d), Object.defineProperty(t, d, {
285
285
  enumerable: !0,
286
286
  configurable: !0,
287
- get: Le.bind(s[d] = [c.get.bind(n)])
287
+ get: Le.bind(s[d] = [c.get.bind(r)])
288
288
  })) : (c.value !== void 0 && i.add(d), t[d] = c.value);
289
289
  else {
290
290
  const p = s[d];
291
- p ? c.get ? p.push(c.get.bind(n)) : c.value !== void 0 && p.push(() => c.value) : t[d] === void 0 && (t[d] = c.value);
291
+ 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);
292
292
  }
293
293
  }
294
294
  }
295
295
  return t;
296
296
  }
297
297
  function $e(l, e, t) {
298
- let s = t.length, i = e.length, o = s, n = 0, r = 0, a = e[i - 1].nextSibling, h = null;
299
- for (; n < i || r < o; ) {
300
- if (e[n] === t[r]) {
301
- n++, r++;
298
+ let s = t.length, i = e.length, o = s, r = 0, n = 0, a = e[i - 1].nextSibling, h = null;
299
+ for (; r < i || n < o; ) {
300
+ if (e[r] === t[n]) {
301
+ r++, n++;
302
302
  continue;
303
303
  }
304
304
  for (; e[i - 1] === t[o - 1]; )
305
305
  i--, o--;
306
- if (i === n) {
307
- const d = o < s ? r ? t[r - 1].nextSibling : t[o - r] : a;
308
- for (; r < o; )
309
- l.insertBefore(t[r++], d);
310
- } else if (o === r)
311
- for (; n < i; )
312
- (!h || !h.has(e[n])) && e[n].remove(), n++;
313
- else if (e[n] === t[o - 1] && t[r] === e[i - 1]) {
306
+ if (i === r) {
307
+ const d = o < s ? n ? t[n - 1].nextSibling : t[o - n] : a;
308
+ for (; n < o; )
309
+ l.insertBefore(t[n++], d);
310
+ } else if (o === n)
311
+ for (; r < i; )
312
+ (!h || !h.has(e[r])) && e[r].remove(), r++;
313
+ else if (e[r] === t[o - 1] && t[n] === e[i - 1]) {
314
314
  const d = e[--i].nextSibling;
315
- l.insertBefore(t[r++], e[n++].nextSibling), l.insertBefore(t[--o], d), e[i] = t[o];
315
+ l.insertBefore(t[n++], e[r++].nextSibling), l.insertBefore(t[--o], d), e[i] = t[o];
316
316
  } else {
317
317
  if (!h) {
318
318
  h = /* @__PURE__ */ new Map();
319
- let c = r;
319
+ let c = n;
320
320
  for (; c < o; )
321
321
  h.set(t[c], c++);
322
322
  }
323
- const d = h.get(e[n]);
323
+ const d = h.get(e[r]);
324
324
  if (d != null)
325
- if (r < d && d < o) {
326
- let c = n, p = 1, g;
325
+ if (n < d && d < o) {
326
+ let c = r, p = 1, g;
327
327
  for (; ++c < i && c < o && !((g = h.get(e[c])) == null || g !== d + p); )
328
328
  p++;
329
- if (p > d - r) {
330
- const u = e[n];
331
- for (; r < d; )
332
- l.insertBefore(t[r++], u);
329
+ if (p > d - n) {
330
+ const u = e[r];
331
+ for (; n < d; )
332
+ l.insertBefore(t[n++], u);
333
333
  } else
334
- l.replaceChild(t[r++], e[n++]);
334
+ l.replaceChild(t[n++], e[r++]);
335
335
  } else
336
- n++;
336
+ r++;
337
337
  else
338
- e[n++].remove();
338
+ e[r++].remove();
339
339
  }
340
340
  }
341
341
  }
342
342
  function Be(l, e, t, s = {}) {
343
343
  let i;
344
- return xe((o) => {
344
+ return Ce((o) => {
345
345
  i = o, e === document ? l() : He(e, l(), e.firstChild ? null : void 0, t);
346
346
  }, s.owner), () => {
347
347
  i(), e.textContent = "";
@@ -350,8 +350,8 @@ function Be(l, e, t, s = {}) {
350
350
  function Pe(l, e, t) {
351
351
  let s;
352
352
  const i = () => {
353
- const n = document.createElement("template");
354
- return n.innerHTML = l, t ? n.content.firstChild.firstChild : n.content.firstChild;
353
+ const r = document.createElement("template");
354
+ return r.innerHTML = l, t ? r.content.firstChild.firstChild : r.content.firstChild;
355
355
  }, o = e ? () => P(() => document.importNode(s || (s = i()), !0)) : () => (s || (s = i())).cloneNode(!0);
356
356
  return o.cloneNode = o, o;
357
357
  }
@@ -368,11 +368,11 @@ function j(l, e, t, s, i) {
368
368
  t = t();
369
369
  if (e === t)
370
370
  return t;
371
- const o = typeof e, n = s !== void 0;
372
- if (l = n && t[0] && t[0].parentNode || l, o === "string" || o === "number")
373
- if (o === "number" && (e = e.toString()), n) {
374
- let r = t[0];
375
- r && r.nodeType === 3 ? r.data = e : r = document.createTextNode(e), t = B(l, t, s, r);
371
+ const o = typeof e, r = s !== void 0;
372
+ if (l = r && t[0] && t[0].parentNode || l, o === "string" || o === "number")
373
+ if (o === "number" && (e = e.toString()), r) {
374
+ let n = t[0];
375
+ n && n.nodeType === 3 ? n.data = e : n = document.createTextNode(e), t = B(l, t, s, n);
376
376
  } else
377
377
  t !== "" && typeof t == "string" ? t = l.firstChild.data = e : t = l.textContent = e;
378
378
  else if (e == null || o === "boolean")
@@ -380,24 +380,24 @@ function j(l, e, t, s, i) {
380
380
  else {
381
381
  if (o === "function")
382
382
  return J(() => {
383
- let r = e();
384
- for (; typeof r == "function"; )
385
- r = r();
386
- t = j(l, r, t, s);
383
+ let n = e();
384
+ for (; typeof n == "function"; )
385
+ n = n();
386
+ t = j(l, n, t, s);
387
387
  }), () => t;
388
388
  if (Array.isArray(e)) {
389
- const r = [], a = t && Array.isArray(t);
390
- if (Q(r, e, t, i))
391
- return J(() => t = j(l, r, t, s, !0)), () => t;
392
- if (r.length === 0) {
393
- if (t = B(l, t, s), n)
389
+ const n = [], a = t && Array.isArray(t);
390
+ if (Q(n, e, t, i))
391
+ return J(() => t = j(l, n, t, s, !0)), () => t;
392
+ if (n.length === 0) {
393
+ if (t = B(l, t, s), r)
394
394
  return t;
395
395
  } else
396
- a ? t.length === 0 ? de(l, r, s) : $e(l, t, r) : (t && B(l), de(l, r));
397
- t = r;
396
+ a ? t.length === 0 ? de(l, n, s) : $e(l, t, n) : (t && B(l), de(l, n));
397
+ t = n;
398
398
  } else if (e.nodeType) {
399
399
  if (Array.isArray(t)) {
400
- if (n)
400
+ if (r)
401
401
  return t = B(l, t, s, e);
402
402
  B(l, t, null, e);
403
403
  } else
@@ -409,22 +409,22 @@ function j(l, e, t, s, i) {
409
409
  }
410
410
  function Q(l, e, t, s) {
411
411
  let i = !1;
412
- for (let o = 0, n = e.length; o < n; o++) {
413
- let r = e[o], a = t && t[o], h;
414
- if (!(r == null || r === !0 || r === !1))
415
- if ((h = typeof r) == "object" && r.nodeType)
416
- l.push(r);
417
- else if (Array.isArray(r))
418
- i = Q(l, r, a) || i;
412
+ for (let o = 0, r = e.length; o < r; o++) {
413
+ let n = e[o], a = t && t[o], h;
414
+ if (!(n == null || n === !0 || n === !1))
415
+ if ((h = typeof n) == "object" && n.nodeType)
416
+ l.push(n);
417
+ else if (Array.isArray(n))
418
+ i = Q(l, n, a) || i;
419
419
  else if (h === "function")
420
420
  if (s) {
421
- for (; typeof r == "function"; )
422
- r = r();
423
- i = Q(l, Array.isArray(r) ? r : [r], Array.isArray(a) ? a : [a]) || i;
421
+ for (; typeof n == "function"; )
422
+ n = n();
423
+ i = Q(l, Array.isArray(n) ? n : [n], Array.isArray(a) ? a : [a]) || i;
424
424
  } else
425
- l.push(r), i = !0;
425
+ l.push(n), i = !0;
426
426
  else {
427
- const d = String(r);
427
+ const d = String(n);
428
428
  a && a.nodeType === 3 && a.data === d ? l.push(a) : l.push(document.createTextNode(d));
429
429
  }
430
430
  }
@@ -440,11 +440,11 @@ function B(l, e, t, s) {
440
440
  const i = s || document.createTextNode("");
441
441
  if (e.length) {
442
442
  let o = !1;
443
- for (let n = e.length - 1; n >= 0; n--) {
444
- const r = e[n];
445
- if (i !== r) {
446
- const a = r.parentNode === l;
447
- !o && !n ? a ? l.replaceChild(i, r) : l.insertBefore(i, t) : a && r.remove();
443
+ for (let r = e.length - 1; r >= 0; r--) {
444
+ const n = e[r];
445
+ if (i !== n) {
446
+ const a = n.parentNode === l;
447
+ !o && !r ? a ? l.replaceChild(i, n) : l.insertBefore(i, t) : a && n.remove();
448
448
  } else
449
449
  o = !0;
450
450
  }
@@ -456,13 +456,13 @@ class ht {
456
456
  constructor(e) {
457
457
  this.code = e;
458
458
  }
459
- render(e, t, s, i, o, n, r) {
459
+ render(e, t, s, i, o, r, n) {
460
460
  const a = ge({
461
461
  rowIndex: t,
462
462
  columnIndex: s,
463
463
  areaIdent: i,
464
464
  areaModel: o,
465
- cellValue: n
465
+ cellValue: r
466
466
  });
467
467
  Be(
468
468
  () => this.code(a),
@@ -480,8 +480,8 @@ function ee(l) {
480
480
  return l && l.type === "AreaModelTree";
481
481
  }
482
482
  class se {
483
- constructor(e = -1, t = -1, s = -1, i = -1, o, n, r, a = 0, h = 0, d = 0, c = "") {
484
- this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = i, this.areaIdent = o, this.sideIdent = n, this.originalEvent = r, this.clickCount = a, this.draggingX = h, this.draggingY = d, this.action = c;
483
+ constructor(e = -1, t = -1, s = -1, i = -1, o, r, n, a = 0, h = 0, d = 0, c = "") {
484
+ 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;
485
485
  }
486
486
  clone() {
487
487
  return new se(
@@ -583,6 +583,9 @@ class Ve {
583
583
  addClass(e, t) {
584
584
  return e.includes(" ") ? e.split(" ").forEach((s) => this.domService.addClass(t, s)) : this.domService.addClass(t, e), t;
585
585
  }
586
+ removeClass(e, t) {
587
+ return e.includes(" ") ? e.split(" ").forEach((s) => this.domService.removeClass(t, s)) : this.domService.removeClass(t, e), t;
588
+ }
586
589
  addClasses(e, t) {
587
590
  if (e)
588
591
  for (const s of e)
@@ -600,83 +603,83 @@ class Ve {
600
603
  const s = this.domService.createElement("div");
601
604
  return this.addClass(e, s), this.domService.appendChild(t, s), s;
602
605
  }
603
- addRowDiv(e, t, s = -1, i, o, n = "") {
604
- const r = t.index ?? -1, a = this.getDivOrCreateDiv(r, e);
606
+ addRowDiv(e, t, s = -1, i, o, r = "") {
607
+ const n = t.index ?? -1, a = this.getDivOrCreateDiv(n, e);
605
608
  if (this.domService.addClass(a, "ge-table-row-div"), this.domService.addClass(a, `ge-table-row-div-${t.index}`), i === "body" && o === "center") {
606
609
  const h = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
607
610
  this.domService.addClass(a, `ge-table-row-${h}`);
608
611
  }
609
- 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}`), n) {
610
- const h = this.domService.createText(n);
612
+ 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) {
613
+ const h = this.domService.createText(r);
611
614
  this.domService.appendChild(a, h);
612
615
  }
613
616
  return this.domService.appendChild(e.child, a), a;
614
617
  }
615
- addColumnDiv(e, t, s = -1, i = -1, o, n, r = "", a, h, d = void 0, c) {
618
+ addColumnDiv(e, t, s = -1, i = -1, o, r, n = "", a, h, d = void 0, c) {
616
619
  const p = h == null ? void 0 : h.treeOptions, g = h == null ? void 0 : h.showCheckboxWihoutExtraColumn, u = this.domService.createElement("div");
617
620
  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}`);
618
621
  const y = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
619
- if (o === "body" && n === "center" && this.domService.addClass(u, `ge-table-column-${y}`), 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), r) {
622
+ if (o === "body" && r === "center" && this.domService.addClass(u, `ge-table-column-${y}`), 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) {
620
623
  const f = a !== "none" && i === 0;
621
- this.addLabelDiv(u, r, f, s, i, o);
624
+ this.addLabelDiv(u, n, f, s, i, o);
622
625
  }
623
626
  return c && this.addSortedIcon(u, c, h == null ? void 0 : h.sortedOptions, i), this.domService.appendChild(e, u), u;
624
627
  }
625
628
  addCheckboxToDiv(e, t, s, i) {
626
- const o = this.domService.createElement("div"), n = t === "full" ? "checked" : "";
629
+ const o = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
627
630
  return o.innerHTML = `
628
631
  <input
629
632
  type="checkbox"
630
633
  data-area="${s}"
631
634
  data-row-index="${i}"
632
635
  data-input-type="checkbox"
633
- ${n}
636
+ ${r}
634
637
  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;
635
638
  }
636
- addLabelDiv(e, t = "", s = !1, i = -1, o = -1, n = "body") {
637
- const r = this.domService.createElement("div");
638
- if (this.domService.addClass(r, "ge-table-label-div"), this.domService.setStyle(r, "position", "relative"), this.domService.setStyle(r, "background", "transparent"), this.domService.setStyle(r, "width", "100%"), this.domService.setStyle(r, "height", "100%"), this.domService.setAttribute(r, "data-row-index", `${i}`), this.domService.setAttribute(r, "data-col-index", `${o}`), this.domService.setAttribute(r, "data-area", `${n}`), t)
639
+ addLabelDiv(e, t = "", s = !1, i = -1, o = -1, r = "body") {
640
+ const n = this.domService.createElement("div");
641
+ 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)
639
642
  if (s) {
640
643
  const a = this.domService.createText(t);
641
- this.domService.appendChild(r, a);
644
+ this.domService.appendChild(n, a);
642
645
  } else {
643
646
  const a = this.domService.createElement("div");
644
- this.domService.appendChild(r, a);
647
+ this.domService.appendChild(n, a);
645
648
  const h = this.domService.createText(t);
646
- 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", `${n}`);
649
+ 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}`);
647
650
  }
648
- return this.domService.appendChild(e, r), r;
651
+ return this.domService.appendChild(e, n), n;
649
652
  }
650
653
  addSortedIcon(e, t = "", s = new be(), i = -1) {
651
654
  const o = this.domService.createElement("div");
652
655
  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");
653
- let n;
654
- t === "asc" ? n = s.iconAsc : t === "desc" ? n = s.iconDesc : n = s.iconPlaceholder;
655
- const r = n.content, a = this.domService.createText(r);
656
- this.domService.appendChild(o, a), n.style && this.applyStyleString(o, n.style);
657
- for (const h of n.classes)
656
+ let r;
657
+ t === "asc" ? r = s.iconAsc : t === "desc" ? r = s.iconDesc : r = s.iconPlaceholder;
658
+ const n = r.content, a = this.domService.createText(n);
659
+ this.domService.appendChild(o, a), r.style && this.applyStyleString(o, r.style);
660
+ for (const h of r.classes)
658
661
  this.domService.addClass(o, h);
659
662
  return this.domService.appendChild(e, o), o;
660
663
  }
661
- addArrowDiv(e, t = "none", s = new me(), i = -1, o = -1, n = "body") {
662
- const r = this.domService.createElement("div");
663
- this.domService.addClass(r, "ge-table-tree-arrow-div"), this.domService.setStyle(r, "display", "inline-block"), this.domService.setStyle(r, "position", ""), this.domService.setStyle(r, "width", "20px"), this.domService.setStyle(r, "background", "transparent"), this.domService.setStyle(r, "cursor", "pointer"), this.domService.setAttribute(r, "data-row-index", `${i}`), this.domService.setAttribute(r, "data-col-index", `${o}`), this.domService.setAttribute(r, "data-area", `${n}`);
664
+ addArrowDiv(e, t = "none", s = new me(), i = -1, o = -1, r = "body") {
665
+ const n = this.domService.createElement("div");
666
+ 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}`);
664
667
  let a;
665
668
  t === "expanded" ? a = s.arrowExpanded : t === "collapsed" ? a = s.arrowCollapsed : a = s.arrowPlaceholder;
666
669
  const h = a.content, d = this.domService.createText(h);
667
- this.domService.appendChild(r, d), a.style && this.applyStyleString(r, a.style);
670
+ this.domService.appendChild(n, d), a.style && this.applyStyleString(n, a.style);
668
671
  for (const c of a.classes)
669
- this.domService.addClass(r, c);
670
- return this.domService.appendChild(e, r), r;
672
+ this.domService.addClass(n, c);
673
+ return this.domService.appendChild(e, n), n;
671
674
  }
672
675
  addColumnBorderDivs(e, t, s, i, o) {
673
676
  if (e.verticalBorderVisible) {
674
- const n = `ge-table-${i}-${o}-vertical-border`;
675
- this.addVerticalBorder(s, t, n);
677
+ const r = `ge-table-${i}-${o}-vertical-border`;
678
+ this.addVerticalBorder(s, t, r);
676
679
  }
677
680
  if (e.horizontalBorderVisible) {
678
- const n = `ge-table-${i}-${o}-horizontal-border`;
679
- this.addHorizontalBorder(s, t, n);
681
+ const r = `ge-table-${i}-${o}-horizontal-border`;
682
+ this.addHorizontalBorder(s, t, r);
680
683
  }
681
684
  return t;
682
685
  }
@@ -699,8 +702,8 @@ class Ve {
699
702
  applyStyleString(e, t) {
700
703
  const s = t.split(";").map((i) => i.trim()).filter((i) => i);
701
704
  for (const i of s) {
702
- const [o, n] = i.split(":");
703
- this.domService.setStyle(e, o.trim(), n.trim());
705
+ const [o, r] = i.split(":");
706
+ this.domService.setStyle(e, o.trim(), r.trim());
704
707
  }
705
708
  }
706
709
  getDivOrCreateDiv(e, t) {
@@ -709,7 +712,7 @@ class Ve {
709
712
  }
710
713
  }
711
714
  const ie = (l) => l === "header" ? "header" : l === "footer" ? "footer" : "body";
712
- class ke {
715
+ class _e {
713
716
  constructor(e, t) {
714
717
  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)) {
715
718
  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"));
@@ -721,7 +724,7 @@ class ke {
721
724
  }
722
725
  }
723
726
  }
724
- class _e {
727
+ class ke {
725
728
  constructor(e) {
726
729
  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(
727
730
  (t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
@@ -733,7 +736,7 @@ class _e {
733
736
  this.tableScope.contextmenu(t);
734
737
  }
735
738
  onHostElementClicked(e) {
736
- const t = new ke(e.target, this.tableScope);
739
+ const t = new _e(e.target, this.tableScope);
737
740
  if (t.action === "toggleExpandCollapseAll")
738
741
  this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
739
742
  else if (t.inputType === "checkbox" && t.areaIdent)
@@ -754,15 +757,15 @@ class _e {
754
757
  }
755
758
  onHostElementDblClicked(e) {
756
759
  if (e.target instanceof HTMLElement) {
757
- const t = e.target, s = t.getAttribute("data-area"), i = ie(s), o = Number(t.getAttribute("data-row-index")), n = Number(t.getAttribute("data-col-index")), r = this.tableScope.tableModel.getAreaModel(i);
760
+ const t = e.target, s = t.getAttribute("data-area"), i = ie(s), o = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), n = this.tableScope.tableModel.getAreaModel(i);
758
761
  if (s && i === "header")
759
- this.tableScope.tableModel.isSortable(n) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, o, n));
762
+ this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, o, r));
760
763
  else if (t.getAttribute("data-row-index")) {
761
- const a = r.getRowByIndex(o);
762
- if (s && i === "body" && r.isEditable(o, n) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, n)), Z(a) && n === this.getArrowColumnIndex()) {
764
+ const a = n.getRowByIndex(o);
765
+ if (s && i === "body" && n.isEditable(o, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, r)), Z(a) && r === this.getArrowColumnIndex()) {
763
766
  e.preventDefault(), e.stopPropagation();
764
767
  const h = a;
765
- h.expanded = !h.expanded, "recalcVisibleTreeRows" in r && r.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(h);
768
+ h.expanded = !h.expanded, "recalcVisibleTreeRows" in n && n.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(h);
766
769
  }
767
770
  }
768
771
  }
@@ -773,11 +776,11 @@ class _e {
773
776
  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);
774
777
  }
775
778
  updateCollapsedExpandedState(e) {
776
- var s, i, o, n, r;
779
+ var s, i, o, r, n;
777
780
  const t = (i = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : i.getRowId;
778
781
  if (t) {
779
782
  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);
780
- h ? (n = this.tableScope.storeStateCollapsedExpandService) == null || n.collapsedStateIdsPush(c) : d && ((r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsRemove(c));
783
+ h ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(c) : d && ((n = this.tableScope.storeStateCollapsedExpandService) == null || n.collapsedStateIdsRemove(c));
781
784
  }
782
785
  }
783
786
  getArrowColumnIndex() {
@@ -817,8 +820,8 @@ class Ge {
817
820
  constructor(e) {
818
821
  this.tableScope = e;
819
822
  }
820
- updateCells(e) {
821
- this.tableScope.updateCells(e);
823
+ updateCells(e, t = !1) {
824
+ this.tableScope.updateCells(e, t);
822
825
  }
823
826
  externalFilterChanged() {
824
827
  this.tableScope.externalFilterChanged();
@@ -857,9 +860,9 @@ class oe {
857
860
  for (const i of [...s]) {
858
861
  const [
859
862
  o,
860
- n
863
+ r
861
864
  ] = i;
862
- t[o] = n;
865
+ t[o] = r;
863
866
  }
864
867
  }
865
868
  return t;
@@ -871,8 +874,8 @@ class oe {
871
874
  if (i) {
872
875
  const o = i + e;
873
876
  if ((t + "").includes("Map")) {
874
- const n = this.autoConvertMapToObject(t);
875
- this.persistItem(o, n);
877
+ const r = this.autoConvertMapToObject(t);
878
+ this.persistItem(o, r);
876
879
  } else
877
880
  this.persistItem(o, t);
878
881
  }
@@ -948,7 +951,7 @@ class je {
948
951
  this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = i;
949
952
  }
950
953
  }
951
- class ze extends oe {
954
+ class Xe extends oe {
952
955
  constructor(e) {
953
956
  super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new je(), this.load();
954
957
  }
@@ -982,7 +985,7 @@ class ze extends oe {
982
985
  this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
983
986
  }
984
987
  }
985
- class Xe extends oe {
988
+ class Ke extends oe {
986
989
  constructor(e) {
987
990
  super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
988
991
  }
@@ -1009,7 +1012,7 @@ class O {
1009
1012
  this.left = e, this.width = t, this.height = s, this.top = i, this.index = o;
1010
1013
  }
1011
1014
  }
1012
- class Ke {
1015
+ class ze {
1013
1016
  constructor(e, t, s, i) {
1014
1017
  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();
1015
1018
  const o = this.hostElement;
@@ -1197,12 +1200,12 @@ class Ye {
1197
1200
  const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
1198
1201
  for (let s = 0; s < e; s++)
1199
1202
  for (let i = 0; i < t; i++) {
1200
- let o = this.areaModel.getColspanAt(s, i), n = this.areaModel.getRowspanAt(s, i);
1201
- if (o > 1 || n > 1) {
1202
- o === 0 && (o = 1), n === 0 && (n = 1);
1203
- const r = this.areaModel.hasOwnProperty("gammaCells");
1203
+ let o = this.areaModel.getColspanAt(s, i), r = this.areaModel.getRowspanAt(s, i);
1204
+ if (o > 1 || r > 1) {
1205
+ o === 0 && (o = 1), r === 0 && (r = 1);
1206
+ const n = this.areaModel.hasOwnProperty("gammaCells");
1204
1207
  this.colAndRowspanRanges.push(
1205
- new T(s, i, s + n - 1, i + o - 1, r)
1208
+ new T(s, i, s + r - 1, i + o - 1, n)
1206
1209
  );
1207
1210
  }
1208
1211
  }
@@ -1224,14 +1227,14 @@ class Ue {
1224
1227
  this.header = e, this.body = t, this.footer = s;
1225
1228
  }
1226
1229
  }
1227
- class qe extends Ke {
1230
+ class qe extends ze {
1228
1231
  constructor(e, t, s, i) {
1229
- var n, r;
1232
+ var r, n;
1230
1233
  super(e, t, s, i), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
1231
1234
  header: [],
1232
1235
  body: [],
1233
1236
  footer: []
1234
- }, this.tree = !1, this.colAndRowspanModels = new Ue(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.editing = !1, this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (n = this.tableOptions) != null && n.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (r = this.tableOptions) != null && r.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), ee(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
1237
+ }, this.tree = !1, this.colAndRowspanModels = new Ue(), 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), ee(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
1235
1238
  (a) => {
1236
1239
  var h;
1237
1240
  this.colAndRowspanModels[a] = new Ye(t, t.getAreaModel(a)), (h = this.colAndRowspanModels[a]) == null || h.init();
@@ -1290,10 +1293,12 @@ class qe extends Ke {
1290
1293
  var e, t;
1291
1294
  this.storeScrollPosStateService && ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.autoRestoreScrollPosition) && this.storeScrollPosStateService.updateScrollOffset([this.scrollLeft, this.scrollTop]);
1292
1295
  }
1293
- updateCells(e) {
1296
+ updateCells(e, t = !1) {
1294
1297
  e.forEach(
1295
- (t) => this.tableModel.getAreaModel(t.area).setValue(t.rowIndex, t.columnIndex, t.value)
1296
- ), this.repaint();
1298
+ (s) => {
1299
+ this.tableModel.getAreaModel(s.area).setValue(s.rowIndex, s.columnIndex, s.value), t || this.rerenderCellContent(s);
1300
+ }
1301
+ ), t && this.repaint();
1297
1302
  }
1298
1303
  getAreaAndSideIdentByAttr(e) {
1299
1304
  if (e) {
@@ -1352,9 +1357,9 @@ class qe extends Ke {
1352
1357
  }
1353
1358
  adjustArea(e, t = 0) {
1354
1359
  var f;
1355
- const s = this.getArea(e, "west"), i = this.getArea(e, "center"), o = this.getArea(e, "east"), n = i.child.clientHeight;
1360
+ const s = this.getArea(e, "west"), i = this.getArea(e, "center"), o = this.getArea(e, "east"), r = i.child.clientHeight;
1356
1361
  s.child.innerText = "", i.child.innerText = "", o.child.innerText = "";
1357
- const r = 0, a = this.areaBodyCenterGeo.width, h = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e), c = d.getRowCount();
1362
+ const n = 0, a = this.areaBodyCenterGeo.width, h = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e), c = d.getRowCount();
1358
1363
  for (; this.cleanupFunctions[e].length; ) {
1359
1364
  const S = this.cleanupFunctions[e].shift();
1360
1365
  S && S();
@@ -1362,10 +1367,10 @@ class qe extends Ke {
1362
1367
  let p = t;
1363
1368
  const g = this.tableModel.getColumnCount(), u = this.tableModel.getFixedRightColumnCount(), y = this.tableModel.getFixedLeftColumnCount();
1364
1369
  for (let S = 0; S < c; S++) {
1365
- const x = p, C = S === c - 1, M = this.tableModel.getRowHeight(e, S);
1366
- if (x + M > 0) {
1370
+ const C = p, x = S === c - 1, M = this.tableModel.getRowHeight(e, S);
1371
+ if (C + M > 0) {
1367
1372
  this.firstVisibleRowIndex = S;
1368
- let w = { left: r, width: a, height: M, top: x, index: S }, m = this.dom.addRowDiv(i, w, S, e, "center");
1373
+ let w = { left: n, width: a, height: M, top: C, index: S }, m = this.dom.addRowDiv(i, w, S, e, "center");
1369
1374
  const I = y;
1370
1375
  if (this.adjustColumnsToRowParent({
1371
1376
  areaIdent: e,
@@ -1377,8 +1382,8 @@ class qe extends Ke {
1377
1382
  columnIndexStart: I,
1378
1383
  columnIndexEnd: g - u - 1,
1379
1384
  verticalFixed: !1,
1380
- lastRowOfModel: C
1381
- }), h.left > 0 && (w = { left: r, width: this.areaBodyWestGeo.width, height: M, top: x, index: S }, m = this.dom.addRowDiv(s, w, S, e, "west"), this.adjustColumnsToRowParent({
1385
+ lastRowOfModel: x
1386
+ }), h.left > 0 && (w = { left: n, width: this.areaBodyWestGeo.width, height: M, top: C, index: S }, m = this.dom.addRowDiv(s, w, S, e, "west"), this.adjustColumnsToRowParent({
1382
1387
  areaIdent: e,
1383
1388
  sideIdent: "west",
1384
1389
  areaModel: d,
@@ -1388,8 +1393,8 @@ class qe extends Ke {
1388
1393
  columnIndexStart: 0,
1389
1394
  columnIndexEnd: I - 1,
1390
1395
  verticalFixed: !0,
1391
- lastRowOfModel: C
1392
- })), h.right > 0 && (w = { left: r, width: this.areaBodyEastGeo.width, height: M, top: x, index: S }, m = this.dom.addRowDiv(o, w, S, e, "east"), this.adjustColumnsToRowParent({
1396
+ lastRowOfModel: x
1397
+ })), h.right > 0 && (w = { left: n, width: this.areaBodyEastGeo.width, height: M, top: C, index: S }, m = this.dom.addRowDiv(o, w, S, e, "east"), this.adjustColumnsToRowParent({
1393
1398
  areaIdent: e,
1394
1399
  sideIdent: "east",
1395
1400
  areaModel: d,
@@ -1399,7 +1404,7 @@ class qe extends Ke {
1399
1404
  columnIndexStart: g - u,
1400
1405
  columnIndexEnd: g - 1,
1401
1406
  verticalFixed: !0,
1402
- lastRowOfModel: C
1407
+ lastRowOfModel: x
1403
1408
  })), e === "header" && this.tree && S === c - 1) {
1404
1409
  const R = this.dom.applyStyle(
1405
1410
  this.dom.setAttribute(
@@ -1415,23 +1420,23 @@ class qe extends Ke {
1415
1420
  }
1416
1421
  }
1417
1422
  }
1418
- if (p = p + M, p > n)
1423
+ if (p = p + M, p > r)
1419
1424
  break;
1420
1425
  }
1421
1426
  if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
1422
1427
  const S = ((f = this.colAndRowspanModels[e]) == null ? void 0 : f.getRanges()) ?? [];
1423
1428
  if (S.length)
1424
- for (const x of S) {
1425
- let C = 0, M = i.child, w = "center";
1426
- if (x.c1 < y)
1429
+ for (const C of S) {
1430
+ let x = 0, M = i.child, w = "center";
1431
+ if (C.c1 < y)
1427
1432
  M = s.child, w = "west";
1428
- else if (u > 0 && x.c1 >= g - u)
1433
+ else if (u > 0 && C.c1 >= g - u)
1429
1434
  M = o.child, w = "east";
1430
1435
  else {
1431
1436
  const m = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1432
- C = this.scrollFactorX * m - this.areaBodyWestGeo.width, w = "center";
1437
+ x = this.scrollFactorX * m - this.areaBodyWestGeo.width, w = "center";
1433
1438
  }
1434
- this.drawBigCell(x, C, t, d, M, w);
1439
+ this.drawBigCell(C, x, t, d, M, w);
1435
1440
  }
1436
1441
  }
1437
1442
  }
@@ -1445,8 +1450,8 @@ class qe extends Ke {
1445
1450
  * @param sideIdent SideIdent (west,center,east)
1446
1451
  * @protected
1447
1452
  */
1448
- drawBigCell(e, t, s, i, o, n) {
1449
- const r = s + this.getRowHeights(0, e.r1 - 1, i).reduce((f, S) => f + S, 0), a = this.tableModel.getColumnCount(), h = this.tableModel.getFixedRightColumnCount();
1453
+ drawBigCell(e, t, s, i, o, r) {
1454
+ const n = s + this.getRowHeights(0, e.r1 - 1, i).reduce((f, S) => f + S, 0), a = this.tableModel.getColumnCount(), h = this.tableModel.getFixedRightColumnCount();
1450
1455
  let d = 0;
1451
1456
  h > 0 && e.c1 >= a - h && (d = a - h);
1452
1457
  const c = t + this.getColumnWidths(d, e.c1 - 1).reduce((f, S) => f + S, 0), p = this.getRowHeights(e.r1, e.r2, i).reduce((f, S) => f + S, 0), g = this.getColumnWidths(e.c1, e.c2).reduce((f, S) => f + S, 0);
@@ -1455,11 +1460,11 @@ class qe extends Ke {
1455
1460
  y && (u = y.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? (console.info("TODO here", e), this.renderCell({
1456
1461
  areaModel: i,
1457
1462
  areaIdent: i.areaIdent,
1458
- sideIdent: n,
1463
+ sideIdent: r,
1459
1464
  rowIndex: e.r1,
1460
1465
  columnIndex: e.c1,
1461
1466
  left: c,
1462
- top: r,
1467
+ top: n,
1463
1468
  width: g,
1464
1469
  height: p,
1465
1470
  parent: o,
@@ -1469,11 +1474,11 @@ class qe extends Ke {
1469
1474
  })) : this.renderCell({
1470
1475
  areaModel: i,
1471
1476
  areaIdent: i.areaIdent,
1472
- sideIdent: n,
1477
+ sideIdent: r,
1473
1478
  rowIndex: e.r1,
1474
1479
  columnIndex: e.c1,
1475
1480
  left: c,
1476
- top: r,
1481
+ top: n,
1477
1482
  width: g,
1478
1483
  height: p,
1479
1484
  parent: o,
@@ -1484,7 +1489,7 @@ class qe extends Ke {
1484
1489
  rowIndex: e.r1,
1485
1490
  columnIndex: e.c1,
1486
1491
  cellLeft: c,
1487
- cellTop: r,
1492
+ cellTop: n,
1488
1493
  cellWidth: g,
1489
1494
  cellHeight: p,
1490
1495
  parent: o
@@ -1493,8 +1498,8 @@ class qe extends Ke {
1493
1498
  findRowOfImportantRowspanCell(e, t, s) {
1494
1499
  const i = e.getMaxRowspan();
1495
1500
  for (let o = t - 1; o > -1; o--) {
1496
- const n = e.getRowspanAt(o, s);
1497
- if (n > 1 && o + n + 1 >= t)
1501
+ const r = e.getRowspanAt(o, s);
1502
+ if (r > 1 && o + r + 1 >= t)
1498
1503
  return o;
1499
1504
  if (t - o > i)
1500
1505
  return -1;
@@ -1507,8 +1512,8 @@ class qe extends Ke {
1507
1512
  areaModel: s,
1508
1513
  geo: i,
1509
1514
  parent: o,
1510
- rowIndex: n,
1511
- columnIndexStart: r,
1515
+ rowIndex: r,
1516
+ columnIndexStart: n,
1512
1517
  columnIndexEnd: a,
1513
1518
  verticalFixed: h = !1,
1514
1519
  lastRowOfModel: d = !1
@@ -1522,47 +1527,47 @@ class qe extends Ke {
1522
1527
  }
1523
1528
  const p = 0, g = !!(e === "body" && t);
1524
1529
  let u = c;
1525
- for (let f = r; f <= a; f++) {
1526
- const S = u, x = this.tableModel.getColumnWidth(f);
1527
- if (x > 0 && S + x > 0) {
1528
- let C = i.height;
1529
- const M = s.getRowspanAt(n, f), w = s.getColspanAt(n, f);
1530
- M > 1 && (C = this.getRowHeights(n, n + M - 1, s).reduce((R, D) => R + D, 0));
1531
- let m = x;
1530
+ for (let f = n; f <= a; f++) {
1531
+ const S = u, C = this.tableModel.getColumnWidth(f);
1532
+ if (C > 0 && S + C > 0) {
1533
+ let x = i.height;
1534
+ const M = s.getRowspanAt(r, f), w = s.getColspanAt(r, f);
1535
+ M > 1 && (x = this.getRowHeights(r, r + M - 1, s).reduce((R, D) => R + D, 0));
1536
+ let m = C;
1532
1537
  w > 1 && (m = this.getColumnWidths(f, f + w - 1).reduce((R, D) => R + D, 0));
1533
1538
  let I = !1;
1534
- if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (y = this.colAndRowspanModels[e]) != null && y.isInRange(n, f) && (I = !0), this.draggingTargetColumnIndex === f && e !== "header") {
1535
- this.renderDragTargetDiv(o, S, p, m, C);
1536
- const R = { left: S, top: p, width: m, height: C };
1539
+ if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (y = this.colAndRowspanModels[e]) != null && y.isInRange(r, f) && (I = !0), this.draggingTargetColumnIndex === f && e !== "header") {
1540
+ this.renderDragTargetDiv(o, S, p, m, x);
1541
+ const R = { left: S, top: p, width: m, height: x };
1537
1542
  this.dom.addColumnBorderDivs(this.tableOptions, o, R, e, t);
1538
1543
  } else {
1539
- const R = this.renderSelectedBackgroundDiv(I, g, t, s, n, f, o, S, p, m, C);
1544
+ const R = this.renderSelectedBackgroundDiv(I, g, t, s, r, f, o, S, p, m, x);
1540
1545
  I || this.renderCell({
1541
1546
  areaModel: s,
1542
1547
  areaIdent: e,
1543
1548
  sideIdent: t,
1544
- rowIndex: n,
1549
+ rowIndex: r,
1545
1550
  columnIndex: f,
1546
1551
  left: S,
1547
1552
  top: p,
1548
1553
  width: m,
1549
- height: C,
1554
+ height: x,
1550
1555
  parent: o,
1551
1556
  cellSelected: R,
1552
1557
  lastRowOfModel: d,
1553
1558
  gammaRange: !0
1554
1559
  }), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1555
- rowIndex: n,
1560
+ rowIndex: r,
1556
1561
  columnIndex: f,
1557
1562
  cellLeft: S,
1558
1563
  cellTop: p,
1559
1564
  cellWidth: m,
1560
- cellHeight: C,
1565
+ cellHeight: x,
1561
1566
  parent: o
1562
1567
  });
1563
1568
  }
1564
1569
  }
1565
- if (u = u + x, u > this.areaBodyCenterGeo.width)
1570
+ if (u = u + C, u > this.areaBodyCenterGeo.width)
1566
1571
  break;
1567
1572
  }
1568
1573
  this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new O(u - 1, 1, i.height, 0), o);
@@ -1576,26 +1581,26 @@ class qe extends Ke {
1576
1581
  sideIdent: s,
1577
1582
  rowIndex: i,
1578
1583
  index: o,
1579
- left: n,
1580
- width: r,
1584
+ left: r,
1585
+ width: n,
1581
1586
  height: a,
1582
1587
  top: h,
1583
1588
  parent: d,
1584
1589
  lastRowOfModel: c
1585
1590
  }) {
1586
- var re;
1587
- const g = this.editorRenderer && this.editorRendererRow === i && this.editorRendererColumn === o ? this.editorRenderer : e.getCellRenderer(i, o), u = { left: n, width: r, height: a, top: h, index: o }, y = e.getRowByIndex(i);
1591
+ var ne;
1592
+ const g = this.editorRenderer && this.editorRendererRow === i && this.editorRendererColumn === o ? this.editorRenderer : e.getCellRenderer(i, o), u = { left: r, width: n, height: a, top: h, index: o }, y = e.getRowByIndex(i);
1588
1593
  let f = "none";
1589
1594
  if (o === this.getTreeArrowColumnIndex() && Z(y)) {
1590
1595
  const v = y;
1591
- (re = v.children) != null && re.length ? v.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
1596
+ (ne = v.children) != null && ne.length ? v.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
1592
1597
  }
1593
- let x;
1598
+ let C;
1594
1599
  if (t === "header") {
1595
1600
  const v = this.tableModel.getColumnDef(o);
1596
- (!(v != null && v.sortIconVisible) || v != null && v.sortIconVisible()) && (x = v == null ? void 0 : v.sortState);
1601
+ (!(v != null && v.sortIconVisible) || v != null && v.sortIconVisible()) && (C = v == null ? void 0 : v.sortState);
1597
1602
  }
1598
- const C = e.getValueAt(i, o), M = g ? "" : `${C}`, w = e.isRowChecked(i), m = this.dom.addColumnDiv(
1603
+ const x = e.getValueAt(i, o), M = g ? "" : `${x}`, w = e.isRowChecked(i), m = this.dom.addColumnDiv(
1599
1604
  d,
1600
1605
  u,
1601
1606
  i,
@@ -1606,25 +1611,49 @@ class qe extends Ke {
1606
1611
  f,
1607
1612
  this.tableOptions,
1608
1613
  w,
1609
- x
1614
+ C
1610
1615
  ), I = e.getTooltipAt(i, o);
1611
1616
  I && this.dom.setAttribute(m, "title", I);
1612
1617
  const R = this.tableModel.getColumnDef(o);
1613
1618
  R && R.classes[t] && this.dom.addClasses(R.classes[t], m);
1614
1619
  let D;
1615
- g && (D = g.render(m, i, o, t, e, C, this.dom.domService));
1620
+ g && (D = g.render(m, i, o, t, e, x, this.dom.domService));
1616
1621
  const V = e.getCustomClassesAt(i, o);
1617
- if (V.length && this.dom.addClasses(V, m), this.dom.addColumnBorderDivs(this.tableOptions, d, u, t, s), c && this.dom.addHorizontalBorder({ left: n, width: r, height: a, top: h + a }, d), this.getFocusModel && t === "body") {
1622
+ if (V.length && this.dom.addClasses(V, m), this.dom.addColumnBorderDivs(this.tableOptions, d, u, t, s), c && this.dom.addHorizontalBorder({ left: r, width: n, height: a, top: h + a }, d), this.getFocusModel && t === "body") {
1618
1623
  const v = this.getFocusModel();
1619
1624
  v != null && v.hasFocus(i, o) && this.dom.addFocusBorderDivs(d, u, {});
1620
1625
  }
1621
1626
  t === "header" && this.dom.setAttribute(m, "data-ge-action", "drag-column");
1622
- const K = e.getCustomStyleAt(i, o);
1623
- if (K)
1624
- for (const v in K)
1625
- this.dom.setStyle(m, v, K[v]);
1627
+ const z = e.getCustomStyleAt(i, o);
1628
+ if (z)
1629
+ for (const v in z)
1630
+ this.dom.setStyle(m, v, z[v]);
1626
1631
  return [m, D];
1627
1632
  }
1633
+ applyCssClasses(e, t = {}) {
1634
+ e && Object.entries(t).forEach(([s, i]) => {
1635
+ i ? this.dom.addClass(s, e) : this.dom.removeClass(s, e);
1636
+ });
1637
+ }
1638
+ rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: i, cssClasses: o }) {
1639
+ const r = this.tableModel.getAreaModel(e), n = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', a = document.querySelector(n);
1640
+ if (a) {
1641
+ let h;
1642
+ const c = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s ? this.editorRenderer : r.getCellRenderer(t, s);
1643
+ if (a.innerText = "", this.applyCssClasses(a, o), c)
1644
+ h = c.render(a, t, s, e, r, i, this.dom.domService), h && this.cleanupFunctions[e].push(h);
1645
+ else {
1646
+ const u = `${i}`;
1647
+ this.dom.addLabelDiv(a, u, !1, t, s, e);
1648
+ }
1649
+ const p = r.getCustomClassesAt(t, s);
1650
+ p.length && this.dom.addClasses(p, a);
1651
+ const g = r.getCustomStyleAt(t, s);
1652
+ if (g)
1653
+ for (const u in g)
1654
+ this.dom.setStyle(a, u, g[u]);
1655
+ }
1656
+ }
1628
1657
  getColumnWidths(e, t) {
1629
1658
  const s = [];
1630
1659
  for (let i = e; i <= t; i++)
@@ -1677,22 +1706,22 @@ class qe extends Ke {
1677
1706
  this.debounceTimeout && clearTimeout(this.debounceTimeout), this.debounceTimeout = setTimeout(e.bind(this), t);
1678
1707
  }
1679
1708
  renderDragTargetDiv(e, t, s, i, o) {
1680
- const n = this.dom.applyStylePosistionAbsolute(
1709
+ const r = this.dom.applyStylePosistionAbsolute(
1681
1710
  this.dom.createDivWithClass("ge-table-drop-zone", e)
1682
1711
  );
1683
- return this.dom.setStyle(n, "left", `${t}px`), this.dom.setStyle(n, "top", `${s}px`), this.dom.setStyle(n, "width", `${i}px`), this.dom.setStyle(n, "height", `${o}px`), n;
1712
+ 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;
1684
1713
  }
1685
- renderSelectedBackgroundDiv(e, t, s, i, o, n, r, a, h, d, c) {
1714
+ renderSelectedBackgroundDiv(e, t, s, i, o, r, n, a, h, d, c) {
1686
1715
  let p = !1;
1687
- if (!e && t && i.isSelectable(o, n) && this.getSelectionModel) {
1716
+ if (!e && t && i.isSelectable(o, r) && this.getSelectionModel) {
1688
1717
  const g = this.getSelectionModel();
1689
1718
  if (g) {
1690
- const u = g.getSelectionCount(o, n);
1719
+ const u = g.getSelectionCount(o, r);
1691
1720
  p = u > 0;
1692
1721
  for (let y = 0; y < u; y++) {
1693
1722
  const f = this.dom.applyStylePosistionAbsolute(
1694
1723
  // ge-table-body-west-selected-range
1695
- this.dom.createDivWithClass(`ge-table-${i.areaIdent}-${s}-selected-range`, r)
1724
+ this.dom.createDivWithClass(`ge-table-${i.areaIdent}-${s}-selected-range`, n)
1696
1725
  );
1697
1726
  this.dom.setStyle(f, "left", `${a}px`), this.dom.setStyle(f, "top", `${h}px`), this.dom.setStyle(f, "width", `${d}px`), this.dom.setStyle(f, "height", `${c}px`);
1698
1727
  }
@@ -1706,8 +1735,8 @@ class qe extends Ke {
1706
1735
  sideIdent: s,
1707
1736
  rowIndex: i,
1708
1737
  columnIndex: o,
1709
- left: n,
1710
- top: r,
1738
+ left: r,
1739
+ top: n,
1711
1740
  width: a,
1712
1741
  height: h,
1713
1742
  parent: d,
@@ -1721,19 +1750,19 @@ class qe extends Ke {
1721
1750
  sideIdent: s,
1722
1751
  rowIndex: i,
1723
1752
  index: o,
1724
- left: n,
1753
+ left: r,
1725
1754
  width: a,
1726
1755
  height: h,
1727
- top: r,
1756
+ top: n,
1728
1757
  parent: d,
1729
1758
  lastRowOfModel: p,
1730
1759
  gammaRange: g
1731
1760
  });
1732
1761
  c && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, u), y && this.cleanupFunctions[t].push(y);
1733
1762
  }
1734
- renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: i, cellWidth: o, cellHeight: n, parent: r }) {
1763
+ renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: i, cellWidth: o, cellHeight: r, parent: n }) {
1735
1764
  const a = this.dom.domService, h = this.tableOptions.columnResizeHandleWidthInPx ?? 2, d = a.createElement("div");
1736
- 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", `${n}px`), a.appendChild(r, d);
1765
+ 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);
1737
1766
  }
1738
1767
  }
1739
1768
  class Je {
@@ -1749,8 +1778,8 @@ class Qe {
1749
1778
  if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
1750
1779
  const t = e.target, s = t.getAttribute("data-area"), i = t.getAttribute("data-row-index"), o = t.getAttribute("data-col-index");
1751
1780
  if (s && i && o) {
1752
- const n = ie(s), r = Number(i), a = Number(o);
1753
- this.tableScope.updateModelValueAfterEdit(n, r, a, t.value);
1781
+ const r = ie(s), n = Number(i), a = Number(o);
1782
+ this.tableScope.updateModelValueAfterEdit(r, n, a, t.value);
1754
1783
  }
1755
1784
  }
1756
1785
  }
@@ -1774,11 +1803,11 @@ class et {
1774
1803
  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);
1775
1804
  }
1776
1805
  onMouseClicked(e, t) {
1777
- var o, n, r, a, h, d, c;
1806
+ var o, r, n, a, h, d, c;
1778
1807
  let s = !1, i = !1;
1779
1808
  if (this.getSelectionModel && this.getFocusModel) {
1780
1809
  const p = this.getSelectionModel(), g = this.getFocusModel();
1781
- 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), (n = e.originalEvent) != null && n.shiftKey && this.previousEvt ? (p.addSelection(this.createRangeByEvents(e, this.previousEvt)), i = !0, s = !0) : (r = e.originalEvent) != null && r.ctrlKey || (a = e.originalEvent) != null && a.metaKey ? (p.addSelection(T.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(T.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0));
1810
+ 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(T.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(T.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0));
1782
1811
  }
1783
1812
  return i ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
1784
1813
  }
@@ -1800,12 +1829,12 @@ class et {
1800
1829
  }
1801
1830
  createRangeByEvents(e, t) {
1802
1831
  t || (t = e);
1803
- 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), n = Math.max(e.columnIndex, t == null ? void 0 : t.columnIndex);
1832
+ 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);
1804
1833
  return T.create({
1805
1834
  rowIndex1: s,
1806
1835
  columnIndex1: o,
1807
1836
  rowIndex2: i,
1808
- columnIndex2: n
1837
+ columnIndex2: r
1809
1838
  });
1810
1839
  }
1811
1840
  }
@@ -1926,6 +1955,9 @@ class ye {
1926
1955
  addClass(e, t) {
1927
1956
  return t.includes(" ") ? t.split(" ").forEach((s) => e.classList.add(s)) : e.classList.add(t), e;
1928
1957
  }
1958
+ removeClass(e, t) {
1959
+ return t.includes(" ") ? t.split(" ").forEach((s) => e.classList.remove(s)) : e.classList.remove(t), e;
1960
+ }
1929
1961
  appendChild(e, t) {
1930
1962
  e.appendChild(t);
1931
1963
  }
@@ -1940,9 +1972,9 @@ class ye {
1940
1972
  }
1941
1973
  }
1942
1974
  class ot {
1943
- render(e, t, s, i, o, n, r) {
1975
+ render(e, t, s, i, o, r, n) {
1944
1976
  if (o.isEditable(t, s)) {
1945
- r.addClass(e, "ge-table-row-input-div");
1977
+ n.addClass(e, "ge-table-row-input-div");
1946
1978
  const a = o.getValueAt(t, s);
1947
1979
  e.innerHTML = `
1948
1980
  <input
@@ -2004,7 +2036,7 @@ class lt {
2004
2036
  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));
2005
2037
  }
2006
2038
  }
2007
- class nt {
2039
+ class rt {
2008
2040
  constructor(e = "none") {
2009
2041
  this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
2010
2042
  }
@@ -2027,32 +2059,32 @@ class nt {
2027
2059
  return [this.rowIndex, this.columnIndex];
2028
2060
  }
2029
2061
  }
2030
- const rt = new lt(), at = new nt("cell");
2062
+ const nt = new lt(), at = new rt("cell");
2031
2063
  class ve {
2032
2064
  constructor() {
2033
2065
  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 = {
2034
2066
  header: 34,
2035
2067
  body: 34,
2036
2068
  footer: 34
2037
- }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new me(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new be(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new ot(), this.getSelectionModel = () => rt, this.getFocusModel = () => at;
2069
+ }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new me(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new be(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new ot(), this.getSelectionModel = () => nt, this.getFocusModel = () => at;
2038
2070
  }
2039
2071
  }
2040
- class ne extends qe {
2072
+ class re extends qe {
2041
2073
  constructor(e, t, s, i, o) {
2042
- var n;
2074
+ var r;
2043
2075
  if (super(
2044
2076
  e,
2045
2077
  t,
2046
2078
  new Ve(s),
2047
2079
  i
2048
- ), this.eventListener = o, this.selectionService = new et(this), this.api = new Ge(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, o || (this.eventListener = new he()), (n = this.tableOptions) != null && n.autoRestoreOptions) {
2049
- const r = this.tableOptions.autoRestoreOptions, a = r.getStorageKeyFn;
2050
- a && (r.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Ne(a)), r.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ze(a)), r.autoRestoreSortingState && (this.storeSortingService = new Xe(a)));
2080
+ ), this.eventListener = o, this.selectionService = new et(this), this.api = new Ge(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, o || (this.eventListener = new he()), (r = this.tableOptions) != null && r.autoRestoreOptions) {
2081
+ const n = this.tableOptions.autoRestoreOptions, a = n.getStorageKeyFn;
2082
+ a && (n.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Ne(a)), n.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new Xe(a)), n.autoRestoreSortingState && (this.storeSortingService = new Ke(a)));
2051
2083
  }
2052
- this.mouseHandler = new _e(this), this.inputHandler = new Qe(this), this.shortcutService = new it(this), this.shortcutService.addListener(this.selectionService);
2084
+ this.mouseHandler = new ke(this), this.inputHandler = new Qe(this), this.shortcutService = new it(this), this.shortcutService.addListener(this.selectionService);
2053
2085
  }
2054
2086
  static create(e, t, s = new ve(), i = new he(), o = new ye()) {
2055
- return new ne(
2087
+ return new re(
2056
2088
  e,
2057
2089
  t,
2058
2090
  o,
@@ -2123,10 +2155,10 @@ class ne extends qe {
2123
2155
  }
2124
2156
  toggleRowCheckbox(e, t, s) {
2125
2157
  var a;
2126
- const i = this.tableModel.getAreaModel(s), o = i.isRowChecked(e), n = o === void 0 || o === "semi" || o === "none";
2127
- i.setRowChecked(e, n), this.repaint();
2128
- const r = (a = i.rowSelectionModel) == null ? void 0 : a.getCheckedRows();
2129
- this.eventListener.onCheckboxChanged(r || []);
2158
+ const i = this.tableModel.getAreaModel(s), o = i.isRowChecked(e), r = o === void 0 || o === "semi" || o === "none";
2159
+ i.setRowChecked(e, r), this.repaint();
2160
+ const n = (a = i.rowSelectionModel) == null ? void 0 : a.getCheckedRows();
2161
+ this.eventListener.onCheckboxChanged(n || []);
2130
2162
  }
2131
2163
  onMouseClicked(e, t) {
2132
2164
  let s = this.selectionService.onMouseClicked(e, t);
@@ -2141,12 +2173,12 @@ class ne extends qe {
2141
2173
  t && (e && this.clearSelectionModel(), this.tableModel.externalFilterChanged(t), this.scrollViewport.scrollTo(0, 0), this.tableModel.recalcHeightAndPadding(), this.resetSizeOfWrapperDiv(), this.repaint());
2142
2174
  }
2143
2175
  onHeaderDblClicked(e, t, s) {
2144
- var o, n;
2176
+ var o, r;
2145
2177
  const i = this.tableModel.getColumnDef(s);
2146
2178
  if (i != null && i.sortable && i.sortable()) {
2147
2179
  e.preventDefault(), e.stopPropagation();
2148
- const r = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, a = i.sortState ?? "", h = r[(r.indexOf(a) + 1) % r.length], d = new Je(s, h);
2149
- this.tableModel.doSort([d]) && ((o = this.tableModel.getColumnDefs()) == null || o.forEach((p) => p.sortState = ""), i.sortState = h), this.repaint(), (n = this.storeSortingService) == null || n.setSortItems([d]);
2180
+ const n = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, a = i.sortState ?? "", h = n[(n.indexOf(a) + 1) % n.length], d = new Je(s, h);
2181
+ 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]);
2150
2182
  }
2151
2183
  }
2152
2184
  changeFocusCell(e, t) {
@@ -2189,11 +2221,11 @@ class ne extends qe {
2189
2221
  if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
2190
2222
  const s = this.tableOptions.autoRestoreOptions, i = s.getRowId;
2191
2223
  if (s.autoRestoreCollapsedExpandedState && i) {
2192
- const o = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), n = this.tableModel.getAreaModel("body");
2193
- if (ee(n)) {
2194
- const r = n, a = n.getRowCount();
2224
+ const o = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
2225
+ if (ee(r)) {
2226
+ const n = r, a = r.getRowCount();
2195
2227
  for (let h = 0; h < a; h++) {
2196
- const d = n.getRowByIndex(h);
2228
+ const d = r.getRowByIndex(h);
2197
2229
  if (d)
2198
2230
  if (o.allExpanded)
2199
2231
  d.expanded = !0;
@@ -2204,7 +2236,7 @@ class ne extends qe {
2204
2236
  o.mode === "expanded" ? d.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(c) : o.mode === "collapsed" && (d.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(c));
2205
2237
  }
2206
2238
  }
2207
- r.recalcVisibleTreeRows();
2239
+ n.recalcVisibleTreeRows();
2208
2240
  }
2209
2241
  }
2210
2242
  }
@@ -2218,56 +2250,56 @@ const dt = /* @__PURE__ */ Pe("<div>"), ut = (l) => {
2218
2250
  }, l);
2219
2251
  return Ae(() => {
2220
2252
  const s = {
2221
- onCheckboxChanged: (n) => {
2222
- const r = new CustomEvent("checkboxChanged", {
2223
- detail: n,
2253
+ onCheckboxChanged: (r) => {
2254
+ const n = new CustomEvent("checkboxChanged", {
2255
+ detail: r,
2224
2256
  bubbles: !0
2225
2257
  });
2226
- e && e.dispatchEvent(r);
2258
+ e && e.dispatchEvent(n);
2227
2259
  },
2228
- onContextmenu: (n) => {
2229
- const r = new CustomEvent("contextmenu", {
2230
- detail: n,
2260
+ onContextmenu: (r) => {
2261
+ const n = new CustomEvent("contextmenu", {
2262
+ detail: r,
2231
2263
  bubbles: !0
2232
2264
  });
2233
- e && e.dispatchEvent(r);
2265
+ e && e.dispatchEvent(n);
2234
2266
  },
2235
- onModelChanged: (n) => {
2236
- const r = new CustomEvent("modelChanged", {
2237
- detail: n,
2267
+ onModelChanged: (r) => {
2268
+ const n = new CustomEvent("modelChanged", {
2269
+ detail: r,
2238
2270
  bubbles: !0
2239
2271
  });
2240
- e && e.dispatchEvent(r);
2272
+ e && e.dispatchEvent(n);
2241
2273
  },
2242
- onMouseClicked: (n) => {
2243
- const r = new CustomEvent("mouseClicked", {
2244
- detail: n,
2274
+ onMouseClicked: (r) => {
2275
+ const n = new CustomEvent("mouseClicked", {
2276
+ detail: r,
2245
2277
  bubbles: !0
2246
2278
  });
2247
- e && e.dispatchEvent(r);
2279
+ e && e.dispatchEvent(n);
2248
2280
  },
2249
- onMouseDragging: (n) => {
2250
- const r = new CustomEvent("mouseDragging", {
2251
- detail: n,
2281
+ onMouseDragging: (r) => {
2282
+ const n = new CustomEvent("mouseDragging", {
2283
+ detail: r,
2252
2284
  bubbles: !0
2253
2285
  });
2254
- e && e.dispatchEvent(r);
2286
+ e && e.dispatchEvent(n);
2255
2287
  },
2256
- onMouseDraggingEnd: (n) => {
2257
- const r = new CustomEvent("mouseDraggingEnd", {
2258
- detail: n,
2288
+ onMouseDraggingEnd: (r) => {
2289
+ const n = new CustomEvent("mouseDraggingEnd", {
2290
+ detail: r,
2259
2291
  bubbles: !0
2260
2292
  });
2261
- e && e.dispatchEvent(r);
2293
+ e && e.dispatchEvent(n);
2262
2294
  },
2263
- onMouseMoved: (n) => {
2264
- const r = new CustomEvent("mouseMoved", {
2265
- detail: n,
2295
+ onMouseMoved: (r) => {
2296
+ const n = new CustomEvent("mouseMoved", {
2297
+ detail: r,
2266
2298
  bubbles: !0
2267
2299
  });
2268
- e && e.dispatchEvent(r);
2300
+ e && e.dispatchEvent(n);
2269
2301
  }
2270
- }, i = new ne(e, t.tableModel, new ye(), t.tableOptions, s);
2302
+ }, i = new re(e, t.tableModel, new ye(), t.tableOptions, s);
2271
2303
  i.firstInit();
2272
2304
  const o = new CustomEvent("tableReady", {
2273
2305
  detail: i.getApi(),