@guiexpert/svelte-table 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.cjs +242 -8
  2. package/index.js +1815 -874
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1,155 +1,155 @@
1
- var pe = Object.defineProperty;
2
- var ue = (l, e, t) => e in l ? pe(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
3
- var k = (l, e, t) => (ue(l, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { createEventDispatcher as Se, onMount as ge } from "svelte";
5
- function L() {
1
+ var me = Object.defineProperty;
2
+ var ye = (a, e, t) => e in a ? me(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
+ var N = (a, e, t) => (ye(a, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { createEventDispatcher as ve, onMount as we } from "svelte";
5
+ function $() {
6
6
  }
7
- function oe(l) {
8
- return l();
7
+ function de(a) {
8
+ return a();
9
9
  }
10
- function te() {
10
+ function ie() {
11
11
  return /* @__PURE__ */ Object.create(null);
12
12
  }
13
- function H(l) {
14
- l.forEach(oe);
13
+ function V(a) {
14
+ a.forEach(de);
15
15
  }
16
- function le(l) {
17
- return typeof l == "function";
16
+ function ce(a) {
17
+ return typeof a == "function";
18
18
  }
19
- function fe(l, e) {
20
- return l != l ? e == e : l !== e || l && typeof l == "object" || typeof l == "function";
19
+ function xe(a, e) {
20
+ return a != a ? e == e : a !== e || a && typeof a == "object" || typeof a == "function";
21
21
  }
22
- function me(l) {
23
- return Object.keys(l).length === 0;
22
+ function Ce(a) {
23
+ return Object.keys(a).length === 0;
24
24
  }
25
- function be(l, e, t) {
26
- l.insertBefore(e, t || null);
25
+ function Ee(a, e, t) {
26
+ a.insertBefore(e, t || null);
27
27
  }
28
- function re(l) {
29
- l.parentNode && l.parentNode.removeChild(l);
28
+ function he(a) {
29
+ a.parentNode && a.parentNode.removeChild(a);
30
30
  }
31
- function ye(l) {
32
- return document.createElement(l);
31
+ function Ae(a) {
32
+ return document.createElement(a);
33
33
  }
34
- function ve(l, e, t) {
35
- t == null ? l.removeAttribute(e) : l.getAttribute(e) !== t && l.setAttribute(e, t);
34
+ function Me(a, e, t) {
35
+ t == null ? a.removeAttribute(e) : a.getAttribute(e) !== t && a.setAttribute(e, t);
36
36
  }
37
- function xe(l) {
38
- return Array.from(l.childNodes);
37
+ function Re(a) {
38
+ return Array.from(a.childNodes);
39
39
  }
40
- function _(l, e, t, s) {
41
- t == null ? l.style.removeProperty(e) : l.style.setProperty(e, t, s ? "important" : "");
40
+ function _(a, e, t, o) {
41
+ t == null ? a.style.removeProperty(e) : a.style.setProperty(e, t, o ? "important" : "");
42
42
  }
43
- let z;
44
- function B(l) {
45
- z = l;
43
+ let J;
44
+ function B(a) {
45
+ J = a;
46
46
  }
47
- const O = [], G = [];
48
- let $ = [];
49
- const se = [], Ce = /* @__PURE__ */ Promise.resolve();
50
- let N = !1;
51
- function we() {
52
- N || (N = !0, Ce.then(ne));
47
+ const O = [], X = [];
48
+ let L = [];
49
+ const re = [], Te = /* @__PURE__ */ Promise.resolve();
50
+ let K = !1;
51
+ function De() {
52
+ K || (K = !0, Te.then(ge));
53
53
  }
54
- function j(l) {
55
- $.push(l);
54
+ function Y(a) {
55
+ L.push(a);
56
56
  }
57
- const V = /* @__PURE__ */ new Set();
58
- let F = 0;
59
- function ne() {
60
- if (F !== 0)
57
+ const j = /* @__PURE__ */ new Set();
58
+ let I = 0;
59
+ function ge() {
60
+ if (I !== 0)
61
61
  return;
62
- const l = z;
62
+ const a = J;
63
63
  do {
64
64
  try {
65
- for (; F < O.length; ) {
66
- const e = O[F];
67
- F++, B(e), Ee(e.$$);
65
+ for (; I < O.length; ) {
66
+ const e = O[I];
67
+ I++, B(e), ke(e.$$);
68
68
  }
69
69
  } catch (e) {
70
- throw O.length = 0, F = 0, e;
70
+ throw O.length = 0, I = 0, e;
71
71
  }
72
- for (B(null), O.length = 0, F = 0; G.length; )
73
- G.pop()();
74
- for (let e = 0; e < $.length; e += 1) {
75
- const t = $[e];
76
- V.has(t) || (V.add(t), t());
72
+ for (B(null), O.length = 0, I = 0; X.length; )
73
+ X.pop()();
74
+ for (let e = 0; e < L.length; e += 1) {
75
+ const t = L[e];
76
+ j.has(t) || (j.add(t), t());
77
77
  }
78
- $.length = 0;
78
+ L.length = 0;
79
79
  } while (O.length);
80
- for (; se.length; )
81
- se.pop()();
82
- N = !1, V.clear(), B(l);
80
+ for (; re.length; )
81
+ re.pop()();
82
+ K = !1, j.clear(), B(a);
83
83
  }
84
- function Ee(l) {
85
- if (l.fragment !== null) {
86
- l.update(), H(l.before_update);
87
- const e = l.dirty;
88
- l.dirty = [-1], l.fragment && l.fragment.p(l.ctx, e), l.after_update.forEach(j);
84
+ function ke(a) {
85
+ if (a.fragment !== null) {
86
+ a.update(), V(a.before_update);
87
+ const e = a.dirty;
88
+ a.dirty = [-1], a.fragment && a.fragment.p(a.ctx, e), a.after_update.forEach(Y);
89
89
  }
90
90
  }
91
- function Ae(l) {
91
+ function Ie(a) {
92
92
  const e = [], t = [];
93
- $.forEach((s) => l.indexOf(s) === -1 ? e.push(s) : t.push(s)), t.forEach((s) => s()), $ = e;
94
- }
95
- const Me = /* @__PURE__ */ new Set();
96
- function Re(l, e) {
97
- l && l.i && (Me.delete(l), l.i(e));
98
- }
99
- function Te(l, e, t) {
100
- const { fragment: s, after_update: i } = l.$$;
101
- s && s.m(e, t), j(() => {
102
- const o = l.$$.on_mount.map(oe).filter(le);
103
- l.$$.on_destroy ? l.$$.on_destroy.push(...o) : H(o), l.$$.on_mount = [];
104
- }), i.forEach(j);
105
- }
106
- function De(l, e) {
107
- const t = l.$$;
108
- t.fragment !== null && (Ae(t.after_update), H(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
109
- }
110
- function Ie(l, e) {
111
- l.$$.dirty[0] === -1 && (O.push(l), we(), l.$$.dirty.fill(0)), l.$$.dirty[e / 31 | 0] |= 1 << e % 31;
112
- }
113
- function Fe(l, e, t, s, i, o, r = null, a = [-1]) {
114
- const n = z;
115
- B(l);
116
- const d = l.$$ = {
93
+ L.forEach((o) => a.indexOf(o) === -1 ? e.push(o) : t.push(o)), t.forEach((o) => o()), L = e;
94
+ }
95
+ const Oe = /* @__PURE__ */ new Set();
96
+ function Fe(a, e) {
97
+ a && a.i && (Oe.delete(a), a.i(e));
98
+ }
99
+ function $e(a, e, t) {
100
+ const { fragment: o, after_update: s } = a.$$;
101
+ o && o.m(e, t), Y(() => {
102
+ const i = a.$$.on_mount.map(de).filter(ce);
103
+ a.$$.on_destroy ? a.$$.on_destroy.push(...i) : V(i), a.$$.on_mount = [];
104
+ }), s.forEach(Y);
105
+ }
106
+ function Le(a, e) {
107
+ const t = a.$$;
108
+ t.fragment !== null && (Ie(t.after_update), V(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
109
+ }
110
+ function _e(a, e) {
111
+ a.$$.dirty[0] === -1 && (O.push(a), De(), a.$$.dirty.fill(0)), a.$$.dirty[e / 31 | 0] |= 1 << e % 31;
112
+ }
113
+ function Be(a, e, t, o, s, i, r = null, n = [-1]) {
114
+ const l = J;
115
+ B(a);
116
+ const d = a.$$ = {
117
117
  fragment: null,
118
118
  ctx: [],
119
119
  // state
120
- props: o,
121
- update: L,
122
- not_equal: i,
123
- bound: te(),
120
+ props: i,
121
+ update: $,
122
+ not_equal: s,
123
+ bound: ie(),
124
124
  // lifecycle
125
125
  on_mount: [],
126
126
  on_destroy: [],
127
127
  on_disconnect: [],
128
128
  before_update: [],
129
129
  after_update: [],
130
- context: new Map(e.context || (n ? n.$$.context : [])),
130
+ context: new Map(e.context || (l ? l.$$.context : [])),
131
131
  // everything else
132
- callbacks: te(),
133
- dirty: a,
132
+ callbacks: ie(),
133
+ dirty: n,
134
134
  skip_bound: !1,
135
- root: e.target || n.$$.root
135
+ root: e.target || l.$$.root
136
136
  };
137
137
  r && r(d.root);
138
- let h = !1;
139
- if (d.ctx = t ? t(l, e.props || {}, (c, S, ...f) => {
140
- const p = f.length ? f[0] : S;
141
- return d.ctx && i(d.ctx[c], d.ctx[c] = p) && (!d.skip_bound && d.bound[c] && d.bound[c](p), h && Ie(l, c)), S;
142
- }) : [], d.update(), h = !0, H(d.before_update), d.fragment = s ? s(d.ctx) : !1, e.target) {
138
+ let c = !1;
139
+ if (d.ctx = t ? t(a, e.props || {}, (h, g, ...f) => {
140
+ const u = f.length ? f[0] : g;
141
+ return d.ctx && s(d.ctx[h], d.ctx[h] = u) && (!d.skip_bound && d.bound[h] && d.bound[h](u), c && _e(a, h)), g;
142
+ }) : [], d.update(), c = !0, V(d.before_update), d.fragment = o ? o(d.ctx) : !1, e.target) {
143
143
  if (e.hydrate) {
144
- const c = xe(e.target);
145
- d.fragment && d.fragment.l(c), c.forEach(re);
144
+ const h = Re(e.target);
145
+ d.fragment && d.fragment.l(h), h.forEach(he);
146
146
  } else
147
147
  d.fragment && d.fragment.c();
148
- e.intro && Re(l.$$.fragment), Te(l, e.target, e.anchor), ne();
148
+ e.intro && Fe(a.$$.fragment), $e(a, e.target, e.anchor), ge();
149
149
  }
150
- B(n);
150
+ B(l);
151
151
  }
152
- class Oe {
152
+ class Pe {
153
153
  constructor() {
154
154
  /**
155
155
  * ### PRIVATE API
@@ -158,7 +158,7 @@ class Oe {
158
158
  *
159
159
  * @type {any}
160
160
  */
161
- k(this, "$$");
161
+ N(this, "$$");
162
162
  /**
163
163
  * ### PRIVATE API
164
164
  *
@@ -166,11 +166,11 @@ class Oe {
166
166
  *
167
167
  * @type {any}
168
168
  */
169
- k(this, "$$set");
169
+ N(this, "$$set");
170
170
  }
171
171
  /** @returns {void} */
172
172
  $destroy() {
173
- De(this, 1), this.$destroy = L;
173
+ Le(this, 1), this.$destroy = $;
174
174
  }
175
175
  /**
176
176
  * @template {Extract<keyof Events, string>} K
@@ -179,12 +179,12 @@ class Oe {
179
179
  * @returns {() => void}
180
180
  */
181
181
  $on(e, t) {
182
- if (!le(t))
183
- return L;
184
- const s = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
185
- return s.push(t), () => {
186
- const i = s.indexOf(t);
187
- i !== -1 && s.splice(i, 1);
182
+ if (!ce(t))
183
+ return $;
184
+ const o = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
185
+ return o.push(t), () => {
186
+ const s = o.indexOf(t);
187
+ s !== -1 && o.splice(s, 1);
188
188
  };
189
189
  }
190
190
  /**
@@ -192,19 +192,19 @@ class Oe {
192
192
  * @returns {void}
193
193
  */
194
194
  $set(e) {
195
- this.$$set && !me(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
195
+ this.$$set && !Ce(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
196
196
  }
197
197
  }
198
- const Le = "4";
199
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Le);
200
- class D {
198
+ const He = "4";
199
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(He);
200
+ class k {
201
201
  // The constructor is private to prevent direct construction calls
202
202
  // with the `new` operator
203
203
  constructor() {
204
204
  this.alreadySet = !1;
205
205
  }
206
206
  static getInstance() {
207
- return D.instance || (D.instance = new D()), D.instance;
207
+ return k.instance || (k.instance = new k()), k.instance;
208
208
  }
209
209
  /**
210
210
  * Method to set the license key for the application.
@@ -222,18 +222,18 @@ class D {
222
222
  }
223
223
  }
224
224
  }
225
- function K(l) {
226
- return l && l.type === "TreeRow";
225
+ function q(a) {
226
+ return a && a.type === "TreeRow";
227
227
  }
228
- function X(l) {
229
- return l && l.type === "AreaModelTree";
228
+ function U(a) {
229
+ return a && a.type === "AreaModelTree";
230
230
  }
231
- class Y {
232
- constructor(e = -1, t = -1, s = -1, i = -1, o, r, a, n = 0, d = 0, h = 0, c = "") {
233
- this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = i, this.areaIdent = o, this.sideIdent = r, this.originalEvent = a, this.clickCount = n, this.draggingX = d, this.draggingY = h, this.action = c;
231
+ class Q {
232
+ constructor(e = -1, t = -1, o = -1, s = -1, i, r, n, l = 0, d = 0, c = 0, h = "") {
233
+ this.rowIndex = e, this.rowTop = t, this.columnIndex = o, this.columnLeft = s, this.areaIdent = i, this.sideIdent = r, this.originalEvent = n, this.clickCount = l, this.draggingX = d, this.draggingY = c, this.action = h;
234
234
  }
235
235
  clone() {
236
- return new Y(
236
+ return new Q(
237
237
  this.rowIndex,
238
238
  this.rowTop,
239
239
  this.columnIndex,
@@ -248,47 +248,47 @@ class Y {
248
248
  );
249
249
  }
250
250
  }
251
- class I {
252
- constructor(e = ">", t = "", s = []) {
253
- this.content = e, this.style = t, this.classes = s;
251
+ class D {
252
+ constructor(e = ">", t = "", o = []) {
253
+ this.content = e, this.style = t, this.classes = o;
254
254
  }
255
255
  }
256
- class ae {
257
- constructor(e = new I(
256
+ class pe {
257
+ constructor(e = new D(
258
258
  ">",
259
259
  "transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
260
260
  ["gt-table-tree-arrow-expanded"]
261
- ), t = new I(
261
+ ), t = new D(
262
262
  ">",
263
263
  "",
264
264
  ["ge-table-tree-arrow-collapsed"]
265
- ), s = new I(
265
+ ), o = new D(
266
266
  ">",
267
267
  "color:transparent;",
268
268
  ["gt-table-tree-arrow-hidden"]
269
- ), i = new I(
269
+ ), s = new D(
270
270
  "↕",
271
271
  "",
272
272
  ["gt-table-tree-arrow-expanded-all"]
273
273
  )) {
274
- this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = i;
274
+ this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = o, this.arrowExpandCollapseAll = s;
275
275
  }
276
276
  }
277
- class de {
278
- constructor(e = new I("↑", "", ["ge-header-sorted-asc"]), t = new I("↓", "", ["ge-header-sorted-desc"]), s = new I("↑", "color:transparent;", [])) {
279
- this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
277
+ class be {
278
+ constructor(e = new D("↑", "", ["ge-header-sorted-asc"]), t = new D("↓", "", ["ge-header-sorted-desc"]), o = new D("↑", "color:transparent;", [])) {
279
+ this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = o;
280
280
  }
281
281
  }
282
- class $e {
282
+ class We {
283
283
  constructor(e) {
284
284
  this.domService = e;
285
285
  }
286
- setStyle(e, t, s) {
287
- return this.domService.setStyle(e, t, s), e;
286
+ setStyle(e, t, o) {
287
+ return this.domService.setStyle(e, t, o), e;
288
288
  }
289
289
  applyStyle(e, t) {
290
- for (const s in t)
291
- this.domService.setStyle(e, s, t[s]);
290
+ for (const o in t)
291
+ this.domService.setStyle(e, o, t[o]);
292
292
  return e;
293
293
  }
294
294
  applyDisplayNoneStyle(e) {
@@ -298,7 +298,7 @@ class $e {
298
298
  return this.domService.setStyle(e, "display", "block"), e;
299
299
  }
300
300
  applyStyleInPx(e, t) {
301
- return Object.entries(t).forEach(([s, i]) => this.domService.setStyle(e, s, i + "px")), e;
301
+ return Object.entries(t).forEach(([o, s]) => this.domService.setStyle(e, o, s + "px")), e;
302
302
  }
303
303
  applyStylePosistionRelative(e) {
304
304
  return this.domService.setStyle(e, "position", "relative"), this.domService.setStyle(e, "overflow", "clip"), e;
@@ -309,8 +309,8 @@ class $e {
309
309
  applyStyleFullSize(e) {
310
310
  return this.domService.setStyle(e, "width", "100%"), this.domService.setStyle(e, "height", "100%"), e;
311
311
  }
312
- applyStyleOverflowAuto(e = "auto", t = "auto", s) {
313
- return this.domService.setStyle(s, "overflow-x", e), this.domService.setStyle(s, "overflow-y", t), s;
312
+ applyStyleOverflowAuto(e = "auto", t = "auto", o) {
313
+ return this.domService.setStyle(o, "overflow-x", e), this.domService.setStyle(o, "overflow-y", t), o;
314
314
  }
315
315
  applyStyleNoPadding(e) {
316
316
  return this.domService.setStyle(e, "padding", "0"), this.domService.setStyle(e, "margin", "0"), this.domService.setStyle(e, "border", "0"), e;
@@ -326,156 +326,157 @@ class $e {
326
326
  return this.domService.appendChild(e, t), this.applyStylePosistionAbsolute(e), { parent: e, child: t, cache: {} };
327
327
  }
328
328
  appendText(e, t) {
329
- const s = this.domService.createText(t);
330
- return this.domService.appendChild(e, s), s;
329
+ const o = this.domService.createText(t);
330
+ return this.domService.appendChild(e, o), o;
331
331
  }
332
332
  addClass(e, t) {
333
- return e.includes(" ") ? e.split(" ").forEach((s) => this.domService.addClass(t, s)) : this.domService.addClass(t, e), t;
333
+ return e.includes(" ") ? e.split(" ").forEach((o) => this.domService.addClass(t, o)) : this.domService.addClass(t, e), t;
334
334
  }
335
335
  removeClass(e, t) {
336
- return e.includes(" ") ? e.split(" ").forEach((s) => this.domService.removeClass(t, s)) : this.domService.removeClass(t, e), t;
336
+ return e.includes(" ") ? e.split(" ").forEach((o) => this.domService.removeClass(t, o)) : this.domService.removeClass(t, e), t;
337
337
  }
338
338
  addClasses(e, t) {
339
339
  if (e)
340
- for (const s of e)
341
- this.domService.addClass(t, s);
340
+ for (const o of e)
341
+ this.domService.addClass(t, o);
342
342
  return t;
343
343
  }
344
- setAttribute(e, t, s) {
345
- return t && s && this.domService.setAttribute(e, t, s), e;
344
+ setAttribute(e, t, o) {
345
+ return t && o && this.domService.setAttribute(e, t, o), e;
346
346
  }
347
- createAreaDivWithClass(e, t, s, i) {
348
- const o = this.domService.createElement("div");
349
- return this.addClass(e, o), this.domService.setAttribute(o, "data-area", s), this.domService.setAttribute(o, "data-side", i), this.domService.appendChild(t, o), o;
347
+ createAreaDivWithClass(e, t, o, s) {
348
+ const i = this.domService.createElement("div");
349
+ return this.addClass(e, i), this.domService.setAttribute(i, "data-area", o), this.domService.setAttribute(i, "data-side", s), this.domService.appendChild(t, i), i;
350
350
  }
351
351
  createDivWithClass(e, t) {
352
- const s = this.domService.createElement("div");
353
- return this.addClass(e, s), this.domService.appendChild(t, s), s;
352
+ const o = this.domService.createElement("div");
353
+ return this.addClass(e, o), this.domService.appendChild(t, o), o;
354
354
  }
355
- addRowDiv(e, t, s = -1, i, o, r = "") {
356
- const a = t.index ?? -1, n = this.getDivOrCreateDiv(a, e);
357
- if (this.domService.addClass(n, "ge-table-row-div"), this.domService.addClass(n, `ge-table-row-div-${t.index}`), i === "body" && o === "center") {
355
+ addRowDiv(e, t, o = -1, s, i, r = "") {
356
+ const n = t.index ?? -1, l = this.getDivOrCreateDiv(n, e);
357
+ if (this.domService.addClass(l, "ge-table-row-div"), this.domService.addClass(l, `ge-table-row-div-${t.index}`), s === "body" && i === "center") {
358
358
  const d = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
359
- this.domService.addClass(n, `ge-table-row-${d}`);
359
+ this.domService.addClass(l, `ge-table-row-${d}`);
360
360
  }
361
- if (this.domService.setStyle(n, "display", "clip"), this.domService.setStyle(n, "position", "absolute"), this.domService.setStyle(n, "left", `${t.left}px`), this.domService.setStyle(n, "top", `${t.top}px`), this.domService.setStyle(n, "width", `${t.width}px`), this.domService.setStyle(n, "height", `${t.height}px`), this.domService.setAttribute(n, "data-row-index", `${s}`), this.domService.setAttribute(n, "data-area", `${i}`), r) {
361
+ if (this.domService.setStyle(l, "display", "clip"), this.domService.setStyle(l, "position", "absolute"), this.domService.setStyle(l, "left", `${t.left}px`), this.domService.setStyle(l, "top", `${t.top}px`), this.domService.setStyle(l, "width", `${t.width}px`), this.domService.setStyle(l, "height", `${t.height}px`), this.domService.setAttribute(l, "data-row-index", `${o}`), this.domService.setAttribute(l, "data-area", `${s}`), r) {
362
362
  const d = this.domService.createText(r);
363
- this.domService.appendChild(n, d);
363
+ this.domService.appendChild(l, d);
364
364
  }
365
- return this.domService.appendChild(e.child, n), n;
366
- }
367
- addColumnDiv(e, t, s = -1, i = -1, o, r, a = "", n, d, h = void 0, c) {
368
- const S = d == null ? void 0 : d.treeOptions, f = d == null ? void 0 : d.showCheckboxWihoutExtraColumn, p = this.domService.createElement("div");
369
- this.domService.addClass(p, "ge-table-col-div"), this.domService.addClass(p, `ge-table-col-div-${t.index}`), this.domService.setAttribute(p, "data-col-index", `${t.index}`), this.domService.setAttribute(p, "data-row-index", `${s}`), this.domService.setAttribute(p, "data-area", `${o}`);
370
- const m = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
371
- if (o === "body" && r === "center" && this.domService.addClass(p, `ge-table-column-${m}`), this.domService.setStyle(p, "display", "clip"), this.domService.setStyle(p, "position", "absolute"), this.domService.setStyle(p, "left", `${t.left}px`), this.domService.setStyle(p, "top", `${t.top}px`), this.domService.setStyle(p, "width", `${t.width}px`), this.domService.setStyle(p, "height", `${t.height}px`), n && n !== "none" && (this.domService.addClass(p, "ge-table-col-tree"), this.addArrowDiv(p, n, S, s, i, o)), f && i === 0 && h && this.addCheckboxToDiv(p, h, o, s), a) {
372
- const g = n !== "none" && i === 0;
373
- this.addLabelDiv(p, a, g, s, i, o);
365
+ return this.domService.appendChild(e.child, l), l;
366
+ }
367
+ addColumnDiv(e) {
368
+ const { parent: t, geo: o, rowIndex: s = -1, columnIndex: i = -1, areaIdent: r, sideIdent: n, text: l = "", treeArrow: d, tableOptions: c, checkedType: h = void 0, sortState: g } = e, f = c == null ? void 0 : c.treeOptions, u = c == null ? void 0 : c.showCheckboxWihoutExtraColumn, S = this.domService.createElement("div");
369
+ this.domService.addClass(S, "ge-table-col-div"), this.domService.addClass(S, `ge-table-col-div-${o.index}`), this.domService.setAttribute(S, "data-col-index", `${o.index}`), this.domService.setAttribute(S, "data-row-index", `${s}`), this.domService.setAttribute(S, "data-area", `${r}`);
370
+ const b = ((o == null ? void 0 : o.index) ?? 0) % 2 === 0 ? "even" : "odd";
371
+ if (r === "body" && n === "center" && this.domService.addClass(S, `ge-table-column-${b}`), this.domService.setStyle(S, "display", "clip"), this.domService.setStyle(S, "position", "absolute"), this.domService.setStyle(S, "left", `${o.left}px`), this.domService.setStyle(S, "top", `${o.top}px`), this.domService.setStyle(S, "width", `${o.width}px`), this.domService.setStyle(S, "height", `${o.height}px`), d && d !== "none" && (this.domService.addClass(S, "ge-table-col-tree"), this.addArrowDiv(S, d, f, s, i, r)), u && i === 0 && h && this.addCheckboxToDiv(S, h, r, s), l) {
372
+ const p = d !== "none" && i === 0;
373
+ this.addLabelDiv(S, l, p, s, i, r);
374
374
  }
375
- return c && this.addSortedIcon(p, c, d == null ? void 0 : d.sortedOptions, i), this.domService.appendChild(e, p), p;
375
+ return g && this.addSortedIcon(S, g, c == null ? void 0 : c.sortedOptions, i), this.domService.appendChild(t, S), S;
376
376
  }
377
- addCheckboxToDiv(e, t, s, i) {
378
- const o = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
379
- return o.innerHTML = `
377
+ addCheckboxToDiv(e, t, o, s) {
378
+ const i = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
379
+ return i.innerHTML = `
380
380
  <input
381
381
  type="checkbox"
382
- data-area="${s}"
383
- data-row-index="${i}"
382
+ data-area="${o}"
383
+ data-row-index="${s}"
384
384
  data-input-type="checkbox"
385
385
  ${r}
386
- class="ge-table-row-checkbox"> `, this.domService.setStyle(o, "display", "inline"), this.domService.setStyle(o, "width", "inherit"), this.domService.setAttribute(o, "data-row-index", `${i}`), this.domService.appendChild(e, o), o;
387
- }
388
- addLabelDiv(e, t = "", s = !1, i = -1, o = -1, r = "body") {
389
- const a = this.domService.createElement("div");
390
- if (this.domService.addClass(a, "ge-table-label-div"), this.domService.setStyle(a, "position", "relative"), this.domService.setStyle(a, "background", "transparent"), this.domService.setStyle(a, "width", "100%"), this.domService.setStyle(a, "height", "100%"), this.domService.setAttribute(a, "data-row-index", `${i}`), this.domService.setAttribute(a, "data-col-index", `${o}`), this.domService.setAttribute(a, "data-area", `${r}`), t)
391
- if (s) {
392
- const n = this.domService.createText(t);
393
- this.domService.appendChild(a, n);
386
+ class="ge-table-row-checkbox"> `, this.domService.setStyle(i, "display", "inline"), this.domService.setStyle(i, "width", "inherit"), this.domService.setAttribute(i, "data-row-index", `${s}`), this.domService.appendChild(e, i), i;
387
+ }
388
+ addLabelDiv(e, t = "", o = !1, s = -1, i = -1, r = "body") {
389
+ const n = this.domService.createElement("div");
390
+ 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", `${s}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${r}`), t)
391
+ if (o) {
392
+ const l = this.domService.createText(t);
393
+ this.domService.appendChild(n, l);
394
394
  } else {
395
- const n = this.domService.createElement("div");
396
- this.domService.appendChild(a, n);
395
+ const l = this.domService.createElement("div");
396
+ this.domService.appendChild(n, l);
397
397
  const d = this.domService.createText(t);
398
- this.domService.addClass(n, "ge-table-label"), this.domService.appendChild(n, d), this.domService.setAttribute(n, "data-row-index", `${i}`), this.domService.setAttribute(n, "data-col-index", `${o}`), this.domService.setAttribute(n, "data-area", `${r}`);
398
+ this.domService.addClass(l, "ge-table-label"), this.domService.appendChild(l, d), this.domService.setAttribute(l, "data-row-index", `${s}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`);
399
399
  }
400
- return this.domService.appendChild(e, a), a;
400
+ return this.domService.appendChild(e, n), n;
401
401
  }
402
- addSortedIcon(e, t = "", s = new de(), i = -1) {
403
- const o = this.domService.createElement("div");
404
- this.domService.addClass(o, "ge-table-sorted-icon-div"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "top", "0"), this.domService.setStyle(o, "right", "0"), this.domService.setStyle(o, "width", "20px"), this.domService.setStyle(o, "background", "transparent"), this.domService.setStyle(o, "cursor", "pointer"), this.domService.setAttribute(o, "data-col-index", `${i}`), this.domService.setAttribute(o, "data-area", "header");
402
+ addSortedIcon(e, t = "", o = new be(), s = -1) {
403
+ const i = this.domService.createElement("div");
404
+ 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", `${s}`), this.domService.setAttribute(i, "data-area", "header");
405
405
  let r;
406
- t === "asc" ? r = s.iconAsc : t === "desc" ? r = s.iconDesc : r = s.iconPlaceholder;
407
- const a = r.content, n = this.domService.createText(a);
408
- this.domService.appendChild(o, n), r.style && this.applyStyleString(o, r.style);
406
+ t === "asc" ? r = o.iconAsc : t === "desc" ? r = o.iconDesc : r = o.iconPlaceholder;
407
+ const n = r.content, l = this.domService.createText(n);
408
+ this.domService.appendChild(i, l), r.style && this.applyStyleString(i, r.style);
409
409
  for (const d of r.classes)
410
- this.domService.addClass(o, d);
411
- return this.domService.appendChild(e, o), o;
412
- }
413
- addArrowDiv(e, t = "none", s = new ae(), i = -1, o = -1, r = "body") {
414
- const a = this.domService.createElement("div");
415
- this.domService.addClass(a, "ge-table-tree-arrow-div"), this.domService.setStyle(a, "display", "inline-block"), this.domService.setStyle(a, "position", ""), this.domService.setStyle(a, "width", "20px"), this.domService.setStyle(a, "background", "transparent"), this.domService.setStyle(a, "cursor", "pointer"), this.domService.setAttribute(a, "data-row-index", `${i}`), this.domService.setAttribute(a, "data-col-index", `${o}`), this.domService.setAttribute(a, "data-area", `${r}`);
416
- let n;
417
- t === "expanded" ? n = s.arrowExpanded : t === "collapsed" ? n = s.arrowCollapsed : n = s.arrowPlaceholder;
418
- const d = n.content, h = this.domService.createText(d);
419
- this.domService.appendChild(a, h), n.style && this.applyStyleString(a, n.style);
420
- for (const c of n.classes)
421
- this.domService.addClass(a, c);
422
- return this.domService.appendChild(e, a), a;
423
- }
424
- addColumnBorderDivs(e, t, s, i, o) {
410
+ this.domService.addClass(i, d);
411
+ return this.domService.appendChild(e, i), i;
412
+ }
413
+ addArrowDiv(e, t = "none", o = new pe(), s = -1, i = -1, r = "body") {
414
+ const n = this.domService.createElement("div");
415
+ 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", `${s}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${r}`);
416
+ let l;
417
+ t === "expanded" ? l = o.arrowExpanded : t === "collapsed" ? l = o.arrowCollapsed : l = o.arrowPlaceholder;
418
+ const d = l.content, c = this.domService.createText(d);
419
+ this.domService.appendChild(n, c), l.style && this.applyStyleString(n, l.style);
420
+ for (const h of l.classes)
421
+ this.domService.addClass(n, h);
422
+ return this.domService.appendChild(e, n), n;
423
+ }
424
+ addColumnBorderDivs(e, t, o, s, i) {
425
425
  if (e.verticalBorderVisible) {
426
- const r = `ge-table-${i}-${o}-vertical-border`;
427
- this.addVerticalBorder(s, t, r);
426
+ const r = `ge-table-${s}-${i}-vertical-border`;
427
+ this.addVerticalBorder(o, t, r);
428
428
  }
429
429
  if (e.horizontalBorderVisible) {
430
- const r = `ge-table-${i}-${o}-horizontal-border`;
431
- this.addHorizontalBorder(s, t, r);
430
+ const r = `ge-table-${s}-${i}-horizontal-border`;
431
+ this.addHorizontalBorder(o, t, r);
432
432
  }
433
433
  return t;
434
434
  }
435
- addHorizontalBorder(e, t, s = "ge-table-body-center-horizontal-border") {
436
- const i = this.domService.createElement("div");
437
- return this.domService.addClass(i, s), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${e.left}px`), this.domService.setStyle(i, "top", `${e.top}px`), this.domService.setStyle(i, "width", `${e.width}px`), this.domService.setStyle(i, "height", "1px"), this.domService.appendChild(t, i), i;
435
+ addHorizontalBorder(e, t, o = "ge-table-body-center-horizontal-border") {
436
+ const s = this.domService.createElement("div");
437
+ return this.domService.addClass(s, o), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${e.left}px`), this.domService.setStyle(s, "top", `${e.top}px`), this.domService.setStyle(s, "width", `${e.width}px`), this.domService.setStyle(s, "height", "1px"), this.domService.appendChild(t, s), s;
438
438
  }
439
- addFocusBorderDivs(e, t, s) {
440
- let i = this.domService.createElement("div");
441
- return this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", "1px"), this.domService.setStyle(i, "height", `${t.height}px`), this.applyStyle(i, s), this.domService.appendChild(e, i), i = this.domService.createElement("div"), this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left + t.width - 1}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", "1px"), this.domService.setStyle(i, "height", `${t.height}px`), this.applyStyle(i, s), this.domService.appendChild(e, i), i = this.domService.createElement("div"), this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", `${t.width}px`), this.domService.setStyle(i, "height", "1px"), this.applyStyle(i, s), this.domService.appendChild(e, i), i = this.domService.createElement("div"), this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top + t.height - 1}px`), this.domService.setStyle(i, "width", `${t.width}px`), this.domService.setStyle(i, "height", "1px"), this.applyStyle(i, s), this.domService.appendChild(e, i), e;
439
+ addFocusBorderDivs(e, t, o) {
440
+ t = { ...t, width: t.width + 1, height: t.height + 1 };
441
+ let s = this.domService.createElement("div");
442
+ return this.domService.addClass(s, "ge-table-focus-border"), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left}px`), this.domService.setStyle(s, "top", `${t.top}px`), this.domService.setStyle(s, "width", "1px"), this.domService.setStyle(s, "height", `${t.height}px`), this.domService.setStyle(s, "z-index", "9999"), this.applyStyle(s, o), this.domService.appendChild(e, s), s = this.domService.createElement("div"), this.domService.addClass(s, "ge-table-focus-border"), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left + t.width - 1}px`), this.domService.setStyle(s, "top", `${t.top}px`), this.domService.setStyle(s, "width", "1px"), this.domService.setStyle(s, "height", `${t.height}px`), this.domService.setStyle(s, "z-index", "9999"), this.applyStyle(s, o), this.domService.appendChild(e, s), s = this.domService.createElement("div"), this.domService.addClass(s, "ge-table-focus-border"), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left}px`), this.domService.setStyle(s, "top", `${t.top}px`), this.domService.setStyle(s, "width", `${t.width}px`), this.domService.setStyle(s, "height", "1px"), this.domService.setStyle(s, "z-index", "9999"), this.applyStyle(s, o), this.domService.appendChild(e, s), s = this.domService.createElement("div"), this.domService.addClass(s, "ge-table-focus-border"), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left}px`), this.domService.setStyle(s, "top", `${t.top + t.height - 1}px`), this.domService.setStyle(s, "width", `${t.width}px`), this.domService.setStyle(s, "height", "1px"), this.domService.setStyle(s, "z-index", "9999"), this.applyStyle(s, o), this.domService.appendChild(e, s), e;
442
443
  }
443
- addVerticalBorder(e, t, s = "ge-table-body-center-vertical-border") {
444
- const i = this.domService.createElement("div");
445
- return this.domService.addClass(i, s), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${e.left}px`), this.domService.setStyle(i, "top", `${e.top}px`), this.domService.setStyle(i, "width", "1px"), this.domService.setStyle(i, "height", `${e.height}px`), this.domService.appendChild(t, i), i;
444
+ addVerticalBorder(e, t, o = "ge-table-body-center-vertical-border") {
445
+ const s = this.domService.createElement("div");
446
+ return this.domService.addClass(s, o), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${e.left}px`), this.domService.setStyle(s, "top", `${e.top}px`), this.domService.setStyle(s, "width", "1px"), this.domService.setStyle(s, "height", `${e.height}px`), this.domService.appendChild(t, s), s;
446
447
  }
447
- addDiv(e, t, s = "") {
448
- const i = this.domService.createElement("div");
449
- return s && this.domService.addClass(i, s), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", `${t.width}px`), this.domService.setStyle(i, "height", `${t.height}px`), this.domService.appendChild(e, i), i;
448
+ addDiv(e, t, o = "") {
449
+ const s = this.domService.createElement("div");
450
+ return o && this.domService.addClass(s, o), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left}px`), this.domService.setStyle(s, "top", `${t.top}px`), this.domService.setStyle(s, "width", `${t.width}px`), this.domService.setStyle(s, "height", `${t.height}px`), this.domService.appendChild(e, s), s;
450
451
  }
451
452
  applyStyleString(e, t) {
452
- const s = t.split(";").map((i) => i.trim()).filter((i) => i);
453
- for (const i of s) {
454
- const [o, r] = i.split(":");
455
- this.domService.setStyle(e, o.trim(), r.trim());
453
+ const o = t.split(";").map((s) => s.trim()).filter((s) => s);
454
+ for (const s of o) {
455
+ const [i, r] = s.split(":");
456
+ this.domService.setStyle(e, i.trim(), r.trim());
456
457
  }
457
458
  }
458
459
  getDivOrCreateDiv(e, t) {
459
- let s = t.cache[e];
460
- return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
460
+ let o = t.cache[e];
461
+ return o ? (o.innerText = "", o) : (o = this.domService.createElement("div"), t.cache[e] = o, o);
461
462
  }
462
463
  }
463
- const q = (l) => l === "header" ? "header" : l === "footer" ? "footer" : "body";
464
- class _e {
464
+ const Z = (a) => a === "header" ? "header" : a === "footer" ? "footer" : "body";
465
+ class Ge {
465
466
  constructor(e, t) {
466
467
  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)) {
467
468
  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"));
468
- const s = e.getAttribute("data-area");
469
- if (s && (this.areaIdent = q(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
470
- const i = e;
471
- this.value = i.value;
469
+ const o = e.getAttribute("data-area");
470
+ if (o && (this.areaIdent = Z(o), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
471
+ const s = e;
472
+ this.value = s.value;
472
473
  }
473
474
  }
474
475
  }
475
476
  }
476
- class Be {
477
+ class Ve {
477
478
  constructor(e) {
478
- this.tableScope = e, this.expandedAll = !0, this.mouseDown = !1, this.dragging = !1, this.tableScope.hostElement.addEventListener("click", this.onHostElementClicked.bind(this)), this.tableScope.hostElement.addEventListener("dblclick", this.onHostElementDblClicked.bind(this)), this.tableScope.hostElement.addEventListener("mousedown", this.onMouseDown.bind(this)), this.tableScope.hostElement.addEventListener("mousemove", this.onMouseMove.bind(this)), this.tableScope.hostElement.addEventListener("mouseup", this.onMouseUp.bind(this)), this.tableScope.hostElement.addEventListener("contextmenu", this.onContextmenu.bind(this)), this.tableScope.hostElement._MouseHandler = "true", this.tableScope.scrollViewport.addEventListener("scroll", this.tableScope.adjustAfterScrolling.bind(this.tableScope)), [window, this.tableScope.hostElement].forEach(
479
+ 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(
479
480
  (t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
480
481
  );
481
482
  }
@@ -499,22 +500,28 @@ class Be {
499
500
  * @return {void}
500
501
  */
501
502
  onHostElementClicked(e) {
502
- const t = new _e(e.target, this.tableScope);
503
- if (t.action === "toggleExpandCollapseAll")
503
+ const t = Date.now();
504
+ if (t - this.lastClicked < this.doubleClickDelay)
505
+ return;
506
+ this.lastClicked = t;
507
+ const o = new Ge(e.target, this.tableScope);
508
+ if (o.action === "toggleExpandCollapseAll")
504
509
  this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
505
- else if (t.inputType === "checkbox" && t.areaIdent)
506
- this.tableScope.toggleRowCheckbox(t.rowIdx, t.colIdx, t.areaIdent), e.preventDefault(), e.stopPropagation();
507
- else if (K(t.row) && t.areaModel) {
508
- const s = t.colIdx === this.getArrowColumnIndex() && e.altKey, i = t.className.includes("ge-table-tree-arrow-div");
510
+ else if (o.action === "toggleHeaderGroup")
511
+ this.tableScope.toggleHeaderGroup(o), e.preventDefault(), e.stopPropagation();
512
+ else if (o.inputType === "checkbox" && o.areaIdent)
513
+ this.tableScope.toggleRowCheckbox(o.rowIdx, o.colIdx, o.areaIdent), e.preventDefault(), e.stopPropagation();
514
+ else if (q(o.row) && o.areaModel) {
515
+ const s = o.colIdx === this.getArrowColumnIndex() && e.altKey, i = o.className.includes("ge-table-tree-arrow-div");
509
516
  if (console.info(i, s), s || i) {
510
517
  e.preventDefault(), e.stopPropagation();
511
- const o = t.row;
512
- o.expanded = !o.expanded, "recalcVisibleTreeRows" in t.areaModel && t.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(o);
518
+ const r = o.row;
519
+ r.expanded = !r.expanded, "recalcVisibleTreeRows" in o.areaModel && o.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(r);
513
520
  }
514
521
  }
515
- if (t.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
522
+ if (o.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
516
523
  const s = this.tableScope.tableOptions.getFocusModel();
517
- s == null || s.clear(), s == null || s.setFocus(t.rowIdx, t.colIdx);
524
+ s == null || s.clear(), s == null || s.setFocus(o.rowIdx, o.colIdx);
518
525
  }
519
526
  this.publishGeMouseEvent(e, 1);
520
527
  }
@@ -525,16 +532,16 @@ class Be {
525
532
  * @param {MouseEvent} event - The double click event.
526
533
  */
527
534
  onHostElementDblClicked(e) {
528
- if (e.target instanceof HTMLElement) {
529
- const t = e.target, s = t.getAttribute("data-area"), i = q(s), o = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), a = this.tableScope.tableModel.getAreaModel(i);
530
- if (s && i === "header")
531
- this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, o, r));
535
+ if (this.lastClicked = Date.now(), e.target instanceof HTMLElement) {
536
+ const t = e.target, o = t.getAttribute("data-area"), s = Z(o), i = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), n = this.tableScope.tableModel.getAreaModel(s);
537
+ if (o && s === "header")
538
+ this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, r));
532
539
  else if (t.getAttribute("data-row-index")) {
533
- const n = a.getRowByIndex(o);
534
- if (s && i === "body" && a.isEditable(o, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, r)), K(n) && r === this.getArrowColumnIndex()) {
540
+ const l = n.getRowByIndex(i);
541
+ if (o && s === "body" && n.isEditable(i, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, r)), q(l) && r === this.getArrowColumnIndex()) {
535
542
  e.preventDefault(), e.stopPropagation();
536
- const d = n;
537
- d.expanded = !d.expanded, "recalcVisibleTreeRows" in a && a.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(d);
543
+ const d = l;
544
+ d.expanded = !d.expanded, "recalcVisibleTreeRows" in n && n.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(d);
538
545
  }
539
546
  }
540
547
  }
@@ -549,8 +556,8 @@ class Be {
549
556
  * @return {void}
550
557
  */
551
558
  publishGeMouseEvent(e, t) {
552
- var s;
553
- this.mouseEvent = e, this.geMouseEventOld = (s = this.geMouseEvent) == null ? void 0 : s.clone(), this.geMouseEvent = this.tableScope.createGeMouseEvent(e), this.geMouseEvent && (this.geMouseEvent.clickCount = t), this.tableScope.onMouseClicked(this.geMouseEvent, this.geMouseEventOld);
559
+ var o;
560
+ this.mouseEvent = e, this.geMouseEventOld = (o = this.geMouseEvent) == null ? void 0 : o.clone(), this.geMouseEvent = this.tableScope.createGeMouseEvent(e), this.geMouseEvent && (this.geMouseEvent.clickCount = t), this.tableScope.onMouseClicked(this.geMouseEvent, this.geMouseEventOld), this.tableScope.publishGeMouseEvent(this.geMouseEvent), t === 1 && this.tableScope.debounceRepaint();
554
561
  }
555
562
  /**
556
563
  * Update the collapsed/expanded state of a tree row.
@@ -559,30 +566,30 @@ class Be {
559
566
  * @returns {void}
560
567
  */
561
568
  updateCollapsedExpandedState(e) {
562
- var s, i, o, r, a;
563
- const t = (i = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : i.getRowId;
569
+ var o, s, i, r, n;
570
+ const t = (s = (o = this.tableScope.tableOptions) == null ? void 0 : o.autoRestoreOptions) == null ? void 0 : s.getRowId;
564
571
  if (t) {
565
- const n = (o = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : o.collapsedExpandedStateGet().mode, d = n === "collapsed" && !e.expanded || n === "expanded" && e.expanded, h = n === "collapsed" && e.expanded || n === "expanded" && !e.expanded, c = t(e.data);
566
- d ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(c) : h && ((a = this.tableScope.storeStateCollapsedExpandService) == null || a.collapsedStateIdsRemove(c));
572
+ const l = (i = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : i.collapsedExpandedStateGet().mode, d = l === "collapsed" && !e.expanded || l === "expanded" && e.expanded, c = l === "collapsed" && e.expanded || l === "expanded" && !e.expanded, h = t(e.data);
573
+ d ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(h) : c && ((n = this.tableScope.storeStateCollapsedExpandService) == null || n.collapsedStateIdsRemove(h));
567
574
  }
568
575
  }
569
576
  getArrowColumnIndex() {
570
577
  return this.tableScope.tableModel.isRowCheckboxVisible() ? 1 : 0;
571
578
  }
572
579
  onMouseDown(e) {
573
- this.mouseEvent = e, this.startMouseEvent = this.tableScope.createGeMouseEvent(this.mouseEvent), this.tableScope.onMouseDown(this.startMouseEvent), this.mouseDown = !0;
580
+ this.dragging || (this.mouseEvent = e, this.startMouseEvent = this.tableScope.createGeMouseEvent(this.mouseEvent), this.tableScope.onMouseDown(this.startMouseEvent), this.mouseDown = !0);
574
581
  }
575
582
  onMouseMove(e) {
576
- this.mouseEvent = e, this.mouseDown ? (this.dragging = !0, requestAnimationFrame(this.mouseDraggingOnFrame.bind(this))) : requestAnimationFrame(this.mouseMoveOnFrame.bind(this));
583
+ this.mouseEvent = e, this.mouseDown ? (this.dragging || (this.dragging = !0, this.tableScope.setDragging(!0)), requestAnimationFrame(this.mouseDraggingOnFrame.bind(this))) : requestAnimationFrame(this.mouseMoveOnFrame.bind(this));
577
584
  }
578
585
  onMouseUp(e) {
579
- this.mouseEvent = e, this.dragging && requestAnimationFrame(this.mouseDraggingEndOnFrame.bind(this)), this.mouseDown = !1, this.dragging = !1;
586
+ this.mouseEvent = e, this.dragging && requestAnimationFrame(this.mouseDraggingEndOnFrame.bind(this)), this.mouseDown = !1, this.dragging = !1, this.tableScope.setDragging(!1);
580
587
  }
581
588
  mouseDraggingOnFrame() {
582
589
  var e;
583
590
  if (this.mouseEvent) {
584
591
  const t = this.tableScope.createGeMouseEvent(this.mouseEvent);
585
- (e = this.startMouseEvent) != null && e.originalEvent && (t.draggingX = this.mouseEvent.clientX - this.startMouseEvent.originalEvent.clientX, t.draggingY = this.mouseEvent.clientY - this.startMouseEvent.originalEvent.clientY), this.tableScope.mouseDraggingOnFrame(t);
592
+ (e = this.startMouseEvent) != null && e.originalEvent && (t.draggingX = this.mouseEvent.clientX - this.startMouseEvent.originalEvent.clientX, t.draggingY = this.mouseEvent.clientY - this.startMouseEvent.originalEvent.clientY), this.tableScope.mouseDraggingOnFrame(t, this.startMouseEvent);
586
593
  }
587
594
  }
588
595
  mouseDraggingEndOnFrame() {
@@ -599,7 +606,7 @@ class Be {
599
606
  }
600
607
  }
601
608
  }
602
- class We {
609
+ class ze {
603
610
  constructor(e) {
604
611
  this.tableScope = e;
605
612
  }
@@ -705,36 +712,114 @@ class We {
705
712
  repaint() {
706
713
  this.tableScope.repaint();
707
714
  }
715
+ /**
716
+ * Repaints the table scope with hard repaint.
717
+ * Repaints the UI by resetting the size of the wrapper div,
718
+ * adjusting the containers and rows, and performing additional adjustments
719
+ * after scrolling.
720
+ *
721
+ * @return {void}
722
+ */
723
+ repaintHard() {
724
+ this.tableScope.repaintHard();
725
+ }
726
+ /**
727
+ * Clears the current selection of the table.
728
+ * The table will be rendered automatically.
729
+ *
730
+ * @returns {void}
731
+ */
732
+ clearSelection() {
733
+ this.tableScope.clearSelection(!0);
734
+ }
735
+ /**
736
+ * Sets the selection model for the table scope.
737
+ *
738
+ * @param {SelectionModel} sm - The selection model to be set.
739
+ * @param {boolean} [repaint=true] - Indicates whether the table should be repainted after setting the selection model. Default value is true.
740
+ *
741
+ * @return {void}
742
+ */
743
+ setSelectionModel(e, t = !0) {
744
+ this.tableScope.setSelectionModel(e, t);
745
+ }
746
+ /**
747
+ * Triggers the action with the given action ID.
748
+ * This function can be invoked programmatically.
749
+ *
750
+ * @param {ActionId} actionId - The ID of the action to trigger.
751
+ * @return {void}
752
+ */
753
+ triggerAction(e) {
754
+ this.tableScope.onActionTriggered(e);
755
+ }
756
+ /**
757
+ * Retrieves the mapping of shortcuts to corresponding action in the current table scope.
758
+ *
759
+ * @return {ShortcutActionIdMapping} The mapping of shortcuts to corresponding action.
760
+ */
761
+ getShortcutActionMapping() {
762
+ return this.tableScope.shortcutService.getShortcutActionMapping();
763
+ }
764
+ /**
765
+ * Copies the selected data from the table to the clipboard.
766
+ *
767
+ * @return {Promise<string>} - A promise that resolves with the copied data as a string.
768
+ */
769
+ copyToClipboard() {
770
+ return this.tableScope.copyService.copyToClipboard(
771
+ this.tableScope.tableModel,
772
+ this.tableScope.selectionModel(),
773
+ this.tableScope.focusModel()
774
+ );
775
+ }
776
+ /**
777
+ * Retrieves the current scope of the table.
778
+ *
779
+ * @returns {TableScope} The current scope of the table.
780
+ */
781
+ getTableScope() {
782
+ return this.tableScope;
783
+ }
784
+ /**
785
+ * Retrieves the selection model of the table.
786
+ *
787
+ * @return {SelectionModelIf | undefined} The selection model of the table,
788
+ * or undefined if no selection model is available.
789
+ */
790
+ getSelectionModel() {
791
+ return this.tableScope.selectionModel();
792
+ }
708
793
  }
709
- class U {
794
+ class ee {
710
795
  constructor(e) {
711
796
  this.getStorageKeyFn = e;
712
797
  }
713
798
  autoConvertMapToObject(e) {
714
799
  const t = {};
715
800
  if (e instanceof Map) {
716
- const s = e;
717
- for (const i of [...s]) {
801
+ const o = e;
802
+ for (const s of [...o]) {
718
803
  const [
719
- o,
804
+ i,
720
805
  r
721
- ] = i;
722
- t[o] = r;
806
+ ] = s;
807
+ t[i] = r;
723
808
  }
724
809
  }
725
810
  return t;
726
811
  }
727
812
  checkAndPersistItem(e, t) {
728
- const s = this.getStorageKeyFn;
729
- if (s) {
730
- const i = s();
731
- if (i) {
732
- const o = i + e;
813
+ const o = this.getStorageKeyFn;
814
+ if (o) {
815
+ const s = o();
816
+ if (s) {
817
+ const i = s + e;
733
818
  if ((t + "").includes("Map")) {
734
819
  const r = this.autoConvertMapToObject(t);
735
- this.persistItem(o, r);
820
+ this.persistItem(i, r);
736
821
  } else
737
- this.persistItem(o, t);
822
+ this.persistItem(i, t);
738
823
  }
739
824
  }
740
825
  }
@@ -781,7 +866,7 @@ class U {
781
866
  // }
782
867
  // }
783
868
  }
784
- class He extends U {
869
+ class Ne extends ee {
785
870
  constructor(e) {
786
871
  super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
787
872
  }
@@ -796,21 +881,21 @@ class He extends U {
796
881
  if (e) {
797
882
  const t = e();
798
883
  if (t) {
799
- const s = t + this.SCROLL_STATE;
800
- let i = this.loadFromLocalStorage(s);
801
- this.scrollOffset = i || [0, 0];
884
+ const o = t + this.SCROLL_STATE;
885
+ let s = this.loadFromLocalStorage(o);
886
+ this.scrollOffset = s || [0, 0];
802
887
  }
803
888
  }
804
889
  }
805
890
  }
806
- class Pe {
807
- constructor(e = "collapsed", t = [], s = !1, i = !1) {
808
- this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = i;
891
+ class je {
892
+ constructor(e = "collapsed", t = [], o = !1, s = !1) {
893
+ this.mode = e, this.rowIds = t, this.allCollapsed = o, this.allExpanded = s;
809
894
  }
810
895
  }
811
- class ke extends U {
896
+ class Xe extends ee {
812
897
  constructor(e) {
813
- super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Pe(), this.load();
898
+ super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new je(), this.load();
814
899
  }
815
900
  collapsedExpandedStateGet() {
816
901
  return this.collapsedExpandedState;
@@ -833,8 +918,8 @@ class ke extends U {
833
918
  if (e) {
834
919
  const t = e();
835
920
  if (t) {
836
- const s = t + this.COLLAPSED_EXPANDED_STATE, i = this.loadFromLocalStorage(s);
837
- i && (this.collapsedExpandedState = i);
921
+ const o = t + this.COLLAPSED_EXPANDED_STATE, s = this.loadFromLocalStorage(o);
922
+ s && (this.collapsedExpandedState = s);
838
923
  }
839
924
  }
840
925
  }
@@ -842,7 +927,7 @@ class ke extends U {
842
927
  this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
843
928
  }
844
929
  }
845
- class Ve extends U {
930
+ class Ke extends ee {
846
931
  constructor(e) {
847
932
  super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
848
933
  }
@@ -857,95 +942,101 @@ class Ve extends U {
857
942
  if (e) {
858
943
  const t = e();
859
944
  if (t) {
860
- const s = t + this.SORTING_STATE;
861
- let i = this.loadFromLocalStorage(s);
862
- this.sortItems = i || [];
945
+ const o = t + this.SORTING_STATE, s = this.loadFromLocalStorage(o);
946
+ this.sortItems = s || [];
863
947
  }
864
948
  }
865
949
  }
866
950
  }
867
951
  class T {
868
- constructor(e = 0, t = 0, s = 0, i = 0, o) {
869
- this.left = e, this.width = t, this.height = s, this.top = i, this.index = o;
952
+ constructor(e = 0, t = 0, o = 0, s = 0, i) {
953
+ this.left = e, this.width = t, this.height = o, this.top = s, this.index = i;
870
954
  }
871
955
  }
872
- class Ge {
873
- constructor(e, t, s, i) {
874
- this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = i, this.scrollTop = 0, this.areaBodyWestGeo = new T(), this.areaBodyCenterGeo = new T(), this.areaBodyEastGeo = new T();
875
- const o = this.hostElement;
876
- o.innerText = "", this.dom.setAttribute(o, "tabindex", "0"), this.dom.setStyle(
877
- this.dom.addClass("ge-table", o),
956
+ class Ye {
957
+ constructor(e, t, o, s) {
958
+ this.hostElement = e, this.tableModel = t, this.dom = o, this.tableOptions = s, this.scrollTop = 0, this.areaBodyWestGeo = new T(), this.areaBodyCenterGeo = new T(), this.areaBodyEastGeo = new T();
959
+ const i = this.hostElement;
960
+ i.innerText = "", this.dom.setAttribute(i, "tabindex", "0"), this.dom.setStyle(
961
+ this.dom.addClass("ge-table", i),
878
962
  "position",
879
963
  "relative"
880
- ), this.hoverRow = s.applyStylePosistionAbsolute(
881
- s.createDivWithClass("ge-table-hover-row", o)
882
- ), this.hoverColumn = s.applyStylePosistionAbsolute(
883
- s.createDivWithClass("ge-table-hover-column", o)
884
- ), this.areaHeaderWest = s.appendRelativeChildDiv(
885
- s.applyStylePosistionAbsolute(
886
- s.createAreaDivWithClass("ge-table-header ge-table-header-west", o, "header", "west")
964
+ ), this.hoverRow = o.applyStylePosistionAbsolute(
965
+ o.createDivWithClass("ge-table-hover-row", i)
966
+ ), this.hoverColumn = o.applyStylePosistionAbsolute(
967
+ o.createDivWithClass("ge-table-hover-column", i)
968
+ ), this.draggingColumn = o.applyStylePosistionAbsolute(
969
+ o.createDivWithClass("ge-table-dragging-column", i)
970
+ ), this.areaHeaderWest = o.appendRelativeChildDiv(
971
+ o.applyStylePosistionAbsolute(
972
+ o.createAreaDivWithClass("ge-table-header ge-table-header-west", i, "header", "west")
887
973
  )
888
- ), this.areaHeaderCenter = s.appendRelativeChildDiv(
889
- s.applyStylePosistionAbsolute(
890
- s.createAreaDivWithClass("ge-table-header ge-table-header-center", o, "header", "center")
974
+ ), this.areaHeaderCenter = o.appendRelativeChildDiv(
975
+ o.applyStylePosistionAbsolute(
976
+ o.createAreaDivWithClass("ge-table-header ge-table-header-center", i, "header", "center")
891
977
  )
892
- ), this.areaHeaderEast = s.appendRelativeChildDiv(
893
- s.applyStylePosistionAbsolute(
894
- s.createAreaDivWithClass("ge-table-header ge-table-header-east", o, "body", "east")
978
+ ), this.areaHeaderEast = o.appendRelativeChildDiv(
979
+ o.applyStylePosistionAbsolute(
980
+ o.createAreaDivWithClass("ge-table-header ge-table-header-east", i, "body", "east")
895
981
  )
896
- ), this.areaBodyWest = s.appendRelativeChildDiv(
897
- s.applyStylePosistionAbsolute(
898
- s.createAreaDivWithClass("ge-table-body ge-table-body-west", o, "body", "west")
982
+ ), this.areaBodyWest = o.appendRelativeChildDiv(
983
+ o.applyStylePosistionAbsolute(
984
+ o.createAreaDivWithClass("ge-table-body ge-table-body-west", i, "body", "west")
899
985
  )
900
- ), this.areaBodyEast = s.appendRelativeChildDiv(
901
- s.applyStylePosistionAbsolute(
902
- s.createAreaDivWithClass("ge-table-body ge-table-body-east", o, "body", "east")
986
+ ), this.areaBodyEast = o.appendRelativeChildDiv(
987
+ o.applyStylePosistionAbsolute(
988
+ o.createAreaDivWithClass("ge-table-body ge-table-body-east", i, "body", "east")
903
989
  )
904
- ), this.areaFooterWest = s.appendRelativeChildDiv(
905
- s.applyStylePosistionAbsolute(
906
- s.createAreaDivWithClass("ge-table-footer ge-table-footer-west", o, "footer", "west")
990
+ ), this.areaFooterWest = o.appendRelativeChildDiv(
991
+ o.applyStylePosistionAbsolute(
992
+ o.createAreaDivWithClass("ge-table-footer ge-table-footer-west", i, "footer", "west")
907
993
  )
908
- ), this.areaFooterCenter = s.appendRelativeChildDiv(
909
- s.applyStylePosistionAbsolute(
910
- s.createAreaDivWithClass("ge-table-footer ge-table-footer-center", o, "footer", "center")
994
+ ), this.areaFooterCenter = o.appendRelativeChildDiv(
995
+ o.applyStylePosistionAbsolute(
996
+ o.createAreaDivWithClass("ge-table-footer ge-table-footer-center", i, "footer", "center")
911
997
  )
912
- ), this.areaFooterEast = s.appendRelativeChildDiv(
913
- s.applyStylePosistionAbsolute(
914
- s.createAreaDivWithClass("ge-table-footer ge-table-footer-east", o, "footer", "east")
998
+ ), this.areaFooterEast = o.appendRelativeChildDiv(
999
+ o.applyStylePosistionAbsolute(
1000
+ o.createAreaDivWithClass("ge-table-footer ge-table-footer-east", i, "footer", "east")
915
1001
  )
916
- ), this.scrollViewport = s.applyStyleOverflowAuto(
1002
+ ), this.scrollViewport = o.applyStyleOverflowAuto(
917
1003
  this.tableOptions.overflowX ?? "auto",
918
1004
  this.tableOptions.overflowY ?? "auto",
919
- s.applyStyleNoPadding(
920
- s.applyStylePosistionAbsolute(
921
- s.createAreaDivWithClass("ge-table-scroll-viewport", o, "body", "center")
1005
+ o.applyStyleNoPadding(
1006
+ o.applyStylePosistionAbsolute(
1007
+ o.createAreaDivWithClass("ge-table-scroll-viewport", i, "body", "center")
922
1008
  )
923
1009
  )
924
- ), this.contentWrapperDiv = s.applyStyleNoPadding(
925
- s.applyStylePosistionRelative(
926
- s.createDivWithClass("ge-table-scroll-content-wrapper", this.scrollViewport)
1010
+ ), this.contentWrapperDiv = o.applyStyleNoPadding(
1011
+ o.applyStylePosistionRelative(
1012
+ o.createDivWithClass("ge-table-scroll-content-wrapper", this.scrollViewport)
927
1013
  )
928
- ), this.contentDiv = s.applyStyleNoPadding(
929
- s.applyStylePosistionRelative(
930
- s.createDivWithClass("ge-table-scroll-content", this.contentWrapperDiv)
1014
+ ), this.contentDiv = o.applyStyleNoPadding(
1015
+ o.applyStylePosistionRelative(
1016
+ o.createDivWithClass("ge-table-scroll-content", this.contentWrapperDiv)
931
1017
  )
932
- ), this.areaBodyCenter = s.appendRelativeChildDiv(
933
- s.createDivWithClass("ge-table-body-center", this.contentDiv)
934
- ), this.borderHeaderBottom = s.applyStylePosistionAbsolute(
935
- s.createDivWithClass("ge-table-header-border", o)
936
- ), this.borderFixedWest = s.applyStylePosistionAbsolute(
937
- s.createDivWithClass("ge-table-west-fixed-column-border", o)
938
- ), this.borderFixedEast = s.applyStylePosistionAbsolute(
939
- s.createDivWithClass("ge-table-east-fixed-column-border", o)
940
- ), this.borderFooterTop = s.applyStylePosistionAbsolute(
941
- s.createDivWithClass("ge-table-footer-border", o)
1018
+ ), this.areaBodyCenter = o.appendRelativeChildDiv(
1019
+ o.createDivWithClass("ge-table-body-center", this.contentDiv)
1020
+ ), this.borderHeaderBottom = o.applyStylePosistionAbsolute(
1021
+ o.createDivWithClass("ge-table-header-border", i)
1022
+ ), this.borderFixedWest = o.applyStylePosistionAbsolute(
1023
+ o.createDivWithClass("ge-table-west-fixed-column-border", i)
1024
+ ), this.borderFixedEast = o.applyStylePosistionAbsolute(
1025
+ o.createDivWithClass("ge-table-east-fixed-column-border", i)
1026
+ ), this.borderFooterTop = o.applyStylePosistionAbsolute(
1027
+ o.createDivWithClass("ge-table-footer-border", i)
942
1028
  );
943
1029
  }
1030
+ /**
1031
+ * Adjusts the containers and rows of the table based on the current state.
1032
+ *
1033
+ * @return {void}
1034
+ */
944
1035
  adjustContainersAndRows() {
945
- const e = this.tableModel.getPadding(), t = this.hostElement.clientWidth, s = this.hostElement.clientHeight;
1036
+ const e = this.tableModel.getPadding(), t = this.hostElement.clientWidth, o = this.hostElement.clientHeight;
946
1037
  this.dom.applyStyle(this.scrollViewport, {
947
1038
  width: `${t - e.left}px`,
948
- height: `${s - e.top}px`,
1039
+ height: `${o - e.top}px`,
949
1040
  top: `${e.top}px`,
950
1041
  left: `${e.left}px`
951
1042
  }), this.scrollTop = this.scrollViewport.scrollTop, this.dom.applyStyle(this.contentDiv, {
@@ -953,21 +1044,21 @@ class Ge {
953
1044
  height: `${this.scrollViewport.clientHeight}px`,
954
1045
  top: `${this.scrollTop}px`,
955
1046
  left: `${this.scrollViewport.scrollLeft}px`
956
- }), this.areaBodyWestGeo.width = e.left, this.areaBodyWestGeo.height = s - e.top - e.bottom, this.areaBodyWestGeo.top = e.top, this.areaBodyWestGeo.left = 0, this.dom.applyStyleInPx(this.areaBodyWest.parent, this.areaBodyWestGeo), this.tableOptions.fixedWestSeparatorBorderVisible && this.tableModel.getFixedLeftColumnCount() ? this.dom.applyDisplayBlockStyle(
1047
+ }), this.areaBodyWestGeo.width = e.left, this.areaBodyWestGeo.height = o - e.top - e.bottom, this.areaBodyWestGeo.top = e.top, this.areaBodyWestGeo.left = 0, this.dom.applyStyleInPx(this.areaBodyWest.parent, this.areaBodyWestGeo), this.tableOptions.fixedWestSeparatorBorderVisible && this.tableModel.getFixedLeftColumnCount() ? this.dom.applyDisplayBlockStyle(
957
1048
  this.dom.applyStyle(this.borderFixedWest, {
958
1049
  width: "1px",
959
1050
  height: `${this.areaBodyWestGeo.height}px`,
960
1051
  top: `${this.areaBodyWestGeo.top}px`,
961
1052
  left: `${this.areaBodyWestGeo.width}px`
962
1053
  })
963
- ) : this.dom.applyDisplayNoneStyle(this.borderFixedWest), this.areaBodyEastGeo.width = e.right, this.areaBodyEastGeo.height = s - e.top - e.bottom, this.areaBodyEastGeo.top = e.top, this.areaBodyEastGeo.left = t - e.right, this.dom.applyStyleInPx(this.areaBodyEast.parent, this.areaBodyEastGeo), this.tableOptions.fixedEastSeparatorBorderVisible && this.tableModel.getFixedLeftColumnCount() ? this.dom.applyDisplayBlockStyle(
1054
+ ) : this.dom.applyDisplayNoneStyle(this.borderFixedWest), this.areaBodyEastGeo.width = e.right, this.areaBodyEastGeo.height = o - e.top - e.bottom, this.areaBodyEastGeo.top = e.top, this.areaBodyEastGeo.left = t - e.right, this.dom.applyStyleInPx(this.areaBodyEast.parent, this.areaBodyEastGeo), this.tableOptions.fixedEastSeparatorBorderVisible && this.tableModel.getFixedLeftColumnCount() ? this.dom.applyDisplayBlockStyle(
964
1055
  this.dom.applyStyle(this.borderFixedEast, {
965
1056
  width: "1px",
966
1057
  height: `${this.areaBodyEastGeo.height}px`,
967
1058
  top: `${this.areaBodyEastGeo.top}px`,
968
1059
  left: `${this.areaBodyEastGeo.left}px`
969
1060
  })
970
- ) : this.dom.applyDisplayNoneStyle(this.borderFixedEast), this.areaBodyCenterGeo.width = t - e.left - e.right, this.areaBodyCenterGeo.height = s - e.top - e.bottom, this.areaBodyCenterGeo.top = 0, this.areaBodyCenterGeo.left = 0, this.dom.applyStyleInPx(this.areaBodyCenter.parent, this.areaBodyCenterGeo), this.dom.applyStyle(this.areaHeaderCenter.parent, {
1061
+ ) : this.dom.applyDisplayNoneStyle(this.borderFixedEast), this.areaBodyCenterGeo.width = t - e.left - e.right, this.areaBodyCenterGeo.height = o - e.top - e.bottom, this.areaBodyCenterGeo.top = 0, this.areaBodyCenterGeo.left = 0, this.dom.applyStyleInPx(this.areaBodyCenter.parent, this.areaBodyCenterGeo), this.dom.applyStyle(this.areaHeaderCenter.parent, {
971
1062
  width: `${t - e.left - e.right}px`,
972
1063
  height: `${e.top}px`,
973
1064
  top: "0",
@@ -992,35 +1083,48 @@ class Ge {
992
1083
  ) : this.dom.applyDisplayNoneStyle(this.borderHeaderBottom), this.dom.applyStyle(this.areaFooterWest.parent, {
993
1084
  width: `${e.left}px`,
994
1085
  height: `${e.bottom}px`,
995
- top: `${s - e.bottom}px`,
1086
+ top: `${o - e.bottom}px`,
996
1087
  left: "0"
997
1088
  }), this.dom.applyStyle(this.areaFooterCenter.parent, {
998
1089
  width: `${t - e.left - e.right}px`,
999
1090
  height: `${e.bottom}px`,
1000
- top: `${s - e.bottom}px`,
1091
+ top: `${o - e.bottom}px`,
1001
1092
  left: `${e.left}px`
1002
1093
  }), this.dom.applyStyle(this.areaFooterEast.parent, {
1003
1094
  width: `${e.right}px`,
1004
1095
  height: `${e.bottom}px`,
1005
- top: `${s - e.bottom}px`,
1096
+ top: `${o - e.bottom}px`,
1006
1097
  left: `${t - e.right}px`
1007
1098
  }), this.tableOptions.footerSeparatorBorderVisible && this.tableModel.isFooterVisibe() ? this.dom.applyDisplayBlockStyle(
1008
1099
  this.dom.applyStyle(this.borderFooterTop, {
1009
1100
  width: `${t}px`,
1010
1101
  height: "1px",
1011
- top: `${s - e.bottom}px`,
1102
+ top: `${o - e.bottom}px`,
1012
1103
  left: "0px"
1013
1104
  })
1014
1105
  ) : this.dom.applyDisplayNoneStyle(this.borderFooterTop), this.adjustAfterScrolling();
1015
1106
  }
1107
+ /**
1108
+ * Adjusts the position or appearance of elements after scrolling.
1109
+ * This method must be overwritten in child classes.
1110
+ *
1111
+ * @return {void}
1112
+ */
1016
1113
  adjustAfterScrolling() {
1017
1114
  }
1115
+ /**
1116
+ * Resets the size of the wrapper div based on the content dimensions.
1117
+ *
1118
+ * @protected
1119
+ *
1120
+ * @returns {void} Returns nothing.
1121
+ */
1018
1122
  resetSizeOfWrapperDiv() {
1019
1123
  const e = `${this.tableModel.getContentWidthInPixel()}px`, t = `${this.tableModel.getContentHeightInPixel() + 1}px`;
1020
1124
  this.dom.setStyle(this.contentWrapperDiv, "width", e), this.dom.setStyle(this.contentWrapperDiv, "height", t);
1021
1125
  }
1022
1126
  }
1023
- class M {
1127
+ class E {
1024
1128
  /**
1025
1129
  * Represents a constructor for a class.
1026
1130
  * @constructor
@@ -1030,11 +1134,11 @@ class M {
1030
1134
  * @param {number} c2 - The value for c2.
1031
1135
  * @param {boolean} [gammaRange=false] - The value for gammaRange. Defaults to false. gammaRange will be used for AreaModelCellGroups, but it's not implemented yet!
1032
1136
  */
1033
- constructor(e, t, s, i, o = !1) {
1034
- this.r1 = e, this.c1 = t, this.r2 = s, this.c2 = i, this.gammaRange = o;
1137
+ constructor(e, t, o, s, i = !1) {
1138
+ this.r1 = e, this.c1 = t, this.r2 = o, this.c2 = s, this.gammaRange = i;
1035
1139
  }
1036
1140
  static create(e) {
1037
- return e.gammaRange === void 0 && (e.gammaRange = !1), new M(
1141
+ return e.gammaRange === void 0 && (e.gammaRange = !1), new E(
1038
1142
  e.rowIndex1,
1039
1143
  e.columnIndex1,
1040
1144
  e.rowIndex2,
@@ -1043,19 +1147,19 @@ class M {
1043
1147
  );
1044
1148
  }
1045
1149
  static singleCell(e, t) {
1046
- return new M(e, t, e, t);
1150
+ return new E(e, t, e, t);
1047
1151
  }
1048
1152
  static singleRow(e) {
1049
- return new M(e, 0, e, Number.MAX_SAFE_INTEGER);
1153
+ return new E(e, 0, e, Number.MAX_SAFE_INTEGER);
1050
1154
  }
1051
1155
  static singleColumn(e) {
1052
- return new M(0, e, Number.MAX_SAFE_INTEGER, e);
1156
+ return new E(0, e, Number.MAX_SAFE_INTEGER, e);
1053
1157
  }
1054
1158
  isInRange(e, t) {
1055
1159
  return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
1056
1160
  }
1057
1161
  }
1058
- class Ne {
1162
+ class qe {
1059
1163
  constructor(e, t) {
1060
1164
  this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
1061
1165
  }
@@ -1064,14 +1168,14 @@ class Ne {
1064
1168
  return;
1065
1169
  this.colAndRowspanRanges = [];
1066
1170
  const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
1067
- for (let s = 0; s < e; s++)
1068
- for (let i = 0; i < t; i++) {
1069
- let o = this.areaModel.getColspanAt(s, i), r = this.areaModel.getRowspanAt(s, i);
1070
- if (o > 1 || r > 1) {
1071
- o === 0 && (o = 1), r === 0 && (r = 1);
1072
- const a = this.areaModel.hasOwnProperty("gammaCells");
1171
+ for (let o = 0; o < e; o++)
1172
+ for (let s = 0; s < t; s++) {
1173
+ let i = this.areaModel.getColspanAt(o, s), r = this.areaModel.getRowspanAt(o, s);
1174
+ if (i > 1 || r > 1) {
1175
+ i === 0 && (i = 1), r === 0 && (r = 1);
1176
+ const n = "gammaCells" in this.areaModel;
1073
1177
  this.colAndRowspanRanges.push(
1074
- new M(s, i, s + r - 1, i + o - 1, a)
1178
+ new E(o, s, o + r - 1, s + i - 1, n)
1075
1179
  );
1076
1180
  }
1077
1181
  }
@@ -1081,58 +1185,98 @@ class Ne {
1081
1185
  }
1082
1186
  isInRange(e, t) {
1083
1187
  if (this.colAndRowspanRanges) {
1084
- for (const s of this.colAndRowspanRanges)
1085
- if (s.isInRange(e, t))
1188
+ for (const o of this.colAndRowspanRanges)
1189
+ if (o.isInRange(e, t))
1086
1190
  return !0;
1087
1191
  }
1088
1192
  return !1;
1089
1193
  }
1090
1194
  }
1091
- class je {
1092
- constructor(e, t, s) {
1093
- this.header = e, this.body = t, this.footer = s;
1195
+ class Ue {
1196
+ constructor(e, t, o) {
1197
+ this.header = e, this.body = t, this.footer = o;
1094
1198
  }
1095
1199
  }
1096
- class Ke extends Ge {
1097
- constructor(e, t, s, i) {
1098
- var r, a;
1099
- super(e, t, s, i), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
1200
+ class Je extends Ye {
1201
+ constructor(e, t, o, s) {
1202
+ var r, n;
1203
+ super(e, t, o, s), this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
1100
1204
  header: [],
1101
1205
  body: [],
1102
1206
  footer: []
1103
- }, this.tree = !1, this.colAndRowspanModels = new je(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.editing = !1, this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (a = this.tableOptions) != null && a.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), X(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
1104
- (n) => {
1207
+ }, this.tree = !1, this.colAndRowspanModels = new Ue(), 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), U(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
1208
+ (l) => {
1105
1209
  var d;
1106
- this.colAndRowspanModels[n] = new Ne(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
1210
+ this.colAndRowspanModels[l] = new qe(t, t.getAreaModel(l)), (d = this.colAndRowspanModels[l]) == null || d.init();
1107
1211
  }
1108
1212
  );
1109
1213
  }
1110
1214
  isEditing() {
1111
1215
  return this.editing;
1112
1216
  }
1217
+ /**
1218
+ * Resets the editor renderer by clearing its values and state.
1219
+ *
1220
+ * @function resetEditorRenderer
1221
+ * @memberof ClassName
1222
+ *
1223
+ * @returns {void}
1224
+ */
1113
1225
  resetEditorRenderer() {
1114
1226
  this.editorRenderer = void 0, this.editorRendererRow = -1, this.editorRendererColumn = -1, this.editing = !1;
1115
1227
  }
1116
- clearSelection() {
1228
+ /**
1229
+ * Clears the selection in the component.
1230
+ *
1231
+ * @param {boolean} rerender - Indicates whether to rerender the component after clearing the selection. Default value is false.
1232
+ *
1233
+ * @return {void}
1234
+ */
1235
+ clearSelection(e = !1) {
1117
1236
  if (this.getSelectionModel) {
1118
- const e = this.getSelectionModel();
1119
- e == null || e.clear();
1237
+ const t = this.getSelectionModel();
1238
+ t == null || t.clear(), e && this.repaint();
1120
1239
  }
1121
1240
  }
1241
+ /**
1242
+ * Initializes and renders the editor for a specified row and column index.
1243
+ *
1244
+ * @param {number} rowIdx - The index of the row.
1245
+ * @param {number} colIdx - The index of the column.
1246
+ */
1122
1247
  initRenderEditor(e, t) {
1123
- var i;
1124
- let s = (i = this.tableModel.getColumnDef(t)) == null ? void 0 : i.getEditRenderer;
1125
- if (s || (s = this.tableOptions.getEditRenderer), s)
1126
- if (this.editorRenderer = s(e, t), this.editorRenderer) {
1248
+ var s;
1249
+ let o = (s = this.tableModel.getColumnDef(t)) == null ? void 0 : s.getEditRenderer;
1250
+ if (o || (o = this.tableOptions.getEditRenderer), o)
1251
+ if (this.editorRenderer = o(e, t), this.editorRenderer) {
1127
1252
  this.editorRendererRow = e, this.editorRendererColumn = t, this.editing = !0, this.repaint();
1128
- const o = document.querySelector("input.ge-table-cell-editor-input");
1129
- o && o.focus();
1253
+ const i = document.querySelector("input.ge-table-cell-editor-input");
1254
+ i && i.focus();
1130
1255
  } else
1131
1256
  this.resetEditorRenderer();
1132
1257
  }
1258
+ /**
1259
+ * Adjusts the content after scrolling and initiates a repaint of the component.
1260
+ *
1261
+ * @return {void}
1262
+ */
1133
1263
  repaint() {
1134
1264
  this.adjustAfterScrolling();
1135
1265
  }
1266
+ /**
1267
+ * Repaints the UI by resetting the size of the wrapper div,
1268
+ * adjusting the containers and rows, and performing additional adjustments
1269
+ * after scrolling.
1270
+ *
1271
+ * @return {void} This method does not return any value.
1272
+ */
1273
+ repaintHard() {
1274
+ this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows(), this.adjustAfterScrolling();
1275
+ }
1276
+ /**
1277
+ * Adjusts the table after scrolling. This method performs various adjustments
1278
+ * to the table's appearance and behavior after a scroll event occurs.
1279
+ */
1136
1280
  adjustAfterScrolling() {
1137
1281
  var e;
1138
1282
  for (const t of this.removables)
@@ -1155,25 +1299,86 @@ class Ke extends Ge {
1155
1299
  "ge-table-body-west-vertical-border"
1156
1300
  ));
1157
1301
  }
1302
+ /**
1303
+ * Checks if the scroll position should be saved and saves it.
1304
+ *
1305
+ * @return {void}
1306
+ */
1158
1307
  checkForScrollPosSaving() {
1159
1308
  var e, t;
1160
1309
  this.storeScrollPosStateService && ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.autoRestoreScrollPosition) && this.storeScrollPosStateService.updateScrollOffset([this.scrollLeft, this.scrollTop]);
1161
1310
  }
1311
+ /**
1312
+ * Updates the cells in the table with the provided values and optionally repaints all cells.
1313
+ *
1314
+ * @param {TableCellUpdateEventIf[]} events - The array of events containing information about the cells to update.
1315
+ * @param {boolean} repaintAll - Optional. If true, repaints all cells after updating. Defaults to false.
1316
+ *
1317
+ * @returns {void}
1318
+ */
1162
1319
  updateCells(e, t = !1) {
1163
1320
  e.forEach(
1164
- (s) => {
1165
- this.tableModel.getAreaModel(s.area).setValue(s.rowIndex, s.columnIndex, s.value), t || this.rerenderCellContent(s);
1321
+ (o) => {
1322
+ this.tableModel.getAreaModel(o.area).setValue(o.rowIndex, o.columnIndex, o.value), t || this.rerenderCellContent(o);
1166
1323
  }
1167
1324
  ), t && this.repaint();
1168
1325
  }
1326
+ /**
1327
+ * Rerenders the content of a table cell based on the given parameters.
1328
+ *
1329
+ * @param {TableCellUpdateEventIf} area - The area of the table.
1330
+ * @param {number} rowIndex - The index of the row.
1331
+ * @param {number} columnIndex - The index of the column.
1332
+ * @param {any} value - The new value to be displayed in the cell.
1333
+ * @param {string[]} cssClasses - An array of CSS classes to be applied to the cell.
1334
+ */
1335
+ rerenderCellContent({ area: e, rowIndex: t, columnIndex: o, value: s, cssClasses: i }) {
1336
+ const r = this.tableModel.getAreaModel(e), n = 'div[data-col-index="' + o + '"][data-row-index="' + t + '"][data-area="' + e + '"]', l = document.querySelector(n);
1337
+ if (l) {
1338
+ let d;
1339
+ const h = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === o ? this.editorRenderer : r.getCellRenderer(t, o);
1340
+ if (l.innerText = "", this.applyCssClasses(l, i), h)
1341
+ d = h.render(l, t, o, e, r, s, this.dom.domService), d && this.cleanupFunctions[e].push(d);
1342
+ else {
1343
+ const u = `${s}`;
1344
+ this.dom.addLabelDiv(l, u, !1, t, o, e);
1345
+ }
1346
+ const g = r.getCustomClassesAt(t, o);
1347
+ g.length && this.dom.addClasses(g, l);
1348
+ const f = r.getCustomStyleAt(t, o);
1349
+ if (f)
1350
+ for (const u in f)
1351
+ this.dom.setStyle(l, u, f[u]);
1352
+ }
1353
+ }
1354
+ /**
1355
+ * Stores the widths of all columns in the table.
1356
+ *
1357
+ * @protected
1358
+ * @function storeColumnWidths
1359
+ * @returns {void}
1360
+ */
1361
+ storeColumnWidths() {
1362
+ const e = this.tableModel.getColumnDefs();
1363
+ e != null && e.length && (this.storedColumnWidths = e.map((t, o) => this.tableModel.getColumnWidth(o)));
1364
+ }
1169
1365
  getAreaAndSideIdentByAttr(e) {
1170
1366
  if (e) {
1171
- const t = this.getStringByAttr(e, "data-area"), s = this.getStringByAttr(e, "data-side");
1172
- if (s && t)
1173
- return [t, s];
1367
+ const t = this.getStringByAttr(e, "data-area"), o = this.getStringByAttr(e, "data-side");
1368
+ if (o && t)
1369
+ return [t, o];
1174
1370
  }
1175
1371
  return [void 0, void 0];
1176
1372
  }
1373
+ /**
1374
+ * Retrieves the specified area from the grid layout.
1375
+ *
1376
+ * @param {string} areaIdent - The identifier for the area ('header', 'body', or 'footer').
1377
+ * @param {string} sideIdent - The identifier for the side of the area ('west', 'center', or 'east').
1378
+ * @protected
1379
+ * @returns {HTMLElement} - The requested area element.
1380
+ * @throws {Error} - If the area identifier or side identifier is incorrect.
1381
+ */
1177
1382
  getArea(e, t) {
1178
1383
  if (e === "header") {
1179
1384
  if (t === "west")
@@ -1199,110 +1404,140 @@ class Ke extends Ge {
1199
1404
  }
1200
1405
  throw Error(`Wrong area identifier: row:${e}, col:${t}`);
1201
1406
  }
1407
+ /**
1408
+ * Adjusts the body of the table.
1409
+ *
1410
+ * @protected
1411
+ * @return {void}
1412
+ */
1202
1413
  adjustBody() {
1203
1414
  const e = this.areaBodyCenterGeo.height - this.tableModel.getContentHeightInPixel(), t = this.scrollFactorY * e;
1204
1415
  this.dom.setStyle(this.contentDiv, "top", `${this.scrollTop}px`), this.dom.setStyle(this.contentDiv, "left", `${this.scrollViewport.scrollLeft}px`), this.adjustArea("body", t);
1205
1416
  }
1417
+ /**
1418
+ * Returns a number value extracted from the specified attribute of the source element.
1419
+ *
1420
+ * @param {HTMLElement} srcElement - The source element from which to extract the attribute value.
1421
+ * @param {string} key - The attribute key to extract the value from.
1422
+ * @returns {number} - The extracted number value, or -1 if the attribute was not found or not a valid number.
1423
+ * @protected
1424
+ */
1206
1425
  getNumberByAttr(e, t) {
1207
- var s;
1426
+ var o;
1208
1427
  if (e) {
1209
- const i = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
1210
- if (i)
1211
- return Number(i);
1428
+ const s = (o = e.closest("[" + t + "]")) == null ? void 0 : o.getAttribute(t);
1429
+ if (s)
1430
+ return Number(s);
1212
1431
  }
1213
1432
  return -1;
1214
1433
  }
1434
+ /**
1435
+ * Retrieves the value of the specified attribute from the nearest ancestor element that has the attribute.
1436
+ *
1437
+ * @param {HTMLElement} srcElement - The source element from which to start searching for the nearest ancestor element.
1438
+ * @param {string} key - The name of the attribute to retrieve.
1439
+ * @returns {string} The value of the specified attribute, or an empty string if the attribute is not found.
1440
+ * @protected
1441
+ */
1215
1442
  getStringByAttr(e, t) {
1216
- var s;
1443
+ var o;
1217
1444
  if (e) {
1218
- const i = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
1219
- if (i)
1220
- return i;
1445
+ const s = (o = e.closest("[" + t + "]")) == null ? void 0 : o.getAttribute(t);
1446
+ if (s)
1447
+ return s;
1221
1448
  }
1222
1449
  return "";
1223
1450
  }
1451
+ /**
1452
+ * Adjusts the layout and positioning of the specified area in the table.
1453
+ * This method is used internally and should not be called directly.
1454
+ *
1455
+ * @param {AreaIdent} areaIdent - The identifier of the area to adjust (e.g. header, body, footer).
1456
+ * @param {number} [yStart=0] - The starting y-position for the layout adjustments.
1457
+ * @protected
1458
+ */
1224
1459
  adjustArea(e, t = 0) {
1225
- var g;
1226
- const s = this.getArea(e, "west"), i = this.getArea(e, "center"), o = this.getArea(e, "east"), r = i.child.clientHeight;
1227
- s.child.innerText = "", i.child.innerText = "", o.child.innerText = "";
1228
- const a = 0, n = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), h = this.tableModel.getAreaModel(e), c = h.getRowCount();
1460
+ var b;
1461
+ const o = this.getArea(e, "west"), s = this.getArea(e, "center"), i = this.getArea(e, "east"), r = s.child.clientHeight;
1462
+ o.child.innerText = "", s.child.innerText = "", i.child.innerText = "";
1463
+ const n = 0, l = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), c = this.tableModel.getAreaModel(e), h = c.getRowCount();
1229
1464
  for (; this.cleanupFunctions[e].length; ) {
1230
- const u = this.cleanupFunctions[e].shift();
1231
- u && u();
1465
+ const p = this.cleanupFunctions[e].shift();
1466
+ p && p();
1232
1467
  }
1233
- let S = t;
1234
- const f = this.tableModel.getColumnCount(), p = this.tableModel.getFixedRightColumnCount(), m = this.tableModel.getFixedLeftColumnCount();
1235
- for (let u = 0; u < c; u++) {
1236
- const w = S, x = u === c - 1, C = this.tableModel.getRowHeight(e, u);
1237
- if (w + C > 0) {
1238
- this.firstVisibleRowIndex = u;
1239
- let y = { left: a, width: n, height: C, top: w, index: u }, v = this.dom.addRowDiv(i, y, u, e, "center");
1240
- const E = m;
1468
+ let g = t;
1469
+ const f = this.tableModel.getColumnCount(), u = this.tableModel.getFixedRightColumnCount(), S = this.tableModel.getFixedLeftColumnCount();
1470
+ for (let p = 0; p < h; p++) {
1471
+ const v = g, w = p === h - 1, C = this.tableModel.getRowHeight(e, p);
1472
+ if (v + C > 0) {
1473
+ this.firstVisibleRowIndex = p;
1474
+ let y = { left: n, width: l, height: C, top: v, index: p }, m = this.dom.addRowDiv(s, y, p, e, "center");
1475
+ const R = S;
1241
1476
  if (this.adjustColumnsToRowParent({
1242
1477
  areaIdent: e,
1243
1478
  sideIdent: "center",
1244
- areaModel: h,
1479
+ areaModel: c,
1245
1480
  geo: y,
1246
- parent: v,
1247
- rowIndex: u,
1248
- columnIndexStart: E,
1249
- columnIndexEnd: f - p - 1,
1481
+ parent: m,
1482
+ rowIndex: p,
1483
+ columnIndexStart: R,
1484
+ columnIndexEnd: f - u - 1,
1250
1485
  verticalFixed: !1,
1251
- lastRowOfModel: x
1252
- }), d.left > 0 && (y = { left: a, width: this.areaBodyWestGeo.width, height: C, top: w, index: u }, v = this.dom.addRowDiv(s, y, u, e, "west"), this.adjustColumnsToRowParent({
1486
+ lastRowOfModel: w
1487
+ }), d.left > 0 && (y = { left: n, width: this.areaBodyWestGeo.width, height: C, top: v, index: p }, m = this.dom.addRowDiv(o, y, p, e, "west"), this.adjustColumnsToRowParent({
1253
1488
  areaIdent: e,
1254
1489
  sideIdent: "west",
1255
- areaModel: h,
1490
+ areaModel: c,
1256
1491
  geo: y,
1257
- parent: v,
1258
- rowIndex: u,
1492
+ parent: m,
1493
+ rowIndex: p,
1259
1494
  columnIndexStart: 0,
1260
- columnIndexEnd: E - 1,
1495
+ columnIndexEnd: R - 1,
1261
1496
  verticalFixed: !0,
1262
- lastRowOfModel: x
1263
- })), d.right > 0 && (y = { left: a, width: this.areaBodyEastGeo.width, height: C, top: w, index: u }, v = this.dom.addRowDiv(o, y, u, e, "east"), this.adjustColumnsToRowParent({
1497
+ lastRowOfModel: w
1498
+ })), d.right > 0 && (y = { left: n, width: this.areaBodyEastGeo.width, height: C, top: v, index: p }, m = this.dom.addRowDiv(i, y, p, e, "east"), this.adjustColumnsToRowParent({
1264
1499
  areaIdent: e,
1265
1500
  sideIdent: "east",
1266
- areaModel: h,
1501
+ areaModel: c,
1267
1502
  geo: y,
1268
- parent: v,
1269
- rowIndex: u,
1270
- columnIndexStart: f - p,
1503
+ parent: m,
1504
+ rowIndex: p,
1505
+ columnIndexStart: f - u,
1271
1506
  columnIndexEnd: f - 1,
1272
1507
  verticalFixed: !0,
1273
- lastRowOfModel: x
1274
- })), e === "header" && this.tree && u === c - 1) {
1508
+ lastRowOfModel: w
1509
+ })), e === "header" && this.tree && p === h - 1) {
1275
1510
  const A = this.dom.applyStyle(
1276
1511
  this.dom.setAttribute(
1277
- this.dom.addDiv(v, new T(16, 20, 20, 8)),
1512
+ this.dom.addDiv(m, new T(16, 20, 20, 8)),
1278
1513
  "data-ge-action",
1279
1514
  "toggleExpandCollapseAll"
1280
1515
  ),
1281
1516
  { cursor: "pointer" }
1282
- ), R = this.tableOptions.treeOptions.arrowExpandCollapseAll;
1283
- if (R) {
1284
- const W = this.dom.domService.createText(R.content);
1285
- this.dom.domService.appendChild(A, W), R.style && this.dom.applyStyleString(A, R.style);
1517
+ ), M = this.tableOptions.treeOptions.arrowExpandCollapseAll;
1518
+ if (M) {
1519
+ const P = this.dom.domService.createText(M.content);
1520
+ this.dom.domService.appendChild(A, P), M.style && this.dom.applyStyleString(A, M.style);
1286
1521
  }
1287
1522
  }
1288
1523
  }
1289
- if (S = S + C, S > r)
1524
+ if (g = g + C, g > r)
1290
1525
  break;
1291
1526
  }
1292
1527
  if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
1293
- const u = ((g = this.colAndRowspanModels[e]) == null ? void 0 : g.getRanges()) ?? [];
1294
- if (u.length)
1295
- for (const w of u) {
1296
- let x = 0, C = i.child, y = "center";
1297
- if (w.c1 < m)
1298
- C = s.child, y = "west";
1299
- else if (p > 0 && w.c1 >= f - p)
1300
- C = o.child, y = "east";
1528
+ const p = ((b = this.colAndRowspanModels[e]) == null ? void 0 : b.getRanges()) ?? [];
1529
+ if (p.length)
1530
+ for (const v of p) {
1531
+ let w = 0, C = s.child, y = "center";
1532
+ if (v.c1 < S)
1533
+ C = o.child, y = "west";
1534
+ else if (u > 0 && v.c1 >= f - u)
1535
+ C = i.child, y = "east";
1301
1536
  else {
1302
- const v = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1303
- x = this.scrollFactorX * v - this.areaBodyWestGeo.width, y = "center";
1537
+ const m = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1538
+ w = this.scrollFactorX * m - this.areaBodyWestGeo.width, y = "center";
1304
1539
  }
1305
- this.drawBigCell(w, x, t, h, C, y);
1540
+ this.drawBigCell(v, w, t, c, C, y);
1306
1541
  }
1307
1542
  }
1308
1543
  }
@@ -1316,328 +1551,536 @@ class Ke extends Ge {
1316
1551
  * @param sideIdent SideIdent (west,center,east)
1317
1552
  * @protected
1318
1553
  */
1319
- drawBigCell(e, t, s, i, o, r) {
1320
- const a = s + this.getRowHeights(0, e.r1 - 1, i).reduce((g, u) => g + u, 0), n = this.tableModel.getColumnCount(), d = this.tableModel.getFixedRightColumnCount();
1321
- let h = 0;
1322
- d > 0 && e.c1 >= n - d && (h = n - d);
1323
- const c = t + this.getColumnWidths(h, e.c1 - 1).reduce((g, u) => g + u, 0), S = this.getRowHeights(e.r1, e.r2, i).reduce((g, u) => g + u, 0), f = this.getColumnWidths(e.c1, e.c2).reduce((g, u) => g + u, 0);
1324
- let p = !1;
1325
- const m = this.getSelectionModel ? this.getSelectionModel() : void 0;
1326
- m && (p = m.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? (console.info("TODO here", e), this.renderCell({
1327
- areaModel: i,
1328
- areaIdent: i.areaIdent,
1554
+ drawBigCell(e, t, o, s, i, r) {
1555
+ const n = o + this.getRowHeights(0, e.r1 - 1, s).reduce((b, p) => b + p, 0), l = this.tableModel.getColumnCount(), d = this.tableModel.getFixedRightColumnCount();
1556
+ let c = 0;
1557
+ d > 0 && e.c1 >= l - d && (c = l - d);
1558
+ const h = t + this.getColumnWidths(c, e.c1 - 1).reduce((b, p) => b + p, 0), g = this.getRowHeights(e.r1, e.r2, s).reduce((b, p) => b + p, 0), f = this.getColumnWidths(e.c1, e.c2).reduce((b, p) => b + p, 0);
1559
+ let u = !1;
1560
+ const S = this.getSelectionModel ? this.getSelectionModel() : void 0;
1561
+ S && (u = S.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
1562
+ areaModel: s,
1563
+ areaIdent: s.areaIdent,
1329
1564
  sideIdent: r,
1330
1565
  rowIndex: e.r1,
1331
1566
  columnIndex: e.c1,
1332
- left: c,
1333
- top: a,
1567
+ left: h,
1568
+ top: n,
1334
1569
  width: f,
1335
- height: S,
1336
- parent: o,
1337
- cellSelected: p,
1570
+ height: g,
1571
+ parent: i,
1572
+ cellSelected: u,
1338
1573
  lastRowOfModel: !0,
1339
1574
  gammaRange: e.gammaRange
1340
- })) : this.renderCell({
1341
- areaModel: i,
1342
- areaIdent: i.areaIdent,
1575
+ }) : this.renderCell({
1576
+ areaModel: s,
1577
+ areaIdent: s.areaIdent,
1343
1578
  sideIdent: r,
1344
1579
  rowIndex: e.r1,
1345
1580
  columnIndex: e.c1,
1346
- left: c,
1347
- top: a,
1581
+ left: h,
1582
+ top: n,
1348
1583
  width: f,
1349
- height: S,
1350
- parent: o,
1351
- cellSelected: p,
1584
+ height: g,
1585
+ parent: i,
1586
+ cellSelected: u,
1352
1587
  lastRowOfModel: !0,
1353
1588
  gammaRange: e.gammaRange
1354
- }), i.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1589
+ }), s.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1355
1590
  rowIndex: e.r1,
1356
1591
  columnIndex: e.c1,
1357
- cellLeft: c,
1358
- cellTop: a,
1592
+ cellLeft: h,
1593
+ cellTop: n,
1359
1594
  cellWidth: f,
1360
- cellHeight: S,
1361
- parent: o
1595
+ cellHeight: g,
1596
+ parent: i
1362
1597
  });
1363
1598
  }
1364
- findRowOfImportantRowspanCell(e, t, s) {
1365
- const i = e.getMaxRowspan();
1366
- for (let o = t - 1; o > -1; o--) {
1367
- const r = e.getRowspanAt(o, s);
1368
- if (r > 1 && o + r + 1 >= t)
1369
- return o;
1370
- if (t - o > i)
1599
+ /**
1600
+ * Finds the row index of an important rowspan cell in a given area model.
1601
+ *
1602
+ * @param {AreaModelIf} areaModel - The area model to search in.
1603
+ * @param {number} rowIndex - The current row index.
1604
+ * @param {number} colIndex - The current column index.
1605
+ * @returns {number} - The row index of the important rowspan cell, or -1 if not found.
1606
+ * @protected
1607
+ */
1608
+ findRowOfImportantRowspanCell(e, t, o) {
1609
+ const s = e.getMaxRowspan();
1610
+ for (let i = t - 1; i > -1; i--) {
1611
+ const r = e.getRowspanAt(i, o);
1612
+ if (r > 1 && i + r + 1 >= t)
1613
+ return i;
1614
+ if (t - i > s)
1371
1615
  return -1;
1372
1616
  }
1373
1617
  return -1;
1374
1618
  }
1619
+ /**
1620
+ * Adjusts the columns to fit the width of the row's parent element.
1621
+ *
1622
+ * @param {ArgsAdjustColumnsToRowParentParams} params - The parameters for adjusting the columns.
1623
+ * @protected
1624
+ * @return {void}
1625
+ */
1375
1626
  adjustColumnsToRowParent({
1376
1627
  areaIdent: e,
1377
1628
  sideIdent: t,
1378
- areaModel: s,
1379
- geo: i,
1380
- parent: o,
1629
+ areaModel: o,
1630
+ geo: s,
1631
+ parent: i,
1381
1632
  rowIndex: r,
1382
- columnIndexStart: a,
1383
- columnIndexEnd: n,
1633
+ columnIndexStart: n,
1634
+ columnIndexEnd: l,
1384
1635
  verticalFixed: d = !1,
1385
- lastRowOfModel: h = !1
1636
+ lastRowOfModel: c = !1
1386
1637
  }) {
1387
- var m;
1638
+ var S;
1388
1639
  this.scrollViewportLeft = this.scrollViewport.scrollLeft;
1389
- let c = 0;
1640
+ let h = 0;
1390
1641
  if (!d) {
1391
- const g = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1392
- c = this.scrollFactorX * g;
1642
+ const b = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1643
+ h = this.scrollFactorX * b;
1393
1644
  }
1394
- const S = 0, f = !!(e === "body" && t);
1395
- let p = c;
1396
- for (let g = a; g <= n; g++) {
1397
- const u = p, w = this.tableModel.getColumnWidth(g);
1398
- if (w > 0 && u + w > 0) {
1399
- let x = i.height;
1400
- const C = s.getRowspanAt(r, g), y = s.getColspanAt(r, g);
1401
- C > 1 && (x = this.getRowHeights(r, r + C - 1, s).reduce((A, R) => A + R, 0));
1402
- let v = w;
1403
- y > 1 && (v = this.getColumnWidths(g, g + y - 1).reduce((A, R) => A + R, 0));
1404
- let E = !1;
1405
- if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (m = this.colAndRowspanModels[e]) != null && m.isInRange(r, g) && (E = !0), this.draggingTargetColumnIndex === g && e !== "header") {
1406
- this.renderDragTargetDiv(o, u, S, v, x);
1407
- const A = { left: u, top: S, width: v, height: x };
1408
- this.dom.addColumnBorderDivs(this.tableOptions, o, A, e, t);
1645
+ const g = 0, f = !!(e === "body" && t);
1646
+ let u = h;
1647
+ for (let b = n; b <= l; b++) {
1648
+ const p = u, v = this.tableModel.getColumnWidth(b);
1649
+ if (v > 0 && p + v > 0) {
1650
+ let w = s.height;
1651
+ const C = o.getRowspanAt(r, b), y = o.getColspanAt(r, b);
1652
+ C > 1 && (w = this.getRowHeights(r, r + C - 1, o).reduce((A, M) => A + M, 0));
1653
+ let m = v;
1654
+ y > 1 && (m = this.getColumnWidths(b, b + y - 1).reduce((A, M) => A + M, 0));
1655
+ let R = !1;
1656
+ if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (S = this.colAndRowspanModels[e]) != null && S.isInRange(r, b) && (R = !0), this.draggingTargetColumnIndex === b && e !== "header") {
1657
+ this.renderDragTargetDiv(i, p, g, m, w);
1658
+ const A = { left: p, top: g, width: m, height: w };
1659
+ this.dom.addColumnBorderDivs(this.tableOptions, i, A, e, t);
1409
1660
  } else {
1410
- const A = this.renderSelectedBackgroundDiv(E, f, t, s, r, g, o, u, S, v, x);
1411
- E || this.renderCell({
1412
- areaModel: s,
1661
+ const A = this.renderSelectedBackgroundDiv(R, f, t, o, r, b, i, p, g, m, w);
1662
+ "gammaCells" in o && o.getValueAt(r, b) && (R = !1), R || this.renderCell({
1663
+ areaModel: o,
1413
1664
  areaIdent: e,
1414
1665
  sideIdent: t,
1415
1666
  rowIndex: r,
1416
- columnIndex: g,
1417
- left: u,
1418
- top: S,
1419
- width: v,
1420
- height: x,
1421
- parent: o,
1667
+ columnIndex: b,
1668
+ left: p,
1669
+ top: g,
1670
+ width: m,
1671
+ height: w,
1672
+ parent: i,
1422
1673
  cellSelected: A,
1423
- lastRowOfModel: h,
1674
+ lastRowOfModel: c,
1424
1675
  gammaRange: !0
1425
1676
  }), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1426
1677
  rowIndex: r,
1427
- columnIndex: g,
1428
- cellLeft: u,
1429
- cellTop: S,
1430
- cellWidth: v,
1431
- cellHeight: x,
1432
- parent: o
1678
+ columnIndex: b,
1679
+ cellLeft: p,
1680
+ cellTop: g,
1681
+ cellWidth: m,
1682
+ cellHeight: w,
1683
+ parent: i
1433
1684
  });
1434
1685
  }
1435
1686
  }
1436
- if (p = p + w, p > this.areaBodyCenterGeo.width)
1687
+ if (u = u + v, u > this.areaBodyCenterGeo.width)
1437
1688
  break;
1438
1689
  }
1439
- this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new T(p - 1, 1, i.height, 0), o);
1690
+ this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new T(u - 1, 1, s.height, 0), i);
1440
1691
  }
1692
+ /**
1693
+ * Retrieves the column index of the tree arrow column in the table.
1694
+ *
1695
+ * @protected
1696
+ *
1697
+ * @returns {0 | 1} The column index of the tree arrow column.
1698
+ * Returns 0 if the checkbox is not visible,
1699
+ * otherwise returns 1.
1700
+ */
1441
1701
  getTreeArrowColumnIndex() {
1442
1702
  return this.tableOptions.showCheckboxWihoutExtraColumn ? 0 : this.tableModel.isRowCheckboxVisible() ? 1 : 0;
1443
1703
  }
1444
1704
  addAndRenderCellDiv({
1445
1705
  areaModel: e,
1446
1706
  areaIdent: t,
1447
- sideIdent: s,
1448
- rowIndex: i,
1449
- index: o,
1707
+ sideIdent: o,
1708
+ rowIndex: s,
1709
+ index: i,
1450
1710
  left: r,
1451
- width: a,
1452
- height: n,
1711
+ width: n,
1712
+ height: l,
1453
1713
  top: d,
1454
- parent: h,
1455
- lastRowOfModel: c,
1456
- gammaRange: S
1714
+ parent: c,
1715
+ lastRowOfModel: h
1457
1716
  }) {
1458
- var ee;
1459
- const p = this.editorRenderer && this.editorRendererRow === i && this.editorRendererColumn === o ? this.editorRenderer : e.getCellRenderer(i, o), m = { left: r, width: a, height: n, top: d, index: o }, g = e.getRowByIndex(i);
1460
- let u = "none";
1461
- if (o === this.getTreeArrowColumnIndex() && K(g)) {
1462
- const b = g;
1463
- (ee = b.children) != null && ee.length ? b.expanded ? u = "expanded" : u = "collapsed" : u = "hidden";
1717
+ var se;
1718
+ const f = this.editorRenderer && this.editorRendererRow === s && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(s, i), u = { left: r, width: n, height: l, top: d, index: i }, S = e.getRowByIndex(s);
1719
+ let b = "none";
1720
+ if (i === this.getTreeArrowColumnIndex() && q(S)) {
1721
+ const x = S;
1722
+ (se = x.children) != null && se.length ? x.expanded ? b = "expanded" : b = "collapsed" : b = "hidden";
1464
1723
  }
1465
- let x;
1724
+ let v;
1466
1725
  if (t === "header") {
1467
- const b = this.tableModel.getColumnDef(o);
1468
- (!(b != null && b.sortIconVisible) || b != null && b.sortIconVisible()) && (x = b == null ? void 0 : b.sortState);
1726
+ const x = this.tableModel.getColumnDef(i);
1727
+ (!(x != null && x.sortIconVisible) || x != null && x.sortIconVisible()) && (v = x == null ? void 0 : x.sortState);
1469
1728
  }
1470
- const C = e.getValueAt(i, o), y = p ? "" : `${C}`, v = e.isRowChecked(i), E = this.dom.addColumnDiv(
1471
- h,
1472
- m,
1473
- i,
1474
- o,
1475
- t,
1476
- s,
1477
- y,
1478
- u,
1479
- this.tableOptions,
1480
- v,
1481
- x
1482
- ), A = e.getTooltipAt(i, o);
1483
- A && this.dom.setAttribute(E, "title", A);
1484
- const R = this.tableModel.getColumnDef(o);
1485
- R && R.classes[t] && this.dom.addClasses(R.classes[t], E);
1486
- let W;
1487
- p && (W = p.render(E, i, o, t, e, C, this.dom.domService));
1488
- const Z = e.getCustomClassesAt(i, o);
1489
- if (Z.length && this.dom.addClasses(Z, E), this.dom.addColumnBorderDivs(this.tableOptions, h, m, t, s), c && this.dom.addHorizontalBorder({ left: r, width: a, height: n, top: d + n }, h), this.getFocusModel && t === "body") {
1490
- const b = this.getFocusModel();
1491
- b != null && b.hasFocus(i, o) && this.dom.addFocusBorderDivs(h, m, {});
1729
+ const w = e.getValueAt(s, i), C = f ? "" : `${w}`, y = e.isRowChecked(s), m = this.dom.addColumnDiv(
1730
+ {
1731
+ parent: c,
1732
+ geo: u,
1733
+ rowIndex: s,
1734
+ columnIndex: i,
1735
+ areaIdent: t,
1736
+ sideIdent: o,
1737
+ text: C,
1738
+ treeArrow: b,
1739
+ tableOptions: this.tableOptions,
1740
+ checkedType: y,
1741
+ sortState: v
1742
+ }
1743
+ ), R = e.getTooltipAt(s, i);
1744
+ R && this.dom.setAttribute(m, "title", R);
1745
+ const A = this.tableModel.getColumnDef(i);
1746
+ A && A.classes[t] && this.dom.addClasses(A.classes[t], m);
1747
+ let M;
1748
+ f && (M = f.render(m, s, i, t, e, w, this.dom.domService));
1749
+ const P = e.getCustomClassesAt(s, i);
1750
+ if (P.length && this.dom.addClasses(P, m), this.dom.addColumnBorderDivs(this.tableOptions, c, u, t, o), h && this.dom.addHorizontalBorder({ left: r, width: n, height: l, top: d + l }, c), this.getFocusModel && t === "body") {
1751
+ const x = this.getFocusModel();
1752
+ x != null && x.hasFocus(s, i) && this.dom.addFocusBorderDivs(c, u, {});
1492
1753
  }
1493
- t === "header" && this.dom.setAttribute(E, "data-ge-action", "drag-column");
1494
- const P = e.getCustomStyleAt(i, o);
1495
- if (P)
1496
- for (const b in P)
1497
- this.dom.setStyle(E, b, P[b]);
1498
- return [E, W];
1754
+ t === "header" && this.dom.setAttribute(m, "data-ge-action", "drag-column");
1755
+ const z = e.getCustomStyleAt(s, i);
1756
+ if (z)
1757
+ for (const x in z)
1758
+ this.dom.setStyle(m, x, z[x]);
1759
+ return [m, M];
1499
1760
  }
1761
+ /**
1762
+ * Applies CSS classes to an HTML element.
1763
+ *
1764
+ * @param {HTMLDivElement} ele - The HTML element to which CSS classes will be applied.
1765
+ * @param {Object.<string, boolean>} cssClasses - An object containing CSS class names as keys and boolean values indicating whether to apply or remove the class.
1766
+ * @protected
1767
+ */
1500
1768
  applyCssClasses(e, t = {}) {
1501
- e && Object.entries(t).forEach(([s, i]) => {
1502
- i ? this.dom.addClass(s, e) : this.dom.removeClass(s, e);
1769
+ e && Object.entries(t).forEach(([o, s]) => {
1770
+ s ? this.dom.addClass(o, e) : this.dom.removeClass(o, e);
1503
1771
  });
1504
1772
  }
1505
- rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: i, cssClasses: o }) {
1506
- const r = this.tableModel.getAreaModel(e), a = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', n = document.querySelector(a);
1507
- if (n) {
1508
- let d;
1509
- const c = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s ? this.editorRenderer : r.getCellRenderer(t, s);
1510
- if (n.innerText = "", this.applyCssClasses(n, o), c)
1511
- d = c.render(n, t, s, e, r, i, this.dom.domService), d && this.cleanupFunctions[e].push(d);
1512
- else {
1513
- const p = `${i}`;
1514
- this.dom.addLabelDiv(n, p, !1, t, s, e);
1515
- }
1516
- const S = r.getCustomClassesAt(t, s);
1517
- S.length && this.dom.addClasses(S, n);
1518
- const f = r.getCustomStyleAt(t, s);
1519
- if (f)
1520
- for (const p in f)
1521
- this.dom.setStyle(n, p, f[p]);
1522
- }
1523
- }
1773
+ /**
1774
+ * Retrieves the column widths of a table within a specified range.
1775
+ *
1776
+ * @param {number} startIndex - The index of the first column to retrieve the width of.
1777
+ * @param {number} endIndex - The index of the last column to retrieve the width of.
1778
+ *
1779
+ * @return {number[]} An array containing the widths of the columns within the specified range.
1780
+ */
1524
1781
  getColumnWidths(e, t) {
1782
+ const o = [];
1783
+ for (let s = e; s <= t; s++)
1784
+ o.push(this.tableModel.getColumnWidth(s));
1785
+ return o;
1786
+ }
1787
+ /**
1788
+ * Retrieves the heights of rows within a specified range.
1789
+ *
1790
+ * @param {number} startIndex - The index of the first row in the range.
1791
+ * @param {number} endIndex - The index of the last row in the range.
1792
+ * @param {AreaModelIf} areaModel - The area model.
1793
+ * @return {number[]} - An array containing the heights of the rows within the specified range.
1794
+ */
1795
+ getRowHeights(e, t, o) {
1525
1796
  const s = [];
1526
1797
  for (let i = e; i <= t; i++)
1527
- s.push(this.tableModel.getColumnWidth(i));
1798
+ s.push(o.getRowHeight(i));
1528
1799
  return s;
1529
1800
  }
1530
- getRowHeights(e, t, s) {
1531
- const i = [];
1532
- for (let o = e; o <= t; o++)
1533
- i.push(s.getRowHeight(o));
1534
- return i;
1535
- }
1801
+ /**
1802
+ * Adjusts the position and size of the hover row based on the mouse move event.
1803
+ *
1804
+ * @param {GeMouseEvent} mouseMoveEvent - The mouse move event.
1805
+ *
1806
+ * @return {void}
1807
+ */
1536
1808
  adjustHoverRows(e) {
1537
1809
  if (this.tableOptions.hoverRowVisible && e.rowIndex > -1) {
1538
- const t = this.hostElement.clientWidth, s = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex), i = e.rowTop + this.areaHeaderCenter.parent.clientHeight - this.scrollTop;
1810
+ const t = this.hostElement.clientWidth, o = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex), s = e.rowTop + this.areaHeaderCenter.parent.clientHeight - this.scrollTop;
1539
1811
  this.dom.applyStyle(this.hoverRow, {
1540
1812
  left: "0",
1541
- top: i + "px",
1813
+ top: s + "px",
1542
1814
  width: t + "px",
1543
- height: s + "px",
1815
+ height: o + "px",
1544
1816
  display: "block"
1545
1817
  });
1546
1818
  } else
1547
1819
  this.hideHoverRow();
1548
1820
  }
1821
+ /**
1822
+ * Hides the hover row by applying 'display: none' style to it.
1823
+ *
1824
+ * @protected
1825
+ * @function
1826
+ * @name hideHoverRow
1827
+ * @memberof ClassName
1828
+ *
1829
+ * @returns {void}
1830
+ */
1549
1831
  hideHoverRow() {
1550
1832
  this.dom.applyStyle(this.hoverRow, {
1551
1833
  display: "none"
1552
1834
  });
1553
1835
  }
1836
+ /**
1837
+ * Adjusts the position and size of the hover column based on the mouse move event.
1838
+ *
1839
+ * @param {GeMouseEvent} mouseMoveEvent - The mouse move event object.
1840
+ */
1554
1841
  adjustHoverColumns(e) {
1555
1842
  if (this.tableOptions.hoverColumnVisible && e.rowIndex > -1) {
1556
- const t = this.hostElement.clientHeight, s = this.tableModel.getColumnWidth(e.columnIndex), i = this.areaBodyWestGeo.width, o = e.columnLeft + this.tableModel.getPadding().left - this.scrollLeft - i;
1843
+ const t = this.hostElement.clientHeight, o = this.tableModel.getColumnWidth(e.columnIndex), s = this.areaBodyWestGeo.width, i = e.columnLeft + this.tableModel.getPadding().left - this.scrollLeft - s;
1557
1844
  this.dom.applyStyle(this.hoverColumn, {
1558
- left: o + "px",
1845
+ left: i + "px",
1559
1846
  top: "0px",
1560
- width: s + "px",
1847
+ width: o + "px",
1561
1848
  height: t + "px",
1562
1849
  display: "block"
1563
1850
  });
1564
1851
  } else
1565
1852
  this.hideHoverColumn();
1566
1853
  }
1854
+ /**
1855
+ * Hide hover column.
1856
+ *
1857
+ * This method hides the hover column by applying a style of 'display: none'
1858
+ * to the element representing the hover column.
1859
+ *
1860
+ * @protected
1861
+ * @memberof ClassName
1862
+ */
1567
1863
  hideHoverColumn() {
1568
1864
  this.dom.applyStyle(this.hoverColumn, {
1569
1865
  display: "none"
1570
1866
  });
1571
1867
  }
1868
+ /**
1869
+ * Executes a function after a specified delay, ensuring that the function is called only once within that delay period.
1870
+ *
1871
+ * @param {() => void} fn - The function to be executed.
1872
+ * @param {number} [delay=1000] - The delay in milliseconds before executing the function.
1873
+ *
1874
+ * @return {undefined}
1875
+ */
1572
1876
  debounce(e, t = 1e3) {
1573
1877
  this.debounceTimeout && clearTimeout(this.debounceTimeout), this.debounceTimeout = setTimeout(e.bind(this), t);
1574
1878
  }
1575
- renderDragTargetDiv(e, t, s, i, o) {
1879
+ /**
1880
+ * Adjusts the dragging column during a mouse move event.
1881
+ *
1882
+ * @param {GeMouseEvent} mouseMoveEvent - The mouse move event.
1883
+ * @param {number} sourceColumnIndex - The index of the source column.
1884
+ * @param {boolean} firstDraggingRendering - Indicates if it's the first rendering of the dragging column.
1885
+ */
1886
+ adjustDraggingColumn(e, t, o) {
1887
+ var s, i;
1888
+ if (this.dragging) {
1889
+ const r = this.hostElement.clientHeight, n = this.storedColumnWidths[t];
1890
+ if ((s = e.originalEvent) != null && s.clientX) {
1891
+ const c = { left: ((i = e.originalEvent) == null ? void 0 : i.clientX) - n / 2, width: n, height: r, top: 0, index: t };
1892
+ this.dom.applyStyle(this.draggingColumn, {
1893
+ background: "rgba(128,128,128,0.2)",
1894
+ display: "block",
1895
+ overfllow: "clip"
1896
+ }), this.dom.applyStyleInPx(this.draggingColumn, c), o && this.renderContentOfDraggingColumn(c);
1897
+ }
1898
+ } else
1899
+ this.hideDraggingColumn();
1900
+ }
1901
+ /**
1902
+ * Renders the content of a dragging column.
1903
+ *
1904
+ * @param {GeoData} columnGeo - The geographic data of the column.
1905
+ *
1906
+ * @returns {number} The y-coordinate of the rendered content.
1907
+ */
1908
+ renderContentOfDraggingColumn(e) {
1909
+ const t = this.renderContentOfDraggingColumnForArea(e, "header", 0);
1910
+ this.renderContentOfDraggingColumnForArea(e, "body", t);
1911
+ }
1912
+ /**
1913
+ * Renders the content of the dragging column for a specific area.
1914
+ *
1915
+ * @param {GeoData} columnGeo - The geometry data of the dragging column.
1916
+ * @param {AreaIdent} areaIdent - The identifier of the area.
1917
+ * @param {number} [y=0] - The starting y-position.
1918
+ * @return {number} The final y-position after rendering all the content.
1919
+ */
1920
+ renderContentOfDraggingColumnForArea(e, t, o = 0) {
1921
+ const s = "center", i = this.tableModel.getAreaModel(t), r = i == null ? void 0 : i.getRowCount();
1922
+ if (r) {
1923
+ const n = e.index ?? 0, l = this.draggingColumn;
1924
+ for (let d = 0; d < r; d++) {
1925
+ const c = o, h = i.getRowHeight(d), g = { left: 0, width: e.width, height: h, top: c, index: d }, f = i.getValueAt(d, n), u = i.getCellRenderer(d, n), S = u ? "" : `${f}`, b = {
1926
+ parent: l,
1927
+ geo: g,
1928
+ rowIndex: d,
1929
+ columnIndex: n,
1930
+ areaIdent: t,
1931
+ sideIdent: s,
1932
+ text: S
1933
+ }, p = this.dom.addColumnDiv(b);
1934
+ let v;
1935
+ u && (v = u.render(p, d, n, t, i, f, this.dom.domService), v && this.cleanupFunctions[t].push(v));
1936
+ const w = i.getCustomClassesAt(d, n);
1937
+ w.length && this.dom.addClasses(w, p);
1938
+ const C = this.tableModel.getColumnDef(n);
1939
+ C && C.classes[t] && this.dom.addClasses(C.classes[t], p), this.dom.addColumnBorderDivs(this.tableOptions, l, g, t, s);
1940
+ const y = i.getCustomStyleAt(d, n);
1941
+ if (y)
1942
+ for (const m in y)
1943
+ this.dom.setStyle(p, m, y[m]);
1944
+ o = o + h;
1945
+ }
1946
+ }
1947
+ return o;
1948
+ }
1949
+ /**
1950
+ * Hides the dragging column by applying a 'display: none' style to it.
1951
+ * This method is protected and can only be accessed within the class.
1952
+ *
1953
+ * @return {void}
1954
+ */
1955
+ hideDraggingColumn() {
1956
+ this.dom.applyStyle(this.draggingColumn, {
1957
+ display: "none"
1958
+ });
1959
+ }
1960
+ /**
1961
+ * Renders a draggable target div element.
1962
+ *
1963
+ * @param {HTMLDivElement} parent - The parent element where the target div will be appended to.
1964
+ * @param {number} left - The left position of the target div in pixels.
1965
+ * @param {number} top - The top position of the target div in pixels.
1966
+ * @param {number} width - The width of the target div in pixels.
1967
+ * @param {number} height - The height of the target div in pixels.
1968
+ * @return {HTMLDivElement} - The rendered draggable target div element.
1969
+ */
1970
+ renderDragTargetDiv(e, t, o, s, i) {
1576
1971
  const r = this.dom.applyStylePosistionAbsolute(
1577
1972
  this.dom.createDivWithClass("ge-table-drop-zone", e)
1578
1973
  );
1579
- return this.dom.setStyle(r, "left", `${t}px`), this.dom.setStyle(r, "top", `${s}px`), this.dom.setStyle(r, "width", `${i}px`), this.dom.setStyle(r, "height", `${o}px`), r;
1974
+ return this.dom.setStyle(r, "left", `${t}px`), this.dom.setStyle(r, "top", `${o}px`), this.dom.setStyle(r, "width", `${s}px`), this.dom.setStyle(r, "height", `${i}px`), r;
1580
1975
  }
1581
- renderSelectedBackgroundDiv(e, t, s, i, o, r, a, n, d, h, c) {
1582
- let S = !1;
1583
- if (!e && t && i.isSelectable(o, r) && this.getSelectionModel) {
1976
+ /**
1977
+ * Render selected background div.
1978
+ *
1979
+ * @private
1980
+ * @param {boolean} skip - Whether to skip rendering.
1981
+ * @param {boolean} renderSelection - Whether to render the selection.
1982
+ * @param {SideIdent} sideIdent - The side identifier.
1983
+ * @param {AreaModelIf} areaModel - The area model.
1984
+ * @param {number} rowIndex - The row index.
1985
+ * @param {number} index - The index.
1986
+ * @param {HTMLDivElement} parent - The parent div element.
1987
+ * @param {number} left - The left position.
1988
+ * @param {number} top - The top position.
1989
+ * @param {number} width - The width of the div.
1990
+ * @param {number} height - The height of the div.
1991
+ * @returns {boolean} - Whether the cell is selected.
1992
+ */
1993
+ renderSelectedBackgroundDiv(e, t, o, s, i, r, n, l, d, c, h) {
1994
+ let g = !1;
1995
+ if (!e && t && s.isSelectable(i, r) && this.getSelectionModel) {
1584
1996
  const f = this.getSelectionModel();
1585
1997
  if (f) {
1586
- const p = f.getSelectionCount(o, r);
1587
- S = p > 0;
1588
- for (let m = 0; m < p; m++) {
1589
- const g = this.dom.applyStylePosistionAbsolute(
1998
+ const u = f.getSelectionCount(i, r);
1999
+ g = u > 0;
2000
+ for (let S = 0; S < u; S++) {
2001
+ const b = this.dom.applyStylePosistionAbsolute(
1590
2002
  // ge-table-body-west-selected-range
1591
- this.dom.createDivWithClass(`ge-table-${i.areaIdent}-${s}-selected-range`, a)
2003
+ this.dom.createDivWithClass(`ge-table-${s.areaIdent}-${o}-selected-range`, n)
1592
2004
  );
1593
- this.dom.setStyle(g, "left", `${n}px`), this.dom.setStyle(g, "top", `${d}px`), this.dom.setStyle(g, "width", `${h}px`), this.dom.setStyle(g, "height", `${c}px`);
2005
+ this.dom.setStyle(b, "left", `${l}px`), this.dom.setStyle(b, "top", `${d}px`), this.dom.setStyle(b, "width", `${c}px`), this.dom.setStyle(b, "height", `${h}px`);
1594
2006
  }
1595
2007
  }
1596
2008
  }
1597
- return S;
2009
+ return g;
1598
2010
  }
2011
+ /**
2012
+ * Renders a cell in the grid.
2013
+ *
2014
+ * @param {ArgsRenderCell} args - The arguments for rendering the cell.
2015
+ * @param {AreaModel} args.areaModel - The area model of the grid.
2016
+ * @param {string} args.areaIdent - The identifier of the area.
2017
+ * @param {string} args.sideIdent - The identifier of the side.
2018
+ * @param {number} args.rowIndex - The index of the row.
2019
+ * @param {number} args.columnIndex - The index of the column.
2020
+ * @param {number} args.left - The left position of the cell.
2021
+ * @param {number} args.top - The top position of the cell.
2022
+ * @param {number} args.width - The width of the cell.
2023
+ * @param {number} args.height - The height of the cell.
2024
+ * @param {HTMLElement} args.parent - The parent element of the cell.
2025
+ * @param {boolean} args.cellSelected - Indicates if the cell is selected.
2026
+ * @param {boolean} args.lastRowOfModel - Indicates if the cell is in the last row of the model.
2027
+ *
2028
+ * @returns {void}
2029
+ */
1599
2030
  renderCell({
1600
2031
  areaModel: e,
1601
2032
  areaIdent: t,
1602
- sideIdent: s,
1603
- rowIndex: i,
1604
- columnIndex: o,
2033
+ sideIdent: o,
2034
+ rowIndex: s,
2035
+ columnIndex: i,
1605
2036
  left: r,
1606
- top: a,
1607
- width: n,
2037
+ top: n,
2038
+ width: l,
1608
2039
  height: d,
1609
- parent: h,
1610
- cellSelected: c,
1611
- lastRowOfModel: S,
1612
- gammaRange: f
2040
+ parent: c,
2041
+ cellSelected: h,
2042
+ lastRowOfModel: g
1613
2043
  }) {
1614
- const [p, m] = this.addAndRenderCellDiv({
2044
+ const [f, u] = this.addAndRenderCellDiv({
1615
2045
  areaModel: e,
1616
2046
  areaIdent: t,
1617
- sideIdent: s,
1618
- rowIndex: i,
1619
- index: o,
2047
+ sideIdent: o,
2048
+ rowIndex: s,
2049
+ index: i,
1620
2050
  left: r,
1621
- width: n,
2051
+ width: l,
1622
2052
  height: d,
1623
- top: a,
1624
- parent: h,
1625
- lastRowOfModel: S,
1626
- gammaRange: f
2053
+ top: n,
2054
+ parent: c,
2055
+ lastRowOfModel: g
1627
2056
  });
1628
- c && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, p), m && this.cleanupFunctions[t].push(m);
2057
+ h && this.dom.addClass(`ge-table-${t}-${o}-selected-range`, f), u && this.cleanupFunctions[t].push(u);
1629
2058
  }
1630
- renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: i, cellWidth: o, cellHeight: r, parent: a }) {
1631
- const n = this.dom.domService, d = this.tableOptions.columnResizeHandleWidthInPx ?? 2, h = n.createElement("div");
1632
- n.setAttribute(h, "data-col-index", `${t}`), n.setAttribute(h, "data-row-index", `${e}`), n.setAttribute(h, "data-area", "header"), n.setAttribute(h, "data-ge-action", "resize-column"), n.addClass(h, "ge-table-column-resize-handle"), n.setStyle(h, "display", "clip"), n.setStyle(h, "position", "absolute"), n.setStyle(h, "cursor", "col-resize"), n.setStyle(h, "left", `${s + o - d}px`), n.setStyle(h, "top", `${i}px`), n.setStyle(h, "width", `${d}px`), n.setStyle(h, "height", `${r}px`), n.appendChild(a, h);
2059
+ /**
2060
+ * Render the header cell resize handle.
2061
+ *
2062
+ * @param {ArgsRenderHeaderCellResizeHandle} args - The arguments for rendering the handle.
2063
+ * @param {number} args.rowIndex - The index of the row.
2064
+ * @param {number} args.columnIndex - The index of the column.
2065
+ * @param {number} args.cellLeft - The left position of the cell.
2066
+ * @param {number} args.cellTop - The top position of the cell.
2067
+ * @param {number} args.cellWidth - The width of the cell.
2068
+ * @param {number} args.cellHeight - The height of the cell.
2069
+ * @param {HTMLElement} args.parent - The parent element to append the handle to.
2070
+ *
2071
+ * @return {void}
2072
+ */
2073
+ renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: o, cellTop: s, cellWidth: i, cellHeight: r, parent: n }) {
2074
+ const l = this.dom.domService, d = this.tableOptions.columnResizeHandleWidthInPx ?? 2, c = l.createElement("div");
2075
+ l.setAttribute(c, "data-col-index", `${t}`), l.setAttribute(c, "data-row-index", `${e}`), l.setAttribute(c, "data-area", "header"), l.setAttribute(c, "data-ge-action", "resize-column"), l.addClass(c, "ge-table-column-resize-handle"), l.setStyle(c, "display", "clip"), l.setStyle(c, "position", "absolute"), l.setStyle(c, "cursor", "col-resize"), l.setStyle(c, "left", `${o + i - d}px`), l.setStyle(c, "top", `${s}px`), l.setStyle(c, "width", `${d}px`), l.setStyle(c, "height", `${r}px`), l.appendChild(n, c);
1633
2076
  }
1634
2077
  }
1635
- class Xe {
2078
+ class Qe {
1636
2079
  constructor(e, t) {
1637
2080
  this.columnIndex = e, this.sortState = t;
1638
2081
  }
1639
2082
  }
1640
- class ze {
2083
+ class Ze {
1641
2084
  constructor(e) {
1642
2085
  this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
1643
2086
  }
@@ -1651,52 +2094,52 @@ class ze {
1651
2094
  */
1652
2095
  onHostElementChanged(e) {
1653
2096
  if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
1654
- const t = e.target, s = t.getAttribute("data-area"), i = t.getAttribute("data-row-index"), o = t.getAttribute("data-col-index");
1655
- if (s && i && o) {
1656
- const r = q(s), a = Number(i), n = Number(o);
1657
- this.tableScope.updateModelValueAfterEdit(r, a, n, t.value);
2097
+ const t = e.target, o = t.getAttribute("data-area"), s = t.getAttribute("data-row-index"), i = t.getAttribute("data-col-index");
2098
+ if (o && s && i) {
2099
+ const r = Z(o), n = Number(s), l = Number(i);
2100
+ this.tableScope.updateModelValueAfterEdit(r, n, l, t.value);
1658
2101
  }
1659
2102
  }
1660
2103
  }
1661
2104
  }
1662
- class Ye {
2105
+ class et {
1663
2106
  constructor(e = -1, t = -1) {
1664
2107
  this.rowIndex = e, this.columnIndex = t;
1665
2108
  }
1666
2109
  }
1667
- class J {
2110
+ class te {
1668
2111
  constructor(e) {
1669
2112
  this.cells = e;
1670
2113
  }
1671
2114
  static createSingle(e, t) {
1672
- return new J([new Ye(e, t)]);
2115
+ return new te([new et(e, t)]);
1673
2116
  }
1674
2117
  }
1675
- class qe {
2118
+ class tt {
1676
2119
  constructor(e) {
1677
- var t, s;
1678
- 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);
2120
+ var t, o;
2121
+ this.tableScope = e, (t = this.tableScope.tableOptions) != null && t.getSelectionModel && (this.getSelectionModel = this.tableScope.tableOptions.getSelectionModel), (o = this.tableScope.tableOptions) != null && o.getFocusModel && (this.getFocusModel = this.tableScope.tableOptions.getFocusModel);
1679
2122
  }
1680
2123
  onMouseClicked(e, t) {
1681
- var o, r, a, n, d, h, c;
1682
- let s = !1, i = !1;
2124
+ var i, r, n, l, d, c, h;
2125
+ let o = !1, s = !1;
1683
2126
  if (this.getSelectionModel && this.getFocusModel) {
1684
- const S = this.getSelectionModel(), f = this.getFocusModel();
1685
- S && f && (f.hasFocus(e.rowIndex, e.columnIndex) || (f.setFocus(e.rowIndex, e.columnIndex), s = !0), (o = e.originalEvent) != null && o.shiftKey || S.hasSelection() && (S.clear(), s = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (S.addSelection(this.createRangeByEvents(e, this.previousEvt)), i = !0, s = !0) : (a = e.originalEvent) != null && a.ctrlKey || (n = e.originalEvent) != null && n.metaKey ? (S.addSelection(M.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0) : (d = e.originalEvent) != null && d.altKey && ((h = e.originalEvent) != null && h.ctrlKey || (c = e.originalEvent) != null && c.metaKey) && (S.removeSelection(M.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0));
2127
+ const g = this.getSelectionModel(), f = this.getFocusModel();
2128
+ g && f && (f.hasFocus(e.rowIndex, e.columnIndex) || (f.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(f), o = !0), (i = e.originalEvent) != null && i.shiftKey || g.hasSelection() && (g.clear(), o = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (g.addSelection(this.createRangeByEvents(e, this.previousEvt)), s = !0, o = !0) : (n = e.originalEvent) != null && n.altKey && ((l = e.originalEvent) != null && l.ctrlKey || (d = e.originalEvent) != null && d.metaKey) ? (g.removeSelection(E.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (c = e.originalEvent) != null && c.ctrlKey || (h = e.originalEvent) != null && h.metaKey ? (g.addSelection(E.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (g.firstClick(e.rowIndex, e.columnIndex), o = !0), this.tableScope.onSelectionChanged(g));
1686
2129
  }
1687
- return i ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
2130
+ return s ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), o;
1688
2131
  }
1689
2132
  onActionTriggered(e) {
1690
2133
  if (this.getSelectionModel && this.getFocusModel) {
1691
- const t = this.getSelectionModel(), s = this.getFocusModel();
1692
- if (t && s) {
2134
+ const t = this.getSelectionModel(), o = this.getFocusModel();
2135
+ if (t && o) {
1693
2136
  if (e === "SELECT_ALL")
1694
2137
  return t.selectAll(), this.tableScope.repaint(), !0;
1695
2138
  if (e === "DESELECT_ALL")
1696
2139
  return t.clear(), this.tableScope.repaint(), !0;
1697
2140
  if (e === "TOGGLE_SELECTION") {
1698
- const [i, o] = s.getFocus();
1699
- return t.togglePoint(i, o), this.tableScope.repaint(), !0;
2141
+ const [s, i] = o.getFocus();
2142
+ return t.togglePoint(s, i), this.tableScope.repaint(), !0;
1700
2143
  }
1701
2144
  }
1702
2145
  }
@@ -1704,16 +2147,16 @@ class qe {
1704
2147
  }
1705
2148
  createRangeByEvents(e, t) {
1706
2149
  t || (t = e);
1707
- const s = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex), i = Math.max(e.rowIndex, t == null ? void 0 : t.rowIndex), o = Math.min(e.columnIndex, t == null ? void 0 : t.columnIndex), r = Math.max(e.columnIndex, t == null ? void 0 : t.columnIndex);
1708
- return M.create({
1709
- rowIndex1: s,
1710
- columnIndex1: o,
1711
- rowIndex2: i,
2150
+ const o = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex), s = 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);
2151
+ return E.create({
2152
+ rowIndex1: o,
2153
+ columnIndex1: i,
2154
+ rowIndex2: s,
1712
2155
  columnIndex2: r
1713
2156
  });
1714
2157
  }
1715
2158
  }
1716
- class Ue {
2159
+ class ot {
1717
2160
  get() {
1718
2161
  return {
1719
2162
  f2: "START_EDITING",
@@ -1723,43 +2166,60 @@ class Ue {
1723
2166
  "ctrl+shift+a": "DESELECT_ALL",
1724
2167
  "ctrl+x": "DESELECT_ALL",
1725
2168
  "ctrl+num_subtract": "DESELECT_ALL",
1726
- "cmd -": "DESELECT_ALL",
2169
+ "meta -": "DESELECT_ALL",
1727
2170
  arrowup: "NAVIGATE_UP",
1728
2171
  arrowdown: "NAVIGATE_DOWN",
1729
2172
  arrowleft: "NAVIGATE_LEFT",
1730
- arrowright: "NAVIGATE_RIGHT"
2173
+ arrowright: "NAVIGATE_RIGHT",
2174
+ "meta+c": "COPY_2_CLIPBOARD",
2175
+ "ctrl+c": "COPY_2_CLIPBOARD"
1731
2176
  };
1732
2177
  }
1733
2178
  }
1734
- class Je {
2179
+ class st {
1735
2180
  get() {
1736
2181
  return {
1737
2182
  f2: "START_EDITING",
1738
2183
  space: "TOGGLE_SELECTION",
1739
2184
  "ctrl+num_add": "SELECT_ALL",
1740
- "cmd+a": "SELECT_ALL",
2185
+ "meta+a": "SELECT_ALL",
1741
2186
  "ctrl+a": "SELECT_ALL",
1742
- "cmd+x": "DESELECT_ALL",
1743
- "cmd+shift+a": "DESELECT_ALL",
2187
+ "meta+x": "DESELECT_ALL",
2188
+ "meta+shift+a": "DESELECT_ALL",
1744
2189
  "ctrl+shift+a": "DESELECT_ALL",
1745
2190
  "ctrl+num_subtract": "DESELECT_ALL",
1746
2191
  "ctrl -": "DESELECT_ALL",
1747
2192
  arrowup: "NAVIGATE_UP",
1748
2193
  arrowdown: "NAVIGATE_DOWN",
1749
2194
  arrowleft: "NAVIGATE_LEFT",
1750
- arrowright: "NAVIGATE_RIGHT"
2195
+ arrowright: "NAVIGATE_RIGHT",
2196
+ "meta+c": "COPY_2_CLIPBOARD",
2197
+ "ctrl+c": "COPY_2_CLIPBOARD"
1751
2198
  };
1752
2199
  }
1753
2200
  }
1754
- class Qe {
2201
+ class it {
1755
2202
  constructor(e) {
1756
2203
  this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
1757
2204
  }
2205
+ /**
2206
+ * Adds a listener to the list of listeners.
2207
+ *
2208
+ * @param {OnActionTriggeredIf} listener - The listener to be added.
2209
+ * @returns {void}
2210
+ */
1758
2211
  addListener(e) {
1759
2212
  this.listener.includes(e) || this.listener.push(e);
1760
2213
  }
2214
+ /**
2215
+ * Initializes the ShortcutService by assigning shortcut action id mappings based on the current operating system.
2216
+ * Also adds key down event listener to the table host element.
2217
+ */
1761
2218
  init() {
1762
- this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new Je().get()) : Object.assign(this.shortcutActionIdMapping, new Ue().get()), Object.assign(this.shortcutActionIdMapping, this.tableScope.tableOptions.shortcutActionIdMapping), this.isDebug() && console.debug("ShortcutService", this.shortcutActionIdMapping), this.tableScope.hostElement.addEventListener("keydown", this.onKeyDown.bind(this));
2219
+ 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));
2220
+ }
2221
+ assignPredefinedSystemShortcutMappings() {
2222
+ this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new st().get()) : Object.assign(this.shortcutActionIdMapping, new ot().get());
1763
2223
  }
1764
2224
  isMacintosh() {
1765
2225
  return navigator.platform.indexOf("Mac") > -1;
@@ -1771,30 +2231,30 @@ class Qe {
1771
2231
  return location.hostname === "localhost" || location.hostname === "127.0.0.1";
1772
2232
  }
1773
2233
  onKeyDown(e) {
1774
- const t = this.findEnty(e);
2234
+ const t = this.findEntity(e);
1775
2235
  t && this.emit(t) && (e.preventDefault(), e.stopPropagation());
1776
2236
  }
1777
2237
  emit(e) {
1778
- this.isDebug() && console.debug("ShortcutService emit:", e);
2238
+ this.isDebug() && console.debug("ShortcutService emit :", e);
1779
2239
  let t = !1;
1780
- for (const s of this.listener)
1781
- s.onActionTriggered(e) && (t = !0);
2240
+ for (const o of this.listener)
2241
+ o.onActionTriggered(e) && (t = !0);
1782
2242
  return t;
1783
2243
  }
1784
- findEnty(e) {
2244
+ findEntity(e) {
1785
2245
  const t = this.getTokenByEvent(e);
1786
- this.isDebug() && console.debug("ShortcutService tokens:", t);
1787
- for (const s in this.shortcutActionIdMapping) {
1788
- const i = s.replace(/opt/g, "alt").replace(/cmd/g, "meta").split(/[\+ ]/g).sort();
1789
- if (this.areTokensEquals(t, i))
1790
- return this.shortcutActionIdMapping[s];
2246
+ this.isDebug() && console.debug("ShortcutService tokens :", t);
2247
+ for (const o in this.shortcutActionIdMapping) {
2248
+ const s = o.replace(/opt/g, "alt").replace(/cmd/g, "meta").split(/[+ ]/g).sort();
2249
+ if (this.areTokensEquals(t, s))
2250
+ return this.shortcutActionIdMapping[o];
1791
2251
  }
1792
2252
  }
1793
2253
  areTokensEquals(e, t) {
1794
2254
  if (e.length !== t.length || e.length === 0)
1795
2255
  return !1;
1796
- for (let s = 0; s < e.length; s++)
1797
- if (e[s] !== t[s])
2256
+ for (let o = 0; o < e.length; o++)
2257
+ if (e[o] !== t[o])
1798
2258
  return !1;
1799
2259
  return !0;
1800
2260
  }
@@ -1802,8 +2262,16 @@ class Qe {
1802
2262
  const t = [];
1803
2263
  return e.altKey && t.push("alt"), e.shiftKey && t.push("shift"), e.ctrlKey && t.push("ctrl"), e.metaKey && t.push("meta"), e.code && t.push(e.code.toLowerCase().replace(/key/g, "")), t.sort();
1804
2264
  }
2265
+ /**
2266
+ * Retrieves the shortcut action mapping object.
2267
+ *
2268
+ * @returns {ShortcutActionIdMapping} - The shortcut action mapping object.
2269
+ */
2270
+ getShortcutActionMapping() {
2271
+ return this.shortcutActionIdMapping;
2272
+ }
1805
2273
  }
1806
- class ie {
2274
+ class le {
1807
2275
  onCheckboxChanged(e) {
1808
2276
  }
1809
2277
  onContextmenu(e) {
@@ -1818,20 +2286,24 @@ class ie {
1818
2286
  }
1819
2287
  onMouseMoved(e) {
1820
2288
  }
2289
+ onSelectionChanged(e) {
2290
+ }
2291
+ onFocusChanged(e) {
2292
+ }
1821
2293
  }
1822
- class he {
1823
- setStyle(e, t, s) {
1824
- return e.style[t] = s, e;
2294
+ class ue {
2295
+ setStyle(e, t, o) {
2296
+ return e.style[t] = o, e;
1825
2297
  }
1826
2298
  appendText(e, t) {
1827
- const s = this.createText(t);
1828
- return this.appendChild(e, s), s;
2299
+ const o = this.createText(t);
2300
+ return this.appendChild(e, o), o;
1829
2301
  }
1830
2302
  addClass(e, t) {
1831
- return t.includes(" ") ? t.split(" ").forEach((s) => e.classList.add(s)) : e.classList.add(t), e;
2303
+ return t.includes(" ") ? t.split(" ").forEach((o) => e.classList.add(o)) : e.classList.add(t), e;
1832
2304
  }
1833
2305
  removeClass(e, t) {
1834
- return t.includes(" ") ? t.split(" ").forEach((s) => e.classList.remove(s)) : e.classList.remove(t), e;
2306
+ return t.includes(" ") ? t.split(" ").forEach((o) => e.classList.remove(o)) : e.classList.remove(t), e;
1835
2307
  }
1836
2308
  appendChild(e, t) {
1837
2309
  e.appendChild(t);
@@ -1842,44 +2314,47 @@ class he {
1842
2314
  createText(e) {
1843
2315
  return document.createTextNode(e);
1844
2316
  }
1845
- setAttribute(e, t, s) {
1846
- e.setAttribute(t, s);
2317
+ setAttribute(e, t, o) {
2318
+ e.setAttribute(t, o);
1847
2319
  }
1848
2320
  }
1849
- class Ze {
1850
- render(e, t, s, i, o, r, a) {
1851
- if (o.isEditable(t, s)) {
1852
- a.addClass(e, "ge-table-row-input-div");
1853
- const n = o.getValueAt(t, s);
2321
+ class rt {
2322
+ render(e, t, o, s, i, r, n) {
2323
+ if (i.isEditable(t, o)) {
2324
+ n.addClass(e, "ge-table-row-input-div");
2325
+ const l = i.getValueAt(t, o);
1854
2326
  e.innerHTML = `
1855
2327
  <input
1856
2328
  type="text"
1857
- value="${n}"
2329
+ value="${l}"
1858
2330
  autofocus
1859
2331
  onfocus="this.setSelectionRange(0, this.value.length)"
1860
2332
  data-listen="change"
1861
- data-area="${i}"
2333
+ data-area="${s}"
1862
2334
  data-row-index="${t}"
1863
- data-col-index="${s}"
2335
+ data-col-index="${o}"
1864
2336
  data-input-type="text"
1865
2337
  style="width:calc(100% - 8px);height:100%;border:0;padding:0 0 0 8px;"
1866
2338
  class="ge-table-cell-editor-input">`;
1867
2339
  }
1868
2340
  }
1869
2341
  }
1870
- class et {
2342
+ class lt {
1871
2343
  constructor(e = "none", t = "single") {
1872
2344
  this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
1873
2345
  }
2346
+ firstClick(e, t) {
2347
+ this.selectionType === "row" ? this.addRange(E.singleRow(e)) : this.selectionType === "column" && this.addRange(E.singleColumn(t));
2348
+ }
1874
2349
  getSelectionCount(e, t) {
1875
- let s = 0;
1876
- for (const i of this.ranges)
1877
- i.isInRange(e, t) && s++;
1878
- return this.allSelected && s++, this.isInNegativeRange(e, t) && (s = 0), s;
2350
+ let o = 0;
2351
+ for (const s of this.ranges)
2352
+ s.isInRange(e, t) && o++;
2353
+ return this.allSelected && o++, this.isInNegativeRange(e, t) && (o = 0), o;
1879
2354
  }
1880
2355
  isInNegativeRange(e, t) {
1881
- for (const s of this.negativeRanges)
1882
- if (s.isInRange(e, t))
2356
+ for (const o of this.negativeRanges)
2357
+ if (o.isInRange(e, t))
1883
2358
  return !0;
1884
2359
  return !1;
1885
2360
  }
@@ -1890,11 +2365,29 @@ class et {
1890
2365
  this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
1891
2366
  }
1892
2367
  hasSelection() {
1893
- return !!this.ranges.length;
2368
+ return this.allSelected || !!this.ranges.length;
2369
+ }
2370
+ hasNoSelection() {
2371
+ return !this.hasSelection();
2372
+ }
2373
+ /**
2374
+ * Retrieves the merged row indices from the given range selection.
2375
+ *
2376
+ * @returns {number[]} Array of merged row indices
2377
+ */
2378
+ getMergedRowIndices() {
2379
+ const e = /* @__PURE__ */ new Set();
2380
+ for (const t of this.ranges)
2381
+ for (let o = t.r1; o <= t.r2; o++)
2382
+ !e.has(o) && !this.isInNegativeRange(o, 0) && e.add(o);
2383
+ return Array.from(e);
1894
2384
  }
1895
2385
  selectAll() {
1896
2386
  this.allSelected = !0;
1897
2387
  }
2388
+ isAllSelected() {
2389
+ return this.allSelected;
2390
+ }
1898
2391
  addSelection(e) {
1899
2392
  this.addRange(e);
1900
2393
  }
@@ -1902,16 +2395,19 @@ class et {
1902
2395
  if (this.selectionType === "none")
1903
2396
  return;
1904
2397
  let t = e;
1905
- this.selectionType === "row" ? t = M.singleRow(e.r1) : this.selectionType === "column" && (t = M.singleColumn(e.c1)), this.negativeRanges.push(t);
2398
+ this.selectionType === "row" ? t = E.singleRow(e.r1) : this.selectionType === "column" && (t = E.singleColumn(e.c1)), this.negativeRanges.push(t);
1906
2399
  }
1907
2400
  togglePoint(e, t) {
1908
- this.getSelectionCount(e, t) > 0 ? this.removeSelection(M.singleCell(e, t)) : this.addSelection(M.singleCell(e, t));
2401
+ this.getSelectionCount(e, t) > 0 ? this.removeSelection(E.singleCell(e, t)) : this.addSelection(E.singleCell(e, t));
2402
+ }
2403
+ isSelected(e, t) {
2404
+ return this.getSelectionCount(e, t) > 0;
1909
2405
  }
1910
2406
  addRange(e) {
1911
2407
  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));
1912
2408
  }
1913
2409
  }
1914
- class tt {
2410
+ class at {
1915
2411
  constructor(e = "none") {
1916
2412
  this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
1917
2413
  }
@@ -1934,29 +2430,128 @@ class tt {
1934
2430
  return [this.rowIndex, this.columnIndex];
1935
2431
  }
1936
2432
  }
1937
- const st = new et(), it = new tt("cell");
1938
- class ce {
2433
+ class fe {
2434
+ constructor(e = new D(
2435
+ "❯",
2436
+ "",
2437
+ ["gt-table-icon-expanded"]
2438
+ ), t = new D(
2439
+ "❯",
2440
+ "transform: rotate(180deg) translate(-100%, -100%); transform-origin: 0 0;",
2441
+ ["ge-table-icon-collapsed"]
2442
+ )) {
2443
+ this.iconExpanded = e, this.iconCollapsed = t;
2444
+ }
2445
+ // `⊖ `, `⊕ `;
2446
+ }
2447
+ const nt = new lt(), dt = new at("cell");
2448
+ class Se {
1939
2449
  constructor() {
1940
2450
  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 = {
1941
2451
  header: 34,
1942
2452
  body: 34,
1943
2453
  footer: 34
1944
- }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ae(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new de(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new Ze(), this.getSelectionModel = () => st, this.getFocusModel = () => it;
2454
+ }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new pe(), this.headerGroupOptions = new fe(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new be(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new rt(), this.getSelectionModel = () => nt, this.getFocusModel = () => dt;
1945
2455
  }
1946
2456
  }
1947
- class Q extends Ke {
1948
- constructor(e, t, s, i, o) {
1949
- var r;
2457
+ const F = class F {
2458
+ /**
2459
+ * Returns the content to be copied based on the provided table model, selection model, and focus model.
2460
+ *
2461
+ * @param {TableModelIf} tableModel - The table model for data retrieval.
2462
+ * @param {SelectionModelIf} selectionModel - The selection model to determine the selected range.
2463
+ * @param {FocusModelIf} focusModel - The focus model to determine the focused cell.
2464
+ * @return {Promise<string>} A promise that resolves to the copied content as a string.
2465
+ * @throws {string} Throws an error if neither selection nor focus is defined.
2466
+ */
2467
+ createContent(e, t, o) {
2468
+ return new Promise((s, i) => {
2469
+ if (t != null && t.hasSelection()) {
2470
+ const r = this.mergeRanges(t.getRanges());
2471
+ if (r) {
2472
+ r.c2 = Math.min(r.c2, e.getColumnCount() - 1), r.r2 = Math.min(r.r2, e.getBodyModel().getRowCount() - 1);
2473
+ const n = [];
2474
+ for (let l = r.r1; l <= r.r2; l++) {
2475
+ const d = [];
2476
+ for (let c = r.c1; c <= r.c2; c++) {
2477
+ const h = t.isSelected(l, c) ? e.getBodyModel().getTextValueAt(l, c) : "";
2478
+ d.push(h);
2479
+ }
2480
+ n.push(d.join(F.columnSeparatorChar));
2481
+ }
2482
+ return s(n.join(F.rowSeparatorChar));
2483
+ }
2484
+ }
2485
+ if (o) {
2486
+ const [r, n] = o.getFocus(), l = e.getBodyModel().getTextValueAt(r, n);
2487
+ return s(l);
2488
+ }
2489
+ i("Cannot copy, neither selection nor focus defined.");
2490
+ });
2491
+ }
2492
+ /**
2493
+ * Copy the provided content to the clipboard.
2494
+ *
2495
+ * @param {string} content - The content to be copied.
2496
+ * @return {Promise<void>} A promise that resolves when the content has been successfully copied to the clipboard.
2497
+ */
2498
+ copyContent(e) {
2499
+ return navigator.clipboard.writeText(e);
2500
+ }
2501
+ /**
2502
+ * Asynchronously copies the content of a table to the clipboard.
2503
+ *
2504
+ * @param {TableModelIf} tableModel - The table model to copy from.
2505
+ * @param {SelectionModelIf} selectionModel - The selection model of the table.
2506
+ * @param {FocusModelIf} focusModel - The focus model of the table.
2507
+ * @returns {Promise<string>} A promise that resolves with the copied text if successful, or rejects if an error occurs.
2508
+ */
2509
+ copyToClipboard(e, t, o) {
2510
+ return new Promise((s, i) => {
2511
+ this.createContent(
2512
+ e,
2513
+ t,
2514
+ o
2515
+ ).then((r) => {
2516
+ r && this.copyContent(r).then((n) => {
2517
+ s(r);
2518
+ }).catch((n) => {
2519
+ i();
2520
+ });
2521
+ }).catch((r) => {
2522
+ i();
2523
+ });
2524
+ });
2525
+ }
2526
+ /**
2527
+ * Merges an array of CellRanges into a single merged CellRange.
2528
+ *
2529
+ * @param {CellRange[]} ranges - The array of CellRanges to be merged.
2530
+ * @return {CellRange | undefined} - The merged CellRange, or undefined if the ranges array is empty.
2531
+ */
2532
+ mergeRanges(e) {
2533
+ let t;
2534
+ for (const o of e)
2535
+ t ? (t.r1 = Math.min(t.r1, o.r1), t.c1 = Math.min(t.c1, o.c1), t.r2 = Math.max(t.r2, o.r2), t.c2 = Math.max(t.c2, o.c2)) : t = new E(o.r1, o.c1, o.r2, o.c2);
2536
+ return t;
2537
+ }
2538
+ };
2539
+ F.columnSeparatorChar = " ", F.rowSeparatorChar = `
2540
+ `;
2541
+ let H = F;
2542
+ class oe extends Je {
2543
+ constructor(e, t, o, s, i, r = new H()) {
2544
+ var n;
1950
2545
  if (super(
1951
2546
  e,
1952
2547
  t,
1953
- new $e(s),
1954
- i
1955
- ), this.eventListener = o, this.licenseManager = D.getInstance(), this.selectionService = new qe(this), this.api = new We(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, o || (this.eventListener = new ie()), (r = this.tableOptions) != null && r.autoRestoreOptions) {
1956
- const a = this.tableOptions.autoRestoreOptions, n = a.getStorageKeyFn;
1957
- n && (a.autoRestoreScrollPosition && (this.storeScrollPosStateService = new He(n)), a.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ke(n)), a.autoRestoreSortingState && (this.storeSortingService = new Ve(n)));
2548
+ new We(o),
2549
+ s
2550
+ ), this.eventListener = i, this.copyService = r, this.licenseManager = k.getInstance(), this.selectionService = new tt(this), this.api = new ze(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 le()), (n = this.tableOptions) != null && n.autoRestoreOptions) {
2551
+ const l = this.tableOptions.autoRestoreOptions, d = l.getStorageKeyFn;
2552
+ d && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Ne(d)), l.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new Xe(d)), l.autoRestoreSortingState && (this.storeSortingService = new Ke(d)));
1958
2553
  }
1959
- this.mouseHandler = new Be(this), this.inputHandler = new ze(this), this.shortcutService = new Qe(this), this.shortcutService.addListener(this.selectionService);
2554
+ this.mouseHandler = new Ve(this), this.inputHandler = new Ze(this), this.shortcutService = new it(this), this.shortcutService.addListener(this.selectionService);
1960
2555
  }
1961
2556
  /**
1962
2557
  * Creates a TableScope instance.
@@ -1966,33 +2561,47 @@ class Q extends Ke {
1966
2561
  * @param {TableOptionsIf} [tableOptions=new TableOptions()] - The optional table options object.
1967
2562
  * @param {EventListenerIf} [eventListener=new EventAdapter()] - The optional event listener object.
1968
2563
  * @param {DomServiceIf} [domService=new SimpleDomService()] - The optional DOM service object.
2564
+ * @param {CopyServiceIf} [copyService=new CopyService()] - The optional copy service object.
1969
2565
  *
1970
2566
  * @return {TableScope} - The newly created TableScope instance.
1971
2567
  */
1972
- static create(e, t, s = new ce(), i = new ie(), o = new he()) {
1973
- return new Q(
2568
+ static create(e, t, o = new Se(), s = new le(), i = new ue(), r = new H()) {
2569
+ return new oe(
1974
2570
  e,
1975
2571
  t,
2572
+ i,
1976
2573
  o,
1977
2574
  s,
1978
- i
2575
+ r
1979
2576
  );
1980
2577
  }
2578
+ /**
2579
+ * Triggers an action based on the provided actionId.
2580
+ *
2581
+ * This function can be invoked manually via the table API or by keyboard shortcuts.
2582
+ *
2583
+ * @param {ActionId} actionId - The identifier of the action to be triggered.
2584
+ * @return {boolean} - Returns true if the action was triggered successfully, false otherwise.
2585
+ */
1981
2586
  onActionTriggered(e) {
1982
2587
  if (e === "NAVIGATE_DOWN" && this.changeFocusCell(0, 1) || e === "NAVIGATE_UP" && this.changeFocusCell(0, -1) || e === "NAVIGATE_LEFT" && this.changeFocusCell(-1, 0) || e === "NAVIGATE_RIGHT" && this.changeFocusCell(1, 0))
1983
2588
  return !0;
1984
2589
  if (e === "START_EDITING" && this.getFocusModel) {
1985
2590
  const t = this.getFocusModel();
1986
2591
  if (t) {
1987
- const [s, i] = t.getFocus();
1988
- this.tableModel.getBodyModel().isEditable(s, i) && (this.clearSelection(), this.initRenderEditor(s, i));
2592
+ const [o, s] = t.getFocus();
2593
+ this.tableModel.getBodyModel().isEditable(o, s) && (this.clearSelection(), this.initRenderEditor(o, s));
1989
2594
  }
1990
2595
  return !0;
1991
2596
  }
2597
+ if (e === "COPY_2_CLIPBOARD") {
2598
+ const t = this.getSelectionModel ? this.getSelectionModel() : void 0, o = this.getFocusModel ? this.getFocusModel() : void 0;
2599
+ this.copyService.createContent(this.tableModel, t, o).then((s) => this.copyService.copyContent(s));
2600
+ }
1992
2601
  return !1;
1993
2602
  }
1994
- updateModelValueAfterEdit(e, t, s, i) {
1995
- e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, i) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(J.createSingle(t, s)), this.hostElement.focus());
2603
+ updateModelValueAfterEdit(e, t, o, s) {
2604
+ e === "body" && this.tableModel.getAreaModel(e).setValue(t, o, s) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(te.createSingle(t, o)), this.hostElement.focus());
1996
2605
  }
1997
2606
  /**
1998
2607
  * Retrieves the TableApi object.
@@ -2021,16 +2630,16 @@ class Q extends Ke {
2021
2630
  * @return {GeMouseEvent} - The created GeMouseEvent object.
2022
2631
  */
2023
2632
  createGeMouseEvent(e) {
2024
- const t = new Y();
2633
+ const t = new Q();
2025
2634
  if (t.originalEvent = e, e) {
2026
- const s = e.target;
2027
- if ([t.areaIdent, t.sideIdent] = this.getAreaAndSideIdentByAttr(s), t.rowIndex = this.getNumberByAttr(s, "data-row-index"), t.columnIndex = this.getNumberByAttr(s, "data-col-index"), t.action = this.getStringByAttr(s, "data-ge-action"), t.areaIdent) {
2028
- const i = this.tableModel.getAreaModel(t.areaIdent);
2029
- t.rowTop = i.getYPosByRowIndex(t.rowIndex);
2635
+ const o = e.target;
2636
+ if ([t.areaIdent, t.sideIdent] = this.getAreaAndSideIdentByAttr(o), t.rowIndex = this.getNumberByAttr(o, "data-row-index"), t.columnIndex = this.getNumberByAttr(o, "data-col-index"), t.action = this.getStringByAttr(o, "data-ge-action"), t.areaIdent) {
2637
+ const s = this.tableModel.getAreaModel(t.areaIdent);
2638
+ t.rowTop = s.getYPosByRowIndex(t.rowIndex);
2030
2639
  }
2031
2640
  if (t.columnLeft = this.tableModel.getXPosByColumnIndex(t.columnIndex), e.ctrlKey && e.altKey) {
2032
- const i = e.clientY - this.hostElement.offsetTop - this.areaHeaderCenter.parent.clientHeight, o = e.clientX - this.hostElement.offsetLeft - this.areaBodyWestGeo.width;
2033
- this.debugOnce(o, i);
2641
+ const s = e.clientY - this.hostElement.offsetTop - this.areaHeaderCenter.parent.clientHeight, i = e.clientX - this.hostElement.offsetLeft - this.areaBodyWestGeo.width;
2642
+ this.debugOnce(i, s);
2034
2643
  }
2035
2644
  }
2036
2645
  return t;
@@ -2042,15 +2651,16 @@ class Q extends Ke {
2042
2651
  * @return {void}
2043
2652
  */
2044
2653
  onMouseDown(e) {
2045
- e.columnIndex > -1 && e.action && ["resize-column", "drag-column"].includes(e.action) && (this.mouseStartWidth = this.tableModel.getColumnWidth(e.columnIndex), this.mouseStartAction = e.action, this.mouseStartColumnIndex = e.columnIndex, this.mouseStartAction === "drag-column" && (this.dragFrom = this.mouseStartColumnIndex));
2654
+ e.columnIndex > -1 && e.action && ["resize-column", "drag-column"].includes(e.action) && (this.mouseStartWidth = this.tableModel.getColumnWidth(e.columnIndex), this.mouseStartAction = e.action, this.mouseStartColumnIndex = e.columnIndex, this.mouseStartAction === "drag-column" && (this.firstDraggingRendering = !0, this.dragFrom = this.mouseStartColumnIndex));
2046
2655
  }
2047
2656
  /**
2048
2657
  * Handles mouse dragging on the frame.
2049
2658
  *
2050
2659
  * @param {GeMouseEvent} mouseEvent - The mouse event object.
2660
+ * @param startMouseEvent
2051
2661
  */
2052
- mouseDraggingOnFrame(e) {
2053
- this.eventListener.onMouseDragging(e), this.mouseEvent = e, this.mouseStartColumnIndex > -1 && this.mouseStartAction === "resize-column" && this.tableOptions.columnsResizable ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && e.columnIndex > -1 && this.tableOptions.columnsDraggable && (this.draggingTargetColumnIndex = e.columnIndex, this.dragTo = this.draggingTargetColumnIndex, this.dragFrom > -1 && this.dragTo > -1 && this.dragFrom !== this.dragTo && (this.tableModel.changeColumnOrder(this.dragFrom, this.dragTo), this.dragFrom = this.dragTo, this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows()), this.repaint());
2662
+ mouseDraggingOnFrame(e, t) {
2663
+ this.eventListener.onMouseDragging(e), this.mouseEvent = e, this.mouseStartColumnIndex > -1 && this.mouseStartAction === "resize-column" && this.tableOptions.columnsResizable ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && e.columnIndex > -1 && this.tableOptions.columnsDraggable && (this.draggingTargetColumnIndex = e.columnIndex, this.dragTo = this.draggingTargetColumnIndex, this.dragFrom > -1 && this.dragTo > -1 && this.dragFrom !== this.dragTo && (this.lastDragFrom === this.dragTo && this.lastDragTo === this.dragFrom || (this.tableModel.changeColumnOrder(this.dragFrom, this.dragTo), this.lastDragFrom = this.dragFrom, this.lastDragTo = this.dragTo, this.dragFrom = this.dragTo, this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows())), t && (this.adjustDraggingColumn(e, t.columnIndex, this.firstDraggingRendering), this.firstDraggingRendering = !1), this.repaint());
2054
2664
  }
2055
2665
  /**
2056
2666
  * Handles the end of mouse dragging event on a frame.
@@ -2060,7 +2670,7 @@ class Q extends Ke {
2060
2670
  * @returns {void}
2061
2671
  */
2062
2672
  mouseDraggingEndOnFrame(e) {
2063
- this.eventListener.onMouseDraggingEnd(e), this.draggingTargetColumnIndex = -1, this.mouseStartAction === "resize-column" ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && this.repaint(), this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.mouseStartAction = "";
2673
+ this.eventListener.onMouseDraggingEnd(e), this.draggingTargetColumnIndex = -1, this.mouseStartAction === "resize-column" ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && (this.hideDraggingColumn(), this.repaint()), this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.firstDraggingRendering = !0, this.mouseStartAction = "";
2064
2674
  }
2065
2675
  /**
2066
2676
  * Handles the mouse move event.
@@ -2088,9 +2698,9 @@ class Q extends Ke {
2088
2698
  * @return {void}
2089
2699
  */
2090
2700
  toggleExpandCollapseAll(e = !0) {
2091
- var s;
2701
+ var o;
2092
2702
  const t = this.tableModel.getBodyModel();
2093
- X(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
2703
+ U(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (o = this.storeStateCollapsedExpandService) == null || o.collapsedStateAll(e));
2094
2704
  }
2095
2705
  /**
2096
2706
  * Toggles the checkbox state of a specific row in a table.
@@ -2101,12 +2711,12 @@ class Q extends Ke {
2101
2711
  *
2102
2712
  * @return {void} - This method does not return anything.
2103
2713
  */
2104
- toggleRowCheckbox(e, t, s) {
2105
- var n;
2106
- const i = this.tableModel.getAreaModel(s), o = i.isRowChecked(e), r = o === void 0 || o === "semi" || o === "none";
2107
- i.setRowChecked(e, r), this.repaint();
2108
- const a = (n = i.rowSelectionModel) == null ? void 0 : n.getCheckedRows();
2109
- this.eventListener.onCheckboxChanged(a || []);
2714
+ toggleRowCheckbox(e, t, o) {
2715
+ var l;
2716
+ const s = this.tableModel.getAreaModel(o), i = s.isRowChecked(e), r = i === void 0 || i === "semi" || i === "none";
2717
+ s.setRowChecked(e, r), this.repaint();
2718
+ const n = (l = s.rowSelectionModel) == null ? void 0 : l.getCheckedRows();
2719
+ this.eventListener.onCheckboxChanged(n || []);
2110
2720
  }
2111
2721
  /**
2112
2722
  * Handle mouse click events.
@@ -2116,12 +2726,25 @@ class Q extends Ke {
2116
2726
  * @returns {void}
2117
2727
  */
2118
2728
  onMouseClicked(e, t) {
2119
- let s = this.selectionService.onMouseClicked(e, t);
2120
- if (!s && this.getFocusModel) {
2121
- const i = this.getFocusModel();
2122
- i && (s = i.hasChanged(), i.clearChanged(), s && this.resetEditorRenderer());
2729
+ let o = this.selectionService.onMouseClicked(e, t);
2730
+ if (!o && this.getFocusModel) {
2731
+ this.resetEditorRenderer();
2732
+ const s = this.getFocusModel();
2733
+ s && (o = s.hasChanged(), s.clearChanged());
2123
2734
  }
2124
- this.eventListener.onMouseClicked(e), s && this.debounce(this.repaint.bind(this), 10);
2735
+ return o;
2736
+ }
2737
+ debounceRepaint() {
2738
+ this.debounce(this.repaint.bind(this), 1);
2739
+ }
2740
+ publishGeMouseEvent(e) {
2741
+ this.eventListener.onMouseClicked(e);
2742
+ }
2743
+ onFocusChanged(e) {
2744
+ this.eventListener.onFocusChanged(e);
2745
+ }
2746
+ onSelectionChanged(e) {
2747
+ this.eventListener.onSelectionChanged(e);
2125
2748
  }
2126
2749
  /**
2127
2750
  * Updates the table (repaint) when an external filter is changed.
@@ -2142,15 +2765,73 @@ class Q extends Ke {
2142
2765
  *
2143
2766
  * @return {void}
2144
2767
  */
2145
- onHeaderDblClicked(e, t, s) {
2146
- var o, r;
2147
- const i = this.tableModel.getColumnDef(s);
2148
- if (i != null && i.sortable && i.sortable()) {
2768
+ onHeaderDblClicked(e, t, o) {
2769
+ var i, r;
2770
+ const s = this.tableModel.getColumnDef(o);
2771
+ if (s != null && s.sortable && s.sortable()) {
2149
2772
  e.preventDefault(), e.stopPropagation();
2150
- const a = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, n = i.sortState ?? "", d = a[(a.indexOf(n) + 1) % a.length], h = new Xe(s, d);
2151
- this.tableModel.doSort([h]) && ((o = this.tableModel.getColumnDefs()) == null || o.forEach((S) => S.sortState = ""), i.sortState = d), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([h]);
2773
+ const n = s.sortStatesOrder ? s.sortStatesOrder : this.tableOptions.sortOrder, l = s.sortState ?? "", d = n[(n.indexOf(l) + 1) % n.length], c = new Qe(o, d);
2774
+ this.tableModel.doSort([c]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((g) => g.sortState = ""), s.sortState = d), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([c]);
2152
2775
  }
2153
2776
  }
2777
+ /**
2778
+ * Scrolls the viewport to the specified pixel coordinates.
2779
+ *
2780
+ * @param {number} px - The horizontal pixel coordinate to scroll to.
2781
+ * @param {number} py - The vertical pixel coordinate to scroll to.
2782
+ *
2783
+ * @return {void}
2784
+ */
2785
+ scrollToPixel(e, t) {
2786
+ this.scrollViewport.scrollTo(e, t);
2787
+ }
2788
+ /**
2789
+ * Scrolls to the specified index in the table.
2790
+ *
2791
+ * @param {number} _indexX - The horizontal index of the table where scrolling is needed.
2792
+ * @param {number} indexY - The vertical index of the table where scrolling is needed.
2793
+ * @return {void}
2794
+ */
2795
+ scrollToIndex(e, t) {
2796
+ const s = this.tableModel.getAreaModel("body").getYPosByRowIndex(t);
2797
+ this.scrollToPixel(0, s);
2798
+ }
2799
+ /**
2800
+ * Sets the selection model for the table.
2801
+ *
2802
+ * @param {SelectionModel} sm - The selection model to be set.
2803
+ * @param {boolean} rerender - Optional parameter indicating whether to rerender the table after setting the selection model. Default value is false.
2804
+ *
2805
+ * @return {void} - This method does not return any value.
2806
+ */
2807
+ setSelectionModel(e, t = !1) {
2808
+ const o = () => e;
2809
+ this.tableOptions.getSelectionModel = o, this.getSelectionModel = o, this.selectionService.getSelectionModel = o, t && this.repaint();
2810
+ }
2811
+ toggleHeaderGroup(e) {
2812
+ const t = this.tableModel.getAreaModel("header");
2813
+ "columnDefs" in this.tableModel && (this.tableModel.columnDefs = t.toggleHeaderGroup(e), console.info("####### !!!!!! *******, this.tableModel.columnDefs")), this.firstInit();
2814
+ }
2815
+ /**
2816
+ * Retrieves the selection model.
2817
+ * @returns {SelectionModelIf | undefined} The selection model if available, otherwise undefined.
2818
+ */
2819
+ selectionModel() {
2820
+ if (this != null && this.getSelectionModel)
2821
+ return this.getSelectionModel();
2822
+ }
2823
+ /**
2824
+ * Retrieves the focus model.
2825
+ *
2826
+ * @returns {FocusModelIf | undefined} The focus model if it exists, or undefined otherwise.
2827
+ */
2828
+ focusModel() {
2829
+ if (this != null && this.getFocusModel)
2830
+ return this.getFocusModel();
2831
+ }
2832
+ setDragging(e) {
2833
+ this.dragging = e, this.dragging ? (this.storeColumnWidths(), this.lastDragFrom = -1, this.lastDragTo = -1) : this.storedColumnWidths = [];
2834
+ }
2154
2835
  /**
2155
2836
  * Changes the focus cell using the specified deltas.
2156
2837
  *
@@ -2160,10 +2841,10 @@ class Q extends Ke {
2160
2841
  */
2161
2842
  changeFocusCell(e, t) {
2162
2843
  if (!this.isEditing() && this.getFocusModel) {
2163
- const s = this.getFocusModel();
2164
- if (s) {
2165
- const [i, o] = s.getFocus();
2166
- return s.setFocus(i + t, o + e), this.repaint(), !0;
2844
+ const o = this.getFocusModel();
2845
+ if (o) {
2846
+ const [s, i] = o.getFocus();
2847
+ return o.setFocus(s + t, i + e), this.repaint(), !0;
2167
2848
  }
2168
2849
  }
2169
2850
  return !1;
@@ -2186,22 +2867,20 @@ class Q extends Ke {
2186
2867
  this.getSelectionModel && ((e = this.getSelectionModel()) == null || e.clear());
2187
2868
  }
2188
2869
  debugOnce(e, t) {
2189
- var s;
2190
- console.clear(), console.info("this.hostElement.offsetTop", this.hostElement.offsetTop), console.info("this.hostElement.scrollHeight", this.hostElement.scrollHeight), console.info("this.scrollViewportTop", this.scrollTop), console.info("this.areaHeaderCenter.parent.clientHeight", this.areaHeaderCenter.parent.clientHeight), console.info("bodyY", t), console.info("bodyX", e), console.info("rows", this.firstVisibleRowIndex), console.info(""), console.info("this.tableModel", this.tableModel), console.info(""), console.info("this.mouseMoveEvent.clientX", (s = this.mouseHandler.mouseEvent) == null ? void 0 : s.clientX), console.info("this.hostElement.offsetLeft", this.hostElement.offsetLeft), console.info("this.areaBodyWestGeo.width", this.areaBodyWestGeo.width);
2870
+ var o;
2871
+ console.clear(), console.info("this.hostElement.offsetTop", this.hostElement.offsetTop), console.info("this.hostElement.scrollHeight", this.hostElement.scrollHeight), console.info("this.scrollViewportTop", this.scrollTop), console.info("this.areaHeaderCenter.parent.clientHeight", this.areaHeaderCenter.parent.clientHeight), console.info("bodyY", t), console.info("bodyX", e), console.info("rows", this.firstVisibleRowIndex), console.info(""), console.info("this.tableModel", this.tableModel), console.info(""), console.info("this.mouseMoveEvent.clientX", (o = this.mouseHandler.mouseEvent) == null ? void 0 : o.clientX), console.info("this.hostElement.offsetLeft", this.hostElement.offsetLeft), console.info("this.areaBodyWestGeo.width", this.areaBodyWestGeo.width);
2191
2872
  }
2192
2873
  /**
2193
2874
  * Restores the scroll position of the table if auto restore options are enabled.
2194
2875
  *
2195
- * @private
2196
- * @memberof ClassName
2197
2876
  *
2198
2877
  * @returns {void}
2199
2878
  */
2200
2879
  autoRestoreScrollPosition() {
2201
2880
  var e;
2202
2881
  if ((e = this.tableOptions) != null && e.autoRestoreOptions && this.storeScrollPosStateService && this.tableOptions.autoRestoreOptions.autoRestoreScrollPosition) {
2203
- const s = this.storeScrollPosStateService.getScrollOffset();
2204
- s && this.scrollViewport.scrollTo(...s);
2882
+ const o = this.storeScrollPosStateService.getScrollOffset();
2883
+ o && this.scrollViewport.scrollTo(...o);
2205
2884
  }
2206
2885
  }
2207
2886
  /**
@@ -2221,8 +2900,8 @@ class Q extends Ke {
2221
2900
  autoRestoreSortingState() {
2222
2901
  var e, t;
2223
2902
  if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.autoRestoreSortingState && this.storeSortingService) {
2224
- const s = this.storeSortingService.getSortItems();
2225
- s != null && s.length && this.tableModel.getBodyModel().doSort(s);
2903
+ const o = this.storeSortingService.getSortItems();
2904
+ o != null && o.length && this.tableModel.getBodyModel().doSort(o);
2226
2905
  }
2227
2906
  }
2228
2907
  /**
@@ -2234,137 +2913,399 @@ class Q extends Ke {
2234
2913
  autoRestoreCollapsedExpandedState() {
2235
2914
  var e, t;
2236
2915
  if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
2237
- const s = this.tableOptions.autoRestoreOptions, i = s.getRowId;
2238
- if (s.autoRestoreCollapsedExpandedState && i) {
2239
- const o = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
2240
- if (X(r)) {
2241
- const a = r, n = r.getRowCount();
2242
- for (let d = 0; d < n; d++) {
2243
- const h = r.getRowByIndex(d);
2244
- if (h)
2245
- if (o.allExpanded)
2246
- h.expanded = !0;
2247
- else if (o.allCollapsed)
2248
- h.expanded = !1;
2916
+ const o = this.tableOptions.autoRestoreOptions, s = o.getRowId;
2917
+ if (o.autoRestoreCollapsedExpandedState && s) {
2918
+ const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
2919
+ if (U(r)) {
2920
+ const n = r, l = r.getRowCount();
2921
+ for (let d = 0; d < l; d++) {
2922
+ const c = r.getRowByIndex(d);
2923
+ if (c)
2924
+ if (i.allExpanded)
2925
+ c.expanded = !0;
2926
+ else if (i.allCollapsed)
2927
+ c.expanded = !1;
2249
2928
  else {
2250
- const c = i(h.data);
2251
- o.mode === "expanded" ? h.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(c) : o.mode === "collapsed" && (h.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(c));
2929
+ const h = s(c.data);
2930
+ i.mode === "expanded" ? c.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h) : i.mode === "collapsed" && (c.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h));
2252
2931
  }
2253
2932
  }
2254
- a.recalcVisibleTreeRows();
2933
+ n.recalcVisibleTreeRows();
2255
2934
  }
2256
2935
  }
2257
2936
  }
2258
2937
  }
2259
- /**
2260
- * Scrolls the viewport to the specified pixel coordinates.
2261
- *
2262
- * @param {number} px - The horizontal pixel coordinate to scroll to.
2263
- * @param {number} py - The vertical pixel coordinate to scroll to.
2264
- *
2265
- * @return {void}
2266
- */
2267
- scrollToPixel(e, t) {
2268
- this.scrollViewport.scrollTo(e, t);
2938
+ }
2939
+ const W = class W {
2940
+ };
2941
+ W.themes = ["light", "combat", "paper", "blackboard"], W.vars = {
2942
+ light: `html[data-theme="light"] {
2943
+ --ge-table-bg: rgba(255,255,255, 0.5);
2944
+ --ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
2945
+ --ge-table-header-center-bg: rgba(233, 233, 233, 0.5);
2946
+ --ge-table-header-east-bg: rgba(233, 233, 233, 0.5);
2947
+ --ge-table-header-west-text: #000;
2948
+ --ge-table-header-center-text: #000;
2949
+ --ge-table-header-east-text: #000;
2950
+ --ge-table-header-west-horizontal-border: #ddd;
2951
+ --ge-table-header-west-vertical-border: #ccc;
2952
+ --ge-table-header-center-horizontal-border: #ddd;
2953
+ --ge-table-header-center-vertical-border: #ccc;
2954
+ --ge-table-header-east-horizontal-border: #ddd;
2955
+ --ge-table-header-east-vertical-border: #ccc;
2956
+ --ge-table-body-west-bg: rgba(233, 233, 233, 0.5);
2957
+ --ge-table-body-center-bg: rgba(255,255,255, 0.5);
2958
+ --ge-table-body-east-bg: rgba(233, 233, 233, 0.5);
2959
+ --ge-table-body-west-text: #000;
2960
+ --ge-table-body-center-text: #000;
2961
+ --ge-table-body-east-text: #000;
2962
+ --ge-table-body-west-horizontal-border: #ddd;
2963
+ --ge-table-body-west-vertical-border: #ccc;
2964
+ --ge-table-body-center-horizontal-border: #bbb;
2965
+ --ge-table-body-center-vertical-border: #ddd;
2966
+ --ge-table-body-east-horizontal-border: #ddd;
2967
+ --ge-table-body-east-vertical-border: #ccc;
2968
+ --ge-table-body-west-selected-range-bg: rgba(0, 152, 219, 0.4);
2969
+ --ge-table-body-center-selected-range-bg: rgba(0, 152, 219, 0.4);
2970
+ --ge-table-body-east-selected-range-bg: rgba(0, 152, 219, 0.4);
2971
+ --ge-table-body-west-selected-range-text: #000;
2972
+ --ge-table-body-center-selected-range-text: #000;
2973
+ --ge-table-body-east-selected-range-text: #000;
2974
+ --ge-table-footer-west-bg: rgba(233, 233, 233, 0.5);
2975
+ --ge-table-footer-center-bg: rgba(233, 233, 233, 0.5);
2976
+ --ge-table-footer-east-bg: rgba(233, 233, 233, 0.5);
2977
+ --ge-table-footer-west-text: #000;
2978
+ --ge-table-footer-center-text: #000;
2979
+ --ge-table-footer-east-text: #000;
2980
+ --ge-table-footer-west-horizontal-border: #ddd;
2981
+ --ge-table-footer-west-vertical-border: #ccc;
2982
+ --ge-table-footer-center-horizontal-border: #ddd;
2983
+ --ge-table-footer-center-vertical-border: #ccc;
2984
+ --ge-table-footer-east-horizontal-border: #ddd;
2985
+ --ge-table-footer-east-vertical-border: #ccc;
2986
+ --ge-table-border: #ccc;
2987
+ --ge-table-row-odd-bg: transparent;
2988
+ --ge-table-row-even-bg: transparent;
2989
+ --ge-table-column-odd-bg: transparent;
2990
+ --ge-table-column-even-bg: transparent;
2991
+ --ge-table-hover-column-bg: rgba(0, 224, 255, 0.27);
2992
+ --ge-table-hover-row-bg: rgba(0, 224, 255, 0.27);
2993
+ --ge-table-focus-border: rgb(0, 255, 255);
2994
+ --ge-table-color-error-text: #e00034;
2995
+ --ge-table-tree-arrow-collapsed-color: #e00034;
2996
+ --ge-table-column-resize-handle-border: rgb(0, 255, 255);
2997
+ --ge-table-dragged-col-div-bg: lightcyan;
2998
+ --ge-table-drop-zone-bg: rgba(244, 255, 242, 0.6);
2999
+ }`,
3000
+ combat: `html[data-theme="combat"] {
3001
+ --ge-table-bg: #101010;
3002
+ --ge-table-header-west-bg: #101010;
3003
+ --ge-table-header-center-bg: #101010;
3004
+ --ge-table-header-east-bg: #101010;
3005
+ --ge-table-header-west-text: oklch(100% 0 0);
3006
+ --ge-table-header-center-text: oklch(100% 0 0);
3007
+ --ge-table-header-east-text: oklch(100% 0 0);
3008
+ --ge-table-header-west-horizontal-border: oklch(100% 0 0 / 0%);
3009
+ --ge-table-header-west-vertical-border: oklch(100% 0 0 / 0%);
3010
+ --ge-table-header-center-horizontal-border: oklch(100% 0 0 / 0%);
3011
+ --ge-table-header-center-vertical-border: oklch(100% 0 0 / 0%);
3012
+ --ge-table-header-east-horizontal-border: oklch(100% 0 0 / 0%);
3013
+ --ge-table-header-east-vertical-border: oklch(100% 0 0 / 0%);
3014
+ --ge-table-body-west-bg: #101010;
3015
+ --ge-table-body-center-bg: #101010;
3016
+ --ge-table-body-east-bg: #101010;
3017
+ --ge-table-body-west-text: #b6b4b4;
3018
+ --ge-table-body-center-text: #b6b4b4;
3019
+ --ge-table-body-east-text: #b6b4b4;
3020
+ --ge-table-body-west-horizontal-border: oklch(100% 0 0 / 0%);
3021
+ --ge-table-body-west-vertical-border: oklch(100% 0 0 / 0%);
3022
+ --ge-table-body-center-horizontal-border: oklch(100% 0 0 / 0%);
3023
+ --ge-table-body-center-vertical-border: oklch(100% 0 0 / 0%);
3024
+ --ge-table-body-east-horizontal-border: oklch(100% 0 0 / 0%);
3025
+ --ge-table-body-east-vertical-border: oklch(100% 0 0 / 0%);
3026
+ --ge-table-body-west-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
3027
+ --ge-table-body-center-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
3028
+ --ge-table-body-east-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
3029
+ --ge-table-body-west-selected-range-text: #f00032;
3030
+ --ge-table-body-center-selected-range-text: #f00032;
3031
+ --ge-table-body-east-selected-range-text: #f00032;
3032
+ --ge-table-footer-west-bg: #101010;
3033
+ --ge-table-footer-center-bg: #101010;
3034
+ --ge-table-footer-east-bg: #101010;
3035
+ --ge-table-footer-west-text: oklch(100% 0 0);
3036
+ --ge-table-footer-center-text: oklch(100% 0 0);
3037
+ --ge-table-footer-east-text: oklch(100% 0 0);
3038
+ --ge-table-footer-west-horizontal-border: oklch(100% 0 0 / 0%);
3039
+ --ge-table-footer-west-vertical-border: oklch(100% 0 0 / 0%);
3040
+ --ge-table-footer-center-horizontal-border: oklch(100% 0 0 / 0%);
3041
+ --ge-table-footer-center-vertical-border: oklch(100% 0 0 / 0%);
3042
+ --ge-table-footer-east-horizontal-border: oklch(100% 0 0 / 0%);
3043
+ --ge-table-footer-east-vertical-border: oklch(100% 0 0 / 0%);
3044
+ --ge-table-border: oklch(100% 0 0 / 0%);
3045
+ --ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
3046
+ --ge-table-row-even-bg: oklch(100% 0 0 / 0%);
3047
+ --ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
3048
+ --ge-table-column-even-bg: oklch(100% 0 0 / 0%);
3049
+ --ge-table-hover-column-bg: oklch(34% 0.25 3.6 / 27%);
3050
+ --ge-table-hover-row-bg: oklch(34% 0.25 3.6 / 27%);
3051
+ --ge-table-focus-border: oklch(40% 0.25 3.6);
3052
+ --ge-table-color-error-text: oklch(65% 0.31 43.2);
3053
+ --ge-table-tree-arrow-collapsed-color: #e00034;
3054
+ --ge-table-column-resize-handle-border: oklch(63% 0.31 43.2);
3055
+ --ge-table-dragged-col-div-bg: #2c2e33;
3056
+ --ge-table-drop-zone-bg: #101010;
3057
+ }`,
3058
+ paper: `html[data-theme="paper"] {
3059
+ --ge-table-bg: #e7e5df;
3060
+ --ge-table-header-west-bg: oklch(80% 0.02 99 / 48%);
3061
+ --ge-table-header-center-bg: oklch(80% 0.02 99 / 48%);
3062
+ --ge-table-header-east-bg: oklch(80% 0.02 99 / 48%);
3063
+ --ge-table-header-west-text: #111;
3064
+ --ge-table-header-center-text: #111;
3065
+ --ge-table-header-east-text: #111;
3066
+ --ge-table-header-west-horizontal-border: oklch(100% 0 0 / 0%);
3067
+ --ge-table-header-west-vertical-border: oklch(100% 0 0 / 0%);
3068
+ --ge-table-header-center-horizontal-border: oklch(100% 0 0 / 0%);
3069
+ --ge-table-header-center-vertical-border: oklch(100% 0 0 / 0%);
3070
+ --ge-table-header-east-horizontal-border: oklch(100% 0 0 / 0%);
3071
+ --ge-table-header-east-vertical-border: oklch(100% 0 0 / 0%);
3072
+ --ge-table-body-west-bg: oklch(80% 0.02 99 / 48%);
3073
+ --ge-table-body-center-bg: #e7e5df;
3074
+ --ge-table-body-east-bg: oklch(80% 0.02 99 / 48%);
3075
+ --ge-table-body-west-text: #000;
3076
+ --ge-table-body-center-text: #000;
3077
+ --ge-table-body-east-text: #000;
3078
+ --ge-table-body-west-horizontal-border: oklch(100% 0 0 / 0%);
3079
+ --ge-table-body-west-vertical-border: oklch(100% 0 0 / 0%);
3080
+ --ge-table-body-center-horizontal-border: oklch(100% 0 0 / 0%);
3081
+ --ge-table-body-center-vertical-border: oklch(100% 0 0 / 0%);
3082
+ --ge-table-body-east-horizontal-border: oklch(100% 0 0 / 0%);
3083
+ --ge-table-body-east-vertical-border: oklch(100% 0 0 / 0%);
3084
+ --ge-table-body-west-selected-range-bg: #cfcdc2;
3085
+ --ge-table-body-center-selected-range-bg: #cfcdc2;
3086
+ --ge-table-body-east-selected-range-bg: #cfcdc2;
3087
+ --ge-table-body-west-selected-range-text: #000;
3088
+ --ge-table-body-center-selected-range-text: #000;
3089
+ --ge-table-body-east-selected-range-text: #000;
3090
+ --ge-table-footer-west-bg: oklch(80% 0.02 99 / 48%);
3091
+ --ge-table-footer-center-bg: oklch(80% 0.02 99 / 48%);
3092
+ --ge-table-footer-east-bg: oklch(80% 0.02 99 / 48%);
3093
+ --ge-table-footer-west-text: #111;
3094
+ --ge-table-footer-center-text: #111;
3095
+ --ge-table-footer-east-text: #111;
3096
+ --ge-table-footer-west-horizontal-border: oklch(100% 0 0 / 0%);
3097
+ --ge-table-footer-west-vertical-border: oklch(100% 0 0 / 0%);
3098
+ --ge-table-footer-center-horizontal-border: oklch(100% 0 0 / 0%);
3099
+ --ge-table-footer-center-vertical-border: oklch(100% 0 0 / 0%);
3100
+ --ge-table-footer-east-horizontal-border: oklch(100% 0 0 / 0%);
3101
+ --ge-table-footer-east-vertical-border: oklch(100% 0 0 / 0%);
3102
+ --ge-table-border: oklch(100% 0 0 / 0%);
3103
+ --ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
3104
+ --ge-table-row-even-bg: oklch(100% 0 0 / 0%);
3105
+ --ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
3106
+ --ge-table-column-even-bg: oklch(100% 0 0 / 0%);
3107
+ --ge-table-hover-column-bg: oklch(5% 0.2 266.40000000000003 / 9%);
3108
+ --ge-table-hover-row-bg: oklch(5% 0.2 266.40000000000003 / 9%);
3109
+ --ge-table-focus-border: oklch(100% 0.19 205.20000000000002);
3110
+ --ge-table-color-error-text: oklch(45% 0.25 43.2);
3111
+ --ge-table-tree-arrow-collapsed-color: #e00034;
3112
+ --ge-table-column-resize-handle-border: oklch(100% 0.19 205.20000000000002 / 71%);
3113
+ --ge-table-dragged-col-div-bg: #2c2e33;
3114
+ --ge-table-drop-zone-bg: #e7e5df;
3115
+ }`,
3116
+ blackboard: `html[data-theme="dark"] {
3117
+ --ge-table-bg: #0c1021;
3118
+ --ge-table-header-west-bg: #0c1021;
3119
+ --ge-table-header-center-bg: #0c1021;
3120
+ --ge-table-header-east-bg: #0c1021;
3121
+ --ge-table-header-west-text: #e0df85;
3122
+ --ge-table-header-center-text: #e0df85;
3123
+ --ge-table-header-east-text: #e0df85;
3124
+ --ge-table-header-west-horizontal-border: transparent;
3125
+ --ge-table-header-west-vertical-border: transparent;
3126
+ --ge-table-header-center-horizontal-border: transparent;
3127
+ --ge-table-header-center-vertical-border: transparent;
3128
+ --ge-table-header-east-horizontal-border: transparent;
3129
+ --ge-table-header-east-vertical-border: transparent;
3130
+ --ge-table-body-west-bg: #0c1021;
3131
+ --ge-table-body-center-bg: #0c1021;
3132
+ --ge-table-body-east-bg: #0c1021;
3133
+ --ge-table-body-west-text: #a7a7a7;
3134
+ --ge-table-body-center-text: #a7a7a7;
3135
+ --ge-table-body-east-text: #a7a7a7;
3136
+ --ge-table-body-west-horizontal-border: transparent;
3137
+ --ge-table-body-west-vertical-border: transparent;
3138
+ --ge-table-body-center-horizontal-border: transparent;
3139
+ --ge-table-body-center-vertical-border: transparent;
3140
+ --ge-table-body-east-horizontal-border: transparent;
3141
+ --ge-table-body-east-vertical-border: transparent;
3142
+ --ge-table-body-west-selected-range-bg: #758129;
3143
+ --ge-table-body-center-selected-range-bg: #758129;
3144
+ --ge-table-body-east-selected-range-bg: #758129;
3145
+ --ge-table-body-west-selected-range-text: oklch(100% 0 0);
3146
+ --ge-table-body-center-selected-range-text: oklch(100% 0 0);
3147
+ --ge-table-body-east-selected-range-text: oklch(100% 0 0);
3148
+ --ge-table-footer-west-bg: #0c1021;
3149
+ --ge-table-footer-center-bg: #0c1021;
3150
+ --ge-table-footer-east-bg: #0c1021;
3151
+ --ge-table-footer-west-text: #e0df85;
3152
+ --ge-table-footer-center-text: #e0df85;
3153
+ --ge-table-footer-east-text: #e0df85;
3154
+ --ge-table-footer-west-horizontal-border: transparent;
3155
+ --ge-table-footer-west-vertical-border: transparent;
3156
+ --ge-table-footer-center-horizontal-border: transparent;
3157
+ --ge-table-footer-center-vertical-border: otransparent;
3158
+ --ge-table-footer-east-horizontal-border: transparent;
3159
+ --ge-table-footer-east-vertical-border: transparent;
3160
+ --ge-table-border: oklch(0% 0 0);
3161
+ --ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
3162
+ --ge-table-row-even-bg: oklch(100% 0 0 / 0%);
3163
+ --ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
3164
+ --ge-table-column-even-bg: oklch(100% 0 0 / 0%);
3165
+ --ge-table-hover-column-bg: #a9a9a9;
3166
+ --ge-table-hover-row-bg: #a9a9a9;
3167
+ --ge-table-focus-border: #e1ff00;
3168
+ --ge-table-color-error-text: #ff0040;
3169
+ --ge-table-tree-arrow-collapsed-color: #e00034;
3170
+ --ge-table-column-resize-handle-border: oklch(0% 0 0);
3171
+ --ge-table-dragged-col-div-bg: #2c2e33;
3172
+ --ge-table-drop-zone-bg: #758129;
3173
+ }`
3174
+ };
3175
+ let ae = W;
3176
+ const G = class G {
3177
+ constructor(e = new fe()) {
3178
+ this.headerGroupOptions = e;
3179
+ }
3180
+ render(e, t, o, s, i, r, n) {
3181
+ const l = r != null && r.data ? r.data : "";
3182
+ if (r) {
3183
+ const { toggle: d, visibility: c, closed: h } = r, g = d ? G.toggleHeaderGroup : "";
3184
+ this.addText(e, s, t, o, l, g), d && c !== "always" && this.addArrowDiv(n, e, !h, t, o, s, g);
3185
+ } else
3186
+ this.addText(e, s, t, o, l, "");
2269
3187
  }
2270
- /**
2271
- * Scrolls to the specified index in the table.
2272
- *
2273
- * @param {number} _indexX - The horizontal index of the table where scrolling is needed.
2274
- * @param {number} indexY - The vertical index of the table where scrolling is needed.
2275
- * @return {void}
2276
- */
2277
- scrollToIndex(e, t) {
2278
- const i = this.tableModel.getAreaModel("body").getYPosByRowIndex(t);
2279
- this.scrollToPixel(0, i);
3188
+ addText(e, t, o, s, i, r) {
3189
+ e.innerHTML = `<span
3190
+ data-ge-action="${r}"
3191
+ data-area="${t}"
3192
+ data-row-index="${o}"
3193
+ data-col-index="${s}"
3194
+ >${i}</span>`;
3195
+ }
3196
+ addArrowDiv(e, t, o = !0, s = -1, i = -1, r = "header", n) {
3197
+ const l = e.createElement("div");
3198
+ e.addClass(l, "ge-table-toggle-icon-div"), e.setStyle(l, "display", "inline-block"), e.setStyle(l, "position", ""), e.setStyle(l, "width", "20px"), e.setStyle(l, "background", "transparent"), e.setStyle(l, "cursor", "pointer"), e.setAttribute(l, "data-row-index", `${s}`), e.setAttribute(l, "data-col-index", `${i}`), e.setAttribute(l, "data-area", `${r}`), e.setAttribute(l, "data-ge-action", `${n}`);
3199
+ let d;
3200
+ o ? d = this.headerGroupOptions.iconExpanded : d = this.headerGroupOptions.iconCollapsed;
3201
+ const c = d.content, h = e.createText(c);
3202
+ e.appendChild(l, h), d.style && this.applyStyleString(e, l, d.style);
3203
+ for (const g of d.classes)
3204
+ e.addClass(l, g);
3205
+ return e.appendChild(t, l), l;
3206
+ }
3207
+ applyStyleString(e, t, o) {
3208
+ const s = o.split(";").map((i) => i.trim()).filter((i) => i);
3209
+ for (const i of s) {
3210
+ const [r, n] = i.split(":");
3211
+ e.setStyle(t, r.trim(), n.trim());
3212
+ }
2280
3213
  }
2281
- }
2282
- function ot(l) {
3214
+ };
3215
+ G.toggleHeaderGroup = "toggleHeaderGroup";
3216
+ let ne = G;
3217
+ function ct(a) {
2283
3218
  let e;
2284
3219
  return {
2285
3220
  c() {
2286
- e = ye("div"), ve(e, "class", "ge-table"), _(e, "width", "100%"), _(e, "height", "100%"), _(e, "background-color", "transparent"), _(e, "padding", "0"), _(e, "margin", "0");
3221
+ e = Ae("div"), Me(e, "class", "ge-table"), _(e, "width", "100%"), _(e, "height", "100%"), _(e, "background-color", "transparent"), _(e, "padding", "0"), _(e, "margin", "0");
2287
3222
  },
2288
- m(t, s) {
2289
- be(t, e, s), l[4](e);
3223
+ m(t, o) {
3224
+ Ee(t, e, o), a[4](e);
2290
3225
  },
2291
- p: L,
2292
- i: L,
2293
- o: L,
3226
+ p: $,
3227
+ i: $,
3228
+ o: $,
2294
3229
  d(t) {
2295
- t && re(e), l[4](null);
3230
+ t && he(e), a[4](null);
2296
3231
  }
2297
3232
  };
2298
3233
  }
2299
- function lt(l, e, t) {
2300
- let { tableModel: s } = e, { tableOptions: i = new ce() } = e, { licenseKey: o } = e, r;
2301
- const a = Se();
2302
- ge(() => {
3234
+ function ht(a, e, t) {
3235
+ let { tableModel: o } = e, { tableOptions: s = new Se() } = e, { licenseKey: i } = e, r;
3236
+ const n = ve();
3237
+ we(() => {
2303
3238
  const d = {
2304
- onCheckboxChanged: (c) => {
2305
- a("checkboxChanged", c);
3239
+ onSelectionChanged(h) {
3240
+ n("selectionChanged", h);
3241
+ },
3242
+ onFocusChanged(h) {
3243
+ n("focusChanged", h);
3244
+ },
3245
+ onCheckboxChanged: (h) => {
3246
+ n("checkboxChanged", h);
2306
3247
  },
2307
- onContextmenu: (c) => {
2308
- a("contextmenu", c);
3248
+ onContextmenu: (h) => {
3249
+ n("contextmenu", h);
2309
3250
  },
2310
- onModelChanged: (c) => {
2311
- a("modelChanged", c);
3251
+ onModelChanged: (h) => {
3252
+ n("modelChanged", h);
2312
3253
  },
2313
- onMouseClicked: (c) => {
2314
- a("mouseClicked", c);
3254
+ onMouseClicked: (h) => {
3255
+ n("mouseClicked", h);
2315
3256
  },
2316
- onMouseDragging: (c) => {
2317
- a("mouseDragging", c);
3257
+ onMouseDragging: (h) => {
3258
+ n("mouseDragging", h);
2318
3259
  },
2319
- onMouseDraggingEnd: (c) => {
2320
- a("mouseDraggingEnd", c);
3260
+ onMouseDraggingEnd: (h) => {
3261
+ n("mouseDraggingEnd", h);
2321
3262
  },
2322
- onMouseMoved: (c) => {
2323
- a("mouseMoved", c);
3263
+ onMouseMoved: (h) => {
3264
+ n("mouseMoved", h);
2324
3265
  }
2325
- }, h = new Q(r, s, new he(), i, d);
2326
- h.firstInit(), a("tableReady", h.getApi()), o && D.getInstance().setLicenseKey(o);
3266
+ }, c = new oe(r, o, new ue(), s, d);
3267
+ c.firstInit(), n("tableReady", c.getApi()), i && k.getInstance().setLicenseKey(i);
2327
3268
  });
2328
- function n(d) {
2329
- G[d ? "unshift" : "push"](() => {
3269
+ function l(d) {
3270
+ X[d ? "unshift" : "push"](() => {
2330
3271
  r = d, t(0, r);
2331
3272
  });
2332
3273
  }
2333
- return l.$$set = (d) => {
2334
- "tableModel" in d && t(1, s = d.tableModel), "tableOptions" in d && t(2, i = d.tableOptions), "licenseKey" in d && t(3, o = d.licenseKey);
2335
- }, [r, s, i, o, n];
3274
+ return a.$$set = (d) => {
3275
+ "tableModel" in d && t(1, o = d.tableModel), "tableOptions" in d && t(2, s = d.tableOptions), "licenseKey" in d && t(3, i = d.licenseKey);
3276
+ }, [r, o, s, i, l];
2336
3277
  }
2337
- class at extends Oe {
3278
+ class bt extends Pe {
2338
3279
  constructor(e) {
2339
- super(), Fe(this, e, lt, ot, fe, {
3280
+ super(), Be(this, e, ht, ct, xe, {
2340
3281
  tableModel: 1,
2341
3282
  tableOptions: 2,
2342
3283
  licenseKey: 3
2343
3284
  });
2344
3285
  }
2345
3286
  }
2346
- class dt {
3287
+ class ut {
2347
3288
  constructor(e) {
2348
3289
  this.Component = e;
2349
3290
  }
2350
- render(e, t, s, i, o, r, a) {
2351
- const n = new this.Component({
3291
+ render(e, t, o, s, i, r, n) {
3292
+ const l = new this.Component({
2352
3293
  target: e,
2353
3294
  props: {
2354
3295
  cellDiv: e,
2355
3296
  rowIndex: t,
2356
- columnIndex: s,
2357
- areaIdent: i,
2358
- areaModel: o,
3297
+ columnIndex: o,
3298
+ areaIdent: s,
3299
+ areaModel: i,
2359
3300
  cellValue: r
2360
3301
  }
2361
3302
  });
2362
3303
  return () => {
2363
- n.$destroy();
3304
+ l.$destroy();
2364
3305
  };
2365
3306
  }
2366
3307
  }
2367
3308
  export {
2368
- dt as ComponentRendererWrapper,
2369
- at as GuiexpertTable
3309
+ ut as ComponentRendererWrapper,
3310
+ bt as GuiexpertTable
2370
3311
  };