@guiexpert/solid-table 1.1.58 → 1.1.60

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 +7 -7
  2. package/index.js +362 -182
  3. package/package.json +2 -2
package/index.js CHANGED
@@ -1,66 +1,66 @@
1
- const De = (a, e) => a === e, te = Symbol("solid-proxy"), ke = typeof Proxy == "function", ge = {
1
+ const De = (a, e) => a === e, se = Symbol("solid-proxy"), ke = typeof Proxy == "function", ge = {
2
2
  equals: De
3
3
  };
4
4
  let Se = xe;
5
- const L = 1, z = 2, ye = {
5
+ const L = 1, G = 2, ye = {
6
6
  owned: null,
7
7
  cleanups: null,
8
8
  context: null,
9
9
  owner: null
10
10
  };
11
- var T = null;
12
- let Q = null, Fe = null, v = null, M = null, O = null, J = 0;
11
+ var R = null;
12
+ let ee = null, Fe = null, w = null, M = null, O = null, q = 0;
13
13
  function Ie(a, e) {
14
- const t = v, s = T, o = a.length === 0, i = e === void 0 ? s : e, r = o ? ye : {
14
+ const t = w, s = R, o = a.length === 0, i = e === void 0 ? s : e, r = o ? ye : {
15
15
  owned: null,
16
16
  cleanups: null,
17
17
  context: i ? i.context : null,
18
18
  owner: i
19
- }, l = o ? a : () => a(() => q(() => $(r)));
20
- T = r, v = null;
19
+ }, l = o ? a : () => a(() => Z(() => H(r)));
20
+ R = r, w = null;
21
21
  try {
22
22
  return V(l, !0);
23
23
  } finally {
24
- v = t, T = s;
24
+ w = t, R = s;
25
25
  }
26
26
  }
27
- function se(a, e, t) {
27
+ function oe(a, e, t) {
28
28
  const s = ae(a, e, !1, L);
29
- H(s);
29
+ $(s);
30
30
  }
31
31
  function Oe(a, e, t) {
32
32
  Se = Ve;
33
33
  const s = ae(a, e, !1, L);
34
- s.user = !0, O ? O.push(s) : H(s);
34
+ s.user = !0, O ? O.push(s) : $(s);
35
35
  }
36
36
  function Le(a, e, t) {
37
37
  t = t ? Object.assign({}, ge, t) : ge;
38
38
  const s = ae(a, e, !0, 0);
39
- return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, H(s), Pe.bind(s);
39
+ return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, $(s), Pe.bind(s);
40
40
  }
41
- function q(a) {
42
- if (v === null) return a();
43
- const e = v;
44
- v = null;
41
+ function Z(a) {
42
+ if (w === null) return a();
43
+ const e = w;
44
+ w = null;
45
45
  try {
46
46
  return a();
47
47
  } finally {
48
- v = e;
48
+ w = e;
49
49
  }
50
50
  }
51
51
  function Be(a) {
52
- Oe(() => q(a));
52
+ Oe(() => Z(a));
53
53
  }
54
54
  function Pe() {
55
55
  if (this.sources && this.state)
56
- if (this.state === L) H(this);
56
+ if (this.state === L) $(this);
57
57
  else {
58
58
  const a = M;
59
59
  M = null, V(() => U(this), !1), M = a;
60
60
  }
61
- if (v) {
61
+ if (w) {
62
62
  const a = this.observers ? this.observers.length : 0;
63
- v.sources ? (v.sources.push(this), v.sourceSlots.push(a)) : (v.sources = [this], v.sourceSlots = [a]), this.observers ? (this.observers.push(v), this.observerSlots.push(v.sources.length - 1)) : (this.observers = [v], this.observerSlots = [v.sources.length - 1]);
63
+ w.sources ? (w.sources.push(this), w.sourceSlots.push(a)) : (w.sources = [this], w.sourceSlots = [a]), this.observers ? (this.observers.push(w), this.observerSlots.push(w.sources.length - 1)) : (this.observers = [w], this.observerSlots = [w.sources.length - 1]);
64
64
  }
65
65
  return this.value;
66
66
  }
@@ -68,33 +68,33 @@ function We(a, e, t) {
68
68
  let s = a.value;
69
69
  return (!a.comparator || !a.comparator(s, e)) && (a.value = e, a.observers && a.observers.length && V(() => {
70
70
  for (let o = 0; o < a.observers.length; o += 1) {
71
- const i = a.observers[o], r = Q && Q.running;
72
- r && Q.disposed.has(i), (r ? !i.tState : !i.state) && (i.pure ? M.push(i) : O.push(i), i.observers && ve(i)), r || (i.state = L);
71
+ const i = a.observers[o], r = ee && ee.running;
72
+ r && ee.disposed.has(i), (r ? !i.tState : !i.state) && (i.pure ? M.push(i) : O.push(i), i.observers && we(i)), r || (i.state = L);
73
73
  }
74
74
  if (M.length > 1e6)
75
75
  throw M = [], new Error();
76
76
  }, !1)), e;
77
77
  }
78
- function H(a) {
78
+ function $(a) {
79
79
  if (!a.fn) return;
80
- $(a);
81
- const e = J;
82
- $e(
80
+ H(a);
81
+ const e = q;
82
+ He(
83
83
  a,
84
84
  a.value,
85
85
  e
86
86
  );
87
87
  }
88
- function $e(a, e, t) {
88
+ function He(a, e, t) {
89
89
  let s;
90
- const o = T, i = v;
91
- v = T = a;
90
+ const o = R, i = w;
91
+ w = R = a;
92
92
  try {
93
93
  s = a.fn(e);
94
94
  } catch (r) {
95
- return a.pure && (a.state = L, a.owned && a.owned.forEach($), a.owned = null), a.updatedAt = t + 1, Ce(r);
95
+ return a.pure && (a.state = L, a.owned && a.owned.forEach(H), a.owned = null), a.updatedAt = t + 1, ve(r);
96
96
  } finally {
97
- v = i, T = o;
97
+ w = i, R = o;
98
98
  }
99
99
  (!a.updatedAt || a.updatedAt <= t) && (a.updatedAt != null && "observers" in a ? We(a, s) : a.value = s, a.updatedAt = t);
100
100
  }
@@ -108,23 +108,23 @@ function ae(a, e, t, s = L, o) {
108
108
  sourceSlots: null,
109
109
  cleanups: null,
110
110
  value: e,
111
- owner: T,
112
- context: T ? T.context : null,
111
+ owner: R,
112
+ context: R ? R.context : null,
113
113
  pure: t
114
114
  };
115
- return T === null || T !== ye && (T.owned ? T.owned.push(i) : T.owned = [i]), i;
115
+ return R === null || R !== ye && (R.owned ? R.owned.push(i) : R.owned = [i]), i;
116
116
  }
117
- function _(a) {
117
+ function z(a) {
118
118
  if (a.state === 0) return;
119
- if (a.state === z) return U(a);
120
- if (a.suspense && q(a.suspense.inFallback)) return a.suspense.effects.push(a);
119
+ if (a.state === G) return U(a);
120
+ if (a.suspense && Z(a.suspense.inFallback)) return a.suspense.effects.push(a);
121
121
  const e = [a];
122
- for (; (a = a.owner) && (!a.updatedAt || a.updatedAt < J); )
122
+ for (; (a = a.owner) && (!a.updatedAt || a.updatedAt < q); )
123
123
  a.state && e.push(a);
124
124
  for (let t = e.length - 1; t >= 0; t--)
125
125
  if (a = e[t], a.state === L)
126
- H(a);
127
- else if (a.state === z) {
126
+ $(a);
127
+ else if (a.state === G) {
128
128
  const s = M;
129
129
  M = null, V(() => U(a, e[0]), !1), M = s;
130
130
  }
@@ -132,29 +132,29 @@ function _(a) {
132
132
  function V(a, e) {
133
133
  if (M) return a();
134
134
  let t = !1;
135
- e || (M = []), O ? t = !0 : O = [], J++;
135
+ e || (M = []), O ? t = !0 : O = [], q++;
136
136
  try {
137
137
  const s = a();
138
- return He(t), s;
138
+ return $e(t), s;
139
139
  } catch (s) {
140
- t || (O = null), M = null, Ce(s);
140
+ t || (O = null), M = null, ve(s);
141
141
  }
142
142
  }
143
- function He(a) {
143
+ function $e(a) {
144
144
  if (M && (xe(M), M = null), a) return;
145
145
  const e = O;
146
146
  O = null, e.length && V(() => Se(e), !1);
147
147
  }
148
148
  function xe(a) {
149
- for (let e = 0; e < a.length; e++) _(a[e]);
149
+ for (let e = 0; e < a.length; e++) z(a[e]);
150
150
  }
151
151
  function Ve(a) {
152
152
  let e, t = 0;
153
153
  for (e = 0; e < a.length; e++) {
154
154
  const s = a[e];
155
- s.user ? a[t++] = s : _(s);
155
+ s.user ? a[t++] = s : z(s);
156
156
  }
157
- for (e = 0; e < t; e++) _(a[e]);
157
+ for (e = 0; e < t; e++) z(a[e]);
158
158
  }
159
159
  function U(a, e) {
160
160
  a.state = 0;
@@ -162,17 +162,17 @@ function U(a, e) {
162
162
  const s = a.sources[t];
163
163
  if (s.sources) {
164
164
  const o = s.state;
165
- o === L ? s !== e && (!s.updatedAt || s.updatedAt < J) && _(s) : o === z && U(s, e);
165
+ o === L ? s !== e && (!s.updatedAt || s.updatedAt < q) && z(s) : o === G && U(s, e);
166
166
  }
167
167
  }
168
168
  }
169
- function ve(a) {
169
+ function we(a) {
170
170
  for (let e = 0; e < a.observers.length; e += 1) {
171
171
  const t = a.observers[e];
172
- t.state || (t.state = z, t.pure ? M.push(t) : O.push(t), t.observers && ve(t));
172
+ t.state || (t.state = G, t.pure ? M.push(t) : O.push(t), t.observers && we(t));
173
173
  }
174
174
  }
175
- function $(a) {
175
+ function H(a) {
176
176
  let e;
177
177
  if (a.sources)
178
178
  for (; a.sources.length; ) {
@@ -183,11 +183,11 @@ function $(a) {
183
183
  }
184
184
  }
185
185
  if (a.tOwned) {
186
- for (e = a.tOwned.length - 1; e >= 0; e--) $(a.tOwned[e]);
186
+ for (e = a.tOwned.length - 1; e >= 0; e--) H(a.tOwned[e]);
187
187
  delete a.tOwned;
188
188
  }
189
189
  if (a.owned) {
190
- for (e = a.owned.length - 1; e >= 0; e--) $(a.owned[e]);
190
+ for (e = a.owned.length - 1; e >= 0; e--) H(a.owned[e]);
191
191
  a.owned = null;
192
192
  }
193
193
  if (a.cleanups) {
@@ -196,26 +196,26 @@ function $(a) {
196
196
  }
197
197
  a.state = 0;
198
198
  }
199
- function Ne(a) {
199
+ function _e(a) {
200
200
  return a instanceof Error ? a : new Error(typeof a == "string" ? a : "Unknown error", {
201
201
  cause: a
202
202
  });
203
203
  }
204
- function Ce(a, e = T) {
205
- throw Ne(a);
204
+ function ve(a, e = R) {
205
+ throw _e(a);
206
206
  }
207
- function G() {
207
+ function N() {
208
208
  return !0;
209
209
  }
210
- const Ge = {
210
+ const Ne = {
211
211
  get(a, e, t) {
212
- return e === te ? t : a.get(e);
212
+ return e === se ? t : a.get(e);
213
213
  },
214
214
  has(a, e) {
215
- return e === te ? !0 : a.has(e);
215
+ return e === se ? !0 : a.has(e);
216
216
  },
217
- set: G,
218
- deleteProperty: G,
217
+ set: N,
218
+ deleteProperty: N,
219
219
  getOwnPropertyDescriptor(a, e) {
220
220
  return {
221
221
  configurable: !0,
@@ -223,51 +223,51 @@ const Ge = {
223
223
  get() {
224
224
  return a.get(e);
225
225
  },
226
- set: G,
227
- deleteProperty: G
226
+ set: N,
227
+ deleteProperty: N
228
228
  };
229
229
  },
230
230
  ownKeys(a) {
231
231
  return a.keys();
232
232
  }
233
233
  };
234
- function ee(a) {
234
+ function te(a) {
235
235
  return (a = typeof a == "function" ? a() : a) ? a : {};
236
236
  }
237
- function ze() {
237
+ function Ge() {
238
238
  for (let a = 0, e = this.length; a < e; ++a) {
239
239
  const t = this[a]();
240
240
  if (t !== void 0) return t;
241
241
  }
242
242
  }
243
- function we(...a) {
243
+ function Ce(...a) {
244
244
  let e = !1;
245
245
  for (let r = 0; r < a.length; r++) {
246
246
  const l = a[r];
247
- e = e || !!l && te in l, a[r] = typeof l == "function" ? (e = !0, Le(l)) : l;
247
+ e = e || !!l && se in l, a[r] = typeof l == "function" ? (e = !0, Le(l)) : l;
248
248
  }
249
249
  if (ke && e)
250
250
  return new Proxy(
251
251
  {
252
252
  get(r) {
253
253
  for (let l = a.length - 1; l >= 0; l--) {
254
- const n = ee(a[l])[r];
254
+ const n = te(a[l])[r];
255
255
  if (n !== void 0) return n;
256
256
  }
257
257
  },
258
258
  has(r) {
259
259
  for (let l = a.length - 1; l >= 0; l--)
260
- if (r in ee(a[l])) return !0;
260
+ if (r in te(a[l])) return !0;
261
261
  return !1;
262
262
  },
263
263
  keys() {
264
264
  const r = [];
265
265
  for (let l = 0; l < a.length; l++)
266
- r.push(...Object.keys(ee(a[l])));
266
+ r.push(...Object.keys(te(a[l])));
267
267
  return [...new Set(r)];
268
268
  }
269
269
  },
270
- Ge
270
+ Ne
271
271
  );
272
272
  const t = {}, s = /* @__PURE__ */ Object.create(null);
273
273
  for (let r = a.length - 1; r >= 0; r--) {
@@ -282,7 +282,7 @@ function we(...a) {
282
282
  s[c] = h.get ? {
283
283
  enumerable: !0,
284
284
  configurable: !0,
285
- get: ze.bind(t[c] = [h.get.bind(l)])
285
+ get: Ge.bind(t[c] = [h.get.bind(l)])
286
286
  } : h.value !== void 0 ? h : void 0;
287
287
  else {
288
288
  const p = t[c];
@@ -297,7 +297,7 @@ function we(...a) {
297
297
  }
298
298
  return o;
299
299
  }
300
- function _e(a, e, t) {
300
+ function ze(a, e, t) {
301
301
  let s = t.length, o = e.length, i = s, r = 0, l = 0, n = e[o - 1].nextSibling, d = null;
302
302
  for (; r < o || l < i; ) {
303
303
  if (e[r] === t[l]) {
@@ -353,11 +353,11 @@ function je(a, e, t) {
353
353
  return i.cloneNode = i, i;
354
354
  }
355
355
  function Xe(a, e, t) {
356
- return q(() => a(e, t));
356
+ return Z(() => a(e, t));
357
357
  }
358
358
  function Ke(a, e, t, s) {
359
359
  if (t !== void 0 && !s && (s = []), typeof e != "function") return j(a, e, s, t);
360
- se((o) => j(a, e(), o, t), s);
360
+ oe((o) => j(a, e(), o, t), s);
361
361
  }
362
362
  function j(a, e, t, s, o) {
363
363
  for (; typeof t == "function"; ) t = t();
@@ -375,18 +375,18 @@ function j(a, e, t, s, o) {
375
375
  t = P(a, t, s);
376
376
  else {
377
377
  if (i === "function")
378
- return se(() => {
378
+ return oe(() => {
379
379
  let l = e();
380
380
  for (; typeof l == "function"; ) l = l();
381
381
  t = j(a, l, t, s);
382
382
  }), () => t;
383
383
  if (Array.isArray(e)) {
384
384
  const l = [], n = t && Array.isArray(t);
385
- if (oe(l, e, t, o))
386
- return se(() => t = j(a, l, t, s, !0)), () => t;
385
+ if (ie(l, e, t, o))
386
+ return oe(() => t = j(a, l, t, s, !0)), () => t;
387
387
  if (l.length === 0) {
388
388
  if (t = P(a, t, s), r) return t;
389
- } else n ? t.length === 0 ? fe(a, l, s) : _e(a, t, l) : (t && P(a), fe(a, l));
389
+ } else n ? t.length === 0 ? fe(a, l, s) : ze(a, t, l) : (t && P(a), fe(a, l));
390
390
  t = l;
391
391
  } else if (e.nodeType) {
392
392
  if (Array.isArray(t)) {
@@ -398,18 +398,18 @@ function j(a, e, t, s, o) {
398
398
  }
399
399
  return t;
400
400
  }
401
- function oe(a, e, t, s) {
401
+ function ie(a, e, t, s) {
402
402
  let o = !1;
403
403
  for (let i = 0, r = e.length; i < r; i++) {
404
404
  let l = e[i], n = t && t[a.length], d;
405
405
  if (!(l == null || l === !0 || l === !1)) if ((d = typeof l) == "object" && l.nodeType)
406
406
  a.push(l);
407
407
  else if (Array.isArray(l))
408
- o = oe(a, l, n) || o;
408
+ o = ie(a, l, n) || o;
409
409
  else if (d === "function")
410
410
  if (s) {
411
411
  for (; typeof l == "function"; ) l = l();
412
- o = oe(
412
+ o = ie(
413
413
  a,
414
414
  Array.isArray(l) ? l : [l],
415
415
  Array.isArray(n) ? n : [n]
@@ -441,12 +441,12 @@ function P(a, e, t, s) {
441
441
  } else a.insertBefore(o, t);
442
442
  return [o];
443
443
  }
444
- class wt {
444
+ class Mt {
445
445
  constructor(e) {
446
446
  this.code = e;
447
447
  }
448
448
  render(e, t, s, o, i, r, l) {
449
- const n = we({
449
+ const n = Ce({
450
450
  rowIndex: t,
451
451
  columnIndex: s,
452
452
  areaIdent: o,
@@ -459,7 +459,7 @@ class wt {
459
459
  );
460
460
  }
461
461
  }
462
- const Et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
462
+ const Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
463
463
  __proto__: null
464
464
  }, Symbol.toStringTag, { value: "Module" }));
465
465
  function Ye(a, e = 500) {
@@ -495,7 +495,7 @@ class B {
495
495
  }
496
496
  }
497
497
  }
498
- function ie(a) {
498
+ function X(a) {
499
499
  return a && a.type === "TreeRow";
500
500
  }
501
501
  function re(a) {
@@ -784,7 +784,7 @@ class Ze {
784
784
  this.tableScope.toggleHeaderGroup(s), e.preventDefault(), e.stopPropagation();
785
785
  else if (s.inputType === "checkbox" && s.areaIdent)
786
786
  this.tableScope.toggleRowCheckbox(s.rowIdx, s.colIdx, s.areaIdent), e.preventDefault(), e.stopPropagation();
787
- else if (ie(s.row) && s.areaModel) {
787
+ else if (X(s.row) && s.areaModel) {
788
788
  const o = s.colIdx === this.getArrowColumnIndex() && e.altKey, i = s.className.includes("ge-table-tree-arrow-div");
789
789
  if (o || i) {
790
790
  e.preventDefault(), e.stopPropagation();
@@ -811,7 +811,7 @@ class Ze {
811
811
  this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, r));
812
812
  else if (t.getAttribute("data-row-index")) {
813
813
  const n = l.getRowByIndex(i);
814
- if (s && o === "body" && l.isEditable(i, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, r)), ie(n) && r === this.getArrowColumnIndex()) {
814
+ if (s && o === "body" && l.isEditable(i, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, r)), X(n) && r === this.getArrowColumnIndex()) {
815
815
  e.preventDefault(), e.stopPropagation();
816
816
  const d = n;
817
817
  d.expanded = !d.expanded, "recalcVisibleTreeRows" in l && l.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(d);
@@ -880,6 +880,179 @@ class Ze {
880
880
  }
881
881
  }
882
882
  class Qe {
883
+ constructor(e, t = [], s = -1) {
884
+ this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = s, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((o) => o.rendererMap[e]);
885
+ }
886
+ getTextValueAt(e, t) {
887
+ return "" + this.getValueAt(e, t);
888
+ }
889
+ getTooltipAt(e, t) {
890
+ return "";
891
+ }
892
+ getCellRenderer(e, t) {
893
+ if (t < this.cellRenderers.length)
894
+ return this.cellRenderers[t];
895
+ }
896
+ getColspanAt(e, t) {
897
+ return 0;
898
+ }
899
+ getCustomClassesAt(e, t) {
900
+ return [];
901
+ }
902
+ getCustomStyleAt(e, t) {
903
+ }
904
+ getRowspanAt(e, t) {
905
+ return 0;
906
+ }
907
+ getRowByIndex(e) {
908
+ }
909
+ isRowCheckable(e) {
910
+ return !0;
911
+ }
912
+ isRowChecked(e) {
913
+ var s;
914
+ const t = this.getRowByIndex(e);
915
+ return (s = this.rowSelectionModel) == null ? void 0 : s.isRowChecked(t);
916
+ }
917
+ setRowChecked(e, t) {
918
+ if (this.rowSelectionModel) {
919
+ const s = this.getRowByIndex(e);
920
+ this.rowSelectionModel.checkRow(s, t);
921
+ }
922
+ }
923
+ getMaxColspan() {
924
+ return 31;
925
+ }
926
+ getMaxRowspan() {
927
+ return 31;
928
+ }
929
+ getYPosByRowIndex(e) {
930
+ return this.defaultRowHeight > 0 ? this.defaultRowHeight * e : this.yPositions[e];
931
+ }
932
+ init() {
933
+ !this.yPositions.length && this.getRowCount() !== void 0 && this.defaultRowHeight === -1 && this.calcYPositions();
934
+ }
935
+ isFilterable() {
936
+ return this.areaIdent === "body";
937
+ }
938
+ doSort(e) {
939
+ return !1;
940
+ }
941
+ isEditable(e, t) {
942
+ var o, i;
943
+ const s = (o = this.columnDefs) == null ? void 0 : o[t];
944
+ return ((i = s == null ? void 0 : s.editable) == null ? void 0 : i.call(s)) ?? !1;
945
+ }
946
+ setValue(e, t, s) {
947
+ var l;
948
+ const o = (l = this.columnDefs[t]) == null ? void 0 : l.editInputPipe;
949
+ o && (s = o(s, e, t));
950
+ const i = this.getRowByIndex(e), r = this.columnDefs[t].property;
951
+ return r.includes(".") ? this.setPropertyValue(i, r.split("."), s) : (i[r] = s, !0);
952
+ }
953
+ isSelectable(e, t) {
954
+ return !0;
955
+ }
956
+ changeColumnOrder(e, t) {
957
+ this.arrayMove(this.cellRenderers, e, t);
958
+ }
959
+ setPropertyValue(e, t, s) {
960
+ const o = t.shift();
961
+ if (o) {
962
+ const i = e[o];
963
+ return i && t.length ? this.setPropertyValue(i, t, s) : (e[o] = s, !0);
964
+ }
965
+ return !1;
966
+ }
967
+ arrayMove(e, t, s) {
968
+ const o = e.splice(t, 1)[0];
969
+ return e.splice(s, 0, o), e;
970
+ }
971
+ calcYPositions() {
972
+ const e = this.getRowCount();
973
+ this.yPositions = new Array(e + 1), this.yPositions[0] = 0;
974
+ for (let t = 0; t < e; t++)
975
+ this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
976
+ }
977
+ }
978
+ class et {
979
+ genericSortComparator(e, t, s) {
980
+ if (typeof e == "number" && typeof t == "number")
981
+ return s * (e - t);
982
+ if (typeof e == "string" && typeof t == "string")
983
+ return s * e.localeCompare(t);
984
+ if (typeof e == "boolean" && typeof t == "boolean")
985
+ return s * ((e ? -1 : 1) - (t ? -1 : 1));
986
+ if (e instanceof Date && t instanceof Date)
987
+ return s * (e.getTime() - t.getTime());
988
+ if (e instanceof Array && t instanceof Array) {
989
+ const o = e, i = t;
990
+ if (o.length && i.length)
991
+ return this.genericSortComparator(o[0], i[0], s);
992
+ }
993
+ return s * ("" + e).localeCompare("" + t);
994
+ }
995
+ }
996
+ class tt extends Qe {
997
+ constructor(e, t, s, o = []) {
998
+ super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.sorterService = new et(), this.filteredRows = [...t], this.properties = o.map((i) => i.property);
999
+ }
1000
+ setRows(e) {
1001
+ this.rows = e, this.filteredRows = [...e];
1002
+ }
1003
+ filterRowsByPredict(e) {
1004
+ this.rows = this.rows.filter(e), this.filteredRows = this.filteredRows.filter(e);
1005
+ }
1006
+ getRowCount() {
1007
+ var e;
1008
+ return ((e = this.filteredRows) == null ? void 0 : e.length) ?? 0;
1009
+ }
1010
+ getValueAt(e, t) {
1011
+ const s = this.properties[t];
1012
+ let o = this.filteredRows[e];
1013
+ return X(o) && (o = o.data), o ? this.getValueByT(o, s) : "";
1014
+ }
1015
+ getFilteredRows() {
1016
+ return this.filteredRows;
1017
+ }
1018
+ getAllRows() {
1019
+ return this.rows;
1020
+ }
1021
+ getRowHeight(e) {
1022
+ return this.defaultRowHeight;
1023
+ }
1024
+ getRowByIndex(e) {
1025
+ return this.filteredRows[e];
1026
+ }
1027
+ externalFilterChanged(e) {
1028
+ this.filteredRows = this.rows ? this.rows.filter(e) : [];
1029
+ }
1030
+ doSort(e) {
1031
+ for (const t of e) {
1032
+ const { columnIndex: s, sortState: o } = t, i = o === "asc" ? 1 : o === "desc" ? -1 : 0, r = this.properties[s];
1033
+ this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(r, i));
1034
+ }
1035
+ return !0;
1036
+ }
1037
+ getValueByT(e, t) {
1038
+ return t.includes(".") ? this.getPropertyValue(e, t.split(".")) : e[t];
1039
+ }
1040
+ changeColumnOrder(e, t) {
1041
+ this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
1042
+ }
1043
+ genericFlatTableSortComparator(e, t) {
1044
+ const s = this.columnDefs.find((o) => o.property === e);
1045
+ return (o, i) => {
1046
+ const r = this.getValueByT(o, e), l = this.getValueByT(i, e);
1047
+ return s != null && s.sortComparator ? t * s.sortComparator(r, l, o, i, t) : this.sorterService.genericSortComparator(r, l, t);
1048
+ };
1049
+ }
1050
+ getPropertyValue(e, t) {
1051
+ const s = t.shift(), o = e[s];
1052
+ return o && t.length ? this.getPropertyValue(o, t) : o;
1053
+ }
1054
+ }
1055
+ class st {
883
1056
  constructor(e) {
884
1057
  this.tableScope = e;
885
1058
  }
@@ -1105,6 +1278,13 @@ class Qe {
1105
1278
  getTableModel() {
1106
1279
  return this.tableScope.tableModel;
1107
1280
  }
1281
+ getBodyModel() {
1282
+ return this.tableScope.tableModel.getBodyModel();
1283
+ }
1284
+ setRows(e) {
1285
+ const t = this.getBodyModel();
1286
+ t instanceof tt ? t.setRows(e) : console.warn("setRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof t);
1287
+ }
1108
1288
  reSort() {
1109
1289
  this.tableScope.reSort();
1110
1290
  }
@@ -1176,7 +1356,7 @@ class ce {
1176
1356
  // }
1177
1357
  // }
1178
1358
  }
1179
- class et extends ce {
1359
+ class ot extends ce {
1180
1360
  constructor(e) {
1181
1361
  super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
1182
1362
  }
@@ -1198,14 +1378,14 @@ class et extends ce {
1198
1378
  }
1199
1379
  }
1200
1380
  }
1201
- class tt {
1381
+ class it {
1202
1382
  constructor(e = "collapsed", t = [], s = !1, o = !1) {
1203
1383
  this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = o;
1204
1384
  }
1205
1385
  }
1206
- class st extends ce {
1386
+ class rt extends ce {
1207
1387
  constructor(e) {
1208
- super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new tt(), this.load();
1388
+ super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new it(), this.load();
1209
1389
  }
1210
1390
  collapsedExpandedStateGet() {
1211
1391
  return this.collapsedExpandedState;
@@ -1237,7 +1417,7 @@ class st extends ce {
1237
1417
  this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
1238
1418
  }
1239
1419
  }
1240
- class ot extends ce {
1420
+ class at extends ce {
1241
1421
  constructor(e) {
1242
1422
  super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
1243
1423
  }
@@ -1263,7 +1443,7 @@ class F {
1263
1443
  this.left = e, this.width = t, this.height = s, this.top = o, this.index = i;
1264
1444
  }
1265
1445
  }
1266
- class it {
1446
+ class lt {
1267
1447
  constructor(e, t, s, o) {
1268
1448
  this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new F(), this.areaBodyCenterGeo = new F(), this.areaBodyEastGeo = new F();
1269
1449
  const i = this.hostElement;
@@ -1469,7 +1649,7 @@ class A {
1469
1649
  return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
1470
1650
  }
1471
1651
  }
1472
- class rt {
1652
+ class nt {
1473
1653
  constructor(e, t) {
1474
1654
  this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
1475
1655
  }
@@ -1502,22 +1682,22 @@ class rt {
1502
1682
  return !1;
1503
1683
  }
1504
1684
  }
1505
- class at {
1685
+ class ct {
1506
1686
  constructor(e, t, s) {
1507
1687
  this.header = e, this.body = t, this.footer = s;
1508
1688
  }
1509
1689
  }
1510
- class lt extends it {
1690
+ class dt extends lt {
1511
1691
  constructor(e, t, s, o) {
1512
1692
  var r, l;
1513
1693
  super(e, t, s, o), this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
1514
1694
  header: [],
1515
1695
  body: [],
1516
1696
  footer: []
1517
- }, this.tree = !1, this.colAndRowspanModels = new at(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (l = this.tableOptions) != null && l.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), re(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
1697
+ }, this.tree = !1, this.colAndRowspanModels = new ct(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (l = this.tableOptions) != null && l.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), re(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
1518
1698
  (n) => {
1519
1699
  var d;
1520
- this.colAndRowspanModels[n] = new rt(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
1700
+ this.colAndRowspanModels[n] = new nt(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
1521
1701
  }
1522
1702
  );
1523
1703
  }
@@ -1779,7 +1959,7 @@ class lt extends it {
1779
1959
  let p = t;
1780
1960
  const u = this.tableModel.getColumnCount(), g = this.tableModel.getFixedRightColumnCount(), b = this.tableModel.getFixedLeftColumnCount();
1781
1961
  for (let m = 0; m < h; m++) {
1782
- const x = p, C = m === h - 1, E = this.tableModel.getRowHeight(e, m);
1962
+ const x = p, v = m === h - 1, E = this.tableModel.getRowHeight(e, m);
1783
1963
  if (x + E > 0) {
1784
1964
  this.firstVisibleRowIndex = m;
1785
1965
  let y = { left: l, width: n, height: E, top: x, index: m }, S = this.dom.addRowDiv(o, y, m, e, "center");
@@ -1794,7 +1974,7 @@ class lt extends it {
1794
1974
  columnIndexStart: k,
1795
1975
  columnIndexEnd: u - g - 1,
1796
1976
  verticalFixed: !1,
1797
- lastRowOfModel: C
1977
+ lastRowOfModel: v
1798
1978
  }), d.left > 0 && (y = { left: l, width: this.areaBodyWestGeo.width, height: E, top: x, index: m }, S = this.dom.addRowDiv(s, y, m, e, "west"), this.adjustColumnsToRowParent({
1799
1979
  areaIdent: e,
1800
1980
  sideIdent: "west",
@@ -1805,7 +1985,7 @@ class lt extends it {
1805
1985
  columnIndexStart: 0,
1806
1986
  columnIndexEnd: k - 1,
1807
1987
  verticalFixed: !0,
1808
- lastRowOfModel: C
1988
+ lastRowOfModel: v
1809
1989
  })), d.right > 0 && (y = { left: l, width: this.areaBodyEastGeo.width, height: E, top: x, index: m }, S = this.dom.addRowDiv(i, y, m, e, "east"), this.adjustColumnsToRowParent({
1810
1990
  areaIdent: e,
1811
1991
  sideIdent: "east",
@@ -1816,9 +1996,9 @@ class lt extends it {
1816
1996
  columnIndexStart: u - g,
1817
1997
  columnIndexEnd: u - 1,
1818
1998
  verticalFixed: !0,
1819
- lastRowOfModel: C
1999
+ lastRowOfModel: v
1820
2000
  })), e === "header" && this.tree && m === h - 1) {
1821
- const R = this.dom.applyStyle(
2001
+ const T = this.dom.applyStyle(
1822
2002
  this.dom.setAttribute(
1823
2003
  this.dom.addDiv(S, new F(16, 20, 20, 8)),
1824
2004
  "data-ge-action",
@@ -1827,8 +2007,8 @@ class lt extends it {
1827
2007
  { cursor: "pointer" }
1828
2008
  ), D = this.tableOptions.treeOptions.arrowExpandCollapseAll;
1829
2009
  if (D) {
1830
- const N = this.dom.domService.createText(D.content);
1831
- this.dom.domService.appendChild(R, N), D.style && this.dom.applyStyleString(R, D.style);
2010
+ const _ = this.dom.domService.createText(D.content);
2011
+ this.dom.domService.appendChild(T, _), D.style && this.dom.applyStyleString(T, D.style);
1832
2012
  }
1833
2013
  }
1834
2014
  }
@@ -1839,16 +2019,16 @@ class lt extends it {
1839
2019
  const m = ((f = this.colAndRowspanModels[e]) == null ? void 0 : f.getRanges()) ?? [];
1840
2020
  if (m.length)
1841
2021
  for (const x of m) {
1842
- let C = 0, E = o.child, y = "center";
2022
+ let v = 0, E = o.child, y = "center";
1843
2023
  if (x.c1 < b)
1844
2024
  E = s.child, y = "west";
1845
2025
  else if (g > 0 && x.c1 >= u - g)
1846
2026
  E = i.child, y = "east";
1847
2027
  else {
1848
2028
  const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1849
- C = this.scrollFactorX * S - this.areaBodyWestGeo.width, y = "center";
2029
+ v = this.scrollFactorX * S - this.areaBodyWestGeo.width, y = "center";
1850
2030
  }
1851
- this.drawBigCell(x, C, t, c, E, y);
2031
+ this.drawBigCell(x, v, t, c, E, y);
1852
2032
  }
1853
2033
  }
1854
2034
  }
@@ -1958,18 +2138,18 @@ class lt extends it {
1958
2138
  for (let f = l; f <= n; f++) {
1959
2139
  const m = g, x = this.tableModel.getColumnWidth(f);
1960
2140
  if (x > 0 && m + x > 0) {
1961
- let C = o.height;
2141
+ let v = o.height;
1962
2142
  const E = s.getRowspanAt(r, f), y = s.getColspanAt(r, f);
1963
- E > 1 && (C = this.getRowHeights(r, r + E - 1, s).reduce((R, D) => R + D, 0));
2143
+ E > 1 && (v = this.getRowHeights(r, r + E - 1, s).reduce((T, D) => T + D, 0));
1964
2144
  let S = x;
1965
- y > 1 && (S = this.getColumnWidths(f, f + y - 1).reduce((R, D) => R + D, 0));
2145
+ y > 1 && (S = this.getColumnWidths(f, f + y - 1).reduce((T, D) => T + D, 0));
1966
2146
  let k = !1;
1967
2147
  if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (b = this.colAndRowspanModels[e]) != null && b.isInRange(r, f) && (k = !0), this.draggingTargetColumnIndex === f && e !== "header") {
1968
- this.renderDragTargetDiv(i, m, p, S, C);
1969
- const R = { left: m, top: p, width: S, height: C };
1970
- this.dom.addColumnBorderDivs(this.tableOptions, i, R, e, t);
2148
+ this.renderDragTargetDiv(i, m, p, S, v);
2149
+ const T = { left: m, top: p, width: S, height: v };
2150
+ this.dom.addColumnBorderDivs(this.tableOptions, i, T, e, t);
1971
2151
  } else {
1972
- const R = this.renderSelectedBackgroundDiv(k, u, t, s, r, f, i, m, p, S, C);
2152
+ const T = this.renderSelectedBackgroundDiv(k, u, t, s, r, f, i, m, p, S, v);
1973
2153
  "gammaCells" in s && s.getValueAt(r, f) && (k = !1), k || this.renderCell({
1974
2154
  areaModel: s,
1975
2155
  areaIdent: e,
@@ -1979,9 +2159,9 @@ class lt extends it {
1979
2159
  left: m,
1980
2160
  top: p,
1981
2161
  width: S,
1982
- height: C,
2162
+ height: v,
1983
2163
  parent: i,
1984
- cellSelected: R,
2164
+ cellSelected: T,
1985
2165
  lastRowOfModel: c,
1986
2166
  gammaRange: !0
1987
2167
  }), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
@@ -1990,7 +2170,7 @@ class lt extends it {
1990
2170
  cellLeft: m,
1991
2171
  cellTop: p,
1992
2172
  cellWidth: S,
1993
- cellHeight: C,
2173
+ cellHeight: v,
1994
2174
  parent: i
1995
2175
  });
1996
2176
  }
@@ -2028,16 +2208,16 @@ class lt extends it {
2028
2208
  var pe;
2029
2209
  const u = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), g = { left: r, width: l, height: n, top: d, index: i }, b = e.getRowByIndex(o);
2030
2210
  let f = "none";
2031
- if (i === this.getTreeArrowColumnIndex() && ie(b)) {
2032
- const w = b;
2033
- (pe = w.children) != null && pe.length ? w.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
2211
+ if (i === this.getTreeArrowColumnIndex() && X(b)) {
2212
+ const C = b;
2213
+ (pe = C.children) != null && pe.length ? C.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
2034
2214
  }
2035
2215
  let x;
2036
2216
  if (t === "header") {
2037
- const w = this.tableModel.getColumnDef(i);
2038
- (!(w != null && w.sortIconVisible) || w != null && w.sortIconVisible()) && (x = w == null ? void 0 : w.sortState);
2217
+ const C = this.tableModel.getColumnDef(i);
2218
+ (!(C != null && C.sortIconVisible) || C != null && C.sortIconVisible()) && (x = C == null ? void 0 : C.sortState);
2039
2219
  }
2040
- const C = e.getValueAt(o, i), E = u ? "" : `${C}`, y = e.isRowChecked(o), S = this.dom.addColumnDiv(
2220
+ const v = e.getValueAt(o, i), E = u ? "" : `${v}`, y = e.isRowChecked(o), S = this.dom.addColumnDiv(
2041
2221
  {
2042
2222
  parent: c,
2043
2223
  geo: g,
@@ -2053,20 +2233,20 @@ class lt extends it {
2053
2233
  }
2054
2234
  ), k = e.getTooltipAt(o, i);
2055
2235
  k && this.dom.setAttribute(S, "title", k);
2056
- const R = this.tableModel.getColumnDef(i);
2057
- R && R.classes[t] && this.dom.addClasses(R.classes[t], S);
2236
+ const T = this.tableModel.getColumnDef(i);
2237
+ T && T.classes[t] && this.dom.addClasses(T.classes[t], S);
2058
2238
  let D;
2059
- u && (D = u.render(S, o, i, t, e, C, this.dom.domService));
2060
- const N = e.getCustomClassesAt(o, i);
2061
- if (N.length && this.dom.addClasses(N, S), this.dom.addColumnBorderDivs(this.tableOptions, c, g, t, s), h && this.dom.addHorizontalBorder({ left: r, width: l, height: n, top: d + n }, c), this.getFocusModel && t === "body") {
2062
- const w = this.getFocusModel();
2063
- w != null && w.hasFocus(o, i) && this.dom.addFocusBorderDivs(c, g, {});
2239
+ u && (D = u.render(S, o, i, t, e, v, this.dom.domService));
2240
+ const _ = e.getCustomClassesAt(o, i);
2241
+ if (_.length && this.dom.addClasses(_, S), this.dom.addColumnBorderDivs(this.tableOptions, c, g, t, s), h && this.dom.addHorizontalBorder({ left: r, width: l, height: n, top: d + n }, c), this.getFocusModel && t === "body") {
2242
+ const C = this.getFocusModel();
2243
+ C != null && C.hasFocus(o, i) && this.dom.addFocusBorderDivs(c, g, {});
2064
2244
  }
2065
2245
  t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
2066
- const Z = e.getCustomStyleAt(o, i);
2067
- if (Z)
2068
- for (const w in Z)
2069
- this.dom.setStyle(S, w, Z[w]);
2246
+ const Q = e.getCustomStyleAt(o, i);
2247
+ if (Q)
2248
+ for (const C in Q)
2249
+ this.dom.setStyle(S, C, Q[C]);
2070
2250
  return [S, D];
2071
2251
  }
2072
2252
  /**
@@ -2244,8 +2424,8 @@ class lt extends it {
2244
2424
  }, m = this.dom.addColumnDiv(f);
2245
2425
  let x;
2246
2426
  g && (x = g.render(m, d, l, t, i, u, this.dom.domService), x && this.cleanupFunctions[t].push(x));
2247
- const C = i.getCustomClassesAt(d, l);
2248
- C.length && this.dom.addClasses(C, m);
2427
+ const v = i.getCustomClassesAt(d, l);
2428
+ v.length && this.dom.addClasses(v, m);
2249
2429
  const E = this.tableModel.getColumnDef(l);
2250
2430
  E && E.classes[t] && this.dom.addClasses(E.classes[t], m), this.dom.addColumnBorderDivs(this.tableOptions, n, p, t, o);
2251
2431
  const y = i.getCustomStyleAt(d, l);
@@ -2386,12 +2566,12 @@ class lt extends it {
2386
2566
  n.setAttribute(c, "data-col-index", `${t}`), n.setAttribute(c, "data-row-index", `${e}`), n.setAttribute(c, "data-area", "header"), n.setAttribute(c, "data-ge-action", "resize-column"), n.addClass(c, "ge-table-column-resize-handle"), n.setStyle(c, "display", "clip"), n.setStyle(c, "position", "absolute"), n.setStyle(c, "cursor", "col-resize"), n.setStyle(c, "left", `${s + i - d}px`), n.setStyle(c, "top", `${o}px`), n.setStyle(c, "width", `${d}px`), n.setStyle(c, "height", `${r}px`), n.appendChild(l, c);
2387
2567
  }
2388
2568
  }
2389
- class nt {
2569
+ class ht {
2390
2570
  constructor(e, t) {
2391
2571
  this.columnIndex = e, this.sortState = t;
2392
2572
  }
2393
2573
  }
2394
- class ct {
2574
+ class pt {
2395
2575
  constructor(e) {
2396
2576
  this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
2397
2577
  }
@@ -2413,7 +2593,7 @@ class ct {
2413
2593
  }
2414
2594
  }
2415
2595
  }
2416
- class dt {
2596
+ class gt {
2417
2597
  constructor(e = -1, t = -1) {
2418
2598
  this.rowIndex = e, this.columnIndex = t;
2419
2599
  }
@@ -2423,10 +2603,10 @@ class de {
2423
2603
  this.cells = e;
2424
2604
  }
2425
2605
  static createSingle(e, t) {
2426
- return new de([new dt(e, t)]);
2606
+ return new de([new gt(e, t)]);
2427
2607
  }
2428
2608
  }
2429
- class ht {
2609
+ class ft {
2430
2610
  constructor(e) {
2431
2611
  var t, s;
2432
2612
  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);
@@ -2467,7 +2647,7 @@ class ht {
2467
2647
  });
2468
2648
  }
2469
2649
  }
2470
- class pt {
2650
+ class ut {
2471
2651
  get() {
2472
2652
  return {
2473
2653
  f2: "START_EDITING",
@@ -2487,7 +2667,7 @@ class pt {
2487
2667
  };
2488
2668
  }
2489
2669
  }
2490
- class gt {
2670
+ class mt {
2491
2671
  get() {
2492
2672
  return {
2493
2673
  f2: "START_EDITING",
@@ -2509,7 +2689,7 @@ class gt {
2509
2689
  };
2510
2690
  }
2511
2691
  }
2512
- class ft {
2692
+ class bt {
2513
2693
  constructor(e) {
2514
2694
  this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
2515
2695
  }
@@ -2530,7 +2710,7 @@ class ft {
2530
2710
  this.assignPredefinedSystemShortcutMappings(), Object.assign(this.shortcutActionIdMapping, this.tableScope.tableOptions.shortcutActionIdMapping), this.isDebug() && console.debug("ShortcutService", this.shortcutActionIdMapping), this.tableScope.hostElement.addEventListener("keydown", this.onKeyDown.bind(this));
2531
2711
  }
2532
2712
  assignPredefinedSystemShortcutMappings() {
2533
- this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new gt().get()) : Object.assign(this.shortcutActionIdMapping, new pt().get());
2713
+ this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new mt().get()) : Object.assign(this.shortcutActionIdMapping, new ut().get());
2534
2714
  }
2535
2715
  isMacintosh() {
2536
2716
  return navigator.platform.indexOf("Mac") > -1;
@@ -2629,7 +2809,7 @@ class Me {
2629
2809
  e.setAttribute(t, s);
2630
2810
  }
2631
2811
  }
2632
- class ut {
2812
+ class St {
2633
2813
  render(e, t, s, o, i, r, l) {
2634
2814
  if (i.isEditable(t, s)) {
2635
2815
  l.addClass(e, "ge-table-row-input-div");
@@ -2650,7 +2830,7 @@ class ut {
2650
2830
  }
2651
2831
  }
2652
2832
  }
2653
- class mt {
2833
+ class yt {
2654
2834
  constructor(e = "none", t = "single") {
2655
2835
  this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
2656
2836
  }
@@ -2732,7 +2912,7 @@ class mt {
2732
2912
  this.selectionType !== "none" && (this.allSelected = !1, this.selectionMode === "single" && (this.ranges = []), this.selectionType === "row" ? (e.c1 = 0, e.c2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "column" ? (e.r1 = 0, e.r2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "cell" ? (e.r2 = e.r1, e.c2 = e.c1) : this.selectionType, this.ranges.push(e), this.fireChangeEvent());
2733
2913
  }
2734
2914
  }
2735
- class bt {
2915
+ class xt {
2736
2916
  constructor(e = "none") {
2737
2917
  this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
2738
2918
  }
@@ -2769,7 +2949,7 @@ class bt {
2769
2949
  return [this.rowIndex, this.columnIndex];
2770
2950
  }
2771
2951
  }
2772
- class Te {
2952
+ class Re {
2773
2953
  constructor(e = new I(
2774
2954
  "❯",
2775
2955
  "",
@@ -2783,14 +2963,14 @@ class Te {
2783
2963
  }
2784
2964
  // `⊖ `, `⊕ `;
2785
2965
  }
2786
- const St = new mt(), yt = new bt("cell");
2787
- class Re {
2966
+ const wt = new yt(), vt = new xt("cell");
2967
+ class Te {
2788
2968
  constructor() {
2789
2969
  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 = {
2790
2970
  header: 34,
2791
2971
  body: 34,
2792
2972
  footer: 34
2793
- }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Ee(), this.headerGroupOptions = new Te(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Ae(), this.sortOrder = ["asc", "desc"], this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new ut(), this.getSelectionModel = () => St, this.getFocusModel = () => yt;
2973
+ }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Ee(), this.headerGroupOptions = new Re(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Ae(), this.sortOrder = ["asc", "desc"], this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new St(), this.getSelectionModel = () => wt, this.getFocusModel = () => vt;
2794
2974
  }
2795
2975
  }
2796
2976
  const W = class W {
@@ -2877,8 +3057,8 @@ const W = class W {
2877
3057
  };
2878
3058
  W.columnSeparatorChar = " ", W.rowSeparatorChar = `
2879
3059
  `;
2880
- let X = W;
2881
- class xt {
3060
+ let K = W;
3061
+ class Ct {
2882
3062
  constructor(e, t = 500) {
2883
3063
  this.tableScope = e, this.debounceDelay = t, new ResizeObserver(Ye(this.handleResize.bind(this), t)).observe(this.tableScope.hostElement);
2884
3064
  }
@@ -2887,7 +3067,7 @@ class xt {
2887
3067
  this.tableScope.recalcColumnWidths(s);
2888
3068
  }
2889
3069
  }
2890
- class vt {
3070
+ class Et {
2891
3071
  /**
2892
3072
  * Downloads a matrix data as an Excel file.
2893
3073
  *
@@ -2993,14 +3173,14 @@ class vt {
2993
3173
  return this.createZip(s);
2994
3174
  }
2995
3175
  }
2996
- class he extends lt {
2997
- constructor(e, t, s, o, i, r = new X(), l = new vt()) {
3176
+ class he extends dt {
3177
+ constructor(e, t, s, o, i, r = new K(), l = new Et()) {
2998
3178
  var c;
2999
- if (super(e, t, new Je(s), o), this.eventListener = i, this.copyService = r, this.excelService = l, this.licenseManager = B.getInstance(), this.selectionService = new ht(this), this.api = new Qe(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, t.setTableScope(this), i || (this.eventListener = new ue()), (c = this.tableOptions) != null && c.autoRestoreOptions) {
3179
+ if (super(e, t, new Je(s), o), this.eventListener = i, this.copyService = r, this.excelService = l, this.licenseManager = B.getInstance(), this.selectionService = new ft(this), this.api = new st(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, t.setTableScope(this), i || (this.eventListener = new ue()), (c = this.tableOptions) != null && c.autoRestoreOptions) {
3000
3180
  const h = this.tableOptions.autoRestoreOptions, p = h.getStorageKeyFn;
3001
- p && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new et(p)), h.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new st(p)), h.autoRestoreSortingState && (this.storeSortingService = new ot(p)));
3181
+ p && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new ot(p)), h.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new rt(p)), h.autoRestoreSortingState && (this.storeSortingService = new at(p)));
3002
3182
  }
3003
- this.mouseHandler = new Ze(this), this.inputHandler = new ct(this), this.resizeHandler = new xt(this, o.resizeEventDebounceDelay), this.shortcutService = new ft(this), this.shortcutService.addListener(this.selectionService);
3183
+ this.mouseHandler = new Ze(this), this.inputHandler = new pt(this), this.resizeHandler = new Ct(this, o.resizeEventDebounceDelay), this.shortcutService = new bt(this), this.shortcutService.addListener(this.selectionService);
3004
3184
  const n = this.getSelectionModel ? this.getSelectionModel() : void 0;
3005
3185
  n && n.addEventSelectionChangedListener(this);
3006
3186
  const d = this.getFocusModel ? this.getFocusModel() : void 0;
@@ -3018,7 +3198,7 @@ class he extends lt {
3018
3198
  *
3019
3199
  * @return {TableScope} - The newly created TableScope instance.
3020
3200
  */
3021
- static create(e, t, s = new Re(), o = new ue(), i = new Me(), r = new X()) {
3201
+ static create(e, t, s = new Te(), o = new ue(), i = new Me(), r = new K()) {
3022
3202
  return new he(e, t, i, s, o, r);
3023
3203
  }
3024
3204
  /**
@@ -3216,7 +3396,7 @@ class he extends lt {
3216
3396
  const o = this.tableModel.getColumnDef(s);
3217
3397
  if (o != null && o.sortable && o.sortable()) {
3218
3398
  e.preventDefault(), e.stopPropagation();
3219
- const l = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, n = o.sortState ?? "", d = l[(l.indexOf(n) + 1) % l.length], c = new nt(s, d);
3399
+ const l = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, n = o.sortState ?? "", d = l[(l.indexOf(n) + 1) % l.length], c = new ht(s, d);
3220
3400
  this.tableModel.doSort([c]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((p) => p.sortState = ""), o.sortState = d), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([c]);
3221
3401
  }
3222
3402
  }
@@ -3413,9 +3593,9 @@ class he extends lt {
3413
3593
  this.tableModel.doSort(e);
3414
3594
  }
3415
3595
  }
3416
- const K = class K {
3596
+ const Y = class Y {
3417
3597
  };
3418
- K.themes = ["light", "combat", "paper", "blackboard"], K.vars = {
3598
+ Y.themes = ["light", "combat", "paper", "blackboard"], Y.vars = {
3419
3599
  light: `html[data-theme="light"] {
3420
3600
  --ge-table-bg: rgba(255,255,255, 0.5);
3421
3601
  --ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
@@ -3649,15 +3829,15 @@ K.themes = ["light", "combat", "paper", "blackboard"], K.vars = {
3649
3829
  --ge-table-drop-zone-bg: #758129;
3650
3830
  }`
3651
3831
  };
3652
- let me = K;
3653
- const Y = class Y {
3654
- constructor(e = new Te()) {
3832
+ let me = Y;
3833
+ const J = class J {
3834
+ constructor(e = new Re()) {
3655
3835
  this.headerGroupOptions = e;
3656
3836
  }
3657
3837
  render(e, t, s, o, i, r, l) {
3658
3838
  const n = r != null && r.data ? r.data : "";
3659
3839
  if (r) {
3660
- const { toggle: d, visibility: c, closed: h } = r, p = d ? Y.toggleHeaderGroup : "";
3840
+ const { toggle: d, visibility: c, closed: h } = r, p = d ? J.toggleHeaderGroup : "";
3661
3841
  this.addText(e, o, t, s, n, p), d && c !== "always" && this.addArrowDiv(l, e, !h, t, s, o, p);
3662
3842
  } else
3663
3843
  this.addText(e, o, t, s, n, "");
@@ -3689,14 +3869,14 @@ const Y = class Y {
3689
3869
  }
3690
3870
  }
3691
3871
  };
3692
- Y.toggleHeaderGroup = "toggleHeaderGroup";
3693
- let be = Y;
3694
- var Ct = /* @__PURE__ */ je("<div>");
3695
- const At = (a) => {
3872
+ J.toggleHeaderGroup = "toggleHeaderGroup";
3873
+ let be = J;
3874
+ var At = /* @__PURE__ */ je("<div>");
3875
+ const Tt = (a) => {
3696
3876
  let e;
3697
- const t = we({
3877
+ const t = Ce({
3698
3878
  tableModel: null,
3699
- tableOptions: new Re()
3879
+ tableOptions: new Te()
3700
3880
  }, a);
3701
3881
  return Be(() => {
3702
3882
  const s = {
@@ -3771,12 +3951,12 @@ const At = (a) => {
3771
3951
  });
3772
3952
  e && e.dispatchEvent(i), t.licenseKey && B.getInstance().setLicenseKey(t.licenseKey);
3773
3953
  }), (() => {
3774
- var s = Ct(), o = e;
3954
+ var s = At(), o = e;
3775
3955
  return typeof o == "function" ? Xe(o, s) : e = s, s;
3776
3956
  })();
3777
3957
  };
3778
3958
  export {
3779
- wt as ComponentRendererWrapper,
3780
- At as GuiexpertTable,
3781
- Et as GuiexpertTableProps
3959
+ Mt as ComponentRendererWrapper,
3960
+ Tt as GuiexpertTable,
3961
+ Rt as GuiexpertTableProps
3782
3962
  };