@guiexpert/solid-table 1.0.9 → 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 (4) hide show
  1. package/README.md +1 -1
  2. package/index.cjs +3 -3
  3. package/index.js +441 -627
  4. package/package.json +1 -1
package/index.js CHANGED
@@ -1,44 +1,44 @@
1
- const me = (l, e) => l === e, q = Symbol("solid-proxy"), ne = {
2
- equals: me
1
+ const we = (l, e) => l === e, q = Symbol("solid-proxy"), ae = {
2
+ equals: we
3
3
  };
4
- let de = ce;
5
- const L = 1, k = 2, he = {
4
+ let ce = pe;
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, O = null, z = 0;
13
- function be(l, e) {
14
- const t = b, s = A, i = l.length === 0, o = e === void 0 ? s : e, r = i ? he : {
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
- }, n = i ? l : () => l(() => $(() => X(r)));
19
+ }, n = i ? l : () => l(() => P(() => K(r)));
20
20
  A = r, b = null;
21
21
  try {
22
- return V(n, !0);
22
+ return H(n, !0);
23
23
  } finally {
24
24
  b = t, A = s;
25
25
  }
26
26
  }
27
27
  function J(l, e, t) {
28
28
  const s = te(l, e, !1, L);
29
- H(s);
29
+ W(s);
30
30
  }
31
- function ye(l, e, t) {
32
- de = Re;
31
+ function xe(l, e, t) {
32
+ ce = Ie;
33
33
  const s = te(l, e, !1, L);
34
- (!t || !t.render) && (s.user = !0), O ? O.push(s) : H(s);
34
+ (!t || !t.render) && (s.user = !0), F ? F.push(s) : W(s);
35
35
  }
36
- function we(l, e, t) {
37
- t = t ? Object.assign({}, ne, t) : ne;
36
+ function Ee(l, e, t) {
37
+ t = t ? Object.assign({}, ae, t) : ae;
38
38
  const s = te(l, e, !0, 0);
39
- return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, H(s), xe.bind(s);
39
+ return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, W(s), Me.bind(s);
40
40
  }
41
- function $(l) {
41
+ function P(l) {
42
42
  if (b === null)
43
43
  return l();
44
44
  const e = b;
@@ -49,16 +49,16 @@ function $(l) {
49
49
  b = e;
50
50
  }
51
51
  }
52
- function ve(l) {
53
- ye(() => $(l));
52
+ function Ae(l) {
53
+ xe(() => P(l));
54
54
  }
55
- function xe() {
55
+ function Me() {
56
56
  if (this.sources && this.state)
57
57
  if (this.state === L)
58
- H(this);
58
+ W(this);
59
59
  else {
60
60
  const l = E;
61
- E = null, V(() => N(this), !1), E = l;
61
+ E = null, H(() => N(this), !1), E = l;
62
62
  }
63
63
  if (b) {
64
64
  const l = this.observers ? this.observers.length : 0;
@@ -66,32 +66,32 @@ function xe() {
66
66
  }
67
67
  return this.value;
68
68
  }
69
- function Ce(l, e, t) {
69
+ function Re(l, e, t) {
70
70
  let s = l.value;
71
- return (!l.comparator || !l.comparator(s, e)) && (l.value = e, l.observers && l.observers.length && V(() => {
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
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) : O.push(o), o.observers && ue(o)), r || (o.state = L);
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();
78
78
  }, !1)), e;
79
79
  }
80
- function H(l) {
80
+ function W(l) {
81
81
  if (!l.fn)
82
82
  return;
83
- X(l);
84
- const e = A, t = b, s = z;
85
- b = A = l, Ee(l, l.value, s), b = t, A = e;
83
+ K(l);
84
+ const e = A, t = b, s = X;
85
+ b = A = l, Te(l, l.value, s), b = t, A = e;
86
86
  }
87
- function Ee(l, e, t) {
87
+ function Te(l, e, t) {
88
88
  let s;
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, pe(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
- (!l.updatedAt || l.updatedAt <= t) && (l.updatedAt != null && "observers" in l ? Ce(l, s) : l.value = s, l.updatedAt = t);
94
+ (!l.updatedAt || l.updatedAt <= t) && (l.updatedAt != null && "observers" in l ? Re(l, s) : l.value = s, l.updatedAt = t);
95
95
  }
96
96
  function te(l, e, t, s = L, i) {
97
97
  const o = {
@@ -107,49 +107,49 @@ function te(l, e, t, s = L, i) {
107
107
  context: A ? A.context : null,
108
108
  pure: t
109
109
  };
110
- return A === null || A !== he && (A.owned ? A.owned.push(o) : A.owned = [o]), o;
110
+ return A === null || A !== ue && (A.owned ? A.owned.push(o) : A.owned = [o]), o;
111
111
  }
112
112
  function G(l) {
113
113
  if (l.state === 0)
114
114
  return;
115
115
  if (l.state === k)
116
116
  return N(l);
117
- if (l.suspense && $(l.suspense.inFallback))
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
- H(l);
124
+ W(l);
125
125
  else if (l.state === k) {
126
126
  const s = E;
127
- E = null, V(() => N(l, e[0]), !1), E = s;
127
+ E = null, H(() => N(l, e[0]), !1), E = s;
128
128
  }
129
129
  }
130
- function V(l, e) {
130
+ function H(l, e) {
131
131
  if (E)
132
132
  return l();
133
133
  let t = !1;
134
- e || (E = []), O ? t = !0 : O = [], z++;
134
+ e || (E = []), F ? t = !0 : F = [], X++;
135
135
  try {
136
136
  const s = l();
137
- return Ae(t), s;
137
+ return De(t), s;
138
138
  } catch (s) {
139
- t || (O = null), E = null, pe(s);
139
+ t || (F = null), E = null, Se(s);
140
140
  }
141
141
  }
142
- function Ae(l) {
143
- if (E && (ce(E), E = null), l)
142
+ function De(l) {
143
+ if (E && (pe(E), E = null), l)
144
144
  return;
145
- const e = O;
146
- O = null, e.length && V(() => de(e), !1);
145
+ const e = F;
146
+ F = null, e.length && H(() => ce(e), !1);
147
147
  }
148
- function ce(l) {
148
+ function pe(l) {
149
149
  for (let e = 0; e < l.length; e++)
150
150
  G(l[e]);
151
151
  }
152
- function Re(l) {
152
+ function Ie(l) {
153
153
  let e, t = 0;
154
154
  for (e = 0; e < l.length; e++) {
155
155
  const s = l[e];
@@ -164,17 +164,17 @@ 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 === k && 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
- function ue(l) {
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 = k, t.pure ? E.push(t) : O.push(t), t.observers && ue(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; ) {
@@ -186,7 +186,7 @@ function X(l) {
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) {
@@ -196,26 +196,26 @@ function X(l) {
196
196
  }
197
197
  l.state = 0;
198
198
  }
199
- function Me(l) {
199
+ function Oe(l) {
200
200
  return l instanceof Error ? l : new Error(typeof l == "string" ? l : "Unknown error", {
201
201
  cause: l
202
202
  });
203
203
  }
204
- function pe(l, e = A) {
205
- throw Me(l);
204
+ function Se(l, e = A) {
205
+ throw Oe(l);
206
206
  }
207
- function W() {
207
+ function _() {
208
208
  return !0;
209
209
  }
210
- const Te = {
210
+ const Fe = {
211
211
  get(l, e, t) {
212
212
  return e === q ? t : l.get(e);
213
213
  },
214
214
  has(l, e) {
215
215
  return e === q ? !0 : l.has(e);
216
216
  },
217
- set: W,
218
- deleteProperty: W,
217
+ set: _,
218
+ deleteProperty: _,
219
219
  getOwnPropertyDescriptor(l, e) {
220
220
  return {
221
221
  configurable: !0,
@@ -223,8 +223,8 @@ const Te = {
223
223
  get() {
224
224
  return l.get(e);
225
225
  },
226
- set: W,
227
- deleteProperty: W
226
+ set: _,
227
+ deleteProperty: _
228
228
  };
229
229
  },
230
230
  ownKeys(l) {
@@ -234,18 +234,18 @@ const Te = {
234
234
  function U(l) {
235
235
  return (l = typeof l == "function" ? l() : l) ? l : {};
236
236
  }
237
- function Ie() {
237
+ function Le() {
238
238
  for (let l = 0, e = this.length; l < e; ++l) {
239
239
  const t = this[l]();
240
240
  if (t !== void 0)
241
241
  return t;
242
242
  }
243
243
  }
244
- function fe(...l) {
244
+ function ge(...l) {
245
245
  let e = !1;
246
246
  for (let o = 0; o < l.length; o++) {
247
247
  const r = l[o];
248
- e = e || !!r && q in r, l[o] = typeof r == "function" ? (e = !0, we(r)) : r;
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({
@@ -268,7 +268,7 @@ function fe(...l) {
268
268
  o.push(...Object.keys(U(l[r])));
269
269
  return [...new Set(o)];
270
270
  }
271
- }, Te);
271
+ }, Fe);
272
272
  const t = {}, s = {}, i = /* @__PURE__ */ new Set();
273
273
  for (let o = l.length - 1; o >= 0; o--) {
274
274
  const r = l[o];
@@ -284,7 +284,7 @@ function fe(...l) {
284
284
  c.get ? (i.add(d), Object.defineProperty(t, d, {
285
285
  enumerable: !0,
286
286
  configurable: !0,
287
- get: Ie.bind(s[d] = [c.get.bind(r)])
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];
@@ -294,7 +294,7 @@ function fe(...l) {
294
294
  }
295
295
  return t;
296
296
  }
297
- function De(l, e, t) {
297
+ function $e(l, e, t) {
298
298
  let s = t.length, i = e.length, o = s, r = 0, n = 0, a = e[i - 1].nextSibling, h = null;
299
299
  for (; r < i || n < o; ) {
300
300
  if (e[r] === t[n]) {
@@ -323,8 +323,8 @@ function De(l, e, t) {
323
323
  const d = h.get(e[r]);
324
324
  if (d != null)
325
325
  if (n < d && d < o) {
326
- let c = r, p = 1, S;
327
- for (; ++c < i && c < o && !((S = h.get(e[c])) == null || S !== d + p); )
326
+ let c = r, p = 1, g;
327
+ for (; ++c < i && c < o && !((g = h.get(e[c])) == null || g !== d + p); )
328
328
  p++;
329
329
  if (p > d - n) {
330
330
  const u = e[r];
@@ -339,26 +339,26 @@ function De(l, e, t) {
339
339
  }
340
340
  }
341
341
  }
342
- function Fe(l, e, t, s = {}) {
342
+ function Be(l, e, t, s = {}) {
343
343
  let i;
344
- return be((o) => {
345
- i = o, e === document ? l() : Be(e, l(), e.firstChild ? null : void 0, t);
344
+ return Ce((o) => {
345
+ i = o, e === document ? l() : He(e, l(), e.firstChild ? null : void 0, t);
346
346
  }, s.owner), () => {
347
347
  i(), e.textContent = "";
348
348
  };
349
349
  }
350
- function Oe(l, e, t) {
350
+ function Pe(l, e, t) {
351
351
  let s;
352
352
  const i = () => {
353
353
  const r = document.createElement("template");
354
354
  return r.innerHTML = l, t ? r.content.firstChild.firstChild : r.content.firstChild;
355
- }, o = e ? () => $(() => document.importNode(s || (s = i()), !0)) : () => (s || (s = i())).cloneNode(!0);
355
+ }, o = e ? () => P(() => document.importNode(s || (s = i()), !0)) : () => (s || (s = i())).cloneNode(!0);
356
356
  return o.cloneNode = o, o;
357
357
  }
358
- function Le(l, e, t) {
359
- return $(() => l(e, t));
358
+ function We(l, e, t) {
359
+ return P(() => l(e, t));
360
360
  }
361
- function Be(l, e, t, s) {
361
+ function He(l, e, t, s) {
362
362
  if (t !== void 0 && !s && (s = []), typeof e != "function")
363
363
  return j(l, e, s, t);
364
364
  J((i) => j(l, e(), i, t), s);
@@ -372,11 +372,11 @@ function j(l, e, t, s, i) {
372
372
  if (l = r && t[0] && t[0].parentNode || l, o === "string" || o === "number")
373
373
  if (o === "number" && (e = e.toString()), r) {
374
374
  let n = t[0];
375
- n && n.nodeType === 3 ? n.data = e : n = document.createTextNode(e), t = P(l, t, s, n);
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")
379
- t = P(l, t, s);
379
+ t = B(l, t, s);
380
380
  else {
381
381
  if (o === "function")
382
382
  return J(() => {
@@ -390,16 +390,16 @@ function j(l, e, t, s, i) {
390
390
  if (Q(n, e, t, i))
391
391
  return J(() => t = j(l, n, t, s, !0)), () => t;
392
392
  if (n.length === 0) {
393
- if (t = P(l, t, s), r)
393
+ if (t = B(l, t, s), r)
394
394
  return t;
395
395
  } else
396
- a ? t.length === 0 ? ae(l, n, s) : De(l, t, n) : (t && P(l), ae(l, n));
396
+ a ? t.length === 0 ? de(l, n, s) : $e(l, t, n) : (t && B(l), de(l, n));
397
397
  t = n;
398
398
  } else if (e.nodeType) {
399
399
  if (Array.isArray(t)) {
400
400
  if (r)
401
- return t = P(l, t, s, e);
402
- P(l, t, null, e);
401
+ return t = B(l, t, s, e);
402
+ B(l, t, null, e);
403
403
  } else
404
404
  t == null || t === "" || !l.firstChild ? l.appendChild(e) : l.replaceChild(e, l.firstChild);
405
405
  t = e;
@@ -430,11 +430,11 @@ function Q(l, e, t, s) {
430
430
  }
431
431
  return i;
432
432
  }
433
- function ae(l, e, t = null) {
433
+ function de(l, e, t = null) {
434
434
  for (let s = 0, i = e.length; s < i; s++)
435
435
  l.insertBefore(e[s], t);
436
436
  }
437
- function P(l, e, t, s) {
437
+ function B(l, e, t, s) {
438
438
  if (t === void 0)
439
439
  return l.textContent = "";
440
440
  const i = s || document.createTextNode("");
@@ -452,27 +452,33 @@ function P(l, e, t, s) {
452
452
  l.insertBefore(i, t);
453
453
  return [i];
454
454
  }
455
- class pt {
455
+ class ht {
456
456
  constructor(e) {
457
457
  this.code = e;
458
458
  }
459
459
  render(e, t, s, i, o, r, n) {
460
- const a = fe({
460
+ const a = ge({
461
461
  rowIndex: t,
462
462
  columnIndex: s,
463
463
  areaIdent: i,
464
464
  areaModel: o,
465
465
  cellValue: r
466
466
  });
467
- Fe(
467
+ Be(
468
468
  () => this.code(a),
469
469
  e
470
470
  );
471
471
  }
472
472
  }
473
- const ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
473
+ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
474
474
  __proto__: null
475
475
  }, Symbol.toStringTag, { value: "Module" }));
476
+ function Z(l) {
477
+ return l && l.type === "TreeRow";
478
+ }
479
+ function ee(l) {
480
+ return l && l.type === "AreaModelTree";
481
+ }
476
482
  class se {
477
483
  constructor(e = -1, t = -1, s = -1, i = -1, o, r, n, a = 0, h = 0, d = 0, c = "") {
478
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;
@@ -493,25 +499,25 @@ class se {
493
499
  );
494
500
  }
495
501
  }
496
- class B {
502
+ class $ {
497
503
  constructor(e = ">", t = "", s = []) {
498
504
  this.content = e, this.style = t, this.classes = s;
499
505
  }
500
506
  }
501
- class ge {
502
- constructor(e = new B(
507
+ class me {
508
+ constructor(e = new $(
503
509
  ">",
504
510
  "transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
505
511
  ["gt-table-tree-arrow-expanded"]
506
- ), t = new B(
512
+ ), t = new $(
507
513
  ">",
508
514
  "",
509
515
  ["ge-table-tree-arrow-collapsed"]
510
- ), s = new B(
516
+ ), s = new $(
511
517
  ">",
512
518
  "color:transparent;",
513
519
  ["gt-table-tree-arrow-hidden"]
514
- ), i = new B(
520
+ ), i = new $(
515
521
  "↕",
516
522
  "",
517
523
  ["gt-table-tree-arrow-expanded-all"]
@@ -519,12 +525,12 @@ class ge {
519
525
  this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = i;
520
526
  }
521
527
  }
522
- class Se {
523
- constructor(e = new B("↑", "", ["ge-header-sorted-asc"]), t = new B("↓", "", ["ge-header-sorted-desc"]), s = new B("↑", "color:transparent;", [])) {
528
+ class be {
529
+ constructor(e = new $("↑", "", ["ge-header-sorted-asc"]), t = new $("↓", "", ["ge-header-sorted-desc"]), s = new $("↑", "color:transparent;", [])) {
524
530
  this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
525
531
  }
526
532
  }
527
- class Pe {
533
+ class Ve {
528
534
  constructor(e) {
529
535
  this.domService = e;
530
536
  }
@@ -577,6 +583,9 @@ class Pe {
577
583
  addClass(e, t) {
578
584
  return e.includes(" ") ? e.split(" ").forEach((s) => this.domService.addClass(t, s)) : this.domService.addClass(t, e), t;
579
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
+ }
580
589
  addClasses(e, t) {
581
590
  if (e)
582
591
  for (const s of e)
@@ -607,10 +616,10 @@ class Pe {
607
616
  return this.domService.appendChild(e.child, a), a;
608
617
  }
609
618
  addColumnDiv(e, t, s = -1, i = -1, o, r, n = "", a, h, d = void 0, c) {
610
- const p = h == null ? void 0 : h.treeOptions, S = h == null ? void 0 : h.showCheckboxWihoutExtraColumn, u = this.domService.createElement("div");
619
+ const p = h == null ? void 0 : h.treeOptions, g = h == null ? void 0 : h.showCheckboxWihoutExtraColumn, u = this.domService.createElement("div");
611
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}`);
612
621
  const y = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
613
- 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)), S && i === 0 && d && this.addCheckboxToDiv(u, d, o, s), n) {
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) {
614
623
  const f = a !== "none" && i === 0;
615
624
  this.addLabelDiv(u, n, f, s, i, o);
616
625
  }
@@ -641,7 +650,7 @@ class Pe {
641
650
  }
642
651
  return this.domService.appendChild(e, n), n;
643
652
  }
644
- addSortedIcon(e, t = "", s = new Se(), i = -1) {
653
+ addSortedIcon(e, t = "", s = new be(), i = -1) {
645
654
  const o = this.domService.createElement("div");
646
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");
647
656
  let r;
@@ -652,7 +661,7 @@ class Pe {
652
661
  this.domService.addClass(o, h);
653
662
  return this.domService.appendChild(e, o), o;
654
663
  }
655
- addArrowDiv(e, t = "none", s = new ge(), i = -1, o = -1, r = "body") {
664
+ addArrowDiv(e, t = "none", s = new me(), i = -1, o = -1, r = "body") {
656
665
  const n = this.domService.createElement("div");
657
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}`);
658
667
  let a;
@@ -702,13 +711,8 @@ class Pe {
702
711
  return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
703
712
  }
704
713
  }
705
- class Z {
706
- constructor(e, t = !0, s, i, o = 0, r = !1, n = !1) {
707
- this.data = e, this.expanded = t, this.children = s, this.parent = i, this.deep = o, this.checked = r, this.keep = n;
708
- }
709
- }
710
714
  const ie = (l) => l === "header" ? "header" : l === "footer" ? "footer" : "body";
711
- class $e {
715
+ class _e {
712
716
  constructor(e, t) {
713
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)) {
714
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"));
@@ -720,7 +724,7 @@ class $e {
720
724
  }
721
725
  }
722
726
  }
723
- class He {
727
+ class ke {
724
728
  constructor(e) {
725
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(
726
730
  (t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
@@ -732,12 +736,12 @@ class He {
732
736
  this.tableScope.contextmenu(t);
733
737
  }
734
738
  onHostElementClicked(e) {
735
- const t = new $e(e.target, this.tableScope);
739
+ const t = new _e(e.target, this.tableScope);
736
740
  if (t.action === "toggleExpandCollapseAll")
737
741
  this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
738
742
  else if (t.inputType === "checkbox" && t.areaIdent)
739
743
  this.tableScope.toggleRowCheckbox(t.rowIdx, t.colIdx, t.areaIdent), e.preventDefault(), e.stopPropagation();
740
- else if (t.row instanceof Z && t.areaModel) {
744
+ else if (Z(t.row) && t.areaModel) {
741
745
  const s = t.colIdx === this.getArrowColumnIndex() && e.altKey, i = t.className.includes("ge-table-tree-arrow-div");
742
746
  if (console.info(i, s), s || i) {
743
747
  e.preventDefault(), e.stopPropagation();
@@ -758,7 +762,7 @@ class He {
758
762
  this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, o, r));
759
763
  else if (t.getAttribute("data-row-index")) {
760
764
  const a = n.getRowByIndex(o);
761
- if (s && i === "body" && n.isEditable(o, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, r)), a instanceof Z && r === this.getArrowColumnIndex()) {
765
+ if (s && i === "body" && n.isEditable(o, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, r)), Z(a) && r === this.getArrowColumnIndex()) {
762
766
  e.preventDefault(), e.stopPropagation();
763
767
  const h = a;
764
768
  h.expanded = !h.expanded, "recalcVisibleTreeRows" in n && n.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(h);
@@ -812,12 +816,12 @@ class He {
812
816
  }
813
817
  }
814
818
  }
815
- class Ve {
819
+ class Ge {
816
820
  constructor(e) {
817
821
  this.tableScope = e;
818
822
  }
819
- updateCells(e) {
820
- this.tableScope.updateCells(e);
823
+ updateCells(e, t = !1) {
824
+ this.tableScope.updateCells(e, t);
821
825
  }
822
826
  externalFilterChanged() {
823
827
  this.tableScope.externalFilterChanged();
@@ -845,230 +849,6 @@ class Ve {
845
849
  this.tableScope.repaint();
846
850
  }
847
851
  }
848
- class _e {
849
- flattenTree(e, t = []) {
850
- var s;
851
- for (const i of e)
852
- this.isVisible(i) && t.push(i), (s = i.children) != null && s.length && this.flattenTree(i.children, t);
853
- return t;
854
- }
855
- isVisible(e) {
856
- return e.parent ? e.parent.expanded ? this.isVisible(e.parent) : !1 : !0;
857
- }
858
- }
859
- class We {
860
- constructor(e, t = [], s = -1) {
861
- this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = s, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((i) => i.rendererMap[e]);
862
- }
863
- getTooltipAt(e, t) {
864
- return "";
865
- }
866
- getCellRenderer(e, t) {
867
- if (t < this.cellRenderers.length)
868
- return this.cellRenderers[t];
869
- }
870
- getColspanAt(e, t) {
871
- return 0;
872
- }
873
- getCustomClassesAt(e, t) {
874
- return [];
875
- }
876
- getCustomStyleAt(e, t) {
877
- }
878
- getRowspanAt(e, t) {
879
- return 0;
880
- }
881
- getRowByIndex(e) {
882
- }
883
- isRowCheckable(e) {
884
- return !0;
885
- }
886
- isRowChecked(e) {
887
- var s;
888
- const t = this.getRowByIndex(e);
889
- return (s = this.rowSelectionModel) == null ? void 0 : s.isRowChecked(t);
890
- }
891
- setRowChecked(e, t) {
892
- if (this.rowSelectionModel) {
893
- const s = this.getRowByIndex(e);
894
- this.rowSelectionModel.checkRow(s, t);
895
- }
896
- }
897
- getMaxColspan() {
898
- return 31;
899
- }
900
- getMaxRowspan() {
901
- return 31;
902
- }
903
- getYPosByRowIndex(e) {
904
- return this.defaultRowHeight > 0 ? this.defaultRowHeight * e : this.yPositions[e];
905
- }
906
- init() {
907
- !this.yPositions.length && this.getRowCount() !== void 0 && this.defaultRowHeight === -1 && this.calcYPositions();
908
- }
909
- isFilterable() {
910
- return this.areaIdent === "body";
911
- }
912
- doSort(e) {
913
- return !1;
914
- }
915
- isEditable(e, t) {
916
- return this.columnDefs && t < this.columnDefs.length && this.columnDefs[t].editable ? this.columnDefs[t].editable() : !1;
917
- }
918
- setValue(e, t, s) {
919
- var n;
920
- const i = (n = this.columnDefs[t]) == null ? void 0 : n.editInputPipe;
921
- i && (s = i(s, e, t));
922
- const o = this.getRowByIndex(e), r = this.columnDefs[t].property;
923
- return r.includes(".") ? this.setPropertyValue(o, r.split("."), s) : (o[r] = s, !0);
924
- }
925
- isSelectable(e, t) {
926
- return !0;
927
- }
928
- changeColumnOrder(e, t) {
929
- this.arrayMove(this.cellRenderers, e, t);
930
- }
931
- setPropertyValue(e, t, s) {
932
- const i = t.shift();
933
- if (i) {
934
- let o = e[i];
935
- return o && t.length ? this.setPropertyValue(o, t, s) : (e[i] = s, !0);
936
- }
937
- return !1;
938
- }
939
- arrayMove(e, t, s) {
940
- const i = e.splice(t, 1)[0];
941
- return e.splice(s, 0, i), e;
942
- }
943
- calcYPositions() {
944
- const e = this.getRowCount();
945
- this.yPositions = new Array(e + 1), this.yPositions[0] = 0;
946
- for (let t = 0; t < e; t++)
947
- this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
948
- }
949
- }
950
- class ke {
951
- genericSortComparator(e, t, s) {
952
- if (typeof e == "number" && typeof t == "number")
953
- return s * (e - t);
954
- if (typeof e == "string" && typeof t == "string")
955
- return s * e.localeCompare(t);
956
- if (typeof e == "boolean" && typeof t == "boolean")
957
- return s * ((e ? -1 : 1) - (t ? -1 : 1));
958
- if (e instanceof Date && t instanceof Date)
959
- return s * (e.getTime() - t.getTime());
960
- if (e instanceof Array && t instanceof Array) {
961
- const i = e, o = t;
962
- if (i.length && o.length)
963
- return this.genericSortComparator(i[0], o[0], s);
964
- }
965
- return s * ("" + e).localeCompare("" + t);
966
- }
967
- }
968
- class ee extends We {
969
- constructor(e, t, s, i = []) {
970
- super(e, i, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = i, this.sorterService = new ke(), this.service = new _e(), this.properties = i.map((o) => o.property), this.flattenRows = this.service.flattenTree(t), this.filteredFlattenRows = [...this.flattenRows];
971
- }
972
- changeColumnOrder(e, t) {
973
- this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
974
- }
975
- recalcVisibleTreeRows() {
976
- this.filteredFlattenRows = this.service.flattenTree(this.rows);
977
- }
978
- getFilteredFlattenRows() {
979
- return this.filteredFlattenRows;
980
- }
981
- getRowCount() {
982
- let e = 0;
983
- for (const t of this.filteredFlattenRows)
984
- this.service.isVisible(t) && e++;
985
- return e;
986
- }
987
- getValueAt(e, t) {
988
- const s = this.getRowByIndex(e);
989
- if (s) {
990
- const i = this.properties[t];
991
- if (i)
992
- return i.includes(".") ? this.getPropertyValue(s.data, i.split(".")) : s.data[i];
993
- }
994
- return "";
995
- }
996
- getRowHeight(e) {
997
- return this.defaultRowHeight;
998
- }
999
- getCustomClassesAt(e, t) {
1000
- return ["ge-table-tree-cell", "ge-table-tree-deep-" + this.filteredFlattenRows[e].deep];
1001
- }
1002
- getRowByIndex(e) {
1003
- return this.filteredFlattenRows[e];
1004
- }
1005
- getValueByT(e, t) {
1006
- return t.includes(".") ? this.getPropertyValue(e, t.split(".")) : e[t];
1007
- }
1008
- externalFilterChanged(e) {
1009
- this.lastPredictFn = e, this.doFiltering();
1010
- }
1011
- doSort(e) {
1012
- const { columnIndex: t, sortState: s } = e[e.length - 1], i = s === "asc" ? 1 : s === "desc" ? -1 : 0, o = this.properties[t];
1013
- return this.treeSort(this.rows, o, i), this.flattenRows = this.service.flattenTree(this.rows), this.filteredFlattenRows = [...this.flattenRows], !0;
1014
- }
1015
- toggleExpandCollapseAll(e) {
1016
- this.expandAllRecursive(this.rows, e), this.flattenRows = this.service.flattenTree(this.rows), this.doFiltering();
1017
- }
1018
- setAllParentsOk(e) {
1019
- return e.parent && (e.parent.keep = !0, this.setAllParentsOk(e.parent)), !1;
1020
- }
1021
- setValue(e, t, s) {
1022
- var r;
1023
- const i = (r = this.columnDefs[t]) == null ? void 0 : r.editInputPipe;
1024
- i && (s = i(s, e, t));
1025
- const o = this.getRowByIndex(e);
1026
- if (o) {
1027
- const n = o.data, a = this.columnDefs[t].property;
1028
- return a.includes(".") ? this.setPropertyValue(n, a.split("."), s) : (n[a] = s, !0);
1029
- }
1030
- return !1;
1031
- }
1032
- genericTreeTableSortComparator(e, t) {
1033
- return (s, i) => {
1034
- const o = this.getValueByT(s.data, e), r = this.getValueByT(i.data, e);
1035
- return this.sorterService.genericSortComparator(o, r, t);
1036
- };
1037
- }
1038
- expandAllRecursive(e, t) {
1039
- for (const s of e)
1040
- s.expanded = t, s.children && this.expandAllRecursive(s.children, t);
1041
- }
1042
- doFiltering() {
1043
- if (!this.lastPredictFn)
1044
- this.filteredFlattenRows = [...this.flattenRows ? this.flattenRows : []];
1045
- else {
1046
- this.flattenRows || (this.flattenRows = []);
1047
- let e = 0;
1048
- this.flattenRows.forEach((s) => {
1049
- e = Math.max(e, s.deep);
1050
- });
1051
- const t = this.flattenRows.filter(
1052
- (s, i, o) => this.lastPredictFn(s, i, o)
1053
- );
1054
- this.flattenRows.forEach((s) => s.keep = !1), this.flattenRows.forEach((s) => {
1055
- t.includes(s) && (s.keep = !0, this.setAllParentsOk(s));
1056
- }), this.filteredFlattenRows = this.flattenRows.filter(
1057
- (s, i, o) => s.keep
1058
- );
1059
- }
1060
- }
1061
- getPropertyValue(e, t) {
1062
- const s = t.shift();
1063
- let i = e[s];
1064
- return i && t.length ? this.getPropertyValue(i, t) : i;
1065
- }
1066
- treeSort(e, t, s) {
1067
- e.sort(this.genericTreeTableSortComparator(t, s));
1068
- for (const i of e)
1069
- i.children && this.treeSort(i.children, t, s);
1070
- }
1071
- }
1072
852
  class oe {
1073
853
  constructor(e) {
1074
854
  this.getStorageKeyFn = e;
@@ -1144,7 +924,7 @@ class oe {
1144
924
  // }
1145
925
  // }
1146
926
  }
1147
- class Ge extends oe {
927
+ class Ne extends oe {
1148
928
  constructor(e) {
1149
929
  super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
1150
930
  }
@@ -1166,14 +946,14 @@ class Ge extends oe {
1166
946
  }
1167
947
  }
1168
948
  }
1169
- class Ne {
949
+ class je {
1170
950
  constructor(e = "collapsed", t = [], s = !1, i = !1) {
1171
951
  this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = i;
1172
952
  }
1173
953
  }
1174
- class je extends oe {
954
+ class Xe extends oe {
1175
955
  constructor(e) {
1176
- super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Ne(), this.load();
956
+ super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new je(), this.load();
1177
957
  }
1178
958
  collapsedExpandedStateGet() {
1179
959
  return this.collapsedExpandedState;
@@ -1205,7 +985,7 @@ class je extends oe {
1205
985
  this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
1206
986
  }
1207
987
  }
1208
- class ze extends oe {
988
+ class Ke extends oe {
1209
989
  constructor(e) {
1210
990
  super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
1211
991
  }
@@ -1227,14 +1007,14 @@ class ze extends oe {
1227
1007
  }
1228
1008
  }
1229
1009
  }
1230
- class F {
1010
+ class O {
1231
1011
  constructor(e = 0, t = 0, s = 0, i = 0, o) {
1232
1012
  this.left = e, this.width = t, this.height = s, this.top = i, this.index = o;
1233
1013
  }
1234
1014
  }
1235
- class Xe {
1015
+ class ze {
1236
1016
  constructor(e, t, s, i) {
1237
- this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = i, this.scrollTop = 0, this.areaBodyWestGeo = new F(), this.areaBodyCenterGeo = new F(), this.areaBodyEastGeo = new F();
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();
1238
1018
  const o = this.hostElement;
1239
1019
  o.innerText = "", this.dom.setAttribute(o, "tabindex", "0"), this.dom.setStyle(
1240
1020
  this.dom.addClass("ge-table", o),
@@ -1409,7 +1189,7 @@ class T {
1409
1189
  return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
1410
1190
  }
1411
1191
  }
1412
- class Ke {
1192
+ class Ye {
1413
1193
  constructor(e, t) {
1414
1194
  this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
1415
1195
  }
@@ -1442,22 +1222,22 @@ class Ke {
1442
1222
  return !1;
1443
1223
  }
1444
1224
  }
1445
- class Ye {
1225
+ class Ue {
1446
1226
  constructor(e, t, s) {
1447
1227
  this.header = e, this.body = t, this.footer = s;
1448
1228
  }
1449
1229
  }
1450
- class Ue extends Xe {
1230
+ class qe extends ze {
1451
1231
  constructor(e, t, s, i) {
1452
1232
  var r, n;
1453
1233
  super(e, t, s, i), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
1454
1234
  header: [],
1455
1235
  body: [],
1456
1236
  footer: []
1457
- }, this.tree = !1, this.colAndRowspanModels = new Ye(), 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), t.getAreaModel("body") instanceof ee && (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(
1458
1238
  (a) => {
1459
1239
  var h;
1460
- this.colAndRowspanModels[a] = new Ke(t, t.getAreaModel(a)), (h = this.colAndRowspanModels[a]) == null || h.init();
1240
+ this.colAndRowspanModels[a] = new Ye(t, t.getAreaModel(a)), (h = this.colAndRowspanModels[a]) == null || h.init();
1461
1241
  }
1462
1242
  );
1463
1243
  }
@@ -1492,19 +1272,19 @@ class Ue extends Xe {
1492
1272
  for (const t of this.removables)
1493
1273
  t.remove();
1494
1274
  this.hideHoverRow(), this.hideHoverColumn(), this.scrollTop = this.scrollViewport.scrollTop, this.scrollLeft = this.scrollViewport.scrollLeft, this.debounce(this.checkForScrollPosSaving.bind(this)), this.scrollFactorY = this.scrollTop / (this.scrollViewport.scrollHeight - this.scrollViewport.clientHeight), this.scrollFactorX = this.scrollLeft / (this.scrollViewport.scrollWidth - this.scrollViewport.clientWidth), isNaN(this.scrollFactorY) && (this.scrollFactorY = 0), isNaN(this.scrollFactorX) && (this.scrollFactorX = 0), this.adjustBody(), this.adjustArea("footer"), this.adjustArea("header"), this.tableOptions.tableTopBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
1495
- new F(0, this.hostElement.clientWidth, 1, 0),
1275
+ new O(0, this.hostElement.clientWidth, 1, 0),
1496
1276
  this.hostElement,
1497
1277
  "ge-table-border"
1498
1278
  )), this.tableOptions.tableBottomBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
1499
- new F(0, this.hostElement.clientWidth, 1, this.hostElement.clientHeight - 1),
1279
+ new O(0, this.hostElement.clientWidth, 1, this.hostElement.clientHeight - 1),
1500
1280
  this.hostElement,
1501
1281
  "ge-table-border"
1502
1282
  )), this.tableModel.getFixedLeftColumnCount() > 0 && this.removables.push(this.dom.addVerticalBorder(
1503
- new F(this.areaBodyWest.child.clientWidth, 1, this.hostElement.clientHeight, 0),
1283
+ new O(this.areaBodyWest.child.clientWidth, 1, this.hostElement.clientHeight, 0),
1504
1284
  this.hostElement,
1505
1285
  "ge-table-body-west-vertical-border"
1506
1286
  )), ((e = this.tableModel.getAreaModel("header")) == null ? void 0 : e.getRowCount()) > 0 && this.removables.push(this.dom.addHorizontalBorder(
1507
- new F(0, this.hostElement.clientWidth, 1, this.areaHeaderCenter.child.clientHeight),
1287
+ new O(0, this.hostElement.clientWidth, 1, this.areaHeaderCenter.child.clientHeight),
1508
1288
  this.hostElement,
1509
1289
  "ge-table-body-west-vertical-border"
1510
1290
  ));
@@ -1513,10 +1293,12 @@ class Ue extends Xe {
1513
1293
  var e, t;
1514
1294
  this.storeScrollPosStateService && ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.autoRestoreScrollPosition) && this.storeScrollPosStateService.updateScrollOffset([this.scrollLeft, this.scrollTop]);
1515
1295
  }
1516
- updateCells(e) {
1296
+ updateCells(e, t = !1) {
1517
1297
  e.forEach(
1518
- (t) => this.tableModel.getAreaModel(t.area).setValue(t.rowIndex, t.columnIndex, t.value)
1519
- ), 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();
1520
1302
  }
1521
1303
  getAreaAndSideIdentByAttr(e) {
1522
1304
  if (e) {
@@ -1579,82 +1361,82 @@ class Ue extends Xe {
1579
1361
  s.child.innerText = "", i.child.innerText = "", o.child.innerText = "";
1580
1362
  const n = 0, a = this.areaBodyCenterGeo.width, h = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e), c = d.getRowCount();
1581
1363
  for (; this.cleanupFunctions[e].length; ) {
1582
- const g = this.cleanupFunctions[e].shift();
1583
- g && g();
1364
+ const S = this.cleanupFunctions[e].shift();
1365
+ S && S();
1584
1366
  }
1585
1367
  let p = t;
1586
- const S = this.tableModel.getColumnCount(), u = this.tableModel.getFixedRightColumnCount(), y = this.tableModel.getFixedLeftColumnCount();
1587
- for (let g = 0; g < c; g++) {
1588
- const x = p, C = g === c - 1, R = this.tableModel.getRowHeight(e, g);
1589
- if (x + R > 0) {
1590
- this.firstVisibleRowIndex = g;
1591
- let v = { left: n, width: a, height: R, top: x, index: g }, m = this.dom.addRowDiv(i, v, g, e, "center");
1592
- const D = y;
1368
+ const g = this.tableModel.getColumnCount(), u = this.tableModel.getFixedRightColumnCount(), y = this.tableModel.getFixedLeftColumnCount();
1369
+ for (let S = 0; S < c; S++) {
1370
+ const C = p, x = S === c - 1, M = this.tableModel.getRowHeight(e, S);
1371
+ if (C + M > 0) {
1372
+ this.firstVisibleRowIndex = S;
1373
+ let w = { left: n, width: a, height: M, top: C, index: S }, m = this.dom.addRowDiv(i, w, S, e, "center");
1374
+ const I = y;
1593
1375
  if (this.adjustColumnsToRowParent({
1594
1376
  areaIdent: e,
1595
1377
  sideIdent: "center",
1596
1378
  areaModel: d,
1597
- geo: v,
1379
+ geo: w,
1598
1380
  parent: m,
1599
- rowIndex: g,
1600
- columnIndexStart: D,
1601
- columnIndexEnd: S - u - 1,
1381
+ rowIndex: S,
1382
+ columnIndexStart: I,
1383
+ columnIndexEnd: g - u - 1,
1602
1384
  verticalFixed: !1,
1603
- lastRowOfModel: C
1604
- }), h.left > 0 && (v = { left: n, width: this.areaBodyWestGeo.width, height: R, top: x, index: g }, m = this.dom.addRowDiv(s, v, g, 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({
1605
1387
  areaIdent: e,
1606
1388
  sideIdent: "west",
1607
1389
  areaModel: d,
1608
- geo: v,
1390
+ geo: w,
1609
1391
  parent: m,
1610
- rowIndex: g,
1392
+ rowIndex: S,
1611
1393
  columnIndexStart: 0,
1612
- columnIndexEnd: D - 1,
1394
+ columnIndexEnd: I - 1,
1613
1395
  verticalFixed: !0,
1614
- lastRowOfModel: C
1615
- })), h.right > 0 && (v = { left: n, width: this.areaBodyEastGeo.width, height: R, top: x, index: g }, m = this.dom.addRowDiv(o, v, g, 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({
1616
1398
  areaIdent: e,
1617
1399
  sideIdent: "east",
1618
1400
  areaModel: d,
1619
- geo: v,
1401
+ geo: w,
1620
1402
  parent: m,
1621
- rowIndex: g,
1622
- columnIndexStart: S - u,
1623
- columnIndexEnd: S - 1,
1403
+ rowIndex: S,
1404
+ columnIndexStart: g - u,
1405
+ columnIndexEnd: g - 1,
1624
1406
  verticalFixed: !0,
1625
- lastRowOfModel: C
1626
- })), e === "header" && this.tree && g === c - 1) {
1627
- const M = this.dom.applyStyle(
1407
+ lastRowOfModel: x
1408
+ })), e === "header" && this.tree && S === c - 1) {
1409
+ const R = this.dom.applyStyle(
1628
1410
  this.dom.setAttribute(
1629
- this.dom.addDiv(m, new F(16, 20, 20, 8)),
1411
+ this.dom.addDiv(m, new O(16, 20, 20, 8)),
1630
1412
  "data-ge-action",
1631
1413
  "toggleExpandCollapseAll"
1632
1414
  ),
1633
1415
  { cursor: "pointer" }
1634
- ), I = this.tableOptions.treeOptions.arrowExpandCollapseAll;
1635
- if (I) {
1636
- const _ = this.dom.domService.createText(I.content);
1637
- this.dom.domService.appendChild(M, _), I.style && this.dom.applyStyleString(M, I.style);
1416
+ ), D = this.tableOptions.treeOptions.arrowExpandCollapseAll;
1417
+ if (D) {
1418
+ const V = this.dom.domService.createText(D.content);
1419
+ this.dom.domService.appendChild(R, V), D.style && this.dom.applyStyleString(R, D.style);
1638
1420
  }
1639
1421
  }
1640
1422
  }
1641
- if (p = p + R, p > r)
1423
+ if (p = p + M, p > r)
1642
1424
  break;
1643
1425
  }
1644
1426
  if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
1645
- const g = ((f = this.colAndRowspanModels[e]) == null ? void 0 : f.getRanges()) ?? [];
1646
- if (g.length)
1647
- for (const x of g) {
1648
- let C = 0, R = i.child, v = "center";
1649
- if (x.c1 < y)
1650
- R = s.child, v = "west";
1651
- else if (u > 0 && x.c1 >= S - u)
1652
- R = o.child, v = "east";
1427
+ const S = ((f = this.colAndRowspanModels[e]) == null ? void 0 : f.getRanges()) ?? [];
1428
+ if (S.length)
1429
+ for (const C of S) {
1430
+ let x = 0, M = i.child, w = "center";
1431
+ if (C.c1 < y)
1432
+ M = s.child, w = "west";
1433
+ else if (u > 0 && C.c1 >= g - u)
1434
+ M = o.child, w = "east";
1653
1435
  else {
1654
1436
  const m = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1655
- C = this.scrollFactorX * m - this.areaBodyWestGeo.width, v = "center";
1437
+ x = this.scrollFactorX * m - this.areaBodyWestGeo.width, w = "center";
1656
1438
  }
1657
- this.drawBigCell(x, C, t, d, R, v);
1439
+ this.drawBigCell(C, x, t, d, M, w);
1658
1440
  }
1659
1441
  }
1660
1442
  }
@@ -1669,10 +1451,10 @@ class Ue extends Xe {
1669
1451
  * @protected
1670
1452
  */
1671
1453
  drawBigCell(e, t, s, i, o, r) {
1672
- const n = s + this.getRowHeights(0, e.r1 - 1, i).reduce((f, g) => f + g, 0), a = this.tableModel.getColumnCount(), h = this.tableModel.getFixedRightColumnCount();
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();
1673
1455
  let d = 0;
1674
1456
  h > 0 && e.c1 >= a - h && (d = a - h);
1675
- const c = t + this.getColumnWidths(d, e.c1 - 1).reduce((f, g) => f + g, 0), p = this.getRowHeights(e.r1, e.r2, i).reduce((f, g) => f + g, 0), S = this.getColumnWidths(e.c1, e.c2).reduce((f, g) => f + g, 0);
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);
1676
1458
  let u = !1;
1677
1459
  const y = this.getSelectionModel ? this.getSelectionModel() : void 0;
1678
1460
  y && (u = y.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? (console.info("TODO here", e), this.renderCell({
@@ -1683,7 +1465,7 @@ class Ue extends Xe {
1683
1465
  columnIndex: e.c1,
1684
1466
  left: c,
1685
1467
  top: n,
1686
- width: S,
1468
+ width: g,
1687
1469
  height: p,
1688
1470
  parent: o,
1689
1471
  cellSelected: u,
@@ -1697,7 +1479,7 @@ class Ue extends Xe {
1697
1479
  columnIndex: e.c1,
1698
1480
  left: c,
1699
1481
  top: n,
1700
- width: S,
1482
+ width: g,
1701
1483
  height: p,
1702
1484
  parent: o,
1703
1485
  cellSelected: u,
@@ -1708,7 +1490,7 @@ class Ue extends Xe {
1708
1490
  columnIndex: e.c1,
1709
1491
  cellLeft: c,
1710
1492
  cellTop: n,
1711
- cellWidth: S,
1493
+ cellWidth: g,
1712
1494
  cellHeight: p,
1713
1495
  parent: o
1714
1496
  });
@@ -1743,52 +1525,52 @@ class Ue extends Xe {
1743
1525
  const f = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1744
1526
  c = this.scrollFactorX * f;
1745
1527
  }
1746
- const p = 0, S = !!(e === "body" && t);
1528
+ const p = 0, g = !!(e === "body" && t);
1747
1529
  let u = c;
1748
1530
  for (let f = n; f <= a; f++) {
1749
- const g = u, x = this.tableModel.getColumnWidth(f);
1750
- if (x > 0 && g + x > 0) {
1751
- let C = i.height;
1752
- const R = s.getRowspanAt(r, f), v = s.getColspanAt(r, f);
1753
- R > 1 && (C = this.getRowHeights(r, r + R - 1, s).reduce((M, I) => M + I, 0));
1754
- let m = x;
1755
- v > 1 && (m = this.getColumnWidths(f, f + v - 1).reduce((M, I) => M + I, 0));
1756
- let D = !1;
1757
- if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (y = this.colAndRowspanModels[e]) != null && y.isInRange(r, f) && (D = !0), this.draggingTargetColumnIndex === f && e !== "header") {
1758
- this.renderDragTargetDiv(o, g, p, m, C);
1759
- const M = { left: g, top: p, width: m, height: C };
1760
- this.dom.addColumnBorderDivs(this.tableOptions, o, M, e, t);
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;
1537
+ w > 1 && (m = this.getColumnWidths(f, f + w - 1).reduce((R, D) => R + D, 0));
1538
+ let I = !1;
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 };
1542
+ this.dom.addColumnBorderDivs(this.tableOptions, o, R, e, t);
1761
1543
  } else {
1762
- const M = this.renderSelectedBackgroundDiv(D, S, t, s, r, f, o, g, p, m, C);
1763
- D || this.renderCell({
1544
+ const R = this.renderSelectedBackgroundDiv(I, g, t, s, r, f, o, S, p, m, x);
1545
+ I || this.renderCell({
1764
1546
  areaModel: s,
1765
1547
  areaIdent: e,
1766
1548
  sideIdent: t,
1767
1549
  rowIndex: r,
1768
1550
  columnIndex: f,
1769
- left: g,
1551
+ left: S,
1770
1552
  top: p,
1771
1553
  width: m,
1772
- height: C,
1554
+ height: x,
1773
1555
  parent: o,
1774
- cellSelected: M,
1556
+ cellSelected: R,
1775
1557
  lastRowOfModel: d,
1776
1558
  gammaRange: !0
1777
1559
  }), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1778
1560
  rowIndex: r,
1779
1561
  columnIndex: f,
1780
- cellLeft: g,
1562
+ cellLeft: S,
1781
1563
  cellTop: p,
1782
1564
  cellWidth: m,
1783
- cellHeight: C,
1565
+ cellHeight: x,
1784
1566
  parent: o
1785
1567
  });
1786
1568
  }
1787
1569
  }
1788
- if (u = u + x, u > this.areaBodyCenterGeo.width)
1570
+ if (u = u + C, u > this.areaBodyCenterGeo.width)
1789
1571
  break;
1790
1572
  }
1791
- this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new F(u - 1, 1, i.height, 0), o);
1573
+ this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new O(u - 1, 1, i.height, 0), o);
1792
1574
  }
1793
1575
  getTreeArrowColumnIndex() {
1794
1576
  return this.tableOptions.showCheckboxWihoutExtraColumn ? 0 : this.tableModel.isRowCheckboxVisible() ? 1 : 0;
@@ -1806,47 +1588,71 @@ class Ue extends Xe {
1806
1588
  parent: d,
1807
1589
  lastRowOfModel: c
1808
1590
  }) {
1809
- var re;
1810
- const S = 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);
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);
1811
1593
  let f = "none";
1812
- if (o === this.getTreeArrowColumnIndex() && y instanceof Z) {
1813
- const w = y;
1814
- (re = w.children) != null && re.length ? w.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
1594
+ if (o === this.getTreeArrowColumnIndex() && Z(y)) {
1595
+ const v = y;
1596
+ (ne = v.children) != null && ne.length ? v.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
1815
1597
  }
1816
- let x;
1598
+ let C;
1817
1599
  if (t === "header") {
1818
- const w = this.tableModel.getColumnDef(o);
1819
- (!(w != null && w.sortIconVisible) || w != null && w.sortIconVisible()) && (x = w == null ? void 0 : w.sortState);
1600
+ const v = this.tableModel.getColumnDef(o);
1601
+ (!(v != null && v.sortIconVisible) || v != null && v.sortIconVisible()) && (C = v == null ? void 0 : v.sortState);
1820
1602
  }
1821
- const C = e.getValueAt(i, o), R = S ? "" : `${C}`, v = 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(
1822
1604
  d,
1823
1605
  u,
1824
1606
  i,
1825
1607
  o,
1826
1608
  t,
1827
1609
  s,
1828
- R,
1610
+ M,
1829
1611
  f,
1830
1612
  this.tableOptions,
1831
- v,
1832
- x
1833
- ), D = e.getTooltipAt(i, o);
1834
- D && this.dom.setAttribute(m, "title", D);
1835
- const M = this.tableModel.getColumnDef(o);
1836
- M && M.classes[t] && this.dom.addClasses(M.classes[t], m);
1837
- let I;
1838
- S && (I = S.render(m, i, o, t, e, C, this.dom.domService));
1839
- const _ = e.getCustomClassesAt(i, o);
1840
- if (_.length && this.dom.addClasses(_, 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") {
1841
- const w = this.getFocusModel();
1842
- w != null && w.hasFocus(i, o) && this.dom.addFocusBorderDivs(d, u, {});
1613
+ w,
1614
+ C
1615
+ ), I = e.getTooltipAt(i, o);
1616
+ I && this.dom.setAttribute(m, "title", I);
1617
+ const R = this.tableModel.getColumnDef(o);
1618
+ R && R.classes[t] && this.dom.addClasses(R.classes[t], m);
1619
+ let D;
1620
+ g && (D = g.render(m, i, o, t, e, x, this.dom.domService));
1621
+ const V = e.getCustomClassesAt(i, o);
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") {
1623
+ const v = this.getFocusModel();
1624
+ v != null && v.hasFocus(i, o) && this.dom.addFocusBorderDivs(d, u, {});
1843
1625
  }
1844
1626
  t === "header" && this.dom.setAttribute(m, "data-ge-action", "drag-column");
1845
- const K = e.getCustomStyleAt(i, o);
1846
- if (K)
1847
- for (const w in K)
1848
- this.dom.setStyle(m, w, K[w]);
1849
- return [m, I];
1627
+ const z = e.getCustomStyleAt(i, o);
1628
+ if (z)
1629
+ for (const v in z)
1630
+ this.dom.setStyle(m, v, z[v]);
1631
+ return [m, D];
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
+ }
1850
1656
  }
1851
1657
  getColumnWidths(e, t) {
1852
1658
  const s = [];
@@ -1908,9 +1714,9 @@ class Ue extends Xe {
1908
1714
  renderSelectedBackgroundDiv(e, t, s, i, o, r, n, a, h, d, c) {
1909
1715
  let p = !1;
1910
1716
  if (!e && t && i.isSelectable(o, r) && this.getSelectionModel) {
1911
- const S = this.getSelectionModel();
1912
- if (S) {
1913
- const u = S.getSelectionCount(o, r);
1717
+ const g = this.getSelectionModel();
1718
+ if (g) {
1719
+ const u = g.getSelectionCount(o, r);
1914
1720
  p = u > 0;
1915
1721
  for (let y = 0; y < u; y++) {
1916
1722
  const f = this.dom.applyStylePosistionAbsolute(
@@ -1936,7 +1742,7 @@ class Ue extends Xe {
1936
1742
  parent: d,
1937
1743
  cellSelected: c,
1938
1744
  lastRowOfModel: p,
1939
- gammaRange: S
1745
+ gammaRange: g
1940
1746
  }) {
1941
1747
  const [u, y] = this.addAndRenderCellDiv({
1942
1748
  areaModel: e,
@@ -1950,7 +1756,7 @@ class Ue extends Xe {
1950
1756
  top: n,
1951
1757
  parent: d,
1952
1758
  lastRowOfModel: p,
1953
- gammaRange: S
1759
+ gammaRange: g
1954
1760
  });
1955
1761
  c && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, u), y && this.cleanupFunctions[t].push(y);
1956
1762
  }
@@ -1959,12 +1765,12 @@ class Ue extends Xe {
1959
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);
1960
1766
  }
1961
1767
  }
1962
- class qe {
1768
+ class Je {
1963
1769
  constructor(e, t) {
1964
1770
  this.columnIndex = e, this.sortState = t;
1965
1771
  }
1966
1772
  }
1967
- class Je {
1773
+ class Qe {
1968
1774
  constructor(e) {
1969
1775
  this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
1970
1776
  }
@@ -1978,7 +1784,7 @@ class Je {
1978
1784
  }
1979
1785
  }
1980
1786
  }
1981
- class Qe {
1787
+ class Ze {
1982
1788
  constructor(e = -1, t = -1) {
1983
1789
  this.rowIndex = e, this.columnIndex = t;
1984
1790
  }
@@ -1988,10 +1794,10 @@ class le {
1988
1794
  this.cells = e;
1989
1795
  }
1990
1796
  static createSingle(e, t) {
1991
- return new le([new Qe(e, t)]);
1797
+ return new le([new Ze(e, t)]);
1992
1798
  }
1993
1799
  }
1994
- class Ze {
1800
+ class et {
1995
1801
  constructor(e) {
1996
1802
  var t, s;
1997
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);
@@ -2000,8 +1806,8 @@ class Ze {
2000
1806
  var o, r, n, a, h, d, c;
2001
1807
  let s = !1, i = !1;
2002
1808
  if (this.getSelectionModel && this.getFocusModel) {
2003
- const p = this.getSelectionModel(), S = this.getFocusModel();
2004
- p && S && (S.hasFocus(e.rowIndex, e.columnIndex) || (S.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));
1809
+ const p = this.getSelectionModel(), g = this.getFocusModel();
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));
2005
1811
  }
2006
1812
  return i ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
2007
1813
  }
@@ -2032,7 +1838,7 @@ class Ze {
2032
1838
  });
2033
1839
  }
2034
1840
  }
2035
- class et {
1841
+ class tt {
2036
1842
  get() {
2037
1843
  return {
2038
1844
  f2: "START_EDITING",
@@ -2050,7 +1856,7 @@ class et {
2050
1856
  };
2051
1857
  }
2052
1858
  }
2053
- class tt {
1859
+ class st {
2054
1860
  get() {
2055
1861
  return {
2056
1862
  f2: "START_EDITING",
@@ -2070,7 +1876,7 @@ class tt {
2070
1876
  };
2071
1877
  }
2072
1878
  }
2073
- class st {
1879
+ class it {
2074
1880
  constructor(e) {
2075
1881
  this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
2076
1882
  }
@@ -2078,7 +1884,7 @@ class st {
2078
1884
  this.listener.includes(e) || this.listener.push(e);
2079
1885
  }
2080
1886
  init() {
2081
- this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new tt().get()) : Object.assign(this.shortcutActionIdMapping, new et().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));
1887
+ this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new st().get()) : Object.assign(this.shortcutActionIdMapping, new tt().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));
2082
1888
  }
2083
1889
  isMacintosh() {
2084
1890
  return navigator.platform.indexOf("Mac") > -1;
@@ -2122,7 +1928,7 @@ class st {
2122
1928
  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();
2123
1929
  }
2124
1930
  }
2125
- class it {
1931
+ class he {
2126
1932
  onCheckboxChanged(e) {
2127
1933
  }
2128
1934
  onContextmenu(e) {
@@ -2138,19 +1944,153 @@ class it {
2138
1944
  onMouseMoved(e) {
2139
1945
  }
2140
1946
  }
2141
- class ot extends Ue {
1947
+ class ye {
1948
+ setStyle(e, t, s) {
1949
+ return e.style[t] = s, e;
1950
+ }
1951
+ appendText(e, t) {
1952
+ const s = this.createText(t);
1953
+ return this.appendChild(e, s), s;
1954
+ }
1955
+ addClass(e, t) {
1956
+ return t.includes(" ") ? t.split(" ").forEach((s) => e.classList.add(s)) : e.classList.add(t), e;
1957
+ }
1958
+ removeClass(e, t) {
1959
+ return t.includes(" ") ? t.split(" ").forEach((s) => e.classList.remove(s)) : e.classList.remove(t), e;
1960
+ }
1961
+ appendChild(e, t) {
1962
+ e.appendChild(t);
1963
+ }
1964
+ createElement(e) {
1965
+ return document.createElement(e);
1966
+ }
1967
+ createText(e) {
1968
+ return document.createTextNode(e);
1969
+ }
1970
+ setAttribute(e, t, s) {
1971
+ e.setAttribute(t, s);
1972
+ }
1973
+ }
1974
+ class ot {
1975
+ render(e, t, s, i, o, r, n) {
1976
+ if (o.isEditable(t, s)) {
1977
+ n.addClass(e, "ge-table-row-input-div");
1978
+ const a = o.getValueAt(t, s);
1979
+ e.innerHTML = `
1980
+ <input
1981
+ type="text"
1982
+ value="${a}"
1983
+ autofocus
1984
+ onfocus="this.setSelectionRange(0, this.value.length)"
1985
+ data-listen="change"
1986
+ data-area="${i}"
1987
+ data-row-index="${t}"
1988
+ data-col-index="${s}"
1989
+ data-input-type="text"
1990
+ style="width:calc(100% - 8px);height:100%;border:0;padding:0 0 0 8px;"
1991
+ class="ge-table-cell-editor-input">`;
1992
+ }
1993
+ }
1994
+ }
1995
+ class lt {
1996
+ constructor(e = "none", t = "single") {
1997
+ this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
1998
+ }
1999
+ getSelectionCount(e, t) {
2000
+ let s = 0;
2001
+ for (const i of this.ranges)
2002
+ i.isInRange(e, t) && s++;
2003
+ return this.allSelected && s++, this.isInNegativeRange(e, t) && (s = 0), s;
2004
+ }
2005
+ isInNegativeRange(e, t) {
2006
+ for (const s of this.negativeRanges)
2007
+ if (s.isInRange(e, t))
2008
+ return !0;
2009
+ return !1;
2010
+ }
2011
+ getRanges() {
2012
+ return this.ranges;
2013
+ }
2014
+ clear() {
2015
+ this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
2016
+ }
2017
+ hasSelection() {
2018
+ return !!this.ranges.length;
2019
+ }
2020
+ selectAll() {
2021
+ this.allSelected = !0;
2022
+ }
2023
+ addSelection(e) {
2024
+ this.addRange(e);
2025
+ }
2026
+ removeSelection(e) {
2027
+ if (this.selectionType === "none")
2028
+ return;
2029
+ let t = e;
2030
+ this.selectionType === "row" ? t = T.singleRow(e.r1) : this.selectionType === "column" && (t = T.singleColumn(e.c1)), this.negativeRanges.push(t);
2031
+ }
2032
+ togglePoint(e, t) {
2033
+ this.getSelectionCount(e, t) > 0 ? this.removeSelection(T.singleCell(e, t)) : this.addSelection(T.singleCell(e, t));
2034
+ }
2035
+ addRange(e) {
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));
2037
+ }
2038
+ }
2039
+ class rt {
2040
+ constructor(e = "none") {
2041
+ this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
2042
+ }
2043
+ clearChanged() {
2044
+ this.changed = !1;
2045
+ }
2046
+ hasChanged() {
2047
+ return this.changed;
2048
+ }
2049
+ clear() {
2050
+ this.rowIndex = -1, this.columnIndex = -1;
2051
+ }
2052
+ setFocus(e, t) {
2053
+ (this.rowIndex !== e || this.columnIndex !== t) && (this.rowIndex = e, this.columnIndex = t, this.changed = !0);
2054
+ }
2055
+ hasFocus(e, t) {
2056
+ return this.rowIndex === e && this.columnIndex === t;
2057
+ }
2058
+ getFocus() {
2059
+ return [this.rowIndex, this.columnIndex];
2060
+ }
2061
+ }
2062
+ const nt = new lt(), at = new rt("cell");
2063
+ class ve {
2064
+ constructor() {
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 = {
2066
+ header: 34,
2067
+ body: 34,
2068
+ footer: 34
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;
2070
+ }
2071
+ }
2072
+ class re extends qe {
2142
2073
  constructor(e, t, s, i, o) {
2143
2074
  var r;
2144
2075
  if (super(
2145
2076
  e,
2146
2077
  t,
2147
- new Pe(s),
2078
+ new Ve(s),
2148
2079
  i
2149
- ), this.eventListener = o, this.selectionService = new Ze(this), this.api = new Ve(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, o || (this.eventListener = new it()), (r = this.tableOptions) != null && r.autoRestoreOptions) {
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) {
2150
2081
  const n = this.tableOptions.autoRestoreOptions, a = n.getStorageKeyFn;
2151
- a && (n.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Ge(a)), n.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new je(a)), n.autoRestoreSortingState && (this.storeSortingService = new ze(a)));
2082
+ a && (n.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Ne(a)), n.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new Xe(a)), n.autoRestoreSortingState && (this.storeSortingService = new Ke(a)));
2152
2083
  }
2153
- this.mouseHandler = new He(this), this.inputHandler = new Je(this), this.shortcutService = new st(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);
2085
+ }
2086
+ static create(e, t, s = new ve(), i = new he(), o = new ye()) {
2087
+ return new re(
2088
+ e,
2089
+ t,
2090
+ o,
2091
+ s,
2092
+ i
2093
+ );
2154
2094
  }
2155
2095
  onActionTriggered(e) {
2156
2096
  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))
@@ -2176,7 +2116,7 @@ class ot extends Ue {
2176
2116
  */
2177
2117
  firstInit() {
2178
2118
  var e;
2179
- this.tableModel.init(), (e = this.tableOptions) != null && e.externalFilterFunction && this.externalFilterChanged(!1), this.autoRestoreCollapsedExpandedState(), this.autoRestoreSortingState(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows(), this.autoRestoreScrollPosition();
2119
+ return this.tableModel.init(), (e = this.tableOptions) != null && e.externalFilterFunction && this.externalFilterChanged(!1), this.autoRestoreCollapsedExpandedState(), this.autoRestoreSortingState(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows(), this.autoRestoreScrollPosition(), this;
2180
2120
  }
2181
2121
  createGeMouseEvent(e) {
2182
2122
  const t = new se();
@@ -2211,7 +2151,7 @@ class ot extends Ue {
2211
2151
  toggleExpandCollapseAll(e = !0) {
2212
2152
  var s;
2213
2153
  const t = this.tableModel.getBodyModel();
2214
- t instanceof ee && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
2154
+ ee(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
2215
2155
  }
2216
2156
  toggleRowCheckbox(e, t, s) {
2217
2157
  var a;
@@ -2237,7 +2177,7 @@ class ot extends Ue {
2237
2177
  const i = this.tableModel.getColumnDef(s);
2238
2178
  if (i != null && i.sortable && i.sortable()) {
2239
2179
  e.preventDefault(), e.stopPropagation();
2240
- const n = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, a = i.sortState ?? "", h = n[(n.indexOf(a) + 1) % n.length], d = new qe(s, h);
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);
2241
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]);
2242
2182
  }
2243
2183
  }
@@ -2282,7 +2222,7 @@ class ot extends Ue {
2282
2222
  const s = this.tableOptions.autoRestoreOptions, i = s.getRowId;
2283
2223
  if (s.autoRestoreCollapsedExpandedState && i) {
2284
2224
  const o = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
2285
- if (r instanceof ee) {
2225
+ if (ee(r)) {
2286
2226
  const n = r, a = r.getRowCount();
2287
2227
  for (let h = 0; h < a; h++) {
2288
2228
  const d = r.getRowByIndex(h);
@@ -2302,203 +2242,77 @@ class ot extends Ue {
2302
2242
  }
2303
2243
  }
2304
2244
  }
2305
- class lt {
2306
- render(e, t, s, i, o, r, n) {
2307
- if (o.isEditable(t, s)) {
2308
- n.addClass(e, "ge-table-row-input-div");
2309
- const a = o.getValueAt(t, s);
2310
- e.innerHTML = `
2311
- <input
2312
- type="text"
2313
- value="${a}"
2314
- autofocus
2315
- onfocus="this.setSelectionRange(0, this.value.length)"
2316
- data-listen="change"
2317
- data-area="${i}"
2318
- data-row-index="${t}"
2319
- data-col-index="${s}"
2320
- data-input-type="text"
2321
- style="width:calc(100% - 8px);height:100%;border:0;padding:0 0 0 8px;"
2322
- class="ge-table-cell-editor-input">`;
2323
- }
2324
- }
2325
- }
2326
- class rt {
2327
- constructor(e = "none", t = "single") {
2328
- this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
2329
- }
2330
- getSelectionCount(e, t) {
2331
- let s = 0;
2332
- for (const i of this.ranges)
2333
- i.isInRange(e, t) && s++;
2334
- return this.allSelected && s++, this.isInNegativeRange(e, t) && (s = 0), s;
2335
- }
2336
- isInNegativeRange(e, t) {
2337
- for (const s of this.negativeRanges)
2338
- if (s.isInRange(e, t))
2339
- return !0;
2340
- return !1;
2341
- }
2342
- getRanges() {
2343
- return this.ranges;
2344
- }
2345
- clear() {
2346
- this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
2347
- }
2348
- hasSelection() {
2349
- return !!this.ranges.length;
2350
- }
2351
- selectAll() {
2352
- this.allSelected = !0;
2353
- }
2354
- addSelection(e) {
2355
- this.addRange(e);
2356
- }
2357
- removeSelection(e) {
2358
- if (this.selectionType === "none")
2359
- return;
2360
- let t = e;
2361
- this.selectionType === "row" ? t = T.singleRow(e.r1) : this.selectionType === "column" && (t = T.singleColumn(e.c1)), this.negativeRanges.push(t);
2362
- }
2363
- togglePoint(e, t) {
2364
- this.getSelectionCount(e, t) > 0 ? this.removeSelection(T.singleCell(e, t)) : this.addSelection(T.singleCell(e, t));
2365
- }
2366
- addRange(e) {
2367
- 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));
2368
- }
2369
- }
2370
- class nt {
2371
- constructor(e = "none") {
2372
- this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
2373
- }
2374
- clearChanged() {
2375
- this.changed = !1;
2376
- }
2377
- hasChanged() {
2378
- return this.changed;
2379
- }
2380
- clear() {
2381
- this.rowIndex = -1, this.columnIndex = -1;
2382
- }
2383
- setFocus(e, t) {
2384
- (this.rowIndex !== e || this.columnIndex !== t) && (this.rowIndex = e, this.columnIndex = t, this.changed = !0);
2385
- }
2386
- hasFocus(e, t) {
2387
- return this.rowIndex === e && this.columnIndex === t;
2388
- }
2389
- getFocus() {
2390
- return [this.rowIndex, this.columnIndex];
2391
- }
2392
- }
2393
- const at = new rt(), dt = new nt("cell");
2394
- class ht {
2395
- constructor() {
2396
- 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 = {
2397
- header: 34,
2398
- body: 34,
2399
- footer: 34
2400
- }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ge(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Se(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new lt(), this.getSelectionModel = () => at, this.getFocusModel = () => dt;
2401
- }
2402
- }
2403
- class ct {
2404
- setStyle(e, t, s) {
2405
- return e.style[t] = s, e;
2406
- }
2407
- appendText(e, t) {
2408
- const s = this.createText(t);
2409
- return this.appendChild(e, s), s;
2410
- }
2411
- addClass(e, t) {
2412
- return t.includes(" ") ? t.split(" ").forEach((s) => e.classList.add(s)) : e.classList.add(t), e;
2413
- }
2414
- appendChild(e, t) {
2415
- e.appendChild(t);
2416
- }
2417
- createElement(e) {
2418
- return document.createElement(e);
2419
- }
2420
- createText(e) {
2421
- return document.createTextNode(e);
2422
- }
2423
- setAttribute(e, t, s) {
2424
- e.setAttribute(t, s);
2425
- }
2426
- }
2427
- const ut = /* @__PURE__ */ Oe("<div>"), gt = (l) => {
2245
+ const dt = /* @__PURE__ */ Pe("<div>"), ut = (l) => {
2428
2246
  let e;
2429
- const t = fe({
2247
+ const t = ge({
2430
2248
  tableModel: null,
2431
- tableOptions: new ht()
2249
+ tableOptions: new ve()
2432
2250
  }, l);
2433
- return ve(() => {
2434
- if (console.info("... onMount() ref", e), !e)
2435
- throw setTimeout(() => {
2436
- console.info("ref after 2 secs", e);
2437
- }, 2222), new Error("ref is undefined in onMount()!");
2251
+ return Ae(() => {
2438
2252
  const s = {
2439
2253
  onCheckboxChanged: (r) => {
2440
2254
  const n = new CustomEvent("checkboxChanged", {
2441
2255
  detail: r,
2442
2256
  bubbles: !0
2443
2257
  });
2444
- e.dispatchEvent(n);
2258
+ e && e.dispatchEvent(n);
2445
2259
  },
2446
2260
  onContextmenu: (r) => {
2447
2261
  const n = new CustomEvent("contextmenu", {
2448
2262
  detail: r,
2449
2263
  bubbles: !0
2450
2264
  });
2451
- e.dispatchEvent(n);
2265
+ e && e.dispatchEvent(n);
2452
2266
  },
2453
2267
  onModelChanged: (r) => {
2454
2268
  const n = new CustomEvent("modelChanged", {
2455
2269
  detail: r,
2456
2270
  bubbles: !0
2457
2271
  });
2458
- e.dispatchEvent(n);
2272
+ e && e.dispatchEvent(n);
2459
2273
  },
2460
2274
  onMouseClicked: (r) => {
2461
2275
  const n = new CustomEvent("mouseClicked", {
2462
2276
  detail: r,
2463
2277
  bubbles: !0
2464
2278
  });
2465
- e.dispatchEvent(n);
2279
+ e && e.dispatchEvent(n);
2466
2280
  },
2467
2281
  onMouseDragging: (r) => {
2468
2282
  const n = new CustomEvent("mouseDragging", {
2469
2283
  detail: r,
2470
2284
  bubbles: !0
2471
2285
  });
2472
- e.dispatchEvent(n);
2286
+ e && e.dispatchEvent(n);
2473
2287
  },
2474
2288
  onMouseDraggingEnd: (r) => {
2475
2289
  const n = new CustomEvent("mouseDraggingEnd", {
2476
2290
  detail: r,
2477
2291
  bubbles: !0
2478
2292
  });
2479
- e.dispatchEvent(n);
2293
+ e && e.dispatchEvent(n);
2480
2294
  },
2481
2295
  onMouseMoved: (r) => {
2482
2296
  const n = new CustomEvent("mouseMoved", {
2483
2297
  detail: r,
2484
2298
  bubbles: !0
2485
2299
  });
2486
- e.dispatchEvent(n);
2300
+ e && e.dispatchEvent(n);
2487
2301
  }
2488
- }, i = new ot(e, t.tableModel, new ct(), t.tableOptions, s);
2489
- console.info("tableScope", i), i.firstInit(), console.info("after firstInit()", e);
2302
+ }, i = new re(e, t.tableModel, new ye(), t.tableOptions, s);
2303
+ i.firstInit();
2490
2304
  const o = new CustomEvent("tableReady", {
2491
2305
  detail: i.getApi(),
2492
2306
  bubbles: !0
2493
2307
  });
2494
- e.dispatchEvent(o);
2308
+ e && e.dispatchEvent(o);
2495
2309
  }), (() => {
2496
- const s = ut(), i = e;
2497
- return typeof i == "function" ? Le(i, s) : e = s, s;
2310
+ const s = dt(), i = e;
2311
+ return typeof i == "function" ? We(i, s) : e = s, s;
2498
2312
  })();
2499
2313
  };
2500
2314
  export {
2501
- pt as ComponentRendererWrapper,
2502
- gt as GuiexpertTable,
2503
- ft as GuiexpertTableProps
2315
+ ht as ComponentRendererWrapper,
2316
+ ut as GuiexpertTable,
2317
+ ct as GuiexpertTableProps
2504
2318
  };