@guiexpert/svelte-table 1.0.6 → 1.0.7

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