@guiexpert/svelte-table 1.0.8 → 1.0.10

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 +5 -5
  2. package/index.js +765 -448
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1,155 +1,155 @@
1
- var he = Object.defineProperty;
2
- var ce = (l, e, t) => e in l ? he(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
3
- var k = (l, e, t) => (ce(l, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { createEventDispatcher as pe, onMount as ue } from "svelte";
5
- function F() {
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() {
6
6
  }
7
- function se(l) {
7
+ function oe(l) {
8
8
  return l();
9
9
  }
10
- function Z() {
10
+ function te() {
11
11
  return /* @__PURE__ */ Object.create(null);
12
12
  }
13
- function W(l) {
14
- l.forEach(se);
13
+ function H(l) {
14
+ l.forEach(oe);
15
15
  }
16
- function ie(l) {
16
+ function le(l) {
17
17
  return typeof l == "function";
18
18
  }
19
- function Se(l, e) {
19
+ function fe(l, e) {
20
20
  return l != l ? e == e : l !== e || l && typeof l == "object" || typeof l == "function";
21
21
  }
22
- function ge(l) {
22
+ function me(l) {
23
23
  return Object.keys(l).length === 0;
24
24
  }
25
- function fe(l, e, t) {
25
+ function be(l, e, t) {
26
26
  l.insertBefore(e, t || null);
27
27
  }
28
- function oe(l) {
28
+ function re(l) {
29
29
  l.parentNode && l.parentNode.removeChild(l);
30
30
  }
31
- function me(l) {
31
+ function ye(l) {
32
32
  return document.createElement(l);
33
33
  }
34
- function be(l, e, t) {
34
+ function ve(l, e, t) {
35
35
  t == null ? l.removeAttribute(e) : l.getAttribute(e) !== t && l.setAttribute(e, t);
36
36
  }
37
- function ye(l) {
37
+ function xe(l) {
38
38
  return Array.from(l.childNodes);
39
39
  }
40
- function L(l, e, t, s) {
40
+ function _(l, e, t, s) {
41
41
  t == null ? l.style.removeProperty(e) : l.style.setProperty(e, t, s ? "important" : "");
42
42
  }
43
43
  let z;
44
- function _(l) {
44
+ function B(l) {
45
45
  z = l;
46
46
  }
47
- const $ = [], V = [];
48
- let O = [];
49
- const ee = [], ve = /* @__PURE__ */ Promise.resolve();
50
- let G = !1;
51
- function xe() {
52
- G || (G = !0, ve.then(le));
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));
53
53
  }
54
- function N(l) {
55
- O.push(l);
54
+ function j(l) {
55
+ $.push(l);
56
56
  }
57
- const P = /* @__PURE__ */ new Set();
58
- let I = 0;
59
- function le() {
60
- if (I !== 0)
57
+ const V = /* @__PURE__ */ new Set();
58
+ let F = 0;
59
+ function ne() {
60
+ if (F !== 0)
61
61
  return;
62
62
  const l = z;
63
63
  do {
64
64
  try {
65
- for (; I < $.length; ) {
66
- const e = $[I];
67
- I++, _(e), Ce(e.$$);
65
+ for (; F < O.length; ) {
66
+ const e = O[F];
67
+ F++, B(e), Ee(e.$$);
68
68
  }
69
69
  } catch (e) {
70
- throw $.length = 0, I = 0, e;
70
+ throw O.length = 0, F = 0, e;
71
71
  }
72
- for (_(null), $.length = 0, I = 0; V.length; )
73
- V.pop()();
74
- for (let e = 0; e < O.length; e += 1) {
75
- const t = O[e];
76
- P.has(t) || (P.add(t), t());
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());
77
77
  }
78
- O.length = 0;
79
- } while ($.length);
80
- for (; ee.length; )
81
- ee.pop()();
82
- G = !1, P.clear(), _(l);
78
+ $.length = 0;
79
+ } while (O.length);
80
+ for (; se.length; )
81
+ se.pop()();
82
+ N = !1, V.clear(), B(l);
83
83
  }
84
- function Ce(l) {
84
+ function Ee(l) {
85
85
  if (l.fragment !== null) {
86
- l.update(), W(l.before_update);
86
+ l.update(), H(l.before_update);
87
87
  const e = l.dirty;
88
- l.dirty = [-1], l.fragment && l.fragment.p(l.ctx, e), l.after_update.forEach(N);
88
+ l.dirty = [-1], l.fragment && l.fragment.p(l.ctx, e), l.after_update.forEach(j);
89
89
  }
90
90
  }
91
- function we(l) {
91
+ function Ae(l) {
92
92
  const e = [], t = [];
93
- O.forEach((s) => l.indexOf(s) === -1 ? e.push(s) : t.push(s)), t.forEach((s) => s()), O = e;
93
+ $.forEach((s) => l.indexOf(s) === -1 ? e.push(s) : t.push(s)), t.forEach((s) => s()), $ = e;
94
94
  }
95
- const Ee = /* @__PURE__ */ new Set();
96
- function Ae(l, e) {
97
- l && l.i && (Ee.delete(l), l.i(e));
95
+ const Me = /* @__PURE__ */ new Set();
96
+ function Re(l, e) {
97
+ l && l.i && (Me.delete(l), l.i(e));
98
98
  }
99
- function Me(l, e, t) {
99
+ function Te(l, e, t) {
100
100
  const { fragment: s, after_update: i } = l.$$;
101
- s && s.m(e, t), N(() => {
102
- const o = l.$$.on_mount.map(se).filter(ie);
103
- l.$$.on_destroy ? l.$$.on_destroy.push(...o) : W(o), l.$$.on_mount = [];
104
- }), i.forEach(N);
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
105
  }
106
- function Re(l, e) {
106
+ function De(l, e) {
107
107
  const t = l.$$;
108
- t.fragment !== null && (we(t.after_update), W(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
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
109
  }
110
- function Te(l, e) {
111
- l.$$.dirty[0] === -1 && ($.push(l), xe(), l.$$.dirty.fill(0)), l.$$.dirty[e / 31 | 0] |= 1 << e % 31;
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
112
  }
113
- function De(l, e, t, s, i, o, n = null, a = [-1]) {
114
- const r = z;
115
- _(l);
113
+ function Fe(l, e, t, s, i, o, r = null, a = [-1]) {
114
+ const n = z;
115
+ B(l);
116
116
  const d = l.$$ = {
117
117
  fragment: null,
118
118
  ctx: [],
119
119
  // state
120
120
  props: o,
121
- update: F,
121
+ update: L,
122
122
  not_equal: i,
123
- bound: Z(),
123
+ bound: te(),
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 || (r ? r.$$.context : [])),
130
+ context: new Map(e.context || (n ? n.$$.context : [])),
131
131
  // everything else
132
- callbacks: Z(),
132
+ callbacks: te(),
133
133
  dirty: a,
134
134
  skip_bound: !1,
135
- root: e.target || r.$$.root
135
+ root: e.target || n.$$.root
136
136
  };
137
- n && n(d.root);
137
+ r && r(d.root);
138
138
  let h = !1;
139
- if (d.ctx = t ? t(l, e.props || {}, (p, S, ...f) => {
140
- const c = f.length ? f[0] : S;
141
- return d.ctx && i(d.ctx[p], d.ctx[p] = c) && (!d.skip_bound && d.bound[p] && d.bound[p](c), h && Te(l, p)), S;
142
- }) : [], d.update(), h = !0, W(d.before_update), d.fragment = s ? s(d.ctx) : !1, e.target) {
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) {
143
143
  if (e.hydrate) {
144
- const p = ye(e.target);
145
- d.fragment && d.fragment.l(p), p.forEach(oe);
144
+ const c = xe(e.target);
145
+ d.fragment && d.fragment.l(c), c.forEach(re);
146
146
  } else
147
147
  d.fragment && d.fragment.c();
148
- e.intro && Ae(l.$$.fragment), Me(l, e.target, e.anchor), le();
148
+ e.intro && Re(l.$$.fragment), Te(l, e.target, e.anchor), ne();
149
149
  }
150
- _(r);
150
+ B(n);
151
151
  }
152
- class Ie {
152
+ class Oe {
153
153
  constructor() {
154
154
  /**
155
155
  * ### PRIVATE API
@@ -170,7 +170,7 @@ class Ie {
170
170
  }
171
171
  /** @returns {void} */
172
172
  $destroy() {
173
- Re(this, 1), this.$destroy = F;
173
+ De(this, 1), this.$destroy = L;
174
174
  }
175
175
  /**
176
176
  * @template {Extract<keyof Events, string>} K
@@ -179,8 +179,8 @@ class Ie {
179
179
  * @returns {() => void}
180
180
  */
181
181
  $on(e, t) {
182
- if (!ie(t))
183
- return F;
182
+ if (!le(t))
183
+ return L;
184
184
  const s = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
185
185
  return s.push(t), () => {
186
186
  const i = s.indexOf(t);
@@ -192,23 +192,48 @@ class Ie {
192
192
  * @returns {void}
193
193
  */
194
194
  $set(e) {
195
- this.$$set && !ge(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
195
+ this.$$set && !me(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
196
196
  }
197
197
  }
198
- const $e = "4";
199
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add($e);
200
- function j(l) {
198
+ const Le = "4";
199
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Le);
200
+ class D {
201
+ // The constructor is private to prevent direct construction calls
202
+ // with the `new` operator
203
+ constructor() {
204
+ this.alreadySet = !1;
205
+ }
206
+ static getInstance() {
207
+ return D.instance || (D.instance = new D()), D.instance;
208
+ }
209
+ /**
210
+ * Method to set the license key for the application.
211
+ * A 'meta' element is created with content as 'guiexperttable=<license key>'
212
+ * and appended into the head section of the document
213
+ *
214
+ * @param {string} key - The license key to set for the application.
215
+ *
216
+ * @return {void} - This method does not return anything
217
+ */
218
+ setLicenseKey(e) {
219
+ if (e && !this.alreadySet) {
220
+ const t = document.createElement("meta");
221
+ t.content = "license=" + e, t.name = "guiexperttable", document.getElementsByTagName("head")[0].appendChild(t), this.alreadySet = !0;
222
+ }
223
+ }
224
+ }
225
+ function K(l) {
201
226
  return l && l.type === "TreeRow";
202
227
  }
203
228
  function X(l) {
204
229
  return l && l.type === "AreaModelTree";
205
230
  }
206
- class K {
207
- constructor(e = -1, t = -1, s = -1, i = -1, o, n, a, r = 0, d = 0, h = 0, p = "") {
208
- this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = i, this.areaIdent = o, this.sideIdent = n, this.originalEvent = a, this.clickCount = r, this.draggingX = d, this.draggingY = h, this.action = p;
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;
209
234
  }
210
235
  clone() {
211
- return new K(
236
+ return new Y(
212
237
  this.rowIndex,
213
238
  this.rowTop,
214
239
  this.columnIndex,
@@ -223,25 +248,25 @@ class K {
223
248
  );
224
249
  }
225
250
  }
226
- class D {
251
+ class I {
227
252
  constructor(e = ">", t = "", s = []) {
228
253
  this.content = e, this.style = t, this.classes = s;
229
254
  }
230
255
  }
231
- class re {
232
- constructor(e = new D(
256
+ class ae {
257
+ constructor(e = new I(
233
258
  ">",
234
259
  "transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
235
260
  ["gt-table-tree-arrow-expanded"]
236
- ), t = new D(
261
+ ), t = new I(
237
262
  ">",
238
263
  "",
239
264
  ["ge-table-tree-arrow-collapsed"]
240
- ), s = new D(
265
+ ), s = new I(
241
266
  ">",
242
267
  "color:transparent;",
243
268
  ["gt-table-tree-arrow-hidden"]
244
- ), i = new D(
269
+ ), i = new I(
245
270
  "↕",
246
271
  "",
247
272
  ["gt-table-tree-arrow-expanded-all"]
@@ -249,12 +274,12 @@ class re {
249
274
  this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = i;
250
275
  }
251
276
  }
252
- class ne {
253
- constructor(e = new D("↑", "", ["ge-header-sorted-asc"]), t = new D("↓", "", ["ge-header-sorted-desc"]), s = new D("↑", "color:transparent;", [])) {
277
+ class de {
278
+ constructor(e = new I("↑", "", ["ge-header-sorted-asc"]), t = new I("↓", "", ["ge-header-sorted-desc"]), s = new I("↑", "color:transparent;", [])) {
254
279
  this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
255
280
  }
256
281
  }
257
- class Fe {
282
+ class $e {
258
283
  constructor(e) {
259
284
  this.domService = e;
260
285
  }
@@ -327,83 +352,83 @@ class Fe {
327
352
  const s = this.domService.createElement("div");
328
353
  return this.addClass(e, s), this.domService.appendChild(t, s), s;
329
354
  }
330
- addRowDiv(e, t, s = -1, i, o, n = "") {
331
- const a = t.index ?? -1, r = this.getDivOrCreateDiv(a, e);
332
- if (this.domService.addClass(r, "ge-table-row-div"), this.domService.addClass(r, `ge-table-row-div-${t.index}`), i === "body" && o === "center") {
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") {
333
358
  const d = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
334
- this.domService.addClass(r, `ge-table-row-${d}`);
359
+ this.domService.addClass(n, `ge-table-row-${d}`);
335
360
  }
336
- if (this.domService.setStyle(r, "display", "clip"), this.domService.setStyle(r, "position", "absolute"), this.domService.setStyle(r, "left", `${t.left}px`), this.domService.setStyle(r, "top", `${t.top}px`), this.domService.setStyle(r, "width", `${t.width}px`), this.domService.setStyle(r, "height", `${t.height}px`), this.domService.setAttribute(r, "data-row-index", `${s}`), this.domService.setAttribute(r, "data-area", `${i}`), n) {
337
- const d = this.domService.createText(n);
338
- this.domService.appendChild(r, d);
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) {
362
+ const d = this.domService.createText(r);
363
+ this.domService.appendChild(n, d);
339
364
  }
340
- return this.domService.appendChild(e.child, r), r;
341
- }
342
- addColumnDiv(e, t, s = -1, i = -1, o, n, a = "", r, d, h = void 0, p) {
343
- const S = d == null ? void 0 : d.treeOptions, f = d == null ? void 0 : d.showCheckboxWihoutExtraColumn, c = this.domService.createElement("div");
344
- this.domService.addClass(c, "ge-table-col-div"), this.domService.addClass(c, `ge-table-col-div-${t.index}`), this.domService.setAttribute(c, "data-col-index", `${t.index}`), this.domService.setAttribute(c, "data-row-index", `${s}`), this.domService.setAttribute(c, "data-area", `${o}`);
345
- const b = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
346
- if (o === "body" && n === "center" && this.domService.addClass(c, `ge-table-column-${b}`), this.domService.setStyle(c, "display", "clip"), this.domService.setStyle(c, "position", "absolute"), this.domService.setStyle(c, "left", `${t.left}px`), this.domService.setStyle(c, "top", `${t.top}px`), this.domService.setStyle(c, "width", `${t.width}px`), this.domService.setStyle(c, "height", `${t.height}px`), r && r !== "none" && (this.domService.addClass(c, "ge-table-col-tree"), this.addArrowDiv(c, r, S, s, i, o)), f && i === 0 && h && this.addCheckboxToDiv(c, h, o, s), a) {
347
- const u = r !== "none" && i === 0;
348
- this.addLabelDiv(c, a, u, s, i, o);
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);
349
374
  }
350
- return p && this.addSortedIcon(c, p, d == null ? void 0 : d.sortedOptions, i), this.domService.appendChild(e, c), c;
375
+ return c && this.addSortedIcon(p, c, d == null ? void 0 : d.sortedOptions, i), this.domService.appendChild(e, p), p;
351
376
  }
352
377
  addCheckboxToDiv(e, t, s, i) {
353
- const o = this.domService.createElement("div"), n = t === "full" ? "checked" : "";
378
+ const o = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
354
379
  return o.innerHTML = `
355
380
  <input
356
381
  type="checkbox"
357
382
  data-area="${s}"
358
383
  data-row-index="${i}"
359
384
  data-input-type="checkbox"
360
- ${n}
385
+ ${r}
361
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;
362
387
  }
363
- addLabelDiv(e, t = "", s = !1, i = -1, o = -1, n = "body") {
388
+ addLabelDiv(e, t = "", s = !1, i = -1, o = -1, r = "body") {
364
389
  const a = this.domService.createElement("div");
365
- 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", `${n}`), t)
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)
366
391
  if (s) {
367
- const r = this.domService.createText(t);
368
- this.domService.appendChild(a, r);
392
+ const n = this.domService.createText(t);
393
+ this.domService.appendChild(a, n);
369
394
  } else {
370
- const r = this.domService.createElement("div");
371
- this.domService.appendChild(a, r);
395
+ const n = this.domService.createElement("div");
396
+ this.domService.appendChild(a, n);
372
397
  const d = this.domService.createText(t);
373
- this.domService.addClass(r, "ge-table-label"), this.domService.appendChild(r, d), this.domService.setAttribute(r, "data-row-index", `${i}`), this.domService.setAttribute(r, "data-col-index", `${o}`), this.domService.setAttribute(r, "data-area", `${n}`);
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}`);
374
399
  }
375
400
  return this.domService.appendChild(e, a), a;
376
401
  }
377
- addSortedIcon(e, t = "", s = new ne(), i = -1) {
402
+ addSortedIcon(e, t = "", s = new de(), i = -1) {
378
403
  const o = this.domService.createElement("div");
379
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");
380
- let n;
381
- t === "asc" ? n = s.iconAsc : t === "desc" ? n = s.iconDesc : n = s.iconPlaceholder;
382
- const a = n.content, r = this.domService.createText(a);
383
- this.domService.appendChild(o, r), n.style && this.applyStyleString(o, n.style);
384
- for (const d of n.classes)
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);
409
+ for (const d of r.classes)
385
410
  this.domService.addClass(o, d);
386
411
  return this.domService.appendChild(e, o), o;
387
412
  }
388
- addArrowDiv(e, t = "none", s = new re(), i = -1, o = -1, n = "body") {
413
+ addArrowDiv(e, t = "none", s = new ae(), i = -1, o = -1, r = "body") {
389
414
  const a = this.domService.createElement("div");
390
- 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", `${n}`);
391
- let r;
392
- t === "expanded" ? r = s.arrowExpanded : t === "collapsed" ? r = s.arrowCollapsed : r = s.arrowPlaceholder;
393
- const d = r.content, h = this.domService.createText(d);
394
- this.domService.appendChild(a, h), r.style && this.applyStyleString(a, r.style);
395
- for (const p of r.classes)
396
- this.domService.addClass(a, p);
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);
397
422
  return this.domService.appendChild(e, a), a;
398
423
  }
399
424
  addColumnBorderDivs(e, t, s, i, o) {
400
425
  if (e.verticalBorderVisible) {
401
- const n = `ge-table-${i}-${o}-vertical-border`;
402
- this.addVerticalBorder(s, t, n);
426
+ const r = `ge-table-${i}-${o}-vertical-border`;
427
+ this.addVerticalBorder(s, t, r);
403
428
  }
404
429
  if (e.horizontalBorderVisible) {
405
- const n = `ge-table-${i}-${o}-horizontal-border`;
406
- this.addHorizontalBorder(s, t, n);
430
+ const r = `ge-table-${i}-${o}-horizontal-border`;
431
+ this.addHorizontalBorder(s, t, r);
407
432
  }
408
433
  return t;
409
434
  }
@@ -426,8 +451,8 @@ class Fe {
426
451
  applyStyleString(e, t) {
427
452
  const s = t.split(";").map((i) => i.trim()).filter((i) => i);
428
453
  for (const i of s) {
429
- const [o, n] = i.split(":");
430
- this.domService.setStyle(e, o.trim(), n.trim());
454
+ const [o, r] = i.split(":");
455
+ this.domService.setStyle(e, o.trim(), r.trim());
431
456
  }
432
457
  }
433
458
  getDivOrCreateDiv(e, t) {
@@ -435,37 +460,51 @@ class Fe {
435
460
  return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
436
461
  }
437
462
  }
438
- const Y = (l) => l === "header" ? "header" : l === "footer" ? "footer" : "body";
439
- class Oe {
463
+ const q = (l) => l === "header" ? "header" : l === "footer" ? "footer" : "body";
464
+ class _e {
440
465
  constructor(e, t) {
441
466
  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)) {
442
467
  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"));
443
468
  const s = e.getAttribute("data-area");
444
- if (s && (this.areaIdent = Y(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
469
+ if (s && (this.areaIdent = q(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
445
470
  const i = e;
446
471
  this.value = i.value;
447
472
  }
448
473
  }
449
474
  }
450
475
  }
451
- class Le {
476
+ class Be {
452
477
  constructor(e) {
453
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(
454
479
  (t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
455
480
  );
456
481
  }
482
+ /**
483
+ * Handles the "contextmenu" event.
484
+ *
485
+ * @private
486
+ * @param {MouseEvent} evt - The mouse event object.
487
+ * @return {void}
488
+ */
457
489
  onContextmenu(e) {
458
490
  this.mouseEvent = e;
459
491
  const t = this.tableScope.createGeMouseEvent(this.mouseEvent);
460
492
  this.tableScope.contextmenu(t);
461
493
  }
494
+ /**
495
+ * Handles the click event on the host element.
496
+ *
497
+ * @param {MouseEvent} event - The click event.
498
+ *
499
+ * @return {void}
500
+ */
462
501
  onHostElementClicked(e) {
463
- const t = new Oe(e.target, this.tableScope);
502
+ const t = new _e(e.target, this.tableScope);
464
503
  if (t.action === "toggleExpandCollapseAll")
465
504
  this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
466
505
  else if (t.inputType === "checkbox" && t.areaIdent)
467
506
  this.tableScope.toggleRowCheckbox(t.rowIdx, t.colIdx, t.areaIdent), e.preventDefault(), e.stopPropagation();
468
- else if (j(t.row) && t.areaModel) {
507
+ else if (K(t.row) && t.areaModel) {
469
508
  const s = t.colIdx === this.getArrowColumnIndex() && e.altKey, i = t.className.includes("ge-table-tree-arrow-div");
470
509
  if (console.info(i, s), s || i) {
471
510
  e.preventDefault(), e.stopPropagation();
@@ -479,32 +518,52 @@ class Le {
479
518
  }
480
519
  this.publishGeMouseEvent(e, 1);
481
520
  }
521
+ /**
522
+ * Handles the double click event on the host element.
523
+ * This method is private.
524
+ *
525
+ * @param {MouseEvent} event - The double click event.
526
+ */
482
527
  onHostElementDblClicked(e) {
483
528
  if (e.target instanceof HTMLElement) {
484
- const t = e.target, s = t.getAttribute("data-area"), i = Y(s), o = Number(t.getAttribute("data-row-index")), n = Number(t.getAttribute("data-col-index")), a = this.tableScope.tableModel.getAreaModel(i);
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);
485
530
  if (s && i === "header")
486
- this.tableScope.tableModel.isSortable(n) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, o, n));
531
+ this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, o, r));
487
532
  else if (t.getAttribute("data-row-index")) {
488
- const r = a.getRowByIndex(o);
489
- if (s && i === "body" && a.isEditable(o, n) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, n)), j(r) && n === this.getArrowColumnIndex()) {
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()) {
490
535
  e.preventDefault(), e.stopPropagation();
491
- const d = r;
536
+ const d = n;
492
537
  d.expanded = !d.expanded, "recalcVisibleTreeRows" in a && a.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(d);
493
538
  }
494
539
  }
495
540
  }
496
541
  this.publishGeMouseEvent(e, 2);
497
542
  }
543
+ /**
544
+ * Publishes a GeMouseEvent.
545
+ *
546
+ * @param {MouseEvent} event - The MouseEvent to publish.
547
+ * @param {number} clickCount - The number of clicks for the GeMouseEvent.
548
+ *
549
+ * @return {void}
550
+ */
498
551
  publishGeMouseEvent(e, t) {
499
552
  var s;
500
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);
501
554
  }
555
+ /**
556
+ * Update the collapsed/expanded state of a tree row.
557
+ *
558
+ * @param {TreeRowIf<any>} tr - The tree row object.
559
+ * @returns {void}
560
+ */
502
561
  updateCollapsedExpandedState(e) {
503
- var s, i, o, n, a;
562
+ var s, i, o, r, a;
504
563
  const t = (i = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : i.getRowId;
505
564
  if (t) {
506
- const r = (o = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : o.collapsedExpandedStateGet().mode, d = r === "collapsed" && !e.expanded || r === "expanded" && e.expanded, h = r === "collapsed" && e.expanded || r === "expanded" && !e.expanded, p = t(e.data);
507
- d ? (n = this.tableScope.storeStateCollapsedExpandService) == null || n.collapsedStateIdsPush(p) : h && ((a = this.tableScope.storeStateCollapsedExpandService) == null || a.collapsedStateIdsRemove(p));
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));
508
567
  }
509
568
  }
510
569
  getArrowColumnIndex() {
@@ -540,40 +599,114 @@ class Le {
540
599
  }
541
600
  }
542
601
  }
543
- class _e {
602
+ class We {
544
603
  constructor(e) {
545
604
  this.tableScope = e;
546
605
  }
606
+ /**
607
+ * Updates the cells in the table based on the provided events.
608
+ *
609
+ * @param {TableCellUpdateEventIf[]} events - The array of events representing the updates to perform on the cells.
610
+ * @param {boolean} [repaintAll=false] - Optional parameter indicating whether to repaint all cells or not. Default value is false. If true, the full table will be rendered. If false, the table cell will be rendered immediately.
611
+ *
612
+ * @return {void} - This method doesn't return anything.
613
+ */
547
614
  updateCells(e, t = !1) {
548
615
  this.tableScope.updateCells(e, t);
549
616
  }
617
+ /**
618
+ * Notifies that the external filter has changed.
619
+ *
620
+ * @return {void}
621
+ */
550
622
  externalFilterChanged() {
551
623
  this.tableScope.externalFilterChanged();
552
624
  }
625
+ /**
626
+ * Scrolls the table body to the specified pixel coordinates.
627
+ *
628
+ * @param {number} px - The horizontal pixel coordinate to scroll to. Defaults to 0.
629
+ * @param {number} py - The vertical pixel coordinate to scroll to. Defaults to 0.
630
+ * @return {void}
631
+ */
553
632
  scrollToPixel(e = 0, t = 0) {
633
+ this.tableScope.scrollToPixel(e, t);
554
634
  }
635
+ /**
636
+ * Scrolls to the specified index in both horizontal and vertical directions.
637
+ *
638
+ * @param {number} indexX - The index of the column to scroll to in the horizontal direction. Default is 0.
639
+ * @param {number} indexY - The index of the row to scroll to in the vertical direction. Default is 0.
640
+ *
641
+ * @return undefined
642
+ */
555
643
  scrollToIndex(e = 0, t = 0) {
644
+ this.tableScope.scrollToIndex(e, t);
556
645
  }
646
+ /**
647
+ * Sets whether the header is visible or not.
648
+ *
649
+ * @param _visible - A boolean value indicating whether the header should be visible. Default value is true.
650
+ *
651
+ * @return undefined
652
+ */
557
653
  setHeaderVisible(e = !0) {
558
654
  }
655
+ /**
656
+ * Sets the visibility of a column in the table.
657
+ *
658
+ * @param {_column} - The column index or column definition to set visibility for.
659
+ * @param {_visible=true} - The flag to set visibility to. true for visible, false for hidden.
660
+ *
661
+ * @return {void} - There is no return value.
662
+ */
559
663
  setColumnVisible(e, t = !0) {
560
664
  }
665
+ /**
666
+ * Returns whether a column is visible or not.
667
+ *
668
+ * @param {number | ColumnDefIf} _column - The column index or the column definition.
669
+ * @return {boolean} - True if the column is visible, false otherwise.
670
+ */
561
671
  isColumnVisible(e) {
562
672
  return !0;
563
673
  }
674
+ /**
675
+ * Checks if the header is visible.
676
+ *
677
+ * @return {boolean} - Returns true if the header is visible, otherwise returns false.
678
+ */
564
679
  isHeaderVisible() {
565
680
  return !0;
566
681
  }
682
+ /**
683
+ * Sets the visibility of the footer.
684
+ *
685
+ * @param {boolean} _visible - Indicates whether the footer should be visible or not. Default value is true.
686
+ *
687
+ * @return {void} - This method does not return any value.
688
+ */
567
689
  setFooterVisible(e = !0) {
568
690
  }
691
+ /**
692
+ * Determines if the footer is visible.
693
+ *
694
+ * @returns {boolean} True if the footer is visible, false otherwise.
695
+ */
569
696
  isFooterVisible() {
570
697
  return !0;
571
698
  }
699
+ /**
700
+ * Repaints the table.
701
+ *
702
+ * This method calls the repaint method of the tableScope object
703
+ * to update and redraw the table based on the latest data.
704
+ */
572
705
  repaint() {
573
706
  this.tableScope.repaint();
574
707
  }
575
708
  }
576
- class q {
709
+ class U {
577
710
  constructor(e) {
578
711
  this.getStorageKeyFn = e;
579
712
  }
@@ -584,9 +717,9 @@ class q {
584
717
  for (const i of [...s]) {
585
718
  const [
586
719
  o,
587
- n
720
+ r
588
721
  ] = i;
589
- t[o] = n;
722
+ t[o] = r;
590
723
  }
591
724
  }
592
725
  return t;
@@ -598,8 +731,8 @@ class q {
598
731
  if (i) {
599
732
  const o = i + e;
600
733
  if ((t + "").includes("Map")) {
601
- const n = this.autoConvertMapToObject(t);
602
- this.persistItem(o, n);
734
+ const r = this.autoConvertMapToObject(t);
735
+ this.persistItem(o, r);
603
736
  } else
604
737
  this.persistItem(o, t);
605
738
  }
@@ -648,7 +781,7 @@ class q {
648
781
  // }
649
782
  // }
650
783
  }
651
- class Be extends q {
784
+ class He extends U {
652
785
  constructor(e) {
653
786
  super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
654
787
  }
@@ -670,14 +803,14 @@ class Be extends q {
670
803
  }
671
804
  }
672
805
  }
673
- class We {
806
+ class Pe {
674
807
  constructor(e = "collapsed", t = [], s = !1, i = !1) {
675
808
  this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = i;
676
809
  }
677
810
  }
678
- class He extends q {
811
+ class ke extends U {
679
812
  constructor(e) {
680
- super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new We(), this.load();
813
+ super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Pe(), this.load();
681
814
  }
682
815
  collapsedExpandedStateGet() {
683
816
  return this.collapsedExpandedState;
@@ -709,7 +842,7 @@ class He extends q {
709
842
  this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
710
843
  }
711
844
  }
712
- class ke extends q {
845
+ class Ve extends U {
713
846
  constructor(e) {
714
847
  super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
715
848
  }
@@ -736,7 +869,7 @@ class T {
736
869
  this.left = e, this.width = t, this.height = s, this.top = i, this.index = o;
737
870
  }
738
871
  }
739
- class Pe {
872
+ class Ge {
740
873
  constructor(e, t, s, i) {
741
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();
742
875
  const o = this.hostElement;
@@ -887,12 +1020,21 @@ class Pe {
887
1020
  this.dom.setStyle(this.contentWrapperDiv, "width", e), this.dom.setStyle(this.contentWrapperDiv, "height", t);
888
1021
  }
889
1022
  }
890
- class A {
1023
+ class M {
1024
+ /**
1025
+ * Represents a constructor for a class.
1026
+ * @constructor
1027
+ * @param {number} r1 - The value for r1.
1028
+ * @param {number} c1 - The value for c1.
1029
+ * @param {number} r2 - The value for r2.
1030
+ * @param {number} c2 - The value for c2.
1031
+ * @param {boolean} [gammaRange=false] - The value for gammaRange. Defaults to false. gammaRange will be used for AreaModelCellGroups, but it's not implemented yet!
1032
+ */
891
1033
  constructor(e, t, s, i, o = !1) {
892
1034
  this.r1 = e, this.c1 = t, this.r2 = s, this.c2 = i, this.gammaRange = o;
893
1035
  }
894
1036
  static create(e) {
895
- return e.gammaRange === void 0 && (e.gammaRange = !1), new A(
1037
+ return e.gammaRange === void 0 && (e.gammaRange = !1), new M(
896
1038
  e.rowIndex1,
897
1039
  e.columnIndex1,
898
1040
  e.rowIndex2,
@@ -901,19 +1043,19 @@ class A {
901
1043
  );
902
1044
  }
903
1045
  static singleCell(e, t) {
904
- return new A(e, t, e, t);
1046
+ return new M(e, t, e, t);
905
1047
  }
906
1048
  static singleRow(e) {
907
- return new A(e, 0, e, Number.MAX_SAFE_INTEGER);
1049
+ return new M(e, 0, e, Number.MAX_SAFE_INTEGER);
908
1050
  }
909
1051
  static singleColumn(e) {
910
- return new A(0, e, Number.MAX_SAFE_INTEGER, e);
1052
+ return new M(0, e, Number.MAX_SAFE_INTEGER, e);
911
1053
  }
912
1054
  isInRange(e, t) {
913
1055
  return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
914
1056
  }
915
1057
  }
916
- class Ve {
1058
+ class Ne {
917
1059
  constructor(e, t) {
918
1060
  this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
919
1061
  }
@@ -924,12 +1066,12 @@ class Ve {
924
1066
  const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
925
1067
  for (let s = 0; s < e; s++)
926
1068
  for (let i = 0; i < t; i++) {
927
- let o = this.areaModel.getColspanAt(s, i), n = this.areaModel.getRowspanAt(s, i);
928
- if (o > 1 || n > 1) {
929
- o === 0 && (o = 1), n === 0 && (n = 1);
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);
930
1072
  const a = this.areaModel.hasOwnProperty("gammaCells");
931
1073
  this.colAndRowspanRanges.push(
932
- new A(s, i, s + n - 1, i + o - 1, a)
1074
+ new M(s, i, s + r - 1, i + o - 1, a)
933
1075
  );
934
1076
  }
935
1077
  }
@@ -946,22 +1088,22 @@ class Ve {
946
1088
  return !1;
947
1089
  }
948
1090
  }
949
- class Ge {
1091
+ class je {
950
1092
  constructor(e, t, s) {
951
1093
  this.header = e, this.body = t, this.footer = s;
952
1094
  }
953
1095
  }
954
- class Ne extends Pe {
1096
+ class Ke extends Ge {
955
1097
  constructor(e, t, s, i) {
956
- var n, a;
1098
+ var r, a;
957
1099
  super(e, t, s, i), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
958
1100
  header: [],
959
1101
  body: [],
960
1102
  footer: []
961
- }, this.tree = !1, this.colAndRowspanModels = new Ge(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.editing = !1, this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (n = this.tableOptions) != null && n.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (a = this.tableOptions) != null && a.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), X(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
962
- (r) => {
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) => {
963
1105
  var d;
964
- this.colAndRowspanModels[r] = new Ve(t, t.getAreaModel(r)), (d = this.colAndRowspanModels[r]) == null || d.init();
1106
+ this.colAndRowspanModels[n] = new Ne(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
965
1107
  }
966
1108
  );
967
1109
  }
@@ -1080,87 +1222,87 @@ class Ne extends Pe {
1080
1222
  return "";
1081
1223
  }
1082
1224
  adjustArea(e, t = 0) {
1083
- var u;
1084
- const s = this.getArea(e, "west"), i = this.getArea(e, "center"), o = this.getArea(e, "east"), n = i.child.clientHeight;
1225
+ var g;
1226
+ const s = this.getArea(e, "west"), i = this.getArea(e, "center"), o = this.getArea(e, "east"), r = i.child.clientHeight;
1085
1227
  s.child.innerText = "", i.child.innerText = "", o.child.innerText = "";
1086
- const a = 0, r = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), h = this.tableModel.getAreaModel(e), p = h.getRowCount();
1228
+ const a = 0, n = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), h = this.tableModel.getAreaModel(e), c = h.getRowCount();
1087
1229
  for (; this.cleanupFunctions[e].length; ) {
1088
- const g = this.cleanupFunctions[e].shift();
1089
- g && g();
1230
+ const u = this.cleanupFunctions[e].shift();
1231
+ u && u();
1090
1232
  }
1091
1233
  let S = t;
1092
- const f = this.tableModel.getColumnCount(), c = this.tableModel.getFixedRightColumnCount(), b = this.tableModel.getFixedLeftColumnCount();
1093
- for (let g = 0; g < p; g++) {
1094
- const x = S, C = g === p - 1, w = this.tableModel.getRowHeight(e, g);
1095
- if (x + w > 0) {
1096
- this.firstVisibleRowIndex = g;
1097
- let v = { left: a, width: r, height: w, top: x, index: g }, m = this.dom.addRowDiv(i, v, g, e, "center");
1098
- const R = b;
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;
1099
1241
  if (this.adjustColumnsToRowParent({
1100
1242
  areaIdent: e,
1101
1243
  sideIdent: "center",
1102
1244
  areaModel: h,
1103
- geo: v,
1104
- parent: m,
1105
- rowIndex: g,
1106
- columnIndexStart: R,
1107
- columnIndexEnd: f - c - 1,
1245
+ geo: y,
1246
+ parent: v,
1247
+ rowIndex: u,
1248
+ columnIndexStart: E,
1249
+ columnIndexEnd: f - p - 1,
1108
1250
  verticalFixed: !1,
1109
- lastRowOfModel: C
1110
- }), d.left > 0 && (v = { left: a, width: this.areaBodyWestGeo.width, height: w, top: x, index: g }, m = this.dom.addRowDiv(s, v, g, e, "west"), this.adjustColumnsToRowParent({
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({
1111
1253
  areaIdent: e,
1112
1254
  sideIdent: "west",
1113
1255
  areaModel: h,
1114
- geo: v,
1115
- parent: m,
1116
- rowIndex: g,
1256
+ geo: y,
1257
+ parent: v,
1258
+ rowIndex: u,
1117
1259
  columnIndexStart: 0,
1118
- columnIndexEnd: R - 1,
1260
+ columnIndexEnd: E - 1,
1119
1261
  verticalFixed: !0,
1120
- lastRowOfModel: C
1121
- })), d.right > 0 && (v = { left: a, width: this.areaBodyEastGeo.width, height: w, top: x, index: g }, m = this.dom.addRowDiv(o, v, g, e, "east"), this.adjustColumnsToRowParent({
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({
1122
1264
  areaIdent: e,
1123
1265
  sideIdent: "east",
1124
1266
  areaModel: h,
1125
- geo: v,
1126
- parent: m,
1127
- rowIndex: g,
1128
- columnIndexStart: f - c,
1267
+ geo: y,
1268
+ parent: v,
1269
+ rowIndex: u,
1270
+ columnIndexStart: f - p,
1129
1271
  columnIndexEnd: f - 1,
1130
1272
  verticalFixed: !0,
1131
- lastRowOfModel: C
1132
- })), e === "header" && this.tree && g === p - 1) {
1133
- const E = this.dom.applyStyle(
1273
+ lastRowOfModel: x
1274
+ })), e === "header" && this.tree && u === c - 1) {
1275
+ const A = this.dom.applyStyle(
1134
1276
  this.dom.setAttribute(
1135
- this.dom.addDiv(m, new T(16, 20, 20, 8)),
1277
+ this.dom.addDiv(v, new T(16, 20, 20, 8)),
1136
1278
  "data-ge-action",
1137
1279
  "toggleExpandCollapseAll"
1138
1280
  ),
1139
1281
  { cursor: "pointer" }
1140
- ), M = this.tableOptions.treeOptions.arrowExpandCollapseAll;
1141
- if (M) {
1142
- const B = this.dom.domService.createText(M.content);
1143
- this.dom.domService.appendChild(E, B), M.style && this.dom.applyStyleString(E, M.style);
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);
1144
1286
  }
1145
1287
  }
1146
1288
  }
1147
- if (S = S + w, S > n)
1289
+ if (S = S + C, S > r)
1148
1290
  break;
1149
1291
  }
1150
1292
  if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
1151
- const g = ((u = this.colAndRowspanModels[e]) == null ? void 0 : u.getRanges()) ?? [];
1152
- if (g.length)
1153
- for (const x of g) {
1154
- let C = 0, w = i.child, v = "center";
1155
- if (x.c1 < b)
1156
- w = s.child, v = "west";
1157
- else if (c > 0 && x.c1 >= f - c)
1158
- w = o.child, v = "east";
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";
1159
1301
  else {
1160
- const m = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1161
- C = this.scrollFactorX * m - this.areaBodyWestGeo.width, v = "center";
1302
+ const v = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1303
+ x = this.scrollFactorX * v - this.areaBodyWestGeo.width, y = "center";
1162
1304
  }
1163
- this.drawBigCell(x, C, t, h, w, v);
1305
+ this.drawBigCell(w, x, t, h, C, y);
1164
1306
  }
1165
1307
  }
1166
1308
  }
@@ -1174,45 +1316,45 @@ class Ne extends Pe {
1174
1316
  * @param sideIdent SideIdent (west,center,east)
1175
1317
  * @protected
1176
1318
  */
1177
- drawBigCell(e, t, s, i, o, n) {
1178
- const a = s + this.getRowHeights(0, e.r1 - 1, i).reduce((u, g) => u + g, 0), r = this.tableModel.getColumnCount(), d = this.tableModel.getFixedRightColumnCount();
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();
1179
1321
  let h = 0;
1180
- d > 0 && e.c1 >= r - d && (h = r - d);
1181
- const p = t + this.getColumnWidths(h, e.c1 - 1).reduce((u, g) => u + g, 0), S = this.getRowHeights(e.r1, e.r2, i).reduce((u, g) => u + g, 0), f = this.getColumnWidths(e.c1, e.c2).reduce((u, g) => u + g, 0);
1182
- let c = !1;
1183
- const b = this.getSelectionModel ? this.getSelectionModel() : void 0;
1184
- b && (c = b.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? (console.info("TODO here", e), this.renderCell({
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({
1185
1327
  areaModel: i,
1186
1328
  areaIdent: i.areaIdent,
1187
- sideIdent: n,
1329
+ sideIdent: r,
1188
1330
  rowIndex: e.r1,
1189
1331
  columnIndex: e.c1,
1190
- left: p,
1332
+ left: c,
1191
1333
  top: a,
1192
1334
  width: f,
1193
1335
  height: S,
1194
1336
  parent: o,
1195
- cellSelected: c,
1337
+ cellSelected: p,
1196
1338
  lastRowOfModel: !0,
1197
1339
  gammaRange: e.gammaRange
1198
1340
  })) : this.renderCell({
1199
1341
  areaModel: i,
1200
1342
  areaIdent: i.areaIdent,
1201
- sideIdent: n,
1343
+ sideIdent: r,
1202
1344
  rowIndex: e.r1,
1203
1345
  columnIndex: e.c1,
1204
- left: p,
1346
+ left: c,
1205
1347
  top: a,
1206
1348
  width: f,
1207
1349
  height: S,
1208
1350
  parent: o,
1209
- cellSelected: c,
1351
+ cellSelected: p,
1210
1352
  lastRowOfModel: !0,
1211
1353
  gammaRange: e.gammaRange
1212
1354
  }), i.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1213
1355
  rowIndex: e.r1,
1214
1356
  columnIndex: e.c1,
1215
- cellLeft: p,
1357
+ cellLeft: c,
1216
1358
  cellTop: a,
1217
1359
  cellWidth: f,
1218
1360
  cellHeight: S,
@@ -1222,8 +1364,8 @@ class Ne extends Pe {
1222
1364
  findRowOfImportantRowspanCell(e, t, s) {
1223
1365
  const i = e.getMaxRowspan();
1224
1366
  for (let o = t - 1; o > -1; o--) {
1225
- const n = e.getRowspanAt(o, s);
1226
- if (n > 1 && o + n + 1 >= t)
1367
+ const r = e.getRowspanAt(o, s);
1368
+ if (r > 1 && o + r + 1 >= t)
1227
1369
  return o;
1228
1370
  if (t - o > i)
1229
1371
  return -1;
@@ -1236,65 +1378,65 @@ class Ne extends Pe {
1236
1378
  areaModel: s,
1237
1379
  geo: i,
1238
1380
  parent: o,
1239
- rowIndex: n,
1381
+ rowIndex: r,
1240
1382
  columnIndexStart: a,
1241
- columnIndexEnd: r,
1383
+ columnIndexEnd: n,
1242
1384
  verticalFixed: d = !1,
1243
1385
  lastRowOfModel: h = !1
1244
1386
  }) {
1245
- var b;
1387
+ var m;
1246
1388
  this.scrollViewportLeft = this.scrollViewport.scrollLeft;
1247
- let p = 0;
1389
+ let c = 0;
1248
1390
  if (!d) {
1249
- const u = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1250
- p = this.scrollFactorX * u;
1391
+ const g = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1392
+ c = this.scrollFactorX * g;
1251
1393
  }
1252
1394
  const S = 0, f = !!(e === "body" && t);
1253
- let c = p;
1254
- for (let u = a; u <= r; u++) {
1255
- const g = c, x = this.tableModel.getColumnWidth(u);
1256
- if (x > 0 && g + x > 0) {
1257
- let C = i.height;
1258
- const w = s.getRowspanAt(n, u), v = s.getColspanAt(n, u);
1259
- w > 1 && (C = this.getRowHeights(n, n + w - 1, s).reduce((E, M) => E + M, 0));
1260
- let m = x;
1261
- v > 1 && (m = this.getColumnWidths(u, u + v - 1).reduce((E, M) => E + M, 0));
1262
- let R = !1;
1263
- if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (b = this.colAndRowspanModels[e]) != null && b.isInRange(n, u) && (R = !0), this.draggingTargetColumnIndex === u && e !== "header") {
1264
- this.renderDragTargetDiv(o, g, S, m, C);
1265
- const E = { left: g, top: S, width: m, height: C };
1266
- this.dom.addColumnBorderDivs(this.tableOptions, o, E, e, 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);
1267
1409
  } else {
1268
- const E = this.renderSelectedBackgroundDiv(R, f, t, s, n, u, o, g, S, m, C);
1269
- R || this.renderCell({
1410
+ const A = this.renderSelectedBackgroundDiv(E, f, t, s, r, g, o, u, S, v, x);
1411
+ E || this.renderCell({
1270
1412
  areaModel: s,
1271
1413
  areaIdent: e,
1272
1414
  sideIdent: t,
1273
- rowIndex: n,
1274
- columnIndex: u,
1275
- left: g,
1415
+ rowIndex: r,
1416
+ columnIndex: g,
1417
+ left: u,
1276
1418
  top: S,
1277
- width: m,
1278
- height: C,
1419
+ width: v,
1420
+ height: x,
1279
1421
  parent: o,
1280
- cellSelected: E,
1422
+ cellSelected: A,
1281
1423
  lastRowOfModel: h,
1282
1424
  gammaRange: !0
1283
1425
  }), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1284
- rowIndex: n,
1285
- columnIndex: u,
1286
- cellLeft: g,
1426
+ rowIndex: r,
1427
+ columnIndex: g,
1428
+ cellLeft: u,
1287
1429
  cellTop: S,
1288
- cellWidth: m,
1289
- cellHeight: C,
1430
+ cellWidth: v,
1431
+ cellHeight: x,
1290
1432
  parent: o
1291
1433
  });
1292
1434
  }
1293
1435
  }
1294
- if (c = c + x, c > this.areaBodyCenterGeo.width)
1436
+ if (p = p + w, p > this.areaBodyCenterGeo.width)
1295
1437
  break;
1296
1438
  }
1297
- this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new T(c - 1, 1, i.height, 0), o);
1439
+ this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new T(p - 1, 1, i.height, 0), o);
1298
1440
  }
1299
1441
  getTreeArrowColumnIndex() {
1300
1442
  return this.tableOptions.showCheckboxWihoutExtraColumn ? 0 : this.tableModel.isRowCheckboxVisible() ? 1 : 0;
@@ -1305,54 +1447,55 @@ class Ne extends Pe {
1305
1447
  sideIdent: s,
1306
1448
  rowIndex: i,
1307
1449
  index: o,
1308
- left: n,
1450
+ left: r,
1309
1451
  width: a,
1310
- height: r,
1452
+ height: n,
1311
1453
  top: d,
1312
1454
  parent: h,
1313
- lastRowOfModel: p
1455
+ lastRowOfModel: c,
1456
+ gammaRange: S
1314
1457
  }) {
1315
- var Q;
1316
- const f = this.editorRenderer && this.editorRendererRow === i && this.editorRendererColumn === o ? this.editorRenderer : e.getCellRenderer(i, o), c = { left: n, width: a, height: r, top: d, index: o }, b = e.getRowByIndex(i);
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);
1317
1460
  let u = "none";
1318
- if (o === this.getTreeArrowColumnIndex() && j(b)) {
1319
- const y = b;
1320
- (Q = y.children) != null && Q.length ? y.expanded ? u = "expanded" : u = "collapsed" : u = "hidden";
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";
1321
1464
  }
1322
1465
  let x;
1323
1466
  if (t === "header") {
1324
- const y = this.tableModel.getColumnDef(o);
1325
- (!(y != null && y.sortIconVisible) || y != null && y.sortIconVisible()) && (x = y == null ? void 0 : y.sortState);
1467
+ const b = this.tableModel.getColumnDef(o);
1468
+ (!(b != null && b.sortIconVisible) || b != null && b.sortIconVisible()) && (x = b == null ? void 0 : b.sortState);
1326
1469
  }
1327
- const C = e.getValueAt(i, o), w = f ? "" : `${C}`, v = e.isRowChecked(i), m = this.dom.addColumnDiv(
1470
+ const C = e.getValueAt(i, o), y = p ? "" : `${C}`, v = e.isRowChecked(i), E = this.dom.addColumnDiv(
1328
1471
  h,
1329
- c,
1472
+ m,
1330
1473
  i,
1331
1474
  o,
1332
1475
  t,
1333
1476
  s,
1334
- w,
1477
+ y,
1335
1478
  u,
1336
1479
  this.tableOptions,
1337
1480
  v,
1338
1481
  x
1339
- ), R = e.getTooltipAt(i, o);
1340
- R && this.dom.setAttribute(m, "title", R);
1341
- const E = this.tableModel.getColumnDef(o);
1342
- E && E.classes[t] && this.dom.addClasses(E.classes[t], m);
1343
- let M;
1344
- f && (M = f.render(m, i, o, t, e, C, this.dom.domService));
1345
- const B = e.getCustomClassesAt(i, o);
1346
- if (B.length && this.dom.addClasses(B, m), this.dom.addColumnBorderDivs(this.tableOptions, h, c, t, s), p && this.dom.addHorizontalBorder({ left: n, width: a, height: r, top: d + r }, h), this.getFocusModel && t === "body") {
1347
- const y = this.getFocusModel();
1348
- y != null && y.hasFocus(i, o) && this.dom.addFocusBorderDivs(h, c, {});
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, {});
1349
1492
  }
1350
- t === "header" && this.dom.setAttribute(m, "data-ge-action", "drag-column");
1351
- const H = e.getCustomStyleAt(i, o);
1352
- if (H)
1353
- for (const y in H)
1354
- this.dom.setStyle(m, y, H[y]);
1355
- return [m, M];
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];
1356
1499
  }
1357
1500
  applyCssClasses(e, t = {}) {
1358
1501
  e && Object.entries(t).forEach(([s, i]) => {
@@ -1360,22 +1503,22 @@ class Ne extends Pe {
1360
1503
  });
1361
1504
  }
1362
1505
  rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: i, cssClasses: o }) {
1363
- const n = this.tableModel.getAreaModel(e), a = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', r = document.querySelector(a);
1364
- if (r) {
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) {
1365
1508
  let d;
1366
- const p = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s ? this.editorRenderer : n.getCellRenderer(t, s);
1367
- if (r.innerText = "", this.applyCssClasses(r, o), p)
1368
- d = p.render(r, t, s, e, n, i, this.dom.domService), d && this.cleanupFunctions[e].push(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);
1369
1512
  else {
1370
- const c = `${i}`;
1371
- this.dom.addLabelDiv(r, c, !1, t, s, e);
1513
+ const p = `${i}`;
1514
+ this.dom.addLabelDiv(n, p, !1, t, s, e);
1372
1515
  }
1373
- const S = n.getCustomClassesAt(t, s);
1374
- S.length && this.dom.addClasses(S, r);
1375
- const f = n.getCustomStyleAt(t, s);
1516
+ const S = r.getCustomClassesAt(t, s);
1517
+ S.length && this.dom.addClasses(S, n);
1518
+ const f = r.getCustomStyleAt(t, s);
1376
1519
  if (f)
1377
- for (const c in f)
1378
- this.dom.setStyle(r, c, f[c]);
1520
+ for (const p in f)
1521
+ this.dom.setStyle(n, p, f[p]);
1379
1522
  }
1380
1523
  }
1381
1524
  getColumnWidths(e, t) {
@@ -1430,24 +1573,24 @@ class Ne extends Pe {
1430
1573
  this.debounceTimeout && clearTimeout(this.debounceTimeout), this.debounceTimeout = setTimeout(e.bind(this), t);
1431
1574
  }
1432
1575
  renderDragTargetDiv(e, t, s, i, o) {
1433
- const n = this.dom.applyStylePosistionAbsolute(
1576
+ const r = this.dom.applyStylePosistionAbsolute(
1434
1577
  this.dom.createDivWithClass("ge-table-drop-zone", e)
1435
1578
  );
1436
- return this.dom.setStyle(n, "left", `${t}px`), this.dom.setStyle(n, "top", `${s}px`), this.dom.setStyle(n, "width", `${i}px`), this.dom.setStyle(n, "height", `${o}px`), n;
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;
1437
1580
  }
1438
- renderSelectedBackgroundDiv(e, t, s, i, o, n, a, r, d, h, p) {
1581
+ renderSelectedBackgroundDiv(e, t, s, i, o, r, a, n, d, h, c) {
1439
1582
  let S = !1;
1440
- if (!e && t && i.isSelectable(o, n) && this.getSelectionModel) {
1583
+ if (!e && t && i.isSelectable(o, r) && this.getSelectionModel) {
1441
1584
  const f = this.getSelectionModel();
1442
1585
  if (f) {
1443
- const c = f.getSelectionCount(o, n);
1444
- S = c > 0;
1445
- for (let b = 0; b < c; b++) {
1446
- const u = this.dom.applyStylePosistionAbsolute(
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(
1447
1590
  // ge-table-body-west-selected-range
1448
1591
  this.dom.createDivWithClass(`ge-table-${i.areaIdent}-${s}-selected-range`, a)
1449
1592
  );
1450
- this.dom.setStyle(u, "left", `${r}px`), this.dom.setStyle(u, "top", `${d}px`), this.dom.setStyle(u, "width", `${h}px`), this.dom.setStyle(u, "height", `${p}px`);
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`);
1451
1594
  }
1452
1595
  }
1453
1596
  }
@@ -1459,79 +1602,87 @@ class Ne extends Pe {
1459
1602
  sideIdent: s,
1460
1603
  rowIndex: i,
1461
1604
  columnIndex: o,
1462
- left: n,
1605
+ left: r,
1463
1606
  top: a,
1464
- width: r,
1607
+ width: n,
1465
1608
  height: d,
1466
1609
  parent: h,
1467
- cellSelected: p,
1610
+ cellSelected: c,
1468
1611
  lastRowOfModel: S,
1469
1612
  gammaRange: f
1470
1613
  }) {
1471
- const [c, b] = this.addAndRenderCellDiv({
1614
+ const [p, m] = this.addAndRenderCellDiv({
1472
1615
  areaModel: e,
1473
1616
  areaIdent: t,
1474
1617
  sideIdent: s,
1475
1618
  rowIndex: i,
1476
1619
  index: o,
1477
- left: n,
1478
- width: r,
1620
+ left: r,
1621
+ width: n,
1479
1622
  height: d,
1480
1623
  top: a,
1481
1624
  parent: h,
1482
1625
  lastRowOfModel: S,
1483
1626
  gammaRange: f
1484
1627
  });
1485
- p && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, c), b && this.cleanupFunctions[t].push(b);
1628
+ c && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, p), m && this.cleanupFunctions[t].push(m);
1486
1629
  }
1487
- renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: i, cellWidth: o, cellHeight: n, parent: a }) {
1488
- const r = this.dom.domService, d = this.tableOptions.columnResizeHandleWidthInPx ?? 2, h = r.createElement("div");
1489
- r.setAttribute(h, "data-col-index", `${t}`), r.setAttribute(h, "data-row-index", `${e}`), r.setAttribute(h, "data-area", "header"), r.setAttribute(h, "data-ge-action", "resize-column"), r.addClass(h, "ge-table-column-resize-handle"), r.setStyle(h, "display", "clip"), r.setStyle(h, "position", "absolute"), r.setStyle(h, "cursor", "col-resize"), r.setStyle(h, "left", `${s + o - d}px`), r.setStyle(h, "top", `${i}px`), r.setStyle(h, "width", `${d}px`), r.setStyle(h, "height", `${n}px`), r.appendChild(a, h);
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);
1490
1633
  }
1491
1634
  }
1492
- class je {
1635
+ class Xe {
1493
1636
  constructor(e, t) {
1494
1637
  this.columnIndex = e, this.sortState = t;
1495
1638
  }
1496
1639
  }
1497
- class Xe {
1640
+ class ze {
1498
1641
  constructor(e) {
1499
1642
  this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
1500
1643
  }
1644
+ /**
1645
+ * Handles the onHostElementChanged event.
1646
+ * In case that the element is an input field, the tableScope.updateModelValueAfterEdit() method is triggered.
1647
+ *
1648
+ * @param {Event} event - The event object.
1649
+ *
1650
+ * @return {void}
1651
+ */
1501
1652
  onHostElementChanged(e) {
1502
1653
  if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
1503
1654
  const t = e.target, s = t.getAttribute("data-area"), i = t.getAttribute("data-row-index"), o = t.getAttribute("data-col-index");
1504
1655
  if (s && i && o) {
1505
- const n = Y(s), a = Number(i), r = Number(o);
1506
- this.tableScope.updateModelValueAfterEdit(n, a, r, t.value);
1656
+ const r = q(s), a = Number(i), n = Number(o);
1657
+ this.tableScope.updateModelValueAfterEdit(r, a, n, t.value);
1507
1658
  }
1508
1659
  }
1509
1660
  }
1510
1661
  }
1511
- class ze {
1662
+ class Ye {
1512
1663
  constructor(e = -1, t = -1) {
1513
1664
  this.rowIndex = e, this.columnIndex = t;
1514
1665
  }
1515
1666
  }
1516
- class U {
1667
+ class J {
1517
1668
  constructor(e) {
1518
1669
  this.cells = e;
1519
1670
  }
1520
1671
  static createSingle(e, t) {
1521
- return new U([new ze(e, t)]);
1672
+ return new J([new Ye(e, t)]);
1522
1673
  }
1523
1674
  }
1524
- class Ke {
1675
+ class qe {
1525
1676
  constructor(e) {
1526
1677
  var t, s;
1527
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);
1528
1679
  }
1529
1680
  onMouseClicked(e, t) {
1530
- var o, n, a, r, d, h, p;
1681
+ var o, r, a, n, d, h, c;
1531
1682
  let s = !1, i = !1;
1532
1683
  if (this.getSelectionModel && this.getFocusModel) {
1533
1684
  const S = this.getSelectionModel(), f = this.getFocusModel();
1534
- 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), (n = e.originalEvent) != null && n.shiftKey && this.previousEvt ? (S.addSelection(this.createRangeByEvents(e, this.previousEvt)), i = !0, s = !0) : (a = e.originalEvent) != null && a.ctrlKey || (r = e.originalEvent) != null && r.metaKey ? (S.addSelection(A.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0) : (d = e.originalEvent) != null && d.altKey && ((h = e.originalEvent) != null && h.ctrlKey || (p = e.originalEvent) != null && p.metaKey) && (S.removeSelection(A.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0));
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));
1535
1686
  }
1536
1687
  return i ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
1537
1688
  }
@@ -1553,16 +1704,16 @@ class Ke {
1553
1704
  }
1554
1705
  createRangeByEvents(e, t) {
1555
1706
  t || (t = e);
1556
- const s = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex), i = Math.max(e.rowIndex, t == null ? void 0 : t.rowIndex), o = Math.min(e.columnIndex, t == null ? void 0 : t.columnIndex), n = Math.max(e.columnIndex, t == null ? void 0 : t.columnIndex);
1557
- return A.create({
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({
1558
1709
  rowIndex1: s,
1559
1710
  columnIndex1: o,
1560
1711
  rowIndex2: i,
1561
- columnIndex2: n
1712
+ columnIndex2: r
1562
1713
  });
1563
1714
  }
1564
1715
  }
1565
- class Ye {
1716
+ class Ue {
1566
1717
  get() {
1567
1718
  return {
1568
1719
  f2: "START_EDITING",
@@ -1580,7 +1731,7 @@ class Ye {
1580
1731
  };
1581
1732
  }
1582
1733
  }
1583
- class qe {
1734
+ class Je {
1584
1735
  get() {
1585
1736
  return {
1586
1737
  f2: "START_EDITING",
@@ -1600,7 +1751,7 @@ class qe {
1600
1751
  };
1601
1752
  }
1602
1753
  }
1603
- class Ue {
1754
+ class Qe {
1604
1755
  constructor(e) {
1605
1756
  this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
1606
1757
  }
@@ -1608,7 +1759,7 @@ class Ue {
1608
1759
  this.listener.includes(e) || this.listener.push(e);
1609
1760
  }
1610
1761
  init() {
1611
- this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new qe().get()) : Object.assign(this.shortcutActionIdMapping, new Ye().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));
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));
1612
1763
  }
1613
1764
  isMacintosh() {
1614
1765
  return navigator.platform.indexOf("Mac") > -1;
@@ -1652,7 +1803,7 @@ class Ue {
1652
1803
  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();
1653
1804
  }
1654
1805
  }
1655
- class te {
1806
+ class ie {
1656
1807
  onCheckboxChanged(e) {
1657
1808
  }
1658
1809
  onContextmenu(e) {
@@ -1668,7 +1819,7 @@ class te {
1668
1819
  onMouseMoved(e) {
1669
1820
  }
1670
1821
  }
1671
- class ae {
1822
+ class he {
1672
1823
  setStyle(e, t, s) {
1673
1824
  return e.style[t] = s, e;
1674
1825
  }
@@ -1695,15 +1846,15 @@ class ae {
1695
1846
  e.setAttribute(t, s);
1696
1847
  }
1697
1848
  }
1698
- class Je {
1699
- render(e, t, s, i, o, n, a) {
1849
+ class Ze {
1850
+ render(e, t, s, i, o, r, a) {
1700
1851
  if (o.isEditable(t, s)) {
1701
1852
  a.addClass(e, "ge-table-row-input-div");
1702
- const r = o.getValueAt(t, s);
1853
+ const n = o.getValueAt(t, s);
1703
1854
  e.innerHTML = `
1704
1855
  <input
1705
1856
  type="text"
1706
- value="${r}"
1857
+ value="${n}"
1707
1858
  autofocus
1708
1859
  onfocus="this.setSelectionRange(0, this.value.length)"
1709
1860
  data-listen="change"
@@ -1716,7 +1867,7 @@ class Je {
1716
1867
  }
1717
1868
  }
1718
1869
  }
1719
- class Qe {
1870
+ class et {
1720
1871
  constructor(e = "none", t = "single") {
1721
1872
  this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
1722
1873
  }
@@ -1751,16 +1902,16 @@ class Qe {
1751
1902
  if (this.selectionType === "none")
1752
1903
  return;
1753
1904
  let t = e;
1754
- this.selectionType === "row" ? t = A.singleRow(e.r1) : this.selectionType === "column" && (t = A.singleColumn(e.c1)), this.negativeRanges.push(t);
1905
+ this.selectionType === "row" ? t = M.singleRow(e.r1) : this.selectionType === "column" && (t = M.singleColumn(e.c1)), this.negativeRanges.push(t);
1755
1906
  }
1756
1907
  togglePoint(e, t) {
1757
- this.getSelectionCount(e, t) > 0 ? this.removeSelection(A.singleCell(e, t)) : this.addSelection(A.singleCell(e, t));
1908
+ this.getSelectionCount(e, t) > 0 ? this.removeSelection(M.singleCell(e, t)) : this.addSelection(M.singleCell(e, t));
1758
1909
  }
1759
1910
  addRange(e) {
1760
1911
  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));
1761
1912
  }
1762
1913
  }
1763
- class Ze {
1914
+ class tt {
1764
1915
  constructor(e = "none") {
1765
1916
  this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
1766
1917
  }
@@ -1783,32 +1934,43 @@ class Ze {
1783
1934
  return [this.rowIndex, this.columnIndex];
1784
1935
  }
1785
1936
  }
1786
- const et = new Qe(), tt = new Ze("cell");
1787
- class de {
1937
+ const st = new et(), it = new tt("cell");
1938
+ class ce {
1788
1939
  constructor() {
1789
1940
  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 = {
1790
1941
  header: 34,
1791
1942
  body: 34,
1792
1943
  footer: 34
1793
- }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new re(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new ne(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new Je(), this.getSelectionModel = () => et, this.getFocusModel = () => tt;
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;
1794
1945
  }
1795
1946
  }
1796
- class J extends Ne {
1947
+ class Q extends Ke {
1797
1948
  constructor(e, t, s, i, o) {
1798
- var n;
1949
+ var r;
1799
1950
  if (super(
1800
1951
  e,
1801
1952
  t,
1802
- new Fe(s),
1953
+ new $e(s),
1803
1954
  i
1804
- ), this.eventListener = o, this.selectionService = new Ke(this), this.api = new _e(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, o || (this.eventListener = new te()), (n = this.tableOptions) != null && n.autoRestoreOptions) {
1805
- const a = this.tableOptions.autoRestoreOptions, r = a.getStorageKeyFn;
1806
- r && (a.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Be(r)), a.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new He(r)), a.autoRestoreSortingState && (this.storeSortingService = new ke(r)));
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)));
1807
1958
  }
1808
- this.mouseHandler = new Le(this), this.inputHandler = new Xe(this), this.shortcutService = new Ue(this), this.shortcutService.addListener(this.selectionService);
1959
+ this.mouseHandler = new Be(this), this.inputHandler = new ze(this), this.shortcutService = new Qe(this), this.shortcutService.addListener(this.selectionService);
1809
1960
  }
1810
- static create(e, t, s = new de(), i = new te(), o = new ae()) {
1811
- return new J(
1961
+ /**
1962
+ * Creates a TableScope instance.
1963
+ *
1964
+ * @param {HTMLDivElement} hostElement - The HTML div element that will contain the table.
1965
+ * @param {TableModelIf} tableModel - The table model object.
1966
+ * @param {TableOptionsIf} [tableOptions=new TableOptions()] - The optional table options object.
1967
+ * @param {EventListenerIf} [eventListener=new EventAdapter()] - The optional event listener object.
1968
+ * @param {DomServiceIf} [domService=new SimpleDomService()] - The optional DOM service object.
1969
+ *
1970
+ * @return {TableScope} - The newly created TableScope instance.
1971
+ */
1972
+ static create(e, t, s = new ce(), i = new ie(), o = new he()) {
1973
+ return new Q(
1812
1974
  e,
1813
1975
  t,
1814
1976
  o,
@@ -1830,20 +1992,36 @@ class J extends Ne {
1830
1992
  return !1;
1831
1993
  }
1832
1994
  updateModelValueAfterEdit(e, t, s, i) {
1833
- e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, i) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(U.createSingle(t, s)), this.hostElement.focus());
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());
1834
1996
  }
1997
+ /**
1998
+ * Retrieves the TableApi object.
1999
+ *
2000
+ * @return {TableApi} The TableApi object.
2001
+ */
1835
2002
  getApi() {
1836
2003
  return this.api;
1837
2004
  }
1838
- /*
1839
- * Called by the table component
2005
+ /**
2006
+ * Initializes the table. Called by the table component.
2007
+ *
2008
+ * @function firstInit
2009
+ * @memberof TableScope
2010
+ *
2011
+ * @returns {TableScope} This instance of the table scope.
1840
2012
  */
1841
2013
  firstInit() {
1842
2014
  var e;
1843
2015
  return this.tableModel.init(), (e = this.tableOptions) != null && e.externalFilterFunction && this.externalFilterChanged(!1), this.autoRestoreCollapsedExpandedState(), this.autoRestoreSortingState(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows(), this.autoRestoreScrollPosition(), this;
1844
2016
  }
2017
+ /**
2018
+ * Creates a GeMouseEvent object based on a MouseEvent.
2019
+ *
2020
+ * @param {MouseEvent} mouseEvent - The MouseEvent object to create the GeMouseEvent from.
2021
+ * @return {GeMouseEvent} - The created GeMouseEvent object.
2022
+ */
1845
2023
  createGeMouseEvent(e) {
1846
- const t = new K();
2024
+ const t = new Y();
1847
2025
  if (t.originalEvent = e, e) {
1848
2026
  const s = e.target;
1849
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) {
@@ -1857,33 +2035,86 @@ class J extends Ne {
1857
2035
  }
1858
2036
  return t;
1859
2037
  }
2038
+ /**
2039
+ * Handles the mouse down event.
2040
+ *
2041
+ * @param {GeMouseEvent} mouseEvent - The mouse event object.
2042
+ * @return {void}
2043
+ */
1860
2044
  onMouseDown(e) {
1861
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));
1862
2046
  }
2047
+ /**
2048
+ * Handles mouse dragging on the frame.
2049
+ *
2050
+ * @param {GeMouseEvent} mouseEvent - The mouse event object.
2051
+ */
1863
2052
  mouseDraggingOnFrame(e) {
1864
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());
1865
2054
  }
2055
+ /**
2056
+ * Handles the end of mouse dragging event on a frame.
2057
+ *
2058
+ * @param {GeMouseEvent} mouseEvent - The mouse event object.
2059
+ *
2060
+ * @returns {void}
2061
+ */
1866
2062
  mouseDraggingEndOnFrame(e) {
1867
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 = "";
1868
2064
  }
2065
+ /**
2066
+ * Handles the mouse move event.
2067
+ *
2068
+ * @param {GeMouseEvent} mouseMoveEvent - The mouse move event object.
2069
+ * @return {void}
2070
+ */
1869
2071
  mouseMove(e) {
1870
2072
  this.eventListener.onMouseMoved(e), this.adjustHoverRows(e), this.adjustHoverColumns(e);
1871
2073
  }
2074
+ /**
2075
+ * Triggers the context menu event based on the mouse move event.
2076
+ *
2077
+ * @param {GeMouseEvent} mouseMoveEvent - The mouse move event object.
2078
+ * @return {void}
2079
+ */
1872
2080
  contextmenu(e) {
1873
2081
  this.eventListener.onContextmenu(e);
1874
2082
  }
2083
+ /**
2084
+ * Toggles the expand or collapse state of all items in the body area model.
2085
+ *
2086
+ * @param {boolean} [expand=true] - Whether to expand or collapse all items. Default is true.
2087
+ *
2088
+ * @return {void}
2089
+ */
1875
2090
  toggleExpandCollapseAll(e = !0) {
1876
2091
  var s;
1877
2092
  const t = this.tableModel.getBodyModel();
1878
2093
  X(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
1879
2094
  }
2095
+ /**
2096
+ * Toggles the checkbox state of a specific row in a table.
2097
+ *
2098
+ * @param {number} rowIdx - The index of the row to toggle the checkbox state.
2099
+ * @param {number} _colIdx - The index of the column. This parameter is unused.
2100
+ * @param {AreaIdent} areaIdent - The identifier of the table area.
2101
+ *
2102
+ * @return {void} - This method does not return anything.
2103
+ */
1880
2104
  toggleRowCheckbox(e, t, s) {
1881
- var r;
1882
- const i = this.tableModel.getAreaModel(s), o = i.isRowChecked(e), n = o === void 0 || o === "semi" || o === "none";
1883
- i.setRowChecked(e, n), this.repaint();
1884
- const a = (r = i.rowSelectionModel) == null ? void 0 : r.getCheckedRows();
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();
1885
2109
  this.eventListener.onCheckboxChanged(a || []);
1886
2110
  }
2111
+ /**
2112
+ * Handle mouse click events.
2113
+ *
2114
+ * @param {GeMouseEvent} evt - The mouse click event.
2115
+ * @param {GeMouseEvent | undefined} previousEvt - The previous mouse click event, if any.
2116
+ * @returns {void}
2117
+ */
1887
2118
  onMouseClicked(e, t) {
1888
2119
  let s = this.selectionService.onMouseClicked(e, t);
1889
2120
  if (!s && this.getFocusModel) {
@@ -1892,19 +2123,41 @@ class J extends Ne {
1892
2123
  }
1893
2124
  this.eventListener.onMouseClicked(e), s && this.debounce(this.repaint.bind(this), 10);
1894
2125
  }
2126
+ /**
2127
+ * Updates the table (repaint) when an external filter is changed.
2128
+ *
2129
+ * @param {boolean} clearSelection - Indicates whether to clear the selection model or not. Default value is true.
2130
+ * @return {void}
2131
+ */
1895
2132
  externalFilterChanged(e = !0) {
1896
2133
  const t = this.tableOptions.externalFilterFunction;
1897
2134
  t && (e && this.clearSelectionModel(), this.tableModel.externalFilterChanged(t), this.scrollViewport.scrollTo(0, 0), this.tableModel.recalcHeightAndPadding(), this.resetSizeOfWrapperDiv(), this.repaint());
1898
2135
  }
2136
+ /**
2137
+ * Handle the double click event on the table header.
2138
+ *
2139
+ * @param {MouseEvent} event - The mouse event that triggered the double click.
2140
+ * @param {number} _rowIdx - The row index of the header.
2141
+ * @param {number} colIdx - The column index of the header.
2142
+ *
2143
+ * @return {void}
2144
+ */
1899
2145
  onHeaderDblClicked(e, t, s) {
1900
- var o, n;
2146
+ var o, r;
1901
2147
  const i = this.tableModel.getColumnDef(s);
1902
2148
  if (i != null && i.sortable && i.sortable()) {
1903
2149
  e.preventDefault(), e.stopPropagation();
1904
- const a = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, r = i.sortState ?? "", d = a[(a.indexOf(r) + 1) % a.length], h = new je(s, d);
1905
- this.tableModel.doSort([h]) && ((o = this.tableModel.getColumnDefs()) == null || o.forEach((S) => S.sortState = ""), i.sortState = d), this.repaint(), (n = this.storeSortingService) == null || n.setSortItems([h]);
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]);
1906
2152
  }
1907
2153
  }
2154
+ /**
2155
+ * Changes the focus cell using the specified deltas.
2156
+ *
2157
+ * @param {number} dx - The delta for the column index.
2158
+ * @param {number} dy - The delta for the row index.
2159
+ * @return {boolean} - True if the focus cell was changed, false otherwise.
2160
+ */
1908
2161
  changeFocusCell(e, t) {
1909
2162
  if (!this.isEditing() && this.getFocusModel) {
1910
2163
  const s = this.getFocusModel();
@@ -1915,9 +2168,19 @@ class J extends Ne {
1915
2168
  }
1916
2169
  return !1;
1917
2170
  }
2171
+ /**
2172
+ * Resizes the column based on the mouse event.
2173
+ *
2174
+ * @param {GeMouseEvent} mouseEvent - The mouse event that triggered the resize.
2175
+ */
1918
2176
  resizeColumn(e) {
1919
2177
  this.tableModel.setColumnWidth(this.mouseStartColumnIndex, this.mouseStartWidth + e.draggingX), this.tableModel.recalcPadding(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows();
1920
2178
  }
2179
+ /**
2180
+ * Clears the selection model, if available.
2181
+ *
2182
+ * @return {void}
2183
+ */
1921
2184
  clearSelectionModel() {
1922
2185
  var e;
1923
2186
  this.getSelectionModel && ((e = this.getSelectionModel()) == null || e.clear());
@@ -1926,6 +2189,14 @@ class J extends Ne {
1926
2189
  var s;
1927
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);
1928
2191
  }
2192
+ /**
2193
+ * Restores the scroll position of the table if auto restore options are enabled.
2194
+ *
2195
+ * @private
2196
+ * @memberof ClassName
2197
+ *
2198
+ * @returns {void}
2199
+ */
1929
2200
  autoRestoreScrollPosition() {
1930
2201
  var e;
1931
2202
  if ((e = this.tableOptions) != null && e.autoRestoreOptions && this.storeScrollPosStateService && this.tableOptions.autoRestoreOptions.autoRestoreScrollPosition) {
@@ -1933,6 +2204,20 @@ class J extends Ne {
1933
2204
  s && this.scrollViewport.scrollTo(...s);
1934
2205
  }
1935
2206
  }
2207
+ /**
2208
+ * Automatically restores the sorting state of the table.
2209
+ *
2210
+ * @private
2211
+ * @function autoRestoreSortingState
2212
+ * @memberof ClassName
2213
+ *
2214
+ * @description
2215
+ * This method checks if the autoRestoreSortingState option is enabled in the tableOptions.
2216
+ * If enabled, it uses the storeSortingService to retrieve the sort items array.
2217
+ * If there are sort items present, it applies them to the table's body model using the doSort method.
2218
+ *
2219
+ * @returns {void}
2220
+ */
1936
2221
  autoRestoreSortingState() {
1937
2222
  var e, t;
1938
2223
  if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.autoRestoreSortingState && this.storeSortingService) {
@@ -1940,24 +2225,30 @@ class J extends Ne {
1940
2225
  s != null && s.length && this.tableModel.getBodyModel().doSort(s);
1941
2226
  }
1942
2227
  }
2228
+ /**
2229
+ * Restores the collapsed/expanded state of the rows in the table based on the autoRestoreOptions
2230
+ * specified in the tableOptions. This method is private and should not be called directly.
2231
+ *
2232
+ * @private
2233
+ */
1943
2234
  autoRestoreCollapsedExpandedState() {
1944
2235
  var e, t;
1945
2236
  if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
1946
2237
  const s = this.tableOptions.autoRestoreOptions, i = s.getRowId;
1947
2238
  if (s.autoRestoreCollapsedExpandedState && i) {
1948
- const o = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), n = this.tableModel.getAreaModel("body");
1949
- if (X(n)) {
1950
- const a = n, r = n.getRowCount();
1951
- for (let d = 0; d < r; d++) {
1952
- const h = n.getRowByIndex(d);
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);
1953
2244
  if (h)
1954
2245
  if (o.allExpanded)
1955
2246
  h.expanded = !0;
1956
2247
  else if (o.allCollapsed)
1957
2248
  h.expanded = !1;
1958
2249
  else {
1959
- const p = i(h.data);
1960
- o.mode === "expanded" ? h.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(p) : o.mode === "collapsed" && (h.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(p));
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));
1961
2252
  }
1962
2253
  }
1963
2254
  a.recalcVisibleTreeRows();
@@ -1965,73 +2256,99 @@ class J extends Ne {
1965
2256
  }
1966
2257
  }
1967
2258
  }
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);
2269
+ }
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);
2280
+ }
1968
2281
  }
1969
- function st(l) {
2282
+ function ot(l) {
1970
2283
  let e;
1971
2284
  return {
1972
2285
  c() {
1973
- e = me("div"), e.innerHTML = "", be(e, "class", "ge-table"), L(e, "width", "100%"), L(e, "height", "100%"), L(e, "background-color", "transparent"), L(e, "padding", "0"), L(e, "margin", "0");
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");
1974
2287
  },
1975
2288
  m(t, s) {
1976
- fe(t, e, s), l[3](e);
2289
+ be(t, e, s), l[4](e);
1977
2290
  },
1978
- p: F,
1979
- i: F,
1980
- o: F,
2291
+ p: L,
2292
+ i: L,
2293
+ o: L,
1981
2294
  d(t) {
1982
- t && oe(e), l[3](null);
2295
+ t && re(e), l[4](null);
1983
2296
  }
1984
2297
  };
1985
2298
  }
1986
- function it(l, e, t) {
1987
- let { tableModel: s } = e, { tableOptions: i = new de() } = e, o;
1988
- const n = pe();
1989
- ue(() => {
1990
- const r = {
1991
- onCheckboxChanged: (h) => {
1992
- n("checkboxChanged", h);
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(() => {
2303
+ const d = {
2304
+ onCheckboxChanged: (c) => {
2305
+ a("checkboxChanged", c);
1993
2306
  },
1994
- onContextmenu: (h) => {
1995
- n("contextmenu", h);
2307
+ onContextmenu: (c) => {
2308
+ a("contextmenu", c);
1996
2309
  },
1997
- onModelChanged: (h) => {
1998
- n("modelChanged", h);
2310
+ onModelChanged: (c) => {
2311
+ a("modelChanged", c);
1999
2312
  },
2000
- onMouseClicked: (h) => {
2001
- n("mouseClicked", h);
2313
+ onMouseClicked: (c) => {
2314
+ a("mouseClicked", c);
2002
2315
  },
2003
- onMouseDragging: (h) => {
2004
- n("mouseDragging", h);
2316
+ onMouseDragging: (c) => {
2317
+ a("mouseDragging", c);
2005
2318
  },
2006
- onMouseDraggingEnd: (h) => {
2007
- n("mouseDraggingEnd", h);
2319
+ onMouseDraggingEnd: (c) => {
2320
+ a("mouseDraggingEnd", c);
2008
2321
  },
2009
- onMouseMoved: (h) => {
2010
- n("mouseMoved", h);
2322
+ onMouseMoved: (c) => {
2323
+ a("mouseMoved", c);
2011
2324
  }
2012
- }, d = new J(o, s, new ae(), i, r);
2013
- d.firstInit(), n("tableReady", d.getApi());
2325
+ }, h = new Q(r, s, new he(), i, d);
2326
+ h.firstInit(), a("tableReady", h.getApi()), o && D.getInstance().setLicenseKey(o);
2014
2327
  });
2015
- function a(r) {
2016
- V[r ? "unshift" : "push"](() => {
2017
- o = r, t(0, o);
2328
+ function n(d) {
2329
+ G[d ? "unshift" : "push"](() => {
2330
+ r = d, t(0, r);
2018
2331
  });
2019
2332
  }
2020
- return l.$$set = (r) => {
2021
- "tableModel" in r && t(1, s = r.tableModel), "tableOptions" in r && t(2, i = r.tableOptions);
2022
- }, [o, s, i, a];
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];
2023
2336
  }
2024
- class rt extends Ie {
2337
+ class at extends Oe {
2025
2338
  constructor(e) {
2026
- super(), De(this, e, it, st, Se, { tableModel: 1, tableOptions: 2 });
2339
+ super(), Fe(this, e, lt, ot, fe, {
2340
+ tableModel: 1,
2341
+ tableOptions: 2,
2342
+ licenseKey: 3
2343
+ });
2027
2344
  }
2028
2345
  }
2029
- class nt {
2346
+ class dt {
2030
2347
  constructor(e) {
2031
2348
  this.Component = e;
2032
2349
  }
2033
- render(e, t, s, i, o, n, a) {
2034
- const r = new this.Component({
2350
+ render(e, t, s, i, o, r, a) {
2351
+ const n = new this.Component({
2035
2352
  target: e,
2036
2353
  props: {
2037
2354
  cellDiv: e,
@@ -2039,15 +2356,15 @@ class nt {
2039
2356
  columnIndex: s,
2040
2357
  areaIdent: i,
2041
2358
  areaModel: o,
2042
- cellValue: n
2359
+ cellValue: r
2043
2360
  }
2044
2361
  });
2045
2362
  return () => {
2046
- r.$destroy();
2363
+ n.$destroy();
2047
2364
  };
2048
2365
  }
2049
2366
  }
2050
2367
  export {
2051
- nt as ComponentRendererWrapper,
2052
- rt as GuiexpertTable
2368
+ dt as ComponentRendererWrapper,
2369
+ at as GuiexpertTable
2053
2370
  };