@guiexpert/svelte-table 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.cjs +7 -7
  2. package/index.js +876 -580
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1,65 +1,65 @@
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";
1
+ var ce = Object.defineProperty;
2
+ var pe = (l, e, t) => e in l ? ce(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
3
+ var k = (l, e, t) => (pe(l, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { createEventDispatcher as ue, onMount as Se } from "svelte";
5
5
  function F() {
6
6
  }
7
7
  function ie(l) {
8
8
  return l();
9
9
  }
10
- function Z() {
10
+ function ee() {
11
11
  return /* @__PURE__ */ Object.create(null);
12
12
  }
13
13
  function W(l) {
14
14
  l.forEach(ie);
15
15
  }
16
- function se(l) {
16
+ function oe(l) {
17
17
  return typeof l == "function";
18
18
  }
19
- function Se(l, e) {
19
+ function ge(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 fe(l) {
23
23
  return Object.keys(l).length === 0;
24
24
  }
25
- function fe(l, e, t) {
25
+ function me(l, e, t) {
26
26
  l.insertBefore(e, t || null);
27
27
  }
28
- function oe(l) {
28
+ function le(l) {
29
29
  l.parentNode && l.parentNode.removeChild(l);
30
30
  }
31
- function me(l) {
31
+ function be(l) {
32
32
  return document.createElement(l);
33
33
  }
34
- function be(l, e, t) {
34
+ function ye(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 ve(l) {
38
38
  return Array.from(l.childNodes);
39
39
  }
40
- function L(l, e, t, i) {
41
- t == null ? l.style.removeProperty(e) : l.style.setProperty(e, t, i ? "important" : "");
40
+ function L(l, e, t, s) {
41
+ t == null ? l.style.removeProperty(e) : l.style.setProperty(e, t, s ? "important" : "");
42
42
  }
43
- let X;
43
+ let z;
44
44
  function _(l) {
45
- X = l;
45
+ z = l;
46
46
  }
47
47
  const $ = [], V = [];
48
48
  let O = [];
49
- const ee = [], ve = /* @__PURE__ */ Promise.resolve();
49
+ const te = [], xe = /* @__PURE__ */ Promise.resolve();
50
50
  let G = !1;
51
- function xe() {
52
- G || (G = !0, ve.then(le));
51
+ function Ce() {
52
+ G || (G = !0, xe.then(re));
53
53
  }
54
54
  function N(l) {
55
55
  O.push(l);
56
56
  }
57
57
  const P = /* @__PURE__ */ new Set();
58
58
  let I = 0;
59
- function le() {
59
+ function re() {
60
60
  if (I !== 0)
61
61
  return;
62
- const l = X;
62
+ const l = z;
63
63
  do {
64
64
  try {
65
65
  for (; I < $.length; ) {
@@ -77,8 +77,8 @@ function le() {
77
77
  }
78
78
  O.length = 0;
79
79
  } while ($.length);
80
- for (; ee.length; )
81
- ee.pop()();
80
+ for (; te.length; )
81
+ te.pop()();
82
82
  G = !1, P.clear(), _(l);
83
83
  }
84
84
  function we(l) {
@@ -88,30 +88,30 @@ function we(l) {
88
88
  l.dirty = [-1], l.fragment && l.fragment.p(l.ctx, e), l.after_update.forEach(N);
89
89
  }
90
90
  }
91
- function Ce(l) {
91
+ function Ee(l) {
92
92
  const e = [], t = [];
93
- O.forEach((i) => l.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), O = e;
93
+ O.forEach((s) => l.indexOf(s) === -1 ? e.push(s) : t.push(s)), t.forEach((s) => s()), O = 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 Ae = /* @__PURE__ */ new Set();
96
+ function Me(l, e) {
97
+ l && l.i && (Ae.delete(l), l.i(e));
98
98
  }
99
- function Me(l, e, t) {
100
- const { fragment: i, after_update: s } = l.$$;
101
- i && i.m(e, t), N(() => {
102
- const o = l.$$.on_mount.map(ie).filter(se);
99
+ function Re(l, e, t) {
100
+ const { fragment: s, after_update: i } = l.$$;
101
+ s && s.m(e, t), N(() => {
102
+ const o = l.$$.on_mount.map(ie).filter(oe);
103
103
  l.$$.on_destroy ? l.$$.on_destroy.push(...o) : W(o), l.$$.on_mount = [];
104
- }), s.forEach(N);
104
+ }), i.forEach(N);
105
105
  }
106
- function Re(l, e) {
106
+ function Te(l, e) {
107
107
  const t = l.$$;
108
- t.fragment !== null && (Ce(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 && (Ee(t.after_update), W(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 De(l, e) {
111
+ l.$$.dirty[0] === -1 && ($.push(l), Ce(), l.$$.dirty.fill(0)), l.$$.dirty[e / 31 | 0] |= 1 << e % 31;
112
112
  }
113
- function De(l, e, t, i, s, o, n = null, a = [-1]) {
114
- const r = X;
113
+ function Ie(l, e, t, s, i, o, n = null, a = [-1]) {
114
+ const r = z;
115
115
  _(l);
116
116
  const d = l.$$ = {
117
117
  fragment: null,
@@ -119,8 +119,8 @@ function De(l, e, t, i, s, o, n = null, a = [-1]) {
119
119
  // state
120
120
  props: o,
121
121
  update: F,
122
- not_equal: s,
123
- bound: Z(),
122
+ not_equal: i,
123
+ bound: ee(),
124
124
  // lifecycle
125
125
  on_mount: [],
126
126
  on_destroy: [],
@@ -129,27 +129,27 @@ function De(l, e, t, i, s, o, n = null, a = [-1]) {
129
129
  after_update: [],
130
130
  context: new Map(e.context || (r ? r.$$.context : [])),
131
131
  // everything else
132
- callbacks: Z(),
132
+ callbacks: ee(),
133
133
  dirty: a,
134
134
  skip_bound: !1,
135
135
  root: e.target || r.$$.root
136
136
  };
137
137
  n && n(d.root);
138
138
  let h = !1;
139
- if (d.ctx = t ? t(l, e.props || {}, (p, g, ...f) => {
140
- const c = f.length ? f[0] : g;
141
- return d.ctx && s(d.ctx[p], d.ctx[p] = c) && (!d.skip_bound && d.bound[p] && d.bound[p](c), h && Te(l, p)), g;
142
- }) : [], d.update(), h = !0, W(d.before_update), d.fragment = i ? i(d.ctx) : !1, e.target) {
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 && De(l, p)), S;
142
+ }) : [], d.update(), h = !0, W(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 p = ve(e.target);
145
+ d.fragment && d.fragment.l(p), p.forEach(le);
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 && Me(l.$$.fragment), Re(l, e.target, e.anchor), re();
149
149
  }
150
150
  _(r);
151
151
  }
152
- class Ie {
152
+ class $e {
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
+ Te(this, 1), this.$destroy = F;
174
174
  }
175
175
  /**
176
176
  * @template {Extract<keyof Events, string>} K
@@ -179,12 +179,12 @@ class Ie {
179
179
  * @returns {() => void}
180
180
  */
181
181
  $on(e, t) {
182
- if (!se(t))
182
+ if (!oe(t))
183
183
  return F;
184
- const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
185
- return i.push(t), () => {
186
- const s = i.indexOf(t);
187
- s !== -1 && i.splice(s, 1);
184
+ const s = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
185
+ return s.push(t), () => {
186
+ const i = s.indexOf(t);
187
+ i !== -1 && s.splice(i, 1);
188
188
  };
189
189
  }
190
190
  /**
@@ -192,20 +192,20 @@ 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 && !fe(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);
198
+ const Fe = "4";
199
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Fe);
200
200
  function j(l) {
201
201
  return l && l.type === "TreeRow";
202
202
  }
203
- function z(l) {
203
+ function X(l) {
204
204
  return l && l.type === "AreaModelTree";
205
205
  }
206
206
  class K {
207
- constructor(e = -1, t = -1, i = -1, s = -1, o, n, a, r = 0, d = 0, h = 0, p = "") {
208
- this.rowIndex = e, this.rowTop = t, this.columnIndex = i, this.columnLeft = s, this.areaIdent = o, this.sideIdent = n, this.originalEvent = a, this.clickCount = r, this.draggingX = d, this.draggingY = h, this.action = p;
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;
209
209
  }
210
210
  clone() {
211
211
  return new K(
@@ -224,11 +224,11 @@ class K {
224
224
  }
225
225
  }
226
226
  class D {
227
- constructor(e = ">", t = "", i = []) {
228
- this.content = e, this.style = t, this.classes = i;
227
+ constructor(e = ">", t = "", s = []) {
228
+ this.content = e, this.style = t, this.classes = s;
229
229
  }
230
230
  }
231
- class re {
231
+ class ne {
232
232
  constructor(e = new D(
233
233
  ">",
234
234
  "transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
@@ -237,33 +237,33 @@ class re {
237
237
  ">",
238
238
  "",
239
239
  ["ge-table-tree-arrow-collapsed"]
240
- ), i = new D(
240
+ ), s = new D(
241
241
  ">",
242
242
  "color:transparent;",
243
243
  ["gt-table-tree-arrow-hidden"]
244
- ), s = new D(
244
+ ), i = new D(
245
245
  "↕",
246
246
  "",
247
247
  ["gt-table-tree-arrow-expanded-all"]
248
248
  )) {
249
- this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = i, this.arrowExpandCollapseAll = s;
249
+ this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = i;
250
250
  }
251
251
  }
252
- class ne {
253
- constructor(e = new D("↑", "", ["ge-header-sorted-asc"]), t = new D("↓", "", ["ge-header-sorted-desc"]), i = new D("↑", "color:transparent;", [])) {
254
- this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = i;
252
+ class ae {
253
+ constructor(e = new D("↑", "", ["ge-header-sorted-asc"]), t = new D("↓", "", ["ge-header-sorted-desc"]), s = new D("↑", "color:transparent;", [])) {
254
+ this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
255
255
  }
256
256
  }
257
- class Fe {
257
+ class Oe {
258
258
  constructor(e) {
259
259
  this.domService = e;
260
260
  }
261
- setStyle(e, t, i) {
262
- return this.domService.setStyle(e, t, i), e;
261
+ setStyle(e, t, s) {
262
+ return this.domService.setStyle(e, t, s), e;
263
263
  }
264
264
  applyStyle(e, t) {
265
- for (const i in t)
266
- this.domService.setStyle(e, i, t[i]);
265
+ for (const s in t)
266
+ this.domService.setStyle(e, s, t[s]);
267
267
  return e;
268
268
  }
269
269
  applyDisplayNoneStyle(e) {
@@ -273,7 +273,7 @@ class Fe {
273
273
  return this.domService.setStyle(e, "display", "block"), e;
274
274
  }
275
275
  applyStyleInPx(e, t) {
276
- return Object.entries(t).forEach(([i, s]) => this.domService.setStyle(e, i, s + "px")), e;
276
+ return Object.entries(t).forEach(([s, i]) => this.domService.setStyle(e, s, i + "px")), e;
277
277
  }
278
278
  applyStylePosistionRelative(e) {
279
279
  return this.domService.setStyle(e, "position", "relative"), this.domService.setStyle(e, "overflow", "clip"), e;
@@ -284,8 +284,8 @@ class Fe {
284
284
  applyStyleFullSize(e) {
285
285
  return this.domService.setStyle(e, "width", "100%"), this.domService.setStyle(e, "height", "100%"), e;
286
286
  }
287
- applyStyleOverflowAuto(e = "auto", t = "auto", i) {
288
- return this.domService.setStyle(i, "overflow-x", e), this.domService.setStyle(i, "overflow-y", t), i;
287
+ applyStyleOverflowAuto(e = "auto", t = "auto", s) {
288
+ return this.domService.setStyle(s, "overflow-x", e), this.domService.setStyle(s, "overflow-y", t), s;
289
289
  }
290
290
  applyStyleNoPadding(e) {
291
291
  return this.domService.setStyle(e, "padding", "0"), this.domService.setStyle(e, "margin", "0"), this.domService.setStyle(e, "border", "0"), e;
@@ -301,189 +301,212 @@ class Fe {
301
301
  return this.domService.appendChild(e, t), this.applyStylePosistionAbsolute(e), { parent: e, child: t, cache: {} };
302
302
  }
303
303
  appendText(e, t) {
304
- const i = this.domService.createText(t);
305
- return this.domService.appendChild(e, i), i;
304
+ const s = this.domService.createText(t);
305
+ return this.domService.appendChild(e, s), s;
306
306
  }
307
307
  addClass(e, t) {
308
- return e.includes(" ") ? e.split(" ").forEach((i) => this.domService.addClass(t, i)) : this.domService.addClass(t, e), t;
308
+ return e.includes(" ") ? e.split(" ").forEach((s) => this.domService.addClass(t, s)) : this.domService.addClass(t, e), t;
309
+ }
310
+ removeClass(e, t) {
311
+ return e.includes(" ") ? e.split(" ").forEach((s) => this.domService.removeClass(t, s)) : this.domService.removeClass(t, e), t;
309
312
  }
310
313
  addClasses(e, t) {
311
314
  if (e)
312
- for (const i of e)
313
- this.domService.addClass(t, i);
315
+ for (const s of e)
316
+ this.domService.addClass(t, s);
314
317
  return t;
315
318
  }
316
- setAttribute(e, t, i) {
317
- return t && i && this.domService.setAttribute(e, t, i), e;
319
+ setAttribute(e, t, s) {
320
+ return t && s && this.domService.setAttribute(e, t, s), e;
318
321
  }
319
- createAreaDivWithClass(e, t, i, s) {
322
+ createAreaDivWithClass(e, t, s, i) {
320
323
  const o = this.domService.createElement("div");
321
- return this.addClass(e, o), this.domService.setAttribute(o, "data-area", i), this.domService.setAttribute(o, "data-side", s), this.domService.appendChild(t, o), o;
324
+ return this.addClass(e, o), this.domService.setAttribute(o, "data-area", s), this.domService.setAttribute(o, "data-side", i), this.domService.appendChild(t, o), o;
322
325
  }
323
326
  createDivWithClass(e, t) {
324
- const i = this.domService.createElement("div");
325
- return this.addClass(e, i), this.domService.appendChild(t, i), i;
327
+ const s = this.domService.createElement("div");
328
+ return this.addClass(e, s), this.domService.appendChild(t, s), s;
326
329
  }
327
- addRowDiv(e, t, i = -1, s, o, n = "") {
330
+ addRowDiv(e, t, s = -1, i, o, n = "") {
328
331
  const a = t.index ?? -1, r = this.getDivOrCreateDiv(a, e);
329
- if (this.domService.addClass(r, "ge-table-row-div"), this.domService.addClass(r, `ge-table-row-div-${t.index}`), s === "body" && o === "center") {
332
+ if (this.domService.addClass(r, "ge-table-row-div"), this.domService.addClass(r, `ge-table-row-div-${t.index}`), i === "body" && o === "center") {
330
333
  const d = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
331
334
  this.domService.addClass(r, `ge-table-row-${d}`);
332
335
  }
333
- 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", `${i}`), this.domService.setAttribute(r, "data-area", `${s}`), n) {
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) {
334
337
  const d = this.domService.createText(n);
335
338
  this.domService.appendChild(r, d);
336
339
  }
337
340
  return this.domService.appendChild(e.child, r), r;
338
341
  }
339
- addColumnDiv(e, t, i = -1, s = -1, o, n, a = "", r, d, h = void 0, p) {
340
- const g = d == null ? void 0 : d.treeOptions, f = d == null ? void 0 : d.showCheckboxWihoutExtraColumn, c = this.domService.createElement("div");
341
- 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", `${i}`), this.domService.setAttribute(c, "data-area", `${o}`);
342
- const b = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
343
- 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, g, i, s, o)), f && s === 0 && h && this.addCheckboxToDiv(c, h, o, i), a) {
344
- const u = r !== "none" && s === 0;
345
- this.addLabelDiv(c, a, u, i, s, o);
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 m = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
346
+ if (o === "body" && n === "center" && this.domService.addClass(c, `ge-table-column-${m}`), 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 g = r !== "none" && i === 0;
348
+ this.addLabelDiv(c, a, g, s, i, o);
346
349
  }
347
- return p && this.addSortedIcon(c, p, d == null ? void 0 : d.sortedOptions, s), this.domService.appendChild(e, c), c;
350
+ return p && this.addSortedIcon(c, p, d == null ? void 0 : d.sortedOptions, i), this.domService.appendChild(e, c), c;
348
351
  }
349
- addCheckboxToDiv(e, t, i, s) {
352
+ addCheckboxToDiv(e, t, s, i) {
350
353
  const o = this.domService.createElement("div"), n = t === "full" ? "checked" : "";
351
354
  return o.innerHTML = `
352
355
  <input
353
356
  type="checkbox"
354
- data-area="${i}"
355
- data-row-index="${s}"
357
+ data-area="${s}"
358
+ data-row-index="${i}"
356
359
  data-input-type="checkbox"
357
360
  ${n}
358
- class="ge-table-row-checkbox"> `, this.domService.setStyle(o, "display", "inline"), this.domService.setStyle(o, "width", "inherit"), this.domService.setAttribute(o, "data-row-index", `${s}`), this.domService.appendChild(e, o), o;
361
+ 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;
359
362
  }
360
- addLabelDiv(e, t = "", i = !1, s = -1, o = -1, n = "body") {
363
+ addLabelDiv(e, t = "", s = !1, i = -1, o = -1, n = "body") {
361
364
  const a = this.domService.createElement("div");
362
- 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", `${s}`), this.domService.setAttribute(a, "data-col-index", `${o}`), this.domService.setAttribute(a, "data-area", `${n}`), t)
363
- if (i) {
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)
366
+ if (s) {
364
367
  const r = this.domService.createText(t);
365
368
  this.domService.appendChild(a, r);
366
369
  } else {
367
370
  const r = this.domService.createElement("div");
368
371
  this.domService.appendChild(a, r);
369
372
  const d = this.domService.createText(t);
370
- this.domService.addClass(r, "ge-table-label"), this.domService.appendChild(r, d), this.domService.setAttribute(r, "data-row-index", `${s}`), this.domService.setAttribute(r, "data-col-index", `${o}`), this.domService.setAttribute(r, "data-area", `${n}`);
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}`);
371
374
  }
372
375
  return this.domService.appendChild(e, a), a;
373
376
  }
374
- addSortedIcon(e, t = "", i = new ne(), s = -1) {
377
+ addSortedIcon(e, t = "", s = new ae(), i = -1) {
375
378
  const o = this.domService.createElement("div");
376
- 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", `${s}`), this.domService.setAttribute(o, "data-area", "header");
379
+ 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");
377
380
  let n;
378
- t === "asc" ? n = i.iconAsc : t === "desc" ? n = i.iconDesc : n = i.iconPlaceholder;
381
+ t === "asc" ? n = s.iconAsc : t === "desc" ? n = s.iconDesc : n = s.iconPlaceholder;
379
382
  const a = n.content, r = this.domService.createText(a);
380
383
  this.domService.appendChild(o, r), n.style && this.applyStyleString(o, n.style);
381
384
  for (const d of n.classes)
382
385
  this.domService.addClass(o, d);
383
386
  return this.domService.appendChild(e, o), o;
384
387
  }
385
- addArrowDiv(e, t = "none", i = new re(), s = -1, o = -1, n = "body") {
388
+ addArrowDiv(e, t = "none", s = new ne(), i = -1, o = -1, n = "body") {
386
389
  const a = this.domService.createElement("div");
387
- 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", `${s}`), this.domService.setAttribute(a, "data-col-index", `${o}`), this.domService.setAttribute(a, "data-area", `${n}`);
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}`);
388
391
  let r;
389
- t === "expanded" ? r = i.arrowExpanded : t === "collapsed" ? r = i.arrowCollapsed : r = i.arrowPlaceholder;
392
+ t === "expanded" ? r = s.arrowExpanded : t === "collapsed" ? r = s.arrowCollapsed : r = s.arrowPlaceholder;
390
393
  const d = r.content, h = this.domService.createText(d);
391
394
  this.domService.appendChild(a, h), r.style && this.applyStyleString(a, r.style);
392
395
  for (const p of r.classes)
393
396
  this.domService.addClass(a, p);
394
397
  return this.domService.appendChild(e, a), a;
395
398
  }
396
- addColumnBorderDivs(e, t, i, s, o) {
399
+ addColumnBorderDivs(e, t, s, i, o) {
397
400
  if (e.verticalBorderVisible) {
398
- const n = `ge-table-${s}-${o}-vertical-border`;
399
- this.addVerticalBorder(i, t, n);
401
+ const n = `ge-table-${i}-${o}-vertical-border`;
402
+ this.addVerticalBorder(s, t, n);
400
403
  }
401
404
  if (e.horizontalBorderVisible) {
402
- const n = `ge-table-${s}-${o}-horizontal-border`;
403
- this.addHorizontalBorder(i, t, n);
405
+ const n = `ge-table-${i}-${o}-horizontal-border`;
406
+ this.addHorizontalBorder(s, t, n);
404
407
  }
405
408
  return t;
406
409
  }
407
- addHorizontalBorder(e, t, i = "ge-table-body-center-horizontal-border") {
408
- const s = this.domService.createElement("div");
409
- return this.domService.addClass(s, i), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${e.left}px`), this.domService.setStyle(s, "top", `${e.top}px`), this.domService.setStyle(s, "width", `${e.width}px`), this.domService.setStyle(s, "height", "1px"), this.domService.appendChild(t, s), s;
410
+ addHorizontalBorder(e, t, s = "ge-table-body-center-horizontal-border") {
411
+ const i = this.domService.createElement("div");
412
+ return this.domService.addClass(i, s), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${e.left}px`), this.domService.setStyle(i, "top", `${e.top}px`), this.domService.setStyle(i, "width", `${e.width}px`), this.domService.setStyle(i, "height", "1px"), this.domService.appendChild(t, i), i;
410
413
  }
411
- addFocusBorderDivs(e, t, i) {
412
- let s = this.domService.createElement("div");
413
- return this.domService.addClass(s, "ge-table-focus-border"), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left}px`), this.domService.setStyle(s, "top", `${t.top}px`), this.domService.setStyle(s, "width", "1px"), this.domService.setStyle(s, "height", `${t.height}px`), this.applyStyle(s, i), this.domService.appendChild(e, s), s = this.domService.createElement("div"), this.domService.addClass(s, "ge-table-focus-border"), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left + t.width - 1}px`), this.domService.setStyle(s, "top", `${t.top}px`), this.domService.setStyle(s, "width", "1px"), this.domService.setStyle(s, "height", `${t.height}px`), this.applyStyle(s, i), this.domService.appendChild(e, s), s = this.domService.createElement("div"), this.domService.addClass(s, "ge-table-focus-border"), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left}px`), this.domService.setStyle(s, "top", `${t.top}px`), this.domService.setStyle(s, "width", `${t.width}px`), this.domService.setStyle(s, "height", "1px"), this.applyStyle(s, i), this.domService.appendChild(e, s), s = this.domService.createElement("div"), this.domService.addClass(s, "ge-table-focus-border"), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left}px`), this.domService.setStyle(s, "top", `${t.top + t.height - 1}px`), this.domService.setStyle(s, "width", `${t.width}px`), this.domService.setStyle(s, "height", "1px"), this.applyStyle(s, i), this.domService.appendChild(e, s), e;
414
+ addFocusBorderDivs(e, t, s) {
415
+ let i = this.domService.createElement("div");
416
+ return this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", "1px"), this.domService.setStyle(i, "height", `${t.height}px`), this.applyStyle(i, s), this.domService.appendChild(e, i), i = this.domService.createElement("div"), this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left + t.width - 1}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", "1px"), this.domService.setStyle(i, "height", `${t.height}px`), this.applyStyle(i, s), this.domService.appendChild(e, i), i = this.domService.createElement("div"), this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", `${t.width}px`), this.domService.setStyle(i, "height", "1px"), this.applyStyle(i, s), this.domService.appendChild(e, i), i = this.domService.createElement("div"), this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top + t.height - 1}px`), this.domService.setStyle(i, "width", `${t.width}px`), this.domService.setStyle(i, "height", "1px"), this.applyStyle(i, s), this.domService.appendChild(e, i), e;
414
417
  }
415
- addVerticalBorder(e, t, i = "ge-table-body-center-vertical-border") {
416
- const s = this.domService.createElement("div");
417
- return this.domService.addClass(s, i), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${e.left}px`), this.domService.setStyle(s, "top", `${e.top}px`), this.domService.setStyle(s, "width", "1px"), this.domService.setStyle(s, "height", `${e.height}px`), this.domService.appendChild(t, s), s;
418
+ addVerticalBorder(e, t, s = "ge-table-body-center-vertical-border") {
419
+ const i = this.domService.createElement("div");
420
+ return this.domService.addClass(i, s), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${e.left}px`), this.domService.setStyle(i, "top", `${e.top}px`), this.domService.setStyle(i, "width", "1px"), this.domService.setStyle(i, "height", `${e.height}px`), this.domService.appendChild(t, i), i;
418
421
  }
419
- addDiv(e, t, i = "") {
420
- const s = this.domService.createElement("div");
421
- return i && this.domService.addClass(s, i), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left}px`), this.domService.setStyle(s, "top", `${t.top}px`), this.domService.setStyle(s, "width", `${t.width}px`), this.domService.setStyle(s, "height", `${t.height}px`), this.domService.appendChild(e, s), s;
422
+ addDiv(e, t, s = "") {
423
+ const i = this.domService.createElement("div");
424
+ return s && this.domService.addClass(i, s), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", `${t.width}px`), this.domService.setStyle(i, "height", `${t.height}px`), this.domService.appendChild(e, i), i;
422
425
  }
423
426
  applyStyleString(e, t) {
424
- const i = t.split(";").map((s) => s.trim()).filter((s) => s);
425
- for (const s of i) {
426
- const [o, n] = s.split(":");
427
+ const s = t.split(";").map((i) => i.trim()).filter((i) => i);
428
+ for (const i of s) {
429
+ const [o, n] = i.split(":");
427
430
  this.domService.setStyle(e, o.trim(), n.trim());
428
431
  }
429
432
  }
430
433
  getDivOrCreateDiv(e, t) {
431
- let i = t.cache[e];
432
- return i ? (i.innerText = "", i) : (i = this.domService.createElement("div"), t.cache[e] = i, i);
434
+ let s = t.cache[e];
435
+ return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
433
436
  }
434
437
  }
435
438
  const Y = (l) => l === "header" ? "header" : l === "footer" ? "footer" : "body";
436
- class Oe {
439
+ class Le {
437
440
  constructor(e, t) {
438
441
  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)) {
439
442
  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"));
440
- const i = e.getAttribute("data-area");
441
- if (i && (this.areaIdent = Y(i), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
442
- const s = e;
443
- this.value = s.value;
443
+ 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) {
445
+ const i = e;
446
+ this.value = i.value;
444
447
  }
445
448
  }
446
449
  }
447
450
  }
448
- class Le {
451
+ class _e {
449
452
  constructor(e) {
450
453
  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(
451
454
  (t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
452
455
  );
453
456
  }
457
+ /**
458
+ * Handles the "contextmenu" event.
459
+ *
460
+ * @private
461
+ * @param {MouseEvent} evt - The mouse event object.
462
+ * @return {void}
463
+ */
454
464
  onContextmenu(e) {
455
465
  this.mouseEvent = e;
456
466
  const t = this.tableScope.createGeMouseEvent(this.mouseEvent);
457
467
  this.tableScope.contextmenu(t);
458
468
  }
469
+ /**
470
+ * Handles the click event on the host element.
471
+ *
472
+ * @param {MouseEvent} event - The click event.
473
+ *
474
+ * @return {void}
475
+ */
459
476
  onHostElementClicked(e) {
460
- const t = new Oe(e.target, this.tableScope);
477
+ const t = new Le(e.target, this.tableScope);
461
478
  if (t.action === "toggleExpandCollapseAll")
462
479
  this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
463
480
  else if (t.inputType === "checkbox" && t.areaIdent)
464
481
  this.tableScope.toggleRowCheckbox(t.rowIdx, t.colIdx, t.areaIdent), e.preventDefault(), e.stopPropagation();
465
482
  else if (j(t.row) && t.areaModel) {
466
- const i = t.colIdx === this.getArrowColumnIndex() && e.altKey, s = t.className.includes("ge-table-tree-arrow-div");
467
- if (console.info(s, i), i || s) {
483
+ const s = t.colIdx === this.getArrowColumnIndex() && e.altKey, i = t.className.includes("ge-table-tree-arrow-div");
484
+ if (console.info(i, s), s || i) {
468
485
  e.preventDefault(), e.stopPropagation();
469
486
  const o = t.row;
470
487
  o.expanded = !o.expanded, "recalcVisibleTreeRows" in t.areaModel && t.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(o);
471
488
  }
472
489
  }
473
490
  if (t.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
474
- const i = this.tableScope.tableOptions.getFocusModel();
475
- i == null || i.clear(), i == null || i.setFocus(t.rowIdx, t.colIdx);
491
+ const s = this.tableScope.tableOptions.getFocusModel();
492
+ s == null || s.clear(), s == null || s.setFocus(t.rowIdx, t.colIdx);
476
493
  }
477
494
  this.publishGeMouseEvent(e, 1);
478
495
  }
496
+ /**
497
+ * Handles the double click event on the host element.
498
+ * This method is private.
499
+ *
500
+ * @param {MouseEvent} event - The double click event.
501
+ */
479
502
  onHostElementDblClicked(e) {
480
503
  if (e.target instanceof HTMLElement) {
481
- const t = e.target, i = t.getAttribute("data-area"), s = Y(i), o = Number(t.getAttribute("data-row-index")), n = Number(t.getAttribute("data-col-index")), a = this.tableScope.tableModel.getAreaModel(s);
482
- if (i && s === "header")
504
+ 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);
505
+ if (s && i === "header")
483
506
  this.tableScope.tableModel.isSortable(n) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, o, n));
484
507
  else if (t.getAttribute("data-row-index")) {
485
508
  const r = a.getRowByIndex(o);
486
- if (i && s === "body" && a.isEditable(o, n) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, n)), j(r) && n === this.getArrowColumnIndex()) {
509
+ if (s && i === "body" && a.isEditable(o, n) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, n)), j(r) && n === this.getArrowColumnIndex()) {
487
510
  e.preventDefault(), e.stopPropagation();
488
511
  const d = r;
489
512
  d.expanded = !d.expanded, "recalcVisibleTreeRows" in a && a.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(d);
@@ -492,13 +515,27 @@ class Le {
492
515
  }
493
516
  this.publishGeMouseEvent(e, 2);
494
517
  }
518
+ /**
519
+ * Publishes a GeMouseEvent.
520
+ *
521
+ * @param {MouseEvent} event - The MouseEvent to publish.
522
+ * @param {number} clickCount - The number of clicks for the GeMouseEvent.
523
+ *
524
+ * @return {void}
525
+ */
495
526
  publishGeMouseEvent(e, t) {
496
- var i;
497
- this.mouseEvent = e, this.geMouseEventOld = (i = this.geMouseEvent) == null ? void 0 : i.clone(), this.geMouseEvent = this.tableScope.createGeMouseEvent(e), this.geMouseEvent && (this.geMouseEvent.clickCount = t), this.tableScope.onMouseClicked(this.geMouseEvent, this.geMouseEventOld);
527
+ var s;
528
+ 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);
498
529
  }
530
+ /**
531
+ * Update the collapsed/expanded state of a tree row.
532
+ *
533
+ * @param {TreeRowIf<any>} tr - The tree row object.
534
+ * @returns {void}
535
+ */
499
536
  updateCollapsedExpandedState(e) {
500
- var i, s, o, n, a;
501
- const t = (s = (i = this.tableScope.tableOptions) == null ? void 0 : i.autoRestoreOptions) == null ? void 0 : s.getRowId;
537
+ var s, i, o, n, a;
538
+ const t = (i = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : i.getRowId;
502
539
  if (t) {
503
540
  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);
504
541
  d ? (n = this.tableScope.storeStateCollapsedExpandService) == null || n.collapsedStateIdsPush(p) : h && ((a = this.tableScope.storeStateCollapsedExpandService) == null || a.collapsedStateIdsRemove(p));
@@ -537,35 +574,107 @@ class Le {
537
574
  }
538
575
  }
539
576
  }
540
- class _e {
577
+ class Be {
541
578
  constructor(e) {
542
579
  this.tableScope = e;
543
580
  }
544
- updateCells(e) {
545
- this.tableScope.updateCells(e);
581
+ /**
582
+ * Updates the cells in the table based on the provided events.
583
+ *
584
+ * @param {TableCellUpdateEventIf[]} events - The array of events representing the updates to perform on the cells.
585
+ * @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.
586
+ *
587
+ * @return {void} - This method doesn't return anything.
588
+ */
589
+ updateCells(e, t = !1) {
590
+ this.tableScope.updateCells(e, t);
546
591
  }
592
+ /**
593
+ * Notifies that the external filter has changed.
594
+ *
595
+ * @return {void}
596
+ */
547
597
  externalFilterChanged() {
548
598
  this.tableScope.externalFilterChanged();
549
599
  }
600
+ /**
601
+ * Scrolls the table body to the specified pixel coordinates.
602
+ *
603
+ * @param {number} _px - The horizontal pixel coordinate to scroll to. Defaults to 0.
604
+ * @param {number} _py - The vertical pixel coordinate to scroll to. Defaults to 0.
605
+ * @return {void}
606
+ */
550
607
  scrollToPixel(e = 0, t = 0) {
551
608
  }
609
+ /**
610
+ * Scrolls to the specified index in both horizontal and vertical directions.
611
+ *
612
+ * @param {number} _indexX - The index of the column to scroll to in the horizontal direction. Default is 0.
613
+ * @param {number} _indexY - The index of the row to scroll to in the vertical direction. Default is 0.
614
+ *
615
+ * @return undefined
616
+ */
552
617
  scrollToIndex(e = 0, t = 0) {
553
618
  }
619
+ /**
620
+ * Sets whether the header is visible or not.
621
+ *
622
+ * @param _visible - A boolean value indicating whether the header should be visible. Default value is true.
623
+ *
624
+ * @return undefined
625
+ */
554
626
  setHeaderVisible(e = !0) {
555
627
  }
628
+ /**
629
+ * Sets the visibility of a column in the table.
630
+ *
631
+ * @param {_column} - The column index or column definition to set visibility for.
632
+ * @param {_visible=true} - The flag to set visibility to. true for visible, false for hidden.
633
+ *
634
+ * @return {void} - There is no return value.
635
+ */
556
636
  setColumnVisible(e, t = !0) {
557
637
  }
638
+ /**
639
+ * Returns whether a column is visible or not.
640
+ *
641
+ * @param {number | ColumnDefIf} _column - The column index or the column definition.
642
+ * @return {boolean} - True if the column is visible, false otherwise.
643
+ */
558
644
  isColumnVisible(e) {
559
645
  return !0;
560
646
  }
647
+ /**
648
+ * Checks if the header is visible.
649
+ *
650
+ * @return {boolean} - Returns true if the header is visible, otherwise returns false.
651
+ */
561
652
  isHeaderVisible() {
562
653
  return !0;
563
654
  }
655
+ /**
656
+ * Sets the visibility of the footer.
657
+ *
658
+ * @param {boolean} _visible - Indicates whether the footer should be visible or not. Default value is true.
659
+ *
660
+ * @return {void} - This method does not return any value.
661
+ */
564
662
  setFooterVisible(e = !0) {
565
663
  }
664
+ /**
665
+ * Determines if the footer is visible.
666
+ *
667
+ * @returns {boolean} True if the footer is visible, false otherwise.
668
+ */
566
669
  isFooterVisible() {
567
670
  return !0;
568
671
  }
672
+ /**
673
+ * Repaints the table.
674
+ *
675
+ * This method calls the repaint method of the tableScope object
676
+ * to update and redraw the table based on the latest data.
677
+ */
569
678
  repaint() {
570
679
  this.tableScope.repaint();
571
680
  }
@@ -577,23 +686,23 @@ class q {
577
686
  autoConvertMapToObject(e) {
578
687
  const t = {};
579
688
  if (e instanceof Map) {
580
- const i = e;
581
- for (const s of [...i]) {
689
+ const s = e;
690
+ for (const i of [...s]) {
582
691
  const [
583
692
  o,
584
693
  n
585
- ] = s;
694
+ ] = i;
586
695
  t[o] = n;
587
696
  }
588
697
  }
589
698
  return t;
590
699
  }
591
700
  checkAndPersistItem(e, t) {
592
- const i = this.getStorageKeyFn;
593
- if (i) {
594
- const s = i();
595
- if (s) {
596
- const o = s + e;
701
+ const s = this.getStorageKeyFn;
702
+ if (s) {
703
+ const i = s();
704
+ if (i) {
705
+ const o = i + e;
597
706
  if ((t + "").includes("Map")) {
598
707
  const n = this.autoConvertMapToObject(t);
599
708
  this.persistItem(o, n);
@@ -645,7 +754,7 @@ class q {
645
754
  // }
646
755
  // }
647
756
  }
648
- class Be extends q {
757
+ class We extends q {
649
758
  constructor(e) {
650
759
  super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
651
760
  }
@@ -660,21 +769,21 @@ class Be extends q {
660
769
  if (e) {
661
770
  const t = e();
662
771
  if (t) {
663
- const i = t + this.SCROLL_STATE;
664
- let s = this.loadFromLocalStorage(i);
665
- this.scrollOffset = s || [0, 0];
772
+ const s = t + this.SCROLL_STATE;
773
+ let i = this.loadFromLocalStorage(s);
774
+ this.scrollOffset = i || [0, 0];
666
775
  }
667
776
  }
668
777
  }
669
778
  }
670
- class We {
671
- constructor(e = "collapsed", t = [], i = !1, s = !1) {
672
- this.mode = e, this.rowIds = t, this.allCollapsed = i, this.allExpanded = s;
779
+ class He {
780
+ constructor(e = "collapsed", t = [], s = !1, i = !1) {
781
+ this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = i;
673
782
  }
674
783
  }
675
- class He extends q {
784
+ class ke extends q {
676
785
  constructor(e) {
677
- super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new We(), this.load();
786
+ super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new He(), this.load();
678
787
  }
679
788
  collapsedExpandedStateGet() {
680
789
  return this.collapsedExpandedState;
@@ -697,8 +806,8 @@ class He extends q {
697
806
  if (e) {
698
807
  const t = e();
699
808
  if (t) {
700
- const i = t + this.COLLAPSED_EXPANDED_STATE, s = this.loadFromLocalStorage(i);
701
- s && (this.collapsedExpandedState = s);
809
+ const s = t + this.COLLAPSED_EXPANDED_STATE, i = this.loadFromLocalStorage(s);
810
+ i && (this.collapsedExpandedState = i);
702
811
  }
703
812
  }
704
813
  }
@@ -706,7 +815,7 @@ class He extends q {
706
815
  this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
707
816
  }
708
817
  }
709
- class ke extends q {
818
+ class Pe extends q {
710
819
  constructor(e) {
711
820
  super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
712
821
  }
@@ -721,95 +830,95 @@ class ke extends q {
721
830
  if (e) {
722
831
  const t = e();
723
832
  if (t) {
724
- const i = t + this.SORTING_STATE;
725
- let s = this.loadFromLocalStorage(i);
726
- this.sortItems = s || [];
833
+ const s = t + this.SORTING_STATE;
834
+ let i = this.loadFromLocalStorage(s);
835
+ this.sortItems = i || [];
727
836
  }
728
837
  }
729
838
  }
730
839
  }
731
840
  class T {
732
- constructor(e = 0, t = 0, i = 0, s = 0, o) {
733
- this.left = e, this.width = t, this.height = i, this.top = s, this.index = o;
841
+ constructor(e = 0, t = 0, s = 0, i = 0, o) {
842
+ this.left = e, this.width = t, this.height = s, this.top = i, this.index = o;
734
843
  }
735
844
  }
736
- class Pe {
737
- constructor(e, t, i, s) {
738
- this.hostElement = e, this.tableModel = t, this.dom = i, this.tableOptions = s, this.scrollTop = 0, this.areaBodyWestGeo = new T(), this.areaBodyCenterGeo = new T(), this.areaBodyEastGeo = new T();
845
+ class Ve {
846
+ constructor(e, t, s, i) {
847
+ 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();
739
848
  const o = this.hostElement;
740
849
  o.innerText = "", this.dom.setAttribute(o, "tabindex", "0"), this.dom.setStyle(
741
850
  this.dom.addClass("ge-table", o),
742
851
  "position",
743
852
  "relative"
744
- ), this.hoverRow = i.applyStylePosistionAbsolute(
745
- i.createDivWithClass("ge-table-hover-row", o)
746
- ), this.hoverColumn = i.applyStylePosistionAbsolute(
747
- i.createDivWithClass("ge-table-hover-column", o)
748
- ), this.areaHeaderWest = i.appendRelativeChildDiv(
749
- i.applyStylePosistionAbsolute(
750
- i.createAreaDivWithClass("ge-table-header ge-table-header-west", o, "header", "west")
853
+ ), this.hoverRow = s.applyStylePosistionAbsolute(
854
+ s.createDivWithClass("ge-table-hover-row", o)
855
+ ), this.hoverColumn = s.applyStylePosistionAbsolute(
856
+ s.createDivWithClass("ge-table-hover-column", o)
857
+ ), this.areaHeaderWest = s.appendRelativeChildDiv(
858
+ s.applyStylePosistionAbsolute(
859
+ s.createAreaDivWithClass("ge-table-header ge-table-header-west", o, "header", "west")
751
860
  )
752
- ), this.areaHeaderCenter = i.appendRelativeChildDiv(
753
- i.applyStylePosistionAbsolute(
754
- i.createAreaDivWithClass("ge-table-header ge-table-header-center", o, "header", "center")
861
+ ), this.areaHeaderCenter = s.appendRelativeChildDiv(
862
+ s.applyStylePosistionAbsolute(
863
+ s.createAreaDivWithClass("ge-table-header ge-table-header-center", o, "header", "center")
755
864
  )
756
- ), this.areaHeaderEast = i.appendRelativeChildDiv(
757
- i.applyStylePosistionAbsolute(
758
- i.createAreaDivWithClass("ge-table-header ge-table-header-east", o, "body", "east")
865
+ ), this.areaHeaderEast = s.appendRelativeChildDiv(
866
+ s.applyStylePosistionAbsolute(
867
+ s.createAreaDivWithClass("ge-table-header ge-table-header-east", o, "body", "east")
759
868
  )
760
- ), this.areaBodyWest = i.appendRelativeChildDiv(
761
- i.applyStylePosistionAbsolute(
762
- i.createAreaDivWithClass("ge-table-body ge-table-body-west", o, "body", "west")
869
+ ), this.areaBodyWest = s.appendRelativeChildDiv(
870
+ s.applyStylePosistionAbsolute(
871
+ s.createAreaDivWithClass("ge-table-body ge-table-body-west", o, "body", "west")
763
872
  )
764
- ), this.areaBodyEast = i.appendRelativeChildDiv(
765
- i.applyStylePosistionAbsolute(
766
- i.createAreaDivWithClass("ge-table-body ge-table-body-east", o, "body", "east")
873
+ ), this.areaBodyEast = s.appendRelativeChildDiv(
874
+ s.applyStylePosistionAbsolute(
875
+ s.createAreaDivWithClass("ge-table-body ge-table-body-east", o, "body", "east")
767
876
  )
768
- ), this.areaFooterWest = i.appendRelativeChildDiv(
769
- i.applyStylePosistionAbsolute(
770
- i.createAreaDivWithClass("ge-table-footer ge-table-footer-west", o, "footer", "west")
877
+ ), this.areaFooterWest = s.appendRelativeChildDiv(
878
+ s.applyStylePosistionAbsolute(
879
+ s.createAreaDivWithClass("ge-table-footer ge-table-footer-west", o, "footer", "west")
771
880
  )
772
- ), this.areaFooterCenter = i.appendRelativeChildDiv(
773
- i.applyStylePosistionAbsolute(
774
- i.createAreaDivWithClass("ge-table-footer ge-table-footer-center", o, "footer", "center")
881
+ ), this.areaFooterCenter = s.appendRelativeChildDiv(
882
+ s.applyStylePosistionAbsolute(
883
+ s.createAreaDivWithClass("ge-table-footer ge-table-footer-center", o, "footer", "center")
775
884
  )
776
- ), this.areaFooterEast = i.appendRelativeChildDiv(
777
- i.applyStylePosistionAbsolute(
778
- i.createAreaDivWithClass("ge-table-footer ge-table-footer-east", o, "footer", "east")
885
+ ), this.areaFooterEast = s.appendRelativeChildDiv(
886
+ s.applyStylePosistionAbsolute(
887
+ s.createAreaDivWithClass("ge-table-footer ge-table-footer-east", o, "footer", "east")
779
888
  )
780
- ), this.scrollViewport = i.applyStyleOverflowAuto(
889
+ ), this.scrollViewport = s.applyStyleOverflowAuto(
781
890
  this.tableOptions.overflowX ?? "auto",
782
891
  this.tableOptions.overflowY ?? "auto",
783
- i.applyStyleNoPadding(
784
- i.applyStylePosistionAbsolute(
785
- i.createAreaDivWithClass("ge-table-scroll-viewport", o, "body", "center")
892
+ s.applyStyleNoPadding(
893
+ s.applyStylePosistionAbsolute(
894
+ s.createAreaDivWithClass("ge-table-scroll-viewport", o, "body", "center")
786
895
  )
787
896
  )
788
- ), this.contentWrapperDiv = i.applyStyleNoPadding(
789
- i.applyStylePosistionRelative(
790
- i.createDivWithClass("ge-table-scroll-content-wrapper", this.scrollViewport)
897
+ ), this.contentWrapperDiv = s.applyStyleNoPadding(
898
+ s.applyStylePosistionRelative(
899
+ s.createDivWithClass("ge-table-scroll-content-wrapper", this.scrollViewport)
791
900
  )
792
- ), this.contentDiv = i.applyStyleNoPadding(
793
- i.applyStylePosistionRelative(
794
- i.createDivWithClass("ge-table-scroll-content", this.contentWrapperDiv)
901
+ ), this.contentDiv = s.applyStyleNoPadding(
902
+ s.applyStylePosistionRelative(
903
+ s.createDivWithClass("ge-table-scroll-content", this.contentWrapperDiv)
795
904
  )
796
- ), this.areaBodyCenter = i.appendRelativeChildDiv(
797
- i.createDivWithClass("ge-table-body-center", this.contentDiv)
798
- ), this.borderHeaderBottom = i.applyStylePosistionAbsolute(
799
- i.createDivWithClass("ge-table-header-border", o)
800
- ), this.borderFixedWest = i.applyStylePosistionAbsolute(
801
- i.createDivWithClass("ge-table-west-fixed-column-border", o)
802
- ), this.borderFixedEast = i.applyStylePosistionAbsolute(
803
- i.createDivWithClass("ge-table-east-fixed-column-border", o)
804
- ), this.borderFooterTop = i.applyStylePosistionAbsolute(
805
- i.createDivWithClass("ge-table-footer-border", o)
905
+ ), this.areaBodyCenter = s.appendRelativeChildDiv(
906
+ s.createDivWithClass("ge-table-body-center", this.contentDiv)
907
+ ), this.borderHeaderBottom = s.applyStylePosistionAbsolute(
908
+ s.createDivWithClass("ge-table-header-border", o)
909
+ ), this.borderFixedWest = s.applyStylePosistionAbsolute(
910
+ s.createDivWithClass("ge-table-west-fixed-column-border", o)
911
+ ), this.borderFixedEast = s.applyStylePosistionAbsolute(
912
+ s.createDivWithClass("ge-table-east-fixed-column-border", o)
913
+ ), this.borderFooterTop = s.applyStylePosistionAbsolute(
914
+ s.createDivWithClass("ge-table-footer-border", o)
806
915
  );
807
916
  }
808
917
  adjustContainersAndRows() {
809
- const e = this.tableModel.getPadding(), t = this.hostElement.clientWidth, i = this.hostElement.clientHeight;
918
+ const e = this.tableModel.getPadding(), t = this.hostElement.clientWidth, s = this.hostElement.clientHeight;
810
919
  this.dom.applyStyle(this.scrollViewport, {
811
920
  width: `${t - e.left}px`,
812
- height: `${i - e.top}px`,
921
+ height: `${s - e.top}px`,
813
922
  top: `${e.top}px`,
814
923
  left: `${e.left}px`
815
924
  }), this.scrollTop = this.scrollViewport.scrollTop, this.dom.applyStyle(this.contentDiv, {
@@ -817,21 +926,21 @@ class Pe {
817
926
  height: `${this.scrollViewport.clientHeight}px`,
818
927
  top: `${this.scrollTop}px`,
819
928
  left: `${this.scrollViewport.scrollLeft}px`
820
- }), this.areaBodyWestGeo.width = e.left, this.areaBodyWestGeo.height = i - e.top - e.bottom, this.areaBodyWestGeo.top = e.top, this.areaBodyWestGeo.left = 0, this.dom.applyStyleInPx(this.areaBodyWest.parent, this.areaBodyWestGeo), this.tableOptions.fixedWestSeparatorBorderVisible && this.tableModel.getFixedLeftColumnCount() ? this.dom.applyDisplayBlockStyle(
929
+ }), this.areaBodyWestGeo.width = e.left, this.areaBodyWestGeo.height = s - e.top - e.bottom, this.areaBodyWestGeo.top = e.top, this.areaBodyWestGeo.left = 0, this.dom.applyStyleInPx(this.areaBodyWest.parent, this.areaBodyWestGeo), this.tableOptions.fixedWestSeparatorBorderVisible && this.tableModel.getFixedLeftColumnCount() ? this.dom.applyDisplayBlockStyle(
821
930
  this.dom.applyStyle(this.borderFixedWest, {
822
931
  width: "1px",
823
932
  height: `${this.areaBodyWestGeo.height}px`,
824
933
  top: `${this.areaBodyWestGeo.top}px`,
825
934
  left: `${this.areaBodyWestGeo.width}px`
826
935
  })
827
- ) : this.dom.applyDisplayNoneStyle(this.borderFixedWest), this.areaBodyEastGeo.width = e.right, this.areaBodyEastGeo.height = i - e.top - e.bottom, this.areaBodyEastGeo.top = e.top, this.areaBodyEastGeo.left = t - e.right, this.dom.applyStyleInPx(this.areaBodyEast.parent, this.areaBodyEastGeo), this.tableOptions.fixedEastSeparatorBorderVisible && this.tableModel.getFixedLeftColumnCount() ? this.dom.applyDisplayBlockStyle(
936
+ ) : this.dom.applyDisplayNoneStyle(this.borderFixedWest), this.areaBodyEastGeo.width = e.right, this.areaBodyEastGeo.height = s - e.top - e.bottom, this.areaBodyEastGeo.top = e.top, this.areaBodyEastGeo.left = t - e.right, this.dom.applyStyleInPx(this.areaBodyEast.parent, this.areaBodyEastGeo), this.tableOptions.fixedEastSeparatorBorderVisible && this.tableModel.getFixedLeftColumnCount() ? this.dom.applyDisplayBlockStyle(
828
937
  this.dom.applyStyle(this.borderFixedEast, {
829
938
  width: "1px",
830
939
  height: `${this.areaBodyEastGeo.height}px`,
831
940
  top: `${this.areaBodyEastGeo.top}px`,
832
941
  left: `${this.areaBodyEastGeo.left}px`
833
942
  })
834
- ) : this.dom.applyDisplayNoneStyle(this.borderFixedEast), this.areaBodyCenterGeo.width = t - e.left - e.right, this.areaBodyCenterGeo.height = i - e.top - e.bottom, this.areaBodyCenterGeo.top = 0, this.areaBodyCenterGeo.left = 0, this.dom.applyStyleInPx(this.areaBodyCenter.parent, this.areaBodyCenterGeo), this.dom.applyStyle(this.areaHeaderCenter.parent, {
943
+ ) : this.dom.applyDisplayNoneStyle(this.borderFixedEast), this.areaBodyCenterGeo.width = t - e.left - e.right, this.areaBodyCenterGeo.height = s - e.top - e.bottom, this.areaBodyCenterGeo.top = 0, this.areaBodyCenterGeo.left = 0, this.dom.applyStyleInPx(this.areaBodyCenter.parent, this.areaBodyCenterGeo), this.dom.applyStyle(this.areaHeaderCenter.parent, {
835
944
  width: `${t - e.left - e.right}px`,
836
945
  height: `${e.top}px`,
837
946
  top: "0",
@@ -856,23 +965,23 @@ class Pe {
856
965
  ) : this.dom.applyDisplayNoneStyle(this.borderHeaderBottom), this.dom.applyStyle(this.areaFooterWest.parent, {
857
966
  width: `${e.left}px`,
858
967
  height: `${e.bottom}px`,
859
- top: `${i - e.bottom}px`,
968
+ top: `${s - e.bottom}px`,
860
969
  left: "0"
861
970
  }), this.dom.applyStyle(this.areaFooterCenter.parent, {
862
971
  width: `${t - e.left - e.right}px`,
863
972
  height: `${e.bottom}px`,
864
- top: `${i - e.bottom}px`,
973
+ top: `${s - e.bottom}px`,
865
974
  left: `${e.left}px`
866
975
  }), this.dom.applyStyle(this.areaFooterEast.parent, {
867
976
  width: `${e.right}px`,
868
977
  height: `${e.bottom}px`,
869
- top: `${i - e.bottom}px`,
978
+ top: `${s - e.bottom}px`,
870
979
  left: `${t - e.right}px`
871
980
  }), this.tableOptions.footerSeparatorBorderVisible && this.tableModel.isFooterVisibe() ? this.dom.applyDisplayBlockStyle(
872
981
  this.dom.applyStyle(this.borderFooterTop, {
873
982
  width: `${t}px`,
874
983
  height: "1px",
875
- top: `${i - e.bottom}px`,
984
+ top: `${s - e.bottom}px`,
876
985
  left: "0px"
877
986
  })
878
987
  ) : this.dom.applyDisplayNoneStyle(this.borderFooterTop), this.adjustAfterScrolling();
@@ -884,12 +993,21 @@ class Pe {
884
993
  this.dom.setStyle(this.contentWrapperDiv, "width", e), this.dom.setStyle(this.contentWrapperDiv, "height", t);
885
994
  }
886
995
  }
887
- class A {
888
- constructor(e, t, i, s, o = !1) {
889
- this.r1 = e, this.c1 = t, this.r2 = i, this.c2 = s, this.gammaRange = o;
996
+ class M {
997
+ /**
998
+ * Represents a constructor for a class.
999
+ * @constructor
1000
+ * @param {number} r1 - The value for r1.
1001
+ * @param {number} c1 - The value for c1.
1002
+ * @param {number} r2 - The value for r2.
1003
+ * @param {number} c2 - The value for c2.
1004
+ * @param {boolean} [gammaRange=false] - The value for gammaRange. Defaults to false. gammaRange will be used for AreaModelCellGroups, but it's not implemented yet!
1005
+ */
1006
+ constructor(e, t, s, i, o = !1) {
1007
+ this.r1 = e, this.c1 = t, this.r2 = s, this.c2 = i, this.gammaRange = o;
890
1008
  }
891
1009
  static create(e) {
892
- return e.gammaRange === void 0 && (e.gammaRange = !1), new A(
1010
+ return e.gammaRange === void 0 && (e.gammaRange = !1), new M(
893
1011
  e.rowIndex1,
894
1012
  e.columnIndex1,
895
1013
  e.rowIndex2,
@@ -898,19 +1016,19 @@ class A {
898
1016
  );
899
1017
  }
900
1018
  static singleCell(e, t) {
901
- return new A(e, t, e, t);
1019
+ return new M(e, t, e, t);
902
1020
  }
903
1021
  static singleRow(e) {
904
- return new A(e, 0, e, Number.MAX_SAFE_INTEGER);
1022
+ return new M(e, 0, e, Number.MAX_SAFE_INTEGER);
905
1023
  }
906
1024
  static singleColumn(e) {
907
- return new A(0, e, Number.MAX_SAFE_INTEGER, e);
1025
+ return new M(0, e, Number.MAX_SAFE_INTEGER, e);
908
1026
  }
909
1027
  isInRange(e, t) {
910
1028
  return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
911
1029
  }
912
1030
  }
913
- class Ve {
1031
+ class Ge {
914
1032
  constructor(e, t) {
915
1033
  this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
916
1034
  }
@@ -919,14 +1037,14 @@ class Ve {
919
1037
  return;
920
1038
  this.colAndRowspanRanges = [];
921
1039
  const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
922
- for (let i = 0; i < e; i++)
923
- for (let s = 0; s < t; s++) {
924
- let o = this.areaModel.getColspanAt(i, s), n = this.areaModel.getRowspanAt(i, s);
1040
+ for (let s = 0; s < e; s++)
1041
+ for (let i = 0; i < t; i++) {
1042
+ let o = this.areaModel.getColspanAt(s, i), n = this.areaModel.getRowspanAt(s, i);
925
1043
  if (o > 1 || n > 1) {
926
1044
  o === 0 && (o = 1), n === 0 && (n = 1);
927
1045
  const a = this.areaModel.hasOwnProperty("gammaCells");
928
1046
  this.colAndRowspanRanges.push(
929
- new A(i, s, i + n - 1, s + o - 1, a)
1047
+ new M(s, i, s + n - 1, i + o - 1, a)
930
1048
  );
931
1049
  }
932
1050
  }
@@ -936,29 +1054,29 @@ class Ve {
936
1054
  }
937
1055
  isInRange(e, t) {
938
1056
  if (this.colAndRowspanRanges) {
939
- for (const i of this.colAndRowspanRanges)
940
- if (i.isInRange(e, t))
1057
+ for (const s of this.colAndRowspanRanges)
1058
+ if (s.isInRange(e, t))
941
1059
  return !0;
942
1060
  }
943
1061
  return !1;
944
1062
  }
945
1063
  }
946
- class Ge {
947
- constructor(e, t, i) {
948
- this.header = e, this.body = t, this.footer = i;
1064
+ class Ne {
1065
+ constructor(e, t, s) {
1066
+ this.header = e, this.body = t, this.footer = s;
949
1067
  }
950
1068
  }
951
- class Ne extends Pe {
952
- constructor(e, t, i, s) {
1069
+ class je extends Ve {
1070
+ constructor(e, t, s, i) {
953
1071
  var n, a;
954
- super(e, t, i, s), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
1072
+ super(e, t, s, i), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
955
1073
  header: [],
956
1074
  body: [],
957
1075
  footer: []
958
- }, 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), z(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
1076
+ }, this.tree = !1, this.colAndRowspanModels = new Ne(), 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(
959
1077
  (r) => {
960
1078
  var d;
961
- this.colAndRowspanModels[r] = new Ve(t, t.getAreaModel(r)), (d = this.colAndRowspanModels[r]) == null || d.init();
1079
+ this.colAndRowspanModels[r] = new Ge(t, t.getAreaModel(r)), (d = this.colAndRowspanModels[r]) == null || d.init();
962
1080
  }
963
1081
  );
964
1082
  }
@@ -975,10 +1093,10 @@ class Ne extends Pe {
975
1093
  }
976
1094
  }
977
1095
  initRenderEditor(e, t) {
978
- var s;
979
- let i = (s = this.tableModel.getColumnDef(t)) == null ? void 0 : s.getEditRenderer;
980
- if (i || (i = this.tableOptions.getEditRenderer), i)
981
- if (this.editorRenderer = i(e, t), this.editorRenderer) {
1096
+ var i;
1097
+ let s = (i = this.tableModel.getColumnDef(t)) == null ? void 0 : i.getEditRenderer;
1098
+ if (s || (s = this.tableOptions.getEditRenderer), s)
1099
+ if (this.editorRenderer = s(e, t), this.editorRenderer) {
982
1100
  this.editorRendererRow = e, this.editorRendererColumn = t, this.editing = !0, this.repaint();
983
1101
  const o = document.querySelector("input.ge-table-cell-editor-input");
984
1102
  o && o.focus();
@@ -1014,16 +1132,18 @@ class Ne extends Pe {
1014
1132
  var e, t;
1015
1133
  this.storeScrollPosStateService && ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.autoRestoreScrollPosition) && this.storeScrollPosStateService.updateScrollOffset([this.scrollLeft, this.scrollTop]);
1016
1134
  }
1017
- updateCells(e) {
1135
+ updateCells(e, t = !1) {
1018
1136
  e.forEach(
1019
- (t) => this.tableModel.getAreaModel(t.area).setValue(t.rowIndex, t.columnIndex, t.value)
1020
- ), this.repaint();
1137
+ (s) => {
1138
+ this.tableModel.getAreaModel(s.area).setValue(s.rowIndex, s.columnIndex, s.value), t || this.rerenderCellContent(s);
1139
+ }
1140
+ ), t && this.repaint();
1021
1141
  }
1022
1142
  getAreaAndSideIdentByAttr(e) {
1023
1143
  if (e) {
1024
- const t = this.getStringByAttr(e, "data-area"), i = this.getStringByAttr(e, "data-side");
1025
- if (i && t)
1026
- return [t, i];
1144
+ const t = this.getStringByAttr(e, "data-area"), s = this.getStringByAttr(e, "data-side");
1145
+ if (s && t)
1146
+ return [t, s];
1027
1147
  }
1028
1148
  return [void 0, void 0];
1029
1149
  }
@@ -1057,105 +1177,105 @@ class Ne extends Pe {
1057
1177
  this.dom.setStyle(this.contentDiv, "top", `${this.scrollTop}px`), this.dom.setStyle(this.contentDiv, "left", `${this.scrollViewport.scrollLeft}px`), this.adjustArea("body", t);
1058
1178
  }
1059
1179
  getNumberByAttr(e, t) {
1060
- var i;
1180
+ var s;
1061
1181
  if (e) {
1062
- const s = (i = e.closest("[" + t + "]")) == null ? void 0 : i.getAttribute(t);
1063
- if (s)
1064
- return Number(s);
1182
+ const i = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
1183
+ if (i)
1184
+ return Number(i);
1065
1185
  }
1066
1186
  return -1;
1067
1187
  }
1068
1188
  getStringByAttr(e, t) {
1069
- var i;
1189
+ var s;
1070
1190
  if (e) {
1071
- const s = (i = e.closest("[" + t + "]")) == null ? void 0 : i.getAttribute(t);
1072
- if (s)
1073
- return s;
1191
+ const i = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
1192
+ if (i)
1193
+ return i;
1074
1194
  }
1075
1195
  return "";
1076
1196
  }
1077
1197
  adjustArea(e, t = 0) {
1078
- var u;
1079
- const i = this.getArea(e, "west"), s = this.getArea(e, "center"), o = this.getArea(e, "east"), n = s.child.clientHeight;
1080
- i.child.innerText = "", s.child.innerText = "", o.child.innerText = "";
1198
+ var g;
1199
+ const s = this.getArea(e, "west"), i = this.getArea(e, "center"), o = this.getArea(e, "east"), n = i.child.clientHeight;
1200
+ s.child.innerText = "", i.child.innerText = "", o.child.innerText = "";
1081
1201
  const a = 0, r = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), h = this.tableModel.getAreaModel(e), p = h.getRowCount();
1082
1202
  for (; this.cleanupFunctions[e].length; ) {
1083
- const S = this.cleanupFunctions[e].shift();
1084
- S && S();
1203
+ const u = this.cleanupFunctions[e].shift();
1204
+ u && u();
1085
1205
  }
1086
- let g = t;
1087
- const f = this.tableModel.getColumnCount(), c = this.tableModel.getFixedRightColumnCount(), b = this.tableModel.getFixedLeftColumnCount();
1088
- for (let S = 0; S < p; S++) {
1089
- const x = g, w = S === p - 1, C = this.tableModel.getRowHeight(e, S);
1090
- if (x + C > 0) {
1091
- this.firstVisibleRowIndex = S;
1092
- let v = { left: a, width: r, height: C, top: x, index: S }, m = this.dom.addRowDiv(s, v, S, e, "center");
1093
- const R = b;
1206
+ let S = t;
1207
+ const f = this.tableModel.getColumnCount(), c = this.tableModel.getFixedRightColumnCount(), m = this.tableModel.getFixedLeftColumnCount();
1208
+ for (let u = 0; u < p; u++) {
1209
+ const w = S, x = u === p - 1, C = this.tableModel.getRowHeight(e, u);
1210
+ if (w + C > 0) {
1211
+ this.firstVisibleRowIndex = u;
1212
+ let y = { left: a, width: r, height: C, top: w, index: u }, v = this.dom.addRowDiv(i, y, u, e, "center");
1213
+ const E = m;
1094
1214
  if (this.adjustColumnsToRowParent({
1095
1215
  areaIdent: e,
1096
1216
  sideIdent: "center",
1097
1217
  areaModel: h,
1098
- geo: v,
1099
- parent: m,
1100
- rowIndex: S,
1101
- columnIndexStart: R,
1218
+ geo: y,
1219
+ parent: v,
1220
+ rowIndex: u,
1221
+ columnIndexStart: E,
1102
1222
  columnIndexEnd: f - c - 1,
1103
1223
  verticalFixed: !1,
1104
- lastRowOfModel: w
1105
- }), d.left > 0 && (v = { left: a, width: this.areaBodyWestGeo.width, height: C, top: x, index: S }, m = this.dom.addRowDiv(i, v, S, e, "west"), this.adjustColumnsToRowParent({
1224
+ lastRowOfModel: x
1225
+ }), 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({
1106
1226
  areaIdent: e,
1107
1227
  sideIdent: "west",
1108
1228
  areaModel: h,
1109
- geo: v,
1110
- parent: m,
1111
- rowIndex: S,
1229
+ geo: y,
1230
+ parent: v,
1231
+ rowIndex: u,
1112
1232
  columnIndexStart: 0,
1113
- columnIndexEnd: R - 1,
1233
+ columnIndexEnd: E - 1,
1114
1234
  verticalFixed: !0,
1115
- lastRowOfModel: w
1116
- })), d.right > 0 && (v = { left: a, width: this.areaBodyEastGeo.width, height: C, top: x, index: S }, m = this.dom.addRowDiv(o, v, S, e, "east"), this.adjustColumnsToRowParent({
1235
+ lastRowOfModel: x
1236
+ })), 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({
1117
1237
  areaIdent: e,
1118
1238
  sideIdent: "east",
1119
1239
  areaModel: h,
1120
- geo: v,
1121
- parent: m,
1122
- rowIndex: S,
1240
+ geo: y,
1241
+ parent: v,
1242
+ rowIndex: u,
1123
1243
  columnIndexStart: f - c,
1124
1244
  columnIndexEnd: f - 1,
1125
1245
  verticalFixed: !0,
1126
- lastRowOfModel: w
1127
- })), e === "header" && this.tree && S === p - 1) {
1128
- const E = this.dom.applyStyle(
1246
+ lastRowOfModel: x
1247
+ })), e === "header" && this.tree && u === p - 1) {
1248
+ const A = this.dom.applyStyle(
1129
1249
  this.dom.setAttribute(
1130
- this.dom.addDiv(m, new T(16, 20, 20, 8)),
1250
+ this.dom.addDiv(v, new T(16, 20, 20, 8)),
1131
1251
  "data-ge-action",
1132
1252
  "toggleExpandCollapseAll"
1133
1253
  ),
1134
1254
  { cursor: "pointer" }
1135
- ), M = this.tableOptions.treeOptions.arrowExpandCollapseAll;
1136
- if (M) {
1137
- const B = this.dom.domService.createText(M.content);
1138
- this.dom.domService.appendChild(E, B), M.style && this.dom.applyStyleString(E, M.style);
1255
+ ), R = this.tableOptions.treeOptions.arrowExpandCollapseAll;
1256
+ if (R) {
1257
+ const B = this.dom.domService.createText(R.content);
1258
+ this.dom.domService.appendChild(A, B), R.style && this.dom.applyStyleString(A, R.style);
1139
1259
  }
1140
1260
  }
1141
1261
  }
1142
- if (g = g + C, g > n)
1262
+ if (S = S + C, S > n)
1143
1263
  break;
1144
1264
  }
1145
1265
  if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
1146
- const S = ((u = this.colAndRowspanModels[e]) == null ? void 0 : u.getRanges()) ?? [];
1147
- if (S.length)
1148
- for (const x of S) {
1149
- let w = 0, C = s.child, v = "center";
1150
- if (x.c1 < b)
1151
- C = i.child, v = "west";
1152
- else if (c > 0 && x.c1 >= f - c)
1153
- C = o.child, v = "east";
1266
+ const u = ((g = this.colAndRowspanModels[e]) == null ? void 0 : g.getRanges()) ?? [];
1267
+ if (u.length)
1268
+ for (const w of u) {
1269
+ let x = 0, C = i.child, y = "center";
1270
+ if (w.c1 < m)
1271
+ C = s.child, y = "west";
1272
+ else if (c > 0 && w.c1 >= f - c)
1273
+ C = o.child, y = "east";
1154
1274
  else {
1155
- const m = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1156
- w = this.scrollFactorX * m - this.areaBodyWestGeo.width, v = "center";
1275
+ const v = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1276
+ x = this.scrollFactorX * v - this.areaBodyWestGeo.width, y = "center";
1157
1277
  }
1158
- this.drawBigCell(x, w, t, h, C, v);
1278
+ this.drawBigCell(w, x, t, h, C, y);
1159
1279
  }
1160
1280
  }
1161
1281
  }
@@ -1169,58 +1289,58 @@ class Ne extends Pe {
1169
1289
  * @param sideIdent SideIdent (west,center,east)
1170
1290
  * @protected
1171
1291
  */
1172
- drawBigCell(e, t, i, s, o, n) {
1173
- const a = i + this.getRowHeights(0, e.r1 - 1, s).reduce((u, S) => u + S, 0), r = this.tableModel.getColumnCount(), d = this.tableModel.getFixedRightColumnCount();
1292
+ drawBigCell(e, t, s, i, o, n) {
1293
+ const a = s + this.getRowHeights(0, e.r1 - 1, i).reduce((g, u) => g + u, 0), r = this.tableModel.getColumnCount(), d = this.tableModel.getFixedRightColumnCount();
1174
1294
  let h = 0;
1175
1295
  d > 0 && e.c1 >= r - d && (h = r - d);
1176
- const p = t + this.getColumnWidths(h, e.c1 - 1).reduce((u, S) => u + S, 0), g = this.getRowHeights(e.r1, e.r2, s).reduce((u, S) => u + S, 0), f = this.getColumnWidths(e.c1, e.c2).reduce((u, S) => u + S, 0);
1296
+ const p = 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);
1177
1297
  let c = !1;
1178
- const b = this.getSelectionModel ? this.getSelectionModel() : void 0;
1179
- b && (c = b.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? (console.info("TODO here", e), this.renderCell({
1180
- areaModel: s,
1181
- areaIdent: s.areaIdent,
1298
+ const m = this.getSelectionModel ? this.getSelectionModel() : void 0;
1299
+ m && (c = m.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? (console.info("TODO here", e), this.renderCell({
1300
+ areaModel: i,
1301
+ areaIdent: i.areaIdent,
1182
1302
  sideIdent: n,
1183
1303
  rowIndex: e.r1,
1184
1304
  columnIndex: e.c1,
1185
1305
  left: p,
1186
1306
  top: a,
1187
1307
  width: f,
1188
- height: g,
1308
+ height: S,
1189
1309
  parent: o,
1190
1310
  cellSelected: c,
1191
1311
  lastRowOfModel: !0,
1192
1312
  gammaRange: e.gammaRange
1193
1313
  })) : this.renderCell({
1194
- areaModel: s,
1195
- areaIdent: s.areaIdent,
1314
+ areaModel: i,
1315
+ areaIdent: i.areaIdent,
1196
1316
  sideIdent: n,
1197
1317
  rowIndex: e.r1,
1198
1318
  columnIndex: e.c1,
1199
1319
  left: p,
1200
1320
  top: a,
1201
1321
  width: f,
1202
- height: g,
1322
+ height: S,
1203
1323
  parent: o,
1204
1324
  cellSelected: c,
1205
1325
  lastRowOfModel: !0,
1206
1326
  gammaRange: e.gammaRange
1207
- }), s.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1327
+ }), i.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1208
1328
  rowIndex: e.r1,
1209
1329
  columnIndex: e.c1,
1210
1330
  cellLeft: p,
1211
1331
  cellTop: a,
1212
1332
  cellWidth: f,
1213
- cellHeight: g,
1333
+ cellHeight: S,
1214
1334
  parent: o
1215
1335
  });
1216
1336
  }
1217
- findRowOfImportantRowspanCell(e, t, i) {
1218
- const s = e.getMaxRowspan();
1337
+ findRowOfImportantRowspanCell(e, t, s) {
1338
+ const i = e.getMaxRowspan();
1219
1339
  for (let o = t - 1; o > -1; o--) {
1220
- const n = e.getRowspanAt(o, i);
1340
+ const n = e.getRowspanAt(o, s);
1221
1341
  if (n > 1 && o + n + 1 >= t)
1222
1342
  return o;
1223
- if (t - o > s)
1343
+ if (t - o > i)
1224
1344
  return -1;
1225
1345
  }
1226
1346
  return -1;
@@ -1228,8 +1348,8 @@ class Ne extends Pe {
1228
1348
  adjustColumnsToRowParent({
1229
1349
  areaIdent: e,
1230
1350
  sideIdent: t,
1231
- areaModel: i,
1232
- geo: s,
1351
+ areaModel: s,
1352
+ geo: i,
1233
1353
  parent: o,
1234
1354
  rowIndex: n,
1235
1355
  columnIndexStart: a,
@@ -1237,59 +1357,59 @@ class Ne extends Pe {
1237
1357
  verticalFixed: d = !1,
1238
1358
  lastRowOfModel: h = !1
1239
1359
  }) {
1240
- var b;
1360
+ var m;
1241
1361
  this.scrollViewportLeft = this.scrollViewport.scrollLeft;
1242
1362
  let p = 0;
1243
1363
  if (!d) {
1244
- const u = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1245
- p = this.scrollFactorX * u;
1364
+ const g = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1365
+ p = this.scrollFactorX * g;
1246
1366
  }
1247
- const g = 0, f = !!(e === "body" && t);
1367
+ const S = 0, f = !!(e === "body" && t);
1248
1368
  let c = p;
1249
- for (let u = a; u <= r; u++) {
1250
- const S = c, x = this.tableModel.getColumnWidth(u);
1251
- if (x > 0 && S + x > 0) {
1252
- let w = s.height;
1253
- const C = i.getRowspanAt(n, u), v = i.getColspanAt(n, u);
1254
- C > 1 && (w = this.getRowHeights(n, n + C - 1, i).reduce((E, M) => E + M, 0));
1255
- let m = x;
1256
- v > 1 && (m = this.getColumnWidths(u, u + v - 1).reduce((E, M) => E + M, 0));
1257
- let R = !1;
1258
- if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (b = this.colAndRowspanModels[e]) != null && b.isInRange(n, u) && (R = !0), this.draggingTargetColumnIndex === u && e !== "header") {
1259
- this.renderDragTargetDiv(o, S, g, m, w);
1260
- const E = { left: S, top: g, width: m, height: w };
1261
- this.dom.addColumnBorderDivs(this.tableOptions, o, E, e, t);
1369
+ for (let g = a; g <= r; g++) {
1370
+ const u = c, w = this.tableModel.getColumnWidth(g);
1371
+ if (w > 0 && u + w > 0) {
1372
+ let x = i.height;
1373
+ const C = s.getRowspanAt(n, g), y = s.getColspanAt(n, g);
1374
+ C > 1 && (x = this.getRowHeights(n, n + C - 1, s).reduce((A, R) => A + R, 0));
1375
+ let v = w;
1376
+ y > 1 && (v = this.getColumnWidths(g, g + y - 1).reduce((A, R) => A + R, 0));
1377
+ let E = !1;
1378
+ if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (m = this.colAndRowspanModels[e]) != null && m.isInRange(n, g) && (E = !0), this.draggingTargetColumnIndex === g && e !== "header") {
1379
+ this.renderDragTargetDiv(o, u, S, v, x);
1380
+ const A = { left: u, top: S, width: v, height: x };
1381
+ this.dom.addColumnBorderDivs(this.tableOptions, o, A, e, t);
1262
1382
  } else {
1263
- const E = this.renderSelectedBackgroundDiv(R, f, t, i, n, u, o, S, g, m, w);
1264
- R || this.renderCell({
1265
- areaModel: i,
1383
+ const A = this.renderSelectedBackgroundDiv(E, f, t, s, n, g, o, u, S, v, x);
1384
+ E || this.renderCell({
1385
+ areaModel: s,
1266
1386
  areaIdent: e,
1267
1387
  sideIdent: t,
1268
1388
  rowIndex: n,
1269
- columnIndex: u,
1270
- left: S,
1271
- top: g,
1272
- width: m,
1273
- height: w,
1389
+ columnIndex: g,
1390
+ left: u,
1391
+ top: S,
1392
+ width: v,
1393
+ height: x,
1274
1394
  parent: o,
1275
- cellSelected: E,
1395
+ cellSelected: A,
1276
1396
  lastRowOfModel: h,
1277
1397
  gammaRange: !0
1278
1398
  }), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1279
1399
  rowIndex: n,
1280
- columnIndex: u,
1281
- cellLeft: S,
1282
- cellTop: g,
1283
- cellWidth: m,
1284
- cellHeight: w,
1400
+ columnIndex: g,
1401
+ cellLeft: u,
1402
+ cellTop: S,
1403
+ cellWidth: v,
1404
+ cellHeight: x,
1285
1405
  parent: o
1286
1406
  });
1287
1407
  }
1288
1408
  }
1289
- if (c = c + x, c > this.areaBodyCenterGeo.width)
1409
+ if (c = c + w, c > this.areaBodyCenterGeo.width)
1290
1410
  break;
1291
1411
  }
1292
- this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new T(c - 1, 1, s.height, 0), o);
1412
+ this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new T(c - 1, 1, i.height, 0), o);
1293
1413
  }
1294
1414
  getTreeArrowColumnIndex() {
1295
1415
  return this.tableOptions.showCheckboxWihoutExtraColumn ? 0 : this.tableModel.isRowCheckboxVisible() ? 1 : 0;
@@ -1297,78 +1417,103 @@ class Ne extends Pe {
1297
1417
  addAndRenderCellDiv({
1298
1418
  areaModel: e,
1299
1419
  areaIdent: t,
1300
- sideIdent: i,
1301
- rowIndex: s,
1420
+ sideIdent: s,
1421
+ rowIndex: i,
1302
1422
  index: o,
1303
1423
  left: n,
1304
1424
  width: a,
1305
1425
  height: r,
1306
1426
  top: d,
1307
1427
  parent: h,
1308
- lastRowOfModel: p
1428
+ lastRowOfModel: p,
1429
+ gammaRange: S
1309
1430
  }) {
1310
- var Q;
1311
- const f = this.editorRenderer && this.editorRendererRow === s && this.editorRendererColumn === o ? this.editorRenderer : e.getCellRenderer(s, o), c = { left: n, width: a, height: r, top: d, index: o }, b = e.getRowByIndex(s);
1431
+ var Z;
1432
+ const c = this.editorRenderer && this.editorRendererRow === i && this.editorRendererColumn === o ? this.editorRenderer : e.getCellRenderer(i, o), m = { left: n, width: a, height: r, top: d, index: o }, g = e.getRowByIndex(i);
1312
1433
  let u = "none";
1313
- if (o === this.getTreeArrowColumnIndex() && j(b)) {
1314
- const y = b;
1315
- (Q = y.children) != null && Q.length ? y.expanded ? u = "expanded" : u = "collapsed" : u = "hidden";
1434
+ if (o === this.getTreeArrowColumnIndex() && j(g)) {
1435
+ const b = g;
1436
+ (Z = b.children) != null && Z.length ? b.expanded ? u = "expanded" : u = "collapsed" : u = "hidden";
1316
1437
  }
1317
1438
  let x;
1318
1439
  if (t === "header") {
1319
- const y = this.tableModel.getColumnDef(o);
1320
- (!(y != null && y.sortIconVisible) || y != null && y.sortIconVisible()) && (x = y == null ? void 0 : y.sortState);
1440
+ const b = this.tableModel.getColumnDef(o);
1441
+ (!(b != null && b.sortIconVisible) || b != null && b.sortIconVisible()) && (x = b == null ? void 0 : b.sortState);
1321
1442
  }
1322
- const w = e.getValueAt(s, o), C = f ? "" : `${w}`, v = e.isRowChecked(s), m = this.dom.addColumnDiv(
1443
+ const C = e.getValueAt(i, o), y = c ? "" : `${C}`, v = e.isRowChecked(i), E = this.dom.addColumnDiv(
1323
1444
  h,
1324
- c,
1325
- s,
1445
+ m,
1446
+ i,
1326
1447
  o,
1327
1448
  t,
1328
- i,
1329
- C,
1449
+ s,
1450
+ y,
1330
1451
  u,
1331
1452
  this.tableOptions,
1332
1453
  v,
1333
1454
  x
1334
- ), R = e.getTooltipAt(s, o);
1335
- R && this.dom.setAttribute(m, "title", R);
1336
- const E = this.tableModel.getColumnDef(o);
1337
- E && E.classes[t] && this.dom.addClasses(E.classes[t], m);
1338
- let M;
1339
- f && (M = f.render(m, s, o, t, e, w, this.dom.domService));
1340
- const B = e.getCustomClassesAt(s, o);
1341
- if (B.length && this.dom.addClasses(B, m), this.dom.addColumnBorderDivs(this.tableOptions, h, c, t, i), p && this.dom.addHorizontalBorder({ left: n, width: a, height: r, top: d + r }, h), this.getFocusModel && t === "body") {
1342
- const y = this.getFocusModel();
1343
- y != null && y.hasFocus(s, o) && this.dom.addFocusBorderDivs(h, c, {});
1455
+ ), A = e.getTooltipAt(i, o);
1456
+ A && this.dom.setAttribute(E, "title", A);
1457
+ const R = this.tableModel.getColumnDef(o);
1458
+ R && R.classes[t] && this.dom.addClasses(R.classes[t], E);
1459
+ let B;
1460
+ c && (B = c.render(E, i, o, t, e, C, this.dom.domService));
1461
+ const Q = e.getCustomClassesAt(i, o);
1462
+ if (Q.length && this.dom.addClasses(Q, E), this.dom.addColumnBorderDivs(this.tableOptions, h, m, t, s), p && this.dom.addHorizontalBorder({ left: n, width: a, height: r, top: d + r }, h), this.getFocusModel && t === "body") {
1463
+ const b = this.getFocusModel();
1464
+ b != null && b.hasFocus(i, o) && this.dom.addFocusBorderDivs(h, m, {});
1344
1465
  }
1345
- t === "header" && this.dom.setAttribute(m, "data-ge-action", "drag-column");
1346
- const H = e.getCustomStyleAt(s, o);
1466
+ t === "header" && this.dom.setAttribute(E, "data-ge-action", "drag-column");
1467
+ const H = e.getCustomStyleAt(i, o);
1347
1468
  if (H)
1348
- for (const y in H)
1349
- this.dom.setStyle(m, y, H[y]);
1350
- return [m, M];
1469
+ for (const b in H)
1470
+ this.dom.setStyle(E, b, H[b]);
1471
+ return [E, B];
1351
1472
  }
1352
- getColumnWidths(e, t) {
1353
- const i = [];
1354
- for (let s = e; s <= t; s++)
1355
- i.push(this.tableModel.getColumnWidth(s));
1356
- return i;
1473
+ applyCssClasses(e, t = {}) {
1474
+ e && Object.entries(t).forEach(([s, i]) => {
1475
+ i ? this.dom.addClass(s, e) : this.dom.removeClass(s, e);
1476
+ });
1477
+ }
1478
+ rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: i, cssClasses: o }) {
1479
+ const n = this.tableModel.getAreaModel(e), a = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', r = document.querySelector(a);
1480
+ if (r) {
1481
+ let d;
1482
+ const p = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s ? this.editorRenderer : n.getCellRenderer(t, s);
1483
+ if (r.innerText = "", this.applyCssClasses(r, o), p)
1484
+ d = p.render(r, t, s, e, n, i, this.dom.domService), d && this.cleanupFunctions[e].push(d);
1485
+ else {
1486
+ const c = `${i}`;
1487
+ this.dom.addLabelDiv(r, c, !1, t, s, e);
1488
+ }
1489
+ const S = n.getCustomClassesAt(t, s);
1490
+ S.length && this.dom.addClasses(S, r);
1491
+ const f = n.getCustomStyleAt(t, s);
1492
+ if (f)
1493
+ for (const c in f)
1494
+ this.dom.setStyle(r, c, f[c]);
1495
+ }
1357
1496
  }
1358
- getRowHeights(e, t, i) {
1497
+ getColumnWidths(e, t) {
1359
1498
  const s = [];
1360
- for (let o = e; o <= t; o++)
1361
- s.push(i.getRowHeight(o));
1499
+ for (let i = e; i <= t; i++)
1500
+ s.push(this.tableModel.getColumnWidth(i));
1362
1501
  return s;
1363
1502
  }
1503
+ getRowHeights(e, t, s) {
1504
+ const i = [];
1505
+ for (let o = e; o <= t; o++)
1506
+ i.push(s.getRowHeight(o));
1507
+ return i;
1508
+ }
1364
1509
  adjustHoverRows(e) {
1365
1510
  if (this.tableOptions.hoverRowVisible && e.rowIndex > -1) {
1366
- const t = this.hostElement.clientWidth, i = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex), s = e.rowTop + this.areaHeaderCenter.parent.clientHeight - this.scrollTop;
1511
+ const t = this.hostElement.clientWidth, s = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex), i = e.rowTop + this.areaHeaderCenter.parent.clientHeight - this.scrollTop;
1367
1512
  this.dom.applyStyle(this.hoverRow, {
1368
1513
  left: "0",
1369
- top: s + "px",
1514
+ top: i + "px",
1370
1515
  width: t + "px",
1371
- height: i + "px",
1516
+ height: s + "px",
1372
1517
  display: "block"
1373
1518
  });
1374
1519
  } else
@@ -1381,11 +1526,11 @@ class Ne extends Pe {
1381
1526
  }
1382
1527
  adjustHoverColumns(e) {
1383
1528
  if (this.tableOptions.hoverColumnVisible && e.rowIndex > -1) {
1384
- const t = this.hostElement.clientHeight, i = this.tableModel.getColumnWidth(e.columnIndex), s = this.areaBodyWestGeo.width, o = e.columnLeft + this.tableModel.getPadding().left - this.scrollLeft - s;
1529
+ const t = this.hostElement.clientHeight, s = this.tableModel.getColumnWidth(e.columnIndex), i = this.areaBodyWestGeo.width, o = e.columnLeft + this.tableModel.getPadding().left - this.scrollLeft - i;
1385
1530
  this.dom.applyStyle(this.hoverColumn, {
1386
1531
  left: o + "px",
1387
1532
  top: "0px",
1388
- width: i + "px",
1533
+ width: s + "px",
1389
1534
  height: t + "px",
1390
1535
  display: "block"
1391
1536
  });
@@ -1400,35 +1545,35 @@ class Ne extends Pe {
1400
1545
  debounce(e, t = 1e3) {
1401
1546
  this.debounceTimeout && clearTimeout(this.debounceTimeout), this.debounceTimeout = setTimeout(e.bind(this), t);
1402
1547
  }
1403
- renderDragTargetDiv(e, t, i, s, o) {
1548
+ renderDragTargetDiv(e, t, s, i, o) {
1404
1549
  const n = this.dom.applyStylePosistionAbsolute(
1405
1550
  this.dom.createDivWithClass("ge-table-drop-zone", e)
1406
1551
  );
1407
- return this.dom.setStyle(n, "left", `${t}px`), this.dom.setStyle(n, "top", `${i}px`), this.dom.setStyle(n, "width", `${s}px`), this.dom.setStyle(n, "height", `${o}px`), n;
1552
+ 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;
1408
1553
  }
1409
- renderSelectedBackgroundDiv(e, t, i, s, o, n, a, r, d, h, p) {
1410
- let g = !1;
1411
- if (!e && t && s.isSelectable(o, n) && this.getSelectionModel) {
1554
+ renderSelectedBackgroundDiv(e, t, s, i, o, n, a, r, d, h, p) {
1555
+ let S = !1;
1556
+ if (!e && t && i.isSelectable(o, n) && this.getSelectionModel) {
1412
1557
  const f = this.getSelectionModel();
1413
1558
  if (f) {
1414
1559
  const c = f.getSelectionCount(o, n);
1415
- g = c > 0;
1416
- for (let b = 0; b < c; b++) {
1417
- const u = this.dom.applyStylePosistionAbsolute(
1560
+ S = c > 0;
1561
+ for (let m = 0; m < c; m++) {
1562
+ const g = this.dom.applyStylePosistionAbsolute(
1418
1563
  // ge-table-body-west-selected-range
1419
- this.dom.createDivWithClass(`ge-table-${s.areaIdent}-${i}-selected-range`, a)
1564
+ this.dom.createDivWithClass(`ge-table-${i.areaIdent}-${s}-selected-range`, a)
1420
1565
  );
1421
- 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`);
1566
+ this.dom.setStyle(g, "left", `${r}px`), this.dom.setStyle(g, "top", `${d}px`), this.dom.setStyle(g, "width", `${h}px`), this.dom.setStyle(g, "height", `${p}px`);
1422
1567
  }
1423
1568
  }
1424
1569
  }
1425
- return g;
1570
+ return S;
1426
1571
  }
1427
1572
  renderCell({
1428
1573
  areaModel: e,
1429
1574
  areaIdent: t,
1430
- sideIdent: i,
1431
- rowIndex: s,
1575
+ sideIdent: s,
1576
+ rowIndex: i,
1432
1577
  columnIndex: o,
1433
1578
  left: n,
1434
1579
  top: a,
@@ -1436,31 +1581,31 @@ class Ne extends Pe {
1436
1581
  height: d,
1437
1582
  parent: h,
1438
1583
  cellSelected: p,
1439
- lastRowOfModel: g,
1584
+ lastRowOfModel: S,
1440
1585
  gammaRange: f
1441
1586
  }) {
1442
- const [c, b] = this.addAndRenderCellDiv({
1587
+ const [c, m] = this.addAndRenderCellDiv({
1443
1588
  areaModel: e,
1444
1589
  areaIdent: t,
1445
- sideIdent: i,
1446
- rowIndex: s,
1590
+ sideIdent: s,
1591
+ rowIndex: i,
1447
1592
  index: o,
1448
1593
  left: n,
1449
1594
  width: r,
1450
1595
  height: d,
1451
1596
  top: a,
1452
1597
  parent: h,
1453
- lastRowOfModel: g,
1598
+ lastRowOfModel: S,
1454
1599
  gammaRange: f
1455
1600
  });
1456
- p && this.dom.addClass(`ge-table-${t}-${i}-selected-range`, c), b && this.cleanupFunctions[t].push(b);
1601
+ p && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, c), m && this.cleanupFunctions[t].push(m);
1457
1602
  }
1458
- renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: i, cellTop: s, cellWidth: o, cellHeight: n, parent: a }) {
1603
+ renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: i, cellWidth: o, cellHeight: n, parent: a }) {
1459
1604
  const r = this.dom.domService, d = this.tableOptions.columnResizeHandleWidthInPx ?? 2, h = r.createElement("div");
1460
- 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", `${i + o - d}px`), r.setStyle(h, "top", `${s}px`), r.setStyle(h, "width", `${d}px`), r.setStyle(h, "height", `${n}px`), r.appendChild(a, h);
1605
+ 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);
1461
1606
  }
1462
1607
  }
1463
- class je {
1608
+ class Xe {
1464
1609
  constructor(e, t) {
1465
1610
  this.columnIndex = e, this.sortState = t;
1466
1611
  }
@@ -1469,17 +1614,25 @@ class ze {
1469
1614
  constructor(e) {
1470
1615
  this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
1471
1616
  }
1617
+ /**
1618
+ * Handles the onHostElementChanged event.
1619
+ * In case that the element is an input field, the tableScope.updateModelValueAfterEdit() method is triggered.
1620
+ *
1621
+ * @param {Event} event - The event object.
1622
+ *
1623
+ * @return {void}
1624
+ */
1472
1625
  onHostElementChanged(e) {
1473
1626
  if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
1474
- const t = e.target, i = t.getAttribute("data-area"), s = t.getAttribute("data-row-index"), o = t.getAttribute("data-col-index");
1475
- if (i && s && o) {
1476
- const n = Y(i), a = Number(s), r = Number(o);
1627
+ const t = e.target, s = t.getAttribute("data-area"), i = t.getAttribute("data-row-index"), o = t.getAttribute("data-col-index");
1628
+ if (s && i && o) {
1629
+ const n = Y(s), a = Number(i), r = Number(o);
1477
1630
  this.tableScope.updateModelValueAfterEdit(n, a, r, t.value);
1478
1631
  }
1479
1632
  }
1480
1633
  }
1481
1634
  }
1482
- class Xe {
1635
+ class Ke {
1483
1636
  constructor(e = -1, t = -1) {
1484
1637
  this.rowIndex = e, this.columnIndex = t;
1485
1638
  }
@@ -1489,34 +1642,34 @@ class U {
1489
1642
  this.cells = e;
1490
1643
  }
1491
1644
  static createSingle(e, t) {
1492
- return new U([new Xe(e, t)]);
1645
+ return new U([new Ke(e, t)]);
1493
1646
  }
1494
1647
  }
1495
- class Ke {
1648
+ class Ye {
1496
1649
  constructor(e) {
1497
- var t, i;
1498
- this.tableScope = e, (t = this.tableScope.tableOptions) != null && t.getSelectionModel && (this.getSelectionModel = this.tableScope.tableOptions.getSelectionModel), (i = this.tableScope.tableOptions) != null && i.getFocusModel && (this.getFocusModel = this.tableScope.tableOptions.getFocusModel);
1650
+ var t, s;
1651
+ 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);
1499
1652
  }
1500
1653
  onMouseClicked(e, t) {
1501
1654
  var o, n, a, r, d, h, p;
1502
- let i = !1, s = !1;
1655
+ let s = !1, i = !1;
1503
1656
  if (this.getSelectionModel && this.getFocusModel) {
1504
- const g = this.getSelectionModel(), f = this.getFocusModel();
1505
- g && f && (f.hasFocus(e.rowIndex, e.columnIndex) || (f.setFocus(e.rowIndex, e.columnIndex), i = !0), (o = e.originalEvent) != null && o.shiftKey || g.hasSelection() && (g.clear(), i = !0), (n = e.originalEvent) != null && n.shiftKey && this.previousEvt ? (g.addSelection(this.createRangeByEvents(e, this.previousEvt)), s = !0, i = !0) : (a = e.originalEvent) != null && a.ctrlKey || (r = e.originalEvent) != null && r.metaKey ? (g.addSelection(A.singleCell(e.rowIndex, e.columnIndex)), s = !0, i = !0) : (d = e.originalEvent) != null && d.altKey && ((h = e.originalEvent) != null && h.ctrlKey || (p = e.originalEvent) != null && p.metaKey) && (g.removeSelection(A.singleCell(e.rowIndex, e.columnIndex)), s = !0, i = !0));
1657
+ const S = this.getSelectionModel(), f = this.getFocusModel();
1658
+ 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(M.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(M.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0));
1506
1659
  }
1507
- return s ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), i;
1660
+ return i ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
1508
1661
  }
1509
1662
  onActionTriggered(e) {
1510
1663
  if (this.getSelectionModel && this.getFocusModel) {
1511
- const t = this.getSelectionModel(), i = this.getFocusModel();
1512
- if (t && i) {
1664
+ const t = this.getSelectionModel(), s = this.getFocusModel();
1665
+ if (t && s) {
1513
1666
  if (e === "SELECT_ALL")
1514
1667
  return t.selectAll(), this.tableScope.repaint(), !0;
1515
1668
  if (e === "DESELECT_ALL")
1516
1669
  return t.clear(), this.tableScope.repaint(), !0;
1517
1670
  if (e === "TOGGLE_SELECTION") {
1518
- const [s, o] = i.getFocus();
1519
- return t.togglePoint(s, o), this.tableScope.repaint(), !0;
1671
+ const [i, o] = s.getFocus();
1672
+ return t.togglePoint(i, o), this.tableScope.repaint(), !0;
1520
1673
  }
1521
1674
  }
1522
1675
  }
@@ -1524,16 +1677,16 @@ class Ke {
1524
1677
  }
1525
1678
  createRangeByEvents(e, t) {
1526
1679
  t || (t = e);
1527
- const i = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex), s = 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);
1528
- return A.create({
1529
- rowIndex1: i,
1680
+ 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);
1681
+ return M.create({
1682
+ rowIndex1: s,
1530
1683
  columnIndex1: o,
1531
- rowIndex2: s,
1684
+ rowIndex2: i,
1532
1685
  columnIndex2: n
1533
1686
  });
1534
1687
  }
1535
1688
  }
1536
- class Ye {
1689
+ class qe {
1537
1690
  get() {
1538
1691
  return {
1539
1692
  f2: "START_EDITING",
@@ -1551,7 +1704,7 @@ class Ye {
1551
1704
  };
1552
1705
  }
1553
1706
  }
1554
- class qe {
1707
+ class Ue {
1555
1708
  get() {
1556
1709
  return {
1557
1710
  f2: "START_EDITING",
@@ -1571,7 +1724,7 @@ class qe {
1571
1724
  };
1572
1725
  }
1573
1726
  }
1574
- class Ue {
1727
+ class Je {
1575
1728
  constructor(e) {
1576
1729
  this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
1577
1730
  }
@@ -1579,7 +1732,7 @@ class Ue {
1579
1732
  this.listener.includes(e) || this.listener.push(e);
1580
1733
  }
1581
1734
  init() {
1582
- 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));
1735
+ this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new Ue().get()) : Object.assign(this.shortcutActionIdMapping, new qe().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));
1583
1736
  }
1584
1737
  isMacintosh() {
1585
1738
  return navigator.platform.indexOf("Mac") > -1;
@@ -1597,24 +1750,24 @@ class Ue {
1597
1750
  emit(e) {
1598
1751
  this.isDebug() && console.debug("ShortcutService emit:", e);
1599
1752
  let t = !1;
1600
- for (const i of this.listener)
1601
- i.onActionTriggered(e) && (t = !0);
1753
+ for (const s of this.listener)
1754
+ s.onActionTriggered(e) && (t = !0);
1602
1755
  return t;
1603
1756
  }
1604
1757
  findEnty(e) {
1605
1758
  const t = this.getTokenByEvent(e);
1606
1759
  this.isDebug() && console.debug("ShortcutService tokens:", t);
1607
- for (const i in this.shortcutActionIdMapping) {
1608
- const s = i.replace(/opt/g, "alt").replace(/cmd/g, "meta").split(/[\+ ]/g).sort();
1609
- if (this.areTokensEquals(t, s))
1610
- return this.shortcutActionIdMapping[i];
1760
+ for (const s in this.shortcutActionIdMapping) {
1761
+ const i = s.replace(/opt/g, "alt").replace(/cmd/g, "meta").split(/[\+ ]/g).sort();
1762
+ if (this.areTokensEquals(t, i))
1763
+ return this.shortcutActionIdMapping[s];
1611
1764
  }
1612
1765
  }
1613
1766
  areTokensEquals(e, t) {
1614
1767
  if (e.length !== t.length || e.length === 0)
1615
1768
  return !1;
1616
- for (let i = 0; i < e.length; i++)
1617
- if (e[i] !== t[i])
1769
+ for (let s = 0; s < e.length; s++)
1770
+ if (e[s] !== t[s])
1618
1771
  return !1;
1619
1772
  return !0;
1620
1773
  }
@@ -1623,7 +1776,7 @@ class Ue {
1623
1776
  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();
1624
1777
  }
1625
1778
  }
1626
- class te {
1779
+ class se {
1627
1780
  onCheckboxChanged(e) {
1628
1781
  }
1629
1782
  onContextmenu(e) {
@@ -1639,16 +1792,19 @@ class te {
1639
1792
  onMouseMoved(e) {
1640
1793
  }
1641
1794
  }
1642
- class ae {
1643
- setStyle(e, t, i) {
1644
- return e.style[t] = i, e;
1795
+ class de {
1796
+ setStyle(e, t, s) {
1797
+ return e.style[t] = s, e;
1645
1798
  }
1646
1799
  appendText(e, t) {
1647
- const i = this.createText(t);
1648
- return this.appendChild(e, i), i;
1800
+ const s = this.createText(t);
1801
+ return this.appendChild(e, s), s;
1649
1802
  }
1650
1803
  addClass(e, t) {
1651
- return t.includes(" ") ? t.split(" ").forEach((i) => e.classList.add(i)) : e.classList.add(t), e;
1804
+ return t.includes(" ") ? t.split(" ").forEach((s) => e.classList.add(s)) : e.classList.add(t), e;
1805
+ }
1806
+ removeClass(e, t) {
1807
+ return t.includes(" ") ? t.split(" ").forEach((s) => e.classList.remove(s)) : e.classList.remove(t), e;
1652
1808
  }
1653
1809
  appendChild(e, t) {
1654
1810
  e.appendChild(t);
@@ -1659,15 +1815,15 @@ class ae {
1659
1815
  createText(e) {
1660
1816
  return document.createTextNode(e);
1661
1817
  }
1662
- setAttribute(e, t, i) {
1663
- e.setAttribute(t, i);
1818
+ setAttribute(e, t, s) {
1819
+ e.setAttribute(t, s);
1664
1820
  }
1665
1821
  }
1666
- class Je {
1667
- render(e, t, i, s, o, n, a) {
1668
- if (o.isEditable(t, i)) {
1822
+ class Qe {
1823
+ render(e, t, s, i, o, n, a) {
1824
+ if (o.isEditable(t, s)) {
1669
1825
  a.addClass(e, "ge-table-row-input-div");
1670
- const r = o.getValueAt(t, i);
1826
+ const r = o.getValueAt(t, s);
1671
1827
  e.innerHTML = `
1672
1828
  <input
1673
1829
  type="text"
@@ -1675,28 +1831,28 @@ class Je {
1675
1831
  autofocus
1676
1832
  onfocus="this.setSelectionRange(0, this.value.length)"
1677
1833
  data-listen="change"
1678
- data-area="${s}"
1834
+ data-area="${i}"
1679
1835
  data-row-index="${t}"
1680
- data-col-index="${i}"
1836
+ data-col-index="${s}"
1681
1837
  data-input-type="text"
1682
1838
  style="width:calc(100% - 8px);height:100%;border:0;padding:0 0 0 8px;"
1683
1839
  class="ge-table-cell-editor-input">`;
1684
1840
  }
1685
1841
  }
1686
1842
  }
1687
- class Qe {
1843
+ class Ze {
1688
1844
  constructor(e = "none", t = "single") {
1689
1845
  this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
1690
1846
  }
1691
1847
  getSelectionCount(e, t) {
1692
- let i = 0;
1693
- for (const s of this.ranges)
1694
- s.isInRange(e, t) && i++;
1695
- return this.allSelected && i++, this.isInNegativeRange(e, t) && (i = 0), i;
1848
+ let s = 0;
1849
+ for (const i of this.ranges)
1850
+ i.isInRange(e, t) && s++;
1851
+ return this.allSelected && s++, this.isInNegativeRange(e, t) && (s = 0), s;
1696
1852
  }
1697
1853
  isInNegativeRange(e, t) {
1698
- for (const i of this.negativeRanges)
1699
- if (i.isInRange(e, t))
1854
+ for (const s of this.negativeRanges)
1855
+ if (s.isInRange(e, t))
1700
1856
  return !0;
1701
1857
  return !1;
1702
1858
  }
@@ -1719,16 +1875,16 @@ class Qe {
1719
1875
  if (this.selectionType === "none")
1720
1876
  return;
1721
1877
  let t = e;
1722
- this.selectionType === "row" ? t = A.singleRow(e.r1) : this.selectionType === "column" && (t = A.singleColumn(e.c1)), this.negativeRanges.push(t);
1878
+ this.selectionType === "row" ? t = M.singleRow(e.r1) : this.selectionType === "column" && (t = M.singleColumn(e.c1)), this.negativeRanges.push(t);
1723
1879
  }
1724
1880
  togglePoint(e, t) {
1725
- this.getSelectionCount(e, t) > 0 ? this.removeSelection(A.singleCell(e, t)) : this.addSelection(A.singleCell(e, t));
1881
+ this.getSelectionCount(e, t) > 0 ? this.removeSelection(M.singleCell(e, t)) : this.addSelection(M.singleCell(e, t));
1726
1882
  }
1727
1883
  addRange(e) {
1728
1884
  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));
1729
1885
  }
1730
1886
  }
1731
- class Ze {
1887
+ class et {
1732
1888
  constructor(e = "none") {
1733
1889
  this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
1734
1890
  }
@@ -1751,37 +1907,48 @@ class Ze {
1751
1907
  return [this.rowIndex, this.columnIndex];
1752
1908
  }
1753
1909
  }
1754
- const et = new Qe(), tt = new Ze("cell");
1755
- class de {
1910
+ const tt = new Ze(), st = new et("cell");
1911
+ class he {
1756
1912
  constructor() {
1757
1913
  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 = {
1758
1914
  header: 34,
1759
1915
  body: 34,
1760
1916
  footer: 34
1761
- }, 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;
1917
+ }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ne(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new ae(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new Qe(), this.getSelectionModel = () => tt, this.getFocusModel = () => st;
1762
1918
  }
1763
1919
  }
1764
- class J extends Ne {
1765
- constructor(e, t, i, s, o) {
1920
+ class J extends je {
1921
+ constructor(e, t, s, i, o) {
1766
1922
  var n;
1767
1923
  if (super(
1768
1924
  e,
1769
1925
  t,
1770
- new Fe(i),
1771
- s
1772
- ), 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) {
1926
+ new Oe(s),
1927
+ i
1928
+ ), this.eventListener = o, this.selectionService = new Ye(this), this.api = new Be(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, o || (this.eventListener = new se()), (n = this.tableOptions) != null && n.autoRestoreOptions) {
1773
1929
  const a = this.tableOptions.autoRestoreOptions, r = a.getStorageKeyFn;
1774
- r && (a.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Be(r)), a.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new He(r)), a.autoRestoreSortingState && (this.storeSortingService = new ke(r)));
1930
+ r && (a.autoRestoreScrollPosition && (this.storeScrollPosStateService = new We(r)), a.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ke(r)), a.autoRestoreSortingState && (this.storeSortingService = new Pe(r)));
1775
1931
  }
1776
- this.mouseHandler = new Le(this), this.inputHandler = new ze(this), this.shortcutService = new Ue(this), this.shortcutService.addListener(this.selectionService);
1932
+ this.mouseHandler = new _e(this), this.inputHandler = new ze(this), this.shortcutService = new Je(this), this.shortcutService.addListener(this.selectionService);
1777
1933
  }
1778
- static create(e, t, i = new de(), s = new te(), o = new ae()) {
1934
+ /**
1935
+ * Creates a TableScope instance.
1936
+ *
1937
+ * @param {HTMLDivElement} hostElement - The HTML div element that will contain the table.
1938
+ * @param {TableModelIf} tableModel - The table model object.
1939
+ * @param {TableOptionsIf} [tableOptions=new TableOptions()] - The optional table options object.
1940
+ * @param {EventListenerIf} [eventListener=new EventAdapter()] - The optional event listener object.
1941
+ * @param {DomServiceIf} [domService=new SimpleDomService()] - The optional DOM service object.
1942
+ *
1943
+ * @return {TableScope} - The newly created TableScope instance.
1944
+ */
1945
+ static create(e, t, s = new he(), i = new se(), o = new de()) {
1779
1946
  return new J(
1780
1947
  e,
1781
1948
  t,
1782
1949
  o,
1783
- i,
1784
- s
1950
+ s,
1951
+ i
1785
1952
  );
1786
1953
  }
1787
1954
  onActionTriggered(e) {
@@ -1790,131 +1957,260 @@ class J extends Ne {
1790
1957
  if (e === "START_EDITING" && this.getFocusModel) {
1791
1958
  const t = this.getFocusModel();
1792
1959
  if (t) {
1793
- const [i, s] = t.getFocus();
1794
- this.tableModel.getBodyModel().isEditable(i, s) && (this.clearSelection(), this.initRenderEditor(i, s));
1960
+ const [s, i] = t.getFocus();
1961
+ this.tableModel.getBodyModel().isEditable(s, i) && (this.clearSelection(), this.initRenderEditor(s, i));
1795
1962
  }
1796
1963
  return !0;
1797
1964
  }
1798
1965
  return !1;
1799
1966
  }
1800
- updateModelValueAfterEdit(e, t, i, s) {
1801
- e === "body" && this.tableModel.getAreaModel(e).setValue(t, i, s) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(U.createSingle(t, i)), this.hostElement.focus());
1967
+ updateModelValueAfterEdit(e, t, s, i) {
1968
+ e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, i) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(U.createSingle(t, s)), this.hostElement.focus());
1802
1969
  }
1970
+ /**
1971
+ * Retrieves the TableApi object.
1972
+ *
1973
+ * @return {TableApi} The TableApi object.
1974
+ */
1803
1975
  getApi() {
1804
1976
  return this.api;
1805
1977
  }
1806
- /*
1807
- * Called by the table component
1978
+ /**
1979
+ * Initializes the table. Called by the table component.
1980
+ *
1981
+ * @function firstInit
1982
+ * @memberof TableScope
1983
+ *
1984
+ * @returns {TableScope} This instance of the table scope.
1808
1985
  */
1809
1986
  firstInit() {
1810
1987
  var e;
1811
1988
  return this.tableModel.init(), (e = this.tableOptions) != null && e.externalFilterFunction && this.externalFilterChanged(!1), this.autoRestoreCollapsedExpandedState(), this.autoRestoreSortingState(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows(), this.autoRestoreScrollPosition(), this;
1812
1989
  }
1990
+ /**
1991
+ * Creates a GeMouseEvent object based on a MouseEvent.
1992
+ *
1993
+ * @param {MouseEvent} mouseEvent - The MouseEvent object to create the GeMouseEvent from.
1994
+ * @return {GeMouseEvent} - The created GeMouseEvent object.
1995
+ */
1813
1996
  createGeMouseEvent(e) {
1814
1997
  const t = new K();
1815
1998
  if (t.originalEvent = e, e) {
1816
- const i = e.target;
1817
- if ([t.areaIdent, t.sideIdent] = this.getAreaAndSideIdentByAttr(i), t.rowIndex = this.getNumberByAttr(i, "data-row-index"), t.columnIndex = this.getNumberByAttr(i, "data-col-index"), t.action = this.getStringByAttr(i, "data-ge-action"), t.areaIdent) {
1818
- const s = this.tableModel.getAreaModel(t.areaIdent);
1819
- t.rowTop = s.getYPosByRowIndex(t.rowIndex);
1999
+ const s = e.target;
2000
+ 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) {
2001
+ const i = this.tableModel.getAreaModel(t.areaIdent);
2002
+ t.rowTop = i.getYPosByRowIndex(t.rowIndex);
1820
2003
  }
1821
2004
  if (t.columnLeft = this.tableModel.getXPosByColumnIndex(t.columnIndex), e.ctrlKey && e.altKey) {
1822
- const s = e.clientY - this.hostElement.offsetTop - this.areaHeaderCenter.parent.clientHeight, o = e.clientX - this.hostElement.offsetLeft - this.areaBodyWestGeo.width;
1823
- this.debugOnce(o, s);
2005
+ const i = e.clientY - this.hostElement.offsetTop - this.areaHeaderCenter.parent.clientHeight, o = e.clientX - this.hostElement.offsetLeft - this.areaBodyWestGeo.width;
2006
+ this.debugOnce(o, i);
1824
2007
  }
1825
2008
  }
1826
2009
  return t;
1827
2010
  }
2011
+ /**
2012
+ * Handles the mouse down event.
2013
+ *
2014
+ * @param {GeMouseEvent} mouseEvent - The mouse event object.
2015
+ * @return {void}
2016
+ */
1828
2017
  onMouseDown(e) {
1829
2018
  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));
1830
2019
  }
2020
+ /**
2021
+ * Handles mouse dragging on the frame.
2022
+ *
2023
+ * @param {GeMouseEvent} mouseEvent - The mouse event object.
2024
+ */
1831
2025
  mouseDraggingOnFrame(e) {
1832
2026
  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());
1833
2027
  }
2028
+ /**
2029
+ * Handles the end of mouse dragging event on a frame.
2030
+ *
2031
+ * @param {GeMouseEvent} mouseEvent - The mouse event object.
2032
+ *
2033
+ * @returns {void}
2034
+ */
1834
2035
  mouseDraggingEndOnFrame(e) {
1835
2036
  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 = "";
1836
2037
  }
2038
+ /**
2039
+ * Handles the mouse move event.
2040
+ *
2041
+ * @param {GeMouseEvent} mouseMoveEvent - The mouse move event object.
2042
+ * @return {void}
2043
+ */
1837
2044
  mouseMove(e) {
1838
2045
  this.eventListener.onMouseMoved(e), this.adjustHoverRows(e), this.adjustHoverColumns(e);
1839
2046
  }
2047
+ /**
2048
+ * Triggers the context menu event based on the mouse move event.
2049
+ *
2050
+ * @param {GeMouseEvent} mouseMoveEvent - The mouse move event object.
2051
+ * @return {void}
2052
+ */
1840
2053
  contextmenu(e) {
1841
2054
  this.eventListener.onContextmenu(e);
1842
2055
  }
2056
+ /**
2057
+ * Toggles the expand or collapse state of all items in the body area model.
2058
+ *
2059
+ * @param {boolean} [expand=true] - Whether to expand or collapse all items. Default is true.
2060
+ *
2061
+ * @return {void}
2062
+ */
1843
2063
  toggleExpandCollapseAll(e = !0) {
1844
- var i;
2064
+ var s;
1845
2065
  const t = this.tableModel.getBodyModel();
1846
- z(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (i = this.storeStateCollapsedExpandService) == null || i.collapsedStateAll(e));
2066
+ X(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
1847
2067
  }
1848
- toggleRowCheckbox(e, t, i) {
2068
+ /**
2069
+ * Toggles the checkbox state of a specific row in a table.
2070
+ *
2071
+ * @param {number} rowIdx - The index of the row to toggle the checkbox state.
2072
+ * @param {number} _colIdx - The index of the column. This parameter is unused.
2073
+ * @param {AreaIdent} areaIdent - The identifier of the table area.
2074
+ *
2075
+ * @return {void} - This method does not return anything.
2076
+ */
2077
+ toggleRowCheckbox(e, t, s) {
1849
2078
  var r;
1850
- const s = this.tableModel.getAreaModel(i), o = s.isRowChecked(e), n = o === void 0 || o === "semi" || o === "none";
1851
- s.setRowChecked(e, n), this.repaint();
1852
- const a = (r = s.rowSelectionModel) == null ? void 0 : r.getCheckedRows();
2079
+ const i = this.tableModel.getAreaModel(s), o = i.isRowChecked(e), n = o === void 0 || o === "semi" || o === "none";
2080
+ i.setRowChecked(e, n), this.repaint();
2081
+ const a = (r = i.rowSelectionModel) == null ? void 0 : r.getCheckedRows();
1853
2082
  this.eventListener.onCheckboxChanged(a || []);
1854
2083
  }
2084
+ /**
2085
+ * Handle mouse click events.
2086
+ *
2087
+ * @param {GeMouseEvent} evt - The mouse click event.
2088
+ * @param {GeMouseEvent | undefined} previousEvt - The previous mouse click event, if any.
2089
+ * @returns {void}
2090
+ */
1855
2091
  onMouseClicked(e, t) {
1856
- let i = this.selectionService.onMouseClicked(e, t);
1857
- if (!i && this.getFocusModel) {
1858
- const s = this.getFocusModel();
1859
- s && (i = s.hasChanged(), s.clearChanged(), i && this.resetEditorRenderer());
2092
+ let s = this.selectionService.onMouseClicked(e, t);
2093
+ if (!s && this.getFocusModel) {
2094
+ const i = this.getFocusModel();
2095
+ i && (s = i.hasChanged(), i.clearChanged(), s && this.resetEditorRenderer());
1860
2096
  }
1861
- this.eventListener.onMouseClicked(e), i && this.debounce(this.repaint.bind(this), 10);
2097
+ this.eventListener.onMouseClicked(e), s && this.debounce(this.repaint.bind(this), 10);
1862
2098
  }
2099
+ /**
2100
+ * Updates the table (repaint) when an external filter is changed.
2101
+ *
2102
+ * @param {boolean} clearSelection - Indicates whether to clear the selection model or not. Default value is true.
2103
+ * @return {void}
2104
+ */
1863
2105
  externalFilterChanged(e = !0) {
1864
2106
  const t = this.tableOptions.externalFilterFunction;
1865
2107
  t && (e && this.clearSelectionModel(), this.tableModel.externalFilterChanged(t), this.scrollViewport.scrollTo(0, 0), this.tableModel.recalcHeightAndPadding(), this.resetSizeOfWrapperDiv(), this.repaint());
1866
2108
  }
1867
- onHeaderDblClicked(e, t, i) {
2109
+ /**
2110
+ * Handle the double click event on the table header.
2111
+ *
2112
+ * @param {MouseEvent} event - The mouse event that triggered the double click.
2113
+ * @param {number} _rowIdx - The row index of the header.
2114
+ * @param {number} colIdx - The column index of the header.
2115
+ *
2116
+ * @return {void}
2117
+ */
2118
+ onHeaderDblClicked(e, t, s) {
1868
2119
  var o, n;
1869
- const s = this.tableModel.getColumnDef(i);
1870
- if (s != null && s.sortable && s.sortable()) {
2120
+ const i = this.tableModel.getColumnDef(s);
2121
+ if (i != null && i.sortable && i.sortable()) {
1871
2122
  e.preventDefault(), e.stopPropagation();
1872
- const a = s.sortStatesOrder ? s.sortStatesOrder : this.tableOptions.sortOrder, r = s.sortState ?? "", d = a[(a.indexOf(r) + 1) % a.length], h = new je(i, d);
1873
- this.tableModel.doSort([h]) && ((o = this.tableModel.getColumnDefs()) == null || o.forEach((g) => g.sortState = ""), s.sortState = d), this.repaint(), (n = this.storeSortingService) == null || n.setSortItems([h]);
2123
+ const a = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, r = i.sortState ?? "", d = a[(a.indexOf(r) + 1) % a.length], h = new Xe(s, d);
2124
+ 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]);
1874
2125
  }
1875
2126
  }
2127
+ /**
2128
+ * Changes the focus cell using the specified deltas.
2129
+ *
2130
+ * @param {number} dx - The delta for the column index.
2131
+ * @param {number} dy - The delta for the row index.
2132
+ * @return {boolean} - True if the focus cell was changed, false otherwise.
2133
+ */
1876
2134
  changeFocusCell(e, t) {
1877
2135
  if (!this.isEditing() && this.getFocusModel) {
1878
- const i = this.getFocusModel();
1879
- if (i) {
1880
- const [s, o] = i.getFocus();
1881
- return i.setFocus(s + t, o + e), this.repaint(), !0;
2136
+ const s = this.getFocusModel();
2137
+ if (s) {
2138
+ const [i, o] = s.getFocus();
2139
+ return s.setFocus(i + t, o + e), this.repaint(), !0;
1882
2140
  }
1883
2141
  }
1884
2142
  return !1;
1885
2143
  }
2144
+ /**
2145
+ * Resizes the column based on the mouse event.
2146
+ *
2147
+ * @param {GeMouseEvent} mouseEvent - The mouse event that triggered the resize.
2148
+ */
1886
2149
  resizeColumn(e) {
1887
2150
  this.tableModel.setColumnWidth(this.mouseStartColumnIndex, this.mouseStartWidth + e.draggingX), this.tableModel.recalcPadding(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows();
1888
2151
  }
2152
+ /**
2153
+ * Clears the selection model, if available.
2154
+ *
2155
+ * @return {void}
2156
+ */
1889
2157
  clearSelectionModel() {
1890
2158
  var e;
1891
2159
  this.getSelectionModel && ((e = this.getSelectionModel()) == null || e.clear());
1892
2160
  }
1893
2161
  debugOnce(e, t) {
1894
- var i;
1895
- 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", (i = this.mouseHandler.mouseEvent) == null ? void 0 : i.clientX), console.info("this.hostElement.offsetLeft", this.hostElement.offsetLeft), console.info("this.areaBodyWestGeo.width", this.areaBodyWestGeo.width);
2162
+ var s;
2163
+ 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);
1896
2164
  }
2165
+ /**
2166
+ * Restores the scroll position of the table if auto restore options are enabled.
2167
+ *
2168
+ * @private
2169
+ * @memberof ClassName
2170
+ *
2171
+ * @returns {void}
2172
+ */
1897
2173
  autoRestoreScrollPosition() {
1898
2174
  var e;
1899
2175
  if ((e = this.tableOptions) != null && e.autoRestoreOptions && this.storeScrollPosStateService && this.tableOptions.autoRestoreOptions.autoRestoreScrollPosition) {
1900
- const i = this.storeScrollPosStateService.getScrollOffset();
1901
- i && this.scrollViewport.scrollTo(...i);
2176
+ const s = this.storeScrollPosStateService.getScrollOffset();
2177
+ s && this.scrollViewport.scrollTo(...s);
1902
2178
  }
1903
2179
  }
2180
+ /**
2181
+ * Automatically restores the sorting state of the table.
2182
+ *
2183
+ * @private
2184
+ * @function autoRestoreSortingState
2185
+ * @memberof ClassName
2186
+ *
2187
+ * @description
2188
+ * This method checks if the autoRestoreSortingState option is enabled in the tableOptions.
2189
+ * If enabled, it uses the storeSortingService to retrieve the sort items array.
2190
+ * If there are sort items present, it applies them to the table's body model using the doSort method.
2191
+ *
2192
+ * @returns {void}
2193
+ */
1904
2194
  autoRestoreSortingState() {
1905
2195
  var e, t;
1906
2196
  if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.autoRestoreSortingState && this.storeSortingService) {
1907
- const i = this.storeSortingService.getSortItems();
1908
- i != null && i.length && this.tableModel.getBodyModel().doSort(i);
2197
+ const s = this.storeSortingService.getSortItems();
2198
+ s != null && s.length && this.tableModel.getBodyModel().doSort(s);
1909
2199
  }
1910
2200
  }
2201
+ /**
2202
+ * Restores the collapsed/expanded state of the rows in the table based on the autoRestoreOptions
2203
+ * specified in the tableOptions. This method is private and should not be called directly.
2204
+ *
2205
+ * @private
2206
+ */
1911
2207
  autoRestoreCollapsedExpandedState() {
1912
2208
  var e, t;
1913
2209
  if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
1914
- const i = this.tableOptions.autoRestoreOptions, s = i.getRowId;
1915
- if (i.autoRestoreCollapsedExpandedState && s) {
2210
+ const s = this.tableOptions.autoRestoreOptions, i = s.getRowId;
2211
+ if (s.autoRestoreCollapsedExpandedState && i) {
1916
2212
  const o = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), n = this.tableModel.getAreaModel("body");
1917
- if (z(n)) {
2213
+ if (X(n)) {
1918
2214
  const a = n, r = n.getRowCount();
1919
2215
  for (let d = 0; d < r; d++) {
1920
2216
  const h = n.getRowByIndex(d);
@@ -1924,7 +2220,7 @@ class J extends Ne {
1924
2220
  else if (o.allCollapsed)
1925
2221
  h.expanded = !1;
1926
2222
  else {
1927
- const p = s(h.data);
2223
+ const p = i(h.data);
1928
2224
  o.mode === "expanded" ? h.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(p) : o.mode === "collapsed" && (h.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(p));
1929
2225
  }
1930
2226
  }
@@ -1938,23 +2234,23 @@ function it(l) {
1938
2234
  let e;
1939
2235
  return {
1940
2236
  c() {
1941
- 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");
2237
+ e = be("div"), e.innerHTML = "", ye(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");
1942
2238
  },
1943
- m(t, i) {
1944
- fe(t, e, i), l[3](e);
2239
+ m(t, s) {
2240
+ me(t, e, s), l[3](e);
1945
2241
  },
1946
2242
  p: F,
1947
2243
  i: F,
1948
2244
  o: F,
1949
2245
  d(t) {
1950
- t && oe(e), l[3](null);
2246
+ t && le(e), l[3](null);
1951
2247
  }
1952
2248
  };
1953
2249
  }
1954
- function st(l, e, t) {
1955
- let { tableModel: i } = e, { tableOptions: s = new de() } = e, o;
1956
- const n = pe();
1957
- ue(() => {
2250
+ function ot(l, e, t) {
2251
+ let { tableModel: s } = e, { tableOptions: i = new he() } = e, o;
2252
+ const n = ue();
2253
+ Se(() => {
1958
2254
  const r = {
1959
2255
  onCheckboxChanged: (h) => {
1960
2256
  n("checkboxChanged", h);
@@ -1977,7 +2273,7 @@ function st(l, e, t) {
1977
2273
  onMouseMoved: (h) => {
1978
2274
  n("mouseMoved", h);
1979
2275
  }
1980
- }, d = new J(o, i, new ae(), s, r);
2276
+ }, d = new J(o, s, new de(), i, r);
1981
2277
  d.firstInit(), n("tableReady", d.getApi());
1982
2278
  });
1983
2279
  function a(r) {
@@ -1986,26 +2282,26 @@ function st(l, e, t) {
1986
2282
  });
1987
2283
  }
1988
2284
  return l.$$set = (r) => {
1989
- "tableModel" in r && t(1, i = r.tableModel), "tableOptions" in r && t(2, s = r.tableOptions);
1990
- }, [o, i, s, a];
2285
+ "tableModel" in r && t(1, s = r.tableModel), "tableOptions" in r && t(2, i = r.tableOptions);
2286
+ }, [o, s, i, a];
1991
2287
  }
1992
- class rt extends Ie {
2288
+ class nt extends $e {
1993
2289
  constructor(e) {
1994
- super(), De(this, e, st, it, Se, { tableModel: 1, tableOptions: 2 });
2290
+ super(), Ie(this, e, ot, it, ge, { tableModel: 1, tableOptions: 2 });
1995
2291
  }
1996
2292
  }
1997
- class nt {
2293
+ class at {
1998
2294
  constructor(e) {
1999
2295
  this.Component = e;
2000
2296
  }
2001
- render(e, t, i, s, o, n, a) {
2297
+ render(e, t, s, i, o, n, a) {
2002
2298
  const r = new this.Component({
2003
2299
  target: e,
2004
2300
  props: {
2005
2301
  cellDiv: e,
2006
2302
  rowIndex: t,
2007
- columnIndex: i,
2008
- areaIdent: s,
2303
+ columnIndex: s,
2304
+ areaIdent: i,
2009
2305
  areaModel: o,
2010
2306
  cellValue: n
2011
2307
  }
@@ -2016,6 +2312,6 @@ class nt {
2016
2312
  }
2017
2313
  }
2018
2314
  export {
2019
- nt as ComponentRendererWrapper,
2020
- rt as GuiexpertTable
2315
+ at as ComponentRendererWrapper,
2316
+ nt as GuiexpertTable
2021
2317
  };