@guiexpert/solid-table 1.0.14 → 1.0.15

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.
@@ -1,109 +1,105 @@
1
- const De = (r, e) => r === e, te = Symbol("solid-proxy"), ue = {
2
- equals: De
1
+ const ke = (l, e) => l === e, te = Symbol("solid-proxy"), ue = {
2
+ equals: ke
3
3
  };
4
- let me = ve;
5
- const L = 1, N = 2, ye = {
4
+ let ye = we;
5
+ const L = 1, N = 2, ve = {
6
6
  owned: null,
7
7
  cleanups: null,
8
8
  context: null,
9
9
  owner: null
10
10
  };
11
11
  var R = null;
12
- let Z = null, w = null, M = null, F = null, q = 0;
13
- function ke(r, e) {
14
- const t = w, s = R, o = r.length === 0, i = e === void 0 ? s : e, l = o ? ye : {
12
+ let Z = null, pe = null, w = null, M = null, I = null, q = 0;
13
+ function Oe(l, e) {
14
+ const t = w, s = R, o = l.length === 0, i = e === void 0 ? s : e, r = o ? ve : {
15
15
  owned: null,
16
16
  cleanups: null,
17
17
  context: i ? i.context : null,
18
18
  owner: i
19
- }, n = o ? r : () => r(() => H(() => J(l)));
20
- R = l, w = null;
19
+ }, n = o ? l : () => l(() => H(() => J(r)));
20
+ R = r, w = null;
21
21
  try {
22
22
  return G(n, !0);
23
23
  } finally {
24
24
  w = t, R = s;
25
25
  }
26
26
  }
27
- function se(r, e, t) {
28
- const s = re(r, e, !1, L);
27
+ function se(l, e, t) {
28
+ const s = re(l, e, !1, L);
29
29
  W(s);
30
30
  }
31
- function Oe(r, e, t) {
32
- me = He;
33
- const s = re(r, e, !1, L);
34
- (!t || !t.render) && (s.user = !0), F ? F.push(s) : W(s);
31
+ function Fe(l, e, t) {
32
+ ye = We;
33
+ const s = re(l, e, !1, L);
34
+ (!t || !t.render) && (s.user = !0), I ? I.push(s) : W(s);
35
35
  }
36
- function Ie(r, e, t) {
36
+ function Ie(l, e, t) {
37
37
  t = t ? Object.assign({}, ue, t) : ue;
38
- const s = re(r, e, !0, 0);
39
- return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, W(s), Le.bind(s);
38
+ const s = re(l, e, !0, 0);
39
+ return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, W(s), $e.bind(s);
40
40
  }
41
- function H(r) {
42
- if (w === null)
43
- return r();
41
+ function H(l) {
42
+ if (!pe && w === null)
43
+ return l();
44
44
  const e = w;
45
45
  w = null;
46
46
  try {
47
- return r();
47
+ return l();
48
48
  } finally {
49
49
  w = e;
50
50
  }
51
51
  }
52
- function Fe(r) {
53
- Oe(() => H(r));
52
+ function Le(l) {
53
+ Fe(() => H(l));
54
54
  }
55
- function Le() {
55
+ function $e() {
56
56
  if (this.sources && this.state)
57
57
  if (this.state === L)
58
58
  W(this);
59
59
  else {
60
- const r = M;
61
- M = null, G(() => j(this), !1), M = r;
60
+ const l = M;
61
+ M = null, G(() => j(this), !1), M = l;
62
62
  }
63
63
  if (w) {
64
- const r = this.observers ? this.observers.length : 0;
65
- w.sources ? (w.sources.push(this), w.sourceSlots.push(r)) : (w.sources = [this], w.sourceSlots = [r]), this.observers ? (this.observers.push(w), this.observerSlots.push(w.sources.length - 1)) : (this.observers = [w], this.observerSlots = [w.sources.length - 1]);
64
+ const l = this.observers ? this.observers.length : 0;
65
+ w.sources ? (w.sources.push(this), w.sourceSlots.push(l)) : (w.sources = [this], w.sourceSlots = [l]), this.observers ? (this.observers.push(w), this.observerSlots.push(w.sources.length - 1)) : (this.observers = [w], this.observerSlots = [w.sources.length - 1]);
66
66
  }
67
67
  return this.value;
68
68
  }
69
- function $e(r, e, t) {
70
- let s = r.value;
71
- return (!r.comparator || !r.comparator(s, e)) && (r.value = e, r.observers && r.observers.length && G(() => {
72
- for (let o = 0; o < r.observers.length; o += 1) {
73
- const i = r.observers[o], l = Z && Z.running;
74
- l && Z.disposed.has(i), (l ? !i.tState : !i.state) && (i.pure ? M.push(i) : F.push(i), i.observers && we(i)), l || (i.state = L);
69
+ function Be(l, e, t) {
70
+ let s = l.value;
71
+ return (!l.comparator || !l.comparator(s, e)) && (l.value = e, l.observers && l.observers.length && G(() => {
72
+ for (let o = 0; o < l.observers.length; o += 1) {
73
+ const i = l.observers[o], r = Z && Z.running;
74
+ r && Z.disposed.has(i), (r ? !i.tState : !i.state) && (i.pure ? M.push(i) : I.push(i), i.observers && Ce(i)), r || (i.state = L);
75
75
  }
76
76
  if (M.length > 1e6)
77
77
  throw M = [], new Error();
78
78
  }, !1)), e;
79
79
  }
80
- function W(r) {
81
- if (!r.fn)
80
+ function W(l) {
81
+ if (!l.fn)
82
82
  return;
83
- J(r);
83
+ J(l);
84
84
  const e = q;
85
- Be(
86
- r,
87
- r.value,
88
- e
89
- );
85
+ Pe(l, l.value, e);
90
86
  }
91
- function Be(r, e, t) {
87
+ function Pe(l, e, t) {
92
88
  let s;
93
89
  const o = R, i = w;
94
- w = R = r;
90
+ w = R = l;
95
91
  try {
96
- s = r.fn(e);
97
- } catch (l) {
98
- return r.pure && (r.state = L, r.owned && r.owned.forEach(J), r.owned = null), r.updatedAt = t + 1, Ce(l);
92
+ s = l.fn(e);
93
+ } catch (r) {
94
+ return l.pure && (l.state = L, l.owned && l.owned.forEach(J), l.owned = null), l.updatedAt = t + 1, xe(r);
99
95
  } finally {
100
96
  w = i, R = o;
101
97
  }
102
- (!r.updatedAt || r.updatedAt <= t) && (r.updatedAt != null && "observers" in r ? $e(r, s) : r.value = s, r.updatedAt = t);
98
+ (!l.updatedAt || l.updatedAt <= t) && (l.updatedAt != null && "observers" in l ? Be(l, s) : l.value = s, l.updatedAt = t);
103
99
  }
104
- function re(r, e, t, s = L, o) {
100
+ function re(l, e, t, s = L, o) {
105
101
  const i = {
106
- fn: r,
102
+ fn: l,
107
103
  state: s,
108
104
  updatedAt: null,
109
105
  owned: null,
@@ -115,215 +111,217 @@ function re(r, e, t, s = L, o) {
115
111
  context: R ? R.context : null,
116
112
  pure: t
117
113
  };
118
- return R === null || R !== ye && (R.owned ? R.owned.push(i) : R.owned = [i]), i;
114
+ return R === null || R !== ve && (R.owned ? R.owned.push(i) : R.owned = [i]), i;
119
115
  }
120
- function z(r) {
121
- if (r.state === 0)
116
+ function z(l) {
117
+ if (l.state === 0)
122
118
  return;
123
- if (r.state === N)
124
- return j(r);
125
- if (r.suspense && H(r.suspense.inFallback))
126
- return r.suspense.effects.push(r);
127
- const e = [r];
128
- for (; (r = r.owner) && (!r.updatedAt || r.updatedAt < q); )
129
- r.state && e.push(r);
119
+ if (l.state === N)
120
+ return j(l);
121
+ if (l.suspense && H(l.suspense.inFallback))
122
+ return l.suspense.effects.push(l);
123
+ const e = [l];
124
+ for (; (l = l.owner) && (!l.updatedAt || l.updatedAt < q); )
125
+ l.state && e.push(l);
130
126
  for (let t = e.length - 1; t >= 0; t--)
131
- if (r = e[t], r.state === L)
132
- W(r);
133
- else if (r.state === N) {
127
+ if (l = e[t], l.state === L)
128
+ W(l);
129
+ else if (l.state === N) {
134
130
  const s = M;
135
- M = null, G(() => j(r, e[0]), !1), M = s;
131
+ M = null, G(() => j(l, e[0]), !1), M = s;
136
132
  }
137
133
  }
138
- function G(r, e) {
134
+ function G(l, e) {
139
135
  if (M)
140
- return r();
136
+ return l();
141
137
  let t = !1;
142
- e || (M = []), F ? t = !0 : F = [], q++;
138
+ e || (M = []), I ? t = !0 : I = [], q++;
143
139
  try {
144
- const s = r();
145
- return Pe(t), s;
140
+ const s = l();
141
+ return He(t), s;
146
142
  } catch (s) {
147
- t || (F = null), M = null, Ce(s);
143
+ t || (I = null), M = null, xe(s);
148
144
  }
149
145
  }
150
- function Pe(r) {
151
- if (M && (ve(M), M = null), r)
146
+ function He(l) {
147
+ if (M && (we(M), M = null), l)
152
148
  return;
153
- const e = F;
154
- F = null, e.length && G(() => me(e), !1);
149
+ const e = I;
150
+ I = null, e.length && G(() => ye(e), !1);
155
151
  }
156
- function ve(r) {
157
- for (let e = 0; e < r.length; e++)
158
- z(r[e]);
152
+ function we(l) {
153
+ for (let e = 0; e < l.length; e++)
154
+ z(l[e]);
159
155
  }
160
- function He(r) {
156
+ function We(l) {
161
157
  let e, t = 0;
162
- for (e = 0; e < r.length; e++) {
163
- const s = r[e];
164
- s.user ? r[t++] = s : z(s);
158
+ for (e = 0; e < l.length; e++) {
159
+ const s = l[e];
160
+ s.user ? l[t++] = s : z(s);
165
161
  }
166
162
  for (e = 0; e < t; e++)
167
- z(r[e]);
163
+ z(l[e]);
168
164
  }
169
- function j(r, e) {
170
- r.state = 0;
171
- for (let t = 0; t < r.sources.length; t += 1) {
172
- const s = r.sources[t];
165
+ function j(l, e) {
166
+ l.state = 0;
167
+ for (let t = 0; t < l.sources.length; t += 1) {
168
+ const s = l.sources[t];
173
169
  if (s.sources) {
174
170
  const o = s.state;
175
171
  o === L ? s !== e && (!s.updatedAt || s.updatedAt < q) && z(s) : o === N && j(s, e);
176
172
  }
177
173
  }
178
174
  }
179
- function we(r) {
180
- for (let e = 0; e < r.observers.length; e += 1) {
181
- const t = r.observers[e];
182
- t.state || (t.state = N, t.pure ? M.push(t) : F.push(t), t.observers && we(t));
175
+ function Ce(l) {
176
+ for (let e = 0; e < l.observers.length; e += 1) {
177
+ const t = l.observers[e];
178
+ t.state || (t.state = N, t.pure ? M.push(t) : I.push(t), t.observers && Ce(t));
183
179
  }
184
180
  }
185
- function J(r) {
181
+ function J(l) {
186
182
  let e;
187
- if (r.sources)
188
- for (; r.sources.length; ) {
189
- const t = r.sources.pop(), s = r.sourceSlots.pop(), o = t.observers;
183
+ if (l.sources)
184
+ for (; l.sources.length; ) {
185
+ const t = l.sources.pop(), s = l.sourceSlots.pop(), o = t.observers;
190
186
  if (o && o.length) {
191
- const i = o.pop(), l = t.observerSlots.pop();
192
- s < o.length && (i.sourceSlots[l] = s, o[s] = i, t.observerSlots[s] = l);
187
+ const i = o.pop(), r = t.observerSlots.pop();
188
+ s < o.length && (i.sourceSlots[r] = s, o[s] = i, t.observerSlots[s] = r);
193
189
  }
194
190
  }
195
- if (r.owned) {
196
- for (e = r.owned.length - 1; e >= 0; e--)
197
- J(r.owned[e]);
198
- r.owned = null;
191
+ if (l.owned) {
192
+ for (e = l.owned.length - 1; e >= 0; e--)
193
+ J(l.owned[e]);
194
+ l.owned = null;
199
195
  }
200
- if (r.cleanups) {
201
- for (e = r.cleanups.length - 1; e >= 0; e--)
202
- r.cleanups[e]();
203
- r.cleanups = null;
196
+ if (l.cleanups) {
197
+ for (e = l.cleanups.length - 1; e >= 0; e--)
198
+ l.cleanups[e]();
199
+ l.cleanups = null;
204
200
  }
205
- r.state = 0;
201
+ l.state = 0;
206
202
  }
207
- function We(r) {
208
- return r instanceof Error ? r : new Error(typeof r == "string" ? r : "Unknown error", {
209
- cause: r
203
+ function Ge(l) {
204
+ return l instanceof Error ? l : new Error(typeof l == "string" ? l : "Unknown error", {
205
+ cause: l
210
206
  });
211
207
  }
212
- function Ce(r, e = R) {
213
- throw We(r);
208
+ function xe(l, e = R) {
209
+ throw Ge(l);
214
210
  }
215
211
  function V() {
216
212
  return !0;
217
213
  }
218
- const Ge = {
219
- get(r, e, t) {
220
- return e === te ? t : r.get(e);
214
+ const _e = {
215
+ get(l, e, t) {
216
+ return e === te ? t : l.get(e);
221
217
  },
222
- has(r, e) {
223
- return e === te ? !0 : r.has(e);
218
+ has(l, e) {
219
+ return e === te ? !0 : l.has(e);
224
220
  },
225
221
  set: V,
226
222
  deleteProperty: V,
227
- getOwnPropertyDescriptor(r, e) {
223
+ getOwnPropertyDescriptor(l, e) {
228
224
  return {
229
225
  configurable: !0,
230
226
  enumerable: !0,
231
227
  get() {
232
- return r.get(e);
228
+ return l.get(e);
233
229
  },
234
230
  set: V,
235
231
  deleteProperty: V
236
232
  };
237
233
  },
238
- ownKeys(r) {
239
- return r.keys();
234
+ ownKeys(l) {
235
+ return l.keys();
240
236
  }
241
237
  };
242
- function ee(r) {
243
- return (r = typeof r == "function" ? r() : r) ? r : {};
238
+ function ee(l) {
239
+ return (l = typeof l == "function" ? l() : l) ? l : {};
244
240
  }
245
- function _e() {
246
- for (let r = 0, e = this.length; r < e; ++r) {
247
- const t = this[r]();
241
+ function Ve() {
242
+ for (let l = 0, e = this.length; l < e; ++l) {
243
+ const t = this[l]();
248
244
  if (t !== void 0)
249
245
  return t;
250
246
  }
251
247
  }
252
- function xe(...r) {
248
+ function Ee(...l) {
253
249
  let e = !1;
254
- for (let i = 0; i < r.length; i++) {
255
- const l = r[i];
256
- e = e || !!l && te in l, r[i] = typeof l == "function" ? (e = !0, Ie(l)) : l;
250
+ for (let r = 0; r < l.length; r++) {
251
+ const n = l[r];
252
+ e = e || !!n && te in n, l[r] = typeof n == "function" ? (e = !0, Ie(n)) : n;
257
253
  }
258
254
  if (e)
259
- return new Proxy(
260
- {
261
- get(i) {
262
- for (let l = r.length - 1; l >= 0; l--) {
263
- const n = ee(r[l])[i];
264
- if (n !== void 0)
265
- return n;
266
- }
267
- },
268
- has(i) {
269
- for (let l = r.length - 1; l >= 0; l--)
270
- if (i in ee(r[l]))
271
- return !0;
272
- return !1;
273
- },
274
- keys() {
275
- const i = [];
276
- for (let l = 0; l < r.length; l++)
277
- i.push(...Object.keys(ee(r[l])));
278
- return [...new Set(i)];
255
+ return new Proxy({
256
+ get(r) {
257
+ for (let n = l.length - 1; n >= 0; n--) {
258
+ const a = ee(l[n])[r];
259
+ if (a !== void 0)
260
+ return a;
279
261
  }
280
262
  },
281
- Ge
282
- );
283
- const t = {}, s = {}, o = /* @__PURE__ */ new Set();
284
- for (let i = r.length - 1; i >= 0; i--) {
285
- const l = r[i];
286
- if (!l)
263
+ has(r) {
264
+ for (let n = l.length - 1; n >= 0; n--)
265
+ if (r in ee(l[n]))
266
+ return !0;
267
+ return !1;
268
+ },
269
+ keys() {
270
+ const r = [];
271
+ for (let n = 0; n < l.length; n++)
272
+ r.push(...Object.keys(ee(l[n])));
273
+ return [...new Set(r)];
274
+ }
275
+ }, _e);
276
+ const t = {}, s = /* @__PURE__ */ Object.create(null);
277
+ for (let r = l.length - 1; r >= 0; r--) {
278
+ const n = l[r];
279
+ if (!n)
287
280
  continue;
288
- const n = Object.getOwnPropertyNames(l);
289
- for (let a = 0, c = n.length; a < c; a++) {
290
- const d = n[a];
281
+ const a = Object.getOwnPropertyNames(n);
282
+ for (let c = a.length - 1; c >= 0; c--) {
283
+ const d = a[c];
291
284
  if (d === "__proto__" || d === "constructor")
292
285
  continue;
293
- const h = Object.getOwnPropertyDescriptor(l, d);
294
- if (!o.has(d))
295
- h.get ? (o.add(d), Object.defineProperty(t, d, {
286
+ const h = Object.getOwnPropertyDescriptor(n, d);
287
+ if (!s[d])
288
+ s[d] = h.get ? {
296
289
  enumerable: !0,
297
290
  configurable: !0,
298
- get: _e.bind(s[d] = [h.get.bind(l)])
299
- })) : (h.value !== void 0 && o.add(d), t[d] = h.value);
291
+ get: Ve.bind(t[d] = [h.get.bind(n)])
292
+ } : h.value !== void 0 ? h : void 0;
300
293
  else {
301
- const g = s[d];
302
- g ? h.get ? g.push(h.get.bind(l)) : h.value !== void 0 && g.push(() => h.value) : t[d] === void 0 && (t[d] = h.value);
294
+ const g = t[d];
295
+ g && (h.get ? g.push(h.get.bind(n)) : h.value !== void 0 && g.push(() => h.value));
303
296
  }
304
297
  }
305
298
  }
306
- return t;
299
+ const o = {}, i = Object.keys(s);
300
+ for (let r = i.length - 1; r >= 0; r--) {
301
+ const n = i[r], a = s[n];
302
+ a && a.get ? Object.defineProperty(o, n, a) : o[n] = a ? a.value : void 0;
303
+ }
304
+ return o;
307
305
  }
308
- function Ve(r, e, t) {
309
- let s = t.length, o = e.length, i = s, l = 0, n = 0, a = e[o - 1].nextSibling, c = null;
310
- for (; l < o || n < i; ) {
311
- if (e[l] === t[n]) {
312
- l++, n++;
306
+ function Ne(l, e, t) {
307
+ let s = t.length, o = e.length, i = s, r = 0, n = 0, a = e[o - 1].nextSibling, c = null;
308
+ for (; r < o || n < i; ) {
309
+ if (e[r] === t[n]) {
310
+ r++, n++;
313
311
  continue;
314
312
  }
315
313
  for (; e[o - 1] === t[i - 1]; )
316
314
  o--, i--;
317
- if (o === l) {
315
+ if (o === r) {
318
316
  const d = i < s ? n ? t[n - 1].nextSibling : t[i - n] : a;
319
317
  for (; n < i; )
320
- r.insertBefore(t[n++], d);
318
+ l.insertBefore(t[n++], d);
321
319
  } else if (i === n)
322
- for (; l < o; )
323
- (!c || !c.has(e[l])) && e[l].remove(), l++;
324
- else if (e[l] === t[i - 1] && t[n] === e[o - 1]) {
320
+ for (; r < o; )
321
+ (!c || !c.has(e[r])) && e[r].remove(), r++;
322
+ else if (e[r] === t[i - 1] && t[n] === e[o - 1]) {
325
323
  const d = e[--o].nextSibling;
326
- r.insertBefore(t[n++], e[l++].nextSibling), r.insertBefore(t[--i], d), e[o] = t[i];
324
+ l.insertBefore(t[n++], e[r++].nextSibling), l.insertBefore(t[--i], d), e[o] = t[i];
327
325
  } else {
328
326
  if (!c) {
329
327
  c = /* @__PURE__ */ new Map();
@@ -331,161 +329,157 @@ function Ve(r, e, t) {
331
329
  for (; h < i; )
332
330
  c.set(t[h], h++);
333
331
  }
334
- const d = c.get(e[l]);
332
+ const d = c.get(e[r]);
335
333
  if (d != null)
336
334
  if (n < d && d < i) {
337
- let h = l, g = 1, f;
335
+ let h = r, g = 1, f;
338
336
  for (; ++h < o && h < i && !((f = c.get(e[h])) == null || f !== d + g); )
339
337
  g++;
340
338
  if (g > d - n) {
341
- const b = e[l];
339
+ const b = e[r];
342
340
  for (; n < d; )
343
- r.insertBefore(t[n++], b);
341
+ l.insertBefore(t[n++], b);
344
342
  } else
345
- r.replaceChild(t[n++], e[l++]);
343
+ l.replaceChild(t[n++], e[r++]);
346
344
  } else
347
- l++;
345
+ r++;
348
346
  else
349
- e[l++].remove();
347
+ e[r++].remove();
350
348
  }
351
349
  }
352
350
  }
353
- function Ne(r, e, t, s = {}) {
351
+ function ze(l, e, t, s = {}) {
354
352
  let o;
355
- return ke((i) => {
356
- o = i, e === document ? r() : Xe(e, r(), e.firstChild ? null : void 0, t);
353
+ return Oe((i) => {
354
+ o = i, e === document ? l() : Ke(e, l(), e.firstChild ? null : void 0, t);
357
355
  }, s.owner), () => {
358
356
  o(), e.textContent = "";
359
357
  };
360
358
  }
361
- function ze(r, e, t) {
359
+ function je(l, e, t) {
362
360
  let s;
363
361
  const o = () => {
364
- const l = document.createElement("template");
365
- return l.innerHTML = r, t ? l.content.firstChild.firstChild : l.content.firstChild;
362
+ const r = document.createElement("template");
363
+ return r.innerHTML = l, t ? r.content.firstChild.firstChild : r.content.firstChild;
366
364
  }, i = e ? () => H(() => document.importNode(s || (s = o()), !0)) : () => (s || (s = o())).cloneNode(!0);
367
365
  return i.cloneNode = i, i;
368
366
  }
369
- function je(r, e, t) {
370
- return H(() => r(e, t));
367
+ function Xe(l, e, t) {
368
+ return H(() => l(e, t));
371
369
  }
372
- function Xe(r, e, t, s) {
370
+ function Ke(l, e, t, s) {
373
371
  if (t !== void 0 && !s && (s = []), typeof e != "function")
374
- return X(r, e, s, t);
375
- se((o) => X(r, e(), o, t), s);
372
+ return X(l, e, s, t);
373
+ se((o) => X(l, e(), o, t), s);
376
374
  }
377
- function X(r, e, t, s, o) {
375
+ function X(l, e, t, s, o) {
378
376
  for (; typeof t == "function"; )
379
377
  t = t();
380
378
  if (e === t)
381
379
  return t;
382
- const i = typeof e, l = s !== void 0;
383
- if (r = l && t[0] && t[0].parentNode || r, i === "string" || i === "number")
384
- if (i === "number" && (e = e.toString()), l) {
380
+ const i = typeof e, r = s !== void 0;
381
+ if (l = r && t[0] && t[0].parentNode || l, i === "string" || i === "number")
382
+ if (i === "number" && (e = e.toString()), r) {
385
383
  let n = t[0];
386
- n && n.nodeType === 3 ? n.data = e : n = document.createTextNode(e), t = B(r, t, s, n);
384
+ n && n.nodeType === 3 ? n.data !== e && (n.data = e) : n = document.createTextNode(e), t = B(l, t, s, n);
387
385
  } else
388
- t !== "" && typeof t == "string" ? t = r.firstChild.data = e : t = r.textContent = e;
386
+ t !== "" && typeof t == "string" ? t = l.firstChild.data = e : t = l.textContent = e;
389
387
  else if (e == null || i === "boolean")
390
- t = B(r, t, s);
388
+ t = B(l, t, s);
391
389
  else {
392
390
  if (i === "function")
393
391
  return se(() => {
394
392
  let n = e();
395
393
  for (; typeof n == "function"; )
396
394
  n = n();
397
- t = X(r, n, t, s);
395
+ t = X(l, n, t, s);
398
396
  }), () => t;
399
397
  if (Array.isArray(e)) {
400
398
  const n = [], a = t && Array.isArray(t);
401
399
  if (oe(n, e, t, o))
402
- return se(() => t = X(r, n, t, s, !0)), () => t;
400
+ return se(() => t = X(l, n, t, s, !0)), () => t;
403
401
  if (n.length === 0) {
404
- if (t = B(r, t, s), l)
402
+ if (t = B(l, t, s), r)
405
403
  return t;
406
404
  } else
407
- a ? t.length === 0 ? pe(r, n, s) : Ve(r, t, n) : (t && B(r), pe(r, n));
405
+ a ? t.length === 0 ? be(l, n, s) : Ne(l, t, n) : (t && B(l), be(l, n));
408
406
  t = n;
409
407
  } else if (e.nodeType) {
410
408
  if (Array.isArray(t)) {
411
- if (l)
412
- return t = B(r, t, s, e);
413
- B(r, t, null, e);
409
+ if (r)
410
+ return t = B(l, t, s, e);
411
+ B(l, t, null, e);
414
412
  } else
415
- t == null || t === "" || !r.firstChild ? r.appendChild(e) : r.replaceChild(e, r.firstChild);
413
+ t == null || t === "" || !l.firstChild ? l.appendChild(e) : l.replaceChild(e, l.firstChild);
416
414
  t = e;
417
415
  }
418
416
  }
419
417
  return t;
420
418
  }
421
- function oe(r, e, t, s) {
419
+ function oe(l, e, t, s) {
422
420
  let o = !1;
423
- for (let i = 0, l = e.length; i < l; i++) {
421
+ for (let i = 0, r = e.length; i < r; i++) {
424
422
  let n = e[i], a = t && t[i], c;
425
423
  if (!(n == null || n === !0 || n === !1))
426
424
  if ((c = typeof n) == "object" && n.nodeType)
427
- r.push(n);
425
+ l.push(n);
428
426
  else if (Array.isArray(n))
429
- o = oe(r, n, a) || o;
427
+ o = oe(l, n, a) || o;
430
428
  else if (c === "function")
431
429
  if (s) {
432
430
  for (; typeof n == "function"; )
433
431
  n = n();
434
- o = oe(
435
- r,
436
- Array.isArray(n) ? n : [n],
437
- Array.isArray(a) ? a : [a]
438
- ) || o;
432
+ o = oe(l, Array.isArray(n) ? n : [n], Array.isArray(a) ? a : [a]) || o;
439
433
  } else
440
- r.push(n), o = !0;
434
+ l.push(n), o = !0;
441
435
  else {
442
436
  const d = String(n);
443
- a && a.nodeType === 3 && a.data === d ? r.push(a) : r.push(document.createTextNode(d));
437
+ a && a.nodeType === 3 && a.data === d ? l.push(a) : l.push(document.createTextNode(d));
444
438
  }
445
439
  }
446
440
  return o;
447
441
  }
448
- function pe(r, e, t = null) {
442
+ function be(l, e, t = null) {
449
443
  for (let s = 0, o = e.length; s < o; s++)
450
- r.insertBefore(e[s], t);
444
+ l.insertBefore(e[s], t);
451
445
  }
452
- function B(r, e, t, s) {
446
+ function B(l, e, t, s) {
453
447
  if (t === void 0)
454
- return r.textContent = "";
448
+ return l.textContent = "";
455
449
  const o = s || document.createTextNode("");
456
450
  if (e.length) {
457
451
  let i = !1;
458
- for (let l = e.length - 1; l >= 0; l--) {
459
- const n = e[l];
452
+ for (let r = e.length - 1; r >= 0; r--) {
453
+ const n = e[r];
460
454
  if (o !== n) {
461
- const a = n.parentNode === r;
462
- !i && !l ? a ? r.replaceChild(o, n) : r.insertBefore(o, t) : a && n.remove();
455
+ const a = n.parentNode === l;
456
+ !i && !r ? a ? l.replaceChild(o, n) : l.insertBefore(o, t) : a && n.remove();
463
457
  } else
464
458
  i = !0;
465
459
  }
466
460
  } else
467
- r.insertBefore(o, t);
461
+ l.insertBefore(o, t);
468
462
  return [o];
469
463
  }
470
- class mt {
464
+ class yt {
471
465
  constructor(e) {
472
466
  this.code = e;
473
467
  }
474
- render(e, t, s, o, i, l, n) {
475
- const a = xe({
468
+ render(e, t, s, o, i, r, n) {
469
+ const a = Ee({
476
470
  rowIndex: t,
477
471
  columnIndex: s,
478
472
  areaIdent: o,
479
473
  areaModel: i,
480
- cellValue: l
474
+ cellValue: r
481
475
  });
482
- Ne(
476
+ ze(
483
477
  () => this.code(a),
484
478
  e
485
479
  );
486
480
  }
487
481
  }
488
- const yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
482
+ const vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
489
483
  __proto__: null
490
484
  }, Symbol.toStringTag, { value: "Module" }));
491
485
  class $ {
@@ -513,15 +507,15 @@ class $ {
513
507
  }
514
508
  }
515
509
  }
516
- function ie(r) {
517
- return r && r.type === "TreeRow";
510
+ function ie(l) {
511
+ return l && l.type === "TreeRow";
518
512
  }
519
- function le(r) {
520
- return r && r.type === "AreaModelTree";
513
+ function le(l) {
514
+ return l && l.type === "AreaModelTree";
521
515
  }
522
516
  class ne {
523
- constructor(e = -1, t = -1, s = -1, o = -1, i, l, n, a = 0, c = 0, d = 0, h = "") {
524
- this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = o, this.areaIdent = i, this.sideIdent = l, this.originalEvent = n, this.clickCount = a, this.draggingX = c, this.draggingY = d, this.action = h;
517
+ constructor(e = -1, t = -1, s = -1, o = -1, i, r, n, a = 0, c = 0, d = 0, h = "") {
518
+ this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = o, this.areaIdent = i, this.sideIdent = r, this.originalEvent = n, this.clickCount = a, this.draggingX = c, this.draggingY = d, this.action = h;
525
519
  }
526
520
  clone() {
527
521
  return new ne(
@@ -539,25 +533,25 @@ class ne {
539
533
  );
540
534
  }
541
535
  }
542
- class I {
536
+ class F {
543
537
  constructor(e = ">", t = "", s = []) {
544
538
  this.content = e, this.style = t, this.classes = s;
545
539
  }
546
540
  }
547
- class Ee {
548
- constructor(e = new I(
541
+ class Ae {
542
+ constructor(e = new F(
549
543
  ">",
550
544
  "transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
551
545
  ["gt-table-tree-arrow-expanded"]
552
- ), t = new I(
546
+ ), t = new F(
553
547
  ">",
554
548
  "",
555
549
  ["ge-table-tree-arrow-collapsed"]
556
- ), s = new I(
550
+ ), s = new F(
557
551
  ">",
558
552
  "color:transparent;",
559
553
  ["gt-table-tree-arrow-hidden"]
560
- ), o = new I(
554
+ ), o = new F(
561
555
  "↕",
562
556
  "",
563
557
  ["gt-table-tree-arrow-expanded-all"]
@@ -565,12 +559,12 @@ class Ee {
565
559
  this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = o;
566
560
  }
567
561
  }
568
- class Ae {
569
- constructor(e = new I("↑", "", ["ge-header-sorted-asc"]), t = new I("↓", "", ["ge-header-sorted-desc"]), s = new I("↑", "color:transparent;", [])) {
562
+ class Me {
563
+ constructor(e = new F("↑", "", ["ge-header-sorted-asc"]), t = new F("↓", "", ["ge-header-sorted-desc"]), s = new F("↑", "color:transparent;", [])) {
570
564
  this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
571
565
  }
572
566
  }
573
- class Ke {
567
+ class Ye {
574
568
  constructor(e) {
575
569
  this.domService = e;
576
570
  }
@@ -643,42 +637,42 @@ class Ke {
643
637
  const s = this.domService.createElement("div");
644
638
  return this.addClass(e, s), this.domService.appendChild(t, s), s;
645
639
  }
646
- addRowDiv(e, t, s = -1, o, i, l = "") {
640
+ addRowDiv(e, t, s = -1, o, i, r = "") {
647
641
  const n = t.index ?? -1, a = this.getDivOrCreateDiv(n, e);
648
642
  if (this.domService.addClass(a, "ge-table-row-div"), this.domService.addClass(a, `ge-table-row-div-${t.index}`), o === "body" && i === "center") {
649
643
  const c = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
650
644
  this.domService.addClass(a, `ge-table-row-${c}`);
651
645
  }
652
- if (this.domService.setStyle(a, "display", "clip"), this.domService.setStyle(a, "position", "absolute"), this.domService.setStyle(a, "left", `${t.left}px`), this.domService.setStyle(a, "top", `${t.top}px`), this.domService.setStyle(a, "width", `${t.width}px`), this.domService.setStyle(a, "height", `${t.height}px`), this.domService.setAttribute(a, "data-row-index", `${s}`), this.domService.setAttribute(a, "data-area", `${o}`), l) {
653
- const c = this.domService.createText(l);
646
+ if (this.domService.setStyle(a, "display", "clip"), this.domService.setStyle(a, "position", "absolute"), this.domService.setStyle(a, "left", `${t.left}px`), this.domService.setStyle(a, "top", `${t.top}px`), this.domService.setStyle(a, "width", `${t.width}px`), this.domService.setStyle(a, "height", `${t.height}px`), this.domService.setAttribute(a, "data-row-index", `${s}`), this.domService.setAttribute(a, "data-area", `${o}`), r) {
647
+ const c = this.domService.createText(r);
654
648
  this.domService.appendChild(a, c);
655
649
  }
656
650
  return this.domService.appendChild(e.child, a), a;
657
651
  }
658
652
  addColumnDiv(e) {
659
- const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent: l, sideIdent: n, text: a = "", treeArrow: c, tableOptions: d, checkedType: h = void 0, sortState: g } = e, f = d == null ? void 0 : d.treeOptions, b = d == null ? void 0 : d.showCheckboxWihoutExtraColumn, S = this.domService.createElement("div");
660
- this.domService.addClass(S, "ge-table-col-div"), this.domService.addClass(S, `ge-table-col-div-${s.index}`), this.domService.setAttribute(S, "data-col-index", `${s.index}`), this.domService.setAttribute(S, "data-row-index", `${o}`), this.domService.setAttribute(S, "data-area", `${l}`);
653
+ const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent: r, sideIdent: n, text: a = "", treeArrow: c, tableOptions: d, checkedType: h = void 0, sortState: g } = e, f = d == null ? void 0 : d.treeOptions, b = d == null ? void 0 : d.showCheckboxWihoutExtraColumn, S = this.domService.createElement("div");
654
+ this.domService.addClass(S, "ge-table-col-div"), this.domService.addClass(S, `ge-table-col-div-${s.index}`), this.domService.setAttribute(S, "data-col-index", `${s.index}`), this.domService.setAttribute(S, "data-row-index", `${o}`), this.domService.setAttribute(S, "data-area", `${r}`);
661
655
  const p = ((s == null ? void 0 : s.index) ?? 0) % 2 === 0 ? "even" : "odd";
662
- if (l === "body" && n === "center" && this.domService.addClass(S, `ge-table-column-${p}`), this.domService.setStyle(S, "display", "clip"), this.domService.setStyle(S, "position", "absolute"), this.domService.setStyle(S, "left", `${s.left}px`), this.domService.setStyle(S, "top", `${s.top}px`), this.domService.setStyle(S, "width", `${s.width}px`), this.domService.setStyle(S, "height", `${s.height}px`), c && c !== "none" && (this.domService.addClass(S, "ge-table-col-tree"), this.addArrowDiv(S, c, f, o, i, l)), b && i === 0 && h && this.addCheckboxToDiv(S, h, l, o), a) {
656
+ if (r === "body" && n === "center" && this.domService.addClass(S, `ge-table-column-${p}`), this.domService.setStyle(S, "display", "clip"), this.domService.setStyle(S, "position", "absolute"), this.domService.setStyle(S, "left", `${s.left}px`), this.domService.setStyle(S, "top", `${s.top}px`), this.domService.setStyle(S, "width", `${s.width}px`), this.domService.setStyle(S, "height", `${s.height}px`), c && c !== "none" && (this.domService.addClass(S, "ge-table-col-tree"), this.addArrowDiv(S, c, f, o, i, r)), b && i === 0 && h && this.addCheckboxToDiv(S, h, r, o), a) {
663
657
  const u = c !== "none" && i === 0;
664
- this.addLabelDiv(S, a, u, o, i, l);
658
+ this.addLabelDiv(S, a, u, o, i, r);
665
659
  }
666
660
  return g && this.addSortedIcon(S, g, d == null ? void 0 : d.sortedOptions, i), this.domService.appendChild(t, S), S;
667
661
  }
668
662
  addCheckboxToDiv(e, t, s, o) {
669
- const i = this.domService.createElement("div"), l = t === "full" ? "checked" : "";
663
+ const i = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
670
664
  return i.innerHTML = `
671
665
  <input
672
666
  type="checkbox"
673
667
  data-area="${s}"
674
668
  data-row-index="${o}"
675
669
  data-input-type="checkbox"
676
- ${l}
670
+ ${r}
677
671
  class="ge-table-row-checkbox"> `, this.domService.setStyle(i, "display", "inline"), this.domService.setStyle(i, "width", "inherit"), this.domService.setAttribute(i, "data-row-index", `${o}`), this.domService.appendChild(e, i), i;
678
672
  }
679
- addLabelDiv(e, t = "", s = !1, o = -1, i = -1, l = "body") {
673
+ addLabelDiv(e, t = "", s = !1, o = -1, i = -1, r = "body") {
680
674
  const n = this.domService.createElement("div");
681
- if (this.domService.addClass(n, "ge-table-label-div"), this.domService.setStyle(n, "position", "relative"), this.domService.setStyle(n, "background", "transparent"), this.domService.setStyle(n, "width", "100%"), this.domService.setStyle(n, "height", "100%"), this.domService.setAttribute(n, "data-row-index", `${o}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${l}`), t)
675
+ if (this.domService.addClass(n, "ge-table-label-div"), this.domService.setStyle(n, "position", "relative"), this.domService.setStyle(n, "background", "transparent"), this.domService.setStyle(n, "width", "100%"), this.domService.setStyle(n, "height", "100%"), this.domService.setAttribute(n, "data-row-index", `${o}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${r}`), t)
682
676
  if (s) {
683
677
  const a = this.domService.createText(t);
684
678
  this.domService.appendChild(n, a);
@@ -686,24 +680,24 @@ class Ke {
686
680
  const a = this.domService.createElement("div");
687
681
  this.domService.appendChild(n, a);
688
682
  const c = this.domService.createText(t);
689
- this.domService.addClass(a, "ge-table-label"), this.domService.appendChild(a, c), this.domService.setAttribute(a, "data-row-index", `${o}`), this.domService.setAttribute(a, "data-col-index", `${i}`), this.domService.setAttribute(a, "data-area", `${l}`);
683
+ this.domService.addClass(a, "ge-table-label"), this.domService.appendChild(a, c), this.domService.setAttribute(a, "data-row-index", `${o}`), this.domService.setAttribute(a, "data-col-index", `${i}`), this.domService.setAttribute(a, "data-area", `${r}`);
690
684
  }
691
685
  return this.domService.appendChild(e, n), n;
692
686
  }
693
- addSortedIcon(e, t = "", s = new Ae(), o = -1) {
687
+ addSortedIcon(e, t = "", s = new Me(), o = -1) {
694
688
  const i = this.domService.createElement("div");
695
689
  this.domService.addClass(i, "ge-table-sorted-icon-div"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "top", "0"), this.domService.setStyle(i, "right", "0"), this.domService.setStyle(i, "width", "20px"), this.domService.setStyle(i, "background", "transparent"), this.domService.setStyle(i, "cursor", "pointer"), this.domService.setAttribute(i, "data-col-index", `${o}`), this.domService.setAttribute(i, "data-area", "header");
696
- let l;
697
- t === "asc" ? l = s.iconAsc : t === "desc" ? l = s.iconDesc : l = s.iconPlaceholder;
698
- const n = l.content, a = this.domService.createText(n);
699
- this.domService.appendChild(i, a), l.style && this.applyStyleString(i, l.style);
700
- for (const c of l.classes)
690
+ let r;
691
+ t === "asc" ? r = s.iconAsc : t === "desc" ? r = s.iconDesc : r = s.iconPlaceholder;
692
+ const n = r.content, a = this.domService.createText(n);
693
+ this.domService.appendChild(i, a), r.style && this.applyStyleString(i, r.style);
694
+ for (const c of r.classes)
701
695
  this.domService.addClass(i, c);
702
696
  return this.domService.appendChild(e, i), i;
703
697
  }
704
- addArrowDiv(e, t = "none", s = new Ee(), o = -1, i = -1, l = "body") {
698
+ addArrowDiv(e, t = "none", s = new Ae(), o = -1, i = -1, r = "body") {
705
699
  const n = this.domService.createElement("div");
706
- this.domService.addClass(n, "ge-table-tree-arrow-div"), this.domService.setStyle(n, "display", "inline-block"), this.domService.setStyle(n, "position", ""), this.domService.setStyle(n, "width", "20px"), this.domService.setStyle(n, "background", "transparent"), this.domService.setStyle(n, "cursor", "pointer"), this.domService.setAttribute(n, "data-row-index", `${o}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${l}`);
700
+ this.domService.addClass(n, "ge-table-tree-arrow-div"), this.domService.setStyle(n, "display", "inline-block"), this.domService.setStyle(n, "position", ""), this.domService.setStyle(n, "width", "20px"), this.domService.setStyle(n, "background", "transparent"), this.domService.setStyle(n, "cursor", "pointer"), this.domService.setAttribute(n, "data-row-index", `${o}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${r}`);
707
701
  let a;
708
702
  t === "expanded" ? a = s.arrowExpanded : t === "collapsed" ? a = s.arrowCollapsed : a = s.arrowPlaceholder;
709
703
  const c = a.content, d = this.domService.createText(c);
@@ -714,12 +708,12 @@ class Ke {
714
708
  }
715
709
  addColumnBorderDivs(e, t, s, o, i) {
716
710
  if (e.verticalBorderVisible) {
717
- const l = `ge-table-${o}-${i}-vertical-border`;
718
- this.addVerticalBorder(s, t, l);
711
+ const r = `ge-table-${o}-${i}-vertical-border`;
712
+ this.addVerticalBorder(s, t, r);
719
713
  }
720
714
  if (e.horizontalBorderVisible) {
721
- const l = `ge-table-${o}-${i}-horizontal-border`;
722
- this.addHorizontalBorder(s, t, l);
715
+ const r = `ge-table-${o}-${i}-horizontal-border`;
716
+ this.addHorizontalBorder(s, t, r);
723
717
  }
724
718
  return t;
725
719
  }
@@ -743,8 +737,8 @@ class Ke {
743
737
  applyStyleString(e, t) {
744
738
  const s = t.split(";").map((o) => o.trim()).filter((o) => o);
745
739
  for (const o of s) {
746
- const [i, l] = o.split(":");
747
- this.domService.setStyle(e, i.trim(), l.trim());
740
+ const [i, r] = o.split(":");
741
+ this.domService.setStyle(e, i.trim(), r.trim());
748
742
  }
749
743
  }
750
744
  getDivOrCreateDiv(e, t) {
@@ -752,8 +746,8 @@ class Ke {
752
746
  return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
753
747
  }
754
748
  }
755
- const ae = (r) => r === "header" ? "header" : r === "footer" ? "footer" : "body";
756
- class Ye {
749
+ const ae = (l) => l === "header" ? "header" : l === "footer" ? "footer" : "body";
750
+ class Ue {
757
751
  constructor(e, t) {
758
752
  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)) {
759
753
  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"));
@@ -765,7 +759,7 @@ class Ye {
765
759
  }
766
760
  }
767
761
  }
768
- class Ue {
762
+ class qe {
769
763
  constructor(e) {
770
764
  this.tableScope = e, this.doubleClickDelay = 500, this.expandedAll = !0, this.mouseDown = !1, this.dragging = !1, this.lastClicked = 0, this.tableScope.hostElement.addEventListener("click", this.onHostElementClicked.bind(this)), this.tableScope.hostElement.addEventListener("dblclick", this.onHostElementDblClicked.bind(this)), this.tableScope.hostElement.addEventListener("mousedown", this.onMouseDown.bind(this)), this.tableScope.hostElement.addEventListener("mousemove", this.onMouseMove.bind(this)), this.tableScope.hostElement.addEventListener("mouseup", this.onMouseUp.bind(this)), this.tableScope.hostElement.addEventListener("contextmenu", this.onContextmenu.bind(this)), this.tableScope.hostElement._MouseHandler = "true", this.tableScope.scrollViewport.addEventListener("scroll", this.tableScope.adjustAfterScrolling.bind(this.tableScope)), [window, this.tableScope.hostElement].forEach(
771
765
  (t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
@@ -795,7 +789,7 @@ class Ue {
795
789
  if (t - this.lastClicked < this.doubleClickDelay)
796
790
  return;
797
791
  this.lastClicked = t;
798
- const s = new Ye(e.target, this.tableScope);
792
+ const s = new Ue(e.target, this.tableScope);
799
793
  if (s.action === "toggleExpandCollapseAll")
800
794
  this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
801
795
  else if (s.action === "toggleHeaderGroup")
@@ -804,10 +798,10 @@ class Ue {
804
798
  this.tableScope.toggleRowCheckbox(s.rowIdx, s.colIdx, s.areaIdent), e.preventDefault(), e.stopPropagation();
805
799
  else if (ie(s.row) && s.areaModel) {
806
800
  const o = s.colIdx === this.getArrowColumnIndex() && e.altKey, i = s.className.includes("ge-table-tree-arrow-div");
807
- if (console.info(i, o), o || i) {
801
+ if (o || i) {
808
802
  e.preventDefault(), e.stopPropagation();
809
- const l = s.row;
810
- l.expanded = !l.expanded, "recalcVisibleTreeRows" in s.areaModel && s.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(l);
803
+ const r = s.row;
804
+ r.expanded = !r.expanded, "recalcVisibleTreeRows" in s.areaModel && s.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(r);
811
805
  }
812
806
  }
813
807
  if (s.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
@@ -824,12 +818,12 @@ class Ue {
824
818
  */
825
819
  onHostElementDblClicked(e) {
826
820
  if (this.lastClicked = Date.now(), e.target instanceof HTMLElement) {
827
- const t = e.target, s = t.getAttribute("data-area"), o = ae(s), i = Number(t.getAttribute("data-row-index")), l = Number(t.getAttribute("data-col-index")), n = this.tableScope.tableModel.getAreaModel(o);
821
+ const t = e.target, s = t.getAttribute("data-area"), o = ae(s), i = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), n = this.tableScope.tableModel.getAreaModel(o);
828
822
  if (s && o === "header")
829
- this.tableScope.tableModel.isSortable(l) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, l));
823
+ this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, r));
830
824
  else if (t.getAttribute("data-row-index")) {
831
825
  const a = n.getRowByIndex(i);
832
- if (s && o === "body" && n.isEditable(i, l) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, l)), ie(a) && l === this.getArrowColumnIndex()) {
826
+ if (s && o === "body" && n.isEditable(i, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, r)), ie(a) && r === this.getArrowColumnIndex()) {
833
827
  e.preventDefault(), e.stopPropagation();
834
828
  const c = a;
835
829
  c.expanded = !c.expanded, "recalcVisibleTreeRows" in n && n.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(c);
@@ -857,11 +851,11 @@ class Ue {
857
851
  * @returns {void}
858
852
  */
859
853
  updateCollapsedExpandedState(e) {
860
- var s, o, i, l, n;
854
+ var s, o, i, r, n;
861
855
  const t = (o = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : o.getRowId;
862
856
  if (t) {
863
857
  const a = (i = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : i.collapsedExpandedStateGet().mode, c = a === "collapsed" && !e.expanded || a === "expanded" && e.expanded, d = a === "collapsed" && e.expanded || a === "expanded" && !e.expanded, h = t(e.data);
864
- c ? (l = this.tableScope.storeStateCollapsedExpandService) == null || l.collapsedStateIdsPush(h) : d && ((n = this.tableScope.storeStateCollapsedExpandService) == null || n.collapsedStateIdsRemove(h));
858
+ c ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(h) : d && ((n = this.tableScope.storeStateCollapsedExpandService) == null || n.collapsedStateIdsRemove(h));
865
859
  }
866
860
  }
867
861
  getArrowColumnIndex() {
@@ -897,7 +891,7 @@ class Ue {
897
891
  }
898
892
  }
899
893
  }
900
- class qe {
894
+ class Je {
901
895
  constructor(e) {
902
896
  this.tableScope = e;
903
897
  }
@@ -1093,9 +1087,9 @@ class de {
1093
1087
  for (const o of [...s]) {
1094
1088
  const [
1095
1089
  i,
1096
- l
1090
+ r
1097
1091
  ] = o;
1098
- t[i] = l;
1092
+ t[i] = r;
1099
1093
  }
1100
1094
  }
1101
1095
  return t;
@@ -1107,8 +1101,8 @@ class de {
1107
1101
  if (o) {
1108
1102
  const i = o + e;
1109
1103
  if ((t + "").includes("Map")) {
1110
- const l = this.autoConvertMapToObject(t);
1111
- this.persistItem(i, l);
1104
+ const r = this.autoConvertMapToObject(t);
1105
+ this.persistItem(i, r);
1112
1106
  } else
1113
1107
  this.persistItem(i, t);
1114
1108
  }
@@ -1157,7 +1151,7 @@ class de {
1157
1151
  // }
1158
1152
  // }
1159
1153
  }
1160
- class Je extends de {
1154
+ class Qe extends de {
1161
1155
  constructor(e) {
1162
1156
  super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
1163
1157
  }
@@ -1179,14 +1173,14 @@ class Je extends de {
1179
1173
  }
1180
1174
  }
1181
1175
  }
1182
- class Qe {
1176
+ class Ze {
1183
1177
  constructor(e = "collapsed", t = [], s = !1, o = !1) {
1184
1178
  this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = o;
1185
1179
  }
1186
1180
  }
1187
- class Ze extends de {
1181
+ class et extends de {
1188
1182
  constructor(e) {
1189
- super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Qe(), this.load();
1183
+ super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Ze(), this.load();
1190
1184
  }
1191
1185
  collapsedExpandedStateGet() {
1192
1186
  return this.collapsedExpandedState;
@@ -1218,7 +1212,7 @@ class Ze extends de {
1218
1212
  this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
1219
1213
  }
1220
1214
  }
1221
- class et extends de {
1215
+ class tt extends de {
1222
1216
  constructor(e) {
1223
1217
  super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
1224
1218
  }
@@ -1244,7 +1238,7 @@ class O {
1244
1238
  this.left = e, this.width = t, this.height = s, this.top = o, this.index = i;
1245
1239
  }
1246
1240
  }
1247
- class tt {
1241
+ class st {
1248
1242
  constructor(e, t, s, o) {
1249
1243
  this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new O(), this.areaBodyCenterGeo = new O(), this.areaBodyEastGeo = new O();
1250
1244
  const i = this.hostElement;
@@ -1450,7 +1444,7 @@ class A {
1450
1444
  return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
1451
1445
  }
1452
1446
  }
1453
- class st {
1447
+ class ot {
1454
1448
  constructor(e, t) {
1455
1449
  this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
1456
1450
  }
@@ -1461,12 +1455,12 @@ class st {
1461
1455
  const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
1462
1456
  for (let s = 0; s < e; s++)
1463
1457
  for (let o = 0; o < t; o++) {
1464
- let i = this.areaModel.getColspanAt(s, o), l = this.areaModel.getRowspanAt(s, o);
1465
- if (i > 1 || l > 1) {
1466
- i === 0 && (i = 1), l === 0 && (l = 1);
1458
+ let i = this.areaModel.getColspanAt(s, o), r = this.areaModel.getRowspanAt(s, o);
1459
+ if (i > 1 || r > 1) {
1460
+ i === 0 && (i = 1), r === 0 && (r = 1);
1467
1461
  const n = "gammaCells" in this.areaModel;
1468
1462
  this.colAndRowspanRanges.push(
1469
- new A(s, o, s + l - 1, o + i - 1, n)
1463
+ new A(s, o, s + r - 1, o + i - 1, n)
1470
1464
  );
1471
1465
  }
1472
1466
  }
@@ -1483,22 +1477,22 @@ class st {
1483
1477
  return !1;
1484
1478
  }
1485
1479
  }
1486
- class ot {
1480
+ class it {
1487
1481
  constructor(e, t, s) {
1488
1482
  this.header = e, this.body = t, this.footer = s;
1489
1483
  }
1490
1484
  }
1491
- class it extends tt {
1485
+ class lt extends st {
1492
1486
  constructor(e, t, s, o) {
1493
- var l, n;
1487
+ var r, n;
1494
1488
  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 = {
1495
1489
  header: [],
1496
1490
  body: [],
1497
1491
  footer: []
1498
- }, this.tree = !1, this.colAndRowspanModels = new ot(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (l = this.tableOptions) != null && l.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (n = this.tableOptions) != null && n.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), le(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
1492
+ }, this.tree = !1, this.colAndRowspanModels = new it(), 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), (n = this.tableOptions) != null && n.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), le(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
1499
1493
  (a) => {
1500
1494
  var c;
1501
- this.colAndRowspanModels[a] = new st(t, t.getAreaModel(a)), (c = this.colAndRowspanModels[a]) == null || c.init();
1495
+ this.colAndRowspanModels[a] = new ot(t, t.getAreaModel(a)), (c = this.colAndRowspanModels[a]) == null || c.init();
1502
1496
  }
1503
1497
  );
1504
1498
  }
@@ -1624,19 +1618,19 @@ class it extends tt {
1624
1618
  * @param {string[]} cssClasses - An array of CSS classes to be applied to the cell.
1625
1619
  */
1626
1620
  rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: o, cssClasses: i }) {
1627
- const l = this.tableModel.getAreaModel(e), n = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', a = document.querySelector(n);
1621
+ const r = this.tableModel.getAreaModel(e), n = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', a = document.querySelector(n);
1628
1622
  if (a) {
1629
1623
  let c;
1630
- const h = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s ? this.editorRenderer : l.getCellRenderer(t, s);
1624
+ const h = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s ? this.editorRenderer : r.getCellRenderer(t, s);
1631
1625
  if (a.innerText = "", this.applyCssClasses(a, i), h)
1632
- c = h.render(a, t, s, e, l, o, this.dom.domService), c && this.cleanupFunctions[e].push(c);
1626
+ c = h.render(a, t, s, e, r, o, this.dom.domService), c && this.cleanupFunctions[e].push(c);
1633
1627
  else {
1634
1628
  const b = `${o}`;
1635
1629
  this.dom.addLabelDiv(a, b, !1, t, s, e);
1636
1630
  }
1637
- const g = l.getCustomClassesAt(t, s);
1631
+ const g = r.getCustomClassesAt(t, s);
1638
1632
  g.length && this.dom.addClasses(g, a);
1639
- const f = l.getCustomStyleAt(t, s);
1633
+ const f = r.getCustomStyleAt(t, s);
1640
1634
  if (f)
1641
1635
  for (const b in f)
1642
1636
  this.dom.setStyle(a, b, f[b]);
@@ -1749,7 +1743,7 @@ class it extends tt {
1749
1743
  */
1750
1744
  adjustArea(e, t = 0) {
1751
1745
  var p;
1752
- const s = this.getArea(e, "west"), o = this.getArea(e, "center"), i = this.getArea(e, "east"), l = o.child.clientHeight;
1746
+ const s = this.getArea(e, "west"), o = this.getArea(e, "center"), i = this.getArea(e, "east"), r = o.child.clientHeight;
1753
1747
  s.child.innerText = "", o.child.innerText = "", i.child.innerText = "";
1754
1748
  const n = 0, a = this.areaBodyCenterGeo.width, c = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e), h = d.getRowCount();
1755
1749
  for (; this.cleanupFunctions[e].length; ) {
@@ -1812,7 +1806,7 @@ class it extends tt {
1812
1806
  }
1813
1807
  }
1814
1808
  }
1815
- if (g = g + E, g > l)
1809
+ if (g = g + E, g > r)
1816
1810
  break;
1817
1811
  }
1818
1812
  if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
@@ -1842,7 +1836,7 @@ class it extends tt {
1842
1836
  * @param sideIdent SideIdent (west,center,east)
1843
1837
  * @protected
1844
1838
  */
1845
- drawBigCell(e, t, s, o, i, l) {
1839
+ drawBigCell(e, t, s, o, i, r) {
1846
1840
  const n = s + this.getRowHeights(0, e.r1 - 1, o).reduce((p, u) => p + u, 0), a = this.tableModel.getColumnCount(), c = this.tableModel.getFixedRightColumnCount();
1847
1841
  let d = 0;
1848
1842
  c > 0 && e.c1 >= a - c && (d = a - c);
@@ -1852,7 +1846,7 @@ class it extends tt {
1852
1846
  S && (b = S.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
1853
1847
  areaModel: o,
1854
1848
  areaIdent: o.areaIdent,
1855
- sideIdent: l,
1849
+ sideIdent: r,
1856
1850
  rowIndex: e.r1,
1857
1851
  columnIndex: e.c1,
1858
1852
  left: h,
@@ -1866,7 +1860,7 @@ class it extends tt {
1866
1860
  }) : this.renderCell({
1867
1861
  areaModel: o,
1868
1862
  areaIdent: o.areaIdent,
1869
- sideIdent: l,
1863
+ sideIdent: r,
1870
1864
  rowIndex: e.r1,
1871
1865
  columnIndex: e.c1,
1872
1866
  left: h,
@@ -1899,8 +1893,8 @@ class it extends tt {
1899
1893
  findRowOfImportantRowspanCell(e, t, s) {
1900
1894
  const o = e.getMaxRowspan();
1901
1895
  for (let i = t - 1; i > -1; i--) {
1902
- const l = e.getRowspanAt(i, s);
1903
- if (l > 1 && i + l + 1 >= t)
1896
+ const r = e.getRowspanAt(i, s);
1897
+ if (r > 1 && i + r + 1 >= t)
1904
1898
  return i;
1905
1899
  if (t - i > o)
1906
1900
  return -1;
@@ -1920,7 +1914,7 @@ class it extends tt {
1920
1914
  areaModel: s,
1921
1915
  geo: o,
1922
1916
  parent: i,
1923
- rowIndex: l,
1917
+ rowIndex: r,
1924
1918
  columnIndexStart: n,
1925
1919
  columnIndexEnd: a,
1926
1920
  verticalFixed: c = !1,
@@ -1939,22 +1933,22 @@ class it extends tt {
1939
1933
  const u = b, v = this.tableModel.getColumnWidth(p);
1940
1934
  if (v > 0 && u + v > 0) {
1941
1935
  let C = o.height;
1942
- const E = s.getRowspanAt(l, p), y = s.getColspanAt(l, p);
1943
- E > 1 && (C = this.getRowHeights(l, l + E - 1, s).reduce((T, D) => T + D, 0));
1936
+ const E = s.getRowspanAt(r, p), y = s.getColspanAt(r, p);
1937
+ E > 1 && (C = this.getRowHeights(r, r + E - 1, s).reduce((T, D) => T + D, 0));
1944
1938
  let m = v;
1945
1939
  y > 1 && (m = this.getColumnWidths(p, p + y - 1).reduce((T, D) => T + D, 0));
1946
1940
  let k = !1;
1947
- if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (S = this.colAndRowspanModels[e]) != null && S.isInRange(l, p) && (k = !0), this.draggingTargetColumnIndex === p && e !== "header") {
1941
+ if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (S = this.colAndRowspanModels[e]) != null && S.isInRange(r, p) && (k = !0), this.draggingTargetColumnIndex === p && e !== "header") {
1948
1942
  this.renderDragTargetDiv(i, u, g, m, C);
1949
1943
  const T = { left: u, top: g, width: m, height: C };
1950
1944
  this.dom.addColumnBorderDivs(this.tableOptions, i, T, e, t);
1951
1945
  } else {
1952
- const T = this.renderSelectedBackgroundDiv(k, f, t, s, l, p, i, u, g, m, C);
1953
- "gammaCells" in s && s.getValueAt(l, p) && (k = !1), k || this.renderCell({
1946
+ const T = this.renderSelectedBackgroundDiv(k, f, t, s, r, p, i, u, g, m, C);
1947
+ "gammaCells" in s && s.getValueAt(r, p) && (k = !1), k || this.renderCell({
1954
1948
  areaModel: s,
1955
1949
  areaIdent: e,
1956
1950
  sideIdent: t,
1957
- rowIndex: l,
1951
+ rowIndex: r,
1958
1952
  columnIndex: p,
1959
1953
  left: u,
1960
1954
  top: g,
@@ -1965,7 +1959,7 @@ class it extends tt {
1965
1959
  lastRowOfModel: d,
1966
1960
  gammaRange: !0
1967
1961
  }), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1968
- rowIndex: l,
1962
+ rowIndex: r,
1969
1963
  columnIndex: p,
1970
1964
  cellLeft: u,
1971
1965
  cellTop: g,
@@ -1998,7 +1992,7 @@ class it extends tt {
1998
1992
  sideIdent: s,
1999
1993
  rowIndex: o,
2000
1994
  index: i,
2001
- left: l,
1995
+ left: r,
2002
1996
  width: n,
2003
1997
  height: a,
2004
1998
  top: c,
@@ -2006,7 +2000,7 @@ class it extends tt {
2006
2000
  lastRowOfModel: h
2007
2001
  }) {
2008
2002
  var ge;
2009
- const f = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), b = { left: l, width: n, height: a, top: c, index: i }, S = e.getRowByIndex(o);
2003
+ const f = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), b = { left: r, width: n, height: a, top: c, index: i }, S = e.getRowByIndex(o);
2010
2004
  let p = "none";
2011
2005
  if (i === this.getTreeArrowColumnIndex() && ie(S)) {
2012
2006
  const x = S;
@@ -2038,7 +2032,7 @@ class it extends tt {
2038
2032
  let D;
2039
2033
  f && (D = f.render(m, o, i, t, e, C, this.dom.domService));
2040
2034
  const _ = e.getCustomClassesAt(o, i);
2041
- if (_.length && this.dom.addClasses(_, m), this.dom.addColumnBorderDivs(this.tableOptions, d, b, t, s), h && this.dom.addHorizontalBorder({ left: l, width: n, height: a, top: c + a }, d), this.getFocusModel && t === "body") {
2035
+ if (_.length && this.dom.addClasses(_, m), this.dom.addColumnBorderDivs(this.tableOptions, d, b, t, s), h && this.dom.addHorizontalBorder({ left: r, width: n, height: a, top: c + a }, d), this.getFocusModel && t === "body") {
2042
2036
  const x = this.getFocusModel();
2043
2037
  x != null && x.hasFocus(o, i) && this.dom.addFocusBorderDivs(d, b, {});
2044
2038
  }
@@ -2177,9 +2171,9 @@ class it extends tt {
2177
2171
  adjustDraggingColumn(e, t, s) {
2178
2172
  var o, i;
2179
2173
  if (this.dragging) {
2180
- const l = this.hostElement.clientHeight, n = this.storedColumnWidths[t];
2174
+ const r = this.hostElement.clientHeight, n = this.storedColumnWidths[t];
2181
2175
  if ((o = e.originalEvent) != null && o.clientX) {
2182
- const d = { left: ((i = e.originalEvent) == null ? void 0 : i.clientX) - n / 2, width: n, height: l, top: 0, index: t };
2176
+ const d = { left: ((i = e.originalEvent) == null ? void 0 : i.clientX) - n / 2, width: n, height: r, top: 0, index: t };
2183
2177
  this.dom.applyStyle(this.draggingColumn, {
2184
2178
  background: "rgba(128,128,128,0.2)",
2185
2179
  display: "block",
@@ -2209,10 +2203,10 @@ class it extends tt {
2209
2203
  * @return {number} The final y-position after rendering all the content.
2210
2204
  */
2211
2205
  renderContentOfDraggingColumnForArea(e, t, s = 0) {
2212
- const o = "center", i = this.tableModel.getAreaModel(t), l = i == null ? void 0 : i.getRowCount();
2213
- if (l) {
2206
+ const o = "center", i = this.tableModel.getAreaModel(t), r = i == null ? void 0 : i.getRowCount();
2207
+ if (r) {
2214
2208
  const n = e.index ?? 0, a = this.draggingColumn;
2215
- for (let c = 0; c < l; c++) {
2209
+ for (let c = 0; c < r; c++) {
2216
2210
  const d = s, h = i.getRowHeight(c), g = { left: 0, width: e.width, height: h, top: d, index: c }, f = i.getValueAt(c, n), b = i.getCellRenderer(c, n), S = b ? "" : `${f}`, p = {
2217
2211
  parent: a,
2218
2212
  geo: g,
@@ -2259,10 +2253,10 @@ class it extends tt {
2259
2253
  * @return {HTMLDivElement} - The rendered draggable target div element.
2260
2254
  */
2261
2255
  renderDragTargetDiv(e, t, s, o, i) {
2262
- const l = this.dom.applyStylePosistionAbsolute(
2256
+ const r = this.dom.applyStylePosistionAbsolute(
2263
2257
  this.dom.createDivWithClass("ge-table-drop-zone", e)
2264
2258
  );
2265
- return this.dom.setStyle(l, "left", `${t}px`), this.dom.setStyle(l, "top", `${s}px`), this.dom.setStyle(l, "width", `${o}px`), this.dom.setStyle(l, "height", `${i}px`), l;
2259
+ return this.dom.setStyle(r, "left", `${t}px`), this.dom.setStyle(r, "top", `${s}px`), this.dom.setStyle(r, "width", `${o}px`), this.dom.setStyle(r, "height", `${i}px`), r;
2266
2260
  }
2267
2261
  /**
2268
2262
  * Render selected background div.
@@ -2281,12 +2275,12 @@ class it extends tt {
2281
2275
  * @param {number} height - The height of the div.
2282
2276
  * @returns {boolean} - Whether the cell is selected.
2283
2277
  */
2284
- renderSelectedBackgroundDiv(e, t, s, o, i, l, n, a, c, d, h) {
2278
+ renderSelectedBackgroundDiv(e, t, s, o, i, r, n, a, c, d, h) {
2285
2279
  let g = !1;
2286
- if (!e && t && o.isSelectable(i, l) && this.getSelectionModel) {
2280
+ if (!e && t && o.isSelectable(i, r) && this.getSelectionModel) {
2287
2281
  const f = this.getSelectionModel();
2288
2282
  if (f) {
2289
- const b = f.getSelectionCount(i, l);
2283
+ const b = f.getSelectionCount(i, r);
2290
2284
  g = b > 0;
2291
2285
  for (let S = 0; S < b; S++) {
2292
2286
  const p = this.dom.applyStylePosistionAbsolute(
@@ -2324,7 +2318,7 @@ class it extends tt {
2324
2318
  sideIdent: s,
2325
2319
  rowIndex: o,
2326
2320
  columnIndex: i,
2327
- left: l,
2321
+ left: r,
2328
2322
  top: n,
2329
2323
  width: a,
2330
2324
  height: c,
@@ -2338,7 +2332,7 @@ class it extends tt {
2338
2332
  sideIdent: s,
2339
2333
  rowIndex: o,
2340
2334
  index: i,
2341
- left: l,
2335
+ left: r,
2342
2336
  width: a,
2343
2337
  height: c,
2344
2338
  top: n,
@@ -2361,17 +2355,17 @@ class it extends tt {
2361
2355
  *
2362
2356
  * @return {void}
2363
2357
  */
2364
- renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: o, cellWidth: i, cellHeight: l, parent: n }) {
2358
+ renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: o, cellWidth: i, cellHeight: r, parent: n }) {
2365
2359
  const a = this.dom.domService, c = this.tableOptions.columnResizeHandleWidthInPx ?? 2, d = a.createElement("div");
2366
- a.setAttribute(d, "data-col-index", `${t}`), a.setAttribute(d, "data-row-index", `${e}`), a.setAttribute(d, "data-area", "header"), a.setAttribute(d, "data-ge-action", "resize-column"), a.addClass(d, "ge-table-column-resize-handle"), a.setStyle(d, "display", "clip"), a.setStyle(d, "position", "absolute"), a.setStyle(d, "cursor", "col-resize"), a.setStyle(d, "left", `${s + i - c}px`), a.setStyle(d, "top", `${o}px`), a.setStyle(d, "width", `${c}px`), a.setStyle(d, "height", `${l}px`), a.appendChild(n, d);
2360
+ a.setAttribute(d, "data-col-index", `${t}`), a.setAttribute(d, "data-row-index", `${e}`), a.setAttribute(d, "data-area", "header"), a.setAttribute(d, "data-ge-action", "resize-column"), a.addClass(d, "ge-table-column-resize-handle"), a.setStyle(d, "display", "clip"), a.setStyle(d, "position", "absolute"), a.setStyle(d, "cursor", "col-resize"), a.setStyle(d, "left", `${s + i - c}px`), a.setStyle(d, "top", `${o}px`), a.setStyle(d, "width", `${c}px`), a.setStyle(d, "height", `${r}px`), a.appendChild(n, d);
2367
2361
  }
2368
2362
  }
2369
- class lt {
2363
+ class rt {
2370
2364
  constructor(e, t) {
2371
2365
  this.columnIndex = e, this.sortState = t;
2372
2366
  }
2373
2367
  }
2374
- class rt {
2368
+ class nt {
2375
2369
  constructor(e) {
2376
2370
  this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
2377
2371
  }
@@ -2387,13 +2381,13 @@ class rt {
2387
2381
  if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
2388
2382
  const t = e.target, s = t.getAttribute("data-area"), o = t.getAttribute("data-row-index"), i = t.getAttribute("data-col-index");
2389
2383
  if (s && o && i) {
2390
- const l = ae(s), n = Number(o), a = Number(i);
2391
- this.tableScope.updateModelValueAfterEdit(l, n, a, t.value);
2384
+ const r = ae(s), n = Number(o), a = Number(i);
2385
+ this.tableScope.updateModelValueAfterEdit(r, n, a, t.value);
2392
2386
  }
2393
2387
  }
2394
2388
  }
2395
2389
  }
2396
- class nt {
2390
+ class at {
2397
2391
  constructor(e = -1, t = -1) {
2398
2392
  this.rowIndex = e, this.columnIndex = t;
2399
2393
  }
@@ -2403,20 +2397,20 @@ class ce {
2403
2397
  this.cells = e;
2404
2398
  }
2405
2399
  static createSingle(e, t) {
2406
- return new ce([new nt(e, t)]);
2400
+ return new ce([new at(e, t)]);
2407
2401
  }
2408
2402
  }
2409
- class at {
2403
+ class dt {
2410
2404
  constructor(e) {
2411
2405
  var t, s;
2412
2406
  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);
2413
2407
  }
2414
2408
  onMouseClicked(e, t) {
2415
- var i, l, n, a, c, d, h;
2409
+ var i, r, n, a, c, d, h;
2416
2410
  let s = !1, o = !1;
2417
2411
  if (this.getSelectionModel && this.getFocusModel) {
2418
2412
  const g = this.getSelectionModel(), f = this.getFocusModel();
2419
- g && f && (f.hasFocus(e.rowIndex, e.columnIndex) || (f.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(f), s = !0), (i = e.originalEvent) != null && i.shiftKey || g.hasSelection() && (g.clear(), s = !0), (l = e.originalEvent) != null && l.shiftKey && this.previousEvt ? (g.addSelection(this.createRangeByEvents(e, this.previousEvt)), o = !0, s = !0) : (n = e.originalEvent) != null && n.altKey && ((a = e.originalEvent) != null && a.ctrlKey || (c = e.originalEvent) != null && c.metaKey) ? (g.removeSelection(A.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (d = e.originalEvent) != null && d.ctrlKey || (h = e.originalEvent) != null && h.metaKey ? (g.addSelection(A.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (g.firstClick(e.rowIndex, e.columnIndex), s = !0), this.tableScope.onSelectionChanged(g));
2413
+ g && f && (f.hasFocus(e.rowIndex, e.columnIndex) || (f.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(f), s = !0), (i = e.originalEvent) != null && i.shiftKey || g.hasSelection() && (g.clear(), s = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (g.addSelection(this.createRangeByEvents(e, this.previousEvt)), o = !0, s = !0) : (n = e.originalEvent) != null && n.altKey && ((a = e.originalEvent) != null && a.ctrlKey || (c = e.originalEvent) != null && c.metaKey) ? (g.removeSelection(A.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (d = e.originalEvent) != null && d.ctrlKey || (h = e.originalEvent) != null && h.metaKey ? (g.addSelection(A.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (g.firstClick(e.rowIndex, e.columnIndex), s = !0), this.tableScope.onSelectionChanged(g));
2420
2414
  }
2421
2415
  return o ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
2422
2416
  }
@@ -2438,16 +2432,16 @@ class at {
2438
2432
  }
2439
2433
  createRangeByEvents(e, t) {
2440
2434
  t || (t = e);
2441
- const s = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex), o = Math.max(e.rowIndex, t == null ? void 0 : t.rowIndex), i = Math.min(e.columnIndex, t == null ? void 0 : t.columnIndex), l = Math.max(e.columnIndex, t == null ? void 0 : t.columnIndex);
2435
+ const s = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex), o = Math.max(e.rowIndex, t == null ? void 0 : t.rowIndex), i = Math.min(e.columnIndex, t == null ? void 0 : t.columnIndex), r = Math.max(e.columnIndex, t == null ? void 0 : t.columnIndex);
2442
2436
  return A.create({
2443
2437
  rowIndex1: s,
2444
2438
  columnIndex1: i,
2445
2439
  rowIndex2: o,
2446
- columnIndex2: l
2440
+ columnIndex2: r
2447
2441
  });
2448
2442
  }
2449
2443
  }
2450
- class dt {
2444
+ class ct {
2451
2445
  get() {
2452
2446
  return {
2453
2447
  f2: "START_EDITING",
@@ -2467,7 +2461,7 @@ class dt {
2467
2461
  };
2468
2462
  }
2469
2463
  }
2470
- class ct {
2464
+ class ht {
2471
2465
  get() {
2472
2466
  return {
2473
2467
  f2: "START_EDITING",
@@ -2489,7 +2483,7 @@ class ct {
2489
2483
  };
2490
2484
  }
2491
2485
  }
2492
- class ht {
2486
+ class gt {
2493
2487
  constructor(e) {
2494
2488
  this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
2495
2489
  }
@@ -2510,7 +2504,7 @@ class ht {
2510
2504
  this.assignPredefinedSystemShortcutMappings(), Object.assign(this.shortcutActionIdMapping, this.tableScope.tableOptions.shortcutActionIdMapping), this.isDebug() && console.debug("ShortcutService", this.shortcutActionIdMapping), this.tableScope.hostElement.addEventListener("keydown", this.onKeyDown.bind(this));
2511
2505
  }
2512
2506
  assignPredefinedSystemShortcutMappings() {
2513
- this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new ct().get()) : Object.assign(this.shortcutActionIdMapping, new dt().get());
2507
+ this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new ht().get()) : Object.assign(this.shortcutActionIdMapping, new ct().get());
2514
2508
  }
2515
2509
  isMacintosh() {
2516
2510
  return navigator.platform.indexOf("Mac") > -1;
@@ -2562,7 +2556,7 @@ class ht {
2562
2556
  return this.shortcutActionIdMapping;
2563
2557
  }
2564
2558
  }
2565
- class be {
2559
+ class fe {
2566
2560
  onCheckboxChanged(e) {
2567
2561
  }
2568
2562
  onContextmenu(e) {
@@ -2582,7 +2576,7 @@ class be {
2582
2576
  onFocusChanged(e) {
2583
2577
  }
2584
2578
  }
2585
- class Me {
2579
+ class Re {
2586
2580
  setStyle(e, t, s) {
2587
2581
  return e.style[t] = s, e;
2588
2582
  }
@@ -2609,8 +2603,8 @@ class Me {
2609
2603
  e.setAttribute(t, s);
2610
2604
  }
2611
2605
  }
2612
- class gt {
2613
- render(e, t, s, o, i, l, n) {
2606
+ class ut {
2607
+ render(e, t, s, o, i, r, n) {
2614
2608
  if (i.isEditable(t, s)) {
2615
2609
  n.addClass(e, "ge-table-row-input-div");
2616
2610
  const a = i.getValueAt(t, s);
@@ -2630,9 +2624,23 @@ class gt {
2630
2624
  }
2631
2625
  }
2632
2626
  }
2633
- class ut {
2627
+ class pt {
2634
2628
  constructor(e = "none", t = "single") {
2635
- this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
2629
+ this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
2630
+ }
2631
+ getEventSelectionChangedListeners() {
2632
+ return this.listenerArr;
2633
+ }
2634
+ addEventSelectionChangedListener(e) {
2635
+ this.listenerArr.includes(e) || this.listenerArr.push(e);
2636
+ }
2637
+ removeEventSelectionChangedListener(e) {
2638
+ const t = this.listenerArr.indexOf(e, 0);
2639
+ t > -1 && this.listenerArr.splice(t, 1);
2640
+ }
2641
+ //@AvoidDoubleExecution(100)
2642
+ fireChangeEvent() {
2643
+ this.silent || this.listenerArr.forEach((e) => e.onSelectionChanged(this));
2636
2644
  }
2637
2645
  firstClick(e, t) {
2638
2646
  this.selectionType === "row" ? this.addRange(A.singleRow(e)) : this.selectionType === "column" && this.addRange(A.singleColumn(t));
@@ -2653,7 +2661,7 @@ class ut {
2653
2661
  return this.ranges;
2654
2662
  }
2655
2663
  clear() {
2656
- this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
2664
+ this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.fireChangeEvent();
2657
2665
  }
2658
2666
  hasSelection() {
2659
2667
  return this.allSelected || !!this.ranges.length;
@@ -2674,19 +2682,19 @@ class ut {
2674
2682
  return Array.from(e);
2675
2683
  }
2676
2684
  selectAll() {
2677
- this.allSelected = !0;
2685
+ this.allSelected = !0, this.fireChangeEvent();
2678
2686
  }
2679
2687
  isAllSelected() {
2680
2688
  return this.allSelected;
2681
2689
  }
2682
2690
  addSelection(e) {
2683
- this.addRange(e);
2691
+ this.addRange(e), this.fireChangeEvent();
2684
2692
  }
2685
2693
  removeSelection(e) {
2686
2694
  if (this.selectionType === "none")
2687
2695
  return;
2688
2696
  let t = e;
2689
- this.selectionType === "row" ? t = A.singleRow(e.r1) : this.selectionType === "column" && (t = A.singleColumn(e.c1)), this.negativeRanges.push(t);
2697
+ this.selectionType === "row" ? t = A.singleRow(e.r1) : this.selectionType === "column" && (t = A.singleColumn(e.c1)), this.negativeRanges.push(t), this.fireChangeEvent();
2690
2698
  }
2691
2699
  togglePoint(e, t) {
2692
2700
  this.getSelectionCount(e, t) > 0 ? this.removeSelection(A.singleCell(e, t)) : this.addSelection(A.singleCell(e, t));
@@ -2695,12 +2703,26 @@ class ut {
2695
2703
  return this.getSelectionCount(e, t) > 0;
2696
2704
  }
2697
2705
  addRange(e) {
2698
- this.selectionType !== "none" && (this.allSelected = !1, this.selectionMode === "single" && (this.ranges = []), this.selectionType === "row" ? (e.c1 = 0, e.c2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "column" ? (e.r1 = 0, e.r2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "cell" ? (e.r2 = e.r1, e.c2 = e.c1) : this.selectionType, this.ranges.push(e));
2706
+ 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());
2699
2707
  }
2700
2708
  }
2701
- class pt {
2709
+ class bt {
2702
2710
  constructor(e = "none") {
2703
- this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
2711
+ this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
2712
+ }
2713
+ getEventFocusChangedListeners() {
2714
+ return this.listenerArr;
2715
+ }
2716
+ addEventFocusChangedListener(e) {
2717
+ this.listenerArr.includes(e) || this.listenerArr.push(e);
2718
+ }
2719
+ removeEventFocusChangedListener(e) {
2720
+ const t = this.listenerArr.indexOf(e, 0);
2721
+ t > -1 && this.listenerArr.splice(t, 1);
2722
+ }
2723
+ //@AvoidDoubleExecution(100)
2724
+ fireChangeEvent() {
2725
+ this.listenerArr.forEach((e) => e.onFocusChanged(this));
2704
2726
  }
2705
2727
  clearChanged() {
2706
2728
  this.changed = !1;
@@ -2709,10 +2731,10 @@ class pt {
2709
2731
  return this.changed;
2710
2732
  }
2711
2733
  clear() {
2712
- this.rowIndex = -1, this.columnIndex = -1;
2734
+ this.rowIndex = -1, this.columnIndex = -1, this.fireChangeEvent();
2713
2735
  }
2714
2736
  setFocus(e, t) {
2715
- (this.rowIndex !== e || this.columnIndex !== t) && (this.rowIndex = e, this.columnIndex = t, this.changed = !0);
2737
+ (this.rowIndex !== e || this.columnIndex !== t) && (this.rowIndex = e, this.columnIndex = t, this.changed = !0, this.fireChangeEvent());
2716
2738
  }
2717
2739
  hasFocus(e, t) {
2718
2740
  return this.rowIndex === e && this.columnIndex === t;
@@ -2721,12 +2743,12 @@ class pt {
2721
2743
  return [this.rowIndex, this.columnIndex];
2722
2744
  }
2723
2745
  }
2724
- class Re {
2725
- constructor(e = new I(
2746
+ class Te {
2747
+ constructor(e = new F(
2726
2748
  "❯",
2727
2749
  "",
2728
2750
  ["gt-table-icon-expanded"]
2729
- ), t = new I(
2751
+ ), t = new F(
2730
2752
  "❯",
2731
2753
  "transform: rotate(180deg) translate(-100%, -100%); transform-origin: 0 0;",
2732
2754
  ["ge-table-icon-collapsed"]
@@ -2735,14 +2757,14 @@ class Re {
2735
2757
  }
2736
2758
  // `⊖ `, `⊕ `;
2737
2759
  }
2738
- const bt = new ut(), ft = new pt("cell");
2739
- class Te {
2760
+ const ft = new pt(), St = new bt("cell");
2761
+ class De {
2740
2762
  constructor() {
2741
2763
  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 = {
2742
2764
  header: 34,
2743
2765
  body: 34,
2744
2766
  footer: 34
2745
- }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Ee(), this.headerGroupOptions = new Re(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Ae(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new gt(), this.getSelectionModel = () => bt, this.getFocusModel = () => ft;
2767
+ }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Ae(), this.headerGroupOptions = new Te(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Me(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new ut(), this.getSelectionModel = () => ft, this.getFocusModel = () => St;
2746
2768
  }
2747
2769
  }
2748
2770
  const P = class P {
@@ -2758,13 +2780,13 @@ const P = class P {
2758
2780
  createContent(e, t, s) {
2759
2781
  return new Promise((o, i) => {
2760
2782
  if (t != null && t.hasSelection()) {
2761
- const l = this.mergeRanges(t.getRanges());
2762
- if (l) {
2763
- l.c2 = Math.min(l.c2, e.getColumnCount() - 1), l.r2 = Math.min(l.r2, e.getBodyModel().getRowCount() - 1);
2783
+ const r = this.mergeRanges(t.getRanges());
2784
+ if (r) {
2785
+ r.c2 = Math.min(r.c2, e.getColumnCount() - 1), r.r2 = Math.min(r.r2, e.getBodyModel().getRowCount() - 1);
2764
2786
  const n = [];
2765
- for (let a = l.r1; a <= l.r2; a++) {
2787
+ for (let a = r.r1; a <= r.r2; a++) {
2766
2788
  const c = [];
2767
- for (let d = l.c1; d <= l.c2; d++) {
2789
+ for (let d = r.c1; d <= r.c2; d++) {
2768
2790
  const h = t.isSelected(a, d) ? e.getBodyModel().getTextValueAt(a, d) : "";
2769
2791
  c.push(h);
2770
2792
  }
@@ -2774,7 +2796,7 @@ const P = class P {
2774
2796
  }
2775
2797
  }
2776
2798
  if (s) {
2777
- const [l, n] = s.getFocus(), a = e.getBodyModel().getTextValueAt(l, n);
2799
+ const [r, n] = s.getFocus(), a = e.getBodyModel().getTextValueAt(r, n);
2778
2800
  return o(a);
2779
2801
  }
2780
2802
  i("Cannot copy, neither selection nor focus defined.");
@@ -2803,13 +2825,13 @@ const P = class P {
2803
2825
  e,
2804
2826
  t,
2805
2827
  s
2806
- ).then((l) => {
2807
- l && this.copyContent(l).then((n) => {
2808
- o(l);
2828
+ ).then((r) => {
2829
+ r && this.copyContent(r).then((n) => {
2830
+ o(r);
2809
2831
  }).catch((n) => {
2810
2832
  i();
2811
2833
  });
2812
- }).catch((l) => {
2834
+ }).catch((r) => {
2813
2835
  i();
2814
2836
  });
2815
2837
  });
@@ -2830,19 +2852,18 @@ const P = class P {
2830
2852
  P.columnSeparatorChar = " ", P.rowSeparatorChar = `
2831
2853
  `;
2832
2854
  let K = P;
2833
- class he extends it {
2834
- constructor(e, t, s, o, i, l = new K()) {
2835
- var n;
2836
- if (super(
2837
- e,
2838
- t,
2839
- new Ke(s),
2840
- o
2841
- ), this.eventListener = i, this.copyService = l, this.licenseManager = $.getInstance(), this.selectionService = new at(this), this.api = new qe(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, i || (this.eventListener = new be()), (n = this.tableOptions) != null && n.autoRestoreOptions) {
2842
- const a = this.tableOptions.autoRestoreOptions, c = a.getStorageKeyFn;
2843
- c && (a.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Je(c)), a.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new Ze(c)), a.autoRestoreSortingState && (this.storeSortingService = new et(c)));
2855
+ class he extends lt {
2856
+ constructor(e, t, s, o, i, r = new K()) {
2857
+ var c;
2858
+ if (super(e, t, new Ye(s), o), this.eventListener = i, this.copyService = r, this.licenseManager = $.getInstance(), this.selectionService = new dt(this), this.api = new Je(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, i || (this.eventListener = new fe()), (c = this.tableOptions) != null && c.autoRestoreOptions) {
2859
+ const d = this.tableOptions.autoRestoreOptions, h = d.getStorageKeyFn;
2860
+ h && (d.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Qe(h)), d.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new et(h)), d.autoRestoreSortingState && (this.storeSortingService = new tt(h)));
2844
2861
  }
2845
- this.mouseHandler = new Ue(this), this.inputHandler = new rt(this), this.shortcutService = new ht(this), this.shortcutService.addListener(this.selectionService);
2862
+ this.mouseHandler = new qe(this), this.inputHandler = new nt(this), this.shortcutService = new gt(this), this.shortcutService.addListener(this.selectionService);
2863
+ const n = this.getSelectionModel ? this.getSelectionModel() : void 0;
2864
+ n && n.addEventSelectionChangedListener(this);
2865
+ const a = this.getFocusModel ? this.getFocusModel() : void 0;
2866
+ a && a.addEventFocusChangedListener(this);
2846
2867
  }
2847
2868
  /**
2848
2869
  * Creates a TableScope instance.
@@ -2856,15 +2877,8 @@ class he extends it {
2856
2877
  *
2857
2878
  * @return {TableScope} - The newly created TableScope instance.
2858
2879
  */
2859
- static create(e, t, s = new Te(), o = new be(), i = new Me(), l = new K()) {
2860
- return new he(
2861
- e,
2862
- t,
2863
- i,
2864
- s,
2865
- o,
2866
- l
2867
- );
2880
+ static create(e, t, s = new De(), o = new fe(), i = new Re(), r = new K()) {
2881
+ return new he(e, t, i, s, o, r);
2868
2882
  }
2869
2883
  /**
2870
2884
  * Triggers an action based on the provided actionId.
@@ -3004,8 +3018,8 @@ class he extends it {
3004
3018
  */
3005
3019
  toggleRowCheckbox(e, t, s) {
3006
3020
  var a;
3007
- const o = this.tableModel.getAreaModel(s), i = o.isRowChecked(e), l = i === void 0 || i === "semi" || i === "none";
3008
- o.setRowChecked(e, l), this.repaint();
3021
+ const o = this.tableModel.getAreaModel(s), i = o.isRowChecked(e), r = i === void 0 || i === "semi" || i === "none";
3022
+ o.setRowChecked(e, r), this.repaint();
3009
3023
  const n = (a = o.rowSelectionModel) == null ? void 0 : a.getCheckedRows();
3010
3024
  this.eventListener.onCheckboxChanged(n || []);
3011
3025
  }
@@ -3057,12 +3071,12 @@ class he extends it {
3057
3071
  * @return {void}
3058
3072
  */
3059
3073
  onHeaderDblClicked(e, t, s) {
3060
- var i, l;
3074
+ var i, r;
3061
3075
  const o = this.tableModel.getColumnDef(s);
3062
3076
  if (o != null && o.sortable && o.sortable()) {
3063
3077
  e.preventDefault(), e.stopPropagation();
3064
- const n = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, a = o.sortState ?? "", c = n[(n.indexOf(a) + 1) % n.length], d = new lt(s, c);
3065
- this.tableModel.doSort([d]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((g) => g.sortState = ""), o.sortState = c), this.repaint(), (l = this.storeSortingService) == null || l.setSortItems([d]);
3078
+ const n = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, a = o.sortState ?? "", c = n[(n.indexOf(a) + 1) % n.length], d = new rt(s, c);
3079
+ this.tableModel.doSort([d]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((g) => g.sortState = ""), o.sortState = c), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([d]);
3066
3080
  }
3067
3081
  }
3068
3082
  /**
@@ -3206,11 +3220,11 @@ class he extends it {
3206
3220
  if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
3207
3221
  const s = this.tableOptions.autoRestoreOptions, o = s.getRowId;
3208
3222
  if (s.autoRestoreCollapsedExpandedState && o) {
3209
- const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), l = this.tableModel.getAreaModel("body");
3210
- if (le(l)) {
3211
- const n = l, a = l.getRowCount();
3223
+ const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
3224
+ if (le(r)) {
3225
+ const n = r, a = r.getRowCount();
3212
3226
  for (let c = 0; c < a; c++) {
3213
- const d = l.getRowByIndex(c);
3227
+ const d = r.getRowByIndex(c);
3214
3228
  if (d)
3215
3229
  if (i.allExpanded)
3216
3230
  d.expanded = !0;
@@ -3463,30 +3477,30 @@ Y.themes = ["light", "combat", "paper", "blackboard"], Y.vars = {
3463
3477
  --ge-table-drop-zone-bg: #758129;
3464
3478
  }`
3465
3479
  };
3466
- let fe = Y;
3480
+ let Se = Y;
3467
3481
  const U = class U {
3468
- constructor(e = new Re()) {
3482
+ constructor(e = new Te()) {
3469
3483
  this.headerGroupOptions = e;
3470
3484
  }
3471
- render(e, t, s, o, i, l, n) {
3472
- const a = l != null && l.data ? l.data : "";
3473
- if (l) {
3474
- const { toggle: c, visibility: d, closed: h } = l, g = c ? U.toggleHeaderGroup : "";
3485
+ render(e, t, s, o, i, r, n) {
3486
+ const a = r != null && r.data ? r.data : "";
3487
+ if (r) {
3488
+ const { toggle: c, visibility: d, closed: h } = r, g = c ? U.toggleHeaderGroup : "";
3475
3489
  this.addText(e, o, t, s, a, g), c && d !== "always" && this.addArrowDiv(n, e, !h, t, s, o, g);
3476
3490
  } else
3477
3491
  this.addText(e, o, t, s, a, "");
3478
3492
  }
3479
- addText(e, t, s, o, i, l) {
3493
+ addText(e, t, s, o, i, r) {
3480
3494
  e.innerHTML = `<span
3481
- data-ge-action="${l}"
3495
+ data-ge-action="${r}"
3482
3496
  data-area="${t}"
3483
3497
  data-row-index="${s}"
3484
3498
  data-col-index="${o}"
3485
3499
  >${i}</span>`;
3486
3500
  }
3487
- addArrowDiv(e, t, s = !0, o = -1, i = -1, l = "header", n) {
3501
+ addArrowDiv(e, t, s = !0, o = -1, i = -1, r = "header", n) {
3488
3502
  const a = e.createElement("div");
3489
- e.addClass(a, "ge-table-toggle-icon-div"), e.setStyle(a, "display", "inline-block"), e.setStyle(a, "position", ""), e.setStyle(a, "width", "20px"), e.setStyle(a, "background", "transparent"), e.setStyle(a, "cursor", "pointer"), e.setAttribute(a, "data-row-index", `${o}`), e.setAttribute(a, "data-col-index", `${i}`), e.setAttribute(a, "data-area", `${l}`), e.setAttribute(a, "data-ge-action", `${n}`);
3503
+ e.addClass(a, "ge-table-toggle-icon-div"), e.setStyle(a, "display", "inline-block"), e.setStyle(a, "position", ""), e.setStyle(a, "width", "20px"), e.setStyle(a, "background", "transparent"), e.setStyle(a, "cursor", "pointer"), e.setAttribute(a, "data-row-index", `${o}`), e.setAttribute(a, "data-col-index", `${i}`), e.setAttribute(a, "data-area", `${r}`), e.setAttribute(a, "data-ge-action", `${n}`);
3490
3504
  let c;
3491
3505
  s ? c = this.headerGroupOptions.iconExpanded : c = this.headerGroupOptions.iconCollapsed;
3492
3506
  const d = c.content, h = e.createText(d);
@@ -3498,85 +3512,86 @@ const U = class U {
3498
3512
  applyStyleString(e, t, s) {
3499
3513
  const o = s.split(";").map((i) => i.trim()).filter((i) => i);
3500
3514
  for (const i of o) {
3501
- const [l, n] = i.split(":");
3502
- e.setStyle(t, l.trim(), n.trim());
3515
+ const [r, n] = i.split(":");
3516
+ e.setStyle(t, r.trim(), n.trim());
3503
3517
  }
3504
3518
  }
3505
3519
  };
3506
3520
  U.toggleHeaderGroup = "toggleHeaderGroup";
3507
- let Se = U;
3508
- const St = /* @__PURE__ */ ze("<div>"), vt = (r) => {
3521
+ let me = U;
3522
+ var mt = /* @__PURE__ */ je("<div>");
3523
+ const wt = (l) => {
3509
3524
  let e;
3510
- const t = xe({
3525
+ const t = Ee({
3511
3526
  tableModel: null,
3512
- tableOptions: new Te()
3513
- }, r);
3514
- return Fe(() => {
3527
+ tableOptions: new De()
3528
+ }, l);
3529
+ return Le(() => {
3515
3530
  const s = {
3516
- onSelectionChanged(l) {
3531
+ onSelectionChanged(r) {
3517
3532
  const n = new CustomEvent("selectionChanged", {
3518
- detail: l,
3533
+ detail: r,
3519
3534
  bubbles: !0
3520
3535
  });
3521
3536
  e && e.dispatchEvent(n);
3522
3537
  },
3523
- onFocusChanged(l) {
3538
+ onFocusChanged(r) {
3524
3539
  const n = new CustomEvent("focusChanged", {
3525
- detail: l,
3540
+ detail: r,
3526
3541
  bubbles: !0
3527
3542
  });
3528
3543
  e && e.dispatchEvent(n);
3529
3544
  },
3530
- onCheckboxChanged: (l) => {
3545
+ onCheckboxChanged: (r) => {
3531
3546
  const n = new CustomEvent("checkboxChanged", {
3532
- detail: l,
3547
+ detail: r,
3533
3548
  bubbles: !0
3534
3549
  });
3535
3550
  e && e.dispatchEvent(n);
3536
3551
  },
3537
- onContextmenu: (l) => {
3552
+ onContextmenu: (r) => {
3538
3553
  const n = new CustomEvent("contextmenu", {
3539
- detail: l,
3554
+ detail: r,
3540
3555
  bubbles: !0
3541
3556
  });
3542
3557
  e && e.dispatchEvent(n);
3543
3558
  },
3544
- onModelChanged: (l) => {
3559
+ onModelChanged: (r) => {
3545
3560
  const n = new CustomEvent("modelChanged", {
3546
- detail: l,
3561
+ detail: r,
3547
3562
  bubbles: !0
3548
3563
  });
3549
3564
  e && e.dispatchEvent(n);
3550
3565
  },
3551
- onMouseClicked: (l) => {
3566
+ onMouseClicked: (r) => {
3552
3567
  const n = new CustomEvent("mouseClicked", {
3553
- detail: l,
3568
+ detail: r,
3554
3569
  bubbles: !0
3555
3570
  });
3556
3571
  e && e.dispatchEvent(n);
3557
3572
  },
3558
- onMouseDragging: (l) => {
3573
+ onMouseDragging: (r) => {
3559
3574
  const n = new CustomEvent("mouseDragging", {
3560
- detail: l,
3575
+ detail: r,
3561
3576
  bubbles: !0
3562
3577
  });
3563
3578
  e && e.dispatchEvent(n);
3564
3579
  },
3565
- onMouseDraggingEnd: (l) => {
3580
+ onMouseDraggingEnd: (r) => {
3566
3581
  const n = new CustomEvent("mouseDraggingEnd", {
3567
- detail: l,
3582
+ detail: r,
3568
3583
  bubbles: !0
3569
3584
  });
3570
3585
  e && e.dispatchEvent(n);
3571
3586
  },
3572
- onMouseMoved: (l) => {
3587
+ onMouseMoved: (r) => {
3573
3588
  const n = new CustomEvent("mouseMoved", {
3574
- detail: l,
3589
+ detail: r,
3575
3590
  bubbles: !0
3576
3591
  });
3577
3592
  e && e.dispatchEvent(n);
3578
3593
  }
3579
- }, o = new he(e, t.tableModel, new Me(), t.tableOptions, s);
3594
+ }, o = new he(e, t.tableModel, new Re(), t.tableOptions, s);
3580
3595
  o.firstInit();
3581
3596
  const i = new CustomEvent("tableReady", {
3582
3597
  detail: o.getApi(),
@@ -3584,12 +3599,12 @@ const St = /* @__PURE__ */ ze("<div>"), vt = (r) => {
3584
3599
  });
3585
3600
  e && e.dispatchEvent(i), t.licenseKey && $.getInstance().setLicenseKey(t.licenseKey);
3586
3601
  }), (() => {
3587
- const s = St(), o = e;
3588
- return typeof o == "function" ? je(o, s) : e = s, s;
3602
+ var s = mt(), o = e;
3603
+ return typeof o == "function" ? Xe(o, s) : e = s, s;
3589
3604
  })();
3590
3605
  };
3591
3606
  export {
3592
- mt as ComponentRendererWrapper,
3593
- vt as GuiexpertTable,
3594
- yt as GuiexpertTableProps
3607
+ yt as ComponentRendererWrapper,
3608
+ wt as GuiexpertTable,
3609
+ vt as GuiexpertTableProps
3595
3610
  };