@guiexpert/svelte-table 1.0.5 → 1.0.6

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.
package/index.js CHANGED
@@ -1,174 +1,208 @@
1
- import { createEventDispatcher as re, onMount as le } from "svelte";
2
- function O() {
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 _() {
3
6
  }
4
- function Z(n) {
5
- return n();
7
+ function ee(l) {
8
+ return l();
6
9
  }
7
- function J() {
10
+ function Q() {
8
11
  return /* @__PURE__ */ Object.create(null);
9
12
  }
10
- function P(n) {
11
- n.forEach(Z);
13
+ function P(l) {
14
+ l.forEach(ee);
12
15
  }
13
- function ee(n) {
14
- return typeof n == "function";
16
+ function te(l) {
17
+ return typeof l == "function";
15
18
  }
16
- function ne(n, e) {
17
- return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
19
+ function he(l, e) {
20
+ return l != l ? e == e : l !== e || l && typeof l == "object" || typeof l == "function";
18
21
  }
19
- function ae(n) {
20
- return Object.keys(n).length === 0;
22
+ function ce(l) {
23
+ return Object.keys(l).length === 0;
21
24
  }
22
- function de(n, e, t) {
23
- n.insertBefore(e, t || null);
25
+ function pe(l, e, t) {
26
+ l.insertBefore(e, t || null);
24
27
  }
25
- function te(n) {
26
- n.parentNode && n.parentNode.removeChild(n);
28
+ function se(l) {
29
+ l.parentNode && l.parentNode.removeChild(l);
27
30
  }
28
- function he(n) {
29
- return document.createElement(n);
31
+ function ue(l) {
32
+ return document.createElement(l);
30
33
  }
31
- function ce(n, e, t) {
32
- t == null ? n.removeAttribute(e) : n.getAttribute(e) !== t && n.setAttribute(e, t);
34
+ function fe(l, e, t) {
35
+ t == null ? l.removeAttribute(e) : l.getAttribute(e) !== t && l.setAttribute(e, t);
33
36
  }
34
- function pe(n) {
35
- return Array.from(n.childNodes);
37
+ function ge(l) {
38
+ return Array.from(l.childNodes);
36
39
  }
37
- function $(n, e, t, s) {
38
- t == null ? n.style.removeProperty(e) : n.style.setProperty(e, t, s ? "important" : "");
40
+ function $(l, e, t, s) {
41
+ t == null ? l.style.removeProperty(e) : l.style.setProperty(e, t, s ? "important" : "");
39
42
  }
40
- let z;
41
- function L(n) {
42
- z = n;
43
+ let X;
44
+ function L(l) {
45
+ X = l;
43
46
  }
44
- const F = [], V = [];
45
- let _ = [];
46
- const Q = [], ue = /* @__PURE__ */ Promise.resolve();
47
- let W = !1;
48
- function fe() {
49
- W || (W = !0, ue.then(se));
47
+ const F = [], W = [];
48
+ let O = [];
49
+ const Z = [], Se = /* @__PURE__ */ Promise.resolve();
50
+ let G = !1;
51
+ function me() {
52
+ G || (G = !0, Se.then(ie));
50
53
  }
51
- function G(n) {
52
- _.push(n);
54
+ function N(l) {
55
+ O.push(l);
53
56
  }
54
- const H = /* @__PURE__ */ new Set();
57
+ const V = /* @__PURE__ */ new Set();
55
58
  let D = 0;
56
- function se() {
59
+ function ie() {
57
60
  if (D !== 0)
58
61
  return;
59
- const n = z;
62
+ const l = X;
60
63
  do {
61
64
  try {
62
65
  for (; D < F.length; ) {
63
66
  const e = F[D];
64
- D++, L(e), ge(e.$$);
67
+ D++, L(e), be(e.$$);
65
68
  }
66
69
  } catch (e) {
67
70
  throw F.length = 0, D = 0, e;
68
71
  }
69
- for (L(null), F.length = 0, D = 0; V.length; )
70
- V.pop()();
71
- for (let e = 0; e < _.length; e += 1) {
72
- const t = _[e];
73
- H.has(t) || (H.add(t), t());
72
+ for (L(null), F.length = 0, D = 0; W.length; )
73
+ W.pop()();
74
+ for (let e = 0; e < O.length; e += 1) {
75
+ const t = O[e];
76
+ V.has(t) || (V.add(t), t());
74
77
  }
75
- _.length = 0;
78
+ O.length = 0;
76
79
  } while (F.length);
77
- for (; Q.length; )
78
- Q.pop()();
79
- W = !1, H.clear(), L(n);
80
+ for (; Z.length; )
81
+ Z.pop()();
82
+ G = !1, V.clear(), L(l);
80
83
  }
81
- function ge(n) {
82
- if (n.fragment !== null) {
83
- n.update(), P(n.before_update);
84
- const e = n.dirty;
85
- n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(G);
84
+ function be(l) {
85
+ if (l.fragment !== null) {
86
+ l.update(), P(l.before_update);
87
+ const e = l.dirty;
88
+ l.dirty = [-1], l.fragment && l.fragment.p(l.ctx, e), l.after_update.forEach(N);
86
89
  }
87
90
  }
88
- function Se(n) {
91
+ function ye(l) {
89
92
  const e = [], t = [];
90
- _.forEach((s) => n.indexOf(s) === -1 ? e.push(s) : t.push(s)), t.forEach((s) => s()), _ = e;
93
+ O.forEach((s) => l.indexOf(s) === -1 ? e.push(s) : t.push(s)), t.forEach((s) => s()), O = e;
91
94
  }
92
- const me = /* @__PURE__ */ new Set();
93
- function be(n, e) {
94
- n && n.i && (me.delete(n), n.i(e));
95
+ const we = /* @__PURE__ */ new Set();
96
+ function xe(l, e) {
97
+ l && l.i && (we.delete(l), l.i(e));
95
98
  }
96
- function ye(n, e, t, s) {
97
- const { fragment: i, after_update: o } = n.$$;
98
- i && i.m(e, t), s || G(() => {
99
- const r = n.$$.on_mount.map(Z).filter(ee);
100
- n.$$.on_destroy ? n.$$.on_destroy.push(...r) : P(r), n.$$.on_mount = [];
101
- }), o.forEach(G);
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);
102
105
  }
103
- function we(n, e) {
104
- const t = n.$$;
105
- t.fragment !== null && (Se(t.after_update), P(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
106
+ function Ce(l, e) {
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 = []);
106
109
  }
107
- function xe(n, e) {
108
- n.$$.dirty[0] === -1 && (F.push(n), fe(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
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;
109
112
  }
110
- function ve(n, e, t, s, i, o, r, a = [-1]) {
111
- const l = z;
112
- L(n);
113
- const d = n.$$ = {
113
+ function Ae(l, e, t, s, i, o, r = null, a = [-1]) {
114
+ const n = X;
115
+ L(l);
116
+ const d = l.$$ = {
114
117
  fragment: null,
115
118
  ctx: [],
116
119
  // state
117
120
  props: o,
118
- update: O,
121
+ update: _,
119
122
  not_equal: i,
120
- bound: J(),
123
+ bound: Q(),
121
124
  // lifecycle
122
125
  on_mount: [],
123
126
  on_destroy: [],
124
127
  on_disconnect: [],
125
128
  before_update: [],
126
129
  after_update: [],
127
- context: new Map(e.context || (l ? l.$$.context : [])),
130
+ context: new Map(e.context || (n ? n.$$.context : [])),
128
131
  // everything else
129
- callbacks: J(),
132
+ callbacks: Q(),
130
133
  dirty: a,
131
134
  skip_bound: !1,
132
- root: e.target || l.$$.root
135
+ root: e.target || n.$$.root
133
136
  };
134
137
  r && r(d.root);
135
138
  let h = !1;
136
- if (d.ctx = t ? t(n, e.props || {}, (p, g, ...S) => {
139
+ if (d.ctx = t ? t(l, e.props || {}, (p, g, ...S) => {
137
140
  const c = S.length ? S[0] : g;
138
- return d.ctx && i(d.ctx[p], d.ctx[p] = c) && (!d.skip_bound && d.bound[p] && d.bound[p](c), h && xe(n, p)), 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;
139
142
  }) : [], d.update(), h = !0, P(d.before_update), d.fragment = s ? s(d.ctx) : !1, e.target) {
140
143
  if (e.hydrate) {
141
- const p = pe(e.target);
142
- d.fragment && d.fragment.l(p), p.forEach(te);
144
+ const p = ge(e.target);
145
+ d.fragment && d.fragment.l(p), p.forEach(se);
143
146
  } else
144
147
  d.fragment && d.fragment.c();
145
- e.intro && be(n.$$.fragment), ye(n, e.target, e.anchor, e.customElement), se();
148
+ e.intro && xe(l.$$.fragment), ve(l, e.target, e.anchor), ie();
146
149
  }
147
- L(l);
150
+ L(n);
148
151
  }
149
- class Ce {
152
+ class Re {
153
+ constructor() {
154
+ /**
155
+ * ### PRIVATE API
156
+ *
157
+ * Do not use, may change at any time
158
+ *
159
+ * @type {any}
160
+ */
161
+ H(this, "$$");
162
+ /**
163
+ * ### PRIVATE API
164
+ *
165
+ * Do not use, may change at any time
166
+ *
167
+ * @type {any}
168
+ */
169
+ H(this, "$$set");
170
+ }
171
+ /** @returns {void} */
150
172
  $destroy() {
151
- we(this, 1), this.$destroy = O;
173
+ Ce(this, 1), this.$destroy = _;
152
174
  }
175
+ /**
176
+ * @template {Extract<keyof Events, string>} K
177
+ * @param {K} type
178
+ * @param {((e: Events[K]) => void) | null | undefined} callback
179
+ * @returns {() => void}
180
+ */
153
181
  $on(e, t) {
154
- if (!ee(t))
155
- return O;
182
+ if (!te(t))
183
+ return _;
156
184
  const s = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
157
185
  return s.push(t), () => {
158
186
  const i = s.indexOf(t);
159
187
  i !== -1 && s.splice(i, 1);
160
188
  };
161
189
  }
190
+ /**
191
+ * @param {Partial<Props>} props
192
+ * @returns {void}
193
+ */
162
194
  $set(e) {
163
- this.$$set && !ae(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
195
+ this.$$set && !ce(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
164
196
  }
165
197
  }
166
- class X {
167
- constructor(e = -1, t = -1, s = -1, i = -1, o, r, a, l = 0, d = 0, h = 0, p = "") {
168
- this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = i, this.areaIdent = o, this.sideIdent = r, this.originalEvent = a, this.clickCount = l, this.draggingX = d, this.draggingY = h, this.action = p;
198
+ const Me = "4";
199
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Me);
200
+ 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;
169
203
  }
170
204
  clone() {
171
- return new X(
205
+ return new K(
172
206
  this.rowIndex,
173
207
  this.rowTop,
174
208
  this.columnIndex,
@@ -188,7 +222,7 @@ class I {
188
222
  this.content = e, this.style = t, this.classes = s;
189
223
  }
190
224
  }
191
- class ie {
225
+ class oe {
192
226
  constructor(e = new I(
193
227
  ">",
194
228
  "transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
@@ -209,12 +243,12 @@ class ie {
209
243
  this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = i;
210
244
  }
211
245
  }
212
- class oe {
246
+ class re {
213
247
  constructor(e = new I("↑", "", ["ge-header-sorted-asc"]), t = new I("↓", "", ["ge-header-sorted-desc"]), s = new I("↑", "color:transparent;", [])) {
214
248
  this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
215
249
  }
216
250
  }
217
- class Ee {
251
+ class Te {
218
252
  constructor(e) {
219
253
  this.domService = e;
220
254
  }
@@ -285,23 +319,23 @@ class Ee {
285
319
  return this.addClass(e, s), this.domService.appendChild(t, s), s;
286
320
  }
287
321
  addRowDiv(e, t, s = -1, i, o, r = "") {
288
- const a = t.index ?? -1, l = this.getDivOrCreateDiv(a, e);
289
- if (this.domService.addClass(l, "ge-table-row-div"), this.domService.addClass(l, `ge-table-row-div-${t.index}`), i === "body" && o === "center") {
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") {
290
324
  const d = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
291
- this.domService.addClass(l, `ge-table-row-${d}`);
325
+ this.domService.addClass(n, `ge-table-row-${d}`);
292
326
  }
293
- if (this.domService.setStyle(l, "display", "clip"), this.domService.setStyle(l, "position", "absolute"), this.domService.setStyle(l, "left", `${t.left}px`), this.domService.setStyle(l, "top", `${t.top}px`), this.domService.setStyle(l, "width", `${t.width}px`), this.domService.setStyle(l, "height", `${t.height}px`), this.domService.setAttribute(l, "data-row-index", `${s}`), this.domService.setAttribute(l, "data-area", `${i}`), r) {
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) {
294
328
  const d = this.domService.createText(r);
295
- this.domService.appendChild(l, d);
329
+ this.domService.appendChild(n, d);
296
330
  }
297
- return this.domService.appendChild(e.child, l), l;
331
+ return this.domService.appendChild(e.child, n), n;
298
332
  }
299
- addColumnDiv(e, t, s = -1, i = -1, o, r, a = "", l, d, h = void 0, p) {
333
+ addColumnDiv(e, t, s = -1, i = -1, o, r, a = "", n, d, h = void 0, p) {
300
334
  const g = d == null ? void 0 : d.treeOptions, S = d == null ? void 0 : d.showCheckboxWihoutExtraColumn, c = this.domService.createElement("div");
301
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}`);
302
336
  const b = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
303
- 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`), l && l !== "none" && (this.domService.addClass(c, "ge-table-col-tree"), this.addArrowDiv(c, l, g, s, i, o)), S && i === 0 && h && this.addCheckboxToDiv(c, h, o, s), a) {
304
- const u = l !== "none" && i === 0;
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;
305
339
  this.addLabelDiv(c, a, u, s, i, o);
306
340
  }
307
341
  return p && this.addSortedIcon(c, p, d == null ? void 0 : d.sortedOptions, i), this.domService.appendChild(e, c), c;
@@ -321,35 +355,35 @@ class Ee {
321
355
  const a = this.domService.createElement("div");
322
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)
323
357
  if (s) {
324
- const l = this.domService.createText(t);
325
- this.domService.appendChild(a, l);
358
+ const n = this.domService.createText(t);
359
+ this.domService.appendChild(a, n);
326
360
  } else {
327
- const l = this.domService.createElement("div");
328
- this.domService.appendChild(a, l);
361
+ const n = this.domService.createElement("div");
362
+ this.domService.appendChild(a, n);
329
363
  const d = this.domService.createText(t);
330
- this.domService.addClass(l, "ge-table-label"), this.domService.appendChild(l, d), this.domService.setAttribute(l, "data-row-index", `${i}`), this.domService.setAttribute(l, "data-col-index", `${o}`), this.domService.setAttribute(l, "data-area", `${r}`);
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}`);
331
365
  }
332
366
  return this.domService.appendChild(e, a), a;
333
367
  }
334
- addSortedIcon(e, t = "", s = new oe(), i = -1) {
368
+ addSortedIcon(e, t = "", s = new re(), i = -1) {
335
369
  const o = this.domService.createElement("div");
336
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");
337
371
  let r;
338
372
  t === "asc" ? r = s.iconAsc : t === "desc" ? r = s.iconDesc : r = s.iconPlaceholder;
339
- const a = r.content, l = this.domService.createText(a);
340
- this.domService.appendChild(o, l), r.style && this.applyStyleString(o, r.style);
373
+ const a = r.content, n = this.domService.createText(a);
374
+ this.domService.appendChild(o, n), r.style && this.applyStyleString(o, r.style);
341
375
  for (const d of r.classes)
342
376
  this.domService.addClass(o, d);
343
377
  return this.domService.appendChild(e, o), o;
344
378
  }
345
- addArrowDiv(e, t = "none", s = new ie(), i = -1, o = -1, r = "body") {
379
+ addArrowDiv(e, t = "none", s = new oe(), i = -1, o = -1, r = "body") {
346
380
  const a = this.domService.createElement("div");
347
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}`);
348
- let l;
349
- t === "expanded" ? l = s.arrowExpanded : t === "collapsed" ? l = s.arrowCollapsed : l = s.arrowPlaceholder;
350
- const d = l.content, h = this.domService.createText(d);
351
- this.domService.appendChild(a, h), l.style && this.applyStyleString(a, l.style);
352
- for (const p of l.classes)
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)
353
387
  this.domService.addClass(a, p);
354
388
  return this.domService.appendChild(e, a), a;
355
389
  }
@@ -392,25 +426,25 @@ class Ee {
392
426
  return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
393
427
  }
394
428
  }
395
- class N {
429
+ class j {
396
430
  constructor(e, t = !0, s, i, o = 0, r = !1, a = !1) {
397
431
  this.data = e, this.expanded = t, this.children = s, this.parent = i, this.deep = o, this.checked = r, this.keep = a;
398
432
  }
399
433
  }
400
- const K = (n) => n === "header" ? "header" : n === "footer" ? "footer" : "body";
401
- class Ae {
434
+ const Y = (l) => l === "header" ? "header" : l === "footer" ? "footer" : "body";
435
+ class Ie {
402
436
  constructor(e, t) {
403
437
  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)) {
404
438
  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"));
405
439
  const s = e.getAttribute("data-area");
406
- if (s && (this.areaIdent = K(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
440
+ if (s && (this.areaIdent = Y(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
407
441
  const i = e;
408
442
  this.value = i.value;
409
443
  }
410
444
  }
411
445
  }
412
446
  }
413
- class Re {
447
+ class De {
414
448
  constructor(e) {
415
449
  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(
416
450
  (t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
@@ -422,12 +456,12 @@ class Re {
422
456
  this.tableScope.contextmenu(t);
423
457
  }
424
458
  onHostElementClicked(e) {
425
- const t = new Ae(e.target, this.tableScope);
459
+ const t = new Ie(e.target, this.tableScope);
426
460
  if (t.action === "toggleExpandCollapseAll")
427
461
  this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
428
462
  else if (t.inputType === "checkbox" && t.areaIdent)
429
463
  this.tableScope.toggleRowCheckbox(t.rowIdx, t.colIdx, t.areaIdent), e.preventDefault(), e.stopPropagation();
430
- else if (t.row instanceof N && t.areaModel) {
464
+ else if (t.row instanceof j && t.areaModel) {
431
465
  const s = t.colIdx === this.getArrowColumnIndex() && e.altKey, i = t.className.includes("ge-table-tree-arrow-div");
432
466
  if (console.info(i, s), s || i) {
433
467
  e.preventDefault(), e.stopPropagation();
@@ -443,14 +477,14 @@ class Re {
443
477
  }
444
478
  onHostElementDblClicked(e) {
445
479
  if (e.target instanceof HTMLElement) {
446
- const t = e.target, s = t.getAttribute("data-area"), i = K(s), o = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), a = this.tableScope.tableModel.getAreaModel(i);
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);
447
481
  if (s && i === "header")
448
482
  this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, o, r));
449
483
  else if (t.getAttribute("data-row-index")) {
450
- const l = a.getRowByIndex(o);
451
- if (s && i === "body" && a.isEditable(o, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, r)), l instanceof N && r === this.getArrowColumnIndex()) {
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()) {
452
486
  e.preventDefault(), e.stopPropagation();
453
- const d = l;
487
+ const d = n;
454
488
  d.expanded = !d.expanded, "recalcVisibleTreeRows" in a && a.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(d);
455
489
  }
456
490
  }
@@ -465,7 +499,7 @@ class Re {
465
499
  var s, i, o, r, a;
466
500
  const t = (i = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : i.getRowId;
467
501
  if (t) {
468
- const l = (o = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : o.collapsedExpandedStateGet().mode, d = l === "collapsed" && !e.expanded || l === "expanded" && e.expanded, h = l === "collapsed" && e.expanded || l === "expanded" && !e.expanded, p = t(e.data);
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);
469
503
  d ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(p) : h && ((a = this.tableScope.storeStateCollapsedExpandService) == null || a.collapsedStateIdsRemove(p));
470
504
  }
471
505
  }
@@ -502,7 +536,7 @@ class Re {
502
536
  }
503
537
  }
504
538
  }
505
- class Me {
539
+ class Fe {
506
540
  constructor(e) {
507
541
  this.tableScope = e;
508
542
  }
@@ -535,7 +569,7 @@ class Me {
535
569
  this.tableScope.repaint();
536
570
  }
537
571
  }
538
- class Te {
572
+ class _e {
539
573
  flattenTree(e, t = []) {
540
574
  var s;
541
575
  for (const i of e)
@@ -546,7 +580,7 @@ class Te {
546
580
  return e.parent ? e.parent.expanded ? this.isVisible(e.parent) : !1 : !0;
547
581
  }
548
582
  }
549
- class Ie {
583
+ class Oe {
550
584
  constructor(e, t = [], s = -1) {
551
585
  this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = s, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((i) => i.rendererMap[e]);
552
586
  }
@@ -637,7 +671,7 @@ class Ie {
637
671
  this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
638
672
  }
639
673
  }
640
- class De {
674
+ class $e {
641
675
  genericSortComparator(e, t, s) {
642
676
  if (typeof e == "number" && typeof t == "number")
643
677
  return s * (e - t);
@@ -655,9 +689,9 @@ class De {
655
689
  return s * ("" + e).localeCompare("" + t);
656
690
  }
657
691
  }
658
- class j extends Ie {
692
+ class z extends Oe {
659
693
  constructor(e, t, s, i = []) {
660
- super(e, i, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = i, this.sorterService = new De(), this.service = new Te(), this.properties = i.map((o) => o.property), this.flattenRows = this.service.flattenTree(t), this.filteredFlattenRows = [...this.flattenRows];
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];
661
695
  }
662
696
  changeColumnOrder(e, t) {
663
697
  this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
@@ -714,8 +748,8 @@ class j extends Ie {
714
748
  i && (s = i(s, e, t));
715
749
  const o = this.getRowByIndex(e);
716
750
  if (o) {
717
- const a = o.data, l = this.columnDefs[t].property;
718
- return l.includes(".") ? this.setPropertyValue(a, l.split("."), s) : (a[l] = s, !0);
751
+ const a = o.data, n = this.columnDefs[t].property;
752
+ return n.includes(".") ? this.setPropertyValue(a, n.split("."), s) : (a[n] = s, !0);
719
753
  }
720
754
  return !1;
721
755
  }
@@ -759,7 +793,7 @@ class j extends Ie {
759
793
  i.children && this.treeSort(i.children, t, s);
760
794
  }
761
795
  }
762
- class Y {
796
+ class q {
763
797
  constructor(e) {
764
798
  this.getStorageKeyFn = e;
765
799
  }
@@ -834,7 +868,7 @@ class Y {
834
868
  // }
835
869
  // }
836
870
  }
837
- class Fe extends Y {
871
+ class Le extends q {
838
872
  constructor(e) {
839
873
  super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
840
874
  }
@@ -856,14 +890,14 @@ class Fe extends Y {
856
890
  }
857
891
  }
858
892
  }
859
- class Oe {
893
+ class Be {
860
894
  constructor(e = "collapsed", t = [], s = !1, i = !1) {
861
895
  this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = i;
862
896
  }
863
897
  }
864
- class _e extends Y {
898
+ class Pe extends q {
865
899
  constructor(e) {
866
- super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Oe(), this.load();
900
+ super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Be(), this.load();
867
901
  }
868
902
  collapsedExpandedStateGet() {
869
903
  return this.collapsedExpandedState;
@@ -895,7 +929,7 @@ class _e extends Y {
895
929
  this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
896
930
  }
897
931
  }
898
- class $e extends Y {
932
+ class ke extends q {
899
933
  constructor(e) {
900
934
  super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
901
935
  }
@@ -922,7 +956,7 @@ class T {
922
956
  this.left = e, this.width = t, this.height = s, this.top = i, this.index = o;
923
957
  }
924
958
  }
925
- class Le {
959
+ class He {
926
960
  constructor(e, t, s, i) {
927
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();
928
962
  const o = this.hostElement;
@@ -1099,7 +1133,7 @@ class A {
1099
1133
  return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
1100
1134
  }
1101
1135
  }
1102
- class Be {
1136
+ class Ve {
1103
1137
  constructor(e, t) {
1104
1138
  this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
1105
1139
  }
@@ -1132,22 +1166,22 @@ class Be {
1132
1166
  return !1;
1133
1167
  }
1134
1168
  }
1135
- class Pe {
1169
+ class We {
1136
1170
  constructor(e, t, s) {
1137
1171
  this.header = e, this.body = t, this.footer = s;
1138
1172
  }
1139
1173
  }
1140
- class ke extends Le {
1174
+ class Ge extends He {
1141
1175
  constructor(e, t, s, i) {
1142
1176
  var r, a;
1143
1177
  super(e, t, s, i), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
1144
1178
  header: [],
1145
1179
  body: [],
1146
1180
  footer: []
1147
- }, this.tree = !1, this.colAndRowspanModels = new Pe(), 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 j && (this.tree = !0), ["header", "body", "footer"].forEach(
1148
- (l) => {
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) => {
1149
1183
  var d;
1150
- this.colAndRowspanModels[l] = new Be(t, t.getAreaModel(l)), (d = this.colAndRowspanModels[l]) == null || d.init();
1184
+ this.colAndRowspanModels[n] = new Ve(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
1151
1185
  }
1152
1186
  );
1153
1187
  }
@@ -1267,7 +1301,7 @@ class ke extends Le {
1267
1301
  var u;
1268
1302
  const s = this.getArea(e, "west"), i = this.getArea(e, "center"), o = this.getArea(e, "east"), r = i.child.clientHeight;
1269
1303
  s.child.innerText = "", i.child.innerText = "", o.child.innerText = "";
1270
- const a = 0, l = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), h = this.tableModel.getAreaModel(e), p = h.getRowCount();
1304
+ const a = 0, n = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), h = this.tableModel.getAreaModel(e), p = h.getRowCount();
1271
1305
  for (; this.cleanupFunctions[e].length; ) {
1272
1306
  const f = this.cleanupFunctions[e].shift();
1273
1307
  f && f();
@@ -1278,7 +1312,7 @@ class ke extends Le {
1278
1312
  const x = g, v = f === p - 1, C = this.tableModel.getRowHeight(e, f);
1279
1313
  if (x + C > 0) {
1280
1314
  this.firstVisibleRowIndex = f;
1281
- let w = { left: a, width: l, height: C, top: x, index: f }, m = this.dom.addRowDiv(i, w, f, e, "center");
1315
+ let w = { left: a, width: n, height: C, top: x, index: f }, m = this.dom.addRowDiv(i, w, f, e, "center");
1282
1316
  const M = b;
1283
1317
  if (this.adjustColumnsToRowParent({
1284
1318
  areaIdent: e,
@@ -1359,9 +1393,9 @@ class ke extends Le {
1359
1393
  * @protected
1360
1394
  */
1361
1395
  drawBigCell(e, t, s, i, o, r) {
1362
- const a = s + this.getRowHeights(0, e.r1 - 1, i).reduce((u, f) => u + f, 0), l = this.tableModel.getColumnCount(), d = this.tableModel.getFixedRightColumnCount();
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();
1363
1397
  let h = 0;
1364
- d > 0 && e.c1 >= l - d && (h = l - d);
1398
+ d > 0 && e.c1 >= n - d && (h = n - d);
1365
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);
1366
1400
  let c = !1;
1367
1401
  const b = this.getSelectionModel ? this.getSelectionModel() : void 0;
@@ -1422,7 +1456,7 @@ class ke extends Le {
1422
1456
  parent: o,
1423
1457
  rowIndex: r,
1424
1458
  columnIndexStart: a,
1425
- columnIndexEnd: l,
1459
+ columnIndexEnd: n,
1426
1460
  verticalFixed: d = !1,
1427
1461
  lastRowOfModel: h = !1
1428
1462
  }) {
@@ -1435,7 +1469,7 @@ class ke extends Le {
1435
1469
  }
1436
1470
  const g = 0, S = !!(e === "body" && t);
1437
1471
  let c = p;
1438
- for (let u = a; u <= l; u++) {
1472
+ for (let u = a; u <= n; u++) {
1439
1473
  const f = c, x = this.tableModel.getColumnWidth(u);
1440
1474
  if (x > 0 && f + x > 0) {
1441
1475
  let v = i.height;
@@ -1491,17 +1525,17 @@ class ke extends Le {
1491
1525
  index: o,
1492
1526
  left: r,
1493
1527
  width: a,
1494
- height: l,
1528
+ height: n,
1495
1529
  top: d,
1496
1530
  parent: h,
1497
1531
  lastRowOfModel: p
1498
1532
  }) {
1499
- var U;
1500
- const S = this.editorRenderer && this.editorRendererRow === i && this.editorRendererColumn === o ? this.editorRenderer : e.getCellRenderer(i, o), c = { left: r, width: a, height: l, top: d, index: o }, b = e.getRowByIndex(i);
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);
1501
1535
  let u = "none";
1502
- if (o === this.getTreeArrowColumnIndex() && b instanceof N) {
1536
+ if (o === this.getTreeArrowColumnIndex() && b instanceof j) {
1503
1537
  const y = b;
1504
- (U = y.children) != null && U.length ? y.expanded ? u = "expanded" : u = "collapsed" : u = "hidden";
1538
+ (J = y.children) != null && J.length ? y.expanded ? u = "expanded" : u = "collapsed" : u = "hidden";
1505
1539
  }
1506
1540
  let x;
1507
1541
  if (t === "header") {
@@ -1527,7 +1561,7 @@ class ke extends Le {
1527
1561
  let R;
1528
1562
  S && (R = S.render(m, i, o, t, e, v, this.dom.domService));
1529
1563
  const B = e.getCustomClassesAt(i, o);
1530
- 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: l, top: d + l }, h), this.getFocusModel && t === "body") {
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") {
1531
1565
  const y = this.getFocusModel();
1532
1566
  y != null && y.hasFocus(i, o) && this.dom.addFocusBorderDivs(h, c, {});
1533
1567
  }
@@ -1595,7 +1629,7 @@ class ke extends Le {
1595
1629
  );
1596
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;
1597
1631
  }
1598
- renderSelectedBackgroundDiv(e, t, s, i, o, r, a, l, d, h, p) {
1632
+ renderSelectedBackgroundDiv(e, t, s, i, o, r, a, n, d, h, p) {
1599
1633
  let g = !1;
1600
1634
  if (!e && t && i.isSelectable(o, r) && this.getSelectionModel) {
1601
1635
  const S = this.getSelectionModel();
@@ -1607,7 +1641,7 @@ class ke extends Le {
1607
1641
  // ge-table-body-west-selected-range
1608
1642
  this.dom.createDivWithClass(`ge-table-${i.areaIdent}-${s}-selected-range`, a)
1609
1643
  );
1610
- this.dom.setStyle(u, "left", `${l}px`), this.dom.setStyle(u, "top", `${d}px`), this.dom.setStyle(u, "width", `${h}px`), this.dom.setStyle(u, "height", `${p}px`);
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`);
1611
1645
  }
1612
1646
  }
1613
1647
  }
@@ -1621,7 +1655,7 @@ class ke extends Le {
1621
1655
  columnIndex: o,
1622
1656
  left: r,
1623
1657
  top: a,
1624
- width: l,
1658
+ width: n,
1625
1659
  height: d,
1626
1660
  parent: h,
1627
1661
  cellSelected: p,
@@ -1635,7 +1669,7 @@ class ke extends Le {
1635
1669
  rowIndex: i,
1636
1670
  index: o,
1637
1671
  left: r,
1638
- width: l,
1672
+ width: n,
1639
1673
  height: d,
1640
1674
  top: a,
1641
1675
  parent: h,
@@ -1645,16 +1679,16 @@ class ke extends Le {
1645
1679
  p && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, c), b && this.cleanupFunctions[t].push(b);
1646
1680
  }
1647
1681
  renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: i, cellWidth: o, cellHeight: r, parent: a }) {
1648
- const l = this.dom.domService, d = this.tableOptions.columnResizeHandleWidthInPx ?? 2, h = l.createElement("div");
1649
- l.setAttribute(h, "data-col-index", `${t}`), l.setAttribute(h, "data-row-index", `${e}`), l.setAttribute(h, "data-area", "header"), l.setAttribute(h, "data-ge-action", "resize-column"), l.addClass(h, "ge-table-column-resize-handle"), l.setStyle(h, "display", "clip"), l.setStyle(h, "position", "absolute"), l.setStyle(h, "cursor", "col-resize"), l.setStyle(h, "left", `${s + o - d}px`), l.setStyle(h, "top", `${i}px`), l.setStyle(h, "width", `${d}px`), l.setStyle(h, "height", `${r}px`), l.appendChild(a, h);
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);
1650
1684
  }
1651
1685
  }
1652
- class He {
1686
+ class Ne {
1653
1687
  constructor(e, t) {
1654
1688
  this.columnIndex = e, this.sortState = t;
1655
1689
  }
1656
1690
  }
1657
- class Ve {
1691
+ class je {
1658
1692
  constructor(e) {
1659
1693
  this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
1660
1694
  }
@@ -1662,36 +1696,36 @@ class Ve {
1662
1696
  if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
1663
1697
  const t = e.target, s = t.getAttribute("data-area"), i = t.getAttribute("data-row-index"), o = t.getAttribute("data-col-index");
1664
1698
  if (s && i && o) {
1665
- const r = K(s), a = Number(i), l = Number(o);
1666
- this.tableScope.updateModelValueAfterEdit(r, a, l, t.value);
1699
+ const r = Y(s), a = Number(i), n = Number(o);
1700
+ this.tableScope.updateModelValueAfterEdit(r, a, n, t.value);
1667
1701
  }
1668
1702
  }
1669
1703
  }
1670
1704
  }
1671
- class We {
1705
+ class ze {
1672
1706
  constructor(e = -1, t = -1) {
1673
1707
  this.rowIndex = e, this.columnIndex = t;
1674
1708
  }
1675
1709
  }
1676
- class q {
1710
+ class U {
1677
1711
  constructor(e) {
1678
1712
  this.cells = e;
1679
1713
  }
1680
1714
  static createSingle(e, t) {
1681
- return new q([new We(e, t)]);
1715
+ return new U([new ze(e, t)]);
1682
1716
  }
1683
1717
  }
1684
- class Ge {
1718
+ class Xe {
1685
1719
  constructor(e) {
1686
1720
  var t, s;
1687
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);
1688
1722
  }
1689
1723
  onMouseClicked(e, t) {
1690
- var o, r, a, l, d, h, p;
1724
+ var o, r, a, n, d, h, p;
1691
1725
  let s = !1, i = !1;
1692
1726
  if (this.getSelectionModel && this.getFocusModel) {
1693
1727
  const g = this.getSelectionModel(), S = this.getFocusModel();
1694
- 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 || (l = e.originalEvent) != null && l.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));
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));
1695
1729
  }
1696
1730
  return i ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
1697
1731
  }
@@ -1722,7 +1756,7 @@ class Ge {
1722
1756
  });
1723
1757
  }
1724
1758
  }
1725
- class Ne {
1759
+ class Ke {
1726
1760
  get() {
1727
1761
  return {
1728
1762
  f2: "START_EDITING",
@@ -1740,7 +1774,7 @@ class Ne {
1740
1774
  };
1741
1775
  }
1742
1776
  }
1743
- class je {
1777
+ class Ye {
1744
1778
  get() {
1745
1779
  return {
1746
1780
  f2: "START_EDITING",
@@ -1760,7 +1794,7 @@ class je {
1760
1794
  };
1761
1795
  }
1762
1796
  }
1763
- class ze {
1797
+ class qe {
1764
1798
  constructor(e) {
1765
1799
  this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
1766
1800
  }
@@ -1768,7 +1802,7 @@ class ze {
1768
1802
  this.listener.includes(e) || this.listener.push(e);
1769
1803
  }
1770
1804
  init() {
1771
- this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new je().get()) : Object.assign(this.shortcutActionIdMapping, new Ne().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));
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));
1772
1806
  }
1773
1807
  isMacintosh() {
1774
1808
  return navigator.platform.indexOf("Mac") > -1;
@@ -1812,7 +1846,7 @@ class ze {
1812
1846
  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();
1813
1847
  }
1814
1848
  }
1815
- class Xe {
1849
+ class Ue {
1816
1850
  onCheckboxChanged(e) {
1817
1851
  }
1818
1852
  onContextmenu(e) {
@@ -1828,19 +1862,19 @@ class Xe {
1828
1862
  onMouseMoved(e) {
1829
1863
  }
1830
1864
  }
1831
- class Ke extends ke {
1865
+ class Je extends Ge {
1832
1866
  constructor(e, t, s, i, o) {
1833
1867
  var r;
1834
1868
  if (super(
1835
1869
  e,
1836
1870
  t,
1837
- new Ee(s),
1871
+ new Te(s),
1838
1872
  i
1839
- ), this.eventListener = o, this.selectionService = new Ge(this), this.api = new Me(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, o || (this.eventListener = new Xe()), (r = this.tableOptions) != null && r.autoRestoreOptions) {
1840
- const a = this.tableOptions.autoRestoreOptions, l = a.getStorageKeyFn;
1841
- l && (a.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Fe(l)), a.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new _e(l)), a.autoRestoreSortingState && (this.storeSortingService = new $e(l)));
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)));
1842
1876
  }
1843
- this.mouseHandler = new Re(this), this.inputHandler = new Ve(this), this.shortcutService = new ze(this), this.shortcutService.addListener(this.selectionService);
1877
+ this.mouseHandler = new De(this), this.inputHandler = new je(this), this.shortcutService = new qe(this), this.shortcutService.addListener(this.selectionService);
1844
1878
  }
1845
1879
  onActionTriggered(e) {
1846
1880
  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))
@@ -1856,7 +1890,7 @@ class Ke extends ke {
1856
1890
  return !1;
1857
1891
  }
1858
1892
  updateModelValueAfterEdit(e, t, s, i) {
1859
- e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, i) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(q.createSingle(t, s)), this.hostElement.focus());
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());
1860
1894
  }
1861
1895
  getApi() {
1862
1896
  return this.api;
@@ -1869,7 +1903,7 @@ class Ke extends ke {
1869
1903
  this.tableModel.init(), (e = this.tableOptions) != null && e.externalFilterFunction && this.externalFilterChanged(!1), this.autoRestoreCollapsedExpandedState(), this.autoRestoreSortingState(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows(), this.autoRestoreScrollPosition();
1870
1904
  }
1871
1905
  createGeMouseEvent(e) {
1872
- const t = new X();
1906
+ const t = new K();
1873
1907
  if (t.originalEvent = e, e) {
1874
1908
  const s = e.target;
1875
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) {
@@ -1901,13 +1935,13 @@ class Ke extends ke {
1901
1935
  toggleExpandCollapseAll(e = !0) {
1902
1936
  var s;
1903
1937
  const t = this.tableModel.getBodyModel();
1904
- t instanceof j && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
1938
+ t instanceof z && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
1905
1939
  }
1906
1940
  toggleRowCheckbox(e, t, s) {
1907
- var l;
1941
+ var n;
1908
1942
  const i = this.tableModel.getAreaModel(s), o = i.isRowChecked(e), r = o === void 0 || o === "semi" || o === "none";
1909
1943
  i.setRowChecked(e, r), this.repaint();
1910
- const a = (l = i.rowSelectionModel) == null ? void 0 : l.getCheckedRows();
1944
+ const a = (n = i.rowSelectionModel) == null ? void 0 : n.getCheckedRows();
1911
1945
  this.eventListener.onCheckboxChanged(a || []);
1912
1946
  }
1913
1947
  onMouseClicked(e, t) {
@@ -1927,7 +1961,7 @@ class Ke extends ke {
1927
1961
  const i = this.tableModel.getColumnDef(s);
1928
1962
  if (i != null && i.sortable && i.sortable()) {
1929
1963
  e.preventDefault(), e.stopPropagation();
1930
- const a = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, l = i.sortState ?? "", d = a[(a.indexOf(l) + 1) % a.length], h = new He(s, d);
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);
1931
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]);
1932
1966
  }
1933
1967
  }
@@ -1972,9 +2006,9 @@ class Ke extends ke {
1972
2006
  const s = this.tableOptions.autoRestoreOptions, i = s.getRowId;
1973
2007
  if (s.autoRestoreCollapsedExpandedState && i) {
1974
2008
  const o = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
1975
- if (r instanceof j) {
1976
- const a = r, l = r.getRowCount();
1977
- for (let d = 0; d < l; d++) {
2009
+ if (r instanceof z) {
2010
+ const a = r, n = r.getRowCount();
2011
+ for (let d = 0; d < n; d++) {
1978
2012
  const h = r.getRowByIndex(d);
1979
2013
  if (h)
1980
2014
  if (o.allExpanded)
@@ -1992,15 +2026,15 @@ class Ke extends ke {
1992
2026
  }
1993
2027
  }
1994
2028
  }
1995
- class Ye {
2029
+ class Qe {
1996
2030
  render(e, t, s, i, o, r, a) {
1997
2031
  if (o.isEditable(t, s)) {
1998
2032
  a.addClass(e, "ge-table-row-input-div");
1999
- const l = o.getValueAt(t, s);
2033
+ const n = o.getValueAt(t, s);
2000
2034
  e.innerHTML = `
2001
2035
  <input
2002
2036
  type="text"
2003
- value="${l}"
2037
+ value="${n}"
2004
2038
  autofocus
2005
2039
  onfocus="this.setSelectionRange(0, this.value.length)"
2006
2040
  data-listen="change"
@@ -2013,7 +2047,7 @@ class Ye {
2013
2047
  }
2014
2048
  }
2015
2049
  }
2016
- class qe {
2050
+ class Ze {
2017
2051
  constructor(e = "none", t = "single") {
2018
2052
  this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
2019
2053
  }
@@ -2057,7 +2091,7 @@ class qe {
2057
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));
2058
2092
  }
2059
2093
  }
2060
- class Ue {
2094
+ class et {
2061
2095
  constructor(e = "none") {
2062
2096
  this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
2063
2097
  }
@@ -2080,17 +2114,17 @@ class Ue {
2080
2114
  return [this.rowIndex, this.columnIndex];
2081
2115
  }
2082
2116
  }
2083
- const Je = new qe(), Qe = new Ue("cell");
2084
- class Ze {
2117
+ const tt = new Ze(), st = new et("cell");
2118
+ class it {
2085
2119
  constructor() {
2086
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 = {
2087
2121
  header: 34,
2088
2122
  body: 34,
2089
2123
  footer: 34
2090
- }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ie(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new oe(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new Ye(), this.getSelectionModel = () => Je, this.getFocusModel = () => Qe;
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;
2091
2125
  }
2092
2126
  }
2093
- class et {
2127
+ class ot {
2094
2128
  setStyle(e, t, s) {
2095
2129
  return e.style[t] = s, e;
2096
2130
  }
@@ -2114,28 +2148,28 @@ class et {
2114
2148
  e.setAttribute(t, s);
2115
2149
  }
2116
2150
  }
2117
- function tt(n) {
2151
+ function rt(l) {
2118
2152
  let e;
2119
2153
  return {
2120
2154
  c() {
2121
- e = he("div"), ce(e, "class", "ge-table"), $(e, "width", "100%"), $(e, "height", "100%"), $(e, "background-color", "transparent"), $(e, "padding", "0"), $(e, "margin", "0");
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");
2122
2156
  },
2123
2157
  m(t, s) {
2124
- de(t, e, s), n[3](e);
2158
+ pe(t, e, s), l[3](e);
2125
2159
  },
2126
- p: O,
2127
- i: O,
2128
- o: O,
2160
+ p: _,
2161
+ i: _,
2162
+ o: _,
2129
2163
  d(t) {
2130
- t && te(e), n[3](null);
2164
+ t && se(e), l[3](null);
2131
2165
  }
2132
2166
  };
2133
2167
  }
2134
- function st(n, e, t) {
2135
- let { tableModel: s } = e, { tableOptions: i = new Ze() } = e, o;
2136
- const r = re();
2137
- le(() => {
2138
- const l = {
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 = {
2139
2173
  onCheckboxChanged: (h) => {
2140
2174
  r("checkboxChanged", h);
2141
2175
  },
@@ -2157,29 +2191,29 @@ function st(n, e, t) {
2157
2191
  onMouseMoved: (h) => {
2158
2192
  r("mouseMoved", h);
2159
2193
  }
2160
- }, d = new Ke(o, s, new et(), i, l);
2194
+ }, d = new Je(o, s, new ot(), i, n);
2161
2195
  d.firstInit(), r("tableReady", d.getApi());
2162
2196
  });
2163
- function a(l) {
2164
- V[l ? "unshift" : "push"](() => {
2165
- o = l, t(0, o);
2197
+ function a(n) {
2198
+ W[n ? "unshift" : "push"](() => {
2199
+ o = n, t(0, o);
2166
2200
  });
2167
2201
  }
2168
- return n.$$set = (l) => {
2169
- "tableModel" in l && t(1, s = l.tableModel), "tableOptions" in l && t(2, i = l.tableOptions);
2202
+ return l.$$set = (n) => {
2203
+ "tableModel" in n && t(1, s = n.tableModel), "tableOptions" in n && t(2, i = n.tableOptions);
2170
2204
  }, [o, s, i, a];
2171
2205
  }
2172
- class ot extends Ce {
2206
+ class dt extends Re {
2173
2207
  constructor(e) {
2174
- super(), ve(this, e, st, tt, ne, { tableModel: 1, tableOptions: 2 });
2208
+ super(), Ae(this, e, lt, rt, he, { tableModel: 1, tableOptions: 2 });
2175
2209
  }
2176
2210
  }
2177
- class rt {
2211
+ class ht {
2178
2212
  constructor(e) {
2179
2213
  this.Component = e;
2180
2214
  }
2181
2215
  render(e, t, s, i, o, r, a) {
2182
- const l = new this.Component({
2216
+ const n = new this.Component({
2183
2217
  target: e,
2184
2218
  props: {
2185
2219
  cellDiv: e,
@@ -2191,11 +2225,11 @@ class rt {
2191
2225
  }
2192
2226
  });
2193
2227
  return () => {
2194
- l.$destroy();
2228
+ n.$destroy();
2195
2229
  };
2196
2230
  }
2197
2231
  }
2198
2232
  export {
2199
- rt as ComponentRendererWrapper,
2200
- ot as GuiexpertTable
2233
+ ht as ComponentRendererWrapper,
2234
+ dt as GuiexpertTable
2201
2235
  };